diff --git a/browser/QCObjects.js b/browser/QCObjects.js index bfc83fc8..6bd92738 100644 --- a/browser/QCObjects.js +++ b/browser/QCObjects.js @@ -1,2 +1,2 @@ -import{b as a}from"./chunks/chunk-O2PFFZVJ.js";export default a(); +import{b as a}from"./chunks/chunk-ZYLXOA35.js";export default a(); //# sourceMappingURL=QCObjects.js.map diff --git a/browser/chunks/chunk-TBLBK5VV.js b/browser/chunks/chunk-TBLBK5VV.js new file mode 100644 index 00000000..dcd01c9f --- /dev/null +++ b/browser/chunks/chunk-TBLBK5VV.js @@ -0,0 +1,713 @@ +var Wt=Object.defineProperty;var Jt=(Me,j,y)=>j in Me?Wt(Me,j,{enumerable:!0,configurable:!0,writable:!0,value:y}):Me[j]=y;var O=(Me,j)=>Wt(Me,"name",{value:j,configurable:!0}),at=(Me=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(Me,{get:(j,y)=>(typeof require<"u"?require:j)[y]}):Me)(function(Me){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+Me+'" is not supported')});var Ht=(Me,j)=>()=>(j||Me((j={exports:{}}).exports,j),j.exports);var W=(Me,j,y)=>(Jt(Me,typeof j!="symbol"?j+"":j,y),y);var Bt=Ht(()=>{"use strict";var ae=(()=>{var Me=Object.defineProperty,j=O((A,f,d)=>f in A?Me(A,f,{enumerable:!0,configurable:!0,writable:!0,value:d}):A[f]=d,"Zn"),y=O((A,f)=>Me(A,"name",{value:f,configurable:!0}),"c"),_t=(A=>typeof at<"u"?at:typeof Proxy<"u"?new Proxy(A,{get:(f,d)=>(typeof at<"u"?at:f)[d]}):A)(function(A){if(typeof at<"u")return at.apply(this,arguments);throw new Error('Dynamic require of "'+A+'" is not supported')}),L=O((A,f)=>()=>(f||A((f={exports:{}}).exports,f),f.exports),"V"),U=O((A,f,d)=>(j(A,typeof f!="symbol"?f+"":f,d),d),"S"),jt=L((A,f)=>{y(O(function d(l){"use strict";if(typeof Object.defineProperty<"u"&&typeof l<"u")try{Object.defineProperty(l,"__qcobjects_sdk__",{enumerable:!0,configurable:!1,writable:!1,value:d})}catch{typeof l.__qcobjects_sdk__<"u"&&(l.__qcobjects_sdk__.__loaded__=!0)}if(typeof l.__qcobjects_sdk__.__loaded__>"u"){if(l.__qcobjects_sdk__.__loaded__=!0,typeof l>"u")throw Error("Top context empty: It should either global, module or window");var S=l;l.global=S;var x=typeof window<"u"&&typeof window.self<"u"&&window===window.self,C=typeof f<"u",T=CONFIG.get("remoteImportsPath"),M=CONFIG.get("relativeImportPath"),P=!CONFIG.get("useLocalSDK");P&&!C?CONFIG.set("remoteImportsPath","https://sdk.qcobjects.dev/v2.4/src/js/"):CONFIG.set("relativeImportPath","qcobjects-sdk/src/js/"),typeof l._DOMCreateElement>"u"&&(l._DOMCreateElement=function(V){var ue;return x?ue=document.createElement(V):ue={},ue});var F;if(x&&!C)F=[Import("org.qcobjects.i18n_messages",function(){},P),Import("org.qcobjects.models",function(){},P),Import("org.qcobjects.components",function(){},P),Import("org.qcobjects.components.grid",function(){},P),Import("org.qcobjects.components.list",function(){},P),Import("org.qcobjects.components.slider",function(){},P),Import("org.qcobjects.components.notifications",function(){},P),Import("org.qcobjects.components.splashscreen",function(){},P),Import("org.qcobjects.controllers",function(){},P),Import("org.qcobjects.controllers.grid",function(){},P),Import("org.qcobjects.controllers.list",function(){},P),Import("org.qcobjects.controllers.slider",function(){},P),Import("org.qcobjects.controllers.form",function(){},P),Import("org.qcobjects.controllers.swagger",function(){},P),Import("org.qcobjects.effects",function(){},P),Import("org.qcobjects.modal.controllers",function(){},P),Import("org.qcobjects.views",function(){},P),Import("org.qcobjects.tools.canvas",function(){},P),Import("org.qcobjects.tools.layouts",function(){},P),Import("org.qcobjects.cloud.auth.session.usertoken",function(){},P),Import("org.qcobjects.cloud.auth.session.data",function(){},P)];else{C&&CONFIG.set("remoteImportsPath",CONFIG.get("basePath",""));var oe="qcobjects-sdk/src/js/";F=[Import(oe+"org.qcobjects.models",function(){},P),Import(oe+"org.qcobjects.components",function(){},P),Import(oe+"org.qcobjects.controllers",function(){},P),Import(oe+"org.qcobjects.views",function(){},P),Import(oe+"org.qcobjects.effects",function(){},P),Import(oe+"org.qcobjects.tools.canvas",function(){},P),Import(oe+"org.qcobjects.tools.layouts",function(){},P),Import(oe+"org.qcobjects.cloud.auth.session.usertoken",function(){},P),Import(oe+"org.qcobjects.cloud.auth.session.data",function(){},P)]}let ce=GlobalSettings.__start__.bind(l);l._sdk_=Promise.all(F).then(()=>{CONFIG.set("useSDK",!0),CONFIG.set("remoteImportsPath",T),CONFIG.set("relativeImportPath",M),ce()})}},"w"),"__qcobjects_sdk__").call(null,typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{})}),Ke=L((A,f)=>{var d=jt();f.exports=d}),ve=L((A,f)=>{y(O(function d(l){"use strict";if(typeof Object.defineProperty<"u"&&typeof l<"u")try{Object.defineProperty(l,"__qcobjects__",{enumerable:!0,configurable:!1,writable:!1,value:d})}catch{typeof l.__qcobjects__<"u"&&(l.__qcobjects__.loaded=!0)}if(typeof l.__qcobjects__.loaded>"u"){let mt=O(function(e){C?Xe.push(e.bind(window)):typeof S<"u"&&Xe.push(e.bind(S))},"$e");y(mt,"Ready"),l.__qcobjects__.loaded=!0;var S=l;l.global=S;var x=typeof window<"u"&&"Deno"in window,C=typeof window<"u"&&typeof window.self<"u"&&window===window.self&&!x,T=typeof f<"u",M=y(function(){},"deno_require"),P=y(function(){return x?M(...arguments):_t(...arguments)},"_require_"),F=y(function(e){var n=typeof e.prototype<"u"?e.prototype.toString:function(){return""};typeof e.prototype<"u"&&(e.prototype.toString=function(){var s=["__qcobjects__","__qcobjects_sdk__","__loaded__","ComplexStorageCache","css","append","attachIn","debug","info","warn","QC_Append","set","get","done","componentDone","_new_","__new__","Class","ClassFactory","New","Export","Package","Import","subelements","componentLoader","buildComponents","Controller","View","VO","Service","serviceLoader","JSONService","ConfigService","SourceJS","SourceCSS","ArrayList","ArrayCollection","Effect","Timer","sum","avg","table","max","min","range","matrix","matrix2d","matrix3d","unique","uniqueId","shortCode","NamespaceRef"],c;return s.includes(this.name)?c=this.name+"{ [QCObjects native code] }":c=n.call(this),c})},"_protected_code_");F(Function);var oe=y(function(e){var n=[];for(var s in e)(typeof e[s]).toLowerCase()==="function"&&n.push(e[s]);return n},"_methods_");String.prototype.__mAll__=function(e){var n=[];return this.replace(e,function(){var s=Array.prototype.slice.call(arguments,0,-2);s.input=arguments[arguments.length-1],s.index=arguments[arguments.length-2],n.push(s)}),n},typeof String.prototype.matchAll>"u"&&(String.prototype.matchAll=String.prototype.__mAll__);var ce=y(function(e){var n;return C?n=document.createElement(e):n={},n},"_DOMCreateElement");if(!C){let e=P("fs")}var V=y(function(e){var n=y(function(){var s=new WeakSet,c=0;return function(p,m){if(typeof m=="object"&&m!==null){if(s.has(m))return c+=1,c<=3?ot(m):null;s.add(m)}return m}},"getCircularReplacer");return JSON.stringify(e,n())},"_DataStringify");if(C){var ue=y(function(e){return[...this.querySelectorAll(e)]},"subelements");Element.prototype.subelements=ue,HTMLDocument.prototype.subelements=ue,HTMLElement.prototype.subelements=ue,typeof ShadowRoot<"u"&&(ShadowRoot.prototype.subelements=ue)}if(C)try{l=typeof window.top<"u"?window.top:window,l._allowed_=!0}catch{try{l=document,l._allowed_=!0}catch{try{l=S,l._allowed_=!0}catch{l={},l._allowed_=!0}}}else typeof S<"u"&&(l=S);var R,Oe,de="quick-component:not([loaded]),component:not([loaded])";if(Oe=function(){var e="";if(C){var n=l.document.baseURI.split("?")[0].split("/");n.pop(),e=n.join("/")+"/"}else{var s;try{s=P("process")}catch{}typeof s<"u"?e=`${s.cwd()}/`:e=""}return e}(),C){"Promise"in l||(l.Promise=function(e){var n={then(){},catch(){},_then(s){this.then.call(n,s)},_catch(s){this.catch.call(n,s)}};return e.call(n,n._then,n._catch),n}),typeof l.console>"u"&&(l.console=function(){},l.console.prototype.log=function(e){}),R=function(){return typeof document<"u"&&document.domain!==""?document.domain:"localhost"}();var K=function(){var e=l[(![]+[])[+!+[]+ +!+[]]+(typeof![])[+!+[]]+(typeof[])[(+!+[]+ +!+[])*(+!+[]+ +!+[])]+(![]+[])[+!+[]]+(!![]+[])[+[]]+([]+[]+[][[]])[+[+!+[]+[+[]]]/(+!+[]+ +!+[])]+(typeof![])[+!+[]]+([]+[]+[][[]])[+!+[]]]["h"+(typeof![])[+!+[]]+(![]+[])[+!+[]+(+!+[]+ +!+[])]+(!![]+[])[+[]]].toLowerCase();return e}(),xe=function(){return typeof cordova<"u"}()}else{var K="secret";R="localhost"}l._asyncLoad=[];var we=y(function(e,n){var s={func:e,args:n,dispatch(){this.func.apply(null,this.args)}};return l._asyncLoad.push(s),s},"asyncLoad");if(C){var Fe=y(function(){document.readyState==="complete"&&l._asyncLoad.map(function(e){e.dispatch.call(e)})},"_fireAsyncLoad");document.onreadystatechange=Fe}else typeof l.global<"u"&&(l.global._fireAsyncLoad=function(){l._asyncLoad.map(function(e){e.dispatch.call(e)})});l.asyncLoad=we;var $e=y(function(){return{debugEnabled:!0,infoEnabled:!0,warnEnabled:!0,debug(e){this.debugEnabled&&console.log("\x1B[35m%s\x1B[0m",`[DEBUG][${performance.now().toLocaleString()}] ${e}`)},info(e){var n;this.infoEnabled&&(C?n="\x1B[103m%s\x1B[0m":n="\x1B[33m%s\x1B[0m",console.info(n,`[INFO][${performance.now().toLocaleString()}] ${e}`))},warn(e){this.warnEnabled&&console.warn("\x1B[31m%s\x1B[0m",`[WARN][${performance.now().toLocaleString()}] ${e}`)}}},"Logger"),v=new $e;v.debugEnabled=!1,v.infoEnabled=!0,l.logger=v;var fe={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode(e){var n="",s,c,p,m,_,b,E,k=0;for(e=fe._utf8_encode(e);k>2,_=(s&3)<<4|c>>4,b=(c&15)<<2|p>>6,E=p&63,isNaN(c)?b=E=64:isNaN(p)&&(E=64),n=n+this._keyStr.charAt(m)+this._keyStr.charAt(_)+this._keyStr.charAt(b)+this._keyStr.charAt(E);return n},decode(e){var n="",s,c,p,m,_,b,E,k=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");k>4,c=(_&15)<<4|b>>2,p=(b&3)<<6|E,n=n+String.fromCharCode(s),b!==64&&(n=n+String.fromCharCode(c)),E!==64&&(n=n+String.fromCharCode(p));return n=fe._utf8_decode(n),n},_utf8_encode(e){e=e.replace(/rn/g,"n");for(var n="",s=0;s127&&c<2048?(n+=String.fromCharCode(c>>6|192),n+=String.fromCharCode(c&63|128)):(n+=String.fromCharCode(c>>12|224),n+=String.fromCharCode(c>>6&63|128),n+=String.fromCharCode(c&63|128))}return n},_utf8_decode(e){for(var n="",s=0,c=0,p=0,m=0,_;s191&&c<224?(m=e.charCodeAt(s+1),n+=String.fromCharCode((c&31)<<6|m&63),s+=2):(m=e.charCodeAt(s+1),_=e.charCodeAt(s+2),n+=String.fromCharCode((c&15)<<12|(m&63)<<6|_&63),s+=3);return n}},B=y(function(e,n){var s=y(function(c,p){var m=2e3,_=0,b=setInterval(function(){p.call()?(clearInterval(b),c.call(),v.debug("Ejecuting "+c.name+" after wait")):_"u")var z={getItem(e){return Object.hasOwnProperty.call(this,e)?this[e]:null},setItem(e,n){this[e]=n},removeItem(e){delete this[e]}};var Ce=y(function(e){var n,s,c;if(n=e.index,typeof n<"u"){s=e.load,c=e.alternate;var p=this.getID(n),m=z.getItem(p);if(this.isEmpty(m)){var _=s.call(null,{cachedObjectID:p,cachedResponse:m,cache:this});this.save(n,_),v.debug("RESPONSE OF {{cachedObjectID}} CACHED".replace("{{cachedObjectID}}",p))}else{var b=c.call(null,{cachedObjectID:p,cachedResponse:m,cache:this});v.debug("RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED ".replace("{{cachedObjectID}}",p))}}else throw new Error("ComplexStorageCache: index is undefined");return this},"ComplexStorageCache");if(Ce.prototype.getItem=function(e){var n=z.getItem(e);return this.isEmpty(n)?null:JSON.parse(n)},Ce.prototype.setItem=function(e,n){z.setItem(e,V(n))},Ce.prototype.isEmpty=function(e){var n=!1;switch(!0){case typeof e>"u":case(typeof e=="string"&&e===""):case(typeof e=="string"&&e==="undefined"):case(typeof e=="number"&&e===0):case e===null:n=!0;break;default:n=!1}return n},Ce.prototype.getID=function(e){var n;return typeof e<"u"&&(n="cachedObject_"+fe.encode(V(e).replace(/\{|\}|,/g,"_"))),n},Ce.prototype.save=function(e,n){var s=this.getID(e);v.debug("CACHING THE RESPONSE OF {{cachedObjectID}} ".replace("{{cachedObjectID}}",s)),this.setItem(s,n)},Ce.prototype.getCached=function(e){var n=this.getID(e);return this.getItem(n)},Ce.prototype.clear=function(){Object.keys(z).filter(function(e){return e.startsWith("cachedObject_")}).map(function(e){z.removeItem(e)})},C){var qe=!1;try{var dt=Object.defineProperty({},"passive",{get(){return qe=!0,qe}});window.addEventListener("testPassive",null,dt),window.removeEventListener("testPassive",null,dt)}catch{}var ht=y(function(){return qe?{passive:!0}:!1},"captureFalse")}C&&(Element.prototype.find=function(e){var n=[],s=document.subelements(e);return s.map(function(c,p){typeof s[p]<"u"&&s[p].parentNode.tagName===this.parentNode.tagName&&n.push(Ye(c,new Object))}),n});var ze,yt=function(){var e=Object.prototype.hasOwnProperty;return function(n){if(typeof n!="object")throw TypeError("Object prototype may only be an Object or null. The type is "+typeof n);var s=y(function(){},"QCObjects");s.prototype=n;var c=new s;if(arguments.length>1){var p=Object(arguments[1]);for(var m in p)e.call(p,m)&&(c[m]=p[m])}return c}}();typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:y(function(e,n){"use strict";if(e===null)throw new TypeError("Cannot convert undefined or null to object");for(var s=Object(e),c=1;c"u"||c===null?c={}:c=ot(c),typeof c.__instanceID<"u"&&delete c.__instanceID,Pe[n]=class extends e[s.name]{constructor(){var p;arguments.length>0?p={...arguments[0]}:p={},super(p),U(this,"__classType",n),U(this,"__definition",{...c});let m=this;if(ze=typeof ze>"u"||ze===null?0:ze+1,m.__instanceID||Object.defineProperty(m,"__instanceID",{value:ze,writable:!1}),typeof m.__definition<"u"&&Object.keys(m.__definition).filter(function(_){return isNaN(_)&&!["name","__instanceID","__classType","__definition"].includes(_)}).forEach(function(_){typeof m.__definition[_]=="function"?m[_]=m.__definition[_].bind(m):m[_]=m.__definition[_]}),oe(Pe[m.__classType]).map(function(_){m[_.name]=_.bind(m)}),oe(m.__definition).map(function(_){m[_.name]=_.bind(m)}),m.body)if(typeof m.__definition>"u"||!Object.hasOwnProperty.call(m.__definition,"body")||typeof m.__definition.body>"u")try{C?m.body=ce(m.__definition.__classType):m.body={}}catch{m.body={}}else Object.hasOwnProperty.call(m.__definition,"body")&&(m.body=m.__definition.body);try{if(typeof m.__new__=="function"?m.__new__.call(m,p):typeof super.__new__=="function"&&(m.__new__=super.__new__.bind(m),m.__new__.call(m,p)),typeof m=="object"&&Object.hasOwnProperty.call(m,"_new_")&&typeof m._new_.isCalled>"u")try{m._new_.call(m,p),m._new_.isCalled=!0}catch(_){v.warn(`${m.__classType}._new_() failed with error: ${_}`)}}catch(_){v.warn(_)}}static hierarchy(p){var m=y(function(E){return Object.hasOwnProperty.call(E,"__classType")?E.__classType:Y.call(p,E)},"__classType"),_=y(E=>typeof E<"u"&&typeof E.__proto__<"u"&&E.__proto__!==null?(m(E)!==""?[m(E)]:[]).concat(_(E.__proto__)):[],"__hierarchy__proto__");(typeof p>"u"||p===null)&&(p=this);var b=[];return b.push(m(p)),b=b.concat(_(p.__proto__)),b}static getParentClass(){return Object.getPrototypeOf(this.prototype.constructor)}__new__(p){Ue(p,this)}_new_(){}getClass(){return Object.getPrototypeOf(this.constructor)}css(p){return typeof this.body<"u"&&this.body.style!=="undefined"&&(v.debug("body style"),this.body.style=Ye(p,this.body.style)),this.body.style}hierarchy(){var p=this;return this.getClass().hierarchy(p)}append(m){v.debug("append: start"),X(m,"Component")&&(v.debug("append: child is a Component"),v.debug(`appending the body of ${m.name}`));var m=arguments.length>0?arguments[0]:this.body;typeof this.body<"u"&&(v.debug("append element"),arguments.lenght>0?(v.debug("append to element"),this.body.append(m),typeof this.childs>"u"&&(this.childs=[]),this.childs.push(m)):C&&(v.debug("append to body"),document.body.append(m)))}attachIn(p){if(C)for(var m=document.subelements(p),_=0,b=m.length;_-1){var s=e.split(".").slice(0,e.split(".").length-1).join("."),c=e.split(".").slice(-1).join(""),p=N(s),m=typeof p<"u"?p.filter(_=>I(_)&&(_.__definition.__classType===c||typeof _=="function"&&!!_.name)).reverse():[];if(m.length>0)n=m[0];else throw Error(`Class ${e} not found.`)}else e!==null&&Object.hasOwnProperty.call(Pe,e)&&(n=Pe[e]);return n},"ClassFactory");C&&(Element.prototype.append=y(function(e){g(e)||typeof e.body<"u"?this.appendChild(e.body):this.appendChild(e)},"QC_Append"),Element.prototype.render=y(function(e){var n=this,s=y(function(c,p){if(typeof document.implementation.createHTMLDocument<"u"){var m=document.implementation.createHTMLDocument("");m.innerHTML=p,m.body.subelements("*").map(function(_){return c.append(_)})}},"_appendVDOM");if(typeof this.innerHTML<"u")try{this.innerHTML+=e}catch{s(n,e)}else s(n,e)},"QC_Render"));var Ze=y(function(e,n,s){return G(e)[n]},"_super_");Ze.prototype.toString=function(){return"_super_(className,classMethodName,params) { [QCObjects native code] }"};var o=y(function(e,n){return n=arguments.length>1?n:{},typeof e>"u"?new Object:new e(n)},"New");o.prototype.toString=function(){return"New(QCObjectsClassName, args) { [QCObjects native code] }"};var r=y(function(e){return pe(e)},"Export");if(r.prototype.toString=function(){return"Export(function or symbol) { [QCObjects native code] }"},!C){var t=y(function(e){let n=P("fs");var s=null;try{var c=[`${l.CONFIG.get("projectPath")}${l.CONFIG.get("relativeImportPath")}`,`${l.CONFIG.get("basePath")}${l.CONFIG.get("relativeImportPath")}`,`${l.CONFIG.get("projectPath")}`,`${l.CONFIG.get("basePath")}`,`${l.CONFIG.get("relativeImportPath")}`,`${process.cwd()}${l.CONFIG.get("relativeImportPath")}`,`${process.cwd()}/node_modules/`+e,`${process.cwd()}/node_modules`,`${process.cwd()}`,"node_modules","./",""].concat(f.paths);c=c.filter(p=>n.existsSync(p+"/"+e)),c.length>0&&(s=c[0],v.info(e+" is Installed."))}catch(p){console.log(p)}return s},"findPackageNodePath");r(t)}Q("_Crypt",Object,{last_string:"",last_key:"",construct:!1,_new_(e){var n=e.string,s=e.hasOwnProperty.call(e,"key")?e.key:null;this.__new__(e),s=s===null?this.__instanceID:s,this.last_key=s,this.last_string=n,this.construct=!0},_encrypt(){for(var e=this.string,n=this.key,s="",c,p,m=0;mn.list()[m]===p?null:p).filter(p=>p!==null).join("");return c},"shortCode"),i=h;Q("InheritClass",class{},{});let ft=O(class extends G("InheritClass"){constructor(){super(...arguments),U(this,"component",null),U(this,"__definition",{}),U(this,"__classType","Processor"),this.processors=ft.processors,this.process=ft.process.bind(this),this.processObject=ft.processObject.bind(this),this.setProcessor=ft.setProcessor.bind(this),this.execute=ft.execute.bind(this)}static setProcessor(e){typeof e=="function"&&e.name!==""&&(this.processors[e.name]=e)}static execute(e,n,s){var c=typeof e<"u"&&e!==null?e.processorHandler:this;return c.processors[n].bind(c).apply(c,[e,...s.split(",")])}static process(e,n=null){var s=n!==null?n.processorHandler:o(ft,{component:null});return typeof e=="string"&&Object.keys(s.processors).map(function(c){[...e.matchAll(new RegExp("\\$"+c+"\\((.*)\\).*","g"))].map(function(p){var m=`$${c}(${p[1]})`;e=e.replace(m,s.execute.bind(s).call(s,n,c,p[1]))})}),e}static processObject(e,n=null){var s=n===null?this:n.processorHandler;return typeof s>"u"&&(s=new ft({component:n})),typeof e=="object"?Object.keys(e).map(function(c){typeof e[c]=="object"&&!e[c].hasOwnProperty.call(e[c],"call")?e[c]=s.processObject.bind(s)(e[c],n):typeof e[c]=="string"&&(e[c]=s.process.bind(s)(e[c],n))}):typeof e=="string"&&(e=s.process.bind(s)(e,n)),e}},"we"),Re=ft;y(Re,"Processor"),U(Re,"processors",{config(e,n){return l.CONFIG.get(n,"")},ENV(e,n){return typeof process<"u"?process.env[n]:""},global(e,n){return typeof S<"u"?S[n]:""}}),Re.__definition={},Re.__classType="Processor",J(Re,"com.qcobjects"),pe(Re);let qt=O(class{static get instance(){if(this._instance===null){var e=new qt;e._CONFIG={relativeImportPath:"",remoteImportsPath:"",remoteSDKPath:"https://sdk.qcobjects.dev/v2.4/",asynchronousImportsLoad:!1,removePackageScriptAfterLoading:!0,componentsBasePath:"",delayForReady:0,preserveComponentBodyTag:!1,useConfigService:!1,routingWay:"hash",useSDK:!0,useLocalSDK:!1,basePath:Oe},e._CONFIG_ENC=null,this._instance=e}return this._instance}static set instance(e){this._instance=e}},"Ot"),Tt=qt;y(Tt,"ConfigSettings"),U(Tt,"_instance",null),U(Tt,"_CONFIG_ENC",null),Pe.ConfigSettings=Tt,Q("CONFIG",Object,{get _CONFIG_ENC(){return G("ConfigSettings").instance._CONFIG_ENC},get _CONFIG(){return G("ConfigSettings").instance._CONFIG},set(e,n){v.debug(`CONFIG.set ${e}: ${n}`),e==="basePath"&&(Oe=n);var s;try{s=function(c){c._CONFIG_ENC===null&&(c._CONFIG_ENC=G("_Crypt").encrypt(V({}),K));var p=c._CONFIG_ENC.valueOf(),m=c._CONFIG.valueOf();return Ue(m,u(p))}(G("ConfigSettings").instance)}catch(c){s={},console.error(c),v.debug("failed to encrypt config")}s[e]=n,G("ConfigSettings").instance._CONFIG_ENC=a(s),Object.hasOwnProperty.call(G("ConfigSettings").instance,"_CONFIG")&&Object.hasOwnProperty.call(G("ConfigSettings").instance._CONFIG,e)&&(G("ConfigSettings").instance._CONFIG[e]=n)},get(e,n){var s;try{var c=function(p){p._CONFIG_ENC===null&&(p._CONFIG_ENC=G("_Crypt").encrypt(V({}),K));var m=p._CONFIG_ENC.valueOf(),_=p._CONFIG.valueOf();return Ue(_,u(m))}(G("ConfigSettings").instance);typeof c[e]<"u"?s=c[e]:typeof n<"u"&&(s=n)}catch(p){console.error(p),v.debug("Something wrong when trying to get CONFIG values"),v.debug("No config value for: "+e),s=n}return Re.processObject.call(Re,s)}}),r(B),r(Ze),r(Ce),r(G),r(ce),r(h),r(Y),r(X);var g=y(function(e){return!!(typeof e=="object"&&Object.hasOwnProperty.call(e,"__classType")&&e.__instanceID&&Object.hasOwnProperty.call(e,"__definition")&&typeof e.__definition<"u")},"isQCObjects_Object"),I=y(function(e){return!!(typeof e=="function"&&!e.__instanceID&&e.__definition&&typeof e.__definition<"u"&&e.__definition.__classType)},"isQCObjects_Class"),N=y(function(e,n){return Ie.hasOwnProperty.call(Ie,e)&&typeof Ie[e]<"u"&&Ie[e].hasOwnProperty.call(Ie[e],"length")&&Ie[e].length>0&&typeof n<"u"&&n.hasOwnProperty.call(n,"length")&&n.length>0?(n.filter(function(s){return I(s)}).map(function(s){s.__definition.__namespace=e,s.__namespace=e}),Ie[e]=Ie[e].concat(n)):typeof n<"u"&&(typeof n=="object"&&n.hasOwnProperty.call(n,"length")?n.filter(function(s){return I(s)}).map(function(s){s.__definition.__namespace=e,s.__namespace=e}):I(n)&&(n.__definition.__namespace=e,n.__namespace=e),Ie[e]=n),Object.hasOwnProperty.call(Ie,e)&&Ie[e].map(function(s){me(s,e)}),Object.hasOwnProperty.call(Ie,e)?Ie[e]:void 0},"Package");N.prototype.toString=function(){return"Package(namespace, classes) { [QCObjects native code] }"},N("com.qcobjects",[Re]);var D=y(function(e){let n=N(e).filter(s=>I(s)).map(s=>({[s.__definition.__classType]:s})).reduce((s,c)=>Object.assign(s,c));return e.split(".").map(s=>({[s]:n})).reverse().reduce((s,c)=>(c[Object.keys(c)]=s,c))},"NamespaceRef"),H=y(function(){var e,n=y(function(){},"ready"),s=!1;if(!(arguments.length<1)){arguments.length===1?e=arguments[0]:arguments.length===2?(e=arguments[0],n=arguments[1]):arguments.length>2&&(e=arguments[0],n=arguments[1],s=arguments[2],v.debug("[Import] Setting external="+s.toString()+" resource to import: "+e)),s?v.debug("[Import] Registering external resource to import: "+e):v.debug("[Import] Registering local resource to import: "+e);var c;return C?(c=new Promise(function(p,m){var _=y(function(){var k=!1,q=0;for(var re in Ie)q++;return q0?C?setTimeout(n.bind(window),l.CONFIG.get("delayForReady")):typeof S<"u"&&setTimeout(n.bind(S),l.CONFIG.get("delayForReady")):n.call(l)},"_Ready");C?(window.onload=te,xe&&document.addEventListener("deviceready",te,ht)):S.onload=te;class Ft extends G("InheritClass"){constructor({instance:n,name:s,fget:c,fset:p,value:m}){super({instance:n,name:s,fget:c,fset:p,value:m}),this._new_({instance:n,name:s,fget:c,fset:p,value:m})}_new_({instance:n,name:b,fget:c,fset:p,value:m}){var _=this,b=typeof b>"u"?Je(_):b;Object.defineProperty(n,b,{set(E){let k=E;v.debug("value changed "+b);var q;typeof p<"u"&&typeof p=="function"?q=p(k):q=k,n["_"+b]=q},get(){let E=n["_"+b];v.debug("returning value "+b);var k=y(function(re){return typeof re=="object"&&Object.hasOwnProperty.call(re,"value")?re.value:re},"is_ddo"),q;return typeof c<"u"&&typeof c=="function"?q=c(k(E)):q=k(E),q}})}}O(Ft,"Ut"),y(Ft,"DDO"),r(Ft);class Et{constructor({component:n,template:s}){U(this,"template",""),U(this,"__definition",{}),this.component=n,this.template=s}assign(n){var s=this;if(typeof s.component>"u")throw new Error("DefaultTemplateHandler.assign: component is undefined");if(typeof s.component.processorHandler>"u")throw new Error("DefaultTemplateHandler.assign: component.processorHandler is undefined");var c=s.component.processorHandler;c.component=s.component;var p=typeof s.template<"u"?s.template:"";typeof n=="object"?[...Object.keys(n)].map(function(m){var _=n[m];if(typeof _=="string"||typeof _=="number"||!isNaN(_))try{_=Re.processObject.bind(c).call(c,_,s.component),p=p.replace(new RegExp(`{{${m}}}`,"g"),_)}catch(b){throw v.warn(`${s.component.name} could not parse processors.`),Error(`${s.component.name} could not parse processors. Reason: ${b.message}`)}}):v.debug(`${s.component.name}.data is not an object`);try{p=Re.processObject.call(c,p,s.component)}catch(m){throw v.warn(`${s.component.name} could not parse processors.`),Error(`${s.component.name} could not parse processors. Reason: ${m.message}`)}return p}}O(Et,"wt"),y(Et,"DefaultTemplateHandler"),Et.__definition={},J(Et,"com.qcobjects");var ee=y(function(e,n){let s=e.path.replace(/{(.*?)}/g,"(?<$1>.*)");return{...[...n.matchAll(new RegExp(s,"g"))][0].groups}},"__routing_params__"),be=y(function(e,n){return e.filter(function(s){var c=s.path.replace(/{(.*?)}/g,"(?<$1>.*)");return new RegExp(c,"g").test(n)}).reverse()},"__valid_routings__"),ge=y(function(e,n){return e.includes(n)},"__valid_routing_way__"),Se=y(function(e,n){var s=e.getAttribute("shadowed")===null,c=e.getAttribute("template-source")===null,p=e.getAttribute("shadowed")==="true",m=e.getAttribute("cached")===null,_=e.getAttribute("cached")==="true",b=typeof l.CONFIG.get("tplextension")<"u"?l.CONFIG.get("tplextension"):"html";b=e.getAttribute("tplextension")!==null?e.getAttribute("tplextension"):b;var E=e.getAttribute("name"),k=e.getAttribute("componentClass")!==null?e.getAttribute("componentClass"):"Component";let q=l.CONFIG.get("preserveComponentBodyTag")?E!==null?"com.qcobjects.components."+E+".ComponentBody":"com.qcobjects.components.ComponentBody":k;E=E!==null?E:G(q)&&typeof G(q).name<"u"?G(q).name:"";var re=G(q),Z=q!=="Component"&&typeof re<"u"&&typeof re.tplsource=="string"&&re.tplsource!=="",he=c&&Z?re.tplsource:c?"default":e.getAttribute("template-source");v.debug(`template source for ${E} is ${he} `),v.debug(`type for ${E} is ${Y(re)} `);var ie;ie=We({COMPONENTS_BASE_PATH:l.CONFIG.get("componentsBasePath"),COMPONENT_NAME:E,TPLEXTENSION:b,TPL_SOURCE:he}),l.CONFIG.get("preserveComponentBodyTag")&&N(E!==""?"com.qcobjects.components."+E:"com.qcobjects.components",[Q("ComponentBody",G("Component"),{name:E,tplsource:he,tplextension:b,reload:!0})]);var se=y(function(){var Te=s?re&&re.shadowed||G("Component").shadowed:p,ne={__parent__:n,name:E,cached:m?G("Component").cached:_,shadowed:Te,tplextension:b,body:l.CONFIG.get("preserveComponentBodyTag")?ce("componentBody"):e,templateURI:ie,tplsource:he};(typeof E>"u"||E===""||E===null)&&delete ne.name,ie===""&&delete ne.templateURI;var je=o(re,ne);return l.CONFIG.get("preserveComponentBodyTag")&&e.append(je),je},"__create_component_instance_"),Le=se.call(this);return Le},"_buildComponentFromElement_"),Ne=y(function(e,n){var s=[];return C?s=e.map(function(c){return Se(c,n)}):v.debug("[_buildComponentsFromElements_] not implemented for Non-Browser environments"),s},"_buildComponentsFromElements_");N("com.qcobjects",[y(class extends G("InheritClass"){constructor({templateURI:e="",template:n,tplsource:s="default",url:c="",name:p="",method:m="GET",data:_={},reload:b=!1,shadowed:E=!1,cached:k=!0,_body:q=ce("div"),__promise__:re=null,__shadowRoot:Z,body:he,shadowRoot:ie,splashScreenComponent:se,controller:Le,view:Te}){super(...arguments),U(this,"validRoutingWays",["pathname","hash","search"]),U(this,"basePath",Oe),U(this,"domain",R),U(this,"templateHandler","DefaultTemplateHandler"),U(this,"processorHandler",null),U(this,"routingWay",null),U(this,"routingNodes",[]),U(this,"routings",[]),U(this,"routingPath",""),U(this,"routingPaths",[]),U(this,"_componentHelpers",[]),U(this,"subcomponents",[]),U(this,"splashScreenComponent"),U(this,"controller"),U(this,"view"),U(this,"effect"),U(this,"method","GET"),U(this,"cached",!0),U(this,"__promise__",null),U(this,"__namespace");var ne=this;typeof ne.name>"u"&&v.warn("A name is not defined for "+Y(ne)),ne.routingWay=l.CONFIG.get("routingWay"),ne.processorHandler=o(Re,{component:ne}),ne.data=typeof ne.data>"u"||ne.data===null?{}:ne.data,ne.data=Object.assign(ne.data,ne.dataAttributes),ne.createServiceInstance().then(function(je){typeof ne.__new__=="function"&&ne.__new__.call(ne,ne),ne._generateRoutingPaths(ne.body).then(function(){ne._reroute_().then(function(){return ne.rebuild().then(function(){v.info(`Component._new_ The component ${ne.name} was built successfully!`)}).catch(function(rt){v.warn(`Component._new_ Something went wrong building the component ${ne.name}`),console.error(rt)})})})})}set body(e){var n=this;n._body=e}get body(){var e=this;return e._body}set cacheIndex(e){v.debug("[cacheIndex] This property is readonly")}get cacheIndex(){var e=this,n=V(e.routingPath);return fe.encode(e.name+n)}set parsedAssignmentText(e){v.debug("[parsedAssignmentText] This property is readonly")}get parsedAssignmentText(){var e=this;if(e._parsedAssignmentText=e.parseTemplate(e.template),typeof e._parsedAssignmentText>"u")throw Error(`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);return e._parsedAssignmentText}set shadowRoot(e){var n=this;typeof n.__shadowRoot>"u"?n.__shadowRoot=e:v.debug("[shadowRoot] This property can only be assigned once!")}get shadowRoot(){var e=this;return e.__shadowRoot}set routingSelected(e){v.debug("[routingSelected] This is a read-only property of the component")}get routingSelected(){var e=this;return be(e.routings,e.routingPath)}set routingParams(e){v.debug("[routingParams] This is a read-only property of the component")}get routingParams(){var e=this;return[{}].concat(e.routingSelected.map(function(n){return ee(n,e.routingPath)})).reduce(function(n,s,c){return Object.assign(n,s)})}createServiceInstance(){var e=this,n=e.body,s=this.data,c,p=e.getClass().__definition,m=C&&n.getAttribute("serviceClass")!==null?n.getAttribute("serviceClass"):null;return new Promise(function(_,b){var E=!!(Object.hasOwnProperty.call(n,"enableServiceClass")&&n.enableServiceClass||!Object.hasOwnProperty.call(n,"enableServiceClass")),k=!!(C&&n.getAttribute("response-to")!==null&&n.getAttribute("response-to")==="data"),q=!!(C&&n.getAttribute("response-to")!==null&&n.getAttribute("response-to")==="template");if(E&&m!==null&&(c=G(m)),!k&&p&&Object.hasOwnProperty.call(p,"responseTo")?k=p.responseTo==="data":!k&&Object.hasOwnProperty.call(G("Component"),"responseTo")&&(k=G("Component").responseTo==="data"),!q&&p&&Object.hasOwnProperty.call(p,"responseTo")?q=p.responseTo==="template":!q&&Object.hasOwnProperty.call(G("Component"),"responseTo")&&(q=G("Component").responseTo==="template"),typeof c<"u"&&typeof E<"u"&&E===!0&&(k||q)){v.info("Loading service "+m);var re=o(c,{data:s});ye(re).then(function({request:Z,service:he}){var ie;typeof he.JSONresponse<"u"&&he.JSONresponse!==null?ie=he.JSONresponse:ie=he.template,k&&(typeof s=="object"&&typeof ie=="object"?s=Object.assign(s,ie):s=ie,e.data=s),e.serviceInstance=re,e.serviceData=s,q&&(e.template=ie),_(ie)},function(Z){v.debug(`Service loading rejected for ${m} in ${e.name}`),b(Z)}).catch(function(Z){throw v.debug("Something went wroing while trying to load the service "+m),Error(`Error loading ${m} for ${e.name}. Detail: ${Z}`)})}else _(null)})}_bindroute_(){var e=this;e._bindroute_.loaded?v.debug(`Routes already bound to popstate events for ${e.name}`):(C&&e.hostElements("a").map(function(n){return n.oldclick=n.onclick,n.onclick=function(s){var c=!0;l.global.get("routingPaths")||l.global.set("routingPaths",[]);var p=l.CONFIG.get("routingWay"),m=s.target[p];return l.global.get("routingPaths").includes(m)&&s.target[p]!==document.location[p]&&s.target.href!==document.location.href?(v.debug("A ROUTING WAS FOUND: "+m),window.history.pushState({href:s.target.href},s.target.href,s.target.href),G("Component").route(),c=!1):v.debug("NO ROUTING FOUND FOR: "+m),typeof s.target.oldclick<"u"&&typeof s.target.oldclick=="function"&&s.target.oldclick.call(s.target,s),c},null}),this._bindroute_.loaded=!0)}done(e){var n;if(typeof e<"u"){var{request:s,component:c}=e;n=Promise.resolve({request:s,component:c})}return n}createControllerInstance(){var e;if(C){if(typeof this.body>"u")throw new Error("The component has no body");var n=this.body.getAttribute("controllerClass");n||(n="Controller"),e=G(n),typeof e<"u"&&(this.controller=o(e,{component:this}))}return new Promise((s,c)=>{if(C&&typeof e<"u"&&typeof this.controller<"u"){if(typeof this.controller.done=="function")try{this.controller.done.call(this.controller)}catch(p){throw Error(p)}else v.debug(`${n} does not have a done() method.`),c(`${n} does not have a done() method.`);typeof this.controller.createRoutingController=="function"?this.controller.createRoutingController.call(this.controller):v.debug(`${n} does not have a createRoutingController() method.`)}s({component:this,controller:this.controller})})}createEffectInstance(){var e=this;return new Promise(function(n,s){if(C){var c=e.body.getAttribute("effectClass"),p=e.body.getAttribute("apply-effect-to");p=p!==null?p:"load",c!==null&&p==="observe"?e.applyObserveTransitionEffect(c):c!==null&&p==="load"&&e.applyTransitionEffect(c)}n({component:e,effect:e.effect})})}createViewInstance(){var e=this;return new Promise(function(n,s){var c=C?e.body.getAttribute("viewClass"):null;if(c!==null){var p=G(c);typeof p<"u"&&(e.view=o(p,{component:e}),Object.hasOwnProperty.call(e.view,"done")&&typeof e.view.done=="function"&&e.view.done.call(e.view))}n({component:e,view:e.view})})}__done__(){var e=this,n=y(function(){if(typeof e>"u")throw new Error("componentDone() has lost its context");if(typeof e.body>"u")throw new Error("The component has no body");e.createViewInstance(),e.createControllerInstance(),e.createEffectInstance(),v.debug(`Trying to run component helpers for ${e.name}...`);try{e.runComponentHelpers(),v.debug(`Component helpers for ${e.name} executed.`)}catch(s){throw v.debug(`Component helpers for ${e.name} could not be executed.`),Error(s)}e.subcomponents=e.__buildSubComponents__(),e._bindroute_(),e.body.setAttribute("loaded",!0)},"componentDone");return new Promise(function(s,c){try{Promise.resolve(n.call(e))}catch(p){c(p)}})}hostElements(e){var n=this,s=n.shadowed&&typeof n.shadowRoot<"u"?n.shadowRoot.subelements(e):n.body.subelements(e);return s}get subtags(){var e=this,n=de;return e.hostElements(n)}get bodyAttributes(){var e=this,n=e.body;return C?[...n.getAttributeNames()].map(s=>({[s]:n.getAttribute(s)})).reduce((s,c,p)=>Object.assign(s,c)):{}}get dataAttributes(){var e=this,n=e.body;return C?[{}].concat([...n.getAttributeNames()].filter(s=>s.startsWith("data-")).map(s=>({[s.split("-")[1]]:n.getAttribute(s)}))).reduce((s,c,p)=>Object.assign(s,c)):{}}__buildSubComponents__(e=!1){var n=this,s=n.subtags;return e||(s=s.filter(c=>c.getAttribute("loaded")!=="true")),(typeof n<"u"||n.subcomponents.length<1)&&(n.subcomponents=Ne(s,n)),n.subcomponents}fail(e){var n;if(typeof e<"u"){var{error:s,component:c}=e;n=Promise.resolve({error:s,component:c})}return n}set(e,n){this[e]=n}get(e){return this[e]}feedComponent(){var e=this;v.debug(`[Component][${this.name}][feedComponent] start feeding component...`);var n=y(function(p){if(typeof p.container>"u"&&typeof p.body>"u"){v.warn("COMPONENT {{NAME}} has an undefined container and body".replace("{{NAME}}",p.name));return}var m=typeof p.container>"u"||p.container===null?p.body:p.container,_=p.parsedAssignmentText;if(p.innerHTML=_,p.shadowed){v.debug("COMPONENT {{NAME}} is shadowed".replace("{{NAME}}",p.name)),v.debug("Preparing slots for Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",p.name));var b=ce("div");m.subelements("[slot]").map(function(q){q.parentElement===m&&b.appendChild(q)}),v.debug("Creating shadowedContainer for COMPONENT {{NAME}}".replace("{{NAME}}",p.name));var E=ce("div");E.classList.add("shadowHost");try{p.shadowRoot=E.attachShadow({mode:"open"})}catch{try{v.debug("Shadowed COMPONENT {{NAME}} is repeated".replace("{{NAME}}",p.name)),p.shadowRoot=E.shadowRoot}catch{v.warn("Shadowed COMPONENT {{NAME}} is not allowed on this browser".replace("{{NAME}}",p.name))}}if(typeof p.shadowRoot<"u"&&p.shadowRoot!==null){p.reload?(v.debug("FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",p.name)),E.shadowRoot.innerHTML=p.innerHTML):(b.innerHTML=p.parseTemplate(b.innerHTML),v.debug("ADDING Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",p.name)),E.shadowRoot.innerHTML+=p.innerHTML),v.debug("ADDING Slots to Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",p.name)),E.innerHTML+=b.innerHTML,v.debug("APPENDING Shadowed COMPONENT {{NAME}} to Container ".replace("{{NAME}}",p.name));var k=m.querySelector(".shadowHost");typeof k<"u"&&k!==null?(v.debug("Shadowed Container for COMPONENT {{NAME}} is already present in the tree ".replace("{{NAME}}",p.name)),p.shadowRoot.innerHTML=E.shadowRoot.innerHTML):m.appendChild(E)}else v.warn("Shadowed COMPONENT {{NAME}} is bad configured".replace("{{NAME}}",p.name))}else p.reload?(v.debug("FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}".replace("{{NAME}}",p.name)),m.innerHTML=p.innerHTML):m&&p?(v.debug("ADDING COMPONENT {{NAME}} ".replace("{{NAME}}",p.name)),m.innerHTML+=p.innerHTML):v.warn("COMPONENT {{NAME}} is not added to the DOM".replace("{{NAME}}",p.name))},"_feedComponent_InBrowser"),s=y(function(p){var m=p.parsedAssignmentText;p.innerHTML=m},"_feedComponent_InNode"),c;if(!X(e,"Component")){v.warn("Trying to feed a non component object");return}return C?c=n(e):c=s(e),c}rebuild(){var e=this,n=new Promise(function(s,c){if((typeof e>"u"||e===null)&&c("Component is undefined"),g(e)&&X(e,"Component"))switch(!0){case e.get("tplsource")==="none":v.debug("Component "+e.name+" has specified template-source=none, so no template load was done");var p={request:null,component:e};e.__done__().then(function(){typeof e.done=="function"&&e.done.call(e,p),s.call(n,p)},function(){c.call(n,p)});break;case e.get("tplsource")==="inline":v.debug("Component "+e.name+" has specified template-source=inline, so it is assumed that template is already declared"),async function(m){m.feedComponent.bind(m)()}(e);var p={request:null,component:e};e.__done__().then(function(){typeof e.done=="function"&&e.done.call(e,p),s.call(n,p)},function(){c.call(n,p)});break;case(e.get("tplsource")==="default"&&e.get("templateURI")!==""):e.set("url",e.get("basePath")+e.get("templateURI")),st(e,!1).then(function(m){s.call(n,m)},function(m){c.call(n,m)});break;case(e.get("tplsource")==="external"&&e.get("templateURI")!==""):e.set("url",e.get("templateURI")),st(e,!1).then(function(m){s.call(n,m)},function(m){c.call(n,m)});break;case(e.get("tplsource")==="default"&&e.get("templateURI","")===""):v.debug(`Component ${e.name} template-source is ${e.get("tplsource")} and no templateURI is present`),c.call(n,`Component ${e.name} template-source is ${e.get("tplsource")} and no templateURI is present`);break;default:v.debug("Component "+e.name+" will not be rebuilt because no templateURI is present"),c.call(n,{request:null,component:e});break}});return n}Cast(e){let n=oe(e).map(s=>s.name.replace(/bound /g,"")).map(s=>({[s]:e[s].bind(this)})).reduce((s,c)=>Object.assign(s,c),{});return Ye(this,n)}static route(){var e=this,n,s=!!(g(e)&&X(e,"Component")),c=y(function(p){var m=[],_=p.filter(function(b){return typeof b<"u"}).map(function(b){if(typeof b.name<"u")m.push(b.name);else throw new Error(Y(b)+" does not have a name");return new Promise(function(E,k){var q;return typeof b<"u"&&b._reroute_?q=b._reroute_().then(function(){return b.reload=!0,b.rebuild()}).then(function(re){if(Object.hasOwnProperty.call(b,"subcomponents")&&typeof b.subcomponents<"u"&&b.subcomponents.length>0)return v.debug("LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: "+b.name),c.call(b,b.subcomponents);v.debug("No subcomponents to look for routings in: "+b.name),b.subtags.length>0&&(b.subcomponents=b.__buildSubComponents__(!0)),E(b)}):typeof b<"u"&&k("Component "+b.name+" is not an instance of Component"),q})});return Promise.all(_).then(function(){v.debug("ROUTING COMPLETED FOR "+m.join(", "))}).catch(function(b){v.warn("ROUTING FAILED FOR "+m.join(", ")+": "+b)})},"__route__");if(s||l.componentsStack)s&&v.debug("loading routings for instance "+e.name),n=c.call(e,s?e.subcomponents:l.componentsStack);else throw v.debug("An undetermined result expected if load routings. So will not be loaded this time."),Error("There is no valid instance and no components stack available to apply rountings");return n}fullscreen(){if(C){var e=this.body;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()}}closefullscreen(){C&&(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen())}_generateRoutingPaths(e){var n=this;return new Promise(function(s,c){C&&ge(n.validRoutingWays,n.routingWay)&&typeof e<"u"&&(n.innerHTML=e.innerHTML,n.routingNodes=e.subelements("routing"),n.routings=[],n.routingNodes.map(function(p,m){var _=p.getAttributeNames(),b={};_.map(function(E,k){b[_[k]]=p.getAttribute(_[k])}),n.routings.push(b),n.routingPaths||(n.routingPaths=[]),n.routingPaths.includes(b.path)||n.routingPaths.push(b.path),l.global.get("routingPaths")||l.global.set("routingPaths",[]),l.global.get("routingPaths").includes(b.path)||l.global.get("routingPaths").push(b.path)})),s()})}parseTemplate(e){var n=this,s,c=e;if(Object.hasOwnProperty.call(n,"templateHandler")){var p=n.templateHandler;v.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${p} ...`);var m=G(p),_=o(m,{component:n,template:c});_.component=n;var b=n.data;if(Object.hasOwnProperty.call(n,"assignRoutingParams")&&n.assignRoutingParams)try{b=Object.assign(b,n.routingParams)}catch{v.debug("[parseTemplate] it was not possible to assign the routing params to the template")}s=_.assign(b)}else v.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`),s=c;return s}_reroute_(){var e=this;return new Promise(function(n,s){C&&ge(e.validRoutingWays,e.routingWay)&&(e.routingPath=document.location[e.routingWay],e.routingSelected.map(function(c,p){var m=We({COMPONENTS_BASE_PATH:l.CONFIG.get("componentsBasePath"),COMPONENT_NAME:c.name.toString(),TPLEXTENSION:Object.hasOwnProperty.call(c,"tplextension")?c.tplextension:e.tplextension,TPL_SOURCE:"default"});e.templateURI=m}),e.routingSelected.length>0&&(e.template="",e.body.innerHTML="")),n(e)})}lazyLoadImages(){if(C){var e=this,n=e.shadowed?e.shadowRoot:e.body,s=[...n.subelements("img[lazy-src]")],c=y(function(m){m.setAttribute("src",m.getAttribute("lazy-src")),m.onload=()=>{m.removeAttribute("lazy-src")}},"_lazyLoadImages");if("IntersectionObserver"in window){var p=new IntersectionObserver((m,_)=>{m.forEach(b=>{b.isIntersecting&&(c(b.target),_.unobserve(b.target))})});s.map(function(m){return p.observe(m)})}else s.map(c)}return null}applyTransitionEffect(e){var n=G(e);if(typeof n>"u")throw Error(`${e} not found.`);typeof n<"u"&&X(n,"TransitionEffect")?(this.effect=o(n,{component:this}),this.effect.apply(this.effect.defaultParams)):v.debug(`${e} is ${Y(n)} but is not a TransitionEffect`)}applyObserveTransitionEffect(e){if(C){var n=this,s=n.shadowed?n.shadowRoot.host:n.body,c=y(function(m){n.applyTransitionEffect(e)},"_applyEffect_");if("IntersectionObserver"in window){var p=new IntersectionObserver((m,_)=>{m.forEach(b=>{b.isIntersecting&&(c(b.target),_.unobserve(b.target))})});p.observe(s)}else c(s)}return null}scrollIntoHash(){if(C){var e=this;if(document.location.hash!==""){var n=e.shadowed?e.shadowRoot:e.body;n.subelements(document.location.hash).map(function(s){typeof s.scrollIntoView=="function"&&s.scrollIntoView(l.CONFIG.get("scrollIntoHash",{behavior:"auto",block:"top",inline:"top"}))})}}}i18n_translate(){if(C&&l.CONFIG.get("use_i18n")){var e=this,n=e.shadowed?e.shadowRoot:e.body,s=l.CONFIG.get("lang","en"),c=navigator.language.slice(0,2),p=l.global.get("i18n");if(s!==c&&typeof p=="object"&&Object.hasOwnProperty.call(p,"messages")){var m=y(function(){var _=this;return new Promise(function(b,E){var k=p.messages.filter(function(q){return Object.hasOwnProperty.call(q,s)&&Object.hasOwnProperty.call(q,c)});n.subelements("ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component").map(function(q){return k.map(function(re){var Z=q.innerHTML;return Z=Z.replace(new RegExp(`${re[s]}`,"g"),re[c]),q.innerHTML=Z,null}),q}),b()})},"callback_i18n");m.call(e).then(function(){v.debug("i18n loaded for component: "+e.name)})}}}addComponentHelper(e){var n=this;n._componentHelpers.push(e)}runComponentHelpers(){if(C){var e=this,n=[];n.push(e.i18n_translate.bind(e)),n.push(e.scrollIntoHash.bind(e)),n.push(e.lazyLoadImages.bind(e)),n=n.concat(e._componentHelpers),n.map(function(s){v.debug(`Executing ${s.name} as component helper for ${e.name}...`),s()})}}},"Component")]),oe(G("Component")).map(function(e){F(e)}),C&&window.addEventListener("popstate",function(e){e.stopImmediatePropagation(),e.stopPropagation(),G("Component").route()}),N("com.qcobjects.controllers",[y(class extends G("InheritClass"){constructor({component:e,dependencies:n}){if(super({component:e,dependencies:n}),U(this,"component",null),U(this,"dependencies",[]),this.component=e,this.dependencies=n,typeof this.component>"u"||this.component==="null")throw Error(`${Y(this)} must be called with a component`)}routingSelectedAttr(e){return this.component.routingSelected.map(function(n){return n[e]}).filter(function(n){return n}).pop()}isTouchable(){return"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0}onpress(e,n){try{this.isTouchable()?this.component.body.subelements(e)[0].addEventListener("touchstart",n,{passive:!0}):this.component.body.subelements(e)[0].addEventListener("click",n,{passive:!0})}catch{v.debug("No button to assign press event")}}createRoutingController(){var e=this,n=e.component,s=e.routingSelectedAttr("controllerclass");if(typeof s<"u"){var c=G(s);typeof c<"u"&&(n.routingController=o(c,{component:n}),Object.hasOwnProperty.call(n.routingController,"done")&&typeof n.routingController.done=="function"&&n.routingController.done.call(n.routingController))}}done(){}},"Controller")]),N("com.qcobjects.views",[y(class extends G("InheritClass"){constructor({component:e=void 0,dependencies:n=[]}){if(super(...arguments),typeof this.component>"u"||this.component==="null")throw Error(`${Y(this)} must be called with a component`)}},"View")]),N("com.qcobjects.api",[y(class extends G("InheritClass"){constructor(){super(...arguments),U(this,"kind","rest"),U(this,"domain",R),U(this,"basePath",Oe),U(this,"url",""),U(this,"method","GET"),U(this,"data",{}),U(this,"reload",!1),U(this,"cached",!1)}set(e,n){this[e]=n}get(e){return this[e]}},"Service")]),N("com.qcobjects.api.services",[y(class extends G("Service"){constructor(){super(...arguments),U(this,"method","GET"),U(this,"cached",!1),U(this,"headers",{"Content-Type":"application/json",charset:"utf-8"}),U(this,"JSONresponse",null)}done(e){v.debug("***** RECEIVED RESPONSE:"),v.debug(e.service.template),this.JSONresponse=JSON.parse(e.service.template)}},"JSONService")]),N("com.qcobjects.api.config",[y(class extends G("JSONService"){constructor(){super(...arguments),U(this,"method","GET"),U(this,"cached",!1),U(this,"configFileName","config.json"),U(this,"headers",{"Content-Type":"application/json",charset:"utf-8"}),U(this,"JSONresponse",null),this.set("url",this.get("basePath")+this.get("configFileName"))}done(e){v.debug("***** CONFIG LOADED:"),v.debug(e.service.template),this.JSONresponse=JSON.parse(e.service.template),Object.hasOwnProperty.call(this.JSONresponse,"__encoded__")&&(this.JSONresponse=JSON.parse(G("_Crypt").decrypt(this.JSONresponse.__encoded__,K)));for(var n in this.JSONresponse)l.CONFIG.set(n,this.JSONresponse[n]);this.configLoaded.call(this)}fail(e){this.configLoaded.call(this)}},"ConfigService")]),N("com.qcobjects.valueObjects",[y(class extends G("InheritClass"){constructor(){super(...arguments)}},"VO")]);var We=y(function(e){var n="";if(e.TPL_SOURCE==="default"){n="{{COMPONENTS_BASE_PATH}}{{COMPONENT_NAME}}.{{TPLEXTENSION}}";for(var s in e){var c=e[s];n=n.replace("{{"+s+"}}",e[s])}}return n},"ComponentURI"),st=y(function(e,n){var s,c=y(function(_,b){return s=new Promise(function(E,k){var q=_.__promise__,re=Object.hasOwnProperty.call(_,"container")&&typeof _.container<"u"&&_.container!==null?_.container:_.body;if(re!==null){var Z=y(function(je){je.feedComponent();var rt={request:se,component:je};E.call(q,rt)},"_feedComponent_");v.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",V(_.data)).replace("{{URL}}",_.url));var he=y(function(){var je=ie?0:200;if(se.status===je){var rt=se.responseText;v.debug("Data received {{DATA}}".replace("{{DATA}}",V(rt))),v.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",_.name)),_.template=rt,_.cached&&typeof ne<"u"&&ne.save(_.name,_.template),Z.call(this,_)}else{var Gt={request:se,component:_};k.call(q,Gt)}},"_componentLoaded");if(typeof _.template=="string"&&_.template!=="")Z.call(this,_);else{var ie=!!_.url.startsWith("file:"),se=new XMLHttpRequest;if(ie){if("fetch"in l){v.debug("I can use fetch..."),v.debug("It is a file to be loaded, so I will try to use fetch");var Le=fetch(_.url).then(je=>{v.debug("I got a response from fetch, so I'll feed the component"),je.text().then(rt=>{_.template=rt,Z.call(this,_)})})}}else try{v.debug("Calling the url of component in async mode."),se.open(_.method,_.url,!0)}catch{v.debug("Last try has failed... The component cannot be loaded.")}!xe&&!ie&&se.setRequestHeader("Content-Type","text/html"),ie||(se.onload=he);var Te=y(function(je){je=!(typeof je>"u"||!je),v.debug("SENDING THE NORMAL REQUEST "),je?"fetch"in l||(v.debug("I have to try to load the file using xhr... "),se.send(null),se.status===XMLHttpRequest.DONE&&he.call(this)):(v.debug("Trying to send the data to the component... "),se.send(V(_.data)))},"_directLoad");if(_.cached&&!ie){v.debug("USING CACHE FOR COMPONENT: "+_.name);var ne=new Ce({index:_.cacheIndex,load(je){Te.call(this,ie)},alternate(je){_.method==="GET"?(_.template=je.cache.getCached(_.cacheIndex),Z.call(this,_)):Te.call(this,ie)}});S.lastCache=ne}else v.debug("NOT USING CACHE FOR COMPONENT: "+_.name),Te.call(this,ie)}}else v.debug("CONTAINER DOESNT EXIST")}),s.then(function(E){return _.__done__().then(function(){var k;return typeof _.done=="function"&&(k=_.done.call(_,E)),Promise.resolve(k)})},function(E){var k;return typeof _.fail=="function"&&(k=_.fail.call(_,E)),Promise.reject(k)}).catch(function(E){v.debug("Something wrong loading the component")}),s},"_componentLoaderInBrowser"),p=y(function(_,b){return s=new Promise(function(E,k){var q=s,re=y(function(se){se.feedComponent();var Le={request:null,component:se};E.call(q,Le)},"_feedComponent_");v.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",V(_.data)).replace("{{URL}}",_.url));var Z=y(function(se,Le){if(se){var Te={request:null,component:_};k.call(q,Te)}else{var ne=Le.toString();v.debug("Data received {{DATA}}".replace("{{DATA}}",V(ne))),v.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",_.name)),_.template=ne,_.cached&&typeof ie<"u"&&ie.save(_.name,_.template),re.call(this,_)}},"_componentLoaded");if(typeof _.template=="string"&&_.template!=="")re.call(this,_);else{v.debug("Loading the component as a local file in server...");var he=y(function(se){let Le=P("fs");v.debug("SENDING THE NORMAL REQUEST "),Le.readFile(_.url,Z)},"_directLoad");if(_.cached){v.debug("USING CACHE FOR COMPONENT: "+_.name);var ie=new Ce({index:_.cacheIndex,load(se){he.call(this)},alternate(se){_.method==="GET"?(_.template=se.cache.getCached(_.cacheIndex),re.call(this,_)):he.call(this)}});S.lastCache=ie}else v.debug("NOT USING CACHE FOR COMPONENT: "+_.name),he.call(this)}}),s.then(function(E){return _.__done__().then(function(){var k;return typeof _.done=="function"&&(k=_.done.call(_,E)),Promise.resolve(k)})},function(E){var k;return typeof _.fail=="function"&&(k=_.fail.call(_,E)),Promise.reject(k)}).catch(function(E){v.debug("Something wrong loading the component")}),s},"_componentLoaderInNode"),m;return C?typeof n<"u"&&n?m=we(c,arguments):m=c(e,n):m=p(e,n),m},"componentLoader"),ye=y(function(e,n){var s=y(function(b,E){var k=new Promise(function(q,re){v.debug("LOADING SERVICE DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",V(b.data)).replace("{{URL}}",b.url));var Z=new XMLHttpRequest;Z.withCredentials=b.withCredentials;var he=!0;Z.open(b.method,b.url,he);for(var ie in b.headers)try{typeof b.headers[ie]!="function"&&Z.setRequestHeader(ie,b.headers[ie])}catch{v.debug("Something went wrong when assign the header "+ie)}Z.onload=function(){if(Z.status===200){var Te=Z.responseText;if(v.debug("Data received {{DATA}}".replace("{{DATA}}",V(Te))),v.debug("CREATING SERVICE {{NAME}}".replace("{{NAME}}",b.name)),b.template=Te,b.cached&&typeof Le<"u"&&Le.save(b.name,b.template),typeof b.done=="function"){var ne={request:Z,service:b};b.done.call(b,ne),q.call(k,ne)}}else if(typeof b.fail=="function"){var ne={request:Z,service:b};b.fail.call(b,ne),re.call(k,ne)}};var se=y(function(){v.debug("SENDING THE NORMAL REQUEST ");try{Z.send(V(b.data))}catch{v.debug("SOMETHING WRONG WITH REQUEST "),re.call(k,{request:Z,service:b})}},"_directLoad");if(b.cached){var Le=new Ce({index:b.data,load(Te){se.call(this)},alternate(Te){if(b.method==="GET"){if(b.template=Te.cache.getCached(b.name),typeof b.done=="function"){var ne={request:Z,service:b};b.done.call(b,ne),q.call(k,ne)}}else se.call(this)}});S.lastCache=Le}else se.call(this);return Z});return k},"_serviceLoaderInBrowser"),c=y(function(b,E){var k=new Promise(function(q,re){if(typeof URL>"u"){S.URL=P("url").URL;let De=S.URL}var Z=new URL(b.url),he;b.useHTTP2=Object.hasOwnProperty.call(b,"useHTTP2")&&b.useHTTP2;var ie=y(function(De){v.debug("LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}".replace("{{DATA}}",V(b.data)).replace("{{URL}}",b.url));var Ot,Dt={http2Client:Te,request:De,service:b,responseHeaders:null};if(typeof b.data=="object"&&b.data!==null&&b.useHTTP2)try{v.debug("Sending data...");let Ct=new Buffer(V(b.data));De.write(Ct)}catch{v.debug("It was not possible to send any data")}Ot="",De.on("response",(Ct,Kt)=>{v.debug("receiving response..."),Dt.responseHeaders=Ct,Ot=""}),De.on("data",Ct=>{v.debug("receiving data..."),Ot+=""+Ct.toString(),b.template=Ot}),b.useHTTP2&&De.resume(),De.on("end",()=>{v.debug("ending call..."),b.template=Ot,Object.hasOwnProperty.call(b,"useHTTP2")&&b.useHTTP2?Te.destroy():De.destroy(),b.done.call(b,Dt),q.call(k,Dt)}),b.useHTTP2&&De.end()},"captureEvents");try{var se;if(b.useHTTP2){v.debug("using http2");var Le=P("http2"),Te=Le.connect(Z.origin);se=Object.assign({":method":b.method,":path":Z.pathname},b.options),se=Object.assign(se,b.headers),he=Te.request(se),he.setEncoding("utf8"),ie(he)}else if(Z.protocol==="http:"){var ne=P("http"),je=ne.request;se=Object.assign({url:b.url,headers:b.headers},b.options);var he=je(b.url);ie(he)}else if(Z.protocol==="https:"){var rt=P("https");se=Object.assign({hostname:Z.hostname,port:Z.port,path:Z.pathname,method:b.method,headers:b.headers},b.options);var Gt=rt.request(se,function(De){ie(De)});Gt.end()}else{var Ut="Protocol not supported: "+Z.protocol;throw v.debug(Ut),new Error(Ut)}}catch(De){v.debug(De),b.fail.call(b,De),re.call(k,De)}}).catch(function(q){console.log(q),v.debug("Something happened when trying to call the service: "+b.name),b.fail.call(b,q)});return k},"_serviceLoaderInNode"),p=y(function(b,E){var k=new Promise(function(q,re){v.debug(`Calling mockup service ${b.name} ...`);var Z={request:null,service:b,responseHeaders:b.responseHeaders};typeof b.mockup=="function"?b.mockup.call(b,Z):b.done.call(b,Z),q.call(k,Z)});return k},"_serviceLoaderMockup"),m=y(function(b,E){var k=new Promise(function(q,re){v.debug(`Calling local service ${b.name} ...`);var Z={request:null,service:b,responseHeaders:b.responseHeaders};typeof b.local=="function"?b.local.call(b,Z):b.done.call(b,Z),q.call(k,Z)});return k},"_serviceLoaderLocal"),_;switch(e.kind){case"rest":C?typeof n<"u"&&n?_=we(s,arguments):_=s(e,n):_=c(e,n);break;case"mockup":_=p(e,n);break;case"local":_=m(e,n);break;default:v.debug(`The value of the kind property of the service ${e.name} is not valid`);break}return _},"serviceLoader");if(r(ye),r(st),r(We),r(Je),r(V),r(I),r(g),r(D),C){Element.prototype.buildComponents=function(e=!1){var n=de,s=this,c=s.subelements(n);return Ne(c,null)},HTMLDocument.prototype.buildComponents=Element.prototype.buildComponents,HTMLElement.prototype.buildComponents=Element.prototype.buildComponents;var ke=y(class extends HTMLElement{constructor(){super(...arguments);let e=this,n=e.nodeName.toLowerCase(),s=ce("quick-component"),c=e.getAttributeNames();s.setAttribute("name",n),e.hasAttribute("shadowed")||s.setAttribute("shadowed","true"),c.map(function(m){e.hasAttribute(m)&&(s.setAttribute(m,e.getAttribute(m)),e.removeAttribute(m))});var p=e.getAttributeNames().filter(function(m){return m.startsWith("data-")}).map(function(m){return m.split("-")[1]});p.map(function(m){s.setAttribute("data-"+m,e.getAttribute("data-"+m)),e.removeAttribute("data-"+m)}),[...e.children].map(function(m){s.appendChild(m.cloneNode(!0)),m.remove()}),e.append(s)}},"_ComponentWidget_");r(ke);var et=y(function(e){customElements.define(e,class extends ke{})},"RegisterWidget"),vt=y(function(){var e=[...arguments];e.filter(function(n){return typeof n=="string"}).map(function(n){et(n)})},"RegisterWidgets");F(et),F(vt),r(et),r(vt)}C||N("com.qcobjects.api",[y(class extends G("InheritClass"){constructor({domain:e=R,basePath:n=Oe,body:s=null,stream:c=null,request:p=null}){super(...arguments),v.debug("Initializing BackendMicroservice...");let m=this;typeof this.body>"u"&&(this.body=null),typeof s<"u"&&(this.body=s),this.cors(),m.stream=c,c.on("data",E=>{var k=p.method.toLowerCase(),q={post:m.post};Object.hasOwnProperty.call(q,k)&&q[k].call(m,E)});var _=p.method.toLowerCase(),b={get:m.get,head:m.head,put:m.put,delete:m.delete,connect:m.connect,options:m.options,trace:m.trace,patch:m.patch};Object.hasOwnProperty.call(b,_)&&b[_].call(m)}cors(){if(this.route.cors){v.debug("Validating CORS...");let{allow_origins:n,allow_credentials:s,allow_methods:c,allow_headers:p}=this.route.cors;var e=this;if(typeof e.headers!="object"&&(e.headers={}),typeof e.route.responseHeaders!="object"&&(e.route.responseHeaders={}),typeof n<"u")if(v.debug("CORS: allow_origins available. Validating origins..."),n==="*"||typeof e.request.headers.origin>"u"||[...n].indexOf(e.request.headers.origin)!==-1)v.debug("CORS: Adding header Access-Control-Allow-Origin=*"),e.route.responseHeaders["Access-Control-Allow-Origin"]="*";else{v.debug("CORS: Origin is not allowed: "+e.request.headers.origin),v.debug("CORS: Forcing to finish the response..."),this.body={};try{this.done()}catch(m){v.debug(`It was not possible to finish the call to the microservice: ${m}`)}}else v.debug("CORS: no allow_origins available. Allowing all origins..."),v.debug("CORS: Adding header Access-Control-Allow-Origin=*"),e.route.responseHeaders["Access-Control-Allow-Origin"]="*";typeof s<"u"?(v.debug(`CORS: allow_credentials present. Allowing ${s}...`),e.route.responseHeaders["Access-Control-Allow-Credentials"]=s.toString()):(v.debug("CORS: No allow_credentials present. Allowing all credentials."),e.route.responseHeaders["Access-Control-Allow-Credentials"]="true"),typeof c<"u"?(v.debug(`CORS: allow_methods present. Allowing ${c}...`),e.route.responseHeaders["Access-Control-Allow-Methods"]=[...c].join(",")):(v.debug("CORS: No allow_methods present. Allowing only GET, OPTIONS and POST"),e.route.responseHeaders["Access-Control-Allow-Methods"]="GET, OPTIONS, POST"),typeof p<"u"?(v.debug(`CORS: allow_headers present. Allowing ${p}...`),e.route.responseHeaders["Access-Control-Allow-Headers"]=[...p].join(",")):(v.debug("CORS: No allow_headers present. Allowing all headers..."),e.route.responseHeaders["Access-Control-Allow-Headers"]="*")}else v.debug("No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors")}head(e){this.done()}get(e){v.debug(`[BackendMicroservice.get] Data received: ${V(e)}`),this.done()}post(e){this.done()}put(e){this.done()}delete(e){this.done()}connect(e){this.done()}options(e){this.done()}trace(e){this.done()}patch(e){this.done()}finishWithBody(e){try{v.debug("[BackendMicroservice.finishWithBody] Ending the stream..."),v.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`),typeof this.body!="string"&&(this.body=V(this.body)),v.debug(`[BackendMicroservice.finishWithBody] + body: ${this.body} `),e.write(this.body),e.end(),v.debug("[BackendMicroservice.finishWithBody] Stream ended.")}catch(n){v.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${n}`)}}done(){v.debug("[BackendMicroservice.done] Finalizing the response...");var e=this,n=e.stream;try{if(v.debug("[BackendMicroservice.done] Sending response headers..."),e.route.responseHeaders)v.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(e.route.responseHeaders)}`),n.respond(e.route.responseHeaders);else throw Error("[BackendMicroservice.done] No headers present.")}catch(s){v.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${s}`)}if(e.body!==null)try{v.debug("[BackendMicroservice.done] A body of message is present. Finalizing the response..."),e.finishWithBody.call(e,n)}catch(s){v.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${s}`)}else v.debug("[BackendMicroservice.done] No body present. Ending stream..."),n.end()}},"BackendMicroservice")]),Q("SourceJS",Object,{domain:R,basePath:Oe,body:ce("script"),type:"text/javascript",containerTag:"body",url:"",data:{},async:!1,external:!1,set(e,n){this[e]=n},get(e){return this[e]},status:!1,done(){},fail(){},rebuild(){var e=this;try{document.getElementsByTagName(e.containerTag)[0].appendChild(function(n,s,c){return n.type=c.type,n.src=s,n.crossOrigin=Object.hasOwnProperty.call(c,"crossOrigin")?c.crossOrigin:"anonymous",n.async=c.async,n.onreadystatechange=function(){this.readyState==="complete"&&c.done.call(c)},n.onload=function(p){c.status=!0,c.done.call(c,p)},n.onerror=function(p){c.status=!1,c.fail.call(c,p)},c.body=n,n}.call(this,ce("script"),this.external?this.url:this.basePath+this.url,e))}catch(n){e.status=!1,e.fail.call(e,n)}},Cast(e){return Ye(this,e)},_new_(e){this.__new__(e),this.rebuild()}}),Q("SourceCSS",Object,{domain:R,basePath:Oe,body:ce("link"),url:"",data:{},async:!1,external:!1,set(e,n){this[e]=n},get(e){return this[e]},done(){},rebuild(){var e=this;C&&window.document.getElementsByTagName("head")[0].appendChild(function(n,s,c){return n.type="text/css",n.rel="stylesheet",n.href=s,n.crossOrigin="anonymous",n.onreadystatechange=function(){this.readyState==="complete"&&c.done.call(c)},n.onload=c.done,c.body=n,n}.call(this,ce("link"),this.external?this.url:this.basePath+this.url,e))},Cast(e){return Ye(this,e)},_new_(e){this.__new__(e),this.rebuild()}});var Ge=y(function(e){return isNaN(e)?new Number(0):new Number(e)},"__to_number");Array.prototype.unique=function(){return this.filter(function(e,n,s){return s.indexOf(e)===n})},Array.unique=function(e){return e.unique()},F(Array.unique),F(Array.prototype.unique),Array.prototype.table=function(){console.table(this)},Array.table=function(e){return e.table()},F(Array.table),F(Array.prototype.table),Array.prototype.sum=function(){return this.reduce(function(e,n){return Ge(e)+Ge(n)},0)},Array.sum=function(e){return e.sum()},F(Array.sum),F(Array.prototype.sum),Array.prototype.avg=function(){return this.length<1?0:this.reduce(function(e,n){return(Ge(e)+Ge(n))/2})},Array.avg=function(e){return e.avg()},F(Array.avg),F(Array.prototype.avg),Array.prototype.min=function(){return this.reduce(function(e,n){return Ge(e)<=Ge(n)?e:n},1/0)},Array.min=function(e){return e.min()},F(Array.min),F(Array.prototype.min),Array.prototype.max=function(){return this.reduce(function(e,n){return Ge(e)>=Ge(n)?e:n},0)},Array.max=function(e){return e.max()},F(Array.max),F(Array.prototype.max),Array.prototype.sortBy=function(e,n=!0){var s=n?function(c,p){return p[e]c[e]?1:-1};return this.sort(s)},Array.sortBy=function(e,n,s=!0){return e.sortBy(n,s)},F(Array.sortBy),F(Array.prototype.sortBy),Array.matrix=function(e,n=0){var s=y(function(c){return n},"x_func");return Array.from({length:e},s)},F(Array.matrix),Array.matrix2d=function(e,n=0){var s=y(function(p){return n},"y_func"),c=y(function(p){return Array.from({length:e},s)},"x_func");return Array.from({length:e},c)},F(Array.matrix2d),Array.matrix3d=function(e,n=0){var s=y(function(p){return Array.from({length:e},function(){return n})},"y_func"),c=y(function(p){return Array.from({length:e},s)},"x_func");return Array.from({length:e},c)},F(Array.matrix3d),l.range=function(e,n=0,s=1){return(n===0||typeof n>"u")&&(n=e,e=0),Array.from({length:(n-e)/s+1},function(c,p){return e+p*s})},F(l.range),String.prototype.list=function(){var e=this;return l.range(0,e.length-1).map(function(n){return e[n]})},F(String.prototype.list),l.getDocumentLayout=function(){var e=y((c,p)=>c>p?"landscape":null,"h"),n=y((c,p)=>p>c?"portrait":null,"v"),s=y((c,p)=>c===p?"square":null,"square");return[e(document.documentElement.clientWidth,document.documentElement.clientHeight),n(document.documentElement.clientWidth,document.documentElement.clientHeight),s(document.documentElement.clientWidth,document.documentElement.clientHeight)].filter(c=>c!==null).pop()},Q("ArrayList",Array,[]),G("ArrayList").matrix=Array.matrix,G("ArrayList").matrix2d=Array.matrix2d,G("ArrayList").matrix3d=Array.matrix3d,F(G("ArrayList").matrix),F(G("ArrayList").matrix2d),F(G("ArrayList").matrix3d),Q("ArrayCollection",Object,{source:o(G("ArrayList"),[]),changed(e,n){v.debug("VALUE CHANGED"),v.debug(e),v.debug(n)},push(e){var n=this;v.debug("VALUE ADDED"),v.debug(e),n.source.push(e)},pop(e){var n=this;v.debug("VALUE POPPED"),v.debug(e),n.source.pop(e)},_new_(e){var n=this,s=0;n.source=o(G("ArrayList"),e);for(var c in n.source)isNaN(c)||(v.debug("binding "+c.toString()),function(p){Object.defineProperty(n,p,{set(m){v.debug("setting "+p+"="+m),n.source[p]=m,n.changed(p,m)},get(){return n.source[p]}})}(c),s++);n.source.length=s,Object.defineProperty(n,"length",{get(){return n.source.length}})}}),N("com.qcobjects.effects.base",[y(class extends G("InheritClass"){constructor(){super(...arguments),U(this,"duration",1e3)}animate({timing:e,draw:n,duration:s}){let c=performance.now();requestAnimationFrame(y(O(function p(m){let _=(m-c)/s;_>1&&(_=1);let b=e(_);n(Math.round(b*100)),_<1?requestAnimationFrame(p):typeof this<"u"&&this!==null&&Object.hasOwnProperty.call(this,"done")&&(typeof this.done).toLowerCase()==="function"&&this.done.call(this)},"i"),"animate"))}},"Effect")]),N("com.qcobjects.effects.transitions.base",[y(class extends G("Effect"){constructor(){super(...arguments),U(this,"duration",385),U(this,"defaultParams",{alphaFrom:0,alphaTo:1,angleFrom:180,angleTo:0,radiusFrom:0,radiusTo:30,scaleFrom:0,scaleTo:1}),U(this,"fitToHeight",!1),U(this,"fitToWidth",!1),U(this,"effects",[]),v.info("DECLARING TransitionEffect "),this.component.defaultParams=this.defaultParams}apply({alphaFrom:e,alphaTo:n,angleFrom:s,angleTo:c,radiusFrom:p,radiusTo:m,scaleFrom:_,scaleTo:b}){var E=this;v.info("EXECUTING TransitionEffect ");var k=E.component.shadowed?E.component.shadowRoot.host:E.component.body;E.fitToHeight&&(k.height=typeof k.offsetParent=="object"&&k.offsetParent!==null?k.offsetParent.scrollHeight:k.getBoundingClientRect().height),E.fitToWidth&&(k.width=typeof k.offsetParent=="object"&&k.offsetParent!==null?k.offsetParent.scrollWidth:k.getBoundingClientRect().width),k.style.display="block",E.effects.map(function(q,re){var Z=G(q),he=new Z,ie=he.apply,se=[k].concat(Object.values({alphaFrom:e,alphaTo:n,angleFrom:s,angleTo:c,radiusFrom:p,radiusTo:m,scaleFrom:_,scaleTo:b}));ie.apply(E,se)})}},"TransitionEffect")]),N("com.qcobjects.timing",[y(class extends G("InheritClass"){constructor(){super(...arguments),U(this,"duration",1e3),U(this,"alive",!0)}thread({timing:e,intervalInterceptor:n,duration:s}){var c=this;let p=performance.now();requestAnimationFrame(y(O(function m(_){let b=_-p,E=b/s;E>1&&(E=1);let k=e(E,b);n(Math.round(k*100)),(E<1||s===-1)&&c.alive&&requestAnimationFrame(m)},"d"),"thread"))}},"Timer")]),N("com.qcobjects.tools.essentials",[y(class extends G("InheritClass"){constructor(){super(...arguments),U(this,"_toggle",!1),U(this,"_inverse",!0),U(this,"_positive",null),U(this,"_negative",null),U(this,"_dispatched",null),U(this,"_args",{}),this._new_(...arguments)}changeToggle(){this._toggle=!this._toggle}_new_({positive:e,negative:n,args:s}){this._positive=e,this._negative=n,this._args=s}fire(){var e=this,n=new Promise(function(s,c){typeof e._positive=="function"&&typeof e._negative=="function"?(e._inverse?e._dispatched=e._toggle?e._negative.bind(e):e._positive.bind(e):e._dispatched=e._toggle?e._positive.bind(e):e._negative.bind(e),e._dispatched.call(e,e._args),s.call(n,e)):(v.debug("Toggle functions are not declared"),c.call(n,e))}).then(function(s){s.changeToggle()}).catch(function(s){v.debug(s.toString())});return n}},"Toggle")]),function(e){let n=y(function(_,b,E){var k=this;if(typeof _>"u"||_===null)throw Error(`mapper.${b}.${E} does not have a component instance or it is null.`);let q=e.global.get(E),re=_.get(E),Z=_.data[E],he=typeof Z<"u"?Z:typeof re<"u"?re:q,ie="";return typeof he<"u"&&typeof he.map<"u"?ie=he.map(function(se){let Le=[...Object.keys(se)].map(Te=>` data-${Te}="${typeof se[Te]<"u"&&se[Te]!==null?se[Te].toString():""}"`).join("");return``}).join(""):v.debug(`${b}.${E} does not have a map property`),ie},"mapper");Re.setProcessor(n);let s=y(function(_,b,E){var k=` + /* CSS Document for Mobile Imports */ + @import url("${E}") (orientation:portrait); + @import url("${E}") (max-width:460px); + @import url("${E}") (aspect-ratio: 9/16); + @import url("${E}") (aspect-ratio: 10/16); + @import url("${E}") (aspect-ratio: 5/8); + @import url("${E}") (aspect-ratio: 3/4); + @import url("${E}") (aspect-ratio: 2/3); + `,q=` + @import url("${E}") (orientation:landscape) and (min-width:460px); + @import url("${E}") (aspect-ratio: 16/9) and (min-width:460px); + @import url("${E}") (aspect-ratio: 16/10) and (min-width:460px); + @import url("${E}") (aspect-ratio: 8/5) and (min-width:460px); + @import url("${E}") (aspect-ratio: 4/3) and (min-width:460px); + @import url("${E}") (aspect-ratio: 3/2) and (min-width:460px); + `,re={landscape:q,portrait:k};return Object.hasOwnProperty.call(re,b)?re[b]:""},"layout");Re.setProcessor(s);let c=y(function(){let _=[...arguments].slice(1).map(function(b){return{[b.split("=")[0]]:b.split("=")[1]}}).reduce(function(b,E){return Object.assign(b,E)});return``},"component");Re.setProcessor(c);let p=y(function(){let _=[...arguments].slice(1).map(function(b){return{[b.split("=")[0]]:b.split("=")[1]}}).reduce(function(b,E){return Object.assign(b,E)});return``},"quick_component");Re.setProcessor(p);let m=y(function(_,b,E){return e.range(b).map(function(k){return E.replace("{{index}}",k.toString())}).join("")},"repeat");Re.setProcessor(m)}(l),mt(function(){l.CONFIG.get("useSDK")||l.__start__()}),r(r),r(H),r(N),r(Q),r(o),r($),r(mt),r(le),r(C),r(oe),function(e){N("com.qcobjects",[y(O(class xt extends G("InheritClass"){constructor(){super(...arguments),U(this,"_GLOBAL",{}),U(this,"__definition",{}),U(this,"__classType","GlobalSettings"),this.set=xt.set.bind(this),this.get=xt.get.bind(this),this.__start__=xt.__start__.bind(this)}static set(s,c){this._GLOBAL[s]=c}static get(s,c){var p;return typeof this._GLOBAL[s]<"u"?p=this._GLOBAL[s]:typeof c<"u"&&(p=c),p}static __start__(){var s=y(function(){var p;return C&&(p=new Promise(function(m,_){"serviceWorker"in navigator&&typeof e.CONFIG.get("serviceWorkerURI")<"u"&&(e.CONFIG.set("serviceWorkerScope",e.CONFIG.get("serviceWorkerScope")?e.CONFIG.get("serviceWorkerScope"):"/"),navigator.serviceWorker.register(e.CONFIG.get("serviceWorkerURI"),{scope:e.CONFIG.get("serviceWorkerScope")}).then(function(b){v.debug("Service Worker Registered"),m.call(p,b)},function(b){v.debug("Error registering Service Worker"),_.call(p,b)}),navigator.serviceWorker.ready.then(function(b){v.debug("Service Worker Ready"),m.call(p,b)},function(b){v.debug("Error loading Service Worker"),_.call(p,b)}))})),p},"__load__serviceWorker"),c=y(function(){return new Promise((p,m)=>{if(C){v.debug("Starting to building components");try{e.componentsStack=document.buildComponents.call(document)}catch(_){throw Error(`Something went wrong trying to start components tree: ${_.message}`)}v.debug("Initializing the service worker"),s.call(e).catch(function(_){v.debug(`error loading the service worker ${_}`)})}p()})},"_buildComponents");v.debug("Starting to load the config settings..."),e.CONFIG.get("useConfigService",!1)?(v.debug("Loading settings using local configuration file..."),e.global.configService=o(G("ConfigService")),e.global.configService.configLoaded=c,ye(e.global.configService)):(v.debug("Starting to load the components..."),c.call(this))}},"Ye"),"GlobalSettings")]),r(G("GlobalSettings")),S=o(G("GlobalSettings")),e=Ue(S,e),Object.defineProperty(e,"PackagesNameList",{set(n){v.debug("PackagesNameList is readonly")},get(){var n=y(function(s){var c=[];for(var p in s)typeof s[p]<"u"&&typeof s[p]!="function"&&Object.hasOwnProperty.call(s[p],"length")&&s[p].length>0&&(c.push(p),c=c.concat(n(s[p])));return c},"_get_packages_names");return n(Ie)}}),Object.defineProperty(e,"PackagesList",{set(n){v.debug("PackagesList is readonly")},get(){return e.PackagesNameList.map(function(n){let s=N(n),c;return s&&(c={packageName:n,classesList:s.filter(function(p){return I(p)})}),c}).filter(function(n){return typeof n<"u"})}}),Object.defineProperty(e,"ClassesList",{set(n){v.debug("ClassesList is readonly")},get(){var n=[];return e.PackagesList.map(function(s){return n=n.concat(s.classesList.map(function(c){return{packageName:s.packageName,className:s.packageName+"."+c.__definition.__classType,classFactory:c}})),s}),n}}),Object.defineProperty(e,"ClassesNameList",{set(n){v.debug("ClassesNameList is readonly")},get(){return e.ClassesList.map(function(n){return n.className})}}),C&&(Q("GLOBAL",Pe.global),r(G("GLOBAL"))),r(S),e.CONFIG.get("useSDK")&&function(n){var s=n.CONFIG.get("remoteImportsPath"),c=!n.CONFIG.get("useLocalSDK");n.CONFIG.set("remoteImportsPath",n.CONFIG.get("remoteSDKPath"));var p=!1,m="QCObjects-SDK";if(C)p=!0;else{var _=t("qcobjects-sdk");_!==null?(m="qcobjects-sdk",p=!0):(m="node_modules/qcobjects-sdk/QCObjects-SDK",p=!0)}if(p)if(v.info("Importing SDK... "+m),T&&typeof _t<"u"){let b=Ke()}else H(m,function(){c?v.debug("QCObjects-SDK.js loaded from remote location"):v.debug("QCObjects-SDK.js loaded from local"),n.CONFIG.set("remoteImportsPath",s)},c);else v.debug("SDK has not been imported as it is not available at the moment")}(e)}(l),C&&we(function(){mt(function(){(function(e){let n=0,s=!1,c=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),p=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth);function m(_){var b=Math.round(e.scrollY*100/c),E=Math.round(e.scrollX*100/p),k=new CustomEvent("scrollpercent",{detail:{percentX:E,percentY:b}});_.target.dispatchEvent(k);var q="defaultscroll",re=[0,5,10,25,50,75,90,95,100];re.filter(function(Z){return Z===b}).map(function(Z){q="percentY"+b.toString();var he=new CustomEvent(q,{detail:{percentX:E,percentY:b}});_.target.dispatchEvent(he)})}O(m,"a"),y(m,"scrollDispatcher"),document.addEventListener("scroll",function(_){s||(requestAnimationFrame(function(){m(_),s=!1}),s=!0)})})(l)})},null),C||(typeof l.global<"u"&&Object.hasOwnProperty.call(l.global,"_fireAsyncLoad")&&l.global._fireAsyncLoad.call(this),typeof l.global<"u"&&Object.hasOwnProperty.call(l.global,"onload")&&l.global.onload.call(this)),function(e){var n=y(function(){Object.freeze(Object.prototype),Object.freeze(Object)},"__freeze__");e&&l.CONFIG.get("secureObjects",!1)?mt(function(){n()}):l.CONFIG.get("secureObjects",!1)&&n()}(C)}},"w"),"__qcobjects__").call(null,typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{})}),_e=L((A,f)=>{var d=ve();f.exports=d}),He=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var d=_e();(function(l){"use strict";class S extends d.InheritClass{constructor({messages:C=[]}){super({messages:C}),d.CONFIG.get("use_i18n",!1)&&(d.CONFIG.set("lang","en"),l.get("i18n")?l.set("i18n",{messages:l.get("i18n").messages.concat(C)}):l.set("i18n",{messages:C}))}_load_i18n_packages_(){return d.CONFIG.get("i18n_languages",[]).map(C=>{(0,d.Import)(`org.quickcorp.i18n_messages.${C}`)})}}O(S,"r"),y(S,"i18n_messages"),(0,d.Package)("org.qcobjects.i18n_messages",[S]),new S({})._load_i18n_packages_()})(typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{})}),Ee=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.models",[y(class extends f.VO{},"Contact")])})()}),tt=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.ModalMoveUp=A.ModalMoveDown=A.ModalFade=A.WipeDown=A.WipeUp=A.WipeRight=A.WipeLeft=A.Resize=A.Radius=A.Rotate=A.RotateZ=A.RotateY=A.RotateX=A.MoveYInFromTop=A.MoveYInFromBottom=A.MoveXInFromLeft=A.MoveXInFromRight=A.Move=A.Fade=void 0;var d=_e(),l=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};(function(){"use strict";class v extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("alpha: "+Q.toString()),Y.style.opacity=Q.toString()}})}}O(v,"w"),y(v,"Fade");class fe extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe,me,J){let Q=me-X,G=J-pe;Y.style.transform="translate("+X+"px,"+pe+"px)",this.animate({duration:this.duration,timing(Ze){return Ze},draw(Ze){d.logger.debug("animation progress: "+Ze.toString());let o=pe+Ze*G/100,r=X+Ze*Q/100;d.logger.debug("x: "+r.toString()+" y:"+o.toString()),Y.style.transform="translate("+r+"px,"+o+"px)"}})}}O(fe,"r"),y(fe,"Move"),(0,d.Package)("org.qcobjects.effects.base",[v,fe]);class B extends fe{constructor(){super(...arguments),this.duration=1e3}apply(Y){super.apply.call(this,Y,Y.width,0,0,0)}}O(B,"f"),y(B,"MoveXInFromRight");class z extends fe{constructor(){super(...arguments),this.duration=1e3}apply(Y){super.apply.call(this,Y,-Y.width,0,0,0)}}O(z,"p"),y(z,"MoveXInFromLeft");class Ce extends fe{constructor(){super(...arguments),this.duration=1e3}apply(Y){super.apply.call(this,Y,0,Y.height,0,0)}}O(Ce,"u"),y(Ce,"MoveYInFromBottom");class qe extends fe{constructor(){super(...arguments),this.duration=1e3}apply(Y){super.apply.call(this,Y,0,-Y.height,0,0)}}O(qe,"v"),y(qe,"MoveYInFromTop");class dt extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=Math.round(X+J*me/100);d.logger.debug("angle: "+Q.toString()),Y.style.transform="rotate3d(1,0,0,"+Q.toString()+"deg)"}})}}O(dt,"g"),y(dt,"RotateX");class ht extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=Math.round(X+J*me/100);d.logger.debug("angle: "+Q.toString()),Y.style.transform="rotate3d(0,1,0,"+Q.toString()+"deg)"}})}}O(ht,"b"),y(ht,"RotateY");class ze extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=Math.round(X+J*me/100);d.logger.debug("angle: "+Q.toString()),Y.style.transform="rotate3d(0,0,1,"+Q.toString()+"deg)"}})}}O(ze,"O"),y(ze,"RotateZ");class yt extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=Math.round(X+J*me/100);d.logger.debug("angle: "+Q.toString()),Y.style.transform="rotate3d(1,1,1,"+Q.toString()+"deg)"}})}}O(yt,"G"),y(yt,"Rotate");class pt extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("radius: "+Q.toString()),Y.style.borderRadius=Q.toString()+"px"}})}}O(pt,"P"),y(pt,"Radius");class ot extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("resize: "+Q.toString()),Y.style.transformOrigin="center",Y.style.transform="scale("+Q+","+Q+")"}})}}O(ot,"y"),y(ot,"Resize");class Pe extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("wipe: "+Q.toString()),Y.style.transformOrigin="right",Y.style.transform="scaleX("+Q+")"}})}}O(Pe,"T"),y(Pe,"WipeLeft");class Ie extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("wipe: "+Q.toString()),Y.style.transformOrigin="left",Y.style.transform="scaleX("+Q+")"}})}}O(Ie,"L"),y(Ie,"WipeRight");class Qe extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("wipe: "+Q.toString()),Y.style.transformOrigin="bottom",Y.style.transform="scaleY("+Q+")"}})}}O(Qe,"D"),y(Qe,"WipeUp");class Xe extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("wipe: "+Q.toString()),Y.style.transformOrigin="top",Y.style.transform="scaleY("+Q+")"}})}}O(Xe,"ae"),y(Xe,"WipeDown"),(0,d.Package)("org.qcobjects.effects.extended",[B,z,Ce,qe,dt,ht,ze,yt,pt,ot,Pe,Ie,Qe,Xe]);class Je extends v{constructor(){super(...arguments),this.duration=500}}O(Je,"le"),y(Je,"ModalFade");class Ye extends fe{constructor(){super(...arguments),this.duration=300}}O(Ye,"he"),y(Ye,"ModalMoveDown");class Ue extends fe{constructor(){super(...arguments),this.duration=800}}O(Ue,"be"),y(Ue,"ModalMoveUp"),(0,d.Package)("org.qcobjects.modal.effects",[Je,Ye,Ue])})();var S=l.Fade;A.Fade=S;var x=l.Fade;A.Move=x;var C=l.MoveXInFromRight;A.MoveXInFromRight=C;var T=l.MoveXInFromLeft;A.MoveXInFromLeft=T;var M=l.MoveYInFromBottom;A.MoveYInFromBottom=M;var P=l.MoveYInFromTop;A.MoveYInFromTop=P;var F=l.RotateX;A.RotateX=F;var oe=l.RotateY;A.RotateY=oe;var ce=l.RotateZ;A.RotateZ=ce;var V=l.Rotate;A.Rotate=V;var ue=l.Radius;A.Radius=ue;var R=l.Resize;A.Resize=R;var Oe=l.WipeLeft;A.WipeLeft=Oe;var de=l.WipeRight;A.WipeRight=de;var K=l.WipeUp;A.WipeUp=K;var xe=l.WipeDown;A.WipeDown=xe;var we=l.ModalFade;A.ModalFade=we;var Fe=l.ModalMoveDown;A.ModalMoveDown=Fe;var $e=l.ModalMoveUp;A.ModalMoveUp=$e}),nt=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.SwaggerUIComponent=A.ModalEnclosureComponent=A.ModalComponent=A.EmailField=A.TextField=A.InputField=A.ButtonField=A.ShadowedComponent=A.FormField=void 0;var d=_e(),l=tt(),S=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};(function(ue){class R extends d.Component{constructor(B){B.name=typeof B.name<"u"?B.name:"form-field",super(B),this.cached=!1,this.reload=!0}createBindingEvents(){let B;typeof this.fieldType>"u"||this.fieldType==null?B=this.body.subelements("*[data-field]"):B=this.body.subelements(this.fieldType+"[data-field]");for(let z=0;z{d.logger.debug("Executing change event binding"),this.executeBindings()}),Ce.addEventListener("blur",()=>{d.logger.debug("Executing change event binding"),this.executeBindings()}),Ce.addEventListener("focus",()=>{d.logger.debug("Executing change event binding"),this.executeBindings()}),Ce.addEventListener("keydown",()=>{d.logger.debug("Executing keydown event binding"),this.executeBindings()})}}executeBinding(B){let z=B.getAttribute("data-field");d.logger.debug("Binding "+z+" for "+this.name),this.data[z]=B.value}executeBindings(){let B;typeof this.fieldType>"u"||this.fieldType==null?B=this.body.subelements("*[data-field]"):B=this.body.subelements(this.fieldType+"[data-field]");for(let z=0;z + + +`,this.data={}}}O(Fe,"b"),y(Fe,"ModalEnclosureComponent");class $e extends d.Component{constructor(B){B.basePath=d.CONFIG.get("modalBasePath",d.CONFIG.get("remoteSDKPath","")),super(B),this.name="modal",this.cached=!1,this.modalEnclosureComponentClass="ModalEnclosureComponent",this.controller=null,this.view=null,this.tplsource="none",this.closeOnClickOutside=!1,this.data={content:"",modalId:0},this.submodal=null,this.data.modalId=this.__instanceID;let z=(0,d.New)((0,d.ClassFactory)(this.modalEnclosureComponentClass),{name:this.name,basePath:this.basePath,data:this.data});this.subcomponents.push(z),this.submodal=z,z.tplsource==="none"?this.body.innerHTML=z.parsedAssignmentText:this.body.append(z.body)}modal(){let B=this.data.modalId;(0,d.Tag)("#modalInstance_"+B+".modal").map(z=>(z.style.display="block",new l.ModalFade({}).apply(z,0,1))),(0,d.Tag)("#modalInstance_"+B+".modal .modal-content").map(z=>new l.ModalMoveDown({}).apply(z,0,-document.body.clientHeight,0,0)),(0,d.Tag)("#modalInstance_"+B+".modal .modal-content .close").map(z=>z.addEventListener("click",()=>{this.close()},!1)),this.closeOnClickOutside&&window.addEventListener("click",()=>{this.close()},!1)}close(){let B=this.data.modalId;(0,d.Tag)("#modalInstance_"+B+".modal").map(z=>(z.style.display="block",new l.ModalFade({}).apply(z,1,0))),(0,d.Tag)("#modalInstance_"+B+".modal .modal-content").map(function(z){return new l.ModalMoveUp({}).apply(z,0,0,0,-document.body.clientHeight)}),setTimeout(function(){(0,d.Tag)("#modalInstance_"+B+".modal").map(z=>(z.style.display="none",!0))},900)}rebuild(){let B=super.rebuild();return this.templateURI=(0,d.ComponentURI)({COMPONENTS_BASE_PATH:d.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:"modal",TPLEXTENSION:d.CONFIG.get("tplextension",""),TPL_SOURCE:"default"}),B}}O($e,"O"),y($e,"ModalComponent");class v extends d.Component{constructor(){super(...arguments),this.cached=!1,this.basePath=d.CONFIG.get("remoteSDKPath",""),this.tplextension="tpl.html",this.name="swagger-ui"}}O(v,"G"),y(v,"SwaggerUIComponent"),(0,d.Package)("org.qcobjects.form.components",[Oe,de,K,xe,we,Fe,$e,v]),ue.FormField=R,ue.ShadowedComponent=Oe,ue.ButtonField=de,ue.InputField=K,ue.TextField=xe,ue.EmailField=we,ue.ModalEnclosureComponent=Fe,ue.ModalComponent=$e,ue.SwaggerUIComponent=v})(S);var x=S.FormField;A.FormField=x;var C=S.ShadowedComponent;A.ShadowedComponent=C;var T=S.ButtonField;A.ButtonField=T;var M=S.InputField;A.InputField=M;var P=S.TextField;A.TextField=P;var F=S.EmailField;A.EmailField=F;var oe=S.ModalEnclosureComponent;A.ModalEnclosureComponent=oe;var ce=S.ModalComponent;A.ModalComponent=ce;var V=S.SwaggerUIComponent;A.SwaggerUIComponent=V}),Ve=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.GridItemComponent=A.GridComponent=void 0;var d=_e(),l=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};(function(C){"use strict";class T extends d.Component{constructor(){super(...arguments),this.name="grid-item",this.shadowed=!0,this.tplsource="inline",this.template=` + +

{{description}}

+`,this.cached=!1}}O(T,"r"),y(T,"GridItemComponent");class M extends d.Component{constructor(F){super(F),this.name="grid",this.cached=!1,this.view=null,this.shadowed=!0,this.rows=3,this.cols=3,this.templateURI="",this.data={},this.tplsource="inline",this.template="

Loading...

",this.body.setAttribute("controllerClass","DataGridController");let oe=this.body.getAttribute("subcomponentClass")!==null?this.body.getAttribute("subcomponentClass"):"GridItemComponent";this.body.setAttribute("subcomponentClass",oe)}}O(M,"f"),y(M,"GridComponent"),(0,d.Package)("org.qcobjects.components.grid",[M,T]),C.GridComponent=M,C.GridItemComponent=T})(l);var S=l.GridComponent;A.GridComponent=S;var x=l.GridItemComponent;A.GridItemComponent=x}),Nt=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.ListItemComponent=A.ListComponent=void 0;var d=_e(),l=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};(function(C){"use strict";class T extends d.Component{constructor(F){F.name="list-item",super(F),this.shadowed=!1,this.tplsource="inline",this.template='{{label}}',this.cached=!1}}O(T,"r"),y(T,"ListItemComponent");class M extends d.Component{constructor(F){F.name="list",super(F),this.shadowed=!0,this.tplsource="inline",this.template="

Loading...

",this.body.setAttribute("controllerClass","ListController"),this.body.setAttribute("subcomponentClass","ListItemComponent")}}O(M,"f"),y(M,"ListComponent"),(0,d.Package)("org.qcobjects.components.list",[T,M]),C.ListComponent=M,C.ListItemComponent=T})(l);var S=l.ListComponent;A.ListComponent=S;var x=l.ListItemComponent;A.ListItemComponent=x}),it=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.components.slider",[y(class extends f.Component{constructor(d){super(d),this.tplsource="inline",this.template="

Loading...

",this.name="slidelist",this.body.setAttribute("controllerClass","DataGridController");let l=this.body.getAttribute("subcomponentClass")!==null?this.body.getAttribute("subcomponentClass"):"GridItemComponent";this.body.setAttribute("subcomponentClass",l)}},"SlideListComponent"),y(class extends f.Component{constructor(d){super(d),this.effectClass="Fade",this.name="slider_item",this.data.slideNumber=this.data.__dataIndex+1,this.template=` + + `,this.tplsource="inline"}},"SlideItemComponent"),y(class extends f.Component{constructor(d){super(d),this.name="slider",this.template=` + + +
+ + + + +
+
+ +
+
+ + `,this.tplsource="inline",this.shadowed=!0,this.data.SERVICE_CLASS=this.body.getAttribute("serviceClass"),this.data.sliderHandler="slider_"+this.__instanceID.toString(),this.body.setAttribute("controllerClass","SliderController")}},"SliderComponent")])})()}),It=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e(),d=tt();(function(){"use strict";class l extends f.Component{constructor(x){x.name="notification",x.body=(0,f._DOMCreateElement)("div"),super(x),this.cached=!1,this.tplsource="inline",this.shadowed=!1,this.template=` + +
+
+

{{title}} {{message}}

+
+
+ `,this.kinds=["danger","success","info","warning"]}display(x){let C=y(function(T){T.style.display="block";let M=(0,f.New)(d.Move,{duration:900,apply(F){(0,f._super_)("Fade","apply").call(this,F,0,1),(0,f._super_)("Move","apply").call(this,F,0,-document.body.clientHeight,0,0)}}),P=(0,f.New)(d.Move,{duration:650,apply(F){(0,f._super_)("Fade","apply").call(this,F,1,0),(0,f._super_)("Move","apply").call(this,F,0,0,0,-document.body.clientHeight)}});M.apply(T),setTimeout(function(){P.apply(T)},2e3)},"_display_");x.subelements("div.notification_background").map(T=>(0,f.New)(d.Fade,{duration:500}).apply(T,0,1)),x.subelements("div.notification").map(T=>C(T)),setTimeout(function(){x.remove()},2200)}static success(x){let C=(0,f.New)(l,{name:"notification",shadowed:!0,body:(0,f._DOMCreateElement)("div"),data:{kind:"success",title:"Success!",message:`${x}...`}});document.body.append(C);let T=C.shadowed?C.shadowRoot.host:C.body;C.display(T)}static danger(x){let C=(0,f.New)(l,{name:"notification",shadowed:!0,body:(0,f._DOMCreateElement)("div"),data:{kind:"danger",title:"Danger!",message:`${x}...`}});document.body.append(C);let T=C.shadowed?C.shadowRoot.host:C.body;C.display(T)}static info(x){let C=(0,f.New)(l,{name:"notification",shadowed:!0,body:(0,f._DOMCreateElement)("div"),data:{kind:"info",title:"Info!",message:`${x}...`}});document.body.append(C);let T=C.shadowed?C.shadowRoot.host:C.body;C.display(T)}static warning(x){let C=(0,f.New)(l,{name:"notification",shadowed:!0,body:(0,f._DOMCreateElement)("div"),data:{kind:"warning",title:"Warning!",message:`${x}...`}});document.body.append(C);let T=C.shadowed?C.shadowRoot.host:C.body;C.display(T)}}O(l,"w"),y(l,"NotificationComponent"),(0,f.Package)("org.quickcorp.components.notifications",[l])})()}),bt=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.CubeSplashScreenComponent=A.VideoSplashScreenComponent=A.SplashScreenComponent=void 0;var d=_e(),l=tt(),S=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};y(function(M){"use strict";class P extends d.Component{constructor(V){V.name=typeof V.name>"u"?"splashscreen":V.name;let ue=typeof window<"u"&&typeof window.self<"u"&&window===window.self,R=location.hash===""&&location.pathname==="/"&&location.search===""||d.CONFIG.get("routingWay","pathname")==="hash"&&d.CONFIG.get("start_url","/")===location.hash||d.CONFIG.get("routingWay","pathname")==="pathname"&&d.CONFIG.get("start_url","/")===location.pathname||d.CONFIG.get("routingWay","pathname")==="search"&&d.CONFIG.get("start_url","/")===location.search,Oe=ue&&R;if(Oe?(V.basePath=d.CONFIG.get("splashscreenBasePath",d.CONFIG.get("remoteSDKPath","")),typeof V.data>"u"&&(V.data={}),V.data.basePath=V.basePath):typeof V<"u"&&typeof V.body<"u"&&(V.body.style.display="none"),super(V),this.cached=!1,this.shadowed=!0,this._bgcolor="",this._enabled_=Oe,this._enabled_){let de=this.body.getAttribute("duration");de===null?de=1e3:de=parseInt(de.toString()),this._bgcolor=this.body.style.backgroundColor;let K=y(()=>{setTimeout(()=>{if(!K.executed){let xe=this.shadowed?this.shadowRoot?.host:this.body;typeof M.componentsStack<"u"&&M.componentsStack.filter(we=>we.body.hasAttribute("splashscreen")).map(we=>{d.logger.debug(`Splash Screen of Main Component: ${we.name}`),we.splashScreenComponent=this;let Fe=y(()=>{if(!Fe.executed){let $e=we.splashScreenComponent,v=we.shadowed?we.shadowRoot?.host:we.body;we._mainPosition=v.style.position,typeof v<"u"&&(v.style.position="fixed"),we._mainOpacity=v.style.opacity,xe.style.width="100%",xe.style.height="100%",document.body.style.backgroundColor="#111111",v.style.opacity="0",setTimeout(function(){typeof xe<"u"&&(document.body.style.backgroundColor=$e?._bgcolor,xe.subelements("#slot-logo").map(fe=>(fe.style.display="block",fe.style.transformOrigin="center",new l.Resize().apply(fe,1,0))),new l.Fade().apply(xe,1,0))},de-1e3),setTimeout(function(){new l.Fade().apply(v,0,1),v.style.position=we._mainPosition,document.body.style.backgroundColor=$e._bgcolor,xe.parentElement!==null&&xe.parentElement.remove()},de)}Fe.executed=!0},"SplashScreenHandler");return we.addComponentHelper(Fe.bind(we))}),K.executed=!0}})},"_helper_");K.executed=!1,this.addComponentHelper(K.bind(V))}}}O(P,"f"),y(P,"SplashScreenComponent"),(0,d.Package)("org.qcobjects.components.base",[P]);class F extends P{constructor(V){V.name="videosplashscreen",super(V),this.cached=!1,this.shadowed=!0,this.tplsource="inline",this.template=` + +
+
+ + +
+
+ + `}}O(F,"p"),y(F,"VideoSplashScreenComponent");class oe extends P{constructor(V){V.name="cubesplashscreen",super(V),this.cached=!1,this.shadowed=!0,this.tplsource="inline",this.template=` + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ + `}}O(oe,"u"),y(oe,"CubeSplashScreenComponent"),(0,d.Package)("org.qcobjects.components.splashscreen",[F,oe])},"__splash_screen__")(S);var x=S.SplashScreenComponent;A.SplashScreenComponent=x;var C=S.VideoSplashScreenComponent;A.VideoSplashScreenComponent=C;var T=S.CubeSplashScreenComponent;A.CubeSplashScreenComponent=T}),Mt=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.controllers",[y(class extends f.Controller{},"GenericController")])})()}),kt=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.controllers.grid",[y(class extends f.Controller{constructor(d){super(d),this.rows=this.component.body.getAttribute("rows"),this.rows=this.rows!==null?this.rows:this.component.rows,this.cols=this.component.body.getAttribute("cols"),this.cols=this.cols!==null?this.cols:this.component.cols}cssGrid(){let d=this.component,l=d.shadowed?d.shadowRoot:d.body;if(typeof this.rows<"u"&&typeof this.cols<"u"){let S=(0,f._DOMCreateElement)("style"),x="auto ".repeat(this.rows),C="auto ".repeat(this.cols),T="grid"+this.__instanceID.toString();S.innerHTML=`.${T}{ + display: grid; grid-template-rows: ${x}; grid-template-columns: ${C}; margin:0 auto; }`,l?.append(S),d.shadowed?l?.host.classList.add(T):l.classList.add(T)}}done(){this.cssGrid(),f.logger.debug("GridComponent built")}},"GridController"),y(class extends f.Controller{constructor(d){super(d),this._componentRoot=d.component.shadowed?d.component.shadowRoot:d.component.body,this.rows=d.component.body.getAttribute("rows"),this.rows=d.rows!==null?d.rows:d.component.rows,this.cols=d.component.body.getAttribute("cols"),this.cols=d.cols!==null?d.cols:d.component.cols,f.logger.debug("DataGridController INIT")}getPageIndex(d,l,S){return d=d>0?d-1:0,[S*d/l,S*d/l+S/l]}addSubcomponents(){this.component.subcomponents=[],typeof this._componentRoot<"u"&&(this._componentRoot.innerHTML=""),this.cssGrid(),f.logger.debug((0,f._DataStringify)(this.component.data));try{let d=this.component.body.getAttribute("subcomponentClass");if(d!=null){let l,S,x,C=[...this.component.data],T=this.component.body.getAttribute("paginate-in"),M;T=T!==null?T:"client",T==="client"?(M=this.component.body.getAttribute("page-number"),M=isNaN(M)||M===null?-1:M,M!==-1?(x=this.component.body.getAttribute("total-pages"),x=isNaN(x)?1:x,l=this.getPageIndex(M,x,C.length)[0],S=this.getPageIndex(M,x,C.length)[1]):(l=0,S=C.length,x=1),C=C.slice(l,S)):(l=0,S=C.length,x=1),C.map((P,F,oe)=>{try{let ce=(0,f._DOMCreateElement)("component");ce.setAttribute("name",(0,f.ClassFactory)(d).name),ce.setAttribute("shadowed",(0,f.ClassFactory)(d).shadowed),ce.setAttribute("cached",(0,f.ClassFactory)(d).cached),P=Object.assign(P,{__dataIndex:F,__dataLength:oe.length,__page:M,__totalPages:x,__limit:S,__offset:l});let V=(0,f.New)((0,f.ClassFactory)(d),{name:"item",data:P,templateURI:(0,f.ComponentURI)({COMPONENTS_BASE_PATH:f.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:(0,f.ClassFactory)(d).name,TPLEXTENSION:f.CONFIG.get("tplextension",""),TPL_SOURCE:(0,f.ClassFactory)(d).tplsource}),body:ce,template:(0,f.ClassFactory)(d).template});V.done=this.component.done.bind(V);try{if(V){V.data.__dataIndex=F,Object.hasOwnProperty.call(this.component.data,"length")&&(V.data.__dataLength=this.component.data.length),f.logger.debug("adding subcomponent to body"),this._componentRoot?.append(V.body);try{this.component.subcomponents.push(V)}catch{f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}}else f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}catch{f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}}catch{f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}})}else f.logger.debug("NO SUBCOMPONENT CLASS IN COMPONENT")}catch{f.logger.debug("No data for component")}}cssGrid(){let d=this.component,l=d.shadowed?d.shadowRoot:d.body;if(typeof this.rows<"u"&&typeof this.cols<"u"){let S=(0,f._DOMCreateElement)("style"),x="auto ".repeat(this.rows),C="auto ".repeat(this.cols),T="grid"+this.__instanceID.toString();S.innerHTML=`.${T}{ + display: grid; grid-template-rows: ${x}; grid-template-columns: ${C}; margin:0 auto; }`,d.shadowed?(d.body.append(S),l.host.classList.add(T)):(l?.append(S),l.classList.add(T))}}done(){let d=this.component;f.logger.debug("DataGridController DONE");let l=this.component.body.getAttribute("serviceClass");if(l!=null){let S,x,C=d.body.getAttribute("paginate-in");if(C=C!==null?C:"client",C==="server"){let T=d.body.getAttribute("page-number");T=isNaN(T)||T===null?-1:T;let M;if(T!==-1){let P=this.component.body.getAttribute("server-data-count")!==null?this.component.body.getAttribute("server-data-count"):1;M=this.component.body.getAttribute("total-pages"),M=isNaN(M)?1:M,S=this.getPageIndex(T,M,P)[0],x=this.getPageIndex(T,M,P)[1],d.serviceData=typeof d.serviceData<"u"?d.serviceData:{},d.serviceData.params=typeof d.serviceData.params<"u"?d.serviceData.params:{},d.serviceData.params.offset=S,d.serviceData.params.limit=x}}(0,f.serviceLoader)((0,f.New)((0,f.ClassFactory)(l),{data:d.serviceData}),!1).then(T=>{f.logger.debug("DONE SERVICE COMPONENT"),T.service.JSONresponse=JSON.parse(T.service.template),typeof T.service.JSONresponse.result<"u"?(f.logger.debug((0,f._DataStringify)(T.service.JSONresponse.result)),d.data=T.service.JSONresponse.result):d.data=T.service.JSONresponse,this.addSubcomponents()},T=>{f.logger.debug(T)}).catch(T=>{f.logger.debug("Something went wrong when calling the service from: "+l),f.logger.debug(T.message)})}}},"DataGridController")])})()}),w=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.controllers.list",[y(class extends f.Controller{constructor({component:d,dependencies:l=[],valueField:S=void 0,labelField:x=void 0}){super({component:d,dependencies:l,valueField:S,labelField:x}),this.component=d,this._componentRoot=this.component.shadowed?this.component.shadowRoot:this.component.body,this.labelField=this.component.body.getAttribute("label-field"),this.valueField=this.component.body.getAttribute("value-field"),this.rows=this.component.body.getAttribute("rows"),this.rows=this.rows!==null?this.rows:this.component.rows,this.cols=1,f.logger.debug("ListController INIT")}getPageIndex(d,l,S){return d=d>0?d-1:0,[S*d/l,S*d/l+S/l]}addSubcomponents(){this.component.subcomponents=[];let d=this.component.body.getAttribute("layout"),l=f.CONFIG.get("listBasePath",f.CONFIG.get("remoteSDKPath","")),S="";this.labelField=this.component.body.getAttribute("label-field"),this.valueField=this.component.body.getAttribute("value-field"),d==="horizontal"?S=`@import url("${l}css/components/horizontal-list.css");`:S=`@import url("${l}css/components/list.css");`,typeof this._componentRoot<"u"&&(this._componentRoot.innerHTML=`
    `),f.logger.debug((0,f._DataStringify)(this.component.data));try{let x=this.component.body.getAttribute("subcomponentClass");if(x!=null){let C,T,M,P=[...this.component.data],F=this.component.body.getAttribute("paginate-in");F=F!==null?F:"client";let oe;F==="client"?(oe=this.component.body.getAttribute("page-number"),oe=isNaN(oe)||oe===null?-1:oe,oe!==-1?(M=this.component.body.getAttribute("total-pages"),M=isNaN(M)?1:M,C=this.getPageIndex(oe,M,P.length)[0],T=this.getPageIndex(oe,M,P.length)[1]):(C=0,T=P.length,M=1),P=P.slice(C,T)):(C=0,T=P.length,M=1),P.map((ce,V)=>{try{let ue=(0,f._DOMCreateElement)("li");ce.label=ce[this.labelField],ce.value=ce[this.valueField];let R=(0,f.New)((0,f.ClassFactory)(x),{name:"list-item",data:{label:ce[this.labelField],value:ce[this.valueField],__dataIndex:V,__page:oe,__totalPages:M,__limit:T,__offset:C},templateURI:(0,f.ComponentURI)({COMPONENTS_BASE_PATH:f.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:(0,f.ClassFactory)(x).name,TPLEXTENSION:f.CONFIG.get("tplextension",""),TPL_SOURCE:(0,f.ClassFactory)(x).tplsource}),body:ue,template:(0,f.ClassFactory)(x).template});R.done=this.component.done.bind(R);try{if(R){R.data.__dataIndex=V,Object.hasOwnProperty.call(this.component.data,"length")&&(R.data.__dataLength=this.component.data.length),f.logger.debug("adding subcomponent to body"),this._componentRoot.subelements("ul").map(Oe=>Oe.append(R));try{this.component.subcomponents.push(R)}catch{f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}}else f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}catch{f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}}catch{f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}})}else f.logger.debug("NO SUBCOMPONENT CLASS IN COMPONENT")}catch{f.logger.debug("No data for component")}}cssGrid(){let d=this.component,l=d.shadowed?d.shadowRoot:d.body;if(typeof this.rows<"u"&&typeof this.cols<"u"){let S=(0,f._DOMCreateElement)("style"),x="auto ".repeat(this.rows),C="auto ".repeat(this.cols),T="grid"+this.__instanceID.toString();S.innerHTML=`.${T}{ + display: grid; grid-template-rows: ${x}; grid-template-columns: ${C}; margin:0 auto; }`,l.append(S),l.classList.add(T)}}done(){this.cssGrid();let d=this.component;f.logger.debug("ListController DONE");let l=this.component.body.getAttribute("serviceClass");if(l!=null){let S,x,C=d.body.getAttribute("paginate-in");if(C=C!==null?C:"client",C==="server"){let T=d.body.getAttribute("page-number");T=isNaN(T)||T===null?-1:T;let M;if(T!==-1){let P=this.component.body.getAttribute("server-data-count")!==null?this.component.body.getAttribute("server-data-count"):1;M=this.component.body.getAttribute("total-pages"),M=isNaN(M)?1:M,S=this.getPageIndex(T,M,P)[0],x=this.getPageIndex(T,M,P)[1],d.serviceData=typeof d.serviceData<"u"?d.serviceData:{},d.serviceData.params=typeof d.serviceData.params<"u"?d.serviceData.params:{},d.serviceData.params.offset=S,d.serviceData.params.limit=x}}(0,f.serviceLoader)((0,f.New)((0,f.ClassFactory)(l),{data:d.serviceData}),!1).then(T=>{f.logger.debug("DONE SERVICE COMPONENT"),T.service.JSONresponse=JSON.parse(T.service.template),typeof T.service.JSONresponse.result<"u"?(f.logger.debug((0,f._DataStringify)(T.service.JSONresponse.result)),d.data=T.service.JSONresponse.result):d.data=T.service.JSONresponse,this.addSubcomponents()},T=>{f.logger.debug(T)}).catch(T=>{f.logger.debug("Something went wrong when calling the service from: "+l),f.logger.debug(T.message)})}}},"ListController")])})()}),ct=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var d=_e();(function(l){"use strict";(0,d.Package)("org.qcobjects.controllers.slider",[y(class extends d.Controller{constructor({component:S,dependencies:x=[],duration:C=7100,slideIndex:T=0,interval:M=null,sliderHandlerName:P=null}){super({component:S,dependencies:x,duration:C,slideIndex:T,interval:M,sliderHandlerName:P}),this.slideIndex=0,this.duration=7100,this.interval=null,this.sliderHandlerName="",this.component=S,this._componentRoot=S.shadowed?S.shadowRoot:S.body,this.sliderHandlerName="slider_"+this.component.__instanceID.toString(),l.set(this.sliderHandlerName,this)}stop(){this.interval!=null&&clearInterval(this.interval)}plusSlidesAndStop(S){this.stop(),this.plusSlides(S)}plusSlides(S){this.showSlides(this.slideIndex+=S)}currentSlide(S){this.stop(),this.showSlides(this.slideIndex=S)}automate(){this.interval=setInterval(()=>{this.plusSlides(1)},this.duration)}showSlides(S){let x=this._componentRoot?.subelements(".qcoSlides"),C=this._componentRoot?.subelements(".qcoSlider__dots--dot");S>x.length-1&&(this.slideIndex=0),S<0&&(this.slideIndex=0),x.filter((T,M)=>M!==this.slideIndex).map(T=>(0,d.New)((0,d.ClassFactory)("Fade"),{}).apply(T,1,0)),C.filter((T,M)=>M!==this.slideIndex).map(T=>T.classList.remove("active"));try{C[this.slideIndex].classList.add("active")}catch(T){d.logger.debug(`Something went wrong when trying to activate a slide: ${this.slideIndex} - ${T.message}`)}setTimeout(()=>{x.filter((T,M)=>M!==this.slideIndex).map(T=>(T.style.display="none",T.style.display));try{x[this.slideIndex].style.display="block",(0,d.New)((0,d.ClassFactory)("Fade"),{}).apply(x[this.slideIndex],0,1)}catch(T){d.logger.debug(`Something went wrong when trying to show a slide: ${this.slideIndex} - ${T.message}`)}},700)}fillDots(){(this._componentRoot?.subelements(".qcoSlides")).map((S,x)=>{let C=document.createElement("span"),T=``;return C.innerHTML=T,this._componentRoot?.subelements(".qcoSlider__dots")[0].append(C)})}done(){(this._componentRoot?.subelements(".qcoSlides")).filter((S,x)=>x!==this.slideIndex).map(S=>(S.style.display="none",S.style.display)),setTimeout(()=>{this.fillDots(),this.slideIndex=0,this.showSlides(this.slideIndex),this.automate()},3e3)}},"SliderController")])})(typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{})}),Rt=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e(),d=nt();(function(){"use strict";(0,f.Package)("org.qcobjects.controllers.form",[y(class extends f.Controller{getDefault(){return function(l,S,x){let C={name:"^[a-zA-Z]+(([',. -][a-zA-Z ])?[a-zA-Z]*)*$",email:"^([A-Za-z0-9]+)@([A-Za-z0-9]+).([A-Za-z0-9]+)$"},T=x.getAttribute("pattern")||C[l];return new RegExp(T).test(S)}}},"FormValidations"),y(class extends f.Controller{hasValidation(l){let S=l.getAttribute("data-field"),x=!1;return typeof this.validations<"u"&&Object.hasOwnProperty.call(this.validations,S)&&(x=!0),x}isInvalid(l){let S=!1,x=l.getAttribute("data-field"),C=this.component.data[x],T=y((M,P,F)=>typeof this.validations<"u"&&Object.hasOwnProperty.call(this.validations,M)&&this.validations[M].call(null,M,P,F),"_execValidation");return typeof this.validations<"u"&&!T(x,C,l)&&(S=!0),S}isValid(l){return!this.isInvalid(l)}save(){this.serviceClass!==""?(location.href=this.formSettings.loadingRouting,(0,f.serviceLoader)((0,f.New)((0,f.ClassFactory)(this.serviceClass),{data:this.component.data}),!1).then(l=>{console.log("DONE SERVICE COMPONENT");try{console.log(l.service.JSONresponse)}catch{}location.href=this.formSettings.nextRouting},l=>{f.logger.debug(l),location.href=this.formSettings.backRouting})):f.logger.debug("No service name declared on serviceClass property")}formSaveTouchHandler(){f.logger.debug("Saving data...");let l=this.component.shadowed?(this.component?.shadowRoot).host:this.component.body;if(this.component.executeBindings(),this.formValidatorModal!=null){let S=l.subelements("*[data-field]").filter(M=>this.hasValidation(M)),x=y(function(M,P){return y((F,oe)=>oe.getAttribute("aria-labelledby")!==null?(oe.getAttribute("aria-labelledby")||"").split(" ").map(ce=>F.subelements(`#${ce}`).map(V=>V.innerHTML)).join(" "):null,"_arialabelledby")(M,P)||P.getAttribute("aria-label")||P.getAttribute("placeholder")||P.getAttribute("name")||P.getAttribute("data-field")},"_labelledby"),C=y(function(M){return M.getAttribute("title")||M.getAttribute("aria-title")||""},"_ariatitle"),T=S.filter(M=>this.isInvalid(M));if(T.length>0){let M=` +
    + Please verify the following incorrect fields: +
      +
      + ${T.map(P=>"
    • "+x(l,P)+"
      "+C(P)+"
    • ").join("")} +
      +
    +
    +`;this.formValidatorModal.body.subelements(".validationMessage")[0].innerHTML=M,this.formValidatorModal.modal()}else this.save()}else f.logger.debug("Unable to find the modal validator..."),f.logger.debug("Saving data..."),this.save()}constructor(l){super(l),this.validations=[],this.serviceClass="",this.formSettings={backRouting:"#",loadingRouting:"#loading",nextRouting:"#signupsuccessful"},this.component=l.component,this.component=this.component.Cast(d.FormField)}done(){f.logger.debugEnabled=!0;try{this.component.createBindingEvents();let l=(0,f._DOMCreateElement)("div");l.className="modal_body",this.formValidatorModal=(0,f.New)(d.ModalComponent,{body:l,subcomponents:[],data:{content:'
    '}}),(0,f.Tag)(".modal_body").map(S=>document.body.removeChild(S)),document.body.append(this.formValidatorModal)}catch{f.logger.debug("Unable to create the modal")}this.onpress(".submit",()=>{this.formSaveTouchHandler()})}},"FormController")])})()}),lt=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.controllers.swagger",[y(class extends f.Controller{startSwaggerUI(){if(typeof SwaggerUIBundle<"u"){let d=SwaggerUIBundle({url:f.CONFIG.get("swagger-ui-url","https://petstore.swagger.io/v2/swagger.json"),dom_id:"#"+f.CONFIG.get("swagger-ui-dom_id","swagger-ui"),deepLinking:!0,presets:[SwaggerUIBundle.presets.apis,SwaggerUIStandalonePreset],plugins:[SwaggerUIBundle.plugins.DownloadUrl],layout:"StandaloneLayout"});window.ui=d}}done(){this.component.body.innerHTML='
    ';let d=f.CONFIG.get("swagger-ui-package-path","node_modules/swagger-ui-dist/");this.dependencies?.push((0,f.New)(f.SourceJS,{url:d+"swagger-ui-standalone-preset.js",external:f.CONFIG.get("swagger-ui-external",!1)})),this.dependencies?.push((0,f.New)(f.SourceCSS,{url:d+"swagger-ui.css",external:f.CONFIG.get("swagger-ui-external",!1)})),this.dependencies?.push((0,f.New)(f.SourceJS,{url:d+"swagger-ui-bundle.js",external:f.CONFIG.get("swagger-ui-external",!1),done:()=>{this.startSwaggerUI()}}))}},"SwaggerUIController")])})()}),Be=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.modal.controllers",[y(class extends f.Controller{done(){let d=this.component;d.body.innerHTML=d.body.innerHTML.replace("/{{content}}/g",d.submodal.template)}},"ModalController")])})()}),wt=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.views",[y(class extends f.View{},"GridView")])})()}),St=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){(0,f.Package)("org.qcobjects.tools.canvas",[y(class extends f.InheritClass{drawImageFilled(d,l,S=1,x=0,C=0){let T=Math.max(l.width/d.width,l.height/d.height);T=T*S;let M=l.width/2-d.width/2*T,P=l.height/2-d.height/2*T;l.getContext("2d")?.drawImage(d,x+M,C+P,d.width*T,d.height*T)}getImageResized(d,l,S,x,C=1,T=0,M=0){let P=document.createElement("canvas");return P.width=l,P.height=S,P.style.width=l.toString(),P.style.height=S.toString(),this.drawImageFilled(d,P,C,T,M),x.src=P.toDataURL("image/png"),P}},"CanvasTool")])})()}),Lt=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e(),d=tt();(function(){(0,f.Package)("org.qcobjects.tools.layouts",[y(class extends f.InheritClass{constructor({component:l=null,dependencies:S=[]}){super({component:l,dependencies:S}),this.dependencies=[]}load(){this.dependencies.push((0,f.New)(f.SourceCSS,{external:!f.CONFIG.get("useLocalSDK",!1),url:f.CONFIG.get("useLocalSDK",!1)?"css/basic-layout.css":f.CONFIG.get("remoteSDKPath",!1)+"css/basic-layout.css"}))}coloredBorder(){setTimeout(function(){(0,f.Tag)("nav").map(l=>{l.style.border="20px solid #3333"}),(0,f.Tag)("nav").map(l=>{l.style.backgroundColor="#129999"}),(0,f.Tag)("component>footer").map(l=>{l.style.background="#876"}),(0,f.Tag)("component>div").map(l=>{l.style.border="3px dashed #fff"}),(0,f.Tag)("component>section").map(l=>{l.style.border="3px solid #000"}),(0,f.Tag)("component>section").map(l=>{l.style.backgroundColor="#fffaaa"}),(0,f.Tag)("component>article").map(l=>{l.style.border="3px dotted #000"}),(0,f.Tag)("component>header").map(l=>{l.style.background="#789"}),(0,f.Tag)("component>footer").map(l=>{l.style.background="#876"}),(0,f.Tag)("component>article:nth-child(1)").map(l=>{l.style.border="1px solid #444"}),(0,f.Tag)("component>article:nth-child(1)").map(l=>{l.style.backgroundColor="#555aaa"}),(0,f.Tag)("component>article:nth-child(2)").map(l=>{l.style.backgroundColor="#aaa333"}),(0,f.Tag)("component>article:nth-child(3)").map(l=>{l.style.backgroundColor="#54da82"}),(0,f.Tag)("*").map(l=>{l.style.color="#fff"}),(0,f.Tag)("component>article").map(l=>d.Fade.apply(l,0,1)),(0,f.Tag)("component>footer").map(l=>d.Fade.apply(l,0,1)),(0,f.Tag)("component>header").map(l=>d.Fade.apply(l,0,1)),(0,f.Tag)("nav").map(l=>{l.style.display="block",l.style.width=l.offsetParent?.scrollWidth.toString()||l.clientWidth.toString(),d.MoveXInFromLeft.apply(l)}),(0,f.Tag)("component>article").map(l=>{l.style.display="block",l.style.height=l.offsetParent?.scrollHeight.toString()||l.clientHeight.toString(),d.MoveYInFromBottom.apply(l)}),(0,f.Tag)("component>article:nth-child(2)").map(l=>{l.style.display="block",l.style.width=l.offsetParent?.scrollWidth.toString()||l.clientWidth.toString(),d.MoveXInFromRight.apply(l)})},300)}},"BasicLayout")])})()}),ut=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.SessionUserToken=void 0;var d=_e(),l=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};(function(x){"use strict";class C extends d.InheritClass{constructor(M){super(M);let P=this;this.__cache__=new d.ComplexStorageCache({index:P.__instanceID.toString(),load(){let F;return typeof navigator<"u"&&typeof origin<"u"?F=d._Crypt.encrypt(`${navigator.userAgent}|${M.username}|${(+new Date).toString()}`,origin):F=d._Crypt.encrypt(`${M.username}|${(+new Date).toString()}`,d.CONFIG.get("domain","localhost")),C.user={priority:P.__instanceID.toString(),token:F},C.user},alternate(F){C.user=F?.cache.getCached(P.__instanceID.toString())}})}static generateIndex(M){return typeof Buffer<"u"?Buffer.from(M,"ascii").toString("base64"):btoa(M)}getGlobalUser(...M){let P=[M].join("|"),F="userToken_"+C.generateIndex(P);return(typeof x.get(F)>"u"||x.get(F)===null)&&x.set(F,(0,d.New)(C,{username:P})),C.user=x.get(F).user,x.get(F).user}getGlobalUserToken(...M){return this.getGlobalUser(M).token}getGlobalUserId(...M){return this.getGlobalUser(M).id}getGlobalUserPriority(...M){return this.getGlobalUser(M).priority}getLoginCredentialsToken(M,P){return d._Crypt.encrypt(`${M}${P}`,this.getGlobalUserToken(M))}closeGlobalSession(...M){this.getGlobalUser(M);let P=[M].join("|"),F="userToken_"+C.generateIndex(P);typeof x.get(F)<"u"&&(x.get(F).__cache__.clear(),x.set(F,null),C.user={})}}O(C,"r"),y(C,"SessionUserToken"),C.user={},(0,d.Package)("org.qcobjects.cloud.auth.session.usertoken",[C])})(l);var S=l.SessionUserToken;A.SessionUserToken=S}),$t=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e(),d=ut();(function(){"use strict";(0,f.Package)("org.qcobjects.cloud.auth.session.data",[y(class extends f.InheritClass{constructor(){super(...arguments),this.__session_container__=null}setSessionContainer(){this.__session_container__=[...arguments]}getSessionContainer(){if(typeof this.__session_container__>"u"||this.__session_container__===null)throw new Error("You need to set a session container first: sessionData.setSessionContainer(...arguments)");return this.__session_container__}getSessionData(...l){let S=sessionStorage.getItem(`${this.index(l)}`),x;return S!==null&&(x=JSON.parse(S)),(typeof x>"u"||x===null)&&(x={}),x}index(...l){if(typeof d.SessionUserToken>"u")throw new Error('You need to import SessionUserToken first: Import ("org.qcobjects.cloud.auth.session.usertoken")');return`session_${btoa(d.SessionUserToken.getGlobalUserToken(l))}`}save(...l){let S=(0,f._DataStringify)(this.sessionData);sessionStorage.setItem(`${this.index(l)}`,S)}get(l,S){let x=this.getSessionData(this.getSessionContainer());return typeof x[l]<"u"?x[l]:S}set(l,S){let x=this.getSessionContainer(),C=this.getSessionData(x);this.sessionData=C,this.sessionData[l]=S,this.save(x)}},"SessionData")])})()}),At=L((A,f)=>{Object.defineProperty(A,"__esModule",{value:!0});var d=_e(),l=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};y(O(function S(x){"use strict";if(typeof Object.defineProperty<"u"&&typeof x<"u")try{Object.defineProperty(x,"__qcobjects_sdk__",{enumerable:!0,configurable:!1,writable:!1,value:S})}catch{typeof x.__qcobjects_sdk__<"u"&&(x.__qcobjects_sdk__.__loaded__=!0)}if(typeof x.__qcobjects_sdk__.__loaded__>"u"){if(x.__qcobjects_sdk__.__loaded__=!0,typeof x>"u")throw Error("Top context empty: It should either global, module or window");let C=d.GlobalSettings.__start__.bind(x),T=[];T=[new Promise(M=>{He(),Ee(),nt(),Ve(),Nt(),it(),It(),bt(),Mt(),kt(),w(),ct(),Rt(),lt(),tt(),Be(),wt(),St(),Lt(),ut(),$t(),M()})],x._sdk_=Promise.all(T).then(()=>{d.CONFIG.set("useSDK",!0),C()})}},"w"),"__qcobjects_sdk__")(l),A.default=l});return At()})()});var Vt=Ht((zt,Xt)=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});var Yt=Bt();Xt.exports=Yt});var Zt=Ht((to,gt)=>{O(function Me(j){"use strict";if(typeof Object.defineProperty<"u"&&typeof j<"u")try{Object.defineProperty(j,"__qcobjects__",{enumerable:!0,configurable:!1,writable:!1,value:Me})}catch{typeof j.__qcobjects__<"u"&&(j.__qcobjects__.loaded=!0)}if(typeof j.__qcobjects__.loaded>"u"){let me=function(o){L?S.push(o.bind(window)):typeof y<"u"&&S.push(o.bind(y))};O(me,"Ready"),j.__qcobjects__.loaded=!0;var y=j;j.global=y;var _t=typeof window<"u"&&"Deno"in window,L=typeof window<"u"&&typeof window.self<"u"&&window===window.self&&!_t,U=typeof gt<"u",jt=O(function(){},"deno_require"),Ke=O(function(){return _t?jt(...arguments):at(...arguments)},"_require_"),ve=O(function(o){var r=typeof o.prototype<"u"?o.prototype.toString:function(){return""};typeof o.prototype<"u"&&(o.prototype.toString=function(){var t=["__qcobjects__","__qcobjects_sdk__","__loaded__","ComplexStorageCache","css","append","attachIn","debug","info","warn","QC_Append","set","get","done","componentDone","_new_","__new__","Class","ClassFactory","New","Export","Package","Import","subelements","componentLoader","buildComponents","Controller","View","VO","Service","serviceLoader","JSONService","ConfigService","SourceJS","SourceCSS","ArrayList","ArrayCollection","Effect","Timer","sum","avg","table","max","min","range","matrix","matrix2d","matrix3d","unique","uniqueId","shortCode","NamespaceRef"],a;return t.includes(this.name)?a=this.name+"{ [QCObjects native code] }":a=r.call(this),a})},"_protected_code_");ve(Function);var _e=O(function(o){var r=[];for(var t in o)(typeof o[t]).toLowerCase()==="function"&&r.push(o[t]);return r},"_methods_");String.prototype.__mAll__=function(o){var r=[];return this.replace(o,function(){var t=Array.prototype.slice.call(arguments,0,-2);t.input=arguments[arguments.length-1],t.index=arguments[arguments.length-2],r.push(t)}),r},typeof String.prototype.matchAll>"u"&&(String.prototype.matchAll=String.prototype.__mAll__);var He=O(function(o){var r;return L?r=document.createElement(o):r={},r},"_DOMCreateElement");if(!L){let o=Ke("fs")}var Ee=O(function(o){var r=O(function(){var t=new WeakSet,a=0;return function(u,h){if(typeof h=="object"&&h!==null){if(t.has(h))return a+=1,a<=3?A(h):null;t.add(h)}return h}},"getCircularReplacer");return JSON.stringify(o,r())},"_DataStringify");if(L){var tt=O(function(r){return[...this.querySelectorAll(r)]},"subelements");Element.prototype.subelements=tt,HTMLDocument.prototype.subelements=tt,HTMLElement.prototype.subelements=tt,typeof ShadowRoot<"u"&&(ShadowRoot.prototype.subelements=tt)}if(L)try{j=typeof window.top<"u"?window.top:window,j._allowed_=!0}catch{try{j=document,j._allowed_=!0}catch{try{j=y,j._allowed_=!0}catch{j={},j._allowed_=!0}}}else typeof y<"u"&&(j=y);var nt,Ve,Nt="quick-component:not([loaded]),component:not([loaded])";if(Ve=function(){var o="";if(L){var r=j.document.baseURI.split("?")[0].split("/");r.pop(),o=r.join("/")+"/"}else{var t;try{t=Ke("process")}catch{}typeof t<"u"?o=`${t.cwd()}/`:o=""}return o}(),L){"Promise"in j||(j.Promise=function(o){var r={then(){},catch(){},_then(t){this.then.call(r,t)},_catch(t){this.catch.call(r,t)}};return o.call(r,r._then,r._catch),r}),typeof j.console>"u"&&(j.console=function(){},j.console.prototype.log=function(o){}),nt=function(){return typeof document<"u"&&document.domain!==""?document.domain:"localhost"}();var it=function(){var o=j[(![]+[])[+!+[]+ +!+[]]+(typeof![])[+!+[]]+(typeof[])[(+!+[]+ +!+[])*(+!+[]+ +!+[])]+(![]+[])[+!+[]]+(!![]+[])[+[]]+([]+[]+[][[]])[+[+!+[]+[+[]]]/(+!+[]+ +!+[])]+(typeof![])[+!+[]]+([]+[]+[][[]])[+!+[]]]["h"+(typeof![])[+!+[]]+(![]+[])[+!+[]+(+!+[]+ +!+[])]+(!![]+[])[+[]]].toLowerCase();return o}(),It=function(){return typeof cordova<"u"}()}else{var it="secret";nt="localhost"}j._asyncLoad=[];var bt=O(function(o,r){var t={func:o,args:r,dispatch(){this.func.apply(null,this.args)}};return j._asyncLoad.push(t),t},"asyncLoad");if(L){var Mt=O(function(){document.readyState==="complete"&&j._asyncLoad.map(function(o){o.dispatch.call(o)})},"_fireAsyncLoad");document.onreadystatechange=Mt}else typeof j.global<"u"&&(j.global._fireAsyncLoad=function(){j._asyncLoad.map(function(o){o.dispatch.call(o)})});j.asyncLoad=bt;var kt=O(function(){return{debugEnabled:!0,infoEnabled:!0,warnEnabled:!0,debug(o){this.debugEnabled&&console.log("\x1B[35m%s\x1B[0m",`[DEBUG][${performance.now().toLocaleString()}] ${o}`)},info(o){var r;this.infoEnabled&&(L?r="\x1B[103m%s\x1B[0m":r="\x1B[33m%s\x1B[0m",console.info(r,`[INFO][${performance.now().toLocaleString()}] ${o}`))},warn(o){this.warnEnabled&&console.warn("\x1B[31m%s\x1B[0m",`[WARN][${performance.now().toLocaleString()}] ${o}`)}}},"Logger"),w=new kt;w.debugEnabled=!1,w.infoEnabled=!0,j.logger=w;var ct={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode(o){var r="",t,a,u,h,i,g,I,N=0;for(o=ct._utf8_encode(o);N>2,i=(t&3)<<4|a>>4,g=(a&15)<<2|u>>6,I=u&63,isNaN(a)?g=I=64:isNaN(u)&&(I=64),r=r+this._keyStr.charAt(h)+this._keyStr.charAt(i)+this._keyStr.charAt(g)+this._keyStr.charAt(I);return r},decode(o){var r="",t,a,u,h,i,g,I,N=0;for(o=o.replace(/[^A-Za-z0-9+/=]/g,"");N>4,a=(i&15)<<4|g>>2,u=(g&3)<<6|I,r=r+String.fromCharCode(t),g!==64&&(r=r+String.fromCharCode(a)),I!==64&&(r=r+String.fromCharCode(u));return r=ct._utf8_decode(r),r},_utf8_encode(o){o=o.replace(/rn/g,"n");for(var r="",t=0;t127&&a<2048?(r+=String.fromCharCode(a>>6|192),r+=String.fromCharCode(a&63|128)):(r+=String.fromCharCode(a>>12|224),r+=String.fromCharCode(a>>6&63|128),r+=String.fromCharCode(a&63|128))}return r},_utf8_decode(o){for(var r="",t=0,a=0,u=0,h=0,i;t191&&a<224?(h=o.charCodeAt(t+1),r+=String.fromCharCode((a&31)<<6|h&63),t+=2):(h=o.charCodeAt(t+1),i=o.charCodeAt(t+2),r+=String.fromCharCode((a&15)<<12|(h&63)<<6|i&63),t+=3);return r}},Rt=O(function(o,r){var t=O(function(a,u){var h=2e3,i=0,g=setInterval(function(){u.call()?(clearInterval(g),a.call(),w.debug("Ejecuting "+a.name+" after wait")):i"u")var lt={getItem(o){return Object.hasOwnProperty.call(this,o)?this[o]:null},setItem(o,r){this[o]=r},removeItem(o){delete this[o]}};var Be=O(function(o){var r,t,a;if(r=o.index,typeof r<"u"){t=o.load,a=o.alternate;var u=this.getID(r),h=lt.getItem(u);if(this.isEmpty(h)){var i=t.call(null,{cachedObjectID:u,cachedResponse:h,cache:this});this.save(r,i),w.debug("RESPONSE OF {{cachedObjectID}} CACHED".replace("{{cachedObjectID}}",u))}else{var g=a.call(null,{cachedObjectID:u,cachedResponse:h,cache:this});w.debug("RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED ".replace("{{cachedObjectID}}",u))}}else throw new Error("ComplexStorageCache: index is undefined");return this},"ComplexStorageCache");if(Be.prototype.getItem=function(o){var r=lt.getItem(o);return this.isEmpty(r)?null:JSON.parse(r)},Be.prototype.setItem=function(o,r){lt.setItem(o,Ee(r))},Be.prototype.isEmpty=function(o){var r=!1;switch(!0){case typeof o>"u":case(typeof o=="string"&&o===""):case(typeof o=="string"&&o==="undefined"):case(typeof o=="number"&&o===0):case o===null:r=!0;break;default:r=!1}return r},Be.prototype.getID=function(o){var r;return typeof o<"u"&&(r="cachedObject_"+ct.encode(Ee(o).replace(/\{|\}|,/g,"_"))),r},Be.prototype.save=function(o,r){var t=this.getID(o);w.debug("CACHING THE RESPONSE OF {{cachedObjectID}} ".replace("{{cachedObjectID}}",t)),this.setItem(t,r)},Be.prototype.getCached=function(o){var r=this.getID(o);return this.getItem(r)},Be.prototype.clear=function(){Object.keys(lt).filter(function(o){return o.startsWith("cachedObject_")}).map(function(o){lt.removeItem(o)})},L){var wt=!1;try{var St=Object.defineProperty({},"passive",{get(){return wt=!0,wt}});window.addEventListener("testPassive",null,St),window.removeEventListener("testPassive",null,St)}catch{}var Lt=O(function(){return wt?{passive:!0}:!1},"captureFalse")}L&&(Element.prototype.find=function(o){var r=[],t=document.subelements(o);return t.map(function(a,u){typeof t[u]<"u"&&t[u].parentNode.tagName===this.parentNode.tagName&&r.push(C(a,new Object))}),r});var ut,$t=function(){var o=Object.prototype.hasOwnProperty;return function(r){if(typeof r!="object")throw TypeError("Object prototype may only be an Object or null. The type is "+typeof r);var t=O(function(){},"QCObjects");t.prototype=r;var a=new t;if(arguments.length>1){var u=Object(arguments[1]);for(var h in u)o.call(u,h)&&(a[h]=u[h])}return a}}();typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:O(function(r,t){"use strict";if(r===null)throw new TypeError("Cannot convert undefined or null to object");for(var a=Object(r),u=1;u"u"&&(o.__definition={}),o.__definition.__classType=t,typeof r<"u"&&(o.__definition.__namespace=r),f[t]=o,j[t]=f[t],j[t]},"__register_class__"),V=O(function(o,r){return ce(o,r)},"RegisterClass");oe(V);var ue=O(function(){var o={},r,t,a;switch(arguments.length){case 0:return class{};case 1:r=arguments[0],t=O(class{},"type"),a={};break;case 2:r=arguments[0],t=O(class{},"type"),a=arguments[1];break;case 3:r=arguments[0],t=arguments[1],a=arguments[2];break;default:break}if(typeof t!="function")throw new Error("Class type must be a function or class");if(M.call(this,r))throw new Error(`${r} is not an allowed word in the name of a class`);return typeof t.__definition<"u"&&(a.__definition=Object.assign(A(t.__definition),t)),o[t.name]=t,typeof a>"u"||a===null?a={}:a=A(a),typeof a.__instanceID<"u"&&delete a.__instanceID,f[r]=class extends o[t.name]{constructor(){var h;arguments.length>0?h={...arguments[0]}:h={};super(h);W(this,"__classType",r);W(this,"__definition",{...a});let i=this;if(ut=typeof ut>"u"||ut===null?0:ut+1,i.__instanceID||Object.defineProperty(i,"__instanceID",{value:ut,writable:!1}),typeof i.__definition<"u"&&Object.keys(i.__definition).filter(function(g){return isNaN(g)&&!["name","__instanceID","__classType","__definition"].includes(g)}).forEach(function(g){typeof i.__definition[g]=="function"?i[g]=i.__definition[g].bind(i):i[g]=i.__definition[g]}),_e(f[i.__classType]).map(function(g){i[g.name]=g.bind(i)}),_e(i.__definition).map(function(g){i[g.name]=g.bind(i)}),i.body)if(typeof i.__definition>"u"||!Object.hasOwnProperty.call(i.__definition,"body")||typeof i.__definition.body>"u")try{L?i.body=He(i.__definition.__classType):i.body={}}catch{i.body={}}else Object.hasOwnProperty.call(i.__definition,"body")&&(i.body=i.__definition.body);try{if(typeof i.__new__=="function"?i.__new__.call(i,h):typeof super.__new__=="function"&&(i.__new__=super.__new__.bind(i),i.__new__.call(i,h)),typeof i=="object"&&Object.hasOwnProperty.call(i,"_new_")&&typeof i._new_.isCalled>"u")try{i._new_.call(i,h),i._new_.isCalled=!0}catch(g){w.warn(`${i.__classType}._new_() failed with error: ${g}`)}}catch(g){w.warn(g)}}static hierarchy(h){var i=O(function(N){return Object.hasOwnProperty.call(N,"__classType")?N.__classType:P.call(h,N)},"__classType"),g=O(N=>typeof N<"u"&&typeof N.__proto__<"u"&&N.__proto__!==null?(i(N)!==""?[i(N)]:[]).concat(g(N.__proto__)):[],"__hierarchy__proto__");(typeof h>"u"||h===null)&&(h=this);var I=[];return I.push(i(h)),I=I.concat(g(h.__proto__)),I}static getParentClass(){return Object.getPrototypeOf(this.prototype.constructor)}__new__(h){T(h,this)}_new_(){}getClass(){return Object.getPrototypeOf(this.constructor)}css(h){return typeof this.body<"u"&&this.body.style!=="undefined"&&(w.debug("body style"),this.body.style=C(h,this.body.style)),this.body.style}hierarchy(){var h=this;return this.getClass().hierarchy(h)}append(i){w.debug("append: start"),F(i,"Component")&&(w.debug("append: child is a Component"),w.debug(`appending the body of ${i.name}`));var i=arguments.length>0?arguments[0]:this.body;typeof this.body<"u"&&(w.debug("append element"),arguments.lenght>0?(w.debug("append to element"),this.body.append(i),typeof this.childs>"u"&&(this.childs=[]),this.childs.push(i)):L&&(w.debug("append to body"),document.body.append(i)))}attachIn(h){if(L)for(var i=document.subelements(h),g=0,I=i.length;g-1){var t=o.split(".").slice(0,o.split(".").length-1).join("."),a=o.split(".").slice(-1).join(""),u=z(t),h=typeof u<"u"?u.filter(i=>B(i)&&(i.__definition.__classType===a||typeof i=="function"&&!!i.name)).reverse():[];if(h.length>0)r=h[0];else throw Error(`Class ${o} not found.`)}else o!==null&&Object.hasOwnProperty.call(f,o)&&(r=f[o]);return r},"ClassFactory");L&&(Element.prototype.append=O(function(r){fe(r)||typeof r.body<"u"?this.appendChild(r.body):this.appendChild(r)},"QC_Append"),Element.prototype.render=O(function(r){var t=this,a=O(function(u,h){if(typeof document.implementation.createHTMLDocument<"u"){var i=document.implementation.createHTMLDocument("");i.innerHTML=h,i.body.subelements("*").map(function(g){return u.append(g)})}},"_appendVDOM");if(typeof this.innerHTML<"u")try{this.innerHTML+=r}catch{a(t,r)}else a(t,r)},"QC_Render"));var Oe=O(function(o,r,t){return R(o)[r]},"_super_");Oe.prototype.toString=function(){return"_super_(className,classMethodName,params) { [QCObjects native code] }"};var de=O(function(o,r){return r=arguments.length>1?r:{},typeof o>"u"?new Object:new o(r)},"New");de.prototype.toString=function(){return"New(QCObjectsClassName, args) { [QCObjects native code] }"};var K=O(function(o){return oe(o)},"Export");if(K.prototype.toString=function(){return"Export(function or symbol) { [QCObjects native code] }"},!L){var xe=O(function(o){let r=Ke("fs");var t=null;try{var a=[`${j.CONFIG.get("projectPath")}${j.CONFIG.get("relativeImportPath")}`,`${j.CONFIG.get("basePath")}${j.CONFIG.get("relativeImportPath")}`,`${j.CONFIG.get("projectPath")}`,`${j.CONFIG.get("basePath")}`,`${j.CONFIG.get("relativeImportPath")}`,`${process.cwd()}${j.CONFIG.get("relativeImportPath")}`,`${process.cwd()}/node_modules/`+o,`${process.cwd()}/node_modules`,`${process.cwd()}`,"node_modules","./",""].concat(gt.paths);a=a.filter(u=>r.existsSync(u+"/"+o)),a.length>0&&(t=a[0],w.info(o+" is Installed."))}catch(u){console.log(u)}return t},"findPackageNodePath");K(xe)}ue("_Crypt",Object,{last_string:"",last_key:"",construct:!1,_new_(o){var r=o.string,t=o.hasOwnProperty.call(o,"key")?o.key:null;this.__new__(o),t=t===null?this.__instanceID:t,this.last_key=t,this.last_string=r,this.construct=!0},_encrypt(){for(var o=this.string,r=this.key,t="",a,u,h=0;hr.list()[h]===u?null:u).filter(u=>u!==null).join("");return a},"shortCode"),v=$e;ue("InheritClass",class{},{});let G=class extends R("InheritClass"){constructor(){super(...arguments);W(this,"component",null);W(this,"__definition",{});W(this,"__classType","Processor");this.processors=G.processors,this.process=G.process.bind(this),this.processObject=G.processObject.bind(this),this.setProcessor=G.setProcessor.bind(this),this.execute=G.execute.bind(this)}static setProcessor(t){typeof t=="function"&&t.name!==""&&(this.processors[t.name]=t)}static execute(t,a,u){var h=typeof t<"u"&&t!==null?t.processorHandler:this;return h.processors[a].bind(h).apply(h,[t,...u.split(",")])}static process(t,a=null){var u=a!==null?a.processorHandler:de(G,{component:null});return typeof t=="string"&&Object.keys(u.processors).map(function(h){[...t.matchAll(new RegExp("\\$"+h+"\\((.*)\\).*","g"))].map(function(i){var g=`$${h}(${i[1]})`;t=t.replace(g,u.execute.bind(u).call(u,a,h,i[1]))})}),t}static processObject(t,a=null){var u=a===null?this:a.processorHandler;return typeof u>"u"&&(u=new G({component:a})),typeof t=="object"?Object.keys(t).map(function(h){typeof t[h]=="object"&&!t[h].hasOwnProperty.call(t[h],"call")?t[h]=u.processObject.bind(u)(t[h],a):typeof t[h]=="string"&&(t[h]=u.process.bind(u)(t[h],a))}):typeof t=="string"&&(t=u.process.bind(u)(t,a)),t}},X=G;O(X,"Processor"),W(X,"processors",{config(t,a){return j.CONFIG.get(a,"")},ENV(t,a){return typeof process<"u"?process.env[a]:""},global(t,a){return typeof y<"u"?y[a]:""}}),X.__definition={},X.__classType="Processor",V(X,"com.qcobjects"),oe(X);let Ze=class{static get instance(){if(this._instance===null){var r=new Ze;r._CONFIG={relativeImportPath:"",remoteImportsPath:"",remoteSDKPath:"https://sdk.qcobjects.dev/",asynchronousImportsLoad:!1,removePackageScriptAfterLoading:!0,componentsBasePath:"",delayForReady:0,preserveComponentBodyTag:!1,useConfigService:!1,routingWay:"hash",useSDK:!0,useLocalSDK:!1,basePath:Ve},r._CONFIG_ENC=null,this._instance=r}return this._instance}static set instance(r){this._instance=r}},pe=Ze;O(pe,"ConfigSettings"),W(pe,"_instance",null),W(pe,"_CONFIG_ENC",null),f.ConfigSettings=pe,ue("CONFIG",Object,{get _CONFIG_ENC(){return R("ConfigSettings").instance._CONFIG_ENC},get _CONFIG(){return R("ConfigSettings").instance._CONFIG},set(o,r){w.debug(`CONFIG.set ${o}: ${r}`),o==="basePath"&&(Ve=r);var t;try{t=function(a){a._CONFIG_ENC===null&&(a._CONFIG_ENC=R("_Crypt").encrypt(Ee({}),it));var u=a._CONFIG_ENC.valueOf(),h=a._CONFIG.valueOf();return T(h,Fe(u))}(R("ConfigSettings").instance)}catch(a){t={},console.error(a),w.debug("failed to encrypt config")}t[o]=r,R("ConfigSettings").instance._CONFIG_ENC=we(t),Object.hasOwnProperty.call(R("ConfigSettings").instance,"_CONFIG")&&Object.hasOwnProperty.call(R("ConfigSettings").instance._CONFIG,o)&&(R("ConfigSettings").instance._CONFIG[o]=r)},get(o,r){var t;try{var a=function(u){u._CONFIG_ENC===null&&(u._CONFIG_ENC=R("_Crypt").encrypt(Ee({}),it));var h=u._CONFIG_ENC.valueOf(),i=u._CONFIG.valueOf();return T(i,Fe(h))}(R("ConfigSettings").instance);typeof a[o]<"u"?t=a[o]:typeof r<"u"&&(t=r)}catch(u){console.error(u),w.debug("Something wrong when trying to get CONFIG values"),w.debug("No config value for: "+o),t=r}return X.processObject.call(X,t)}}),K(Rt),K(Oe),K(Be),K(R),K(He),K($e),K(P),K(F);var fe=O(function(o){return!!(typeof o=="object"&&Object.hasOwnProperty.call(o,"__classType")&&o.__instanceID&&Object.hasOwnProperty.call(o,"__definition")&&typeof o.__definition<"u")},"isQCObjects_Object"),B=O(function(o){return!!(typeof o=="function"&&!o.__instanceID&&o.__definition&&typeof o.__definition<"u"&&o.__definition.__classType)},"isQCObjects_Class"),z=O(function(o,r){return d.hasOwnProperty.call(d,o)&&typeof d[o]<"u"&&d[o].hasOwnProperty.call(d[o],"length")&&d[o].length>0&&typeof r<"u"&&r.hasOwnProperty.call(r,"length")&&r.length>0?(r.filter(function(t){return B(t)}).map(function(t){t.__definition.__namespace=o,t.__namespace=o}),d[o]=d[o].concat(r)):typeof r<"u"&&(typeof r=="object"&&r.hasOwnProperty.call(r,"length")?r.filter(function(t){return B(t)}).map(function(t){t.__definition.__namespace=o,t.__namespace=o}):B(r)&&(r.__definition.__namespace=o,r.__namespace=o),d[o]=r),Object.hasOwnProperty.call(d,o)&&d[o].map(function(t){ce(t,o)}),Object.hasOwnProperty.call(d,o)?d[o]:void 0},"Package");z.prototype.toString=function(){return"Package(namespace, classes) { [QCObjects native code] }"},z("com.qcobjects",[X]);var Ce=O(function(o){let t=z(o).filter(a=>B(a)).map(a=>({[a.__definition.__classType]:a})).reduce((a,u)=>Object.assign(a,u));return o.split(".").map(a=>({[a]:t})).reverse().reduce((a,u)=>(u[Object.keys(u)]=a,u))},"NamespaceRef"),qe=O(function(){var o,r=O(function(){},"ready"),t=!1;if(!(arguments.length<1)){arguments.length===1?o=arguments[0]:arguments.length===2?(o=arguments[0],r=arguments[1]):arguments.length>2&&(o=arguments[0],r=arguments[1],t=arguments[2],w.debug("[Import] Setting external="+t.toString()+" resource to import: "+o)),t?w.debug("[Import] Registering external resource to import: "+o):w.debug("[Import] Registering local resource to import: "+o);var a;return L?(a=new Promise(function(u,h){var i=O(function(){var N=!1,D=0;for(var H in d)D++;return D0?L?setTimeout(r.bind(window),j.CONFIG.get("delayForReady")):typeof y<"u"&&setTimeout(r.bind(y),j.CONFIG.get("delayForReady")):r.call(j)},"_Ready");L?(window.onload=ze,It&&document.addEventListener("deviceready",ze,Lt)):y.onload=ze;class J extends R("InheritClass"){constructor({instance:r,name:t,fget:a,fset:u,value:h}){super({instance:r,name:t,fget:a,fset:u,value:h}),this._new_({instance:r,name:t,fget:a,fset:u,value:h})}_new_({instance:r,name:g,fget:a,fset:u,value:h}){var i=this,g=typeof g>"u"?x(i):g;Object.defineProperty(r,g,{set(I){let N=I;w.debug("value changed "+g);var D;typeof u<"u"&&typeof u=="function"?D=u(N):D=N,r["_"+g]=D},get(){let I=r["_"+g];w.debug("returning value "+g);var N=O(function(H){return typeof H=="object"&&Object.hasOwnProperty.call(H,"value")?H.value:H},"is_ddo"),D;return typeof a<"u"&&typeof a=="function"?D=a(N(I)):D=N(I),D}})}}O(J,"DDO"),K(J);class Q{constructor({component:r,template:t}){W(this,"template","");W(this,"__definition",{});this.component=r,this.template=t}assign(r){var t=this;if(typeof t.component>"u")throw new Error("DefaultTemplateHandler.assign: component is undefined");if(typeof t.component.processorHandler>"u")throw new Error("DefaultTemplateHandler.assign: component.processorHandler is undefined");var a=t.component.processorHandler;a.component=t.component;var u=typeof t.template<"u"?t.template:"";typeof r=="object"?[...Object.keys(r)].map(function(h){var i=r[h];if(typeof i=="string"||typeof i=="number"||!isNaN(i))try{i=X.processObject.bind(a).call(a,i,t.component),u=u.replace(new RegExp(`{{${h}}}`,"g"),i)}catch(g){throw w.warn(`${t.component.name} could not parse processors.`),Error(`${t.component.name} could not parse processors. Reason: ${g.message}`)}}):w.debug(`${t.component.name}.data is not an object`);try{u=X.processObject.call(a,u,t.component)}catch(h){throw w.warn(`${t.component.name} could not parse processors.`),Error(`${t.component.name} could not parse processors. Reason: ${h.message}`)}return u}}O(Q,"DefaultTemplateHandler"),Q.__definition={},V(Q,"com.qcobjects");var yt=O(function(o,r){let t=o.path.replace(/{(.*?)}/g,"(?<$1>.*)");return{...[...r.matchAll(new RegExp(t,"g"))][0].groups}},"__routing_params__"),pt=O(function(o,r){return o.filter(function(t){var a=t.path.replace(/{(.*?)}/g,"(?<$1>.*)");return new RegExp(a,"g").test(r)}).reverse()},"__valid_routings__"),ot=O(function(o,r){return o.includes(r)},"__valid_routing_way__"),Pe=O(function(o,r){var t=o.getAttribute("shadowed")===null,a=o.getAttribute("template-source")===null,u=o.getAttribute("shadowed")==="true",h=o.getAttribute("cached")===null,i=o.getAttribute("cached")==="true",g=typeof j.CONFIG.get("tplextension")<"u"?j.CONFIG.get("tplextension"):"html";g=o.getAttribute("tplextension")!==null?o.getAttribute("tplextension"):g;var I=o.getAttribute("name"),N=o.getAttribute("componentClass")!==null?o.getAttribute("componentClass"):"Component";let D=j.CONFIG.get("preserveComponentBodyTag")?I!==null?"com.qcobjects.components."+I+".ComponentBody":"com.qcobjects.components.ComponentBody":N;I=I!==null?I:R(D)&&typeof R(D).name<"u"?R(D).name:"";var H=R(D),$=D!=="Component"&&typeof H<"u"&&typeof H.tplsource=="string"&&H.tplsource!=="",le=a&&$?H.tplsource:a?"default":o.getAttribute("template-source");w.debug(`template source for ${I} is ${le} `),w.debug(`type for ${I} is ${P(H)} `);var te;te=Qe({COMPONENTS_BASE_PATH:j.CONFIG.get("componentsBasePath"),COMPONENT_NAME:I,TPLEXTENSION:g,TPL_SOURCE:le}),j.CONFIG.get("preserveComponentBodyTag")&&z(I!==""?"com.qcobjects.components."+I:"com.qcobjects.components",[ue("ComponentBody",R("Component"),{name:I,tplsource:le,tplextension:g,reload:!0})]);var ee=O(function(){var ge=t?H&&H.shadowed||R("Component").shadowed:u,Se={__parent__:r,name:I,cached:h?R("Component").cached:i,shadowed:ge,tplextension:g,body:j.CONFIG.get("preserveComponentBodyTag")?He("componentBody"):o,templateURI:te,tplsource:le};(typeof I>"u"||I===""||I===null)&&delete Se.name,te===""&&delete Se.templateURI;var Ne=de(H,Se);return j.CONFIG.get("preserveComponentBodyTag")&&o.append(Ne),Ne},"__create_component_instance_"),be=ee.call(this);return be},"_buildComponentFromElement_"),Ie=O(function(o,r){var t=[];return L?t=o.map(function(a){return Pe(a,r)}):w.debug("[_buildComponentsFromElements_] not implemented for Non-Browser environments"),t},"_buildComponentsFromElements_");z("com.qcobjects",[O(class extends R("InheritClass"){constructor({__parent__:t,templateURI:a="",template:u,tplsource:h="default",tplextension:i,url:g="",name:I="",method:N="GET",data:D={},reload:H=!1,shadowed:$=!1,cached:le=!0,_body:te=He("div"),__promise__:ee=null,__shadowRoot:be,body:ge,shadowRoot:Se,splashScreenComponent:Ne,controller:We,view:st}){if(arguments.length<1)throw Error("No arguments in component. You must at least give one argument.");super({__parent__:t,templateURI:a,template:u,tplextension:i,tplsource:h,url:g,name:I,method:N,data:D,reload:H,shadowed:$,cached:le,_body:te,__promise__:ee,__shadowRoot:be,body:ge,shadowRoot:Se,splashScreenComponent:Ne,controller:We,view:st});W(this,"validRoutingWays",["pathname","hash","search"]);W(this,"basePath",Ve);W(this,"domain",nt);W(this,"templateHandler","DefaultTemplateHandler");W(this,"processorHandler",null);W(this,"routingWay",null);W(this,"routingNodes",[]);W(this,"routings",[]);W(this,"routingPath","");W(this,"routingPaths",[]);W(this,"_componentHelpers",[]);W(this,"subcomponents",[]);W(this,"splashScreenComponent");W(this,"controller");W(this,"view");W(this,"effect");W(this,"method","GET");W(this,"cached",!0);W(this,"__promise__",null);W(this,"__namespace");var ye=this;typeof ye.name>"u"&&w.warn("A name is not defined for "+P(ye)),ye.routingWay=j.CONFIG.get("routingWay"),ye.processorHandler=de(X,{component:ye}),ye.data=typeof ye.data>"u"||ye.data===null?{}:ye.data,ye.data=Object.assign(ye.data,ye.dataAttributes),ye.createServiceInstance().then(function(ke){typeof ye.__new__=="function"&&ye.__new__.call(ye,ye),ye._generateRoutingPaths(ye.body).then(function(){ye._reroute_().then(function(){return ye.rebuild().then(function(){w.info(`Component._new_ The component ${ye.name} was built successfully!`)}).catch(function(et){w.warn(`Component._new_ Something went wrong building the component ${ye.name}`),console.error(et)})})})})}set body(t){var a=this;a._body=t}get body(){var t=this;return t._body}set cacheIndex(t){w.debug("[cacheIndex] This property is readonly")}get cacheIndex(){var t=this,a=Ee(t.routingPath);return ct.encode(t.name+a)}set parsedAssignmentText(t){w.debug("[parsedAssignmentText] This property is readonly")}get parsedAssignmentText(){var t=this;if(t._parsedAssignmentText=t.parseTemplate(t.template),typeof t._parsedAssignmentText>"u")throw Error(`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);return t._parsedAssignmentText}set shadowRoot(t){var a=this;typeof a.__shadowRoot>"u"?a.__shadowRoot=t:w.debug("[shadowRoot] This property can only be assigned once!")}get shadowRoot(){var t=this;return t.__shadowRoot}set routingSelected(t){w.debug("[routingSelected] This is a read-only property of the component")}get routingSelected(){var t=this;return pt(t.routings,t.routingPath)}set routingParams(t){w.debug("[routingParams] This is a read-only property of the component")}get routingParams(){var t=this;return[{}].concat(t.routingSelected.map(function(a){return yt(a,t.routingPath)})).reduce(function(a,u,h){return Object.assign(a,u)})}createServiceInstance(){var t=this,a=t.body,u=this.data,h,i=t.getClass().__definition,g=L&&a.getAttribute("serviceClass")!==null?a.getAttribute("serviceClass"):null;return new Promise(function(I,N){var D=!!(Object.hasOwnProperty.call(a,"enableServiceClass")&&a.enableServiceClass||!Object.hasOwnProperty.call(a,"enableServiceClass")),H=!!(L&&a.getAttribute("response-to")!==null&&a.getAttribute("response-to")==="data"),$=!!(L&&a.getAttribute("response-to")!==null&&a.getAttribute("response-to")==="template");if(D&&g!==null&&(h=R(g)),!H&&i&&Object.hasOwnProperty.call(i,"responseTo")?H=i.responseTo==="data":!H&&Object.hasOwnProperty.call(R("Component"),"responseTo")&&(H=R("Component").responseTo==="data"),!$&&i&&Object.hasOwnProperty.call(i,"responseTo")?$=i.responseTo==="template":!$&&Object.hasOwnProperty.call(R("Component"),"responseTo")&&($=R("Component").responseTo==="template"),typeof h<"u"&&typeof D<"u"&&D===!0&&(H||$)){w.info("Loading service "+g);var le=de(h,{data:u});Je(le).then(function({request:te,service:ee}){var be;typeof ee.JSONresponse<"u"&&ee.JSONresponse!==null?be=ee.JSONresponse:be=ee.template,H&&(typeof u=="object"&&typeof be=="object"?u=Object.assign(u,be):u=be,t.data=u),t.serviceInstance=le,t.serviceData=u,$&&(t.template=be),I(be)},function(te){w.debug(`Service loading rejected for ${g} in ${t.name}`),N(te)}).catch(function(te){throw w.debug("Something went wroing while trying to load the service "+g),Error(`Error loading ${g} for ${t.name}. Detail: ${te}`)})}else I(null)})}_bindroute_(){var t=this;t._bindroute_.loaded?w.debug(`Routes already bound to popstate events for ${t.name}`):(L&&t.hostElements("a").map(function(a){return a.oldclick=a.onclick,a.onclick=function(u){var h=!0;j.global.get("routingPaths")||j.global.set("routingPaths",[]);var i=j.CONFIG.get("routingWay"),g=u.target[i];return j.global.get("routingPaths").includes(g)&&u.target[i]!==document.location[i]&&u.target.href!==document.location.href?(w.debug("A ROUTING WAS FOUND: "+g),window.history.pushState({href:u.target.href},u.target.href,u.target.href),R("Component").route(),h=!1):w.debug("NO ROUTING FOUND FOR: "+g),typeof u.target.oldclick<"u"&&typeof u.target.oldclick=="function"&&u.target.oldclick.call(u.target,u),h},null}),this._bindroute_.loaded=!0)}done(t){var a;if(typeof t<"u"){var{request:u,component:h}=t;a=Promise.resolve({request:u,component:h})}return a}createControllerInstance(){var t;if(L){if(typeof this.body>"u")throw new Error("The component has no body");var a=this.body.getAttribute("controllerClass");a||(a="Controller"),t=R(a),typeof t<"u"&&(this.controller=de(t,{component:this}))}return new Promise((u,h)=>{if(L&&typeof t<"u"&&typeof this.controller<"u"){if(typeof this.controller.done=="function")try{this.controller.done.call(this.controller)}catch(i){throw Error(i)}else w.debug(`${a} does not have a done() method.`),h(`${a} does not have a done() method.`);typeof this.controller.createRoutingController=="function"?this.controller.createRoutingController.call(this.controller):w.debug(`${a} does not have a createRoutingController() method.`)}u({component:this,controller:this.controller})})}createEffectInstance(){var t=this;return new Promise(function(a,u){if(L){var h=t.body.getAttribute("effectClass"),i=t.body.getAttribute("apply-effect-to");i=i!==null?i:"load",h!==null&&i==="observe"?t.applyObserveTransitionEffect(h):h!==null&&i==="load"&&t.applyTransitionEffect(h)}a({component:t,effect:t.effect})})}createViewInstance(){var t=this;return new Promise(function(a,u){var h=L?t.body.getAttribute("viewClass"):null;if(h!==null){var i=R(h);typeof i<"u"&&(t.view=de(i,{component:t}),Object.hasOwnProperty.call(t.view,"done")&&typeof t.view.done=="function"&&t.view.done.call(t.view))}a({component:t,view:t.view})})}__done__(){var t=this,a=O(function(){if(typeof t>"u")throw new Error("componentDone() has lost its context");if(typeof t.body>"u")throw new Error("The component has no body");t.createViewInstance(),t.createControllerInstance(),t.createEffectInstance(),w.debug(`Trying to run component helpers for ${t.name}...`);try{t.runComponentHelpers(),w.debug(`Component helpers for ${t.name} executed.`)}catch(u){throw w.debug(`Component helpers for ${t.name} could not be executed.`),Error(u)}t.subcomponents=t.__buildSubComponents__(),t._bindroute_(),L&&t.body.setAttribute("loaded",!0)},"componentDone");return new Promise(function(u,h){try{u(a.call(t))}catch(i){h(i)}})}hostElements(t){var a=this,u=[];return L&&(u=a.shadowed&&typeof a.shadowRoot<"u"?a.shadowRoot.subelements(t):a.body.subelements(t)),u}get subtags(){var t=this,a=Nt;return t.hostElements(a)}get bodyAttributes(){var t=this,a=t.body;return L?[...a.getAttributeNames()].map(u=>({[u]:a.getAttribute(u)})).reduce((u,h,i)=>Object.assign(u,h)):{}}get dataAttributes(){var t=this,a=t.body;return L?[{}].concat([...a.getAttributeNames()].filter(u=>u.startsWith("data-")).map(u=>({[u.split("-")[1]]:a.getAttribute(u)}))).reduce((u,h,i)=>Object.assign(u,h)):{}}__buildSubComponents__(t=!1){var a=this,u=a.subtags;return t||(u=u.filter(h=>h.getAttribute("loaded")!=="true")),(typeof a<"u"||a.subcomponents.length<1)&&(a.subcomponents=Ie(u,a)),a.subcomponents}fail(t){var a;if(typeof t<"u"){var{error:u,component:h}=t;a=Promise.resolve({error:u,component:h})}return a}set(t,a){this[t]=a}get(t){return this[t]}feedComponent(){var t=this;w.debug(`[Component][${this.name}][feedComponent] start feeding component...`);var a=O(function(i){if(typeof i.container>"u"&&typeof i.body>"u"){w.warn("COMPONENT {{NAME}} has an undefined container and body".replace("{{NAME}}",i.name));return}var g=typeof i.container>"u"||i.container===null?i.body:i.container,I=i.parsedAssignmentText;if(i.innerHTML=I,i.shadowed){w.debug("COMPONENT {{NAME}} is shadowed".replace("{{NAME}}",i.name)),w.debug("Preparing slots for Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",i.name));var N=He("div");g.subelements("[slot]").map(function($){$.parentElement===g&&N.appendChild($)}),w.debug("Creating shadowedContainer for COMPONENT {{NAME}}".replace("{{NAME}}",i.name));var D=He("div");D.classList.add("shadowHost");try{i.shadowRoot=D.attachShadow({mode:"open"})}catch{try{w.debug("Shadowed COMPONENT {{NAME}} is repeated".replace("{{NAME}}",i.name)),i.shadowRoot=D.shadowRoot}catch{w.warn("Shadowed COMPONENT {{NAME}} is not allowed on this browser".replace("{{NAME}}",i.name))}}if(typeof i.shadowRoot<"u"&&i.shadowRoot!==null){i.reload?(w.debug("FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",i.name)),D.shadowRoot.innerHTML=i.innerHTML):(N.innerHTML=i.parseTemplate(N.innerHTML),w.debug("ADDING Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",i.name)),D.shadowRoot.innerHTML+=i.innerHTML),w.debug("ADDING Slots to Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",i.name)),D.innerHTML+=N.innerHTML,w.debug("APPENDING Shadowed COMPONENT {{NAME}} to Container ".replace("{{NAME}}",i.name));var H=g.querySelector(".shadowHost");typeof H<"u"&&H!==null?(w.debug("Shadowed Container for COMPONENT {{NAME}} is already present in the tree ".replace("{{NAME}}",i.name)),i.shadowRoot.innerHTML=D.shadowRoot.innerHTML):g.appendChild(D)}else w.warn("Shadowed COMPONENT {{NAME}} is bad configured".replace("{{NAME}}",i.name))}else i.reload?(w.debug("FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}".replace("{{NAME}}",i.name)),g.innerHTML=i.innerHTML):g&&i?(w.debug("ADDING COMPONENT {{NAME}} ".replace("{{NAME}}",i.name)),g.innerHTML+=i.innerHTML):w.warn("COMPONENT {{NAME}} is not added to the DOM".replace("{{NAME}}",i.name))},"_feedComponent_InBrowser"),u=O(function(i){var g=i.parsedAssignmentText;i.innerHTML=g},"_feedComponent_InNode"),h;if(!F(t,"Component")){w.warn("Trying to feed a non component object");return}return L?h=a(t):h=u(t),h}rebuild(){var t=this,a=new Promise(function(u,h){if((typeof t>"u"||t===null)&&h("Component is undefined"),fe(t)&&F(t,"Component"))switch(!0){case t.get("tplsource")==="none":w.debug("Component "+t.name+" has specified template-source=none, so no template load was done");var i={request:null,component:t};t.__done__().then(function(){typeof t.done=="function"&&t.done.call(t,i),u.call(a,i)},function(){h.call(a,i)});break;case t.get("tplsource")==="inline":w.debug("Component "+t.name+" has specified template-source=inline, so it is assumed that template is already declared"),async function(g){g.feedComponent.bind(g)()}(t);var i={request:null,component:t};t.__done__().then(function(){typeof t.done=="function"&&t.done.call(t,i),u.call(a,i)},function(){h.call(a,i)});break;case(t.get("tplsource")==="default"&&t.get("templateURI")!==""):t.set("url",t.get("basePath")+t.get("templateURI")),Xe(t,!1).then(function(g){u.call(a,g)},function(g){h.call(a,g)});break;case(t.get("tplsource")==="external"&&t.get("templateURI")!==""):t.set("url",t.get("templateURI")),Xe(t,!1).then(function(g){u.call(a,g)},function(g){h.call(a,g)});break;case(t.get("tplsource")==="default"&&t.get("templateURI","")===""):w.debug(`Component ${t.name} template-source is ${t.get("tplsource")} and no templateURI is present`),h.call(a,`Component ${t.name} template-source is ${t.get("tplsource")} and no templateURI is present`);break;default:w.debug("Component "+t.name+" will not be rebuilt because no templateURI is present"),h.call(a,{request:null,component:t});break}});return a}Cast(t){let a=_e(t).map(u=>u.name.replace(/bound /g,"")).map(u=>({[u]:t[u].bind(this)})).reduce((u,h)=>Object.assign(u,h),{});return C(this,a)}static route(){var t=this,a,u=!!(fe(t)&&F(t,"Component")),h=O(function(i){var g=[],I=i.filter(function(N){return typeof N<"u"}).map(function(N){if(typeof N.name<"u")g.push(N.name);else throw new Error(P(N)+" does not have a name");return new Promise(function(D,H){var $;return typeof N<"u"&&N._reroute_?$=N._reroute_().then(function(){return N.reload=!0,N.rebuild()}).then(function(le){if(Object.hasOwnProperty.call(N,"subcomponents")&&typeof N.subcomponents<"u"&&N.subcomponents.length>0)return w.debug("LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: "+N.name),h.call(N,N.subcomponents);w.debug("No subcomponents to look for routings in: "+N.name),N.subtags.length>0&&(N.subcomponents=N.__buildSubComponents__(!0)),D(N)}):typeof N<"u"&&H("Component "+N.name+" is not an instance of Component"),$})});return Promise.all(I).then(function(){w.debug("ROUTING COMPLETED FOR "+g.join(", "))}).catch(function(N){w.warn("ROUTING FAILED FOR "+g.join(", ")+": "+N)})},"__route__");if(u||j.componentsStack)u&&w.debug("loading routings for instance "+t.name),a=h.call(t,u?t.subcomponents:j.componentsStack);else throw w.debug("An undetermined result expected if load routings. So will not be loaded this time."),Error("There is no valid instance and no components stack available to apply rountings");return a}fullscreen(){if(L){var t=this.body;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()}}closefullscreen(){L&&(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen())}_generateRoutingPaths(t){var a=this;return new Promise(function(u,h){L&&ot(a.validRoutingWays,a.routingWay)&&typeof t<"u"&&(a.innerHTML=t.innerHTML,a.routingNodes=t.subelements("routing"),a.routings=[],a.routingNodes.map(function(i,g){var I=i.getAttributeNames(),N={};I.map(function(D,H){N[I[H]]=i.getAttribute(I[H])}),a.routings.push(N),a.routingPaths||(a.routingPaths=[]),a.routingPaths.includes(N.path)||a.routingPaths.push(N.path),j.global.get("routingPaths")||j.global.set("routingPaths",[]),j.global.get("routingPaths").includes(N.path)||j.global.get("routingPaths").push(N.path)})),u()})}parseTemplate(t){var a=this,u,h=t;if(Object.hasOwnProperty.call(a,"templateHandler")){var i=a.templateHandler;w.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${i} ...`);var g=R(i),I=de(g,{component:a,template:h});I.component=a;var N=a.data;if(Object.hasOwnProperty.call(a,"assignRoutingParams")&&a.assignRoutingParams)try{N=Object.assign(N,a.routingParams)}catch{w.debug("[parseTemplate] it was not possible to assign the routing params to the template")}u=I.assign(N)}else w.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`),u=h;return u}_reroute_(){var t=this;return new Promise(function(a,u){L&&ot(t.validRoutingWays,t.routingWay)&&(t.routingPath=document.location[t.routingWay],t.routingSelected.map(function(h,i){var g=Qe({COMPONENTS_BASE_PATH:j.CONFIG.get("componentsBasePath"),COMPONENT_NAME:h.name.toString(),TPLEXTENSION:Object.hasOwnProperty.call(h,"tplextension")?h.tplextension:t.tplextension,TPL_SOURCE:"default"});t.templateURI=g}),t.routingSelected.length>0&&(t.template="",t.body.innerHTML="")),a(t)})}lazyLoadImages(){if(L){var t=this,a=t.shadowed?t.shadowRoot:t.body,u=[...a.subelements("img[lazy-src]")],h=O(function(g){g.setAttribute("src",g.getAttribute("lazy-src")),g.onload=()=>{g.removeAttribute("lazy-src")}},"_lazyLoadImages");if("IntersectionObserver"in window){var i=new IntersectionObserver((g,I)=>{g.forEach(N=>{N.isIntersecting&&(h(N.target),I.unobserve(N.target))})});u.map(function(g){return i.observe(g)})}else u.map(h)}return null}applyTransitionEffect(t){var a=R(t);if(typeof a>"u")throw Error(`${t} not found.`);typeof a<"u"&&F(a,"TransitionEffect")?(this.effect=de(a,{component:this}),this.effect.apply(this.effect.defaultParams)):w.debug(`${t} is ${P(a)} but is not a TransitionEffect`)}applyObserveTransitionEffect(t){if(L){var a=this,u=a.shadowed?a.shadowRoot.host:a.body,h=O(function(g){a.applyTransitionEffect(t)},"_applyEffect_");if("IntersectionObserver"in window){var i=new IntersectionObserver((g,I)=>{g.forEach(N=>{N.isIntersecting&&(h(N.target),I.unobserve(N.target))})});i.observe(u)}else h(u)}return null}scrollIntoHash(){if(L){var t=this;if(document.location.hash!==""){var a=t.shadowed?t.shadowRoot:t.body;a.subelements(document.location.hash).map(function(u){typeof u.scrollIntoView=="function"&&u.scrollIntoView(j.CONFIG.get("scrollIntoHash",{behavior:"auto",block:"top",inline:"top"}))})}}}i18n_translate(){if(L&&j.CONFIG.get("use_i18n")){var t=this,a=t.shadowed?t.shadowRoot:t.body,u=j.CONFIG.get("lang","en"),h=navigator.language.slice(0,2),i=j.global.get("i18n");if(u!==h&&typeof i=="object"&&Object.hasOwnProperty.call(i,"messages")){var g=O(function(){var I=this;return new Promise(function(N,D){var H=i.messages.filter(function($){return Object.hasOwnProperty.call($,u)&&Object.hasOwnProperty.call($,h)});a.subelements("ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component").map(function($){return H.map(function(le){var te=$.innerHTML;return te=te.replace(new RegExp(`${le[u]}`,"g"),le[h]),$.innerHTML=te,null}),$}),N()})},"callback_i18n");g.call(t).then(function(){w.debug("i18n loaded for component: "+t.name)})}}}addComponentHelper(t){var a=this;a._componentHelpers.push(t)}runComponentHelpers(){if(L){var t=this,a=[];a.push(t.i18n_translate.bind(t)),a.push(t.scrollIntoHash.bind(t)),a.push(t.lazyLoadImages.bind(t)),a=a.concat(t._componentHelpers),a.map(function(u){w.debug(`Executing ${u.name} as component helper for ${t.name}...`),u()})}}},"Component")]),_e(R("Component")).map(function(o){ve(o)}),L&&window.addEventListener("popstate",function(o){o.stopImmediatePropagation(),o.stopPropagation(),R("Component").route()}),z("com.qcobjects.controllers",[O(class extends R("InheritClass"){constructor({component:t,dependencies:a}){super({component:t,dependencies:a});W(this,"component",null);W(this,"dependencies",[]);if(this.component=t,this.dependencies=a,typeof this.component>"u"||this.component==="null")throw Error(`${P(this)} must be called with a component`)}routingSelectedAttr(t){return this.component.routingSelected.map(function(a){return a[t]}).filter(function(a){return a}).pop()}isTouchable(){return"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0}onpress(t,a){try{this.isTouchable()?this.component.body.subelements(t)[0].addEventListener("touchstart",a,{passive:!0}):this.component.body.subelements(t)[0].addEventListener("click",a,{passive:!0})}catch{w.debug("No button to assign press event")}}createRoutingController(){var t=this,a=t.component,u=t.routingSelectedAttr("controllerclass");if(typeof u<"u"){var h=R(u);typeof h<"u"&&(a.routingController=de(h,{component:a}),Object.hasOwnProperty.call(a.routingController,"done")&&typeof a.routingController.done=="function"&&a.routingController.done.call(a.routingController))}}done(){}},"Controller")]),z("com.qcobjects.views",[O(class extends R("InheritClass"){constructor({component:r=void 0,dependencies:t=[]}){if(super(...arguments),typeof this.component>"u"||this.component==="null")throw Error(`${P(this)} must be called with a component`)}},"View")]),z("com.qcobjects.api",[O(class extends R("InheritClass"){constructor(){super(...arguments);W(this,"kind","rest");W(this,"domain",nt);W(this,"basePath",Ve);W(this,"url","");W(this,"method","GET");W(this,"data",{});W(this,"reload",!1);W(this,"cached",!1)}set(t,a){this[t]=a}get(t){return this[t]}},"Service")]),z("com.qcobjects.api.services",[O(class extends R("Service"){constructor(){super(...arguments);W(this,"method","GET");W(this,"cached",!1);W(this,"headers",{"Content-Type":"application/json",charset:"utf-8"});W(this,"JSONresponse",null)}done(t){w.debug("***** RECEIVED RESPONSE:"),w.debug(t.service.template),this.JSONresponse=JSON.parse(t.service.template)}},"JSONService")]),z("com.qcobjects.api.config",[O(class extends R("JSONService"){constructor(){super(...arguments);W(this,"method","GET");W(this,"cached",!1);W(this,"configFileName","config.json");W(this,"headers",{"Content-Type":"application/json",charset:"utf-8"});W(this,"JSONresponse",null);this.set("url",this.get("basePath")+this.get("configFileName"))}done(t){w.debug("***** CONFIG LOADED:"),w.debug(t.service.template),this.JSONresponse=JSON.parse(t.service.template),Object.hasOwnProperty.call(this.JSONresponse,"__encoded__")&&(this.JSONresponse=JSON.parse(R("_Crypt").decrypt(this.JSONresponse.__encoded__,it)));for(var a in this.JSONresponse)j.CONFIG.set(a,this.JSONresponse[a]);this.configLoaded.call(this)}fail(t){this.configLoaded.call(this)}},"ConfigService")]),z("com.qcobjects.valueObjects",[O(class extends R("InheritClass"){constructor(){super(...arguments)}},"VO")]);var Qe=O(({TPL_SOURCE:o,COMPONENTS_BASE_PATH:r,COMPONENT_NAME:t,TPLEXTENSION:a})=>o==="default"?`${r}${t}.${a}`:"","ComponentURI"),Xe=O(function(o,r){var t,a=O(function(i,g){return t=new Promise(function(I,N){var D=i.__promise__,H=Object.hasOwnProperty.call(i,"container")&&typeof i.container<"u"&&i.container!==null?i.container:i.body;if(H!==null){var $=O(function(Ne){Ne.feedComponent();var We={request:ee,component:Ne};I.call(D,We)},"_feedComponent_");w.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",Ee(i.data)).replace("{{URL}}",i.url));var le=O(function(){var Ne=te?0:200;if(ee.status===Ne){var We=ee.responseText;w.debug("Data received {{DATA}}".replace("{{DATA}}",Ee(We))),w.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",i.name)),i.template=We,i.cached&&typeof Se<"u"&&Se.save(i.name,i.template),$.call(this,i)}else{var st={request:ee,component:i};N.call(D,st)}},"_componentLoaded");if(typeof i.template=="string"&&i.template!=="")$.call(this,i);else{var te=!!i.url.startsWith("file:"),ee=new XMLHttpRequest;if(te){if("fetch"in j){w.debug("I can use fetch..."),w.debug("It is a file to be loaded, so I will try to use fetch");var be=fetch(i.url).then(Ne=>{w.debug("I got a response from fetch, so I'll feed the component"),Ne.text().then(We=>{i.template=We,$.call(this,i)})})}}else try{w.debug("Calling the url of component in async mode."),ee.open(i.method,i.url,!0)}catch{w.debug("Last try has failed... The component cannot be loaded.")}!It&&!te&&ee.setRequestHeader("Content-Type","text/html"),te||(ee.onload=le);var ge=O(function(Ne){Ne=!(typeof Ne>"u"||!Ne),w.debug("SENDING THE NORMAL REQUEST "),Ne?"fetch"in j||(w.debug("I have to try to load the file using xhr... "),ee.send(null),ee.status===XMLHttpRequest.DONE&&le.call(this)):(w.debug("Trying to send the data to the component... "),ee.send(Ee(i.data)))},"_directLoad");if(i.cached&&!te){w.debug("USING CACHE FOR COMPONENT: "+i.name);var Se=new Be({index:i.cacheIndex,load(Ne){ge.call(this,te)},alternate(Ne){i.method==="GET"?(i.template=Ne.cache.getCached(i.cacheIndex),$.call(this,i)):ge.call(this,te)}});y.lastCache=Se}else w.debug("NOT USING CACHE FOR COMPONENT: "+i.name),ge.call(this,te)}}else w.debug("CONTAINER DOESNT EXIST")}),t.then(function(I){return i.__done__().then(function(){var N;return typeof i.done=="function"&&(N=i.done.call(i,I)),Promise.resolve(N)})},function(I){var N;return typeof i.fail=="function"&&(N=i.fail.call(i,I)),Promise.reject(N)}).catch(function(I){w.debug("Something wrong loading the component")}),t},"_componentLoaderInBrowser"),u=O(function(i,g){return t=new Promise(function(I,N){var D=t,H=O(function(ee){ee.feedComponent();var be={request:null,component:ee};I.call(D,be)},"_feedComponent_");w.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",Ee(i.data)).replace("{{URL}}",i.url));var $=O(function(ee,be){if(ee){var Se={request:null,component:i};N.call(D,Se)}else{var ge=be.toString();w.debug("Data received {{DATA}}".replace("{{DATA}}",Ee(ge))),w.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",i.name)),i.template=ge,i.cached&&typeof te<"u"&&te.save(i.name,i.template),H.call(this,i)}},"_componentLoaded");if(typeof i.template=="string"&&i.template!=="")H.call(this,i);else{w.debug("Loading the component as a local file in server...");var le=O(function(ee){let be=Ke("fs");w.debug("SENDING THE NORMAL REQUEST "),be.readFile(i.url,$)},"_directLoad");if(i.cached){w.debug("USING CACHE FOR COMPONENT: "+i.name);var te=new Be({index:i.cacheIndex,load(ee){le.call(this)},alternate(ee){i.method==="GET"?(i.template=ee.cache.getCached(i.cacheIndex),H.call(this,i)):le.call(this)}});y.lastCache=te}else w.debug("NOT USING CACHE FOR COMPONENT: "+i.name),le.call(this)}}),t.then(function(I){return i.__done__().then(function(){var N;return typeof i.done=="function"&&(N=i.done.call(i,I)),Promise.resolve(N)})},function(I){var N;return typeof i.fail=="function"&&(N=i.fail.call(i,I)),Promise.reject(N)}).catch(function(I){w.debug(`Something wrong loading the component: ${I}`)}),t},"_componentLoaderInNode"),h;return L?typeof r<"u"&&r?h=bt(a,arguments):h=a(o,r):h=u(o,r),h},"componentLoader"),Je=O(function(o,r){var t=O(function(g,I){var N=new Promise(function(D,H){w.debug("LOADING SERVICE DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",Ee(g.data)).replace("{{URL}}",g.url));var $=new XMLHttpRequest;$.withCredentials=g.withCredentials;var le=!0;$.open(g.method,g.url,le);for(var te in g.headers)try{typeof g.headers[te]!="function"&&$.setRequestHeader(te,g.headers[te])}catch{w.debug("Something went wrong when assign the header "+te)}$.onload=function(){if($.status===200){var ge=$.responseText;if(w.debug("Data received {{DATA}}".replace("{{DATA}}",Ee(ge))),w.debug("CREATING SERVICE {{NAME}}".replace("{{NAME}}",g.name)),g.template=ge,g.cached&&typeof be<"u"&&be.save(g.name,g.template),typeof g.done=="function"){var Se={request:$,service:g};g.done.call(g,Se),D.call(N,Se)}}else if(typeof g.fail=="function"){var Se={request:$,service:g};g.fail.call(g,Se),H.call(N,Se)}};var ee=O(function(){w.debug("SENDING THE NORMAL REQUEST ");try{$.send(Ee(g.data))}catch{w.debug("SOMETHING WRONG WITH REQUEST "),H.call(N,{request:$,service:g})}},"_directLoad");if(g.cached){var be=new Be({index:g.data,load(ge){ee.call(this)},alternate(ge){if(g.method==="GET"){if(g.template=ge.cache.getCached(g.name),typeof g.done=="function"){var Se={request:$,service:g};g.done.call(g,Se),D.call(N,Se)}}else ee.call(this)}});y.lastCache=be}else ee.call(this);return $});return N},"_serviceLoaderInBrowser"),a=O(function(g,I){var N=new Promise(function(D,H){if(typeof URL>"u"){y.URL=Ke("url").URL;let ke=y.URL}var $=new URL(g.url),le;g.useHTTP2=Object.hasOwnProperty.call(g,"useHTTP2")&&g.useHTTP2;var te=O(function(ke){w.debug("LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}".replace("{{DATA}}",Ee(g.data)).replace("{{URL}}",g.url));var et,vt={http2Client:ge,request:ke,service:g,responseHeaders:null};if(typeof g.data=="object"&&g.data!==null&&g.useHTTP2)try{w.debug("Sending data...");let Ge=new Buffer(Ee(g.data));ke.write(Ge)}catch{w.debug("It was not possible to send any data")}et="",ke.on("response",(Ge,mt)=>{w.debug("receiving response..."),vt.responseHeaders=Ge,et=""}),ke.on("data",Ge=>{w.debug("receiving data..."),et+=""+Ge.toString(),g.template=et}),g.useHTTP2&&ke.resume(),ke.on("end",()=>{w.debug("ending call..."),g.template=et,Object.hasOwnProperty.call(g,"useHTTP2")&&g.useHTTP2?ge.destroy():ke.destroy(),g.done.call(g,vt),D.call(N,vt)}),g.useHTTP2&&ke.end()},"captureEvents");try{var ee;if(g.useHTTP2){w.debug("using http2");var be=Ke("http2"),ge=be.connect($.origin);ee=Object.assign({":method":g.method,":path":$.pathname},g.options),ee=Object.assign(ee,g.headers),le=ge.request(ee),le.setEncoding("utf8"),te(le)}else if($.protocol==="http:"){var Se=Ke("http"),Ne=Se.request;ee=Object.assign({url:g.url,headers:g.headers},g.options);var le=Ne(g.url);te(le)}else if($.protocol==="https:"){var We=Ke("https");ee=Object.assign({hostname:$.hostname,port:$.port,path:$.pathname,method:g.method,headers:g.headers},g.options);var st=We.request(ee,function(ke){te(ke)});st.end()}else{var ye="Protocol not supported: "+$.protocol;throw w.debug(ye),new Error(ye)}}catch(ke){w.debug(ke),g.fail.call(g,ke),H.call(N,ke)}}).catch(function(D){console.log(D),w.debug("Something happened when trying to call the service: "+g.name),g.fail.call(g,D)});return N},"_serviceLoaderInNode"),u=O(function(g,I){var N=new Promise(function(D,H){w.debug(`Calling mockup service ${g.name} ...`);var $={request:null,service:g,responseHeaders:g.responseHeaders};typeof g.mockup=="function"?g.mockup.call(g,$):g.done.call(g,$),D.call(N,$)});return N},"_serviceLoaderMockup"),h=O(function(g,I){var N=new Promise(function(D,H){w.debug(`Calling local service ${g.name} ...`);var $={request:null,service:g,responseHeaders:g.responseHeaders};typeof g.local=="function"?g.local.call(g,$):g.done.call(g,$),D.call(N,$)});return N},"_serviceLoaderLocal"),i;switch(o.kind){case"rest":L?typeof r<"u"&&r?i=bt(t,arguments):i=t(o,r):i=a(o,r);break;case"mockup":i=u(o,r);break;case"local":i=h(o,r);break;default:w.debug(`The value of the kind property of the service ${o.name} is not valid`);break}return i},"serviceLoader");if(K(Je),K(Xe),K(Qe),K(x),K(Ee),K(B),K(fe),K(Ce),L){Element.prototype.buildComponents=function(o=!1){var r=Nt,t=this,a=t.subelements(r);return Ie(a,null)},HTMLDocument.prototype.buildComponents=Element.prototype.buildComponents,HTMLElement.prototype.buildComponents=Element.prototype.buildComponents;var Ye=O(class extends HTMLElement{constructor(){super(...arguments);let o=this,r=o.nodeName.toLowerCase(),t=He("quick-component"),a=o.getAttributeNames();t.setAttribute("name",r),o.hasAttribute("shadowed")||t.setAttribute("shadowed","true"),a.map(function(h){o.hasAttribute(h)&&(t.setAttribute(h,o.getAttribute(h)),o.removeAttribute(h))});var u=o.getAttributeNames().filter(function(h){return h.startsWith("data-")}).map(function(h){return h.split("-")[1]});u.map(function(h){t.setAttribute("data-"+h,o.getAttribute("data-"+h)),o.removeAttribute("data-"+h)}),[...o.children].map(function(h){t.appendChild(h.cloneNode(!0)),h.remove()}),o.append(t)}},"_ComponentWidget_");K(Ye);var Ue=O(function(o){customElements.define(o,class extends Ye{})},"RegisterWidget"),Ae=O(function(){var o=[...arguments];o.filter(function(r){return typeof r=="string"}).map(function(r){Ue(r)})},"RegisterWidgets");ve(Ue),ve(Ae),K(Ue),K(Ae)}L||z("com.qcobjects.api",[O(class extends R("InheritClass"){constructor({domain:r=nt,basePath:t=Ve,body:a=null,stream:u=null,request:h=null}){super(...arguments),w.debug("Initializing BackendMicroservice...");let i=this;typeof this.body>"u"&&(this.body=null),typeof a<"u"&&(this.body=a),this.cors(),i.stream=u,u.on("data",N=>{var D=h.method.toLowerCase(),H={post:i.post};Object.hasOwnProperty.call(H,D)&&H[D].call(i,N)});var g=h.method.toLowerCase(),I={get:i.get,head:i.head,put:i.put,delete:i.delete,connect:i.connect,options:i.options,trace:i.trace,patch:i.patch};Object.hasOwnProperty.call(I,g)&&I[g].call(i)}cors(){if(this.route.cors){w.debug("Validating CORS...");let{allow_origins:t,allow_credentials:a,allow_methods:u,allow_headers:h}=this.route.cors;var r=this;if(typeof r.headers!="object"&&(r.headers={}),typeof r.route.responseHeaders!="object"&&(r.route.responseHeaders={}),typeof t<"u")if(w.debug("CORS: allow_origins available. Validating origins..."),t==="*"||typeof r.request.headers.origin>"u"||[...t].indexOf(r.request.headers.origin)!==-1)w.debug("CORS: Adding header Access-Control-Allow-Origin=*"),r.route.responseHeaders["Access-Control-Allow-Origin"]="*";else{w.debug("CORS: Origin is not allowed: "+r.request.headers.origin),w.debug("CORS: Forcing to finish the response..."),this.body={};try{this.done()}catch(i){w.debug(`It was not possible to finish the call to the microservice: ${i}`)}}else w.debug("CORS: no allow_origins available. Allowing all origins..."),w.debug("CORS: Adding header Access-Control-Allow-Origin=*"),r.route.responseHeaders["Access-Control-Allow-Origin"]="*";typeof a<"u"?(w.debug(`CORS: allow_credentials present. Allowing ${a}...`),r.route.responseHeaders["Access-Control-Allow-Credentials"]=a.toString()):(w.debug("CORS: No allow_credentials present. Allowing all credentials."),r.route.responseHeaders["Access-Control-Allow-Credentials"]="true"),typeof u<"u"?(w.debug(`CORS: allow_methods present. Allowing ${u}...`),r.route.responseHeaders["Access-Control-Allow-Methods"]=[...u].join(",")):(w.debug("CORS: No allow_methods present. Allowing only GET, OPTIONS and POST"),r.route.responseHeaders["Access-Control-Allow-Methods"]="GET, OPTIONS, POST"),typeof h<"u"?(w.debug(`CORS: allow_headers present. Allowing ${h}...`),r.route.responseHeaders["Access-Control-Allow-Headers"]=[...h].join(",")):(w.debug("CORS: No allow_headers present. Allowing all headers..."),r.route.responseHeaders["Access-Control-Allow-Headers"]="*")}else w.debug("No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors")}head(r){this.done()}get(r){w.debug(`[BackendMicroservice.get] Data received: ${Ee(r)}`),this.done()}post(r){this.done()}put(r){this.done()}delete(r){this.done()}connect(r){this.done()}options(r){this.done()}trace(r){this.done()}patch(r){this.done()}finishWithBody(r){try{w.debug("[BackendMicroservice.finishWithBody] Ending the stream..."),w.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`),typeof this.body!="string"&&(this.body=Ee(this.body)),w.debug(`[BackendMicroservice.finishWithBody] + body: ${this.body} `),r.write(this.body),r.end(),w.debug("[BackendMicroservice.finishWithBody] Stream ended.")}catch(t){w.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${t}`)}}done(){w.debug("[BackendMicroservice.done] Finalizing the response...");var r=this,t=r.stream;try{if(w.debug("[BackendMicroservice.done] Sending response headers..."),r.route.responseHeaders)w.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(r.route.responseHeaders)}`),t.respond(r.route.responseHeaders);else throw Error("[BackendMicroservice.done] No headers present.")}catch(a){w.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${a}`)}if(r.body!==null)try{w.debug("[BackendMicroservice.done] A body of message is present. Finalizing the response..."),r.finishWithBody.call(r,t)}catch(a){w.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${a}`)}else w.debug("[BackendMicroservice.done] No body present. Ending stream..."),t.end()}},"BackendMicroservice")]),ue("SourceJS",Object,{domain:nt,basePath:Ve,body:He("script"),type:"text/javascript",containerTag:"body",url:"",data:{},async:!1,external:!1,set(o,r){this[o]=r},get(o){return this[o]},status:!1,done(){},fail(){},rebuild(){var o=this;try{document.getElementsByTagName(o.containerTag)[0].appendChild(function(r,t,a){return r.type=a.type,r.src=t,r.crossOrigin=Object.hasOwnProperty.call(a,"crossOrigin")?a.crossOrigin:"anonymous",r.async=a.async,r.onreadystatechange=function(){this.readyState==="complete"&&a.done.call(a)},r.onload=function(u){a.status=!0,a.done.call(a,u)},r.onerror=function(u){a.status=!1,a.fail.call(a,u)},a.body=r,r}.call(this,He("script"),this.external?this.url:this.basePath+this.url,o))}catch(r){o.status=!1,o.fail.call(o,r)}},Cast(o){return C(this,o)},_new_(o){this.__new__(o),this.rebuild()}}),ue("SourceCSS",Object,{domain:nt,basePath:Ve,body:He("link"),url:"",data:{},async:!1,external:!1,set(o,r){this[o]=r},get(o){return this[o]},done(){},rebuild(){var o=this;L&&window.document.getElementsByTagName("head")[0].appendChild(function(r,t,a){return r.type="text/css",r.rel="stylesheet",r.href=t,r.crossOrigin="anonymous",r.onreadystatechange=function(){this.readyState==="complete"&&a.done.call(a)},r.onload=a.done,a.body=r,r}.call(this,He("link"),this.external?this.url:this.basePath+this.url,o))},Cast(o){return C(this,o)},_new_(o){this.__new__(o),this.rebuild()}});var Y=O(function(o){return isNaN(o)?new Number(0):new Number(o)},"__to_number");Array.prototype.unique=function(){return this.filter(function(o,r,t){return t.indexOf(o)===r})},Array.unique=function(o){return o.unique()},ve(Array.unique),ve(Array.prototype.unique),Array.prototype.table=function(){console.table(this)},Array.table=function(o){return o.table()},ve(Array.table),ve(Array.prototype.table),Array.prototype.sum=function(){return this.reduce(function(o,r){return Y(o)+Y(r)},0)},Array.sum=function(o){return o.sum()},ve(Array.sum),ve(Array.prototype.sum),Array.prototype.avg=function(){return this.length<1?0:this.reduce(function(o,r){return(Y(o)+Y(r))/2})},Array.avg=function(o){return o.avg()},ve(Array.avg),ve(Array.prototype.avg),Array.prototype.min=function(){return this.reduce(function(o,r){return Y(o)<=Y(r)?o:r},1/0)},Array.min=function(o){return o.min()},ve(Array.min),ve(Array.prototype.min),Array.prototype.max=function(){return this.reduce(function(o,r){return Y(o)>=Y(r)?o:r},0)},Array.max=function(o){return o.max()},ve(Array.max),ve(Array.prototype.max),Array.prototype.sortBy=function(o,r=!0){var t=r?function(a,u){return u[o]a[o]?1:-1};return this.sort(t)},Array.sortBy=function(o,r,t=!0){return o.sortBy(r,t)},ve(Array.sortBy),ve(Array.prototype.sortBy),Array.matrix=function(o,r=0){var t=O(function(a){return r},"x_func");return Array.from({length:o},t)},ve(Array.matrix),Array.matrix2d=function(o,r=0){var t=O(function(u){return r},"y_func"),a=O(function(u){return Array.from({length:o},t)},"x_func");return Array.from({length:o},a)},ve(Array.matrix2d),Array.matrix3d=function(o,r=0){var t=O(function(u){return Array.from({length:o},function(){return r})},"y_func"),a=O(function(u){return Array.from({length:o},t)},"x_func");return Array.from({length:o},a)},ve(Array.matrix3d),j.range=function(o,r=0,t=1){return(r===0||typeof r>"u")&&(r=o,o=0),Array.from({length:(r-o)/t+1},function(a,u){return o+u*t})},ve(j.range),String.prototype.list=function(){var o=this;return j.range(0,o.length-1).map(function(r){return o[r]})},ve(String.prototype.list),j.getDocumentLayout=function(){var o=O((a,u)=>a>u?"landscape":null,"h"),r=O((a,u)=>u>a?"portrait":null,"v"),t=O((a,u)=>a===u?"square":null,"square");return[o(document.documentElement.clientWidth,document.documentElement.clientHeight),r(document.documentElement.clientWidth,document.documentElement.clientHeight),t(document.documentElement.clientWidth,document.documentElement.clientHeight)].filter(a=>a!==null).pop()},ue("ArrayList",Array,[]),R("ArrayList").matrix=Array.matrix,R("ArrayList").matrix2d=Array.matrix2d,R("ArrayList").matrix3d=Array.matrix3d,ve(R("ArrayList").matrix),ve(R("ArrayList").matrix2d),ve(R("ArrayList").matrix3d),ue("ArrayCollection",Object,{source:de(R("ArrayList"),[]),changed(o,r){w.debug("VALUE CHANGED"),w.debug(o),w.debug(r)},push(o){var r=this;w.debug("VALUE ADDED"),w.debug(o),r.source.push(o)},pop(o){var r=this;w.debug("VALUE POPPED"),w.debug(o),r.source.pop(o)},_new_(o){var r=this,t=0;r.source=de(R("ArrayList"),o);for(var a in r.source)isNaN(a)||(w.debug("binding "+a.toString()),function(u){Object.defineProperty(r,u,{set(h){w.debug("setting "+u+"="+h),r.source[u]=h,r.changed(u,h)},get(){return r.source[u]}})}(a),t++);r.source.length=t,Object.defineProperty(r,"length",{get(){return r.source.length}})}}),z("com.qcobjects.effects.base",[O(class extends R("InheritClass"){constructor(){super(...arguments);W(this,"duration",1e3)}animate({timing:t,draw:a,duration:u}){let h=performance.now();requestAnimationFrame(O(function i(g){let I=(g-h)/u;I>1&&(I=1);let N=t(I);a(Math.round(N*100)),I<1?requestAnimationFrame(i):typeof this<"u"&&this!==null&&Object.hasOwnProperty.call(this,"done")&&(typeof this.done).toLowerCase()==="function"&&this.done.call(this)},"animate"))}},"Effect")]),z("com.qcobjects.effects.transitions.base",[O(class extends R("Effect"){constructor(){super(...arguments);W(this,"duration",385);W(this,"defaultParams",{alphaFrom:0,alphaTo:1,angleFrom:180,angleTo:0,radiusFrom:0,radiusTo:30,scaleFrom:0,scaleTo:1});W(this,"fitToHeight",!1);W(this,"fitToWidth",!1);W(this,"effects",[]);w.info("DECLARING TransitionEffect "),this.component.defaultParams=this.defaultParams}apply({alphaFrom:t,alphaTo:a,angleFrom:u,angleTo:h,radiusFrom:i,radiusTo:g,scaleFrom:I,scaleTo:N}){var D=this;w.info("EXECUTING TransitionEffect ");var H=D.component.shadowed?D.component.shadowRoot.host:D.component.body;D.fitToHeight&&(H.height=typeof H.offsetParent=="object"&&H.offsetParent!==null?H.offsetParent.scrollHeight:H.getBoundingClientRect().height),D.fitToWidth&&(H.width=typeof H.offsetParent=="object"&&H.offsetParent!==null?H.offsetParent.scrollWidth:H.getBoundingClientRect().width),H.style.display="block",D.effects.map(function($,le){var te=R($),ee=new te({}),be=ee.apply,ge=[H].concat(Object.values({alphaFrom:t,alphaTo:a,angleFrom:u,angleTo:h,radiusFrom:i,radiusTo:g,scaleFrom:I,scaleTo:N}));be.apply(D,ge)})}},"TransitionEffect")]),z("com.qcobjects.timing",[O(class extends R("InheritClass"){constructor(){super(...arguments);W(this,"duration",1e3);W(this,"alive",!0)}thread({timing:t,intervalInterceptor:a,duration:u}){var h=this;let i=performance.now();requestAnimationFrame(O(function g(I){let N=I-i,D=N/u;D>1&&(D=1);let H=t(D,N);a(Math.round(H*100)),(D<1||u===-1)&&h.alive&&requestAnimationFrame(g)},"thread"))}},"Timer")]),z("com.qcobjects.tools.essentials",[O(class extends R("InheritClass"){constructor(){super(...arguments);W(this,"_toggle",!1);W(this,"_inverse",!0);W(this,"_positive",null);W(this,"_negative",null);W(this,"_dispatched",null);W(this,"_args",{});this._new_(...arguments)}changeToggle(){this._toggle=!this._toggle}_new_({positive:t,negative:a,args:u}){this._positive=t,this._negative=a,this._args=u}fire(){var t=this,a=new Promise(function(u,h){typeof t._positive=="function"&&typeof t._negative=="function"?(t._inverse?t._dispatched=t._toggle?t._negative.bind(t):t._positive.bind(t):t._dispatched=t._toggle?t._positive.bind(t):t._negative.bind(t),t._dispatched.call(t,t._args),u.call(a,t)):(w.debug("Toggle functions are not declared"),h.call(a,t))}).then(function(u){u.changeToggle()}).catch(function(u){w.debug(u.toString())});return a}},"Toggle")]),function(o){let r=O(function(i,g,I){var N=this;if(typeof i>"u"||i===null)throw Error(`mapper.${g}.${I} does not have a component instance or it is null.`);let D=o.global.get(I),H=i.get(I),$=i.data[I],le=typeof $<"u"?$:typeof H<"u"?H:D,te="";return typeof le<"u"&&typeof le.map<"u"?te=le.map(function(ee){let be=[...Object.keys(ee)].map(ge=>` data-${ge}="${typeof ee[ge]<"u"&&ee[ge]!==null?ee[ge].toString():""}"`).join("");return``}).join(""):w.debug(`${g}.${I} does not have a map property`),te},"mapper");X.setProcessor(r);let t=O(function(i,g,I){var N=` + /* CSS Document for Mobile Imports */ + @import url("${I}") (orientation:portrait); + @import url("${I}") (max-width:460px); + @import url("${I}") (aspect-ratio: 9/16); + @import url("${I}") (aspect-ratio: 10/16); + @import url("${I}") (aspect-ratio: 5/8); + @import url("${I}") (aspect-ratio: 3/4); + @import url("${I}") (aspect-ratio: 2/3); + `,D=` + @import url("${I}") (orientation:landscape) and (min-width:460px); + @import url("${I}") (aspect-ratio: 16/9) and (min-width:460px); + @import url("${I}") (aspect-ratio: 16/10) and (min-width:460px); + @import url("${I}") (aspect-ratio: 8/5) and (min-width:460px); + @import url("${I}") (aspect-ratio: 4/3) and (min-width:460px); + @import url("${I}") (aspect-ratio: 3/2) and (min-width:460px); + `,H={landscape:D,portrait:N};return Object.hasOwnProperty.call(H,g)?H[g]:""},"layout");X.setProcessor(t);let a=O(function(){let i=[...arguments].slice(1).map(function(I){return{[I.split("=")[0]]:I.split("=")[1]}}).reduce(function(I,N){return Object.assign(I,N)});return``},"component");X.setProcessor(a);let u=O(function(){let i=[...arguments].slice(1).map(function(I){return{[I.split("=")[0]]:I.split("=")[1]}}).reduce(function(I,N){return Object.assign(I,N)});return``},"quick_component");X.setProcessor(u);let h=O(function(i,g,I){return o.range(g).map(function(N){return I.replace("{{index}}",N.toString())}).join("")},"repeat");X.setProcessor(h)}(j),me(function(){j.CONFIG.get("useSDK")||j.__start__()}),K(K),K(qe),K(z),K(ue),K(de),K(dt),K(me),K(ht),K(L),K(_e),function(o){z("com.qcobjects",[O(class Pt extends R("InheritClass"){constructor(){super(...arguments);W(this,"_GLOBAL",{});W(this,"__definition",{});W(this,"__classType","GlobalSettings");this.set=Pt.set.bind(this),this.get=Pt.get.bind(this),this.__start__=Pt.__start__.bind(this)}static set(a,u){this._GLOBAL[a]=u}static get(a,u){var h;return typeof this._GLOBAL[a]<"u"?h=this._GLOBAL[a]:typeof u<"u"&&(h=u),h}static __start__(){var a=O(function(){var h;return L&&(h=new Promise(function(i,g){"serviceWorker"in navigator&&typeof o.CONFIG.get("serviceWorkerURI")<"u"&&(o.CONFIG.set("serviceWorkerScope",o.CONFIG.get("serviceWorkerScope")?o.CONFIG.get("serviceWorkerScope"):"/"),navigator.serviceWorker.register(o.CONFIG.get("serviceWorkerURI"),{scope:o.CONFIG.get("serviceWorkerScope")}).then(function(I){w.debug("Service Worker Registered"),i.call(h,I)},function(I){w.debug("Error registering Service Worker"),g.call(h,I)}),navigator.serviceWorker.ready.then(function(I){w.debug("Service Worker Ready"),i.call(h,I)},function(I){w.debug("Error loading Service Worker"),g.call(h,I)}))})),h},"__load__serviceWorker"),u=O(function(){return new Promise((h,i)=>{if(L){w.debug("Starting to building components");try{o.componentsStack=document.buildComponents.call(document)}catch(g){throw Error(`Something went wrong trying to start components tree: ${g.message}`)}w.debug("Initializing the service worker"),a.call(o).catch(function(g){w.debug(`error loading the service worker ${g}`)})}h()})},"_buildComponents");w.debug("Starting to load the config settings..."),o.CONFIG.get("useConfigService",!1)?(w.debug("Loading settings using local configuration file..."),o.global.configService=de(R("ConfigService")),o.global.configService.configLoaded=u,Je(o.global.configService)):(w.debug("Starting to load the components..."),u.call(this))}},"GlobalSettings")]),K(R("GlobalSettings")),y=de(R("GlobalSettings")),o=T(y,o),Object.defineProperty(o,"PackagesNameList",{set(r){w.debug("PackagesNameList is readonly")},get(){var r=O(function(t){var a=[];for(var u in t)typeof t[u]<"u"&&typeof t[u]!="function"&&Object.hasOwnProperty.call(t[u],"length")&&t[u].length>0&&(a.push(u),a=a.concat(r(t[u])));return a},"_get_packages_names");return r(d)}}),Object.defineProperty(o,"PackagesList",{set(r){w.debug("PackagesList is readonly")},get(){return o.PackagesNameList.map(function(r){let t=z(r),a;return t&&(a={packageName:r,classesList:t.filter(function(u){return B(u)})}),a}).filter(function(r){return typeof r<"u"})}}),Object.defineProperty(o,"ClassesList",{set(r){w.debug("ClassesList is readonly")},get(){var r=[];return o.PackagesList.map(function(t){return r=r.concat(t.classesList.map(function(a){return{packageName:t.packageName,className:t.packageName+"."+a.__definition.__classType,classFactory:a}})),t}),r}}),Object.defineProperty(o,"ClassesNameList",{set(r){w.debug("ClassesNameList is readonly")},get(){return o.ClassesList.map(function(r){return r.className})}}),L&&(ue("GLOBAL",f.global),K(R("GLOBAL"))),K(y),o.CONFIG.get("useSDK")&&function(r){var t=r.CONFIG.get("remoteImportsPath"),a=!r.CONFIG.get("useLocalSDK");r.CONFIG.set("remoteImportsPath",r.CONFIG.get("remoteSDKPath"));var u=!1,h="QCObjects-SDK";if(L)u=!0;else{var i=xe("qcobjects-sdk");i!==null?(h="qcobjects-sdk",u=!0):(h="node_modules/qcobjects-sdk/QCObjects-SDK",u=!0)}if(u)if(w.info("Importing SDK... "+h),U&&typeof at<"u"){let g=Vt()}else qe(h,function(){a?w.debug("QCObjects-SDK.js loaded from remote location"):w.debug("QCObjects-SDK.js loaded from local"),r.CONFIG.set("remoteImportsPath",t)},a);else w.debug("SDK has not been imported as it is not available at the moment")}(o)}(j),L&&bt(function(){me(function(){(function(o){let r=0,t=!1,a=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),u=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth);function h(i){var g=Math.round(o.scrollY*100/a),I=Math.round(o.scrollX*100/u),N=new CustomEvent("scrollpercent",{detail:{percentX:I,percentY:g}});i.target.dispatchEvent(N);var D="defaultscroll",H=[0,5,10,25,50,75,90,95,100];H.filter(function($){return $===g}).map(function($){D="percentY"+g.toString();var le=new CustomEvent(D,{detail:{percentX:I,percentY:g}});i.target.dispatchEvent(le)})}O(h,"scrollDispatcher"),document.addEventListener("scroll",function(i){t||(requestAnimationFrame(function(){h(i),t=!1}),t=!0)})})(j)})},null),L||(typeof j.global<"u"&&Object.hasOwnProperty.call(j.global,"_fireAsyncLoad")&&j.global._fireAsyncLoad.call(this),typeof j.global<"u"&&Object.hasOwnProperty.call(j.global,"onload")&&j.global.onload.call(this)),function(o){var r=O(function(){Object.freeze(Object.prototype),Object.freeze(Object)},"__freeze__");o&&j.CONFIG.get("secureObjects",!1)?me(function(){r()}):j.CONFIG.get("secureObjects",!1)&&r()}(L)}gt.exports=j},"__qcobjects__").call(null,typeof gt=="object"&&typeof gt.exports=="object"?gt.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}:typeof global=="object"?global:typeof window=="object"?window:{})});export{Ht as a,Zt as b}; +//# sourceMappingURL=chunk-TBLBK5VV.js.map diff --git a/browser/chunks/chunk-TBLBK5VV.js.map b/browser/chunks/chunk-TBLBK5VV.js.map new file mode 100644 index 00000000..3c8d343f --- /dev/null +++ b/browser/chunks/chunk-TBLBK5VV.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../node_modules/qcobjects-sdk/node_modules/qcobjects-sdk/src/QCObjects-SDK.js", "../../node_modules/qcobjects-sdk/node_modules/qcobjects-sdk/src/index.cjs", "../../node_modules/qcobjects-sdk/node_modules/qcobjects/src/QCObjects.js", "../../node_modules/qcobjects-sdk/node_modules/qcobjects/src/index.cjs", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.i18n_messages.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.models.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.effects.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.components.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.components.grid.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.components.list.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.components.slider.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.components.notifications.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.components.splashscreen.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.controllers.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.controllers.grid.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.controllers.list.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.controllers.slider.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.controllers.form.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.controllers.swagger.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.modal.controllers.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.views.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.tools.canvas.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.tools.layouts.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.cloud.auth.session.usertoken.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.cloud.auth.session.data.js", "../../node_modules/qcobjects-sdk/build/QCObjects-SDK.js", "../../node_modules/qcobjects-sdk/public/index.cjs", "../../build/QCObjects.js"], + "sourcesContent": ["/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n(function __qcobjects_sdk__ (_top) {\n \"use strict\";\n if (typeof Object.defineProperty !== \"undefined\" && typeof _top !== \"undefined\"){\n try {\n Object.defineProperty(_top,\"__qcobjects_sdk__\", {\n enumerable: true,\n configurable: false,\n writable: false,\n value: __qcobjects_sdk__,\n });\n } catch (e){\n if (typeof _top.__qcobjects_sdk__ !== \"undefined\"){\n _top.__qcobjects_sdk__.__loaded__ = true;\n }\n }\n }\n\n if (typeof _top.__qcobjects_sdk__.__loaded__ === \"undefined\"){\n _top.__qcobjects_sdk__.__loaded__ = true;\n if (typeof _top === \"undefined\"){\n throw Error(\"Top context empty: It should either global, module or window\");\n }\n var global = _top;\n _top.global = global;\n var isBrowser = typeof window !== \"undefined\" && typeof window.self !== \"undefined\" && window === window.self;\n var isNodeCommonJS = (typeof module !== \"undefined\") ? (true): (false);\n var remoteImportsPath = CONFIG.get(\"remoteImportsPath\");\n var relativeImportPath = CONFIG.get(\"relativeImportPath\");\n var external = (!CONFIG.get(\"useLocalSDK\")) ? (true) : (false);\n if (external && !isNodeCommonJS) {\n CONFIG.set(\"remoteImportsPath\", \"https://sdk.qcobjects.dev/v2.4/src/js/\");\n } else {\n CONFIG.set(\"relativeImportPath\", \"qcobjects-sdk/src/js/\");\n }\n if (typeof _top._DOMCreateElement === \"undefined\") {\n _top._DOMCreateElement = function (elementName) {\n var _ret_;\n if (isBrowser) {\n _ret_ = document.createElement(elementName);\n } else {\n _ret_ = {};\n }\n return _ret_;\n };\n }\n var _imports_;\n if (isBrowser && !isNodeCommonJS) {\n _imports_ = [\n Import(\"org.qcobjects.i18n_messages\", function () {}, external),\n Import(\"org.qcobjects.models\", function () {}, external),\n Import(\"org.qcobjects.components\", function () {}, external),\n Import(\"org.qcobjects.components.grid\", function () {}, external),\n Import(\"org.qcobjects.components.list\", function () {}, external),\n Import(\"org.qcobjects.components.slider\", function () {}, external),\n Import(\"org.qcobjects.components.notifications\", function () {}, external),\n Import(\"org.qcobjects.components.splashscreen\", function () {}, external),\n Import(\"org.qcobjects.controllers\", function () {}, external),\n Import(\"org.qcobjects.controllers.grid\", function () {}, external),\n Import(\"org.qcobjects.controllers.list\", function () {}, external),\n Import(\"org.qcobjects.controllers.slider\", function () {}, external),\n Import(\"org.qcobjects.controllers.form\", function () {}, external),\n Import(\"org.qcobjects.controllers.swagger\", function () {}, external),\n Import(\"org.qcobjects.effects\", function () {}, external),\n Import(\"org.qcobjects.modal.controllers\", function () {}, external),\n Import(\"org.qcobjects.views\", function () {}, external),\n Import(\"org.qcobjects.tools.canvas\", function () {}, external),\n Import(\"org.qcobjects.tools.layouts\", function () {}, external),\n Import(\"org.qcobjects.cloud.auth.session.usertoken\", function () {}, external),\n Import(\"org.qcobjects.cloud.auth.session.data\", function () {}, external)\n ];\n } else {\n // non-browsers environment\n if (isNodeCommonJS){\n CONFIG.set(\"remoteImportsPath\", CONFIG.get(\"basePath\",\"\"));\n }\n \n var _relative_path_ = \"qcobjects-sdk/src/js/\";\n _imports_ = [\n Import(_relative_path_ + \"org.qcobjects.models\", function () {}, external),\n Import(_relative_path_ + \"org.qcobjects.components\", function () {}, external),\n Import(_relative_path_ + \"org.qcobjects.controllers\", function () {}, external),\n Import(_relative_path_ + \"org.qcobjects.views\", function () {}, external),\n Import(_relative_path_ + \"org.qcobjects.effects\", function () {}, external),\n Import(_relative_path_ + \"org.qcobjects.tools.canvas\", function () {}, external),\n Import(_relative_path_ + \"org.qcobjects.tools.layouts\", function () {}, external),\n Import(_relative_path_ + \"org.qcobjects.cloud.auth.session.usertoken\", function () {}, external),\n Import(_relative_path_ + \"org.qcobjects.cloud.auth.session.data\", function () {}, external)\n ];\n \n \n }\n const __start__ = GlobalSettings.__start__.bind(_top);\n _top._sdk_ = Promise.all(_imports_).then(()=>{\n CONFIG.set(\"useSDK\", true);\n CONFIG.set(\"remoteImportsPath\", remoteImportsPath);\n CONFIG.set(\"relativeImportPath\", relativeImportPath);\n __start__();\n });\n \n }\n\n}).call(null, (typeof module === \"object\" && typeof module.exports === \"object\") ? (\n module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})\n) : ((typeof global === \"object\") ? (global) : (\n (typeof window === \"object\") ? (window) : ({})\n)));", "const sdk = require (\"./QCObjects-SDK\");\nmodule.exports = sdk;", "/**\n * QCObjects 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n/*eslint no-unused-vars: \"off\"*/\n/*eslint no-redeclare: \"off\"*/\n/*eslint no-empty: \"off\"*/\n/*eslint strict: \"off\"*/\n\n/*eslint no-mixed-operators: \"off\"*/\n(function __qcobjects__ (_top) {\n \"use strict\";\n\n if (typeof Object.defineProperty !== \"undefined\" && typeof _top !== \"undefined\"){\n try {\n Object.defineProperty(_top,\"__qcobjects__\", {\n enumerable: true,\n configurable: false,\n writable: false,\n value: __qcobjects__,\n });\n } catch (e){\n if (typeof _top.__qcobjects__ !== \"undefined\"){\n _top.__qcobjects__.loaded = true;\n }\n }\n }\n if (typeof _top.__qcobjects__.loaded === \"undefined\"){\n _top.__qcobjects__.loaded = true;\n \n var global = _top;\n _top.global = global;\n \n var isDeno = (typeof window !== \"undefined\" && \"Deno\" in window);\n var isBrowser = (typeof window !== \"undefined\" && typeof window.self !== \"undefined\" && window === window.self) && !isDeno;\n var isNodeCommonJS = (typeof module !== \"undefined\") ? (true): (false);\n var deno_require = function (){ /* not yet implemented */};\n var _require_ = function (){\n return (isDeno)?(deno_require(...arguments)):(require(...arguments));\n };\n \n var _protected_code_ = function (_) {\n var __oldtoString = (typeof _.prototype !== \"undefined\") ? (_.prototype.toString) : (function () {\n return \"\";\n });\n if (typeof _.prototype !== \"undefined\") {\n _.prototype.toString = function () {\n var _protected_symbols = [\n \"__qcobjects__\",\n \"__qcobjects_sdk__\",\n \"__loaded__\",\n \"ComplexStorageCache\",\n \"css\",\n \"append\",\n \"attachIn\",\n \"debug\",\n \"info\",\n \"warn\",\n \"QC_Append\",\n \"set\",\n \"get\",\n \"done\",\n \"componentDone\",\n \"_new_\",\n \"__new__\",\n \"Class\",\n \"ClassFactory\",\n \"New\",\n \"Export\",\n \"Package\",\n \"Import\",\n \"subelements\",\n \"componentLoader\",\n \"buildComponents\",\n \"Controller\",\n \"View\",\n \"VO\",\n \"Service\",\n \"serviceLoader\",\n \"JSONService\",\n \"ConfigService\",\n \"SourceJS\",\n \"SourceCSS\",\n \"ArrayList\",\n \"ArrayCollection\",\n \"Effect\",\n \"Timer\",\n \"sum\",\n \"avg\",\n \"table\",\n \"max\",\n \"min\",\n \"range\",\n \"matrix\",\n \"matrix2d\",\n \"matrix3d\",\n \"unique\",\n \"uniqueId\",\n \"shortCode\",\n \"NamespaceRef\"\n ];\n var _ret_;\n if (_protected_symbols.includes(this.name)) {\n _ret_ = this.name + \"{ [QCObjects native code] }\";\n } else {\n _ret_ = __oldtoString.call(this);\n }\n return _ret_;\n };\n }\n };\n (_protected_code_)(Function);\n var _methods_ = function (_) {\n var _m = [];\n for (var i in _) {\n if ((typeof _[i]).toLowerCase() === \"function\") {\n _m.push(_[i]);\n }\n }\n return _m;\n };\n \n String.prototype.__mAll__ = function (regex) {\n // This is an alternative to old browsers that dont support String.prototype.matchAll\n // https://github.com/tc39/proposal-string-matchall\n var matches = [];\n this.replace(regex, function () {\n var match = Array.prototype.slice.call(arguments, 0, -2);\n match.input = arguments[arguments.length - 1];\n match.index = arguments[arguments.length - 2];\n matches.push(match);\n });\n return matches;\n };\n if (typeof String.prototype.matchAll === \"undefined\") {\n String.prototype.matchAll = String.prototype.__mAll__;\n }\n var _DOMCreateElement = function (elementName) {\n var _ret_;\n if (isBrowser) {\n _ret_ = document.createElement(elementName);\n } else {\n _ret_ = {};\n }\n return _ret_;\n };\n \n if (!isBrowser) {\n const fs = _require_(\"fs\");\n }\n \n var _DataStringify = function (data) {\n var getCircularReplacer = function () {\n var seen = new WeakSet();\n var _level = 0;\n return function (key, value) {\n if (typeof value === \"object\" && value !== null) {\n if (seen.has(value)) {\n _level += 1;\n return (_level <= 3) ? (_LegacyCopy(value)) : (null);\n }\n seen.add(value);\n }\n return value;\n };\n };\n return JSON.stringify(data, getCircularReplacer());\n };\n \n if (isBrowser) {\n var _subelements = function subelements(selector) {\n return [...this.querySelectorAll(selector)];\n };\n Element.prototype.subelements = _subelements;\n HTMLDocument.prototype.subelements = _subelements;\n HTMLElement.prototype.subelements = _subelements;\n if (typeof ShadowRoot !== \"undefined\") {\n ShadowRoot.prototype.subelements = _subelements;\n }\n }\n if (isBrowser) {\n try {\n _top = (typeof window.top !== \"undefined\") ? (window.top) : (window);\n _top[\"_allowed_\"] = true;\n } catch (e) {\n try {\n _top = document;\n _top[\"_allowed_\"] = true;\n } catch (e2) {\n try {\n _top = global;\n _top[\"_allowed_\"] = true;\n } catch (e3) {\n _top = {};\n _top[\"_allowed_\"] = true;\n }\n }\n }\n } else if (typeof global !== \"undefined\") {\n _top = global;\n }\n var _domain_, _basePath_;\n var _tag_filter_ = \"quick-component:not([loaded]),component:not([loaded])\";\n _basePath_ = (\n function () {\n var _basePath = \"\";\n if (isBrowser) {\n var baseURI = _top.document.baseURI.split(\"?\")[0].split(\"/\");\n baseURI.pop();\n _basePath = baseURI.join(\"/\") + \"/\";\n } else {\n var process;\n try {\n process = _require_(\"process\");\n } catch (e) {\n // not a process module\n }\n if (typeof process !== \"undefined\") {\n _basePath = `${process.cwd()}/`;\n } else {\n _basePath = \"\";\n }\n }\n return _basePath;\n }\n )();\n if (isBrowser) {\n /**\n * Polyfilling Promise\n */\n if (!(\"Promise\" in _top)) {\n _top.Promise = function (_f) {\n var _p = {\n then() {},\n catch () {},\n _then(response) {\n this.then.call(_p, response);\n },\n _catch(response) {\n this.catch.call(_p, response);\n }\n };\n _f.call(_p, _p._then, _p._catch);\n return _p;\n };\n }\n if (typeof _top.console === \"undefined\") {\n _top.console = function () {};\n _top.console.prototype.log = function (message) {};\n }\n \n _domain_ = (\n function () {\n return (typeof document !== \"undefined\" && document.domain !== \"\") ? (document.domain) : (\"localhost\");\n }\n )();\n \n var _secretKey = (\n function () {\n var __secretKey = _top[(![] + [])[((+!+[]) + (+!+[]))] + (typeof ![])[(+!+[])] + (typeof [])[((+!+[]) + (+!+[])) * ((+!+[]) + (+!+[]))] + (![] + [])[(+!+[])] + (!![] + [])[(+[])] + ([] + [] + [][\n []\n ])[(+[+!+[] + [+[]]]) / ((+!+[]) + (+!+[]))] + (typeof ![])[(+!+[])] + ([] + [] + [][\n []\n ])[(+!+[])]][\"h\" + (typeof ![])[(+!+[])] + (![] + [])[(+!+[] + ((+!+[]) + (+!+[])))] + (!![] + [])[(+[])]].toLowerCase();\n return __secretKey;\n }\n )();\n var is_phonegap = (\n function () {\n return (typeof cordova !== \"undefined\") ? (true) : (false);\n }\n )();\n \n } else {\n // This is only for code integrity purpose using non-browser implementations\n // like using node.js\n var _secretKey = \"secret\";\n _domain_ = \"localhost\";\n }\n \n _top._asyncLoad = [];\n var asyncLoad = function (callback, args) {\n var asyncCallback = {\n \"func\": callback,\n \"args\": args,\n \"dispatch\"() {\n this.func.apply(null, this.args);\n }\n };\n _top._asyncLoad.push(asyncCallback);\n return asyncCallback;\n };\n \n if (isBrowser) {\n var _fireAsyncLoad = function () {\n if (document.readyState === \"complete\") {\n _top._asyncLoad.map(function (fc) {\n fc.dispatch.call(fc);\n });\n }\n };\n document.onreadystatechange = _fireAsyncLoad;\n } else if (typeof _top.global !== \"undefined\") {\n _top.global._fireAsyncLoad = function () {\n _top._asyncLoad.map(function (fc) {\n fc.dispatch.call(fc);\n });\n };\n }\n \n _top.asyncLoad = asyncLoad;\n var Logger = function () {\n return {\n debugEnabled: true,\n infoEnabled: true,\n warnEnabled: true,\n debug(message) {\n if (this.debugEnabled) {\n console.log(\"\\x1b[35m%s\\x1b[0m\", `[DEBUG][${performance.now().toLocaleString()}] ${message}`);\n }\n },\n info(message) {\n var color;\n if (this.infoEnabled) {\n if (isBrowser) {\n color = \"\\x1b[103m%s\\x1b[0m\";\n } else {\n color = \"\\x1b[33m%s\\x1b[0m\";\n }\n console.info(color, `[INFO][${performance.now().toLocaleString()}] ${message}`);\n }\n },\n warn(message) {\n if (this.warnEnabled) {\n console.warn(\"\\x1b[31m%s\\x1b[0m\", `[WARN][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n };\n };\n var logger = new Logger();\n logger.debugEnabled = false;\n logger.infoEnabled = true;\n _top.logger = logger;\n var Base64 = {\n _keyStr: \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",\n encode(e) {\n var t = \"\";\n var n, r, i, s, o, u, a;\n var f = 0;\n e = Base64._utf8_encode(e);\n while (f < e.length) {\n n = e.charCodeAt(f++);\n r = e.charCodeAt(f++);\n i = e.charCodeAt(f++);\n s = n >> 2;\n o = (n & 3) << 4 | r >> 4;\n u = (r & 15) << 2 | i >> 6;\n a = i & 63;\n if (isNaN(r)) {\n u = a = 64;\n } else if (isNaN(i)) {\n a = 64;\n }\n t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a);\n }\n return t;\n },\n decode(e) {\n var t = \"\";\n var n, r, i;\n var s, o, u, a;\n var f = 0;\n e = e.replace(/[^A-Za-z0-9+/=]/g, \"\");\n while (f < e.length) {\n s = this._keyStr.indexOf(e.charAt(f++));\n o = this._keyStr.indexOf(e.charAt(f++));\n u = this._keyStr.indexOf(e.charAt(f++));\n a = this._keyStr.indexOf(e.charAt(f++));\n n = s << 2 | o >> 4;\n r = (o & 15) << 4 | u >> 2;\n i = (u & 3) << 6 | a;\n t = t + String.fromCharCode(n);\n if (u !== 64) {\n t = t + String.fromCharCode(r);\n }\n if (a !== 64) {\n t = t + String.fromCharCode(i);\n }\n }\n t = Base64._utf8_decode(t);\n return t;\n },\n _utf8_encode(e) {\n e = e.replace(/rn/g, \"n\");\n var t = \"\";\n for (var n = 0; n < e.length; n++) {\n var r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n } else if (r > 127 && r < 2048) {\n t += String.fromCharCode(r >> 6 | 192);\n t += String.fromCharCode(r & 63 | 128);\n } else {\n t += String.fromCharCode(r >> 12 | 224);\n t += String.fromCharCode(r >> 6 & 63 | 128);\n t += String.fromCharCode(r & 63 | 128);\n }\n }\n return t;\n },\n _utf8_decode(e) {\n var t = \"\";\n var n = 0;\n var r = 0;\n var c1 = 0;\n var c2 = 0;\n var c3;\n while (n < e.length) {\n r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n n++;\n } else if (r > 191 && r < 224) {\n c2 = e.charCodeAt(n + 1);\n t += String.fromCharCode((r & 31) << 6 | c2 & 63);\n n += 2;\n } else {\n c2 = e.charCodeAt(n + 1);\n c3 = e.charCodeAt(n + 2);\n t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63);\n n += 3;\n }\n }\n return t;\n }\n };\n var waitUntil = function (func, exp) {\n var _waitUntil = function (func, exp) {\n var maxWaitCycles = 2000;\n var _w = 0;\n var _t = setInterval(function () {\n if (exp.call()) {\n clearInterval(_t);\n func.call();\n logger.debug(\"Ejecuting \" + func.name + \" after wait\");\n } else {\n if (_w < maxWaitCycles) {\n _w += 1;\n logger.debug(\"WAIT UNTIL \" + func.name + \" is true, \" + _w.toString() + \" cycles\");\n } else {\n logger.debug(\"Max execution time for \" + func.name + \" expression until true\");\n clearInterval(_t);\n }\n }\n }, 1);\n };\n setTimeout(function () {\n _waitUntil(func, exp);\n }, 1);\n };\n if (typeof localStorage === \"undefined\") {\n /* Polyfill for localStorage */\n var localStorage = {\n getItem(name) {\n return (Object.hasOwnProperty.call(this, name)) ? (this[name]) : (null);\n },\n setItem(name, value) {\n this[name] = value;\n },\n removeItem(name) {\n delete this[name];\n }\n };\n /* end Polyfill for localStorage */\n }\n var ComplexStorageCache = function (params) {\n var object, load, alternate;\n object = params.index;\n if (typeof object !== \"undefined\") {\n load = params.load;\n alternate = params.alternate;\n var cachedObjectID = this.getID(object);\n var cachedResponse = localStorage.getItem(cachedObjectID);\n if (this.isEmpty(cachedResponse)) {\n var cachedNewResponse = load.call(null, {\n \"cachedObjectID\": cachedObjectID,\n \"cachedResponse\": cachedResponse,\n \"cache\": this\n });\n this.save(object, cachedNewResponse);\n logger.debug(\"RESPONSE OF {{cachedObjectID}} CACHED\".replace(\"{{cachedObjectID}}\", cachedObjectID));\n } else {\n var alternateResponse = alternate.call(null, {\n \"cachedObjectID\": cachedObjectID,\n \"cachedResponse\": cachedResponse,\n \"cache\": this\n });\n logger.debug(\"RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED \".replace(\"{{cachedObjectID}}\", cachedObjectID));\n }\n \n } else {\n throw new Error(\"ComplexStorageCache: index is undefined\");\n }\n return this;\n };\n ComplexStorageCache.prototype.getItem = function (cachedObjectID) {\n var retrievedObject = localStorage.getItem(cachedObjectID);\n if (!this.isEmpty(retrievedObject)) {\n return JSON.parse(retrievedObject);\n } else {\n return null;\n }\n };\n ComplexStorageCache.prototype.setItem = function (cachedObjectID, value) {\n localStorage.setItem(cachedObjectID, _DataStringify(value));\n };\n ComplexStorageCache.prototype.isEmpty = function (object) {\n var r = false;\n switch (true) {\n case (typeof object === \"undefined\"):\n case (typeof object === \"string\" && object === \"\"):\n case (typeof object === \"string\" && object === \"undefined\"):\n case (typeof object === \"number\" && object === 0):\n case (object === null):\n r = true;\n break;\n default:\n r = false;\n }\n return r;\n };\n ComplexStorageCache.prototype.getID = function (object) {\n var cachedObjectID;\n if (typeof object !== \"undefined\") {\n cachedObjectID = \"cachedObject_\" + Base64.encode(_DataStringify(object).replace(/\\{|\\}|,/g, \"_\"));\n }\n return cachedObjectID;\n };\n ComplexStorageCache.prototype.save = function (object, cachedNewResponse) {\n var cachedObjectID = this.getID(object);\n logger.debug(\"CACHING THE RESPONSE OF {{cachedObjectID}} \".replace(\"{{cachedObjectID}}\", cachedObjectID));\n this.setItem(cachedObjectID, cachedNewResponse);\n };\n ComplexStorageCache.prototype.getCached = function (object) {\n var cachedObjectID = this.getID(object);\n return this.getItem(cachedObjectID);\n };\n ComplexStorageCache.prototype.clear = function () {\n Object.keys(localStorage).filter(function (k) {\n return k.startsWith(\"cachedObject_\");\n }).map(function (c) {\n localStorage.removeItem(c);\n });\n };\n \n /**\n * Detecting passive events feature\n *\n * https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection\n **/\n \n // Test via a getter in the options object to see if the passive property is accessed\n if (isBrowser) {\n var supportsPassive = false;\n try {\n var opts = Object.defineProperty({}, \"passive\", {\n get() {\n supportsPassive = true;\n return supportsPassive;\n }\n });\n window.addEventListener(\"testPassive\", null, opts);\n window.removeEventListener(\"testPassive\", null, opts);\n } catch (e) {}\n var captureFalse = function () {\n return (supportsPassive) ? ({\n passive: true\n }) : (false);\n };\n \n // Use our detect's results. passive applied if supported, capture will be false either way.\n //elem.addEventListener('touchstart', fn, captureFalse);\n \n }\n \n \n /**\n * Basic Type of all elements\n */\n if (isBrowser) {\n Element.prototype.find = function (tag) {\n var _oo = [];\n var _tags = document.subelements(tag);\n _tags.map(function (_tt, _t) {\n if ((typeof _tags[_t] !== \"undefined\") && _tags[_t].parentNode.tagName === this.parentNode.tagName) {\n _oo.push(_Cast(_tt, (new Object())));\n }\n });\n return _oo;\n };\n }\n \n /**\n * Primary instance ID of all objects\n */\n var __instanceID;\n // Adaptation of Production steps of ECMA-262, Edition 5, 15.2.3.5\n // Reference: http://es5.github.io/#x15.2.3.5\n var _Object_Create = (function () {\n \n // make a safe reference to Object.prototype.hasOwnProperty\n var hasOwn = Object.prototype.hasOwnProperty;\n \n return function (O) {\n // 1. If Type(O) is not Object or Null throw a TypeError exception.\n if (typeof O !== \"object\") {\n throw TypeError(\"Object prototype may only be an Object or null. The type is \" + typeof (O));\n }\n \n // 2. Let obj be the result of creating a new object as if by the\n //\t\texpression new Object() where Object is the standard built-in\n //\t\tconstructor with that name\n // 3. Set the [[Prototype]] internal property of obj to O.\n var QCObjects = function () {};\n QCObjects.prototype = O;\n var obj = new QCObjects();\n \n // Let's not keep a stray reference to O...\n \n // 4. If the argument Properties is present and not undefined, add\n //\t\town properties to obj as if by calling the standard built-in\n //\t\tfunction Object.defineProperties with arguments obj and\n //\t\tProperties.\n if (arguments.length > 1) {\n // Object.defineProperties does ToObject on its first argument.\n var Properties = Object(arguments[1]);\n for (var prop in Properties) {\n if (hasOwn.call(Properties, prop)) {\n obj[prop] = Properties[prop];\n }\n }\n }\n \n // 5. Return obj\n return obj;\n };\n })();\n \n // Object.assign Polyfilling\n // Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill\n if (typeof Object.assign !== \"function\") {\n // Must be writable: true, enumerable: false, configurable: true\n Object.defineProperty(Object, \"assign\", {\n value: function assign(target, varArgs) { // .length of function is 2\n \"use strict\";\n if (target === null) { // TypeError if undefined or null\n throw new TypeError(\"Cannot convert undefined or null to object\");\n }\n \n var to = Object(target);\n \n for (var index = 1; index < arguments.length; index++) {\n var nextSource = arguments[index];\n \n if (nextSource !== null) { // Skip over if undefined or null\n for (var nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n return to;\n },\n writable: true,\n configurable: true\n });\n }\n \n var __is_raw_class__ = function (o_c) {\n return (typeof o_c === \"function\" && o_c.toString().startsWith(\"class\")) ? (true) : (false);\n };\n \n var _LegacyCopy = function (obj) {\n var _value_;\n switch (true) {\n case typeof obj === \"string\":\n _value_ = obj;\n break;\n case typeof obj === \"number\":\n _value_ = obj;\n break;\n case typeof obj === \"object\":\n _value_ = Object.assign({}, obj);\n break;\n case typeof obj === \"function\":\n _value_ = obj.bind({});\n break;\n case __is_raw_class__(obj):\n _value_ = class extends obj {};\n break;\n default:\n break;\n }\n return _value_;\n };\n \n \n var _QC_CLASSES = {};\n var _QC_PACKAGES = {};\n var _QC_PACKAGES_IMPORTED = [];\n var _QC_READY_LISTENERS = [];\n \n /**\n * Returns the object or function name\n *\n * @param Object or function\n */\n var ObjectName = function (o) {\n var ret = \"\";\n if (typeof o === \"function\" && Object.hasOwnProperty.call(o, \"name\") && o.name !== \"\") {\n ret = o.name;\n } else if (typeof o !== \"undefined\" && typeof o.constructor === \"function\" && o.constructor.name !== \"\") {\n ret = o.constructor.name;\n } else if (typeof o !== \"undefined\" && typeof o.constructor === \"object\") {\n ret = o.constructor.toString().replace(/\\[(.*?)\\]/g, \"$1\").split(\" \").slice(1).join(\"\");\n }\n return ret;\n };\n \n /**\n * Casts an object to another object class type\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\n var _Cast = function (obj_source, obj_dest) {\n for (var v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\") {\n try {\n obj_dest[v] = obj_source[v];\n } catch (e) {\n \n }\n }\n }\n return obj_dest;\n };\n \n /**\n * Casts an object to another object class type. Only properties\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\n var _CastProps = function (obj_source, obj_dest) {\n for (var v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\" && typeof obj_source[v] !== \"function\") {\n try {\n obj_dest[v] = obj_source[v];\n } catch (e) {\n // DO NOTHING\n }\n } else if (typeof obj_source[v] === \"function\") {\n try {\n obj_dest[v] = obj_source[v].bind(obj_dest);\n } catch (e) {\n logger.warn(e);\n }\n }\n }\n return obj_dest;\n };\n \n /**\n * Internal use to determine the forbidden names for classes\n * Reserved words\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n */\n var __is__forbidden_name__ = function () {\n return ([\"__proto__\", \"prototype\", \"Object\", \"Map\", \"defineProperty\", \"indexOf\", \"toString\", \"__instanceID\"].indexOf(arguments[0]) !== -1) ? (true) : (false);\n };\n \n /**\n * Determine the type of the Object for any QCObjects Object\n *\n * @param {Object} object\n */\n var __getType__ = function __getType__(o_c) {\n var _ret_ = \"\";\n switch (true) {\n case __is_raw_class__(o_c) && !!o_c.name:\n _ret_ = o_c.name;\n break;\n case typeof o_c === \"object\" &&\n (!!o_c.constructor &&\n !!o_c.constructor.name) \n && o_c.constructor.name !== \"\":\n _ret_ = o_c.constructor.name;\n break;\n case (!!o_c && !!o_c.__classType) && o_c.__classType !== \"\":\n _ret_ = o_c.__classType;\n break;\n case (!!o_c && !!o_c.__definition) && (!!o_c.__definition.__classType) && o_c.__definition.__classType !== \"\":\n _ret_ = o_c.__definition.__classType;\n break;\n case typeof o_c === \"function\" && !!o_c.name:\n _ret_ = o_c.name;\n break;\n default:\n _ret_ = ObjectName(o_c);\n break;\n }\n return _ret_;\n };\n \n /**\n * Returns if a class or object is from a determinated type\n * @param {Object} object\n * @param {String} typeName\n */\n var is_a = function is_a(obj, typeName) {\n return (typeof obj !== \"undefined\" && obj !== null &&\n (((isQCObjects_Class(obj) || isQCObjects_Object(obj)) && (obj.hierarchy().includes(typeName))) ||\n __getType__(obj) === typeName ||\n ObjectName(obj) === typeName ||\n typeof obj === typeName)) ? (true) : (false);\n };\n \n \n var __make_global__ = function (f) {\n if (typeof f !== \"undefined\") {\n if (isBrowser) {\n try {\n _top[f.name] = f;\n window[f.name] = f;\n } catch (e) {}\n } else if (typeof global !== \"undefined\") {\n if (!Object.hasOwnProperty.call(global, f.name)) {\n global[f.name] = f;\n }\n }\n }\n \n };\n \n var __register_class__ = function (_class_, __namespace) {\n var name = _class_.name || __getType__(_class_);\n _class_.__definition.__classType = name;\n if (typeof __namespace !== \"undefined\"){\n _class_.__definition.__namespace = __namespace;\n }\n _QC_CLASSES[name] = _class_;\n _top[name] = _QC_CLASSES[name];\n return _top[name];\n };\n \n var RegisterClass = function (_class_, __namespace) {\n return __register_class__(_class_, __namespace);\n };\n __make_global__(RegisterClass);\n \n /**\n * Creates new object class of another object\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n */\n var Class = function () {\n var _types_ = {};\n var name, type, definition;\n \n switch (arguments.length) {\n case 0:\n return class {};\n case 1:\n name = arguments[0];\n type = class {};\n definition = {};\n break;\n case 2:\n name = arguments[0];\n type = class {};\n definition = arguments[1];\n break;\n case 3:\n name = arguments[0];\n type = arguments[1];\n definition = arguments[2];\n break;\n default:\n break;\n }\n \n if (typeof type !== \"function\") {\n throw new Error(\"Class type must be a function or class\");\n }\n \n if (__is__forbidden_name__.call(this, name)) {\n throw new Error(`${name} is not an allowed word in the name of a class`);\n }\n \n if (typeof type[\"__definition\"] !== \"undefined\") {\n definition[\"__definition\"] = Object.assign(_LegacyCopy(type.__definition), type);\n }\n \n _types_[type.name] = type;\n \n if (typeof definition === \"undefined\" || definition === null) {\n definition = {};\n } else {\n definition = _LegacyCopy(definition);\n }\n \n /* hack to prevent duplicate __instanceID */\n if (typeof definition[\"__instanceID\"] !== \"undefined\") {\n delete definition[\"__instanceID\"];\n }\n \n _QC_CLASSES[name] = class extends _types_[type.name] {\n __classType = name;\n __definition = {\n ...definition\n };\n \n static hierarchy(__class__) {\n var __classType = function (o_c) {\n return (Object.hasOwnProperty.call(o_c, \"__classType\")) ? (o_c.__classType) : (__getType__.call(__class__, o_c));\n };\n var __hierarchy__proto__ = (c) => {\n return (typeof c !== \"undefined\" && typeof c.__proto__ !== \"undefined\" && c.__proto__ !== null) ? (((__classType(c) !== \"\") ? ([__classType(c)]) : ([])).concat(__hierarchy__proto__(c.__proto__))) : ([]);\n };\n \n if (typeof __class__ === \"undefined\" || __class__ === null) {\n __class__ = this;\n }\n var __hierarchy = [];\n __hierarchy.push(__classType(__class__));\n __hierarchy = __hierarchy.concat(__hierarchy__proto__(__class__.__proto__));\n return __hierarchy;\n }\n \n static getParentClass() {\n return Object.getPrototypeOf(this.prototype.constructor);\n }\n \n constructor() {\n var _o_;\n if (arguments.length > 0) {\n _o_ = {\n ...arguments[0]\n };\n } else {\n _o_ = {};\n }\n super(_o_);\n \n let self = this;\n __instanceID = (typeof __instanceID === \"undefined\" || __instanceID === null) ? (0) : (__instanceID + 1);\n if (!self.__instanceID) {\n Object.defineProperty(self, \"__instanceID\", {\n value: __instanceID,\n writable: false\n });\n }\n \n if (typeof self.__definition !== \"undefined\") {\n Object.keys(self.__definition).filter(function (k) {\n return isNaN(k) && ![\"name\", \"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n }).forEach(function (key) {\n if (typeof self.__definition[key] === \"function\") {\n self[key] = self.__definition[key].bind(self);\n } else {\n self[key] = self.__definition[key];\n }\n });\n }\n _methods_(_QC_CLASSES[self.__classType]).map(function (m) {\n self[m.name] = m.bind(self);\n });\n _methods_(self.__definition).map(function (m) {\n self[m.name] = m.bind(self);\n });\n\n if (!!self[\"body\"]){\n if (typeof self.__definition === \"undefined\" || (!Object.hasOwnProperty.call(self.__definition, \"body\")) || typeof self.__definition.body === \"undefined\") {\n try {\n if (isBrowser) {\n self[\"body\"] = _DOMCreateElement(self.__definition.__classType);\n } else {\n self[\"body\"] = {};\n }\n } catch (e) {\n self[\"body\"] = {};\n }\n } else if (Object.hasOwnProperty.call(self.__definition, \"body\")) {\n self[\"body\"] = self.__definition.body;\n } \n }\n \n \n try {\n if (typeof self.__new__ === \"function\") {\n self.__new__.call(self, _o_);\n } else if (typeof super.__new__ === \"function\") {\n self.__new__ = super.__new__.bind(self);\n self.__new__.call(self, _o_);\n }\n if (typeof self === \"object\" && Object.hasOwnProperty.call(self, \"_new_\") && typeof self._new_.isCalled === \"undefined\") {\n try {\n self._new_.call(self, _o_);\n self._new_.isCalled = true;\n } catch (e) {\n logger.warn(`${self.__classType}._new_() failed with error: ${e}`);\n }\n }\n } catch (e) {\n logger.warn(e);\n }\n }\n \n __new__(_o_) {\n _CastProps(_o_, this);\n }\n _new_() {}\n \n getClass() {\n return Object.getPrototypeOf(this.constructor);\n }\n \n css(_css) {\n if (typeof this[\"body\"] !== \"undefined\" && this[\"body\"][\"style\"] !== \"undefined\") {\n logger.debug(\"body style\");\n this[\"body\"][\"style\"] = _Cast(_css, this[\"body\"][\"style\"]);\n }\n return this[\"body\"][\"style\"];\n }\n \n hierarchy() {\n var __instance__ = this;\n return this.getClass().hierarchy(__instance__);\n }\n \n \n append(child) {\n logger.debug(\"append: start\");\n if (is_a(child, \"Component\")) {\n logger.debug(\"append: child is a Component\");\n logger.debug(`appending the body of ${child.name}`);\n }\n var child = (arguments.length > 0) ? (arguments[0]) : (this[\"body\"]);\n if (typeof this[\"body\"] !== \"undefined\") {\n logger.debug(\"append element\");\n if (arguments.lenght > 0) {\n logger.debug(\"append to element\");\n this[\"body\"].append(child);\n if (typeof this[\"childs\"] === \"undefined\") {\n this[\"childs\"] = [];\n }\n this[\"childs\"].push(child);\n } else {\n if (isBrowser) {\n logger.debug(\"append to body\");\n document.body.append(child);\n }\n }\n }\n }\n \n attachIn(tag) {\n if (isBrowser) {\n var tags = document.subelements(tag);\n for (var i = 0, j = tags.length; i < j; i++) {\n tags[i].append(this);\n }\n } else {\n throw new Error(\"attachIn not yet implemented for non browser platforms\");\n }\n }\n \n };\n \n // remove the keys from definition that exist in the prototype\n \n _QC_CLASSES[name] = _CastProps(definition, _QC_CLASSES[name]);\n _QC_CLASSES[name][\"__definition\"] = definition;\n _QC_CLASSES[name][\"__definition\"][\"__classType\"] = name;\n _QC_CLASSES[name][\"__definition\"][\"__new__\"] = function __new__(_o_) {\n _CastProps(_o_, this);\n };\n \n _top[name] = _QC_CLASSES[name];\n \n return _top[name];\n };\n \n Class.prototype.toString = function () {\n return \"Class(name, type, definition) { [QCObjects native code] }\";\n };\n \n /**\n * Returns the QCObjects Class Factory of a given ClassName\n *\n * @param {String} name\n */\n \n var ClassFactory = function (className) {\n var _classFactory;\n if (className !== null && className.indexOf(\".\") > -1) {\n var packageName = className.split(\".\").slice(0, className.split(\".\").length - 1).join(\".\");\n var _className = className.split(\".\").slice(-1).join(\"\");\n var _package = Package(packageName);\n var packageClasses = (typeof _package !== \"undefined\") ? (_package.filter(classFactory => {\n return isQCObjects_Class(classFactory) &&\n (classFactory.__definition.__classType === _className || (typeof classFactory === \"function\" && !!classFactory.name) ) ;\n }).reverse()) : ([]);\n if (packageClasses.length > 0) {\n _classFactory = packageClasses[0];\n } else {\n throw Error (`Class ${className} not found.`);\n }\n } else if (className !== null && Object.hasOwnProperty.call(_QC_CLASSES, className)) {\n _classFactory = _QC_CLASSES[className];\n }\n return _classFactory;\n };\n \n if (isBrowser) {\n Element.prototype.append = function QC_Append(child) {\n if (isQCObjects_Object(child) || typeof child.body !== \"undefined\") {\n this.appendChild(child.body);\n } else {\n this.appendChild(child);\n }\n };\n \n /**\n * A replacement for direct using of innerHTML\n * use: [element].render('content') where 'content' is the string corresponding\n * to the DOM to insert in the element\n **/\n Element.prototype.render = function QC_Render(content) {\n var _self = this;\n var _appendVDOM = function (_self, content) {\n if (typeof document.implementation.createHTMLDocument !== \"undefined\") {\n var doc = document.implementation.createHTMLDocument(\"\");\n doc.innerHTML = content;\n doc.body.subelements(\"*\").map(function (element) {\n return _self.append(element);\n });\n }\n };\n if (typeof this.innerHTML !== \"undefined\") {\n try {\n this.innerHTML += content;\n } catch (e) {\n _appendVDOM(_self, content);\n }\n } else {\n _appendVDOM(_self, content);\n }\n };\n }\n \n /**\n * Returns a method from a superior QCObjects Class\n * It is useful for Class Inheritance in the _new_ and __new__ method constructors\n * @example _super_('MySuperClass','MySuperMethod').call(this,params) #where this is the current instance and params are method parameters\n *\n * @param {String} className\n * @param {String} classMethodName\n * @param {Object} params\n */\n var _super_ = function (className, classMethodName, params) {\n return ClassFactory(className)[classMethodName];\n };\n _super_.prototype.toString = function () {\n return \"_super_(className,classMethodName,params) { [QCObjects native code] }\";\n };\n \n /**\n * Creates an object from a Class definition\n *\n * @param {QC_Object} o\n * @param {Object} args\n */\n \n var New = function (__class__, args) {\n args = (arguments.length > 1) ? (args) : ({});\n return (typeof __class__ === \"undefined\") ? (new Object()) : (new __class__(args));\n };\n \n New.prototype.toString = function () {\n return \"New(QCObjectsClassName, args) { [QCObjects native code] }\";\n };\n \n \n var Export = function (f) {\n return __make_global__(f);\n };\n Export.prototype.toString = function () {\n return \"Export(function or symbol) { [QCObjects native code] }\";\n };\n \n if (!isBrowser) {\n var findPackageNodePath = function (packagename) {\n const fs = _require_(\"fs\");\n var sdkPath = null;\n try {\n var sdkPaths = [\n `${_top.CONFIG.get(\"projectPath\")}${_top.CONFIG.get(\"relativeImportPath\")}`,\n `${_top.CONFIG.get(\"basePath\")}${_top.CONFIG.get(\"relativeImportPath\")}`,\n `${_top.CONFIG.get(\"projectPath\")}`,\n `${_top.CONFIG.get(\"basePath\")}`,\n `${_top.CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}${_top.CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}/node_modules/` + packagename,\n `${process.cwd()}/node_modules`,\n `${process.cwd()}`,\n \"node_modules\",\n \"./\",\n \"\"\n ].concat(module.paths);\n sdkPaths = sdkPaths.filter(p => {\n return fs.existsSync(p + \"/\" + packagename);\n });\n if (sdkPaths.length > 0) {\n sdkPath = sdkPaths[0];\n logger.info(packagename + \" is Installed.\");\n } else {\n // logger.debug(packagename + ' is not in a standard path.');\n }\n } catch (e) {\n // do nothing\n console.log(e);\n }\n return sdkPath;\n };\n Export(findPackageNodePath);\n }\n \n Class(\"_Crypt\", Object, {\n last_string: \"\",\n last_key: \"\",\n construct: false,\n _new_(o) {\n var string = o[\"string\"];\n var key = (o.hasOwnProperty.call(o, \"key\")) ? (o[\"key\"]) : (null);\n this.__new__(o);\n key = (key === null) ? (this.__instanceID) : (key);\n this.last_key = key;\n this.last_string = string;\n this.construct = true;\n },\n _encrypt() {\n var string = this.string;\n var key = this.key;\n var result = \"\";\n var char;\n var keychar;\n for (var i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) + keychar.charCodeAt(0));\n result += char;\n }\n this.last_string = Base64.encode(result);\n return this.last_string;\n },\n _decrypt() {\n var string = this.string;\n var key = this.key;\n var result = \"\";\n var char;\n var keychar;\n string = Base64.decode(string);\n for (var i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) - keychar.charCodeAt(0));\n result += char;\n }\n \n this.last_string = result;\n return this.last_string;\n },\n encrypt(string, key) {\n var crypt = New(ClassFactory(\"_Crypt\"), {\n string: string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._encrypt();\n },\n decrypt(string, key) {\n var crypt = New(ClassFactory(\"_Crypt\"), {\n string: string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._decrypt();\n }\n });\n \n var _CryptObject = function (o) {\n return ClassFactory(\"_Crypt\").encrypt(_DataStringify(o), _secretKey);\n };\n var _DecryptObject = function (s) {\n return (s === \"\") ? ({}) : (JSON.parse(ClassFactory(\"_Crypt\").decrypt(s, _secretKey)));\n };\n \n var shortCode = function () {\n var length = 1000;\n var code1 = ClassFactory(\"_Crypt\").encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date()).getTime().toString());\n var code2 = ClassFactory(\"_Crypt\").encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date((new Date()).getTime() - 1000 * 1000)).getTime().toString());\n var shortCode = code2.list().map((o1, index) => {\n return code1.list()[index] === o1 ? null : o1;\n }).filter(c => c !== null).join(\"\");\n return shortCode;\n };\n var uniqueId = shortCode;\n Class(\"InheritClass\", class {}, {});\n \n class Processor extends ClassFactory(\"InheritClass\") {\n component = null;\n __definition = {};\n __classType = \"Processor\";\n \n static processors= {\n \"config\"(component,arg) {\n return _top.CONFIG.get(arg, \"\");\n },\n \"ENV\"(component, arg) {\n return (typeof process !== \"undefined\") ? (process.env[arg]) : (\"\");\n },\n \"global\"(component, arg) {\n return (typeof global !== \"undefined\") ? (global[arg]) : (\"\");\n }\n };\n static setProcessor(_proc_) {\n if (typeof _proc_ === \"function\" && _proc_.name !== \"\") {\n this.processors[_proc_.name] = _proc_;\n }\n }\n \n constructor (){\n super(...arguments);\n this.processors = Processor.processors;\n this.process = Processor.process.bind(this);\n this.processObject = Processor.processObject.bind(this);\n this.setProcessor = Processor.setProcessor.bind(this);\n this.execute = Processor.execute.bind(this);\n }\n \n static execute(component,processorName, args) {\n var processorHandler = (typeof component !== \"undefined\" && component !== null)?(component.processorHandler):(this);\n return processorHandler.processors[processorName].bind(processorHandler).apply(processorHandler,[component,...args.split(\",\")]);\n }\n \n static process(template, component = null) {\n var processorHandler = (component !== null)?(component.processorHandler):( New(Processor,{component:null}) ) ;\n if (typeof template === \"string\") {\n Object.keys(processorHandler.processors).map(function (funcName) {\n [...template.matchAll(new RegExp(\"\\\\$\" + funcName + \"\\\\((.*)\\\\).*\", \"g\"))].map(\n function (procesorMatch) {\n var match0 = `$${funcName}(${procesorMatch[1]})`;\n template = template.replace(match0, processorHandler.execute.bind(processorHandler).call(processorHandler, component, funcName, procesorMatch[1]));\n }\n );\n });\n }\n return template;\n }\n \n static processObject(obj, component = null) {\n var __instance__ = (component === null)?(this):(component.processorHandler);\n if (typeof __instance__ === \"undefined\"){\n __instance__ = new Processor({component:component});\n }\n if (typeof obj === \"object\") {\n Object.keys(obj).map(\n function (_k) {\n if (typeof obj[_k] === \"object\" && !obj[_k].hasOwnProperty.call(obj[_k], \"call\")) {\n obj[_k] = __instance__.processObject.bind(__instance__)(obj[_k], component);\n } else if (typeof obj[_k] === \"string\") {\n obj[_k] = __instance__.process.bind(__instance__)(obj[_k], component);\n }\n }\n );\n } else if (typeof obj === \"string\") {\n obj = __instance__.process.bind(__instance__)(obj, component);\n }\n return obj;\n }\n \n }\n Processor.__definition = {};\n Processor.__classType = \"Processor\";\n RegisterClass(Processor,\"com.qcobjects\");\n __make_global__(Processor);\n \n \n class ConfigSettings {\n static _instance = null;\n static _CONFIG_ENC = null;\n static get instance() {\n \n if (this._instance === null) {\n var _config_settings = new ConfigSettings();\n _config_settings._CONFIG = {\n \"relativeImportPath\": \"\",\n \"remoteImportsPath\": \"\",\n \"remoteSDKPath\": \"https://sdk.qcobjects.dev/v2.4/\",\n \"asynchronousImportsLoad\": false,\n \"removePackageScriptAfterLoading\": true,\n \"componentsBasePath\": \"\",\n \"delayForReady\": 0,\n \"preserveComponentBodyTag\": false,\n \"useConfigService\": false,\n \"routingWay\": \"hash\",\n \"useSDK\": true,\n \"useLocalSDK\": false,\n \"basePath\": _basePath_\n };\n _config_settings._CONFIG_ENC = null;\n this._instance = _config_settings;\n }\n \n return this._instance;\n }\n \n static set instance(value) {\n this._instance = value;\n }\n }\n _QC_CLASSES[\"ConfigSettings\"] = ConfigSettings;\n \n Class(\"CONFIG\", Object, {\n \n get _CONFIG_ENC() {\n return ClassFactory(\"ConfigSettings\").instance._CONFIG_ENC;\n },\n \n get _CONFIG() {\n return ClassFactory(\"ConfigSettings\").instance._CONFIG;\n },\n \n set(name, value) {\n logger.debug(`CONFIG.set ${name}: ${value}`);\n // hack to force update basePath from CONFIG\n if (name === \"basePath\") {\n _basePath_ = value;\n }\n var _conf;\n try {\n _conf = (\n function (config) {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = ClassFactory(\"_Crypt\").encrypt(_DataStringify({}), _secretKey);\n }\n var _protectedEnc = config._CONFIG_ENC.valueOf();\n var _protectedConf = config._CONFIG.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n }\n )(ClassFactory(\"ConfigSettings\").instance);\n } catch (e) {\n _conf = {};\n console.error(e);\n logger.debug(\"failed to encrypt config\");\n }\n \n _conf[name] = value;\n ClassFactory(\"ConfigSettings\").instance._CONFIG_ENC = _CryptObject(_conf);\n if (Object.hasOwnProperty.call(ClassFactory(\"ConfigSettings\").instance, \"_CONFIG\") && Object.hasOwnProperty.call(ClassFactory(\"ConfigSettings\").instance._CONFIG, name)) {\n ClassFactory(\"ConfigSettings\").instance._CONFIG[name] = value;\n }\n },\n get(name, _default) {\n var _value;\n try {\n var _conf = (\n function (config) {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = ClassFactory(\"_Crypt\").encrypt(_DataStringify({}), _secretKey);\n }\n var _protectedEnc = config._CONFIG_ENC.valueOf();\n var _protectedConf = config._CONFIG.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n }\n )(ClassFactory(\"ConfigSettings\").instance);\n if (typeof _conf[name] !== \"undefined\") {\n _value = _conf[name];\n } else if (typeof _default !== \"undefined\") {\n _value = _default;\n }\n } catch (e) {\n console.error(e);\n logger.debug(\"Something wrong when trying to get CONFIG values\");\n logger.debug(\"No config value for: \" + name);\n _value = _default;\n }\n return Processor.processObject.call(Processor, _value);\n }\n });\n \n Export(waitUntil);\n Export(_super_);\n Export(ComplexStorageCache);\n Export(ClassFactory);\n Export(_DOMCreateElement);\n Export(shortCode);\n Export(__getType__);\n Export(is_a);\n \n var isQCObjects_Object = function (_) {\n return (typeof _ === \"object\" &&\n Object.hasOwnProperty.call(_, \"__classType\") &&\n (!!_.__instanceID) &&\n Object.hasOwnProperty.call(_, \"__definition\") &&\n typeof _.__definition !== \"undefined\"\n ) ? (true) : (false);\n };\n \n var isQCObjects_Class = function (_) {\n return (typeof _ === \"function\" &&\n (!_.__instanceID) &&\n (!!_.__definition) &&\n typeof _.__definition !== \"undefined\" &&\n !!_.__definition.__classType\n ) ? (true) : (false);\n };\n \n /**\n * Defines a package for Class classification\n *\n * @param {Object} namespace\n * @param {Object} classes\n */\n var Package = function (namespace, classes) {\n if (_QC_PACKAGES.hasOwnProperty.call(_QC_PACKAGES, namespace) &&\n typeof _QC_PACKAGES[namespace] !== \"undefined\" &&\n _QC_PACKAGES[namespace].hasOwnProperty.call(_QC_PACKAGES[namespace], \"length\") &&\n _QC_PACKAGES[namespace].length > 0 &&\n typeof classes !== \"undefined\" &&\n classes.hasOwnProperty.call(classes, \"length\") &&\n classes.length > 0\n ) {\n classes.filter(\n function (_c1) {\n return isQCObjects_Class(_c1);\n }\n ).map(function (_class_) {\n _class_.__definition.__namespace = namespace;\n _class_.__namespace = namespace;\n });\n _QC_PACKAGES[namespace] = _QC_PACKAGES[namespace].concat(classes);\n } else if (typeof classes !== \"undefined\") {\n if (typeof classes === \"object\" && classes.hasOwnProperty.call(classes, \"length\")) {\n classes.filter(\n function (_c1) {\n return isQCObjects_Class(_c1);\n }\n ).map(function (_class_) {\n _class_.__definition.__namespace = namespace;\n _class_.__namespace = namespace;\n });\n } else if (isQCObjects_Class(classes)) {\n classes.__definition.__namespace = namespace;\n classes.__namespace = namespace;\n }\n _QC_PACKAGES[namespace] = classes;\n }\n if (Object.hasOwnProperty.call(_QC_PACKAGES, namespace)) {\n _QC_PACKAGES[namespace].map(function (_class_) {\n __register_class__(_class_, namespace);\n });\n }\n return (Object.hasOwnProperty.call(_QC_PACKAGES, namespace)) ? (_QC_PACKAGES[namespace]) : (undefined);\n };\n Package.prototype.toString = function () {\n return \"Package(namespace, classes) { [QCObjects native code] }\";\n };\n \n Package(\"com.qcobjects\",[Processor]);\n \n /**\n * Declare Namespace\n *\n * @param {String} packageName\n * @param {Object} package\n */\n var NamespaceRef = function (namespace) {\n let packageInstance = Package(namespace);\n let classes = packageInstance.filter(c => isQCObjects_Class(c)).map(c => {\n return {\n [c.__definition.__classType]: c\n };\n }).reduce((a, b) => Object.assign(a, b));\n return namespace.split(\".\").map(c => {\n return {\n [c]: classes\n };\n }).reverse().reduce((a, b) => {\n b[Object.keys(b)] = a;\n return b;\n });\n };\n \n \n /**\n * Imports a script with the package nomenclature\n *\n * @param {Object} packagename\n * @param {Object} ready\n * @param {Boolean} external\n */\n var Import = function () {\n var packagename;\n var ready = function () {};\n var external = false;\n if (arguments.length < 1) {\n return;\n } else if (arguments.length === 1) {\n packagename = arguments[0];\n } else if (arguments.length === 2) {\n packagename = arguments[0];\n ready = arguments[1];\n } else if (arguments.length > 2) {\n packagename = arguments[0];\n ready = arguments[1];\n external = arguments[2];\n logger.debug(\"[Import] Setting external=\" + external.toString() + \" resource to import: \" + packagename);\n }\n if (external) {\n logger.debug(\"[Import] Registering external resource to import: \" + packagename);\n } else {\n logger.debug(\"[Import] Registering local resource to import: \" + packagename);\n }\n var _promise_import_;\n if (isBrowser) {\n _promise_import_ = new Promise(function (resolve, reject) {\n \n var allPackagesImported = function () {\n var ret = false;\n var cp = 0;\n for (var p in _QC_PACKAGES) {\n cp++;\n }\n if (cp < _QC_PACKAGES_IMPORTED.length) {\n ret = false;\n } else {\n ret = true;\n }\n return ret;\n };\n \n var readyImported = function (e) {\n _QC_PACKAGES_IMPORTED.push(ready);\n if (allPackagesImported()) {\n _QC_PACKAGES_IMPORTED.map(function (_imported_) {\n _QC_READY_LISTENERS.push(_imported_);\n });\n }\n if (isBrowser && _top.CONFIG.get(\"removePackageScriptAfterLoading\")) {\n e.target.remove();\n }\n resolve.call(_promise_import_, {\n \"_imported_\": e.target,\n \"_package_name_\": packagename\n });\n };\n \n if (!_QC_PACKAGES.hasOwnProperty.call(_QC_PACKAGES, packagename)) {\n var s1 = _DOMCreateElement(\"script\");\n s1.type = _top.CONFIG.get(\"sourceType\", \"text/javascript\");\n s1.async = (_top.CONFIG.get(\"asynchronousImportsLoad\")) ? (true) : (false);\n s1.onreadystatechange = function () {\n if (s1.readyState === \"complete\") {\n readyImported.call();\n }\n };\n s1.onload = readyImported;\n s1.onerror = function (e) {\n reject.call(_promise_import_, {\n \"_imported_\": s1,\n \"_package_name_\": packagename\n });\n };\n s1.src = (external) ? (_top.CONFIG.get(\"remoteImportsPath\") + packagename + \".js\") : (_basePath_ + _top.CONFIG.get(\"relativeImportPath\") + packagename + \".js\");\n document.getElementsByTagName(\"head\")[0].appendChild(s1);\n }\n });\n _promise_import_.catch(function () {\n logger.debug(\"Import: Error loading a package \");\n });\n \n } else {\n // support to be used in a nodejs environment\n _promise_import_ = new Promise(function (resolve, reject) {\n try {\n var standardNodePath = findPackageNodePath(packagename);\n var packageAbsoluteName = \"\";\n if (standardNodePath !== null) {\n packageAbsoluteName = standardNodePath + \"/\" + packagename;\n } else {\n var jsNodePath = findPackageNodePath(packagename + \".js\");\n if (jsNodePath !== null) {\n packageAbsoluteName = jsNodePath + \"/\" + packagename + \".js\";\n } else {\n packageAbsoluteName = _basePath_ + _top.CONFIG.get(\"relativeImportPath\") + packagename;\n }\n }\n try {\n resolve.call(_promise_import_, {\n \"_imported_\": _require_(`${packageAbsoluteName}`),\n \"_package_name_\": packagename\n });\n } catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n } catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n }).catch(function (e) {\n // something wrong importing a package\n logger.debug(\"Something happened when importing \" + packagename);\n console.warn(e);\n });\n }\n _promise_import_.catch(function (e) {\n logger.warn(_DataStringify(e));\n });\n return _promise_import_;\n };\n Import.prototype.toString = function () {\n return \"Import(packagename,ready,external) { [QCObjects native code] }\";\n };\n \n if (isBrowser) {\n /**\n * Adds a Cast functionality to every Element of DOM\n */\n Element.prototype.Cast = function QC_Object(_o) {\n _o.__definition.body = this;\n var _o = New(_o);\n return _o;\n };\n }\n \n Class(\"TagElements\", Array, {\n show() {\n this.map(function (element) {\n return element.style.opacity = 1;\n });\n },\n hide() {\n this.map(function (element) {\n return element.style.opacity = 0;\n });\n },\n effect() {\n var effectArguments = [...arguments].slice(1);\n var effectClass = arguments[0];\n if ((typeof effectClass).toLowerCase() === \"string\") {\n effectClass = ClassFactory(effectClass);\n }\n this.map(function (element) {\n return effectClass.apply.apply(effectClass, [element].concat(effectArguments));\n });\n },\n findElements(elementName) {\n var _o = New(ClassFactory(\"TagElements\"));\n if (isBrowser) {\n for (var _k in this) {\n if (typeof _k === \"number\" && typeof this[_k] !== \"function\" && this[_k].hasOwnProperty.call(this[_k], \"subelements\")) {\n _o.push(this[_k].subelements(elementName));\n }\n }\n } else {\n // not yet implemented.\n }\n return _o;\n }\n });\n \n /**\n * Gets the element of DOM found by tag name\n *\n * @param {Object} tagname\n * @param {Object} innerHTML\n */\n var Tag = function (tagname, innerHTML) {\n var _o = New(ClassFactory(\"TagElements\"));\n if (isBrowser) {\n var o = document.subelements(tagname);\n var addedKeys = [];\n for (var _i = 0; _i < o.length; _i++) {\n if (typeof innerHTML !== \"undefined\" && o[_i].hasOwnProperty.call(o[_i], \"innerHTML\")) {\n o[_i].innerHTML = innerHTML;\n }\n if (addedKeys.indexOf(_i) < 0) {\n _o.push(o[_i]);\n addedKeys.push(_i);\n }\n }\n } else {\n // not yet implemented.\n }\n return _o;\n };\n \n /**\n * Defines a Custom Ready listener\n */\n function Ready(e) {\n if (isBrowser) {\n _QC_READY_LISTENERS.push(e.bind(window));\n } else if (typeof global !== \"undefined\") {\n _QC_READY_LISTENERS.push(e.bind(global));\n }\n }\n var ready = Ready; // case insensitive ready option\n \n /**\n * Default Ready event function for window. Executes all micro ready events of Import calls\n *\n * @param {Object} e\n */\n var _Ready = function (e) {\n var _execReady = function () {\n _QC_READY_LISTENERS.map(function (_ready_listener_, _r) {\n if (typeof _ready_listener_ === \"function\") {\n _ready_listener_.call();\n delete _QC_READY_LISTENERS[_r];\n }\n });\n };\n if (_top.CONFIG.get(\"delayForReady\") > 0) {\n if (isBrowser) {\n setTimeout(_execReady.bind(window), _top.CONFIG.get(\"delayForReady\"));\n } else if (typeof global !== \"undefined\") {\n setTimeout(_execReady.bind(global), _top.CONFIG.get(\"delayForReady\"));\n }\n } else {\n _execReady.call(_top);\n }\n };\n \n if (isBrowser) {\n window.onload = _Ready;\n if (is_phonegap) {\n document.addEventListener(\"deviceready\", _Ready, captureFalse);\n }\n } else {\n global.onload = _Ready;\n }\n \n /**\n * Dynamic Data Objects Class\n * Usage:\n * Class('TestDDO',{\n * data: {},\n * _new_ (){\n * this.ddo = New(DDO,{\n * instance:this,\n * name:'data',\n * value:{},\n * fget (value){\n * logger.debug('returned value '+ value );\n * }\n * })\n * }\n * });\n *\n */\n class DDO extends ClassFactory(\"InheritClass\") {\n constructor({\n instance,\n name,\n fget,\n fset,\n value\n }) {\n super({\n instance,\n name,\n fget,\n fset,\n value\n });\n this._new_({\n instance,\n name,\n fget,\n fset,\n value\n });\n \n }\n \n _new_({\n instance,\n name,\n fget,\n fset,\n value\n }) {\n var ddoInstance = this;\n var name = (typeof name === \"undefined\") ? (ObjectName(ddoInstance)) : (name);\n \n Object.defineProperty(instance, name, {\n set(val) {\n let _value = val;\n logger.debug(\"value changed \" + name);\n var ret;\n if (typeof fset !== \"undefined\" && typeof fset === \"function\") {\n ret = fset(_value);\n } else {\n ret = _value;\n }\n instance[\"_\" + name] = ret;\n return;\n },\n get() {\n let _value = instance[\"_\" + name];\n logger.debug(\"returning value \" + name);\n var is_ddo = function (v) {\n if (typeof v === \"object\" && Object.hasOwnProperty.call(v, \"value\")) {\n return v.value;\n }\n return v;\n };\n var ret;\n if (typeof fget !== \"undefined\" && typeof fget === \"function\") {\n ret = fget(is_ddo(_value));\n } else {\n ret = is_ddo(_value);\n }\n return ret;\n }\n });\n }\n \n }\n Export(DDO);\n \n class DefaultTemplateHandler {\n template= \"\";\n __definition = {};\n constructor ({component, template}){\n this.component = component;\n this.template = template;\n }\n assign(data) {\n var templateInstance = this;\n if (typeof templateInstance.component === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component is undefined\");\n }\n if (typeof templateInstance.component.processorHandler === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component.processorHandler is undefined\");\n }\n var processorHandler = templateInstance.component.processorHandler;\n processorHandler.component = templateInstance.component;\n var parsedAssignmentText = (typeof templateInstance.template !== \"undefined\") ? (templateInstance.template) : (\"\");\n if (typeof data === \"object\") {\n [...Object.keys(data)].map(function (k) {\n var _value = data[k];\n if (typeof _value === \"string\" || typeof _value === \"number\" || (!isNaN(_value))) {\n try {\n _value = Processor.processObject.bind(processorHandler).call(processorHandler, _value, templateInstance.component);\n parsedAssignmentText = parsedAssignmentText.replace((new RegExp(`{{${k}}}`, \"g\")), _value);\n } catch (e) {\n logger.warn(`${templateInstance.component.name} could not parse processors.`);\n throw Error (`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);\n }\n }\n });\n } else {\n logger.debug(`${templateInstance.component.name}.data is not an object`);\n }\n try {\n parsedAssignmentText = Processor.processObject.call(processorHandler, parsedAssignmentText, templateInstance.component);\n }catch (e){\n logger.warn(`${templateInstance.component.name} could not parse processors.`);\n throw Error (`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);\n }\n return parsedAssignmentText;\n }\n \n }\n DefaultTemplateHandler.__definition = {};\n RegisterClass(DefaultTemplateHandler,\"com.qcobjects\");\n \n var __routing_params__ = function (routing, routingPath) {\n let standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\"); //allowing {param}\n return {\n ...[...routingPath.matchAll((new RegExp(standardRoutingPath, \"g\")))][0][\"groups\"]\n };\n };\n \n var __valid_routings__ = function (routings, routingPath) {\n return routings.filter(function (routing) {\n var standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\");\n return (new RegExp(standardRoutingPath, \"g\")).test(routingPath);\n }).reverse();\n };\n var __valid_routing_way__ = function (validRoutingWays, routingWay) {\n return validRoutingWays.includes(routingWay);\n };\n \n var _buildComponentFromElement_ = function (element, __parent__){\n var __shadowed_not_set = (element.getAttribute(\"shadowed\") === null) ? (true) : (false);\n var __tplsource_attr_not_set = (element.getAttribute(\"template-source\") === null) ? (true) : (false);\n var shadowed = (element.getAttribute(\"shadowed\") === \"true\") ? (true) : (false);\n var __cached_not_set = (element.getAttribute(\"cached\") === null) ? (true) : (false);\n var cached = (element.getAttribute(\"cached\") === \"true\") ? (true) : (false);\n var tplextension = (typeof _top.CONFIG.get(\"tplextension\") !== \"undefined\") ? (_top.CONFIG.get(\"tplextension\")) : (\"html\");\n tplextension = (element.getAttribute(\"tplextension\") !== null) ? (element.getAttribute(\"tplextension\")) : (tplextension);\n var _componentName = element.getAttribute(\"name\");\n var _componentClassName = (element.getAttribute(\"componentClass\") !== null) ? (element.getAttribute(\"componentClass\")) : (\"Component\");\n let __componentClassName = (_top.CONFIG.get(\"preserveComponentBodyTag\")) ? (\n (_componentName !== null) ? (\"com.qcobjects.components.\" + _componentName + \".ComponentBody\") : (\"com.qcobjects.components.ComponentBody\")\n ) : (_componentClassName);\n _componentName = (_componentName !== null) ? (_componentName) : (\n (ClassFactory(__componentClassName) &&\n typeof ClassFactory(__componentClassName).name !== \"undefined\"\n ) ? (\n ClassFactory(__componentClassName).name\n ) : (\"\")\n );\n var __classDefinition = ClassFactory(__componentClassName);\n var __tplsource_prop_set = (__componentClassName !== \"Component\" && ((typeof __classDefinition !== \"undefined\" && typeof __classDefinition.tplsource === \"string\") && __classDefinition.tplsource !== \"\")) ? (true) : (false);\n var tplsource = (__tplsource_attr_not_set && __tplsource_prop_set) ? (__classDefinition.tplsource) : ((__tplsource_attr_not_set) ? (\"default\") : (element.getAttribute(\"template-source\")));\n logger.debug(`template source for ${_componentName} is ${tplsource} `);\n logger.debug(`type for ${_componentName} is ${__getType__(__classDefinition)} `);\n \n var componentURI;\n componentURI = ComponentURI({\n \"COMPONENTS_BASE_PATH\": _top.CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": _componentName,\n \"TPLEXTENSION\": tplextension,\n \"TPL_SOURCE\": tplsource\n });\n if (_top.CONFIG.get(\"preserveComponentBodyTag\")) {\n Package((_componentName !== \"\") ? (\"com.qcobjects.components.\" + _componentName + \"\") : (\"com.qcobjects.components\"), [\n Class(\"ComponentBody\", ClassFactory(\"Component\"), {\n name: _componentName,\n tplsource: tplsource,\n tplextension: tplextension,\n reload: true\n })\n ]);\n }\n \n var __create_component_instance_ = function () {\n var __shadowed = (__shadowed_not_set) ? ((__classDefinition && __classDefinition.shadowed) || ClassFactory(\"Component\").shadowed) : (shadowed);\n var __definition = {\n __parent__: __parent__,\n name: _componentName,\n cached: (__cached_not_set) ? (ClassFactory(\"Component\").cached) : (cached),\n shadowed: __shadowed,\n tplextension: tplextension,\n body: (_top.CONFIG.get(\"preserveComponentBodyTag\")) ? (_DOMCreateElement(\"componentBody\")) : (element),\n templateURI: componentURI,\n tplsource: tplsource\n };\n if (typeof _componentName === \"undefined\" || _componentName === \"\" || _componentName === null) {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete __definition.name;\n }\n if (componentURI === \"\") {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete __definition.templateURI;\n }\n var newComponent = New(__classDefinition, __definition);\n \n if (_top.CONFIG.get(\"preserveComponentBodyTag\")) {\n element.append(newComponent);\n }\n return newComponent;\n };\n var newComponent = __create_component_instance_.call(this);\n return newComponent;\n };\n \n var _buildComponentsFromElements_ = function (elements, __parent__) {\n var componentsBuiltWith = [];\n if (isBrowser){\n componentsBuiltWith = elements.map(\n function(element){\n return _buildComponentFromElement_(element, __parent__);\n }\n );\n } else {\n logger.debug(\"[_buildComponentsFromElements_] not implemented for Non-Browser environments\");\n }\n return componentsBuiltWith;\n };\n \n \n Package(\"com.qcobjects\", [\n class Component extends ClassFactory(\"InheritClass\") {\n validRoutingWays= [\"pathname\", \"hash\", \"search\"];\n basePath= _basePath_;\n domain= _domain_;\n templateHandler= \"DefaultTemplateHandler\";\n processorHandler= null;\n routingWay= null;\n routingNodes= [];\n routings= [];\n routingPath= \"\";\n routingPaths=[];\n _componentHelpers= [];\n subcomponents=[];\n splashScreenComponent=undefined;\n controller=undefined;\n view=undefined;\n effect=undefined;\n method = \"GET\";\n cached= true;\n __promise__ = null;\n __namespace = undefined;\n \n constructor ({\n templateURI= \"\",\n template,\n tplsource= \"default\",\n url= \"\",\n name= \"\",\n method= \"GET\",\n data= {},\n reload= false,\n shadowed= false,\n cached= true,\n _body=_DOMCreateElement(\"div\"),\n __promise__= null,\n __shadowRoot,\n body,\n shadowRoot,\n splashScreenComponent,\n controller,\n view\n }){\n super(...arguments);\n var self = this;\n \n if (typeof self.name === \"undefined\") {\n logger.warn(\"A name is not defined for \" + __getType__(self));\n }\n \n self.routingWay = _top.CONFIG.get(\"routingWay\");\n \n self.processorHandler = New(Processor, {\n component: self\n });\n \n /* assign body data attributes to data */\n self.data = (typeof self.data === \"undefined\" || self.data === null)?({}):(self.data);\n self.data = Object.assign(self.data, self.dataAttributes);\n \n self.createServiceInstance()\n .then(function (serviceResponse){\n if (typeof self.__new__ === \"function\") {\n self.__new__.call(self, self);\n }\n \n self._generateRoutingPaths(self.body)\n .then(function (){\n self._reroute_()\n .then(function () {\n return self.rebuild()\n .then(function () {\n logger.info(`Component._new_ The component ${self.name} was built successfully!`);\n }).catch(function (standardResponse) {\n logger.warn(`Component._new_ Something went wrong building the component ${self.name}`);\n console.error(standardResponse);\n });\n });\n });\n \n });\n \n }\n \n set body(value) {\n var self = this;\n self._body = value;\n }\n \n get body() {\n var self= this;\n return self._body;\n }\n \n set cacheIndex(value) {\n // readonly\n logger.debug(\"[cacheIndex] This property is readonly\");\n }\n \n get cacheIndex() {\n var self= this;\n var __routing_path__ = _DataStringify(self.routingPath);\n return Base64.encode(self.name + __routing_path__);\n }\n \n set parsedAssignmentText(value) {\n // readonly\n logger.debug(\"[parsedAssignmentText] This property is readonly\");\n }\n \n get parsedAssignmentText() {\n var self= this;\n self._parsedAssignmentText = self.parseTemplate(self.template);\n if (typeof self._parsedAssignmentText === \"undefined\"){\n throw Error (`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);\n }\n return self._parsedAssignmentText;\n }\n \n \n set shadowRoot(value) {\n var self= this;\n if (typeof self.__shadowRoot == \"undefined\") {\n self.__shadowRoot = value;\n } else {\n logger.debug(\"[shadowRoot] This property can only be assigned once!\");\n }\n }\n \n get shadowRoot() {\n var self= this;\n return self.__shadowRoot;\n }\n \n \n set routingSelected(value){\n logger.debug(\"[routingSelected] This is a read-only property of the component\");\n }\n \n get routingSelected (){\n var self= this;\n return __valid_routings__(self.routings, self.routingPath);\n }\n \n set routingParams (value){\n logger.debug(\"[routingParams] This is a read-only property of the component\");\n }\n \n get routingParams (){\n var component = this;\n return [{}].concat(component.routingSelected.map(function (routing) {\n return __routing_params__(routing, component.routingPath);\n })).reduce(function (accumulator, colData, index) {\n return Object.assign(accumulator, colData);\n });\n }\n \n createServiceInstance (){\n var component = this;\n var body = component.body;\n var data = this.data;\n var __serviceClass;\n var __classDefinition = component.getClass().__definition;\n var _serviceClassName = (isBrowser && body.getAttribute(\"serviceClass\") !== null) ? (body.getAttribute(\"serviceClass\")) : (null);\n \n return new Promise (function (resolve, reject){\n /* __enable_service_class__ = true by default */\n var __enable_service_class__ = (\n (Object.hasOwnProperty.call(body, \"enableServiceClass\") && body.enableServiceClass) ||\n (!Object.hasOwnProperty.call(body, \"enableServiceClass\"))\n ) ? (true) : (false);\n var _response_to_data_ = (isBrowser && body.getAttribute(\"response-to\") !== null && body.getAttribute(\"response-to\") === \"data\") ? (true) : (false);\n var _response_to_template_ = (isBrowser && body.getAttribute(\"response-to\") !== null && body.getAttribute(\"response-to\") === \"template\") ? (true) : (false);\n \n if (__enable_service_class__ && _serviceClassName !== null) {\n __serviceClass = ClassFactory(_serviceClassName);\n }\n if (!_response_to_data_ && __classDefinition && Object.hasOwnProperty.call(__classDefinition, \"responseTo\")) {\n _response_to_data_ = (__classDefinition.responseTo === \"data\") ? (true) : (false);\n } else if (!_response_to_data_ && Object.hasOwnProperty.call(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_data_ = (ClassFactory(\"Component\").responseTo === \"data\") ? (true) : (false);\n }\n if (!_response_to_template_ && __classDefinition && Object.hasOwnProperty.call(__classDefinition, \"responseTo\")) {\n _response_to_template_ = (__classDefinition.responseTo === \"template\") ? (true) : (false);\n } else if (!_response_to_template_ && Object.hasOwnProperty.call(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_template_ = (ClassFactory(\"Component\").responseTo === \"template\") ? (true) : (false);\n }\n \n if (typeof __serviceClass !== \"undefined\" &&\n (typeof __enable_service_class__ !== \"undefined\" &&\n __enable_service_class__ === true) &&\n (_response_to_data_ || _response_to_template_)\n ) {\n logger.info(\"Loading service \" + _serviceClassName);\n var serviceInstance = New(__serviceClass, {\n data: data\n });\n serviceLoader(serviceInstance).then(function ({\n request,\n service\n }) {\n var serviceResponse;\n if (typeof service.JSONresponse !== \"undefined\" && service.JSONresponse !== null){\n serviceResponse = service.JSONresponse;\n } else {\n serviceResponse = service.template;\n }\n if (_response_to_data_) {\n if (typeof data === \"object\" && typeof serviceResponse === \"object\") {\n data = Object.assign(data, serviceResponse);\n } else {\n data = serviceResponse;\n }\n component.data = data;\n }\n component.serviceInstance = serviceInstance;\n component.serviceData = data;\n \n if (_response_to_template_) {\n component.template = serviceResponse;\n }\n resolve (serviceResponse);\n }, function (rejectedResponse){\n logger.debug(`Service loading rejected for ${_serviceClassName} in ${component.name}`);\n reject (rejectedResponse);\n } ).catch(function (e) {\n logger.debug(\"Something went wroing while trying to load the service \" + _serviceClassName);\n throw Error (`Error loading ${_serviceClassName} for ${component.name}. Detail: ${e}`);\n });\n } else {\n resolve(null);\n }\n });\n }\n \n _bindroute_ () {\n var _component_ = this;\n if (!_component_._bindroute_.loaded){\n if (isBrowser) {\n \n _component_.hostElements(\"a\").map(function (a) {\n a.oldclick = a.onclick;\n a.onclick = function (e) {\n var _ret_ = true;\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n var routingWay = _top.CONFIG.get(\"routingWay\");\n var routingPath = e.target[routingWay];\n if (_top.global.get(\"routingPaths\").includes(routingPath) &&\n e.target[routingWay] !== document.location[routingWay] &&\n e.target.href !== document.location.href\n ) {\n logger.debug(\"A ROUTING WAS FOUND: \" + routingPath);\n window.history.pushState({\n href: e.target.href\n }, e.target.href, e.target.href);\n ClassFactory(\"Component\").route();\n _ret_ = false;\n } else {\n logger.debug(\"NO ROUTING FOUND FOR: \" + routingPath);\n }\n if (typeof e.target.oldclick !== \"undefined\" && typeof e.target.oldclick === \"function\") {\n e.target.oldclick.call(e.target, e);\n }\n return _ret_;\n };\n return null;\n });\n \n } else {\n // not yet implemented.\n }\n this._bindroute_.loaded = true;\n } else {\n logger.debug(`Routes already bound to popstate events for ${_component_.name}`);\n }\n \n }\n \n done(standardResponse) {\n var _ret_;\n if (typeof standardResponse !== \"undefined\"){\n var {request, component} = standardResponse;\n _ret_ = Promise.resolve({request, component});\n }\n return _ret_;\n }\n \n createControllerInstance (){\n var _Controller;\n if (isBrowser){\n if (typeof this.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n var controllerName = this.body.getAttribute(\"controllerClass\");\n if (!controllerName) {\n controllerName = \"Controller\";\n }\n _Controller = ClassFactory(controllerName);\n if (typeof _Controller !== \"undefined\"){\n this.controller = New(_Controller, {\n component: this\n });\n }\n \n }\n \n return new Promise ( (resolve, reject) => {\n if (isBrowser){\n if (typeof _Controller !== \"undefined\" && typeof this.controller !== \"undefined\") {\n if (typeof this.controller.done === \"function\") {\n try {\n this.controller.done.call(this.controller);\n } catch (e){\n throw Error (e);\n }\n } else {\n logger.debug(`${controllerName} does not have a done() method.`);\n reject(`${controllerName} does not have a done() method.`);\n }\n if (typeof this.controller.createRoutingController === \"function\") {\n this.controller.createRoutingController.call(this.controller);\n } else {\n logger.debug(`${controllerName} does not have a createRoutingController() method.`);\n }\n }\n }\n resolve ({component:this,controller:this.controller});\n });\n }\n \n createEffectInstance (){\n var _component_ = this;\n return new Promise (function (resolve, reject){\n if (isBrowser){\n var effectClassName = _component_.body.getAttribute(\"effectClass\");\n var applyEffectTo = _component_.body.getAttribute(\"apply-effect-to\");\n applyEffectTo = (applyEffectTo !== null) ? (applyEffectTo) : (\"load\");\n if (effectClassName !== null && applyEffectTo === \"observe\") {\n _component_.applyObserveTransitionEffect(effectClassName);\n } else if (effectClassName !== null && applyEffectTo === \"load\") {\n _component_.applyTransitionEffect(effectClassName);\n }\n }\n resolve({component:_component_, effect:_component_.effect});\n });\n }\n \n createViewInstance(){\n var _component_ = this;\n return new Promise (function (resolve, reject){\n var viewName = (isBrowser)?(_component_.body.getAttribute(\"viewClass\")):(null);\n if (viewName !== null){\n var _View = ClassFactory(viewName);\n if (typeof _View !== \"undefined\") {\n _component_.view = New(_View, {\n component: _component_\n }); // Initializes the main view for the component\n if (Object.hasOwnProperty.call(_component_.view, \"done\") && typeof _component_.view.done === \"function\") {\n _component_.view.done.call(_component_.view);\n }\n }\n \n }\n resolve({component:_component_, view:_component_.view});\n \n });\n }\n \n __done__ () {\n var _component_ = this;\n var componentDone = function () {\n if (typeof _component_ === \"undefined\") {\n throw new Error(\"componentDone() has lost its context\");\n }\n if (typeof _component_.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n _component_.createViewInstance();\n _component_.createControllerInstance();\n _component_.createEffectInstance();\n \n logger.debug(`Trying to run component helpers for ${_component_.name}...`);\n try {\n _component_.runComponentHelpers();\n logger.debug(`Component helpers for ${_component_.name} executed.`);\n } catch (e){\n logger.debug(`Component helpers for ${_component_.name} could not be executed.`);\n throw Error(e);\n }\n \n _component_.subcomponents = _component_.__buildSubComponents__();\n \n _component_._bindroute_();\n _component_.body.setAttribute(\"loaded\", true);\n };\n \n return new Promise (function (resolve, reject){\n try {\n Promise.resolve(componentDone.call(_component_));\n } catch (e){\n reject(e);\n }\n });\n \n }\n \n hostElements(tagFilter){\n var _component_ = this;\n var elementList = (_component_.shadowed && (typeof _component_.shadowRoot !== \"undefined\"))?(\n _component_.shadowRoot.subelements(tagFilter)\n ):(\n _component_.body.subelements(tagFilter)\n );\n return elementList;\n }\n \n get subtags(){\n var _component_ = this;\n var tagFilter = _tag_filter_;\n return _component_.hostElements(tagFilter);\n }\n \n get bodyAttributes() {\n var _component_ = this;\n var c = _component_.body;\n return (isBrowser)?([...c.getAttributeNames()].map (a => {return {[a]:c.getAttribute(a)};}).reduce ((accumulator,colData, index) => {return Object.assign(accumulator, colData);} )):({});\n }\n \n get dataAttributes(){\n var _component_ = this;\n var c = _component_.body;\n return (isBrowser)?([{}].concat([...c.getAttributeNames()].filter(n=>n.startsWith(\"data-\")).map (a => {return {[a.split(\"-\")[1]]:c.getAttribute(a)};})).reduce ((accumulator,colData, index) => {return Object.assign(accumulator, colData);} )):({});\n }\n \n __buildSubComponents__ (rebuildObjects = false) {\n var _component_ = this;\n var elementList = _component_.subtags;\n if (!rebuildObjects){\n elementList = elementList.filter(t=>t.getAttribute(\"loaded\") !== \"true\");\n }\n if ((typeof _component_ !== \"undefined\") || _component_.subcomponents.length<1){\n _component_.subcomponents = _buildComponentsFromElements_(elementList, _component_);\n }\n return _component_.subcomponents;\n }\n \n fail(standardResponse) {\n var _ret_;\n if (typeof standardResponse !== \"undefined\"){\n var {error, component} = standardResponse;\n _ret_ = Promise.resolve({error, component});\n }\n return _ret_;\n }\n \n set(name, value) {\n this[name] = value;\n }\n \n get(name) {\n return this[name];\n }\n \n feedComponent() {\n var _component_ = this;\n logger.debug(`[Component][${this.name}][feedComponent] start feeding component...`);\n var _feedComponent_InBrowser = function (_component_) {\n if (typeof _component_.container === \"undefined\" && typeof _component_.body === \"undefined\") {\n logger.warn(\"COMPONENT {{NAME}} has an undefined container and body\".replace(\"{{NAME}}\", _component_.name));\n return;\n }\n var container = (typeof _component_.container === \"undefined\" || _component_.container === null) ? (_component_.body) : (_component_.container);\n var parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n if (_component_.shadowed) {\n logger.debug(\"COMPONENT {{NAME}} is shadowed\".replace(\"{{NAME}}\", _component_.name));\n logger.debug(\"Preparing slots for Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n var tmp_shadowContainer = _DOMCreateElement(\"div\");\n container.subelements(\"[slot]\").map(\n function (c) {\n if (c.parentElement === container) {\n tmp_shadowContainer.appendChild(c);\n }\n });\n logger.debug(\"Creating shadowedContainer for COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n var shadowContainer = _DOMCreateElement(\"div\");\n shadowContainer.classList.add(\"shadowHost\");\n try {\n _component_.shadowRoot = shadowContainer.attachShadow({\n mode: \"open\"\n });\n } catch (e) {\n try {\n logger.debug(\"Shadowed COMPONENT {{NAME}} is repeated\".replace(\"{{NAME}}\", _component_.name));\n _component_.shadowRoot = shadowContainer.shadowRoot;\n } catch (e) {\n logger.warn(\"Shadowed COMPONENT {{NAME}} is not allowed on this browser\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n if (typeof _component_.shadowRoot !== \"undefined\" && _component_.shadowRoot !== null) {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n shadowContainer.shadowRoot.innerHTML = _component_.innerHTML;\n } else {\n tmp_shadowContainer.innerHTML = _component_.parseTemplate(tmp_shadowContainer.innerHTML);\n logger.debug(\"ADDING Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n shadowContainer.shadowRoot.innerHTML += _component_.innerHTML;\n }\n logger.debug(\"ADDING Slots to Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n shadowContainer.innerHTML += tmp_shadowContainer.innerHTML;\n logger.debug(\"APPENDING Shadowed COMPONENT {{NAME}} to Container \".replace(\"{{NAME}}\", _component_.name));\n var qs = container.querySelector(\".shadowHost\");\n if (!(typeof qs !== \"undefined\" && qs !== null)) {\n container.appendChild(shadowContainer);\n } else {\n logger.debug(\"Shadowed Container for COMPONENT {{NAME}} is already present in the tree \".replace(\"{{NAME}}\", _component_.name));\n _component_.shadowRoot.innerHTML = shadowContainer.shadowRoot.innerHTML;\n }\n } else {\n logger.warn(\"Shadowed COMPONENT {{NAME}} is bad configured\".replace(\"{{NAME}}\", _component_.name));\n }\n } else {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML = _component_.innerHTML;\n } else if (container && _component_) {\n logger.debug(\"ADDING COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML += _component_.innerHTML;\n } else {\n logger.warn(\"COMPONENT {{NAME}} is not added to the DOM\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n \n };\n \n var _feedComponent_InNode = function (_component_) {\n var parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n };\n \n var _ret_;\n if (!is_a(_component_, \"Component\")) {\n logger.warn(\"Trying to feed a non component object\");\n return;\n }\n if (isBrowser) {\n _ret_ = _feedComponent_InBrowser(_component_);\n } else {\n _ret_ = _feedComponent_InNode(_component_);\n }\n return _ret_;\n }\n \n rebuild() {\n var _component = this;\n var _promise = new Promise(function (resolve, reject) {\n if (typeof _component === \"undefined\" || _component === null) {\n reject(\"Component is undefined\");\n }\n if (isQCObjects_Object(_component) && is_a(_component, \"Component\")) {\n switch (true) {\n case (_component.get(\"tplsource\") === \"none\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=none, so no template load was done\");\n var standardResponse = {\n request: null,\n component: _component\n };\n _component.__done__().then(function (){\n if (typeof _component.done === \"function\") {\n _component.done.call(_component, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n }, function (){\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"inline\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=inline, so it is assumed that template is already declared\");\n (async function (_component){\n _component.feedComponent.bind(_component)();\n })(_component);\n var standardResponse = {\n request: null,\n component: _component\n };\n _component.__done__().then(function (){\n if (typeof _component.done === \"function\") {\n _component.done.call(_component, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n }, function (){\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"default\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"basePath\") + _component.get(\"templateURI\"));\n componentLoader(_component, false).then(\n function (standardResponse) {\n resolve.call(_promise, standardResponse);\n },\n function (standardResponse) {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"external\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"templateURI\"));\n componentLoader(_component, false).then(\n function (standardResponse) {\n resolve.call(_promise, standardResponse);\n },\n function (standardResponse) {\n reject.call(_promise, standardResponse);\n });\n break;\n case _component.get(\"tplsource\") === \"default\" && _component.get(\"templateURI\", \"\") === \"\":\n logger.debug(`Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n reject.call(_promise, `Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n break;\n default:\n logger.debug(\"Component \" + _component.name + \" will not be rebuilt because no templateURI is present\");\n reject.call(_promise, {\n request: null,\n component: _component\n });\n break;\n }\n \n }\n });\n return _promise;\n }\n \n Cast(oClass) {\n /* Cast method for components has been deprecated. Don't use this method, it is available only for compatibility purposes */\n let o = _methods_(oClass).map(m => m.name.replace(/bound /g, \"\")).map(m => {\n return {\n [m]: oClass[m].bind(this)\n };\n }).reduce((c, p) => Object.assign(c, p), {});\n return _Cast(this, o);\n }\n \n static route() {\n var componentClass = this; /* is can be class or object*/\n var _route_promise_;\n var isValidInstance = ( isQCObjects_Object(componentClass) && is_a(componentClass,\"Component\") ) ? (true) : (false);\n var __route__ = function (componentList) {\n var _componentNames_ = [];\n var _promises_ = componentList.filter(function (rc) {\n return typeof rc !== \"undefined\";\n }).map(function (rc) {\n if (typeof rc.name !== \"undefined\") {\n _componentNames_.push(rc.name);\n } else {\n throw new Error(__getType__(rc) + \" does not have a name\");\n }\n return new Promise(function (resolve, reject) {\n var _promise_;\n if (typeof rc !== \"undefined\" && !!rc._reroute_) {\n _promise_ = rc._reroute_()\n .then(function () {\n rc.reload = true;\n return rc.rebuild();\n })\n .then(function (_rc_) {\n if (Object.hasOwnProperty.call(rc, \"subcomponents\") &&\n typeof rc.subcomponents !== \"undefined\" &&\n rc.subcomponents.length > 0\n ) {\n logger.debug(\"LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: \" + rc.name);\n return __route__.call(rc, rc.subcomponents);\n } else {\n logger.debug(\"No subcomponents to look for routings in: \" + rc.name);\n if (rc.subtags.length>0){\n rc.subcomponents = rc.__buildSubComponents__(true);\n }\n resolve(rc);\n }\n });\n } else if (typeof rc !== \"undefined\") {\n reject(\"Component \" + rc.name + \" is not an instance of Component\");\n }\n return _promise_;\n });\n });\n return Promise.all(_promises_)\n .then(function () {\n logger.debug(\"ROUTING COMPLETED FOR \" + _componentNames_.join(\", \"));\n }).catch(function (err) {\n logger.warn(\"ROUTING FAILED FOR \" + _componentNames_.join(\", \") + \": \" + err);\n });\n };\n if (isValidInstance || !!_top.componentsStack) {\n if (isValidInstance) {\n logger.debug(\"loading routings for instance \" + componentClass.name);\n }\n _route_promise_ = __route__.call(componentClass, (isValidInstance) ? (componentClass.subcomponents) : (_top.componentsStack));\n } else {\n logger.debug(\"An undetermined result expected if load routings. So will not be loaded this time.\");\n throw Error (`There is no valid instance and no components stack available to apply rountings`);\n }\n return _route_promise_;\n }\n \n fullscreen() {\n if (isBrowser) {\n var elem = this.body;\n if (elem.requestFullscreen) {\n elem.requestFullscreen();\n } else if (elem.mozRequestFullScreen) {\n /* Firefox */\n elem.mozRequestFullScreen();\n } else if (elem.webkitRequestFullscreen) {\n /* Chrome, Safari & Opera */\n elem.webkitRequestFullscreen();\n } else if (elem.msRequestFullscreen) {\n /* IE/Edge */\n elem.msRequestFullscreen();\n }\n } else {\n // not yet implemented.\n }\n }\n \n closefullscreen() {\n if (isBrowser) {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n } else if (document.msExitFullscreen) {\n document.msExitFullscreen();\n }\n } else {\n // noy yet implemented.\n }\n }\n \n _generateRoutingPaths(componentBody) {\n var component = this;\n return new Promise(function (resolve, reject){\n if (isBrowser) {\n if (__valid_routing_way__(component.validRoutingWays, component.routingWay)) {\n if (typeof componentBody !== \"undefined\") {\n component.innerHTML = componentBody.innerHTML;\n component.routingNodes = componentBody.subelements(\"routing\");\n component.routings = [];\n component.routingNodes.map(function (routingNode, r) {\n var attributeNames = routingNode.getAttributeNames();\n var routing = {};\n attributeNames.map(function (attributeName, a) {\n routing[attributeNames[a]] = routingNode.getAttribute(attributeNames[a]);\n });\n component.routings.push(routing);\n if (!component.routingPaths) {\n component.routingPaths = [];\n }\n if (!component.routingPaths.includes(routing.path)) {\n component.routingPaths.push(routing.path);\n }\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n if (!_top.global.get(\"routingPaths\").includes(routing.path)) {\n _top.global.get(\"routingPaths\").push(routing.path);\n }\n });\n }\n }\n } else {\n // not yet implemented.\n }\n resolve();\n \n });\n }\n \n parseTemplate(template) {\n var _self = this;\n var _parsedAssignmentText;\n var value = template;\n if (Object.hasOwnProperty.call(_self, \"templateHandler\")) {\n var templateHandlerName = _self.templateHandler;\n logger.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${templateHandlerName} ...`);\n var templateHandlerClass = ClassFactory(templateHandlerName);\n var templateInstance = New(templateHandlerClass, {\n component: _self,\n template: value\n });\n templateInstance.component = _self;\n var selfData = _self.data;\n if (Object.hasOwnProperty.call(_self, \"assignRoutingParams\") && _self.assignRoutingParams) {\n try {\n selfData = Object.assign(selfData, _self.routingParams);\n } catch (e) {\n logger.debug(\"[parseTemplate] it was not possible to assign the routing params to the template\");\n }\n }\n _parsedAssignmentText = templateInstance.assign(selfData);\n } else {\n logger.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`);\n _parsedAssignmentText = value;\n }\n return _parsedAssignmentText;\n }\n \n _reroute_() {\n /* This method set the selected routing and makes the switch to the templateURI */\n var rc = this;\n return new Promise(function (resolve, reject) {\n if (isBrowser) {\n if (__valid_routing_way__(rc.validRoutingWays, rc.routingWay)) {\n rc.routingPath = document.location[rc.routingWay];\n rc.routingSelected.map(function (routing, r) {\n var componentURI = ComponentURI({\n \"COMPONENTS_BASE_PATH\": _top.CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": routing.name.toString(),\n \"TPLEXTENSION\": (Object.hasOwnProperty.call(routing, \"tplextension\")) ? (routing.tplextension) : (rc.tplextension),\n \"TPL_SOURCE\": \"default\" /* here is always default in order to get the right uri */\n });\n rc.templateURI = componentURI;\n });\n if (rc.routingSelected.length > 0) {\n rc.template = \"\";\n rc.body.innerHTML = \"\";\n }\n }\n }\n resolve(rc);\n \n });\n }\n \n lazyLoadImages() {\n if (isBrowser) {\n var component = this;\n var _componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n var _imgLazyLoaded = [..._componentRoot.subelements(\"img[lazy-src]\")];\n var _lazyLoadImages = function (image) {\n image.setAttribute(\"src\", image.getAttribute(\"lazy-src\"));\n image.onload = () => {\n image.removeAttribute(\"lazy-src\");\n };\n };\n if (\"IntersectionObserver\" in window) {\n var observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _lazyLoadImages(item.target);\n observer.unobserve(item.target);\n }\n });\n });\n _imgLazyLoaded.map(function (img) {\n return observer.observe(img);\n });\n } else {\n _imgLazyLoaded.map(_lazyLoadImages);\n }\n \n } else {\n // not yet implemented\n }\n return null;\n }\n \n applyTransitionEffect(effectClassName) {\n var _Effect = ClassFactory(effectClassName);\n if (typeof _Effect === \"undefined\" ){\n throw Error (`${effectClassName} not found.`);\n }\n if (typeof _Effect !== \"undefined\" && is_a(_Effect, \"TransitionEffect\")) {\n this.effect = New(_Effect, {\n component: this\n });\n this.effect.apply(this.effect.defaultParams);\n } else {\n logger.debug(`${effectClassName} is ${__getType__(_Effect)} but is not a TransitionEffect`);\n }\n }\n \n applyObserveTransitionEffect(effectClassName) {\n if (isBrowser) {\n var component = this;\n var _componentRoot = (component.shadowed) ? (component.shadowRoot.host) : (component.body);\n var _applyEffect_ = function (element) {\n component.applyTransitionEffect(effectClassName);\n };\n if (\"IntersectionObserver\" in window) {\n var observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _applyEffect_(item.target);\n observer.unobserve(item.target);\n }\n });\n });\n observer.observe(_componentRoot);\n } else {\n _applyEffect_(_componentRoot);\n }\n } else {\n // not yet implemented\n }\n return null;\n }\n \n scrollIntoHash() {\n if (isBrowser) {\n var component = this;\n if (document.location.hash !== \"\") {\n var _componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n _componentRoot.subelements(document.location.hash).map(\n function (element) {\n if (typeof element.scrollIntoView === \"function\") {\n element.scrollIntoView(\n _top.CONFIG.get(\"scrollIntoHash\", {\n behavior: \"auto\",\n block: \"top\",\n inline: \"top\"\n })\n );\n }\n }\n );\n }\n } else {\n // not yet implemented\n }\n }\n \n i18n_translate() {\n if (isBrowser) {\n if (_top.CONFIG.get(\"use_i18n\")) {\n var component = this;\n var _componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n var lang1 = _top.CONFIG.get(\"lang\", \"en\");\n var lang2 = navigator.language.slice(0, 2);\n var i18n = _top.global.get(\"i18n\");\n if ((lang1 !== lang2) && (typeof i18n === \"object\" && Object.hasOwnProperty.call(i18n, \"messages\"))) {\n var callback_i18n = function () {\n var component = this;\n return new Promise(function (resolve, reject) {\n var messages = i18n.messages.filter(function (message) {\n return Object.hasOwnProperty.call(message, lang1) && Object.hasOwnProperty.call(message, lang2);\n });\n _componentRoot.subelements(\"ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component\")\n .map(function (element) {\n messages.map(function (message) {\n var _innerHTML = element.innerHTML;\n _innerHTML = _innerHTML.replace(new RegExp(`${message[lang1]}`, \"g\"), message[lang2]);\n element.innerHTML = _innerHTML;\n return null;\n });\n return element;\n });\n resolve();\n });\n };\n callback_i18n.call(component).then(function () {\n logger.debug(\"i18n loaded for component: \" + component.name);\n });\n \n }\n }\n } else {\n // not yet implemented\n }\n }\n \n addComponentHelper(componentHelper) {\n var component = this;\n component._componentHelpers.push(componentHelper);\n }\n \n runComponentHelpers() {\n if (isBrowser) {\n var component = this;\n var __component_helpers__ = [];\n /*\n * BEGIN use i18n translation\n */\n __component_helpers__.push(component.i18n_translate.bind(component));\n /*\n * END use i18n translation\n */\n \n /*\n * BEGIN component scrollIntoHash\n */\n __component_helpers__.push(component.scrollIntoHash.bind(component));\n /*\n * END component scrollIntoHash\n */\n \n /*\n * BEGIN component images lazy-load\n */\n \n __component_helpers__.push(component.lazyLoadImages.bind(component));\n \n /*\n * END component images lazy-load\n */\n \n __component_helpers__ = __component_helpers__.concat(component._componentHelpers);\n \n __component_helpers__.map(\n function (_component_helper_) {\n logger.debug(`Executing ${_component_helper_.name} as component helper for ${component.name}...`);\n _component_helper_();\n }\n );\n \n } else {\n // not yet implemented\n }\n \n }\n \n }\n \n ]);\n \n (_methods_)(ClassFactory(\"Component\")).map(function (__c__) {\n (_protected_code_)(__c__);\n });\n \n if (isBrowser){\n window.addEventListener(\"popstate\",function (popStateEvent){\n popStateEvent.stopImmediatePropagation();\n popStateEvent.stopPropagation();\n ClassFactory(\"Component\").route();\n });\n }\n \n Package(\"com.qcobjects.controllers\", [\n class Controller extends ClassFactory(\"InheritClass\") {\n component = null;\n dependencies = [];\n constructor ({\n component,\n dependencies\n }){\n super ({component, dependencies});\n this.component = component;\n this.dependencies = dependencies;\n if (typeof this.component === \"undefined\" || this.component === \"null\"){\n throw Error (`${__getType__(this)} must be called with a component`);\n }\n }\n \n routingSelectedAttr(attrName) {\n return this.component.routingSelected.map(function (r) {\n return r[attrName];\n }).filter(function (v) {\n return v;\n }).pop();\n }\n \n isTouchable() {\n return (\"ontouchstart\" in window) ||\n (navigator.MaxTouchPoints > 0) ||\n (navigator.msMaxTouchPoints > 0);\n }\n \n onpress(subelementSelector, handler) {\n try {\n if (this.isTouchable()) {\n this.component.body.subelements(subelementSelector)[0].addEventListener(\"touchstart\", handler, {\n passive: true\n });\n } else {\n this.component.body.subelements(subelementSelector)[0].addEventListener(\"click\", handler, {\n passive: true\n });\n }\n } catch (e) {\n logger.debug(\"No button to assign press event\");\n }\n }\n \n createRoutingController() {\n var controller = this;\n var component = controller.component;\n var controllerName = controller.routingSelectedAttr(\"controllerclass\");\n if (typeof controllerName !== \"undefined\") {\n var _Controller = ClassFactory(controllerName);\n if (typeof _Controller !== \"undefined\") {\n component.routingController = New(_Controller, {\n component: component\n }); // Initializes the main controller for the component\n if (Object.hasOwnProperty.call(component.routingController, \"done\") && typeof component.routingController.done === \"function\") {\n component.routingController.done.call(component.routingController);\n }\n }\n }\n }\n \n done(){} \n }\n ]);\n \n Package(\"com.qcobjects.views\",[\n class View extends ClassFactory(\"InheritClass\") {\n constructor ({component = undefined, dependencies = []}){\n super(...arguments);\n if (typeof this.component === \"undefined\" || this.component === \"null\"){\n throw Error (`${__getType__(this)} must be called with a component`);\n }\n \n }\n }\n ]);\n \n Package(\"com.qcobjects.api\", [\n class Service extends ClassFactory(\"InheritClass\") {\n kind= \"rest\";\n /* it can be rest, mockup, local */\n domain= _domain_;\n basePath= _basePath_;\n url= \"\";\n method= \"GET\";\n data= {};\n reload= false;\n cached= false;\n \n constructor () {\n super(...arguments);\n }\n \n set(name, value) {\n this[name] = value;\n }\n \n get(name) {\n return this[name];\n }\n \n }\n \n ]);\n \n Package(\"com.qcobjects.api.services\", [\n class JSONService extends ClassFactory(\"Service\") {\n method= \"GET\";\n cached= false;\n headers= {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n JSONresponse= null;\n done(result) {\n logger.debug(\"***** RECEIVED RESPONSE:\");\n logger.debug(result.service.template);\n this.JSONresponse = JSON.parse(result.service.template);\n }\n \n constructor (){\n super(...arguments);\n }\n \n }\n ]);\n \n Package(\"com.qcobjects.api.config\", [\n class ConfigService extends ClassFactory(\"JSONService\"){\n method= \"GET\";\n cached= false;\n configFileName= \"config.json\";\n headers= {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n JSONresponse= null;\n done(result) {\n logger.debug(\"***** CONFIG LOADED:\");\n logger.debug(result.service.template);\n this.JSONresponse = JSON.parse(result.service.template);\n if (Object.hasOwnProperty.call(this.JSONresponse, \"__encoded__\")) {\n this.JSONresponse = JSON.parse(ClassFactory(\"_Crypt\").decrypt(this.JSONresponse.__encoded__, _secretKey));\n }\n for (var k in this.JSONresponse) {\n _top.CONFIG.set(k, this.JSONresponse[k]);\n }\n this.configLoaded.call(this);\n }\n fail(result) {\n this.configLoaded.call(this);\n }\n \n constructor (){\n super(...arguments);\n this.set(\"url\", this.get(\"basePath\") + this.get(\"configFileName\"));\n }\n }\n ]);\n \n Package(\"com.qcobjects.valueObjects\", [\n class VO extends ClassFactory(\"InheritClass\") {\n constructor (){\n super(...arguments);\n }\n }\n ]);\n \n /**\n * Returns a standarized uri for a component\n * @example\n * templateURI = ComponentURI({'COMPONENTS_BASE_PATH':'','COMPONENT_NAME':'','TPLEXTENSION':'','TPL_SOURCE':''})\n * @author: Jean Machuca \n * @param params an object with the params to build the uri path\n */\n var ComponentURI = function (params) {\n var templateURI = \"\";\n if (params[\"TPL_SOURCE\"] === \"default\") {\n templateURI = \"{{COMPONENTS_BASE_PATH}}{{COMPONENT_NAME}}.{{TPLEXTENSION}}\";\n for (var k in params) {\n var param = params[k];\n templateURI = templateURI.replace(\"{{\" + k + \"}}\", params[k]);\n }\n }\n return templateURI;\n };\n \n /**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param component a Component object\n */\n var componentLoader = function (component, _async) {\n var __promise__;\n var _componentLoaderInBrowser = function (component, _async) {\n __promise__ = new Promise(function (resolve, reject) {\n var _promise = component.__promise__;\n var container = (Object.hasOwnProperty.call(component, \"container\") && typeof component.container !== \"undefined\" && component.container !== null) ? (component.container) : (component.body);\n if (container !== null) {\n var _feedComponent_ = function (component) {\n component.feedComponent();\n var standardResponse = {\n \"request\": xhr,\n \"component\": component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n \n var _componentLoaded = function () {\n var successStatus = (is_file) ? (0) : (200);\n if (xhr.status === successStatus) {\n var response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_.call(this, component);\n } else {\n var standardResponse = {\n \"request\": xhr,\n \"component\": component\n };\n reject.call(_promise, standardResponse);\n \n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_.call(this, component);\n } else {\n var is_file = (component.url.startsWith(\"file:\")) ? (true) : (false);\n var xhr = new XMLHttpRequest();\n if (!is_file) {\n try {\n logger.debug(\"Calling the url of component in async mode.\");\n xhr.open(component.method, component.url, true);\n } catch (e) {\n logger.debug(\"Last try has failed... The component cannot be loaded.\");\n }\n } else {\n if (\"fetch\" in _top) {\n logger.debug(\"I can use fetch...\");\n logger.debug(\"It is a file to be loaded, so I will try to use fetch\");\n var _p = fetch(component.url).then(response => {\n logger.debug(\"I got a response from fetch, so I'll feed the component\");\n response.text().then(text => {\n component.template = text;\n _feedComponent_.call(this, component);\n });\n });\n }\n }\n if (!is_phonegap && !is_file) {\n xhr.setRequestHeader(\"Content-Type\", \"text/html\");\n }\n if (!is_file) {\n xhr.onload = _componentLoaded;\n }\n var _directLoad = function (is_file) {\n is_file = (typeof is_file === \"undefined\" || !is_file) ? (false) : (true);\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n if (is_file) {\n if (!(\"fetch\" in _top)) {\n logger.debug(\"I have to try to load the file using xhr... \");\n xhr.send(null);\n if (xhr.status === XMLHttpRequest.DONE) {\n _componentLoaded.call(this);\n }\n }\n } else {\n logger.debug(\"Trying to send the data to the component... \");\n xhr.send(_DataStringify(component.data));\n }\n };\n \n if (component.cached && (!is_file)) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load(cacheController) {\n _directLoad.call(this, is_file);\n },\n alternate(cacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n } else {\n _directLoad.call(this, is_file);\n }\n return;\n }\n });\n global.lastCache = cache;\n } else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad.call(this, is_file);\n }\n \n }\n } else {\n logger.debug(\"CONTAINER DOESNT EXIST\");\n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then (function (){\n var _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n var _ret_;\n if (typeof component.fail === \"function\") {\n _ret_ = component.fail.call(component, standardResponse);\n }\n return Promise.reject(_ret_);\n }).catch(function (e) {\n logger.debug(\"Something wrong loading the component\");\n });\n return __promise__;\n };\n var _componentLoaderInNode = function (component, _async) {\n __promise__ = new Promise(function (resolve, reject) {\n var _promise = __promise__;\n var _feedComponent_ = function (component) {\n component.feedComponent();\n var standardResponse = {\n \"request\": null,\n \"component\": component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n \n var _componentLoaded = function (err, responseText) {\n if (!err) {\n var response = responseText.toString();\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_.call(this, component);\n } else {\n var standardResponse = {\n \"request\": null,\n \"component\": component\n };\n reject.call(_promise, standardResponse);\n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_.call(this, component);\n } else {\n logger.debug(\"Loading the component as a local file in server...\");\n var _directLoad = function (is_file) {\n const fs = _require_(\"fs\");\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n fs.readFile(component.url, _componentLoaded);\n };\n \n if (component.cached) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load(cacheController) {\n _directLoad.call(this);\n },\n alternate(cacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n } else {\n _directLoad.call(this);\n }\n return;\n }\n });\n global.lastCache = cache;\n } else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad.call(this);\n }\n \n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then (function (){\n var _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n var _ret_;\n if (typeof component.fail === \"function\") {\n _ret_ = component.fail.call(component, standardResponse);\n }\n return Promise.reject(_ret_);\n }).catch(function (e) {\n logger.debug(\"Something wrong loading the component\");\n });\n return __promise__;\n };\n \n var _ret_;\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_componentLoaderInBrowser, arguments);\n } else {\n _ret_ = _componentLoaderInBrowser(component, _async);\n }\n } else {\n _ret_ = _componentLoaderInNode(component, _async);\n }\n return _ret_;\n };\n \n /**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param service a Service object\n */\n var serviceLoader = function (service, _async) {\n var _serviceLoaderInBrowser = function (service, _async) {\n var _promise = new Promise(\n function (resolve, reject) {\n \n logger.debug(\"LOADING SERVICE DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n var xhr = new XMLHttpRequest();\n xhr.withCredentials = service.withCredentials;\n var xhrasync = true; // always async because xhr sync is deprecated\n xhr.open(service.method, service.url, xhrasync);\n for (var header in service.headers) {\n try {\n if (typeof service.headers[header] !== \"function\") {\n xhr.setRequestHeader(header, service.headers[header]);\n }\n } catch (e) {\n logger.debug(\"Something went wrong when assign the header \" + header);\n }\n }\n xhr.onload = function () {\n if (xhr.status === 200) {\n var response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING SERVICE {{NAME}}\".replace(\"{{NAME}}\", service.name));\n service.template = response;\n if (service.cached && (typeof cache !== \"undefined\")) {\n cache.save(service.name, service.template);\n }\n if (typeof service.done === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n \"service\": service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n } else {\n if (typeof service.fail === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n \"service\": service\n };\n service.fail.call(service, standardResponse);\n reject.call(_promise, standardResponse);\n }\n }\n };\n \n var _directLoad = function () {\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n try {\n xhr.send(_DataStringify(service.data));\n } catch (e) {\n logger.debug(\"SOMETHING WRONG WITH REQUEST \");\n reject.call(_promise, {\n request: xhr,\n service: service\n });\n }\n };\n \n if (service.cached) {\n var cache = new ComplexStorageCache({\n index: service.data,\n load(cacheController) {\n _directLoad.call(this);\n },\n alternate(cacheController) {\n if (service.method === \"GET\") {\n service.template = cacheController.cache.getCached(service.name);\n if (typeof service.done === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n \"service\": service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n } else {\n _directLoad.call(this);\n }\n return;\n }\n });\n global.lastCache = cache;\n } else {\n _directLoad.call(this);\n }\n \n return xhr;\n }\n );\n return _promise;\n };\n \n var _serviceLoaderInNode = function (service, _async) {\n var _promise = new Promise(\n function (resolve, reject) {\n if (typeof URL === \"undefined\") {\n global.URL = _require_(\"url\").URL;\n let URL = global.URL;\n }\n var serviceURL = new URL(service.url);\n var req;\n service.useHTTP2 = Object.hasOwnProperty.call(service, \"useHTTP2\") && service.useHTTP2;\n \n \n var captureEvents = function (req) {\n logger.debug(\"LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n var dataXML;\n var standardResponse = {\n \"http2Client\": client,\n \"request\": req,\n \"service\": service,\n \"responseHeaders\": null\n };\n \n if (typeof service.data === \"object\" && service.data !== null) {\n if (service.useHTTP2) {\n try {\n logger.debug(\"Sending data...\");\n let buffer = new Buffer(_DataStringify(service.data));\n req.write(buffer);\n } catch (e) {\n logger.debug(\"It was not possible to send any data\");\n }\n }\n }\n \n dataXML = \"\";\n req.on(\"response\", (responseHeaders, flags) => {\n logger.debug(\"receiving response...\");\n standardResponse.responseHeaders = responseHeaders;\n /*\n for (const name in responseHeaders) {\n logger.debug(`${name}: ${responseHeaders[name]}`);\n }\n */\n dataXML = \"\";\n });\n req.on(\"data\", (chunk) => {\n logger.debug(\"receiving data...\");\n // do something with the data\n dataXML += \"\" + chunk.toString();\n service.template = dataXML;\n });\n if (service.useHTTP2) {\n req.resume();\n }\n req.on(\"end\", () => {\n logger.debug(\"ending call...\");\n service.template = dataXML;\n if (Object.hasOwnProperty.call(service, \"useHTTP2\") && service.useHTTP2) {\n client.destroy();\n } else {\n req.destroy();\n }\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n });\n if (service.useHTTP2) {\n req.end();\n }\n \n };\n \n try {\n var requestOptions;\n if (service.useHTTP2) {\n logger.debug(\"using http2\");\n var http2 = _require_(\"http2\");\n var client = http2.connect(serviceURL.origin);\n requestOptions = Object.assign({\n \":method\": service.method,\n \":path\": serviceURL.pathname\n }, service.options);\n requestOptions = Object.assign(requestOptions, service.headers);\n req = client.request(requestOptions);\n req.setEncoding(\"utf8\");\n captureEvents(req);\n } else {\n if (serviceURL.protocol === \"http:\") {\n var http = _require_(\"http\");\n var request = http.request;\n requestOptions = Object.assign({\n \"url\": service.url,\n headers: service.headers\n }, service.options);\n var req = request(service.url);\n captureEvents(req);\n } else if (serviceURL.protocol === \"https:\") {\n var https = _require_(\"https\");\n requestOptions = Object.assign({\n hostname: serviceURL.hostname,\n port: serviceURL.port,\n path: serviceURL.pathname,\n method: service.method,\n headers: service.headers\n }, service.options);\n var _req_ = https.request(requestOptions, function (req) {\n captureEvents(req);\n });\n _req_.end();\n } else {\n var e = \"Protocol not supported: \" + serviceURL.protocol;\n logger.debug(e);\n throw new Error(e);\n }\n }\n \n \n } catch (e) {\n logger.debug(e);\n service.fail.call(service, e);\n reject.call(_promise, e);\n \n }\n }).catch(function (e) {\n console.log(e);\n logger.debug(\"Something happened when trying to call the service: \" + service.name);\n service.fail.call(service, e);\n });\n return _promise;\n \n };\n \n var _serviceLoaderMockup = function (service, _async) {\n var _promise = new Promise(\n function (resolve, reject) {\n logger.debug(`Calling mockup service ${service.name} ...`);\n var standardResponse = {\n \"request\": null,\n \"service\": service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.mockup === \"function\") {\n service.mockup.call(service, standardResponse);\n } else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n var _serviceLoaderLocal = function (service, _async) {\n var _promise = new Promise(\n function (resolve, reject) {\n logger.debug(`Calling local service ${service.name} ...`);\n var standardResponse = {\n \"request\": null,\n \"service\": service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.local === \"function\") {\n service.local.call(service, standardResponse);\n } else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n \n var _ret_;\n switch (service.kind) {\n case \"rest\":\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_serviceLoaderInBrowser, arguments);\n } else {\n _ret_ = _serviceLoaderInBrowser(service, _async);\n }\n } else {\n _ret_ = _serviceLoaderInNode(service, _async);\n }\n break;\n case \"mockup\":\n _ret_ = _serviceLoaderMockup(service, _async);\n break;\n case \"local\":\n _ret_ = _serviceLoaderLocal(service, _async);\n break;\n default:\n logger.debug(`The value of the kind property of the service ${service.name} is not valid`);\n break;\n }\n return _ret_;\n };\n Export(serviceLoader);\n Export(componentLoader);\n Export(ComponentURI);\n Export(ObjectName);\n Export(_DataStringify);\n Export(isQCObjects_Class);\n Export(isQCObjects_Object);\n Export(NamespaceRef);\n \n \n if (isBrowser) {\n \n Element.prototype.buildComponents = function (rebuildObjects = false) {\n var tagFilter = _tag_filter_;\n var d = this;\n var elements = d.subelements(tagFilter);\n return _buildComponentsFromElements_(elements, null);\n };\n \n HTMLDocument.prototype.buildComponents = Element.prototype.buildComponents;\n HTMLElement.prototype.buildComponents = Element.prototype.buildComponents;\n var _ComponentWidget_ = class extends HTMLElement {\n constructor() {\n super(...arguments);\n const componentWidget = this;\n const componentName = componentWidget.nodeName.toLowerCase();\n const componentBody = _DOMCreateElement(\"quick-component\");\n const __enabled__atributes__ = componentWidget.getAttributeNames();\n componentBody.setAttribute(\"name\", componentName);\n \n if (!componentWidget.hasAttribute(\"shadowed\")) {\n componentBody.setAttribute(\"shadowed\", \"true\");\n }\n __enabled__atributes__.map(function (attributeName) {\n if (componentWidget.hasAttribute(attributeName)) {\n componentBody.setAttribute(attributeName, componentWidget.getAttribute(attributeName));\n componentWidget.removeAttribute(attributeName);\n }\n });\n var data_attributenames = componentWidget.getAttributeNames().filter(function (a) {\n return a.startsWith(\"data-\");\n }).map(function (a) {\n return a.split(\"-\")[1];\n });\n data_attributenames.map(function (_attribute_name_) {\n componentBody.setAttribute(\"data-\" + _attribute_name_, componentWidget.getAttribute(\"data-\" + _attribute_name_));\n componentWidget.removeAttribute(\"data-\" + _attribute_name_);\n });\n [...componentWidget.children].map(function (element) {\n componentBody.appendChild(element.cloneNode(true));\n element.remove();\n });\n \n componentWidget.append(componentBody);\n }\n };\n Export(_ComponentWidget_);\n var RegisterWidget = function (widgetName) {\n customElements.define(widgetName, class extends _ComponentWidget_ {});\n };\n var RegisterWidgets = function () {\n var widgetList = [...arguments];\n widgetList.filter(function (widgetName) {\n return typeof widgetName === \"string\";\n }).map(function (widgetName) {\n RegisterWidget(widgetName);\n });\n };\n (_protected_code_)(RegisterWidget);\n (_protected_code_)(RegisterWidgets);\n Export(RegisterWidget);\n Export(RegisterWidgets);\n \n } else {\n // not yet implemented.\n }\n \n if (!isBrowser) {\n \n Package(\"com.qcobjects.api\", [\n class BackendMicroservice extends ClassFactory(\"InheritClass\") {\n \n constructor ({\n domain= _domain_,\n basePath= _basePath_,\n body = null,\n stream= null,\n request= null\n }){\n super(...arguments);\n logger.debug(\"Initializing BackendMicroservice...\");\n let microservice = this;\n if (typeof this.body === \"undefined\") {\n this.body = null;\n }\n if (typeof body !== \"undefined\"){\n this.body = body;\n }\n this.cors();\n microservice.stream = stream;\n stream.on(\"data\", (data) => {\n // data from POST, GET\n var requestMethod = request.method.toLowerCase();\n var supportedMethods = {\n \"post\": microservice.post,\n };\n if (Object.hasOwnProperty.call(supportedMethods, requestMethod)) {\n supportedMethods[requestMethod].call(microservice, data);\n }\n });\n \n // data from POST, GET\n var requestMethod = request.method.toLowerCase();\n var supportedMethods = {\n \"get\": microservice.get,\n \"head\": microservice.head,\n \"put\": microservice.put,\n \"delete\": microservice.delete,\n \"connect\": microservice.connect,\n \"options\": microservice.options,\n \"trace\": microservice.trace,\n \"patch\": microservice.patch\n };\n if (Object.hasOwnProperty.call(supportedMethods, requestMethod)) {\n supportedMethods[requestMethod].call(microservice);\n }\n \n \n }\n \n cors() {\n if (this.route.cors) {\n logger.debug(\"Validating CORS...\");\n let {\n allow_origins,\n allow_credentials,\n allow_methods,\n allow_headers\n } = this.route.cors;\n var microservice = this;\n if (typeof microservice.headers !== \"object\") {\n microservice.headers = {};\n }\n if (typeof microservice.route.responseHeaders !== \"object\") {\n microservice.route.responseHeaders = {};\n }\n if (typeof allow_origins !== \"undefined\") {\n logger.debug(\"CORS: allow_origins available. Validating origins...\");\n // an example of allow_origins is ['https://example.com','http://www.example.com']\n if (allow_origins === \"*\" || (typeof microservice.request.headers.origin === \"undefined\") || [...allow_origins].indexOf(microservice.request.headers.origin) !== -1) {\n // for compatibility with all browsers allways return a wildcard when the origin is allowed\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n } else {\n logger.debug(\"CORS: Origin is not allowed: \" + microservice.request.headers.origin);\n logger.debug(\"CORS: Forcing to finish the response...\");\n this.body = {};\n try {\n this.done();\n } catch (e) {\n logger.debug(`It was not possible to finish the call to the microservice: ${e}`);\n }\n }\n } else {\n logger.debug(\"CORS: no allow_origins available. Allowing all origins...\");\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n }\n if (typeof allow_credentials !== \"undefined\") {\n logger.debug(`CORS: allow_credentials present. Allowing ${allow_credentials}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = allow_credentials.toString();\n } else {\n logger.debug(\"CORS: No allow_credentials present. Allowing all credentials.\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = \"true\";\n }\n if (typeof allow_methods !== \"undefined\") {\n logger.debug(`CORS: allow_methods present. Allowing ${allow_methods}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = [...allow_methods].join(\",\");\n } else {\n logger.debug(\"CORS: No allow_methods present. Allowing only GET, OPTIONS and POST\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = \"GET, OPTIONS, POST\";\n }\n if (typeof allow_headers !== \"undefined\") {\n logger.debug(`CORS: allow_headers present. Allowing ${allow_headers}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = [...allow_headers].join(\",\");\n } else {\n logger.debug(`CORS: No allow_headers present. Allowing all headers...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = \"*\";\n }\n } else {\n logger.debug(\"No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors\");\n }\n }\n \n \n head(formData) {\n this.done();\n }\n \n get(formData) {\n logger.debug(`[BackendMicroservice.get] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n \n post(formData) {\n this.done();\n }\n \n put(formData) {\n this.done();\n }\n \n delete(formData) {\n this.done();\n }\n \n connect(formData) {\n this.done();\n }\n \n options(formData) {\n this.done();\n }\n \n trace(formData) {\n this.done();\n }\n \n patch(formData) {\n this.done();\n }\n \n finishWithBody(stream) {\n try {\n logger.debug(\"[BackendMicroservice.finishWithBody] Ending the stream...\");\n logger.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`);\n if (typeof this.body !== \"string\"){\n this.body = _DataStringify(this.body);\n }\n logger.debug(`[BackendMicroservice.finishWithBody] \\n body: ${this.body} `);\n stream.write(this.body);\n stream.end();\n logger.debug(`[BackendMicroservice.finishWithBody] Stream ended.`);\n } catch (e) {\n logger.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${e}`);\n }\n }\n \n done() {\n logger.debug(`[BackendMicroservice.done] Finalizing the response...`);\n var microservice = this;\n var stream = microservice.stream;\n try {\n logger.debug(`[BackendMicroservice.done] Sending response headers...`);\n if (microservice.route.responseHeaders){\n logger.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(microservice.route.responseHeaders)}`);\n stream.respond(microservice.route.responseHeaders);\n } else {\n throw Error(`[BackendMicroservice.done] No headers present.`);\n }\n } catch (e) {\n logger.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${e}`);\n }\n if (microservice.body !== null) {\n try {\n logger.debug(`[BackendMicroservice.done] A body of message is present. Finalizing the response...`);\n microservice.finishWithBody.call(microservice, stream);\n } catch (e) {\n logger.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${e}`);\n }\n } else {\n logger.debug(\"[BackendMicroservice.done] No body present. Ending stream...\");\n stream.end();\n }\n }\n \n \n }\n ]);\n \n \n }\n \n Class(\"SourceJS\", Object, {\n domain: _domain_,\n basePath: _basePath_,\n body: _DOMCreateElement(\"script\"),\n type: \"text/javascript\",\n containerTag: \"body\",\n url: \"\",\n data: {},\n async: false,\n external: false,\n set(name, value) {\n this[name] = value;\n },\n get(name) {\n return this[name];\n },\n status: false,\n done() {},\n fail() {},\n rebuild() {\n var context = this;\n try {\n document.getElementsByTagName(context.containerTag)[0].appendChild(\n (function (s, url, context) {\n s.type = context.type;\n s.src = url;\n s.crossOrigin = (Object.hasOwnProperty.call(context, \"crossOrigin\")) ? (context.crossOrigin) : (\"anonymous\");\n s.async = context.async;\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = function (e) {\n context.status = true;\n context.done.call(context, e);\n };\n s.onerror = function (e) {\n context.status = false;\n context.fail.call(context, e);\n };\n context.body = s;\n return s;\n }).call(this,\n _DOMCreateElement(\"script\"),\n (this.external) ? (this.url) : (this.basePath + this.url), context));\n } catch (e) {\n context.status = false;\n context.fail.call(context, e);\n }\n },\n Cast(o) {\n return _Cast(this, o);\n },\n _new_(properties) {\n this.__new__(properties);\n this.rebuild();\n }\n });\n Class(\"SourceCSS\", Object, {\n domain: _domain_,\n basePath: _basePath_,\n body: _DOMCreateElement(\"link\"),\n url: \"\",\n data: {},\n async: false,\n external: false,\n set(name, value) {\n this[name] = value;\n },\n get(name) {\n return this[name];\n },\n done() {},\n rebuild() {\n var context = this;\n if (isBrowser) {\n window.document.getElementsByTagName(\"head\")[0].appendChild(\n (function (s, url, context) {\n s.type = \"text/css\";\n s.rel = \"stylesheet\";\n s.href = url;\n s.crossOrigin = \"anonymous\";\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = context.done;\n context.body = s;\n return s;\n }).call(this,\n _DOMCreateElement(\"link\"),\n (this.external) ? (this.url) : (this.basePath + this.url), context));\n }\n },\n Cast(o) {\n return _Cast(this, o);\n },\n _new_(properties) {\n this.__new__(properties);\n this.rebuild();\n }\n });\n \n /**\n * Array math functions\n */\n var __to_number = function (value) {\n return (isNaN(value)) ? (new Number(0)) : (new Number(value));\n };\n Array.prototype.unique = function () {\n return this.filter(function (value, index, self) {\n return self.indexOf(value) === index;\n });\n };\n Array.unique = function (a) {\n return a.unique();\n };\n (_protected_code_)(Array.unique);\n (_protected_code_)(Array.prototype.unique);\n Array.prototype.table = function () {\n console.table(this);\n };\n Array.table = function (a) {\n return a.table();\n };\n (_protected_code_)(Array.table);\n (_protected_code_)(Array.prototype.table);\n Array.prototype.sum = function () {\n return this.reduce(function (prev, current) {\n return __to_number(prev) + __to_number(current);\n }, 0);\n };\n Array.sum = function (a) {\n return a.sum();\n };\n (_protected_code_)(Array.sum);\n (_protected_code_)(Array.prototype.sum);\n Array.prototype.avg = function () {\n return (this.length < 1) ? (0) : (this.reduce(function (prev, current) {\n return ((__to_number(prev) + __to_number(current)) / 2);\n }));\n };\n Array.avg = function (a) {\n return a.avg();\n };\n (_protected_code_)(Array.avg);\n (_protected_code_)(Array.prototype.avg);\n Array.prototype.min = function () {\n return this.reduce(function (prev, current) {\n return (__to_number(prev) <= __to_number(current)) ? (prev) : (current);\n }, Infinity);\n };\n Array.min = function (a) {\n return a.min();\n };\n (_protected_code_)(Array.min);\n (_protected_code_)(Array.prototype.min);\n Array.prototype.max = function () {\n return this.reduce(function (prev, current) {\n return (__to_number(prev) >= __to_number(current)) ? (prev) : (current);\n }, 0);\n };\n Array.max = function (a) {\n return a.max();\n };\n (_protected_code_)(Array.max);\n (_protected_code_)(Array.prototype.max);\n Array.prototype.sortBy = function (propName, sortAsc = true) {\n var sort_function = (sortAsc) ? (\n function (prev, current) {\n return current[propName] < prev[propName] ? 1 : -1;\n }\n ) : (\n function (prev, current) {\n return current[propName] > prev[propName] ? 1 : -1;\n }\n );\n return this.sort(sort_function);\n };\n Array.sortBy = function (a, propName, sortAsc = true) {\n return a.sortBy(propName, sortAsc);\n };\n (_protected_code_)(Array.sortBy);\n (_protected_code_)(Array.prototype.sortBy);\n \n Array.matrix = function (_length, _fillValue = 0) {\n var x_func = function (x) {\n return _fillValue;\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n (_protected_code_)(Array.matrix);\n \n Array.matrix2d = function (_length, _fillValue = 0) {\n var y_func = function (y) {\n return _fillValue;\n };\n var x_func = function (x) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n (_protected_code_)(Array.matrix2d);\n \n Array.matrix3d = function (_length, _fillValue = 0) {\n var y_func = function (y) {\n return Array.from({\n length: _length\n }, function () {\n return _fillValue;\n });\n };\n var x_func = function (x) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n (_protected_code_)(Array.matrix3d);\n \n _top.range = function (start, stop = 0, step = 1) {\n if (stop === 0 || typeof stop === \"undefined\") {\n stop = start;\n start = 0;\n }\n return Array.from({\n length: (stop - start) / step + 1\n }, function (_, i) {\n return start + (i * step);\n });\n };\n (_protected_code_)(_top.range);\n \n String.prototype.list = function () {\n var __instance = this;\n return _top.range(0, __instance.length - 1).map(function (i) {\n return __instance[i];\n });\n };\n (_protected_code_)(String.prototype.list);\n \n _top.getDocumentLayout = function () {\n var h = (w, h) => {\n return w > h ? \"landscape\" : null;\n };\n var v = (w, h) => {\n return h > w ? \"portrait\" : null;\n };\n var square = (w, h) => {\n return w === h ? \"square\" : null;\n };\n return [\n h(document.documentElement.clientWidth, document.documentElement.clientHeight),\n v(document.documentElement.clientWidth, document.documentElement.clientHeight),\n square(document.documentElement.clientWidth, document.documentElement.clientHeight)\n ].filter(e => e !== null).pop();\n };\n \n \n /**\n * End of array math functions\n */\n \n \n Class(\"ArrayList\", Array, []);\n ClassFactory(\"ArrayList\").matrix = Array.matrix;\n ClassFactory(\"ArrayList\").matrix2d = Array.matrix2d;\n ClassFactory(\"ArrayList\").matrix3d = Array.matrix3d;\n (_protected_code_)(ClassFactory(\"ArrayList\").matrix);\n (_protected_code_)(ClassFactory(\"ArrayList\").matrix2d);\n (_protected_code_)(ClassFactory(\"ArrayList\").matrix3d);\n \n Class(\"ArrayCollection\", Object, {\n source: New(ClassFactory(\"ArrayList\"), []),\n changed(prop, value) {\n logger.debug(\"VALUE CHANGED\");\n logger.debug(prop);\n logger.debug(value);\n },\n push(value) {\n var self = this;\n logger.debug(\"VALUE ADDED\");\n logger.debug(value);\n self.source.push(value);\n },\n pop(value) {\n var self = this;\n logger.debug(\"VALUE POPPED\");\n logger.debug(value);\n self.source.pop(value);\n },\n _new_(source) {\n var self = this;\n var _index = 0;\n self.source = New(ClassFactory(\"ArrayList\"), source);\n for (var _k in self.source) {\n if (!isNaN(_k)) {\n logger.debug(\"binding \" + _k.toString());\n (function (_pname) {\n Object.defineProperty(self, _pname, {\n set(value) {\n logger.debug(\"setting \" + _pname + \"=\" + value);\n self.source[_pname] = value;\n self.changed(_pname, value);\n },\n get() {\n return self.source[_pname];\n }\n });\n })(_k);\n _index++;\n }\n \n }\n self.source.length = _index;\n Object.defineProperty(self, \"length\", {\n get() {\n return self.source.length;\n }\n });\n }\n });\n \n Package(\"com.qcobjects.effects.base\", [\n class Effect extends ClassFactory(\"InheritClass\") {\n duration = 1000;\n \n constructor (){\n super(...arguments);\n }\n \n animate({\n timing,\n draw,\n duration\n }) {\n \n let start = performance.now();\n \n requestAnimationFrame(function animate(time) {\n // timeFraction goes from 0 to 1\n let timeFraction = (time - start) / duration;\n if (timeFraction > 1) timeFraction = 1;\n \n // calculate the current animation state\n let progress = timing(timeFraction);\n \n draw(Math.round(progress * 100)); // draw it\n \n if (timeFraction < 1) {\n requestAnimationFrame(animate);\n } else {\n // if this is an object with a done method\n if (typeof this !== \"undefined\" &&\n this !== null &&\n Object.hasOwnProperty.call(this, \"done\") &&\n (typeof this.done).toLowerCase() === \"function\") {\n this.done.call(this);\n }\n }\n \n });\n }\n \n }\n ]);\n \n Package(\"com.qcobjects.effects.transitions.base\", [\n \n class TransitionEffect extends ClassFactory(\"Effect\") {\n duration= 385;\n defaultParams= {\n alphaFrom: 0,\n alphaTo: 1,\n angleFrom: 180,\n angleTo: 0,\n radiusFrom: 0,\n radiusTo: 30,\n scaleFrom: 0,\n scaleTo: 1\n };\n fitToHeight= false;\n fitToWidth= false;\n effects= [];\n \n constructor (){\n super(...arguments);\n logger.info(\"DECLARING TransitionEffect \");\n this.component.defaultParams = this.defaultParams;\n }\n \n apply({\n alphaFrom,\n alphaTo,\n angleFrom,\n angleTo,\n radiusFrom,\n radiusTo,\n scaleFrom,\n scaleTo\n }) {\n var _transition_ = this;\n logger.info(\"EXECUTING TransitionEffect \");\n var componentRoot = (_transition_.component.shadowed)?(_transition_.component.shadowRoot.host):(_transition_.component.body);\n if (_transition_.fitToHeight) {\n componentRoot.height = (typeof componentRoot.offsetParent === \"object\" && componentRoot.offsetParent !== null)?(componentRoot.offsetParent.scrollHeight):(componentRoot.getBoundingClientRect().height);\n }\n if (_transition_.fitToWidth) {\n componentRoot.width = (typeof componentRoot.offsetParent === \"object\" && componentRoot.offsetParent !== null)?(componentRoot.offsetParent.scrollWidth):(componentRoot.getBoundingClientRect().width);\n }\n componentRoot.style.display = \"block\";\n _transition_.effects.map(function (effectClassName, eff) {\n var __effectClass__ = ClassFactory(effectClassName);\n var effectObj = new __effectClass__();\n var effectClassMethod = effectObj.apply;\n var args = [componentRoot].concat(Object.values({\n alphaFrom,\n alphaTo,\n angleFrom,\n angleTo,\n radiusFrom,\n radiusTo,\n scaleFrom,\n scaleTo\n }));\n effectClassMethod.apply(_transition_, args);\n });\n }\n \n }\n ]);\n \n Package(\"com.qcobjects.timing\", [\n class Timer extends ClassFactory(\"InheritClass\") {\n \n constructor (){\n super(...arguments);\n }\n \n duration= 1000;\n alive= true;\n thread({\n timing,\n intervalInterceptor,\n duration\n }) {\n var timer = this;\n \n let start = performance.now();\n \n requestAnimationFrame(function thread(time) {\n // timeFraction goes from 0 to 1\n let elapsed = (time - start);\n let timeFraction = elapsed / duration;\n if (timeFraction > 1) timeFraction = 1;\n \n // calculate the current progress state\n let progress = timing(timeFraction, elapsed);\n \n intervalInterceptor(Math.round(progress * 100)); // draw it\n \n if ((timeFraction < 1 || duration === -1) && timer.alive) {\n requestAnimationFrame(thread);\n }\n \n });\n }\n \n \n }\n ]);\n \n Package(\"com.qcobjects.tools.essentials\", [\n class Toggle extends ClassFactory(\"InheritClass\") {\n _toggle= false;\n _inverse= true;\n _positive= null;\n _negative= null;\n _dispatched= null;\n _args= {};\n \n constructor (){\n super(...arguments);\n this._new_(...arguments);\n }\n \n changeToggle() {\n this._toggle = (this._toggle) ? (false) : (true);\n }\n \n _new_({\n positive,\n negative,\n args\n }) {\n this._positive = positive;\n this._negative = negative;\n this._args = args;\n }\n \n fire() {\n var toggle = this;\n var _promise = new Promise(function (resolve, reject) {\n \n if (typeof toggle._positive === \"function\" && typeof toggle._negative === \"function\") {\n if (toggle._inverse) {\n toggle._dispatched = (toggle._toggle) ? (toggle._negative.bind(toggle)) : (toggle._positive.bind(toggle));\n } else {\n toggle._dispatched = (toggle._toggle) ? (toggle._positive.bind(toggle)) : (toggle._negative.bind(toggle));\n }\n toggle._dispatched.call(toggle, toggle._args);\n resolve.call(_promise, toggle);\n } else {\n logger.debug(\"Toggle functions are not declared\");\n reject.call(_promise, toggle);\n }\n }).then(function (toggle) {\n toggle.changeToggle();\n }).catch(function (e) {\n logger.debug(e.toString());\n });\n return _promise;\n }\n \n \n }\n \n ]);\n \n // Set Processors\n (function (_top) {\n \n let mapper = function (componentInstance,componentName, valueName) {\n /*\n * Mapper processor\n * @usage\n * $mapper(,)\n *\n * Where componentName is the name of the component (same value as in attribute tag name) without quotes\n * and valueName is the name of the variable that contains the value to map, it can be either a property of\n * the component instance, the data object or a global value\n */\n \n var self = this;\n if (typeof componentInstance === \"undefined\" || componentInstance === null){\n throw Error (`mapper.${componentName}.${valueName} does not have a component instance or it is null.`);\n }\n let globalValue = _top.global.get(valueName);\n let componentValue = componentInstance.get(valueName);\n let dataValue = componentInstance.data[valueName];\n let list = (typeof dataValue !== \"undefined\") ? (dataValue) : ((typeof componentValue !== \"undefined\") ? (componentValue) : (globalValue));\n let listItems = \"\";\n if (typeof list !== \"undefined\" && typeof list[\"map\"] !== \"undefined\") {\n listItems = list.map(function (element) {\n let dataItems = [...Object.keys(element)].map(k => ` data-${k}=\"${(typeof element[k] !== \"undefined\" && element[k] !== null)?(element[k].toString()):(\"\")}\"`).join(\"\");\n return ``;\n }).join(\"\");\n } else {\n logger.debug(`${componentName}.${valueName} does not have a map property`);\n }\n return listItems;\n };\n Processor.setProcessor(mapper);\n \n let layout = function (componentInstance, layoutname, cssfile) {\n /*\n * Layout processor\n * @usage\n * $layout(, )\n * Where layoutname can be \"portrait\" or \"landscape\" without quotes\n * cssfile is the uri for the css file to import\n */\n \n var layout_portrait = `\n /* CSS Document for Mobile Imports */\n @import url(\"${cssfile}\") (orientation:portrait);\n @import url(\"${cssfile}\") (max-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 9/16);\n @import url(\"${cssfile}\") (aspect-ratio: 10/16);\n @import url(\"${cssfile}\") (aspect-ratio: 5/8);\n @import url(\"${cssfile}\") (aspect-ratio: 3/4);\n @import url(\"${cssfile}\") (aspect-ratio: 2/3);\n `;\n var layout_landscape = `\n @import url(\"${cssfile}\") (orientation:landscape) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/9) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/10) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 8/5) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 4/3) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 3/2) and (min-width:460px);\n `;\n var layout_code = {\n \"landscape\": layout_landscape,\n \"portrait\": layout_portrait\n };\n \n return (Object.hasOwnProperty.call(layout_code, layoutname)) ? (layout_code[layoutname]) : (\"\");\n };\n \n Processor.setProcessor(layout);\n \n let component = function () {\n /*\n * component processor\n * @usage\n * $component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n let arg = [...arguments].slice(1).map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n let attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a]}`;\n }).join(\" \");\n return ``;\n };\n \n Processor.setProcessor(component);\n \n let quick_component = function () {\n /*\n * component processor\n * @usage\n * $quick_component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n let arg = [...arguments].slice(1).map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n let attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a]}`;\n }).join(\" \");\n return ``;\n };\n \n Processor.setProcessor(quick_component);\n \n \n let repeat = function (componentInstance, length, text) {\n /*\n * Repeat processor\n * @usage\n * $repeat(, )\n * Where length is the number of occurrences of text\n */\n return _top.range(length).map(\n function (index) {\n return text.replace(\"{{index}}\", index.toString());\n }\n ).join(\"\");\n };\n \n Processor.setProcessor(repeat);\n \n })(_top);\n \n \n /**\n * Load every component tag declared in the body\n **/\n Ready(function () {\n if (!_top.CONFIG.get(\"useSDK\")) {\n _top.__start__();\n }\n });\n \n /*\n Public variables and functions\n */\n Export(Export); /* exports the same Export function once */\n Export(Import);\n Export(Package);\n Export(Class);\n Export(New);\n Export(Tag);\n Export(Ready);\n Export(ready);\n Export(isBrowser);\n Export(_methods_);\n \n (function (_top){\n Package(\"com.qcobjects\", [\n class GlobalSettings extends ClassFactory(\"InheritClass\"){\n _GLOBAL= {};\n __definition = {};\n __classType = \"GlobalSettings\";\n \n constructor(){\n super(...arguments);\n this.set = GlobalSettings.set.bind(this);\n this.get = GlobalSettings.get.bind(this);\n this.__start__ = GlobalSettings.__start__.bind(this);\n }\n \n static set(name, value) {\n this._GLOBAL[name] = value;\n }\n \n static get(name, _default) {\n var _value;\n if (typeof this._GLOBAL[name] !== \"undefined\") {\n _value = this._GLOBAL[name];\n } else if (typeof _default !== \"undefined\") {\n _value = _default;\n }\n return _value;\n }\n \n static __start__() {\n var __load__serviceWorker = function () {\n var _promise;\n if (isBrowser) {\n _promise = new Promise(function (resolve, reject) {\n if ((\"serviceWorker\" in navigator) &&\n (typeof _top.CONFIG.get(\"serviceWorkerURI\") !== \"undefined\")) {\n _top.CONFIG.set(\"serviceWorkerScope\", _top.CONFIG.get(\"serviceWorkerScope\") ? (_top.CONFIG.get(\"serviceWorkerScope\")) : (\"/\"));\n navigator.serviceWorker.register(_top.CONFIG.get(\"serviceWorkerURI\"), {\n scope: _top.CONFIG.get(\"serviceWorkerScope\")\n })\n .then(function (registration) {\n logger.debug(\"Service Worker Registered\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error registering Service Worker\");\n reject.call(_promise, registration);\n });\n navigator.serviceWorker.ready.then(function (registration) {\n logger.debug(\"Service Worker Ready\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error loading Service Worker\");\n reject.call(_promise, registration);\n });\n }\n });\n }\n return _promise;\n };\n var _buildComponents = function () {\n return new Promise ((resolve, reject) => {\n if (isBrowser) {\n logger.debug(\"Starting to building components\");\n try {\n _top.componentsStack = document.buildComponents.call(document);\n }catch (e){\n throw Error (`Something went wrong trying to start components tree: ${e.message}`);\n }\n logger.debug(\"Initializing the service worker\");\n __load__serviceWorker.call(_top)\n .catch(function (e) {\n logger.debug(`error loading the service worker ${e}`);\n });\n }\n resolve();\n });\n };\n logger.debug(\"Starting to load the config settings...\");\n if (_top.CONFIG.get(\"useConfigService\", false)) {\n logger.debug(\"Loading settings using local configuration file...\");\n _top.global.configService = New(ClassFactory(\"ConfigService\"));\n _top.global.configService.configLoaded = _buildComponents;\n serviceLoader(_top.global.configService);\n } else {\n logger.debug(\"Starting to load the components...\");\n _buildComponents.call(this);\n }\n }\n \n }\n ]);\n Export(ClassFactory(\"GlobalSettings\"));\n global = New(ClassFactory(\"GlobalSettings\"));\n _top = _CastProps(global, _top);\n \n Object.defineProperty(_top, \"PackagesNameList\", {\n set(val) {\n logger.debug(\"PackagesNameList is readonly\");\n return;\n },\n get() {\n var _get_packages_names = function (_packages) {\n var _keys = [];\n for (var _k in _packages) {\n if (\n typeof _packages[_k] !== \"undefined\" &&\n typeof _packages[_k] !== \"function\" &&\n Object.hasOwnProperty.call(_packages[_k], \"length\") &&\n _packages[_k].length > 0\n ) {\n _keys.push(_k);\n _keys = _keys.concat(_get_packages_names(_packages[_k]));\n }\n }\n return _keys;\n };\n return _get_packages_names(_QC_PACKAGES);\n }\n });\n \n Object.defineProperty(_top, \"PackagesList\", {\n set(value) {\n logger.debug(\"PackagesList is readonly\");\n return;\n },\n get() {\n return _top.PackagesNameList.map(function (packagename) {\n let _classesList = Package(packagename);\n let _ret_;\n if (_classesList) {\n _ret_ = {\n packageName: packagename,\n classesList: _classesList.filter(function (_packageClass) {\n return isQCObjects_Class(_packageClass);\n })\n };\n }\n return _ret_;\n }).filter(function (_p) {\n return typeof _p !== \"undefined\";\n });\n }\n });\n \n Object.defineProperty(_top, \"ClassesList\", {\n set(value) {\n logger.debug(\"ClassesList is readonly\");\n return;\n },\n get() {\n var _classesList = [];\n _top.PackagesList.map(function (_package_element) {\n _classesList = _classesList.concat(_package_element.classesList.map(\n function (_class_element) {\n return {\n packageName: _package_element.packageName,\n className: _package_element.packageName + \".\" + _class_element.__definition.__classType,\n classFactory: _class_element\n };\n }\n ));\n return _package_element;\n });\n \n return _classesList;\n }\n });\n \n Object.defineProperty(_top, \"ClassesNameList\", {\n set(value) {\n logger.debug(\"ClassesNameList is readonly\");\n return;\n },\n get() {\n return _top.ClassesList.map(function (_class_element) {\n return _class_element.className;\n });\n }\n });\n \n if (isBrowser) {\n // use of GLOBAL word is deprecated in node.js\n // this is only for compatibility purpose with old versions of QCObjects in browsers\n Class(\"GLOBAL\", _QC_CLASSES[\"global\"]); // case insensitive for compatibility con old versions;\n Export(ClassFactory(\"GLOBAL\"));\n }\n Export(global);\n \n if (_top.CONFIG.get(\"useSDK\")) {\n (function (_top) {\n var remoteImportsPath = _top.CONFIG.get(\"remoteImportsPath\");\n var external = (!_top.CONFIG.get(\"useLocalSDK\")) ? (true) : (false);\n _top.CONFIG.set(\"remoteImportsPath\", _top.CONFIG.get(\"remoteSDKPath\"));\n \n var tryImportingSDK = false;\n var sdkName = \"QCObjects-SDK\";\n if (isBrowser) {\n tryImportingSDK = true;\n } else {\n var sdkPath = findPackageNodePath(\"qcobjects-sdk\");\n if (sdkPath !== null) {\n sdkName = \"qcobjects-sdk\";\n tryImportingSDK = true;\n } else {\n sdkName = \"node_modules/qcobjects-sdk/QCObjects-SDK\";\n tryImportingSDK = true;\n }\n }\n \n if (tryImportingSDK) {\n logger.info(\"Importing SDK... \" + sdkName);\n if (isNodeCommonJS && typeof require !== \"undefined\"){\n let sdk = require(\"qcobjects-sdk\");\n } else {\n Import(sdkName, function () {\n if (external) {\n logger.debug(\"QCObjects-SDK.js loaded from remote location\");\n } else {\n logger.debug(\"QCObjects-SDK.js loaded from local\");\n }\n _top.CONFIG.set(\"remoteImportsPath\", remoteImportsPath);\n }, external);\n }\n } else {\n logger.debug(\"SDK has not been imported as it is not available at the moment\");\n }\n })(_top);\n }\n })(_top);\n \n if (isBrowser) {\n asyncLoad(function () {\n Ready(function () {\n \n /*\n * scroll management custom events\n * usage: document.addEventListener('percentY90',function(e){console.log(e.detail.percentY)});\n * possible events: scrollpercent, defaultscroll, percentY0, percentY25, percentY50, percentY75, percentY90\n */\n \n (function (_top) {\n let lastKnownScrollPosition = 0;\n let ticking = false;\n let scrollHeight = Math.max(\n document.body.scrollHeight, document.documentElement.scrollHeight,\n document.body.offsetHeight, document.documentElement.offsetHeight,\n document.body.clientHeight, document.documentElement.clientHeight\n );\n \n let scrollWidth = Math.max(\n document.body.scrollWidth, document.documentElement.scrollWidth,\n document.body.offsetWidth, document.documentElement.offsetWidth,\n document.body.clientWidth, document.documentElement.clientWidth\n );\n \n function scrollDispatcher(event) {\n var percentY = Math.round(_top.scrollY * 100 / scrollHeight);\n var percentX = Math.round(_top.scrollX * 100 / scrollWidth);\n var scrollPercentEventEvent = new CustomEvent(\"scrollpercent\", {\n detail: {\n percentX: percentX,\n percentY: percentY\n }\n });\n event.target.dispatchEvent(scrollPercentEventEvent);\n var secondaryEventName = \"defaultscroll\";\n var __valid_scrolls__ = [0, 5, 10, 25, 50, 75, 90, 95, 100];\n __valid_scrolls__.filter(function (p) {\n return p === percentY;\n }).map(function (pY) {\n secondaryEventName = \"percentY\" + percentY.toString();\n var secondaryCustomEvent = new CustomEvent(secondaryEventName, {\n detail: {\n percentX: percentX,\n percentY: percentY\n }\n });\n event.target.dispatchEvent(secondaryCustomEvent);\n });\n \n }\n \n document.addEventListener(\"scroll\", function (event) {\n \n if (!ticking) {\n requestAnimationFrame(function () {\n scrollDispatcher(event);\n ticking = false;\n });\n \n ticking = true;\n }\n });\n \n })(_top);\n \n });\n }, null);\n }\n \n if (!isBrowser) {\n if (typeof _top.global !== \"undefined\" && Object.hasOwnProperty.call(_top.global, \"_fireAsyncLoad\")) {\n _top.global._fireAsyncLoad.call(this);\n }\n if (typeof _top.global !== \"undefined\" && Object.hasOwnProperty.call(_top.global, \"onload\")) {\n _top.global.onload.call(this);\n }\n }\n \n \n /* Freezing Object && Object.prototype to prevent prototype pollution risks */\n (function (isBrowser) {\n var __freeze__ = function () {\n Object.freeze(Object.prototype);\n Object.freeze(Object);\n };\n if (isBrowser && _top.CONFIG.get(\"secureObjects\", false)) {\n Ready(function () {\n __freeze__();\n });\n } else if (_top.CONFIG.get(\"secureObjects\", false)) {\n __freeze__();\n }\n })(isBrowser);\n }\n}).call(null, (typeof module === \"object\" && typeof module.exports === \"object\") ? (\n module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})\n) : ((typeof global === \"object\") ? (global) : (\n (typeof window === \"object\") ? (window) : ({})\n)));", "const QCObjects = require(\"./QCObjects.js\");\nmodule.exports = QCObjects;", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n(function (global) {\n \"use strict\";\n // eslint-disable-next-line camelcase\n class i18n_messages extends qcobjects_1.InheritClass {\n constructor({ messages = [] }) {\n super({\n messages\n });\n if (qcobjects_1.CONFIG.get(\"use_i18n\", false)) {\n qcobjects_1.CONFIG.set(\"lang\", \"en\");\n if (!global.get(\"i18n\")) {\n global.set(\"i18n\", {\n messages\n });\n }\n else {\n global.set(\"i18n\", {\n messages: global.get(\"i18n\").messages.concat(messages)\n });\n }\n }\n }\n _load_i18n_packages_() {\n // eslint-disable-next-line array-callback-return, camelcase\n return qcobjects_1.CONFIG.get(\"i18n_languages\", []).map((i18n_packagename) => {\n // eslint-disable-next-line camelcase\n (0, qcobjects_1.Import)(`org.quickcorp.i18n_messages.${i18n_packagename}`);\n });\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.i18n_messages\", [\n // eslint-disable-next-line camelcase\n i18n_messages\n ]);\n // eslint-disable-next-line new-cap\n (new i18n_messages({}))._load_i18n_packages_();\n})((typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({}))));\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.models\", [\n class Contact extends qcobjects_1.VO {\n }\n ]);\n})();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ModalMoveUp = exports.ModalMoveDown = exports.ModalFade = exports.WipeDown = exports.WipeUp = exports.WipeRight = exports.WipeLeft = exports.Resize = exports.Radius = exports.Rotate = exports.RotateZ = exports.RotateY = exports.RotateX = exports.MoveYInFromTop = exports.MoveYInFromBottom = exports.MoveXInFromLeft = exports.MoveXInFromRight = exports.Move = exports.Fade = void 0;\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\nconst _top = (typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({})));\n(function () {\n \"use strict\";\n class Fade extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, alphaFrom, alphaTo) {\n const da = alphaTo - alphaFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const alpha = alphaFrom + (progress * da / 100);\n qcobjects_1.logger.debug(\"alpha: \" + alpha.toString());\n element.style.opacity = alpha.toString();\n }\n });\n }\n }\n class Move extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, xfrom, yfrom, xto, yto) {\n const dx = xto - xfrom;\n const dy = yto - yfrom;\n element.style.transform = \"translate(\" + xfrom + \"px,\" + yfrom + \"px)\";\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const y = yfrom + (progress * dy / 100);\n const x = xfrom + (progress * dx / 100);\n qcobjects_1.logger.debug(\"x: \" + x.toString() + \" y:\" + y.toString());\n element.style.transform = \"translate(\" + x + \"px,\" + y + \"px)\";\n }\n });\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.effects.base\", [\n Fade,\n Move\n ]);\n class MoveXInFromRight extends Move {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element) {\n super.apply.call(this, element, element.width, 0, 0, 0);\n }\n }\n class MoveXInFromLeft extends Move {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element) {\n super.apply.call(this, element, -element.width, 0, 0, 0);\n }\n }\n class MoveYInFromBottom extends Move {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element) {\n super.apply.call(this, element, 0, element.height, 0, 0);\n }\n }\n class MoveYInFromTop extends Move {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element) {\n super.apply.call(this, element, 0, -element.height, 0, 0);\n }\n }\n class RotateX extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, angleFrom, angleTo) {\n const da = angleTo - angleFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const angle = Math.round(angleFrom + (progress * da / 100));\n qcobjects_1.logger.debug(\"angle: \" + angle.toString());\n element.style.transform = \"rotate3d(1,0,0,\" + angle.toString() + \"deg)\";\n }\n });\n }\n }\n class RotateY extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, angleFrom, angleTo) {\n const da = angleTo - angleFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const angle = Math.round(angleFrom + (progress * da / 100));\n qcobjects_1.logger.debug(\"angle: \" + angle.toString());\n element.style.transform = \"rotate3d(0,1,0,\" + angle.toString() + \"deg)\";\n }\n });\n }\n }\n class RotateZ extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, angleFrom, angleTo) {\n const da = angleTo - angleFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const angle = Math.round(angleFrom + (progress * da / 100));\n qcobjects_1.logger.debug(\"angle: \" + angle.toString());\n element.style.transform = \"rotate3d(0,0,1,\" + angle.toString() + \"deg)\";\n }\n });\n }\n }\n class Rotate extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, angleFrom, angleTo) {\n const da = angleTo - angleFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const angle = Math.round(angleFrom + (progress * da / 100));\n qcobjects_1.logger.debug(\"angle: \" + angle.toString());\n element.style.transform = \"rotate3d(1,1,1,\" + angle.toString() + \"deg)\";\n }\n });\n }\n }\n class Radius extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, radiusFrom, radiusTo) {\n const dr = radiusTo - radiusFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const radius = radiusFrom + (progress * dr / 100);\n qcobjects_1.logger.debug(\"radius: \" + radius.toString());\n element.style.borderRadius = radius.toString() + \"px\";\n }\n });\n }\n }\n class Resize extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, scaleFrom, scaleTo) {\n const ds = scaleTo - scaleFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const scale = scaleFrom + (progress * ds / 100);\n qcobjects_1.logger.debug(\"resize: \" + scale.toString());\n element.style.transformOrigin = \"center\";\n element.style.transform = \"scale(\" + scale + \",\" + scale + \")\";\n }\n });\n }\n }\n class WipeLeft extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, scaleFrom, scaleTo) {\n const ds = scaleTo - scaleFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const scale = scaleFrom + (progress * ds / 100);\n qcobjects_1.logger.debug(\"wipe: \" + scale.toString());\n element.style.transformOrigin = \"right\";\n element.style.transform = \"scaleX(\" + scale + \")\";\n }\n });\n }\n }\n class WipeRight extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, scaleFrom, scaleTo) {\n const ds = scaleTo - scaleFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const scale = scaleFrom + (progress * ds / 100);\n qcobjects_1.logger.debug(\"wipe: \" + scale.toString());\n element.style.transformOrigin = \"left\";\n element.style.transform = \"scaleX(\" + scale + \")\";\n }\n });\n }\n }\n class WipeUp extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, scaleFrom, scaleTo) {\n const ds = scaleTo - scaleFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const scale = scaleFrom + (progress * ds / 100);\n qcobjects_1.logger.debug(\"wipe: \" + scale.toString());\n element.style.transformOrigin = \"bottom\";\n element.style.transform = \"scaleY(\" + scale + \")\";\n }\n });\n }\n }\n class WipeDown extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, scaleFrom, scaleTo) {\n const ds = scaleTo - scaleFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const scale = scaleFrom + (progress * ds / 100);\n qcobjects_1.logger.debug(\"wipe: \" + scale.toString());\n element.style.transformOrigin = \"top\";\n element.style.transform = \"scaleY(\" + scale + \")\";\n }\n });\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.effects.extended\", [\n MoveXInFromRight,\n MoveXInFromLeft,\n MoveYInFromBottom,\n MoveYInFromTop,\n RotateX,\n RotateY,\n RotateZ,\n Rotate,\n Radius,\n Resize,\n WipeLeft,\n WipeRight,\n WipeUp,\n WipeDown\n ]);\n class ModalFade extends Fade {\n constructor() {\n super(...arguments);\n this.duration = 500;\n }\n }\n class ModalMoveDown extends Move {\n constructor() {\n super(...arguments);\n this.duration = 300;\n }\n }\n class ModalMoveUp extends Move {\n constructor() {\n super(...arguments);\n this.duration = 800;\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.modal.effects\", [\n ModalFade,\n ModalMoveDown,\n ModalMoveUp\n ]);\n})();\nconst Fade = _top.Fade;\nexports.Fade = Fade;\nconst Move = _top.Fade;\nexports.Move = Move;\nconst MoveXInFromRight = _top.MoveXInFromRight;\nexports.MoveXInFromRight = MoveXInFromRight;\nconst MoveXInFromLeft = _top.MoveXInFromLeft;\nexports.MoveXInFromLeft = MoveXInFromLeft;\nconst MoveYInFromBottom = _top.MoveYInFromBottom;\nexports.MoveYInFromBottom = MoveYInFromBottom;\nconst MoveYInFromTop = _top.MoveYInFromTop;\nexports.MoveYInFromTop = MoveYInFromTop;\nconst RotateX = _top.RotateX;\nexports.RotateX = RotateX;\nconst RotateY = _top.RotateY;\nexports.RotateY = RotateY;\nconst RotateZ = _top.RotateZ;\nexports.RotateZ = RotateZ;\nconst Rotate = _top.Rotate;\nexports.Rotate = Rotate;\nconst Radius = _top.Radius;\nexports.Radius = Radius;\nconst Resize = _top.Resize;\nexports.Resize = Resize;\nconst WipeLeft = _top.WipeLeft;\nexports.WipeLeft = WipeLeft;\nconst WipeRight = _top.WipeRight;\nexports.WipeRight = WipeRight;\nconst WipeUp = _top.WipeUp;\nexports.WipeUp = WipeUp;\nconst WipeDown = _top.WipeDown;\nexports.WipeDown = WipeDown;\nconst ModalFade = _top.ModalFade;\nexports.ModalFade = ModalFade;\nconst ModalMoveDown = _top.ModalMoveDown;\nexports.ModalMoveDown = ModalMoveDown;\nconst ModalMoveUp = _top.ModalMoveUp;\nexports.ModalMoveUp = ModalMoveUp;\n", "/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SwaggerUIComponent = exports.ModalEnclosureComponent = exports.ModalComponent = exports.EmailField = exports.TextField = exports.InputField = exports.ButtonField = exports.ShadowedComponent = exports.FormField = void 0;\nconst qcobjects_1 = require(\"qcobjects\");\nconst org_qcobjects_effects_1 = require(\"./org.qcobjects.effects\");\nconst _top = (typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({})));\n(function (global) {\n class FormField extends qcobjects_1.Component {\n constructor(o) {\n o.name = (typeof o.name !== \"undefined\") ? (o.name) : (\"form-field\");\n super(o);\n this.cached = false;\n this.reload = true;\n }\n createBindingEvents() {\n let _objList;\n if (typeof this.fieldType === \"undefined\" || this.fieldType == null) {\n _objList = this.body.subelements(\"*[data-field]\"); // every child with data-field set\n }\n else {\n _objList = this.body.subelements(this.fieldType + \"[data-field]\"); // every child with data-field set and tagname is equal to fieldType property\n }\n for (let _datak = 0; _datak < _objList.length; _datak++) {\n const _obj = _objList[_datak];\n _obj.addEventListener(\"change\", () => {\n qcobjects_1.logger.debug(\"Executing change event binding\");\n this.executeBindings();\n });\n _obj.addEventListener(\"blur\", () => {\n qcobjects_1.logger.debug(\"Executing change event binding\");\n this.executeBindings();\n });\n _obj.addEventListener(\"focus\", () => {\n qcobjects_1.logger.debug(\"Executing change event binding\");\n this.executeBindings();\n });\n _obj.addEventListener(\"keydown\", () => {\n qcobjects_1.logger.debug(\"Executing keydown event binding\");\n this.executeBindings();\n });\n }\n }\n executeBinding(_obj) {\n const _datamodel = _obj.getAttribute(\"data-field\");\n qcobjects_1.logger.debug(\"Binding \" + _datamodel + \" for \" + this.name);\n this.data[_datamodel] = _obj.value;\n }\n executeBindings() {\n let _objList;\n if (typeof this.fieldType === \"undefined\" || this.fieldType == null) {\n _objList = this.body.subelements(\"*[data-field]\"); // every child with data-field set\n }\n else {\n _objList = this.body.subelements(this.fieldType + \"[data-field]\"); // every child with data-field set and tagname is equal to fieldType property\n }\n for (let _datak = 0; _datak < _objList.length; _datak++) {\n const _obj = _objList[_datak];\n const _datamodel = _obj.getAttribute(\"data-field\");\n qcobjects_1.logger.debug(\"Binding \" + _datamodel + \" for \" + this.name);\n this.data[_datamodel] = _obj.value;\n }\n }\n done(standardResponse) {\n const _ret_ = super.done(standardResponse);\n this.executeBindings();\n this.createBindingEvents();\n qcobjects_1.logger.debug(\"Field loaded: \" + this.fieldType + \"[name=\" + this.name + \"]\");\n return _ret_;\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.base.components\", [\n FormField\n ]);\n class ShadowedComponent extends qcobjects_1.Component {\n constructor(o) {\n o.body = (0, qcobjects_1._DOMCreateElement)(\"div\");\n super(o);\n this.container = null;\n this.shadowed = true;\n this.cached = false;\n this.controller = null;\n this.view = null;\n this.data = {};\n }\n }\n class ButtonField extends FormField {\n constructor(o) {\n o.fieldType = \"button\";\n super(o);\n }\n }\n class InputField extends FormField {\n constructor(o) {\n o.fieldType = \"input\";\n super(o);\n }\n }\n class TextField extends FormField {\n constructor(o) {\n o.fieldType = \"textarea\";\n super(o);\n }\n }\n class EmailField extends FormField {\n constructor(o) {\n o.fieldType = \"input\";\n super(o);\n }\n }\n class ModalEnclosureComponent extends qcobjects_1.Component {\n constructor(o) {\n o.body = (0, qcobjects_1._DOMCreateElement)(\"div\");\n super(o);\n this.name = \"modalenclosure\";\n this.tplsource = \"inline\";\n this.cached = false;\n this.basePath = qcobjects_1.CONFIG.get(\"modalBasePath\", qcobjects_1.CONFIG.get(\"remoteSDKPath\", \"\"));\n this.template = `\n\n\n
    \n\n\n
    \n×\n{{content}}\n
    \n\n
    \n`;\n this.data = {};\n }\n }\n class ModalComponent extends qcobjects_1.Component {\n constructor(o) {\n o.basePath = qcobjects_1.CONFIG.get(\"modalBasePath\", qcobjects_1.CONFIG.get(\"remoteSDKPath\", \"\"));\n super(o);\n this.name = \"modal\";\n this.cached = false;\n this.modalEnclosureComponentClass = \"ModalEnclosureComponent\";\n this.controller = null;\n this.view = null;\n this.tplsource = \"none\";\n this.closeOnClickOutside = false;\n this.data = {\n content: \"\",\n modalId: 0\n };\n this.submodal = null;\n this.data.modalId = this.__instanceID;\n const submodal = (0, qcobjects_1.New)((0, qcobjects_1.ClassFactory)(this.modalEnclosureComponentClass), {\n name: this.name,\n basePath: this.basePath,\n data: this.data\n });\n this.subcomponents.push(submodal);\n this.submodal = submodal;\n if (submodal.tplsource === \"none\") {\n this.body.innerHTML = submodal.parsedAssignmentText;\n }\n else {\n this.body.append(submodal.body);\n }\n }\n modal() {\n const modalId = this.data.modalId;\n (0, qcobjects_1.Tag)(\"#modalInstance_\" + modalId + \".modal\").map((modal) => {\n modal.style.display = \"block\";\n return (new org_qcobjects_effects_1.ModalFade({})).apply(modal, 0, 1);\n });\n (0, qcobjects_1.Tag)(\"#modalInstance_\" + modalId + \".modal .modal-content\").map((modalcontent) => {\n return (new org_qcobjects_effects_1.ModalMoveDown({})).apply(modalcontent, 0, -document.body.clientHeight, 0, 0);\n });\n (0, qcobjects_1.Tag)(\"#modalInstance_\" + modalId + \".modal .modal-content .close\").map((closebtn) => {\n return closebtn.addEventListener(\"click\", () => {\n this.close();\n }, false);\n });\n if (this.closeOnClickOutside) {\n window.addEventListener(\"click\", () => {\n this.close();\n }, false);\n }\n }\n close() {\n const modalId = this.data.modalId;\n (0, qcobjects_1.Tag)(\"#modalInstance_\" + modalId + \".modal\").map((modal) => {\n modal.style.display = \"block\";\n return (new org_qcobjects_effects_1.ModalFade({})).apply(modal, 1, 0);\n });\n (0, qcobjects_1.Tag)(\"#modalInstance_\" + modalId + \".modal .modal-content\").map(function (modalcontent) {\n return (new org_qcobjects_effects_1.ModalMoveUp({})).apply(modalcontent, 0, 0, 0, -document.body.clientHeight);\n });\n setTimeout(function () {\n (0, qcobjects_1.Tag)(\"#modalInstance_\" + modalId + \".modal\").map((modal) => {\n modal.style.display = \"none\";\n return true;\n });\n }, 900);\n }\n rebuild() {\n const _ret_ = super.rebuild();\n this.templateURI = (0, qcobjects_1.ComponentURI)({\n \"COMPONENTS_BASE_PATH\": qcobjects_1.CONFIG.get(\"componentsBasePath\", \"\"),\n \"COMPONENT_NAME\": \"modal\",\n \"TPLEXTENSION\": qcobjects_1.CONFIG.get(\"tplextension\", \"\"),\n \"TPL_SOURCE\": \"default\" // here is always default in order to get the right uri\n });\n return _ret_; // parent call\n }\n }\n class SwaggerUIComponent extends qcobjects_1.Component {\n constructor() {\n super(...arguments);\n this.cached = false;\n this.basePath = qcobjects_1.CONFIG.get(\"remoteSDKPath\", \"\");\n this.tplextension = \"tpl.html\";\n this.name = \"swagger-ui\";\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.form.components\", [\n ShadowedComponent,\n ButtonField,\n InputField,\n TextField,\n EmailField,\n ModalEnclosureComponent,\n ModalComponent,\n SwaggerUIComponent\n ]);\n global.FormField = FormField;\n global.ShadowedComponent = ShadowedComponent;\n global.ButtonField = ButtonField;\n global.InputField = InputField;\n global.TextField = TextField;\n global.EmailField = EmailField;\n global.ModalEnclosureComponent = ModalEnclosureComponent;\n global.ModalComponent = ModalComponent;\n global.SwaggerUIComponent = SwaggerUIComponent;\n})(_top);\nconst FormField = _top.FormField;\nexports.FormField = FormField;\nconst ShadowedComponent = _top.ShadowedComponent;\nexports.ShadowedComponent = ShadowedComponent;\nconst ButtonField = _top.ButtonField;\nexports.ButtonField = ButtonField;\nconst InputField = _top.InputField;\nexports.InputField = InputField;\nconst TextField = _top.TextField;\nexports.TextField = TextField;\nconst EmailField = _top.EmailField;\nexports.EmailField = EmailField;\nconst ModalEnclosureComponent = _top.ModalEnclosureComponent;\nexports.ModalEnclosureComponent = ModalEnclosureComponent;\nconst ModalComponent = _top.ModalComponent;\nexports.ModalComponent = ModalComponent;\nconst SwaggerUIComponent = _top.SwaggerUIComponent;\nexports.SwaggerUIComponent = SwaggerUIComponent;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GridItemComponent = exports.GridComponent = void 0;\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\nconst _top = (typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({})));\n(function (global) {\n \"use strict\";\n class GridItemComponent extends qcobjects_1.Component {\n constructor() {\n super(...arguments);\n this.name = \"grid-item\";\n this.shadowed = true;\n this.tplsource = \"inline\";\n this.template = `\n\n

    {{description}}

    \n`;\n this.cached = false;\n }\n }\n class GridComponent extends qcobjects_1.Component {\n constructor(o) {\n super(o);\n this.name = \"grid\";\n this.cached = false;\n this.view = null;\n this.shadowed = true;\n this.rows = 3;\n this.cols = 3;\n this.templateURI = \"\";\n this.data = {};\n this.tplsource = \"inline\";\n this.template = \"

    Loading...

    \";\n this.body.setAttribute(\"controllerClass\", \"DataGridController\");\n const subcomponentClass = (this.body.getAttribute(\"subcomponentClass\") !== null) ? (this.body.getAttribute(\"subcomponentClass\")) : (\"GridItemComponent\");\n this.body.setAttribute(\"subcomponentClass\", subcomponentClass);\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.components.grid\", [\n GridComponent,\n GridItemComponent\n ]);\n global.GridComponent = GridComponent;\n global.GridItemComponent = GridItemComponent;\n})(_top);\nconst GridComponent = _top.GridComponent;\nexports.GridComponent = GridComponent;\nconst GridItemComponent = _top.GridItemComponent;\nexports.GridItemComponent = GridItemComponent;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ListItemComponent = exports.ListComponent = void 0;\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\nconst _top = (typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({})));\n(function (global) {\n \"use strict\";\n class ListItemComponent extends qcobjects_1.Component {\n constructor(o) {\n o.name = \"list-item\";\n super(o);\n this.shadowed = false;\n this.tplsource = \"inline\";\n this.template = \"{{label}}\";\n this.cached = false;\n }\n }\n class ListComponent extends qcobjects_1.Component {\n constructor(o) {\n o.name = \"list\";\n super(o);\n this.shadowed = true;\n this.tplsource = \"inline\";\n this.template = \"

    Loading...

    \";\n this.body.setAttribute(\"controllerClass\", \"ListController\");\n this.body.setAttribute(\"subcomponentClass\", \"ListItemComponent\");\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.components.list\", [\n ListItemComponent,\n ListComponent\n ]);\n global.ListComponent = ListComponent;\n global.ListItemComponent = ListItemComponent;\n})(_top);\nconst ListComponent = _top.ListComponent;\nexports.ListComponent = ListComponent;\nconst ListItemComponent = _top.ListItemComponent;\nexports.ListItemComponent = ListItemComponent;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.components.slider\", [\n class SlideListComponent extends qcobjects_1.Component {\n constructor(o) {\n super(o);\n this.tplsource = \"inline\";\n this.template = \"

    Loading...

    \";\n this.name = \"slidelist\";\n this.body.setAttribute(\"controllerClass\", \"DataGridController\");\n const subcomponentClass = (this.body.getAttribute(\"subcomponentClass\") !== null) ? (this.body.getAttribute(\"subcomponentClass\")) : (\"GridItemComponent\");\n this.body.setAttribute(\"subcomponentClass\", subcomponentClass);\n }\n },\n class SlideItemComponent extends qcobjects_1.Component {\n constructor(o) {\n super(o);\n this.effectClass = \"Fade\";\n this.name = \"slider_item\";\n this.data.slideNumber = this.data.__dataIndex + 1;\n this.template = `\n
    \n
    {{slideNumber}} / {{__dataLength}}
    \n \"{{title}}\"/\n
    \n

    {{label}} {{category}}

    \n
    \n
    \n `;\n this.tplsource = \"inline\";\n }\n },\n class SliderComponent extends qcobjects_1.Component {\n constructor(o) {\n super(o);\n this.name = \"slider\";\n this.template = `\n \n \n
    \n \n \n \n \n
    \n
    \n \n
    \n
    \n \n `;\n this.tplsource = \"inline\";\n this.shadowed = true;\n this.data.SERVICE_CLASS = this.body.getAttribute(\"serviceClass\");\n this.data.sliderHandler = \"slider_\" + this.__instanceID.toString();\n this.body.setAttribute(\"controllerClass\", \"SliderController\");\n }\n }\n ]);\n})();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\nconst org_qcobjects_effects_1 = require(\"./org.qcobjects.effects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n(function () {\n \"use strict\";\n class NotificationComponent extends qcobjects_1.Component {\n constructor(o) {\n o.name = \"notification\";\n o.body = (0, qcobjects_1._DOMCreateElement)(\"div\");\n super(o);\n this.cached = false;\n this.tplsource = \"inline\";\n this.shadowed = false;\n this.template = `\n \n
    \n
    \n

    {{title}} {{message}}

    \n
    \n
    \n `;\n this.kinds = [\"danger\", \"success\", \"info\", \"warning\"];\n }\n display(element) {\n const _display_ = function (element) {\n element.style.display = \"block\";\n const appearEffect = (0, qcobjects_1.New)(org_qcobjects_effects_1.Move, {\n duration: 900,\n apply(element) {\n (0, qcobjects_1._super_)(\"Fade\", \"apply\").call(this, element, 0, 1);\n (0, qcobjects_1._super_)(\"Move\", \"apply\").call(this, element, 0, -document.body.clientHeight, 0, 0);\n }\n });\n const disappearEffect = (0, qcobjects_1.New)(org_qcobjects_effects_1.Move, {\n duration: 650,\n apply(element) {\n (0, qcobjects_1._super_)(\"Fade\", \"apply\").call(this, element, 1, 0);\n (0, qcobjects_1._super_)(\"Move\", \"apply\").call(this, element, 0, 0, 0, -document.body.clientHeight);\n }\n });\n appearEffect.apply(element);\n setTimeout(function () {\n disappearEffect.apply(element);\n }, 2000);\n };\n element.subelements(\"div.notification_background\").map(element => (0, qcobjects_1.New)(org_qcobjects_effects_1.Fade, { duration: 500 }).apply(element, 0, 1));\n element.subelements(\"div.notification\").map(element => _display_(element));\n setTimeout(function () {\n element.remove();\n }, 2200);\n }\n static success(message) {\n const c = (0, qcobjects_1.New)(NotificationComponent, {\n name: \"notification\",\n shadowed: true,\n body: (0, qcobjects_1._DOMCreateElement)(\"div\"),\n data: {\n kind: \"success\",\n title: \"Success!\",\n message: `${message}...`\n }\n });\n document.body.append(c);\n const _componentRoot = (c.shadowed) ? (c.shadowRoot.host) : (c.body);\n c.display(_componentRoot);\n }\n static danger(message) {\n const c = (0, qcobjects_1.New)(NotificationComponent, {\n name: \"notification\",\n shadowed: true,\n body: (0, qcobjects_1._DOMCreateElement)(\"div\"),\n data: {\n kind: \"danger\",\n title: \"Danger!\",\n message: `${message}...`\n }\n });\n document.body.append(c);\n const _componentRoot = (c.shadowed) ? (c.shadowRoot.host) : (c.body);\n c.display(_componentRoot);\n }\n static info(message) {\n const c = (0, qcobjects_1.New)(NotificationComponent, {\n name: \"notification\",\n shadowed: true,\n body: (0, qcobjects_1._DOMCreateElement)(\"div\"),\n data: {\n kind: \"info\",\n title: \"Info!\",\n message: `${message}...`\n }\n });\n document.body.append(c);\n const _componentRoot = (c.shadowed) ? (c.shadowRoot.host) : (c.body);\n c.display(_componentRoot);\n }\n static warning(message) {\n const c = (0, qcobjects_1.New)(NotificationComponent, {\n name: \"notification\",\n shadowed: true,\n body: (0, qcobjects_1._DOMCreateElement)(\"div\"),\n data: {\n kind: \"warning\",\n title: \"Warning!\",\n message: `${message}...`\n }\n });\n document.body.append(c);\n const _componentRoot = (c.shadowed) ? (c.shadowRoot.host) : (c.body);\n c.display(_componentRoot);\n }\n }\n (0, qcobjects_1.Package)(\"org.quickcorp.components.notifications\", [\n NotificationComponent\n ]);\n})();\n", "\"use strict\";\n/**\n * QCObjects SDK 2.4.0\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CubeSplashScreenComponent = exports.VideoSplashScreenComponent = exports.SplashScreenComponent = void 0;\nconst qcobjects_1 = require(\"qcobjects\");\nconst org_qcobjects_effects_1 = require(\"./org.qcobjects.effects\");\nconst _top = (typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({})));\n// eslint-disable-next-line camelcase\n(function __splash_screen__(global) {\n \"use strict\";\n class SplashScreenComponent extends qcobjects_1.Component {\n constructor(component) {\n component.name = (typeof component.name === \"undefined\") ? (\"splashscreen\") : (component.name);\n const isBrowser = typeof window !== \"undefined\" && typeof window.self !== \"undefined\" && window === window.self;\n const isStartURL = (location.hash === \"\"\n && location.pathname === \"/\" && location.search === \"\")\n || qcobjects_1.CONFIG.get(\"routingWay\", \"pathname\") === \"hash\" && qcobjects_1.CONFIG.get(\"start_url\", \"/\") === location.hash\n || qcobjects_1.CONFIG.get(\"routingWay\", \"pathname\") === \"pathname\" && qcobjects_1.CONFIG.get(\"start_url\", \"/\") === location.pathname\n || qcobjects_1.CONFIG.get(\"routingWay\", \"pathname\") === \"search\" && qcobjects_1.CONFIG.get(\"start_url\", \"/\") === location.search;\n const _enabled_ = isBrowser && isStartURL;\n if (_enabled_) {\n component.basePath = qcobjects_1.CONFIG.get(\"splashscreenBasePath\", qcobjects_1.CONFIG.get(\"remoteSDKPath\", \"\"));\n if (typeof component.data === \"undefined\") {\n component.data = {};\n }\n component.data.basePath = component.basePath;\n }\n else {\n if (typeof component !== \"undefined\" && typeof component.body !== \"undefined\") {\n component.body.style.display = \"none\";\n }\n }\n super(component);\n this.cached = false;\n this.shadowed = true;\n this._bgcolor = \"\";\n this._enabled_ = _enabled_;\n if (this._enabled_) {\n const displayEffectDuration = 1000;\n let duration = this.body.getAttribute(\"duration\");\n if (duration === null) {\n duration = displayEffectDuration;\n }\n else {\n duration = parseInt(duration.toString());\n }\n this._bgcolor = this.body.style.backgroundColor;\n const _helper_ = () => {\n setTimeout(() => {\n if (!_helper_.executed) {\n const _componentRoot = (this.shadowed) ? this.shadowRoot?.host : this.body;\n if (typeof global.componentsStack !== \"undefined\") {\n global.componentsStack.filter((c) => c.body.hasAttribute(\"splashscreen\")).map((mainComponent) => {\n qcobjects_1.logger.debug(`Splash Screen of Main Component: ${mainComponent.name}`);\n mainComponent.splashScreenComponent = this;\n const SplashScreenHandler = () => {\n if (!SplashScreenHandler.executed) {\n const component = mainComponent.splashScreenComponent;\n const mainElement = (mainComponent.shadowed) ? mainComponent.shadowRoot?.host : mainComponent.body;\n mainComponent._mainPosition = mainElement.style.position;\n if (typeof mainElement !== \"undefined\") {\n mainElement.style.position = \"fixed\";\n }\n mainComponent._mainOpacity = mainElement.style.opacity;\n _componentRoot.style.width = \"100%\";\n _componentRoot.style.height = \"100%\";\n document.body.style.backgroundColor = \"#111111\";\n mainElement.style.opacity = \"0\";\n setTimeout(function () {\n if (typeof _componentRoot !== \"undefined\") {\n document.body.style.backgroundColor = component?._bgcolor;\n _componentRoot.subelements(\"#slot-logo\").map((slotlogo) => {\n slotlogo.style.display = \"block\";\n slotlogo.style.transformOrigin = \"center\";\n return (new org_qcobjects_effects_1.Resize()).apply(slotlogo, 1, 0);\n });\n (new org_qcobjects_effects_1.Fade()).apply(_componentRoot, 1, 0);\n }\n }, (duration - displayEffectDuration));\n setTimeout(function () {\n (new org_qcobjects_effects_1.Fade()).apply(mainElement, 0, 1);\n mainElement.style.position = mainComponent._mainPosition;\n document.body.style.backgroundColor = component._bgcolor;\n if (_componentRoot.parentElement !== null) {\n _componentRoot.parentElement.remove();\n }\n }, duration);\n }\n SplashScreenHandler.executed = true;\n };\n return mainComponent.addComponentHelper(SplashScreenHandler.bind(mainComponent));\n });\n }\n _helper_.executed = true;\n }\n });\n };\n _helper_.executed = false;\n this.addComponentHelper(_helper_.bind(component));\n }\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.components.base\", [\n SplashScreenComponent\n ]);\n class VideoSplashScreenComponent extends SplashScreenComponent {\n constructor(o) {\n o.name = \"videosplashscreen\";\n super(o);\n this.cached = false;\n this.shadowed = true;\n this.tplsource = \"inline\";\n this.template = `\n \n
    \n
    \n \n \n
    \n
    \n\n `;\n }\n }\n class CubeSplashScreenComponent extends SplashScreenComponent {\n constructor(o) {\n o.name = \"cubesplashscreen\";\n super(o);\n this.cached = false;\n this.shadowed = true;\n this.tplsource = \"inline\";\n this.template = `\n \n\n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n\n `;\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.components.splashscreen\", [\n VideoSplashScreenComponent,\n CubeSplashScreenComponent\n ]);\n})(_top);\nconst SplashScreenComponent = _top.SplashScreenComponent;\nexports.SplashScreenComponent = SplashScreenComponent;\nconst VideoSplashScreenComponent = _top.VideoSplashScreenComponent;\nexports.VideoSplashScreenComponent = VideoSplashScreenComponent;\nconst CubeSplashScreenComponent = _top.CubeSplashScreenComponent;\nexports.CubeSplashScreenComponent = CubeSplashScreenComponent;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.controllers\", [\n class GenericController extends qcobjects_1.Controller {\n }\n ]);\n})();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.controllers.grid\", [\n class GridController extends qcobjects_1.Controller {\n constructor(controller) {\n super(controller);\n this.rows = this.component.body.getAttribute(\"rows\");\n this.rows = (this.rows !== null) ? (this.rows) : (this.component.rows);\n this.cols = this.component.body.getAttribute(\"cols\");\n this.cols = (this.cols !== null) ? (this.cols) : (this.component.cols);\n }\n cssGrid() {\n const component = this.component;\n const _componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n if (typeof this.rows !== \"undefined\" && typeof this.cols !== \"undefined\") {\n const s = (0, qcobjects_1._DOMCreateElement)(\"style\");\n const templateRows = \"auto \".repeat(this.rows);\n const templateCols = \"auto \".repeat(this.cols);\n const className = \"grid\" + this.__instanceID.toString();\n s.innerHTML = `.${className}{\n display: grid; \\\n grid-template-rows: ${templateRows}; \\\n grid-template-columns: ${templateCols}; \\\n margin:0 auto; \\\n }`;\n _componentRoot?.append(s);\n if (component.shadowed) {\n _componentRoot?.host.classList.add(className);\n }\n else {\n (_componentRoot.classList).add(className);\n }\n }\n }\n done() {\n this.cssGrid();\n qcobjects_1.logger.debug(\"GridComponent built\");\n }\n },\n class DataGridController extends qcobjects_1.Controller {\n constructor(controller) {\n super(controller);\n this._componentRoot = (controller.component.shadowed) ? (controller.component.shadowRoot) : (controller.component.body);\n this.rows = controller.component.body.getAttribute(\"rows\");\n this.rows = (controller.rows !== null) ? (controller.rows) : (controller.component.rows);\n this.cols = controller.component.body.getAttribute(\"cols\");\n this.cols = (controller.cols !== null) ? (controller.cols) : (controller.component.cols);\n qcobjects_1.logger.debug(\"DataGridController INIT\");\n }\n getPageIndex(page, totalPage, totalElements) {\n page = (page > 0) ? (page - 1) : (0);\n return [totalElements * page / totalPage, (totalElements * page / totalPage) + totalElements / totalPage];\n }\n addSubcomponents() {\n this.component.subcomponents = [];\n if (typeof this._componentRoot !== \"undefined\") {\n this._componentRoot.innerHTML = \"\";\n }\n this.cssGrid();\n qcobjects_1.logger.debug((0, qcobjects_1._DataStringify)(this.component.data));\n try {\n const subcomponentClass = this.component.body.getAttribute(\"subcomponentClass\");\n if (subcomponentClass != null) {\n let offset;\n let limit;\n let pagesNumber;\n let list = [...this.component.data];\n let paginateIn = this.component.body.getAttribute(\"paginate-in\");\n let page;\n paginateIn = (paginateIn !== null) ? (paginateIn) : (\"client\");\n if (paginateIn === \"client\") {\n page = this.component.body.getAttribute(\"page-number\");\n page = (isNaN(page) || page === null) ? (-1) : (page);\n if (page !== -1) {\n pagesNumber = this.component.body.getAttribute(\"total-pages\");\n pagesNumber = (isNaN(pagesNumber)) ? (1) : (pagesNumber);\n offset = this.getPageIndex(page, pagesNumber, list.length)[0];\n limit = this.getPageIndex(page, pagesNumber, list.length)[1];\n }\n else {\n offset = 0;\n limit = list.length;\n pagesNumber = 1;\n }\n list = list.slice(offset, limit);\n }\n else {\n offset = 0;\n limit = list.length;\n pagesNumber = 1;\n }\n list.map((record, dataIndex, list) => {\n const _ret_ = undefined;\n try {\n const _body = (0, qcobjects_1._DOMCreateElement)(\"component\");\n _body.setAttribute(\"name\", (0, qcobjects_1.ClassFactory)(subcomponentClass).name);\n _body.setAttribute(\"shadowed\", (0, qcobjects_1.ClassFactory)(subcomponentClass).shadowed);\n _body.setAttribute(\"cached\", (0, qcobjects_1.ClassFactory)(subcomponentClass).cached);\n record = Object.assign(record, {\n __dataIndex: dataIndex,\n __dataLength: list.length,\n __page: page,\n __totalPages: pagesNumber,\n __limit: limit,\n __offset: offset\n });\n const subcomponent = (0, qcobjects_1.New)((0, qcobjects_1.ClassFactory)(subcomponentClass), {\n name: \"item\",\n data: record,\n templateURI: (0, qcobjects_1.ComponentURI)({\n \"COMPONENTS_BASE_PATH\": qcobjects_1.CONFIG.get(\"componentsBasePath\", \"\"),\n \"COMPONENT_NAME\": (0, qcobjects_1.ClassFactory)(subcomponentClass).name,\n \"TPLEXTENSION\": qcobjects_1.CONFIG.get(\"tplextension\", \"\"),\n \"TPL_SOURCE\": (0, qcobjects_1.ClassFactory)(subcomponentClass).tplsource\n }),\n body: _body,\n template: (0, qcobjects_1.ClassFactory)(subcomponentClass).template\n });\n subcomponent.done = this.component.done.bind(subcomponent);\n try {\n if (subcomponent) {\n subcomponent.data.__dataIndex = dataIndex;\n if (Object.hasOwnProperty.call(this.component.data, \"length\")) {\n subcomponent.data.__dataLength = this.component.data.length;\n }\n qcobjects_1.logger.debug(\"adding subcomponent to body\");\n this._componentRoot?.append(subcomponent.body);\n try {\n this.component.subcomponents.push(subcomponent);\n }\n catch (e) {\n qcobjects_1.logger.debug(\"ERROR LOADING SUBCOMPONENT IN DATAGRID\");\n }\n }\n else {\n qcobjects_1.logger.debug(\"ERROR LOADING SUBCOMPONENT IN DATAGRID\");\n }\n }\n catch (e) {\n qcobjects_1.logger.debug(\"ERROR LOADING SUBCOMPONENT IN DATAGRID\");\n }\n }\n catch (e) {\n qcobjects_1.logger.debug(\"ERROR LOADING SUBCOMPONENT IN DATAGRID\");\n }\n return _ret_;\n });\n }\n else {\n qcobjects_1.logger.debug(\"NO SUBCOMPONENT CLASS IN COMPONENT\");\n }\n }\n catch (e) {\n qcobjects_1.logger.debug(\"No data for component\");\n }\n }\n cssGrid() {\n const component = this.component;\n const _componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n if (typeof this.rows !== \"undefined\" && typeof this.cols !== \"undefined\") {\n const s = (0, qcobjects_1._DOMCreateElement)(\"style\");\n const templateRows = \"auto \".repeat(this.rows);\n const templateCols = \"auto \".repeat(this.cols);\n const className = \"grid\" + this.__instanceID.toString();\n s.innerHTML = `.${className}{\n display: grid; \\\n grid-template-rows: ${templateRows}; \\\n grid-template-columns: ${templateCols}; \\\n margin:0 auto; \\\n }`;\n if (component.shadowed) {\n component.body.append(s);\n _componentRoot.host.classList.add(className);\n }\n else {\n _componentRoot?.append(s);\n _componentRoot.classList.add(className);\n }\n }\n }\n done() {\n const componentInstance = this.component;\n qcobjects_1.logger.debug(\"DataGridController DONE\");\n const serviceClass = this.component.body.getAttribute(\"serviceClass\");\n if (serviceClass != null) {\n let offset;\n let limit;\n let paginateIn = componentInstance.body.getAttribute(\"paginate-in\");\n paginateIn = (paginateIn !== null) ? (paginateIn) : (\"client\");\n if (paginateIn === \"server\") {\n let page = componentInstance.body.getAttribute(\"page-number\");\n page = (isNaN(page) || page === null) ? (-1) : (page);\n let pagesNumber;\n if (page !== -1) {\n const serverDataCount = (this.component.body.getAttribute(\"server-data-count\") !== null) ? this.component.body.getAttribute(\"server-data-count\") : (1);\n pagesNumber = this.component.body.getAttribute(\"total-pages\");\n pagesNumber = (isNaN(pagesNumber)) ? (1) : (pagesNumber);\n offset = this.getPageIndex(page, pagesNumber, serverDataCount)[0];\n limit = this.getPageIndex(page, pagesNumber, serverDataCount)[1];\n // send params in jsonrpc 2.0 style\n componentInstance.serviceData = (typeof componentInstance.serviceData !== \"undefined\") ? (componentInstance.serviceData) : ({});\n componentInstance.serviceData.params = (typeof componentInstance.serviceData.params !== \"undefined\") ? (componentInstance.serviceData.params) : ({});\n componentInstance.serviceData.params.offset = offset;\n componentInstance.serviceData.params.limit = limit;\n }\n }\n (0, qcobjects_1.serviceLoader)((0, qcobjects_1.New)((0, qcobjects_1.ClassFactory)(serviceClass), {\n data: componentInstance.serviceData\n }), false).then((successfulResponse) => {\n // This will show the service response as a plain text\n qcobjects_1.logger.debug(\"DONE SERVICE COMPONENT\");\n successfulResponse.service.JSONresponse = JSON.parse(successfulResponse.service.template);\n if (typeof successfulResponse.service.JSONresponse.result !== \"undefined\") {\n qcobjects_1.logger.debug((0, qcobjects_1._DataStringify)(successfulResponse.service.JSONresponse.result));\n componentInstance.data = successfulResponse.service.JSONresponse.result;\n }\n else {\n componentInstance.data = successfulResponse.service.JSONresponse;\n }\n this.addSubcomponents();\n }, (failedResponse) => {\n qcobjects_1.logger.debug(failedResponse);\n }).catch((e) => {\n qcobjects_1.logger.debug(\"Something went wrong when calling the service from: \" + serviceClass);\n qcobjects_1.logger.debug(e.message);\n });\n }\n }\n }\n ]);\n})();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.controllers.list\", [\n class ListController extends qcobjects_1.Controller {\n constructor({ component, dependencies = [], valueField = undefined, labelField = undefined }) {\n super({ component, dependencies, valueField, labelField });\n this.component = component;\n this._componentRoot = (this.component.shadowed) ? (this.component.shadowRoot) : (this.component.body);\n this.labelField = this.component.body.getAttribute(\"label-field\");\n this.valueField = this.component.body.getAttribute(\"value-field\");\n this.rows = this.component.body.getAttribute(\"rows\");\n this.rows = (this.rows !== null) ? (this.rows) : (this.component.rows);\n this.cols = 1;\n qcobjects_1.logger.debug(\"ListController INIT\");\n }\n getPageIndex(page, totalPage, totalElements) {\n page = (page > 0) ? (page - 1) : (0);\n return [totalElements * page / totalPage, (totalElements * page / totalPage) + totalElements / totalPage];\n }\n addSubcomponents() {\n this.component.subcomponents = [];\n const layout = this.component.body.getAttribute(\"layout\");\n const basePath = qcobjects_1.CONFIG.get(\"listBasePath\", qcobjects_1.CONFIG.get(\"remoteSDKPath\", \"\"));\n let cssLayout = \"\";\n this.labelField = this.component.body.getAttribute(\"label-field\");\n this.valueField = this.component.body.getAttribute(\"value-field\");\n if (layout === \"horizontal\") {\n cssLayout = `@import url(\"${basePath}css/components/horizontal-list.css\");`;\n }\n else {\n cssLayout = `@import url(\"${basePath}css/components/list.css\");`;\n }\n if (typeof this._componentRoot !== \"undefined\") {\n this._componentRoot.innerHTML = `
      `;\n }\n qcobjects_1.logger.debug((0, qcobjects_1._DataStringify)(this.component.data));\n try {\n const subcomponentClass = this.component.body.getAttribute(\"subcomponentClass\");\n if (subcomponentClass != null) {\n let offset;\n let limit;\n let pagesNumber;\n let list = [...this.component.data];\n let paginateIn = this.component.body.getAttribute(\"paginate-in\");\n paginateIn = (paginateIn !== null) ? (paginateIn) : (\"client\");\n let page;\n if (paginateIn === \"client\") {\n page = this.component.body.getAttribute(\"page-number\");\n page = (isNaN(page) || page === null) ? (-1) : (page);\n if (page !== -1) {\n pagesNumber = this.component.body.getAttribute(\"total-pages\");\n pagesNumber = (isNaN(pagesNumber)) ? (1) : (pagesNumber);\n offset = this.getPageIndex(page, pagesNumber, list.length)[0];\n limit = this.getPageIndex(page, pagesNumber, list.length)[1];\n }\n else {\n offset = 0;\n limit = list.length;\n pagesNumber = 1;\n }\n list = list.slice(offset, limit);\n }\n else {\n offset = 0;\n limit = list.length;\n pagesNumber = 1;\n }\n list.map((record, dataIndex) => {\n const _ret_ = undefined;\n try {\n const _body = (0, qcobjects_1._DOMCreateElement)(\"li\");\n record.label = record[this.labelField];\n record.value = record[this.valueField];\n const subcomponent = (0, qcobjects_1.New)((0, qcobjects_1.ClassFactory)(subcomponentClass), {\n name: \"list-item\",\n data: {\n label: record[this.labelField],\n value: record[this.valueField],\n __dataIndex: dataIndex,\n __page: page,\n __totalPages: pagesNumber,\n __limit: limit,\n __offset: offset\n },\n templateURI: (0, qcobjects_1.ComponentURI)({\n \"COMPONENTS_BASE_PATH\": qcobjects_1.CONFIG.get(\"componentsBasePath\", \"\"),\n \"COMPONENT_NAME\": (0, qcobjects_1.ClassFactory)(subcomponentClass).name,\n \"TPLEXTENSION\": qcobjects_1.CONFIG.get(\"tplextension\", \"\"),\n \"TPL_SOURCE\": (0, qcobjects_1.ClassFactory)(subcomponentClass).tplsource\n }),\n body: _body,\n template: (0, qcobjects_1.ClassFactory)(subcomponentClass).template\n });\n subcomponent.done = this.component.done.bind(subcomponent);\n try {\n if (subcomponent) {\n subcomponent.data.__dataIndex = dataIndex;\n if (Object.hasOwnProperty.call(this.component.data, \"length\")) {\n subcomponent.data.__dataLength = this.component.data.length;\n }\n qcobjects_1.logger.debug(\"adding subcomponent to body\");\n this._componentRoot.subelements(\"ul\").map(ul => ul.append(subcomponent));\n try {\n this.component.subcomponents.push(subcomponent);\n }\n catch (e) {\n qcobjects_1.logger.debug(\"ERROR LOADING SUBCOMPONENT IN DATAGRID\");\n }\n }\n else {\n qcobjects_1.logger.debug(\"ERROR LOADING SUBCOMPONENT IN DATAGRID\");\n }\n }\n catch (e) {\n qcobjects_1.logger.debug(\"ERROR LOADING SUBCOMPONENT IN DATAGRID\");\n }\n }\n catch (e) {\n qcobjects_1.logger.debug(\"ERROR LOADING SUBCOMPONENT IN DATAGRID\");\n }\n return _ret_;\n });\n }\n else {\n qcobjects_1.logger.debug(\"NO SUBCOMPONENT CLASS IN COMPONENT\");\n }\n }\n catch (e) {\n qcobjects_1.logger.debug(\"No data for component\");\n }\n }\n cssGrid() {\n const component = this.component;\n const _componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n if (typeof this.rows !== \"undefined\" && typeof this.cols !== \"undefined\") {\n const s = (0, qcobjects_1._DOMCreateElement)(\"style\");\n const templateRows = \"auto \".repeat(this.rows);\n const templateCols = \"auto \".repeat(this.cols);\n const className = \"grid\" + this.__instanceID.toString();\n s.innerHTML = `.${className}{\n display: grid; \\\n grid-template-rows: ${templateRows}; \\\n grid-template-columns: ${templateCols}; \\\n margin:0 auto; \\\n }`;\n _componentRoot.append(s);\n _componentRoot.classList.add(className);\n }\n }\n done() {\n this.cssGrid();\n const componentInstance = this.component;\n qcobjects_1.logger.debug(\"ListController DONE\");\n const serviceClass = this.component.body.getAttribute(\"serviceClass\");\n if (serviceClass != null) {\n let offset;\n let limit;\n let paginateIn = componentInstance.body.getAttribute(\"paginate-in\");\n paginateIn = (paginateIn !== null) ? (paginateIn) : (\"client\");\n if (paginateIn === \"server\") {\n let page = componentInstance.body.getAttribute(\"page-number\");\n page = (isNaN(page) || page === null) ? (-1) : (page);\n let pagesNumber;\n if (page !== -1) {\n const serverDataCount = (this.component.body.getAttribute(\"server-data-count\") !== null) ? (this.component.body.getAttribute(\"server-data-count\")) : (1);\n pagesNumber = this.component.body.getAttribute(\"total-pages\");\n pagesNumber = (isNaN(pagesNumber)) ? (1) : (pagesNumber);\n offset = this.getPageIndex(page, pagesNumber, serverDataCount)[0];\n limit = this.getPageIndex(page, pagesNumber, serverDataCount)[1];\n // send params in jsonrpc 2.0 style\n componentInstance.serviceData = (typeof componentInstance.serviceData !== \"undefined\") ? (componentInstance.serviceData) : ({});\n componentInstance.serviceData.params = (typeof componentInstance.serviceData.params !== \"undefined\") ? (componentInstance.serviceData.params) : ({});\n componentInstance.serviceData.params.offset = offset;\n componentInstance.serviceData.params.limit = limit;\n }\n }\n (0, qcobjects_1.serviceLoader)((0, qcobjects_1.New)((0, qcobjects_1.ClassFactory)(serviceClass), {\n data: componentInstance.serviceData\n }), false).then((successfulResponse) => {\n // This will show the service response as a plain text\n qcobjects_1.logger.debug(\"DONE SERVICE COMPONENT\");\n successfulResponse.service.JSONresponse = JSON.parse(successfulResponse.service.template);\n if (typeof successfulResponse.service.JSONresponse.result !== \"undefined\") {\n qcobjects_1.logger.debug((0, qcobjects_1._DataStringify)(successfulResponse.service.JSONresponse.result));\n componentInstance.data = successfulResponse.service.JSONresponse.result;\n }\n else {\n componentInstance.data = successfulResponse.service.JSONresponse;\n }\n this.addSubcomponents();\n }, (failedResponse) => {\n qcobjects_1.logger.debug(failedResponse);\n }).catch((e) => {\n qcobjects_1.logger.debug(\"Something went wrong when calling the service from: \" + serviceClass);\n qcobjects_1.logger.debug(e.message);\n });\n }\n }\n }\n ]);\n})();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n(function (global) {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.controllers.slider\", [\n class SliderController extends qcobjects_1.Controller {\n constructor({ component, dependencies = [], duration = 7100, slideIndex = 0, interval = null, sliderHandlerName = null }) {\n super({ component, dependencies, duration, slideIndex, interval, sliderHandlerName });\n this.slideIndex = 0;\n this.duration = 7100;\n this.interval = null;\n this.sliderHandlerName = \"\";\n this.component = component;\n this._componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n this.sliderHandlerName = \"slider_\" + this.component.__instanceID.toString();\n global.set(this.sliderHandlerName, this);\n }\n stop() {\n if (this.interval != null) {\n clearInterval(this.interval);\n }\n }\n plusSlidesAndStop(n) {\n this.stop();\n this.plusSlides(n);\n }\n plusSlides(n) {\n this.showSlides(this.slideIndex += n);\n }\n currentSlide(n) {\n this.stop();\n this.showSlides(this.slideIndex = n);\n }\n automate() {\n this.interval = setInterval(() => {\n this.plusSlides(1);\n }, this.duration);\n }\n showSlides(n) {\n const slides = this._componentRoot?.subelements(\".qcoSlides\");\n const dots = this._componentRoot?.subelements(\".qcoSlider__dots--dot\");\n if (n > (slides.length - 1)) {\n this.slideIndex = 0;\n }\n if (n < 0) {\n this.slideIndex = 0;\n }\n slides.filter((slide, index) => { return index !== this.slideIndex; }).map((slide) => {\n return ((0, qcobjects_1.New)((0, qcobjects_1.ClassFactory)(\"Fade\"), {})).apply(slide, 1, 0);\n });\n dots.filter((dot, index) => { return index !== this.slideIndex; }).map((dot) => {\n return dot.classList.remove(\"active\");\n });\n try {\n dots[this.slideIndex].classList.add(\"active\");\n }\n catch (e) {\n qcobjects_1.logger.debug(`Something went wrong when trying to activate a slide: ${this.slideIndex} - ${e.message}`);\n }\n setTimeout(() => {\n slides.filter((slide, index) => { return index !== this.slideIndex; }).map((slide) => {\n slide.style.display = \"none\";\n return slide.style.display;\n });\n try {\n slides[this.slideIndex].style.display = \"block\";\n ((0, qcobjects_1.New)((0, qcobjects_1.ClassFactory)(\"Fade\"), {})).apply(slides[this.slideIndex], 0, 1);\n }\n catch (e) {\n qcobjects_1.logger.debug(`Something went wrong when trying to show a slide: ${this.slideIndex} - ${e.message}`);\n }\n }, 700);\n }\n fillDots() {\n const slides = this._componentRoot?.subelements(\".qcoSlides\");\n slides.map((slide, index) => {\n const dotHTML = document.createElement(\"span\");\n const dotContent = ``;\n dotHTML.innerHTML = dotContent;\n return this._componentRoot?.subelements(\".qcoSlider__dots\")[0].append(dotHTML);\n });\n }\n done() {\n const slides = this._componentRoot?.subelements(\".qcoSlides\");\n slides.filter((slide, index) => { return index !== this.slideIndex; }).map((slide) => {\n slide.style.display = \"none\";\n return slide.style.display;\n });\n setTimeout(() => {\n this.fillDots();\n this.slideIndex = 0;\n this.showSlides(this.slideIndex);\n this.automate();\n }, 3000);\n }\n }\n ]);\n})((typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({}))));\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\nconst org_qcobjects_components_1 = require(\"./org.qcobjects.components\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.controllers.form\", [\n class FormValidations extends qcobjects_1.Controller {\n getDefault() {\n return function (fieldName, dataValue, element) {\n const _regex = {\n name: \"^[a-zA-Z]+(([',. -][a-zA-Z ])?[a-zA-Z]*)*$\",\n email: \"^([A-Za-z0-9]+)@([A-Za-z0-9]+).([A-Za-z0-9]+)$\"\n };\n const _pattern_ = (element.getAttribute(\"pattern\") || _regex[fieldName]);\n const pattern = new RegExp(_pattern_);\n return pattern.test(dataValue);\n };\n }\n },\n class FormController extends qcobjects_1.Controller {\n hasValidation(element) {\n const fieldName = element.getAttribute(\"data-field\");\n let _hasValidation = false;\n if (typeof this.validations !== \"undefined\"\n && Object.hasOwnProperty.call(this.validations, fieldName)) {\n _hasValidation = true;\n }\n return _hasValidation;\n }\n isInvalid(element) {\n let _isInvalid = false;\n const fieldName = element.getAttribute(\"data-field\");\n const dataValue = this.component.data[fieldName];\n const _execValidation = (fieldName, dataValue, element) => {\n return (typeof this.validations !== \"undefined\"\n && Object.hasOwnProperty.call(this.validations, fieldName)\n && this.validations[fieldName].call(null, fieldName, dataValue, element));\n };\n if (typeof this.validations !== \"undefined\" && (!_execValidation(fieldName, dataValue, element))) {\n _isInvalid = true;\n }\n return _isInvalid;\n }\n isValid(element) {\n return !this.isInvalid(element);\n }\n save() {\n if (this.serviceClass !== \"\") {\n location.href = this.formSettings.loadingRouting;\n (0, qcobjects_1.serviceLoader)((0, qcobjects_1.New)((0, qcobjects_1.ClassFactory)(this.serviceClass), {\n data: this.component.data\n }), false).then((successfulResponse) => {\n // This will show the service response as a plain text\n console.log(\"DONE SERVICE COMPONENT\");\n try {\n console.log(successfulResponse.service.JSONresponse);\n }\n catch (e) {\n // no json\n }\n location.href = this.formSettings.nextRouting;\n }, (failedResponse) => {\n qcobjects_1.logger.debug(failedResponse);\n location.href = this.formSettings.backRouting;\n });\n }\n else {\n qcobjects_1.logger.debug(\"No service name declared on serviceClass property\");\n }\n }\n formSaveTouchHandler() {\n qcobjects_1.logger.debug(\"Saving data...\");\n const _componentRoot_ = (this.component.shadowed) ? ((this.component?.shadowRoot).host) : (this.component.body);\n this.component.executeBindings();\n if (this.formValidatorModal != null) {\n const componentElementFields = _componentRoot_.subelements(\"*[data-field]\");\n const fieldsToValidate = componentElementFields.filter(f => this.hasValidation(f));\n const _labelledby = function (parentElement, element) {\n const _arialabelledby = (parentElement, element) => {\n return (element.getAttribute(\"aria-labelledby\") !== null) ? ((element.getAttribute(\"aria-labelledby\") || \"\").split(\" \").map(e => parentElement.subelements(`#${e}`).map(_e => _e.innerHTML)).join(\" \")) : (null);\n };\n return (_arialabelledby(parentElement, element)\n || element.getAttribute(\"aria-label\")\n || element.getAttribute(\"placeholder\")\n || element.getAttribute(\"name\")\n || element.getAttribute(\"data-field\"));\n };\n const _ariatitle = function (element) {\n return (element.getAttribute(\"title\") || element.getAttribute(\"aria-title\") || \"\");\n };\n const invalidFields = fieldsToValidate.filter(f => this.isInvalid(f));\n if (invalidFields.length > 0) {\n const validationMessage = `\n
      \n Please verify the following incorrect fields:\n
        \n
        \n ${invalidFields.map(element => \"
      • \" + _labelledby(_componentRoot_, element) + \"
        \" + _ariatitle(element) + \"
      • \").join(\"\")}\n
        \n
      \n
      \n`;\n this.formValidatorModal.body.subelements(\".validationMessage\")[0].innerHTML = validationMessage;\n this.formValidatorModal.modal();\n }\n else {\n this.save();\n }\n }\n else {\n qcobjects_1.logger.debug(\"Unable to find the modal validator...\");\n qcobjects_1.logger.debug(\"Saving data...\");\n this.save();\n }\n }\n constructor(o) {\n super(o);\n this.validations = [];\n this.serviceClass = \"\";\n this.formSettings = {\n backRouting: \"#\",\n loadingRouting: \"#loading\",\n nextRouting: \"#signupsuccessful\"\n };\n this.component = o.component;\n this.component = this.component.Cast(org_qcobjects_components_1.FormField);\n }\n done() {\n qcobjects_1.logger.debugEnabled = true;\n try {\n this.component.createBindingEvents();\n const modalBody = (0, qcobjects_1._DOMCreateElement)(\"div\");\n modalBody.className = \"modal_body\";\n this.formValidatorModal = (0, qcobjects_1.New)(org_qcobjects_components_1.ModalComponent, {\n body: modalBody,\n subcomponents: [],\n data: {\n content: \"
      \"\n }\n });\n (0, qcobjects_1.Tag)(\".modal_body\").map(e => document.body.removeChild(e));\n document.body.append(this.formValidatorModal);\n }\n catch (e) {\n qcobjects_1.logger.debug(\"Unable to create the modal\");\n }\n this.onpress(\".submit\", () => {\n this.formSaveTouchHandler();\n });\n }\n }\n ]);\n})();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.controllers.swagger\", [\n class SwaggerUIController extends qcobjects_1.Controller {\n startSwaggerUI() {\n // Begin Swagger UI call region\n if (typeof SwaggerUIBundle !== \"undefined\") {\n /* eslint-disable no-undef */\n const ui = SwaggerUIBundle({\n url: qcobjects_1.CONFIG.get(\"swagger-ui-url\", \"https://petstore.swagger.io/v2/swagger.json\"),\n dom_id: \"#\" + qcobjects_1.CONFIG.get(\"swagger-ui-dom_id\", \"swagger-ui\"),\n deepLinking: true,\n presets: [\n SwaggerUIBundle.presets.apis,\n SwaggerUIStandalonePreset\n ],\n plugins: [\n SwaggerUIBundle.plugins.DownloadUrl\n ],\n layout: \"StandaloneLayout\"\n });\n // End Swagger UI call region\n window.ui = ui;\n }\n }\n done() {\n this.component.body.innerHTML = \"
      \";\n const swaggerUIPackagePath = qcobjects_1.CONFIG.get(\"swagger-ui-package-path\", \"node_modules/swagger-ui-dist/\");\n this.dependencies?.push((0, qcobjects_1.New)(qcobjects_1.SourceJS, {\n url: swaggerUIPackagePath + \"swagger-ui-standalone-preset.js\",\n external: qcobjects_1.CONFIG.get(\"swagger-ui-external\", false)\n }));\n this.dependencies?.push((0, qcobjects_1.New)(qcobjects_1.SourceCSS, {\n url: swaggerUIPackagePath + \"swagger-ui.css\",\n external: qcobjects_1.CONFIG.get(\"swagger-ui-external\", false)\n }));\n this.dependencies?.push((0, qcobjects_1.New)(qcobjects_1.SourceJS, {\n url: swaggerUIPackagePath + \"swagger-ui-bundle.js\",\n external: qcobjects_1.CONFIG.get(\"swagger-ui-external\", false),\n done: () => {\n this.startSwaggerUI();\n }\n }));\n }\n }\n ]);\n})();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.modal.controllers\", [\n class ModalController extends qcobjects_1.Controller {\n done() {\n const component = this.component;\n component.body.innerHTML = component.body.innerHTML.replace(\"/{{content}}/g\", component.submodal.template);\n }\n }\n ]);\n})();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.views\", [\n class GridView extends qcobjects_1.View {\n }\n ]);\n})();\n", "/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n(function () {\n (0, qcobjects_1.Package)(\"org.qcobjects.tools.canvas\", [\n class CanvasTool extends qcobjects_1.InheritClass {\n drawImageFilled(img, canvas, zoom = 1, px = 0, py = 0) {\n // get the scale\n let scale = Math.max(canvas.width / img.width, canvas.height / img.height);\n scale = scale * zoom;\n // get the top left position of the image\n const x = (canvas.width / 2) - (img.width / 2) * scale;\n const y = (canvas.height / 2) - (img.height / 2) * scale;\n const ctx = canvas.getContext(\"2d\");\n ctx?.drawImage(img, (px + x), (py + y), img.width * scale, img.height * scale);\n }\n getImageResized(img, width, height, resizedImage, zoom = 1, px = 0, py = 0) {\n const canvas = document.createElement(\"canvas\");\n canvas.width = width;\n canvas.height = height;\n canvas.style.width = width.toString();\n canvas.style.height = height.toString();\n this.drawImageFilled(img, canvas, zoom, px, py);\n resizedImage.src = canvas.toDataURL(\"image/png\");\n return canvas;\n }\n }\n ]);\n})();\n", "/* eslint-disable array-callback-return */\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\nconst org_qcobjects_effects_1 = require(\"./org.qcobjects.effects\");\n(function () {\n (0, qcobjects_1.Package)(\"org.qcobjects.tools.layouts\", [\n class BasicLayout extends qcobjects_1.InheritClass {\n constructor({ component = null, dependencies = [] }) {\n super({ component, dependencies });\n this.dependencies = [];\n }\n load() {\n this.dependencies.push((0, qcobjects_1.New)(qcobjects_1.SourceCSS, {\n external: !(qcobjects_1.CONFIG.get(\"useLocalSDK\", false)),\n url: (qcobjects_1.CONFIG.get(\"useLocalSDK\", false)) ? (\"css/basic-layout.css\") : (qcobjects_1.CONFIG.get(\"remoteSDKPath\", false) + \"css/basic-layout.css\")\n }));\n }\n coloredBorder() {\n /*\n * A helper function to visualize the layout borders\n * Usage: BasicLayout.coloredBorder()\n */\n setTimeout(function () {\n (0, qcobjects_1.Tag)(\"nav\").map((element) => { element.style.border = \"20px solid #3333\"; });\n (0, qcobjects_1.Tag)(\"nav\").map((element) => { element.style.backgroundColor = \"#129999\"; });\n (0, qcobjects_1.Tag)(\"component>footer\").map((element) => { element.style.background = \"#876\"; });\n (0, qcobjects_1.Tag)(\"component>div\").map((element) => { element.style.border = \"3px dashed #fff\"; });\n (0, qcobjects_1.Tag)(\"component>section\").map((element) => { element.style.border = \"3px solid #000\"; });\n (0, qcobjects_1.Tag)(\"component>section\").map((element) => { element.style.backgroundColor = \"#fffaaa\"; });\n (0, qcobjects_1.Tag)(\"component>article\").map((element) => { element.style.border = \"3px dotted #000\"; });\n (0, qcobjects_1.Tag)(\"component>header\").map((element) => { element.style.background = \"#789\"; });\n (0, qcobjects_1.Tag)(\"component>footer\").map((element) => { element.style.background = \"#876\"; });\n (0, qcobjects_1.Tag)(\"component>article:nth-child(1)\").map((element) => { element.style.border = \"1px solid #444\"; });\n (0, qcobjects_1.Tag)(\"component>article:nth-child(1)\").map((element) => { element.style.backgroundColor = \"#555aaa\"; });\n (0, qcobjects_1.Tag)(\"component>article:nth-child(2)\").map((element) => { element.style.backgroundColor = \"#aaa333\"; });\n (0, qcobjects_1.Tag)(\"component>article:nth-child(3)\").map((element) => { element.style.backgroundColor = \"#54da82\"; });\n (0, qcobjects_1.Tag)(\"*\").map((element) => { element.style.color = \"#fff\"; });\n (0, qcobjects_1.Tag)(\"component>article\").map((element) => org_qcobjects_effects_1.Fade.apply(element, 0, 1));\n (0, qcobjects_1.Tag)(\"component>footer\").map((element) => org_qcobjects_effects_1.Fade.apply(element, 0, 1));\n (0, qcobjects_1.Tag)(\"component>header\").map((element) => org_qcobjects_effects_1.Fade.apply(element, 0, 1));\n (0, qcobjects_1.Tag)(\"nav\").map((element) => { element.style.display = \"block\"; element.style.width = element.offsetParent?.scrollWidth.toString() || element.clientWidth.toString(); org_qcobjects_effects_1.MoveXInFromLeft.apply(element); });\n (0, qcobjects_1.Tag)(\"component>article\").map((element) => { element.style.display = \"block\"; element.style.height = element.offsetParent?.scrollHeight.toString() || element.clientHeight.toString(); org_qcobjects_effects_1.MoveYInFromBottom.apply(element); });\n (0, qcobjects_1.Tag)(\"component>article:nth-child(2)\").map((element) => { element.style.display = \"block\"; element.style.width = element.offsetParent?.scrollWidth.toString() || element.clientWidth.toString(); org_qcobjects_effects_1.MoveXInFromRight.apply(element); });\n }, 300);\n }\n }\n ]);\n})();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SessionUserToken = void 0;\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\nconst _top = (typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({})));\n(function (global) {\n \"use strict\";\n class SessionUserToken extends qcobjects_1.InheritClass {\n constructor(o) {\n super(o);\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const __instance__ = this;\n this.__cache__ = new qcobjects_1.ComplexStorageCache({\n index: __instance__.__instanceID.toString(),\n load() {\n let __token__;\n if (typeof navigator !== \"undefined\" && typeof origin !== \"undefined\") {\n __token__ = qcobjects_1._Crypt.encrypt(`${navigator.userAgent}|${o.username}|${(+(new Date())).toString()}`, origin);\n }\n else {\n __token__ = qcobjects_1._Crypt.encrypt(`${o.username}|${(+(new Date())).toString()}`, qcobjects_1.CONFIG.get(\"domain\", \"localhost\"));\n }\n SessionUserToken.user = {\n priority: __instance__.__instanceID.toString(),\n token: __token__\n };\n return SessionUserToken.user;\n },\n alternate(cacheController) {\n SessionUserToken.user = cacheController?.cache.getCached(__instance__.__instanceID.toString()); // setting dataObject with the cached value \n }\n });\n }\n static generateIndex(s) {\n return (typeof Buffer !== \"undefined\") ? (Buffer.from(s, \"ascii\").toString(\"base64\")) : (btoa(s));\n }\n getGlobalUser(...args) {\n const username = [args].join(\"|\");\n const __index__ = \"userToken_\" + SessionUserToken.generateIndex(username);\n if (typeof global.get(__index__) === \"undefined\" || global.get(__index__) === null) {\n global.set(__index__, (0, qcobjects_1.New)(SessionUserToken, {\n username\n }));\n }\n SessionUserToken.user = global.get(__index__).user;\n return global.get(__index__).user;\n }\n getGlobalUserToken(...args) {\n return this.getGlobalUser(args).token;\n }\n getGlobalUserId(...args) {\n return this.getGlobalUser(args).id;\n }\n getGlobalUserPriority(...args) {\n return this.getGlobalUser(args).priority;\n }\n getLoginCredentialsToken(username, password) {\n return qcobjects_1._Crypt.encrypt(`${username}${password}`, this.getGlobalUserToken(username));\n }\n closeGlobalSession(...args) {\n this.getGlobalUser(args);\n const username = [args].join(\"|\");\n const __index__ = \"userToken_\" + SessionUserToken.generateIndex(username);\n if (typeof global.get(__index__) !== \"undefined\") {\n global.get(__index__).__cache__.clear();\n global.set(__index__, null);\n SessionUserToken.user = {};\n }\n }\n }\n SessionUserToken.user = {};\n (0, qcobjects_1.Package)(\"org.qcobjects.cloud.auth.session.usertoken\", [\n SessionUserToken\n ]);\n})(_top);\nconst SessionUserToken = _top.SessionUserToken;\nexports.SessionUserToken = SessionUserToken;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\nconst org_qcobjects_cloud_auth_session_usertoken_1 = require(\"./org.qcobjects.cloud.auth.session.usertoken\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.cloud.auth.session.data\", [\n class SessionData extends qcobjects_1.InheritClass {\n constructor() {\n super(...arguments);\n this.__session_container__ = null;\n }\n /**\n * Sets the session container\n *\n * @param {*} sessionContainer1, sessionContainer2, ...\n *\n */\n setSessionContainer() {\n // eslint-disable-next-line prefer-rest-params\n this.__session_container__ = [...arguments];\n }\n /**\n * Gets the session container\n *\n * @return {*} sessionContainer\n */\n getSessionContainer() {\n if (typeof this.__session_container__ === \"undefined\" || this.__session_container__ === null) {\n throw new Error(\"You need to set a session container first: sessionData.setSessionContainer(...arguments)\");\n }\n return this.__session_container__;\n }\n /**\n * Gets the session data\n *\n * @return {*} sessionData\n */\n getSessionData(...args) {\n // eslint-disable-next-line prefer-rest-params\n const s = sessionStorage.getItem(`${this.index(args)}`);\n let sessionData;\n if (s !== null) {\n sessionData = JSON.parse(s);\n }\n if (typeof sessionData === \"undefined\" || sessionData === null) {\n sessionData = {};\n }\n return sessionData;\n }\n /**\n * Returns an index of the session\n *\n * @param {string} valueForIndex\n * @return {string} index\n * @example sessionInstance.index(\"me@email.com\", \"myusername\")\n *\n */\n index(...args) {\n if (typeof org_qcobjects_cloud_auth_session_usertoken_1.SessionUserToken === \"undefined\") {\n throw new Error(\"You need to import SessionUserToken first: Import (\\\"org.qcobjects.cloud.auth.session.usertoken\\\")\");\n }\n return `session_${btoa(org_qcobjects_cloud_auth_session_usertoken_1.SessionUserToken.getGlobalUserToken(args))}`;\n }\n /**\n * Saves the session instance\n *\n */\n save(...args) {\n const s = (0, qcobjects_1._DataStringify)(this.sessionData);\n sessionStorage.setItem(`${this.index(args)}`, s);\n }\n /**\n *\n * Gets the session value\n *\n * @param {*} name\n * @param {*} defaultValue\n * @return {*}\n */\n get(name, defaultValue) {\n const sessionData = this.getSessionData(this.getSessionContainer());\n return (typeof sessionData[name] !== \"undefined\") ? (sessionData[name]) : (defaultValue);\n }\n /**\n *\n * Sets the session value\n *\n * @param {*} name\n * @param {*} value\n */\n set(name, value) {\n const sessionContainer = this.getSessionContainer();\n const sessionData = this.getSessionData(sessionContainer);\n this.sessionData = sessionData;\n this.sessionData[name] = value;\n this.save(sessionContainer);\n }\n }\n ]);\n})();\n", "\"use strict\";\n/* eslint-disable @typescript-eslint/no-empty-function */\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\nconst _top = (typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({})));\n// eslint-disable-next-line camelcase\n(function __qcobjects_sdk__(_top) {\n \"use strict\";\n if (typeof Object.defineProperty !== \"undefined\" && typeof _top !== \"undefined\") {\n try {\n Object.defineProperty(_top, \"__qcobjects_sdk__\", {\n enumerable: true,\n configurable: false,\n writable: false,\n // eslint-disable-next-line camelcase\n value: __qcobjects_sdk__,\n });\n }\n catch (e) {\n if (typeof _top.__qcobjects_sdk__ !== \"undefined\") {\n _top.__qcobjects_sdk__.__loaded__ = true;\n }\n }\n }\n if (typeof _top.__qcobjects_sdk__.__loaded__ === \"undefined\") {\n _top.__qcobjects_sdk__.__loaded__ = true;\n if (typeof _top === \"undefined\") {\n throw Error(\"Top context empty: It should either global, module or window\");\n }\n const __start__ = qcobjects_1.GlobalSettings.__start__.bind(_top);\n let _imports_ = [];\n // non-browsers environment // esbuild compatible\n _imports_ = [\n new Promise((resolve) => {\n require(\"./js/org.qcobjects.i18n_messages\");\n require(\"./js/org.qcobjects.models\");\n require(\"./js/org.qcobjects.components\");\n require(\"./js/org.qcobjects.components.grid\");\n require(\"./js/org.qcobjects.components.list\");\n require(\"./js/org.qcobjects.components.slider\");\n require(\"./js/org.qcobjects.components.notifications\");\n require(\"./js/org.qcobjects.components.splashscreen\");\n require(\"./js/org.qcobjects.controllers\");\n require(\"./js/org.qcobjects.controllers.grid\");\n require(\"./js/org.qcobjects.controllers.list\");\n require(\"./js/org.qcobjects.controllers.slider\");\n require(\"./js/org.qcobjects.controllers.form\");\n require(\"./js/org.qcobjects.controllers.swagger\");\n require(\"./js/org.qcobjects.effects\");\n require(\"./js/org.qcobjects.modal.controllers\");\n require(\"./js/org.qcobjects.views\");\n require(\"./js/org.qcobjects.tools.canvas\");\n require(\"./js/org.qcobjects.tools.layouts\");\n require(\"./js/org.qcobjects.cloud.auth.session.usertoken\");\n require(\"./js/org.qcobjects.cloud.auth.session.data\");\n resolve();\n })\n ];\n _top._sdk_ = Promise.all(_imports_).then(() => {\n qcobjects_1.CONFIG.set(\"useSDK\", true);\n __start__();\n });\n }\n})(_top);\nexports.default = _top;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst sdk = require(\"./QCObjects-SDK\");\nmodule.exports = sdk;\n", "\"use strict\";\n/**\n * QCObjects 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n/*eslint no-unused-vars: \"off\"*/\n/*eslint no-redeclare: \"off\"*/\n/*eslint no-empty: \"off\"*/\n/*eslint strict: \"off\"*/\n/*eslint no-mixed-operators: \"off\"*/\n(function __qcobjects__(_top) {\n \"use strict\";\n if (typeof Object.defineProperty !== \"undefined\" && typeof _top !== \"undefined\") {\n try {\n Object.defineProperty(_top, \"__qcobjects__\", {\n enumerable: true,\n configurable: false,\n writable: false,\n value: __qcobjects__,\n });\n }\n catch (e) {\n if (typeof _top.__qcobjects__ !== \"undefined\") {\n _top.__qcobjects__.loaded = true;\n }\n }\n }\n if (typeof _top.__qcobjects__.loaded === \"undefined\") {\n _top.__qcobjects__.loaded = true;\n var global = _top;\n _top.global = global;\n var isDeno = (typeof window !== \"undefined\" && \"Deno\" in window);\n var isBrowser = (typeof window !== \"undefined\" && typeof window.self !== \"undefined\" && window === window.self) && !isDeno;\n var isNodeCommonJS = (typeof module !== \"undefined\") ? (true) : (false);\n var deno_require = function () { };\n var _require_ = function () {\n return (isDeno) ? (deno_require(...arguments)) : (require(...arguments));\n };\n var _protected_code_ = function (_) {\n var __oldtoString = (typeof _.prototype !== \"undefined\") ? (_.prototype.toString) : (function () {\n return \"\";\n });\n if (typeof _.prototype !== \"undefined\") {\n _.prototype.toString = function () {\n var _protected_symbols = [\n \"__qcobjects__\",\n \"__qcobjects_sdk__\",\n \"__loaded__\",\n \"ComplexStorageCache\",\n \"css\",\n \"append\",\n \"attachIn\",\n \"debug\",\n \"info\",\n \"warn\",\n \"QC_Append\",\n \"set\",\n \"get\",\n \"done\",\n \"componentDone\",\n \"_new_\",\n \"__new__\",\n \"Class\",\n \"ClassFactory\",\n \"New\",\n \"Export\",\n \"Package\",\n \"Import\",\n \"subelements\",\n \"componentLoader\",\n \"buildComponents\",\n \"Controller\",\n \"View\",\n \"VO\",\n \"Service\",\n \"serviceLoader\",\n \"JSONService\",\n \"ConfigService\",\n \"SourceJS\",\n \"SourceCSS\",\n \"ArrayList\",\n \"ArrayCollection\",\n \"Effect\",\n \"Timer\",\n \"sum\",\n \"avg\",\n \"table\",\n \"max\",\n \"min\",\n \"range\",\n \"matrix\",\n \"matrix2d\",\n \"matrix3d\",\n \"unique\",\n \"uniqueId\",\n \"shortCode\",\n \"NamespaceRef\"\n ];\n var _ret_;\n if (_protected_symbols.includes(this.name)) {\n _ret_ = this.name + \"{ [QCObjects native code] }\";\n }\n else {\n _ret_ = __oldtoString.call(this);\n }\n return _ret_;\n };\n }\n };\n (_protected_code_)(Function);\n var _methods_ = function (_) {\n var _m = [];\n for (var i in _) {\n if ((typeof _[i]).toLowerCase() === \"function\") {\n _m.push(_[i]);\n }\n }\n return _m;\n };\n String.prototype.__mAll__ = function (regex) {\n // This is an alternative to old browsers that dont support String.prototype.matchAll\n // https://github.com/tc39/proposal-string-matchall\n var matches = [];\n this.replace(regex, function () {\n var match = Array.prototype.slice.call(arguments, 0, -2);\n match.input = arguments[arguments.length - 1];\n match.index = arguments[arguments.length - 2];\n matches.push(match);\n });\n return matches;\n };\n if (typeof String.prototype.matchAll === \"undefined\") {\n String.prototype.matchAll = String.prototype.__mAll__;\n }\n var _DOMCreateElement = function (elementName) {\n var _ret_;\n if (isBrowser) {\n _ret_ = document.createElement(elementName);\n }\n else {\n _ret_ = {};\n }\n return _ret_;\n };\n if (!isBrowser) {\n const fs = _require_(\"fs\");\n }\n var _DataStringify = function (data) {\n var getCircularReplacer = function () {\n var seen = new WeakSet();\n var _level = 0;\n return function (key, value) {\n if (typeof value === \"object\" && value !== null) {\n if (seen.has(value)) {\n _level += 1;\n return (_level <= 3) ? (_LegacyCopy(value)) : (null);\n }\n seen.add(value);\n }\n return value;\n };\n };\n return JSON.stringify(data, getCircularReplacer());\n };\n if (isBrowser) {\n var _subelements = function subelements(selector) {\n return [...this.querySelectorAll(selector)];\n };\n Element.prototype.subelements = _subelements;\n HTMLDocument.prototype.subelements = _subelements;\n HTMLElement.prototype.subelements = _subelements;\n if (typeof ShadowRoot !== \"undefined\") {\n ShadowRoot.prototype.subelements = _subelements;\n }\n }\n if (isBrowser) {\n try {\n _top = (typeof window.top !== \"undefined\") ? (window.top) : (window);\n _top[\"_allowed_\"] = true;\n }\n catch (e) {\n try {\n _top = document;\n _top[\"_allowed_\"] = true;\n }\n catch (e2) {\n try {\n _top = global;\n _top[\"_allowed_\"] = true;\n }\n catch (e3) {\n _top = {};\n _top[\"_allowed_\"] = true;\n }\n }\n }\n }\n else if (typeof global !== \"undefined\") {\n _top = global;\n }\n var _domain_, _basePath_;\n var _tag_filter_ = \"quick-component:not([loaded]),component:not([loaded])\";\n _basePath_ = (function () {\n var _basePath = \"\";\n if (isBrowser) {\n var baseURI = _top.document.baseURI.split(\"?\")[0].split(\"/\");\n baseURI.pop();\n _basePath = baseURI.join(\"/\") + \"/\";\n }\n else {\n var process;\n try {\n process = _require_(\"process\");\n }\n catch (e) {\n // not a process module\n }\n if (typeof process !== \"undefined\") {\n _basePath = `${process.cwd()}/`;\n }\n else {\n _basePath = \"\";\n }\n }\n return _basePath;\n })();\n if (isBrowser) {\n /**\n * Polyfilling Promise\n */\n if (!(\"Promise\" in _top)) {\n _top.Promise = function (_f) {\n var _p = {\n then() { },\n catch() { },\n _then(response) {\n this.then.call(_p, response);\n },\n _catch(response) {\n this.catch.call(_p, response);\n }\n };\n _f.call(_p, _p._then, _p._catch);\n return _p;\n };\n }\n if (typeof _top.console === \"undefined\") {\n _top.console = function () { };\n _top.console.prototype.log = function (message) { };\n }\n _domain_ = (function () {\n return (typeof document !== \"undefined\" && document.domain !== \"\") ? (document.domain) : (\"localhost\");\n })();\n var _secretKey = (function () {\n var __secretKey = _top[(![] + [])[((+!+[]) + (+!+[]))] + (typeof ![])[(+!+[])] + (typeof [])[((+!+[]) + (+!+[])) * ((+!+[]) + (+!+[]))] + (![] + [])[(+!+[])] + (!![] + [])[(+[])] + ([] + [] + [][[]])[(+[+!+[] + [+[]]]) / ((+!+[]) + (+!+[]))] + (typeof ![])[(+!+[])] + ([] + [] + [][[]])[(+!+[])]][\"h\" + (typeof ![])[(+!+[])] + (![] + [])[(+!+[] + ((+!+[]) + (+!+[])))] + (!![] + [])[(+[])]].toLowerCase();\n return __secretKey;\n })();\n var is_phonegap = (function () {\n return (typeof cordova !== \"undefined\") ? (true) : (false);\n })();\n }\n else {\n // This is only for code integrity purpose using non-browser implementations\n // like using node.js\n var _secretKey = \"secret\";\n _domain_ = \"localhost\";\n }\n _top._asyncLoad = [];\n var asyncLoad = function (callback, args) {\n var asyncCallback = {\n \"func\": callback,\n \"args\": args,\n \"dispatch\"() {\n this.func.apply(null, this.args);\n }\n };\n _top._asyncLoad.push(asyncCallback);\n return asyncCallback;\n };\n if (isBrowser) {\n var _fireAsyncLoad = function () {\n if (document.readyState === \"complete\") {\n _top._asyncLoad.map(function (fc) {\n fc.dispatch.call(fc);\n });\n }\n };\n document.onreadystatechange = _fireAsyncLoad;\n }\n else if (typeof _top.global !== \"undefined\") {\n _top.global._fireAsyncLoad = function () {\n _top._asyncLoad.map(function (fc) {\n fc.dispatch.call(fc);\n });\n };\n }\n _top.asyncLoad = asyncLoad;\n var Logger = function () {\n return {\n debugEnabled: true,\n infoEnabled: true,\n warnEnabled: true,\n debug(message) {\n if (this.debugEnabled) {\n console.log(\"\\x1b[35m%s\\x1b[0m\", `[DEBUG][${performance.now().toLocaleString()}] ${message}`);\n }\n },\n info(message) {\n var color;\n if (this.infoEnabled) {\n if (isBrowser) {\n color = \"\\x1b[103m%s\\x1b[0m\";\n }\n else {\n color = \"\\x1b[33m%s\\x1b[0m\";\n }\n console.info(color, `[INFO][${performance.now().toLocaleString()}] ${message}`);\n }\n },\n warn(message) {\n if (this.warnEnabled) {\n console.warn(\"\\x1b[31m%s\\x1b[0m\", `[WARN][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n };\n };\n var logger = new Logger();\n logger.debugEnabled = false;\n logger.infoEnabled = true;\n _top.logger = logger;\n var Base64 = {\n _keyStr: \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",\n encode(e) {\n var t = \"\";\n var n, r, i, s, o, u, a;\n var f = 0;\n e = Base64._utf8_encode(e);\n while (f < e.length) {\n n = e.charCodeAt(f++);\n r = e.charCodeAt(f++);\n i = e.charCodeAt(f++);\n s = n >> 2;\n o = (n & 3) << 4 | r >> 4;\n u = (r & 15) << 2 | i >> 6;\n a = i & 63;\n if (isNaN(r)) {\n u = a = 64;\n }\n else if (isNaN(i)) {\n a = 64;\n }\n t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a);\n }\n return t;\n },\n decode(e) {\n var t = \"\";\n var n, r, i;\n var s, o, u, a;\n var f = 0;\n e = e.replace(/[^A-Za-z0-9+/=]/g, \"\");\n while (f < e.length) {\n s = this._keyStr.indexOf(e.charAt(f++));\n o = this._keyStr.indexOf(e.charAt(f++));\n u = this._keyStr.indexOf(e.charAt(f++));\n a = this._keyStr.indexOf(e.charAt(f++));\n n = s << 2 | o >> 4;\n r = (o & 15) << 4 | u >> 2;\n i = (u & 3) << 6 | a;\n t = t + String.fromCharCode(n);\n if (u !== 64) {\n t = t + String.fromCharCode(r);\n }\n if (a !== 64) {\n t = t + String.fromCharCode(i);\n }\n }\n t = Base64._utf8_decode(t);\n return t;\n },\n _utf8_encode(e) {\n e = e.replace(/rn/g, \"n\");\n var t = \"\";\n for (var n = 0; n < e.length; n++) {\n var r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n }\n else if (r > 127 && r < 2048) {\n t += String.fromCharCode(r >> 6 | 192);\n t += String.fromCharCode(r & 63 | 128);\n }\n else {\n t += String.fromCharCode(r >> 12 | 224);\n t += String.fromCharCode(r >> 6 & 63 | 128);\n t += String.fromCharCode(r & 63 | 128);\n }\n }\n return t;\n },\n _utf8_decode(e) {\n var t = \"\";\n var n = 0;\n var r = 0;\n var c1 = 0;\n var c2 = 0;\n var c3;\n while (n < e.length) {\n r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n n++;\n }\n else if (r > 191 && r < 224) {\n c2 = e.charCodeAt(n + 1);\n t += String.fromCharCode((r & 31) << 6 | c2 & 63);\n n += 2;\n }\n else {\n c2 = e.charCodeAt(n + 1);\n c3 = e.charCodeAt(n + 2);\n t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63);\n n += 3;\n }\n }\n return t;\n }\n };\n var waitUntil = function (func, exp) {\n var _waitUntil = function (func, exp) {\n var maxWaitCycles = 2000;\n var _w = 0;\n var _t = setInterval(function () {\n if (exp.call()) {\n clearInterval(_t);\n func.call();\n logger.debug(\"Ejecuting \" + func.name + \" after wait\");\n }\n else {\n if (_w < maxWaitCycles) {\n _w += 1;\n logger.debug(\"WAIT UNTIL \" + func.name + \" is true, \" + _w.toString() + \" cycles\");\n }\n else {\n logger.debug(\"Max execution time for \" + func.name + \" expression until true\");\n clearInterval(_t);\n }\n }\n }, 1);\n };\n setTimeout(function () {\n _waitUntil(func, exp);\n }, 1);\n };\n if (typeof localStorage === \"undefined\") {\n /* Polyfill for localStorage */\n var localStorage = {\n getItem(name) {\n return (Object.hasOwnProperty.call(this, name)) ? (this[name]) : (null);\n },\n setItem(name, value) {\n this[name] = value;\n },\n removeItem(name) {\n delete this[name];\n }\n };\n /* end Polyfill for localStorage */\n }\n var ComplexStorageCache = function (params) {\n var object, load, alternate;\n object = params.index;\n if (typeof object !== \"undefined\") {\n load = params.load;\n alternate = params.alternate;\n var cachedObjectID = this.getID(object);\n var cachedResponse = localStorage.getItem(cachedObjectID);\n if (this.isEmpty(cachedResponse)) {\n var cachedNewResponse = load.call(null, {\n \"cachedObjectID\": cachedObjectID,\n \"cachedResponse\": cachedResponse,\n \"cache\": this\n });\n this.save(object, cachedNewResponse);\n logger.debug(\"RESPONSE OF {{cachedObjectID}} CACHED\".replace(\"{{cachedObjectID}}\", cachedObjectID));\n }\n else {\n var alternateResponse = alternate.call(null, {\n \"cachedObjectID\": cachedObjectID,\n \"cachedResponse\": cachedResponse,\n \"cache\": this\n });\n logger.debug(\"RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED \".replace(\"{{cachedObjectID}}\", cachedObjectID));\n }\n }\n else {\n throw new Error(\"ComplexStorageCache: index is undefined\");\n }\n return this;\n };\n ComplexStorageCache.prototype.getItem = function (cachedObjectID) {\n var retrievedObject = localStorage.getItem(cachedObjectID);\n if (!this.isEmpty(retrievedObject)) {\n return JSON.parse(retrievedObject);\n }\n else {\n return null;\n }\n };\n ComplexStorageCache.prototype.setItem = function (cachedObjectID, value) {\n localStorage.setItem(cachedObjectID, _DataStringify(value));\n };\n ComplexStorageCache.prototype.isEmpty = function (object) {\n var r = false;\n switch (true) {\n case (typeof object === \"undefined\"):\n case (typeof object === \"string\" && object === \"\"):\n case (typeof object === \"string\" && object === \"undefined\"):\n case (typeof object === \"number\" && object === 0):\n case (object === null):\n r = true;\n break;\n default:\n r = false;\n }\n return r;\n };\n ComplexStorageCache.prototype.getID = function (object) {\n var cachedObjectID;\n if (typeof object !== \"undefined\") {\n cachedObjectID = \"cachedObject_\" + Base64.encode(_DataStringify(object).replace(/\\{|\\}|,/g, \"_\"));\n }\n return cachedObjectID;\n };\n ComplexStorageCache.prototype.save = function (object, cachedNewResponse) {\n var cachedObjectID = this.getID(object);\n logger.debug(\"CACHING THE RESPONSE OF {{cachedObjectID}} \".replace(\"{{cachedObjectID}}\", cachedObjectID));\n this.setItem(cachedObjectID, cachedNewResponse);\n };\n ComplexStorageCache.prototype.getCached = function (object) {\n var cachedObjectID = this.getID(object);\n return this.getItem(cachedObjectID);\n };\n ComplexStorageCache.prototype.clear = function () {\n Object.keys(localStorage).filter(function (k) {\n return k.startsWith(\"cachedObject_\");\n }).map(function (c) {\n localStorage.removeItem(c);\n });\n };\n /**\n * Detecting passive events feature\n *\n * https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection\n **/\n // Test via a getter in the options object to see if the passive property is accessed\n if (isBrowser) {\n var supportsPassive = false;\n try {\n var opts = Object.defineProperty({}, \"passive\", {\n get() {\n supportsPassive = true;\n return supportsPassive;\n }\n });\n window.addEventListener(\"testPassive\", null, opts);\n window.removeEventListener(\"testPassive\", null, opts);\n }\n catch (e) { }\n var captureFalse = function () {\n return (supportsPassive) ? ({\n passive: true\n }) : (false);\n };\n // Use our detect's results. passive applied if supported, capture will be false either way.\n //elem.addEventListener('touchstart', fn, captureFalse);\n }\n /**\n * Basic Type of all elements\n */\n if (isBrowser) {\n Element.prototype.find = function (tag) {\n var _oo = [];\n var _tags = document.subelements(tag);\n _tags.map(function (_tt, _t) {\n if ((typeof _tags[_t] !== \"undefined\") && _tags[_t].parentNode.tagName === this.parentNode.tagName) {\n _oo.push(_Cast(_tt, (new Object())));\n }\n });\n return _oo;\n };\n }\n /**\n * Primary instance ID of all objects\n */\n var __instanceID;\n // Adaptation of Production steps of ECMA-262, Edition 5, 15.2.3.5\n // Reference: http://es5.github.io/#x15.2.3.5\n var _Object_Create = (function () {\n // make a safe reference to Object.prototype.hasOwnProperty\n var hasOwn = Object.prototype.hasOwnProperty;\n return function (O) {\n // 1. If Type(O) is not Object or Null throw a TypeError exception.\n if (typeof O !== \"object\") {\n throw TypeError(\"Object prototype may only be an Object or null. The type is \" + typeof (O));\n }\n // 2. Let obj be the result of creating a new object as if by the\n //\t\texpression new Object() where Object is the standard built-in\n //\t\tconstructor with that name\n // 3. Set the [[Prototype]] internal property of obj to O.\n var QCObjects = function () { };\n QCObjects.prototype = O;\n var obj = new QCObjects();\n // Let's not keep a stray reference to O...\n // 4. If the argument Properties is present and not undefined, add\n //\t\town properties to obj as if by calling the standard built-in\n //\t\tfunction Object.defineProperties with arguments obj and\n //\t\tProperties.\n if (arguments.length > 1) {\n // Object.defineProperties does ToObject on its first argument.\n var Properties = Object(arguments[1]);\n for (var prop in Properties) {\n if (hasOwn.call(Properties, prop)) {\n obj[prop] = Properties[prop];\n }\n }\n }\n // 5. Return obj\n return obj;\n };\n })();\n // Object.assign Polyfilling\n // Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill\n if (typeof Object.assign !== \"function\") {\n // Must be writable: true, enumerable: false, configurable: true\n Object.defineProperty(Object, \"assign\", {\n value: function assign(target, varArgs) {\n \"use strict\";\n if (target === null) { // TypeError if undefined or null\n throw new TypeError(\"Cannot convert undefined or null to object\");\n }\n var to = Object(target);\n for (var index = 1; index < arguments.length; index++) {\n var nextSource = arguments[index];\n if (nextSource !== null) { // Skip over if undefined or null\n for (var nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n return to;\n },\n writable: true,\n configurable: true\n });\n }\n var __is_raw_class__ = function (o_c) {\n return (typeof o_c === \"function\" && o_c.toString().startsWith(\"class\")) ? (true) : (false);\n };\n var _LegacyCopy = function (obj) {\n var _value_;\n switch (true) {\n case typeof obj === \"string\":\n _value_ = obj;\n break;\n case typeof obj === \"number\":\n _value_ = obj;\n break;\n case typeof obj === \"object\":\n _value_ = Object.assign({}, obj);\n break;\n case typeof obj === \"function\":\n _value_ = obj.bind({});\n break;\n case __is_raw_class__(obj):\n _value_ = class extends obj {\n };\n break;\n default:\n break;\n }\n return _value_;\n };\n var _QC_CLASSES = {};\n var _QC_PACKAGES = {};\n var _QC_PACKAGES_IMPORTED = [];\n var _QC_READY_LISTENERS = [];\n /**\n * Returns the object or function name\n *\n * @param Object or function\n */\n var ObjectName = function (o) {\n var ret = \"\";\n if (typeof o === \"function\" && Object.hasOwnProperty.call(o, \"name\") && o.name !== \"\") {\n ret = o.name;\n }\n else if (typeof o !== \"undefined\" && typeof o.constructor === \"function\" && o.constructor.name !== \"\") {\n ret = o.constructor.name;\n }\n else if (typeof o !== \"undefined\" && typeof o.constructor === \"object\") {\n ret = o.constructor.toString().replace(/\\[(.*?)\\]/g, \"$1\").split(\" \").slice(1).join(\"\");\n }\n return ret;\n };\n /**\n * Casts an object to another object class type\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\n var _Cast = function (obj_source, obj_dest) {\n for (var v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\") {\n try {\n obj_dest[v] = obj_source[v];\n }\n catch (e) {\n }\n }\n }\n return obj_dest;\n };\n /**\n * Casts an object to another object class type. Only properties\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\n var _CastProps = function (obj_source, obj_dest) {\n for (var v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\" && typeof obj_source[v] !== \"function\") {\n try {\n obj_dest[v] = obj_source[v];\n }\n catch (e) {\n // DO NOTHING\n }\n }\n else if (typeof obj_source[v] === \"function\") {\n try {\n obj_dest[v] = obj_source[v].bind(obj_dest);\n }\n catch (e) {\n logger.warn(e);\n }\n }\n }\n return obj_dest;\n };\n /**\n * Internal use to determine the forbidden names for classes\n * Reserved words\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n */\n var __is__forbidden_name__ = function () {\n return ([\"__proto__\", \"prototype\", \"Object\", \"Map\", \"defineProperty\", \"indexOf\", \"toString\", \"__instanceID\"].indexOf(arguments[0]) !== -1) ? (true) : (false);\n };\n /**\n * Determine the type of the Object for any QCObjects Object\n *\n * @param {Object} object\n */\n var __getType__ = function __getType__(o_c) {\n var _ret_ = \"\";\n switch (true) {\n case __is_raw_class__(o_c) && !!o_c.name:\n _ret_ = o_c.name;\n break;\n case typeof o_c === \"object\" &&\n (!!o_c.constructor &&\n !!o_c.constructor.name)\n && o_c.constructor.name !== \"\":\n _ret_ = o_c.constructor.name;\n break;\n case (!!o_c && !!o_c.__classType) && o_c.__classType !== \"\":\n _ret_ = o_c.__classType;\n break;\n case (!!o_c && !!o_c.__definition) && (!!o_c.__definition.__classType) && o_c.__definition.__classType !== \"\":\n _ret_ = o_c.__definition.__classType;\n break;\n case typeof o_c === \"function\" && !!o_c.name:\n _ret_ = o_c.name;\n break;\n default:\n _ret_ = ObjectName(o_c);\n break;\n }\n return _ret_;\n };\n /**\n * Returns if a class or object is from a determinated type\n * @param {Object} object\n * @param {String} typeName\n */\n var is_a = function is_a(obj, typeName) {\n return (typeof obj !== \"undefined\" && obj !== null &&\n (((isQCObjects_Class(obj) || isQCObjects_Object(obj)) && (obj.hierarchy().includes(typeName))) ||\n __getType__(obj) === typeName ||\n ObjectName(obj) === typeName ||\n typeof obj === typeName)) ? (true) : (false);\n };\n var __make_global__ = function (f) {\n if (typeof f !== \"undefined\") {\n if (isBrowser) {\n try {\n _top[f.name] = f;\n window[f.name] = f;\n }\n catch (e) { }\n }\n else if (typeof global !== \"undefined\") {\n if (!Object.hasOwnProperty.call(global, f.name)) {\n global[f.name] = f;\n }\n }\n }\n };\n var __register_class__ = function (_class_, __namespace) {\n var name = _class_.name || __getType__(_class_);\n if (typeof _class_.__definition === \"undefined\") {\n _class_.__definition = {};\n }\n _class_.__definition.__classType = name;\n if (typeof __namespace !== \"undefined\") {\n _class_.__definition.__namespace = __namespace;\n }\n _QC_CLASSES[name] = _class_;\n _top[name] = _QC_CLASSES[name];\n return _top[name];\n };\n var RegisterClass = function (_class_, __namespace) {\n return __register_class__(_class_, __namespace);\n };\n __make_global__(RegisterClass);\n /**\n * Creates new object class of another object\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n */\n var Class = function () {\n var _types_ = {};\n var name, type, definition;\n switch (arguments.length) {\n case 0:\n return class {\n };\n case 1:\n name = arguments[0];\n type = class {\n };\n definition = {};\n break;\n case 2:\n name = arguments[0];\n type = class {\n };\n definition = arguments[1];\n break;\n case 3:\n name = arguments[0];\n type = arguments[1];\n definition = arguments[2];\n break;\n default:\n break;\n }\n if (typeof type !== \"function\") {\n throw new Error(\"Class type must be a function or class\");\n }\n if (__is__forbidden_name__.call(this, name)) {\n throw new Error(`${name} is not an allowed word in the name of a class`);\n }\n if (typeof type[\"__definition\"] !== \"undefined\") {\n definition[\"__definition\"] = Object.assign(_LegacyCopy(type.__definition), type);\n }\n _types_[type.name] = type;\n if (typeof definition === \"undefined\" || definition === null) {\n definition = {};\n }\n else {\n definition = _LegacyCopy(definition);\n }\n /* hack to prevent duplicate __instanceID */\n if (typeof definition[\"__instanceID\"] !== \"undefined\") {\n delete definition[\"__instanceID\"];\n }\n _QC_CLASSES[name] = class extends _types_[type.name] {\n __classType = name;\n __definition = {\n ...definition\n };\n static hierarchy(__class__) {\n var __classType = function (o_c) {\n return (Object.hasOwnProperty.call(o_c, \"__classType\")) ? (o_c.__classType) : (__getType__.call(__class__, o_c));\n };\n var __hierarchy__proto__ = (c) => {\n return (typeof c !== \"undefined\" && typeof c.__proto__ !== \"undefined\" && c.__proto__ !== null) ? (((__classType(c) !== \"\") ? ([__classType(c)]) : ([])).concat(__hierarchy__proto__(c.__proto__))) : ([]);\n };\n if (typeof __class__ === \"undefined\" || __class__ === null) {\n __class__ = this;\n }\n var __hierarchy = [];\n __hierarchy.push(__classType(__class__));\n __hierarchy = __hierarchy.concat(__hierarchy__proto__(__class__.__proto__));\n return __hierarchy;\n }\n static getParentClass() {\n return Object.getPrototypeOf(this.prototype.constructor);\n }\n constructor() {\n var _o_;\n if (arguments.length > 0) {\n _o_ = {\n ...arguments[0]\n };\n }\n else {\n _o_ = {};\n }\n super(_o_);\n let self = this;\n __instanceID = (typeof __instanceID === \"undefined\" || __instanceID === null) ? (0) : (__instanceID + 1);\n if (!self.__instanceID) {\n Object.defineProperty(self, \"__instanceID\", {\n value: __instanceID,\n writable: false\n });\n }\n if (typeof self.__definition !== \"undefined\") {\n Object.keys(self.__definition).filter(function (k) {\n return isNaN(k) && ![\"name\", \"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n }).forEach(function (key) {\n if (typeof self.__definition[key] === \"function\") {\n self[key] = self.__definition[key].bind(self);\n }\n else {\n self[key] = self.__definition[key];\n }\n });\n }\n _methods_(_QC_CLASSES[self.__classType]).map(function (m) {\n self[m.name] = m.bind(self);\n });\n _methods_(self.__definition).map(function (m) {\n self[m.name] = m.bind(self);\n });\n if (!!self[\"body\"]) {\n if (typeof self.__definition === \"undefined\" || (!Object.hasOwnProperty.call(self.__definition, \"body\")) || typeof self.__definition.body === \"undefined\") {\n try {\n if (isBrowser) {\n self[\"body\"] = _DOMCreateElement(self.__definition.__classType);\n }\n else {\n self[\"body\"] = {};\n }\n }\n catch (e) {\n self[\"body\"] = {};\n }\n }\n else if (Object.hasOwnProperty.call(self.__definition, \"body\")) {\n self[\"body\"] = self.__definition.body;\n }\n }\n try {\n if (typeof self.__new__ === \"function\") {\n self.__new__.call(self, _o_);\n }\n else if (typeof super.__new__ === \"function\") {\n self.__new__ = super.__new__.bind(self);\n self.__new__.call(self, _o_);\n }\n if (typeof self === \"object\" && Object.hasOwnProperty.call(self, \"_new_\") && typeof self._new_.isCalled === \"undefined\") {\n try {\n self._new_.call(self, _o_);\n self._new_.isCalled = true;\n }\n catch (e) {\n logger.warn(`${self.__classType}._new_() failed with error: ${e}`);\n }\n }\n }\n catch (e) {\n logger.warn(e);\n }\n }\n __new__(_o_) {\n _CastProps(_o_, this);\n }\n _new_() { }\n getClass() {\n return Object.getPrototypeOf(this.constructor);\n }\n css(_css) {\n if (typeof this[\"body\"] !== \"undefined\" && this[\"body\"][\"style\"] !== \"undefined\") {\n logger.debug(\"body style\");\n this[\"body\"][\"style\"] = _Cast(_css, this[\"body\"][\"style\"]);\n }\n return this[\"body\"][\"style\"];\n }\n hierarchy() {\n var __instance__ = this;\n return this.getClass().hierarchy(__instance__);\n }\n append(child) {\n logger.debug(\"append: start\");\n if (is_a(child, \"Component\")) {\n logger.debug(\"append: child is a Component\");\n logger.debug(`appending the body of ${child.name}`);\n }\n var child = (arguments.length > 0) ? (arguments[0]) : (this[\"body\"]);\n if (typeof this[\"body\"] !== \"undefined\") {\n logger.debug(\"append element\");\n if (arguments.lenght > 0) {\n logger.debug(\"append to element\");\n this[\"body\"].append(child);\n if (typeof this[\"childs\"] === \"undefined\") {\n this[\"childs\"] = [];\n }\n this[\"childs\"].push(child);\n }\n else {\n if (isBrowser) {\n logger.debug(\"append to body\");\n document.body.append(child);\n }\n }\n }\n }\n attachIn(tag) {\n if (isBrowser) {\n var tags = document.subelements(tag);\n for (var i = 0, j = tags.length; i < j; i++) {\n tags[i].append(this);\n }\n }\n else {\n throw new Error(\"attachIn not yet implemented for non browser platforms\");\n }\n }\n };\n // remove the keys from definition that exist in the prototype\n _QC_CLASSES[name] = _CastProps(definition, _QC_CLASSES[name]);\n _QC_CLASSES[name][\"__definition\"] = definition;\n _QC_CLASSES[name][\"__definition\"][\"__classType\"] = name;\n _QC_CLASSES[name][\"__definition\"][\"__new__\"] = function __new__(_o_) {\n _CastProps(_o_, this);\n };\n _top[name] = _QC_CLASSES[name];\n return _top[name];\n };\n Class.prototype.toString = function () {\n return \"Class(name, type, definition) { [QCObjects native code] }\";\n };\n /**\n * Returns the QCObjects Class Factory of a given ClassName\n *\n * @param {String} name\n */\n var ClassFactory = function (className) {\n var _classFactory;\n if (className !== null && className.indexOf(\".\") > -1) {\n var packageName = className.split(\".\").slice(0, className.split(\".\").length - 1).join(\".\");\n var _className = className.split(\".\").slice(-1).join(\"\");\n var _package = Package(packageName);\n var packageClasses = (typeof _package !== \"undefined\") ? (_package.filter(classFactory => {\n return isQCObjects_Class(classFactory) &&\n (classFactory.__definition.__classType === _className || (typeof classFactory === \"function\" && !!classFactory.name));\n }).reverse()) : ([]);\n if (packageClasses.length > 0) {\n _classFactory = packageClasses[0];\n }\n else {\n throw Error(`Class ${className} not found.`);\n }\n }\n else if (className !== null && Object.hasOwnProperty.call(_QC_CLASSES, className)) {\n _classFactory = _QC_CLASSES[className];\n }\n return _classFactory;\n };\n if (isBrowser) {\n Element.prototype.append = function QC_Append(child) {\n if (isQCObjects_Object(child) || typeof child.body !== \"undefined\") {\n this.appendChild(child.body);\n }\n else {\n this.appendChild(child);\n }\n };\n /**\n * A replacement for direct using of innerHTML\n * use: [element].render('content') where 'content' is the string corresponding\n * to the DOM to insert in the element\n **/\n Element.prototype.render = function QC_Render(content) {\n var _self = this;\n var _appendVDOM = function (_self, content) {\n if (typeof document.implementation.createHTMLDocument !== \"undefined\") {\n var doc = document.implementation.createHTMLDocument(\"\");\n doc.innerHTML = content;\n doc.body.subelements(\"*\").map(function (element) {\n return _self.append(element);\n });\n }\n };\n if (typeof this.innerHTML !== \"undefined\") {\n try {\n this.innerHTML += content;\n }\n catch (e) {\n _appendVDOM(_self, content);\n }\n }\n else {\n _appendVDOM(_self, content);\n }\n };\n }\n /**\n * Returns a method from a superior QCObjects Class\n * It is useful for Class Inheritance in the _new_ and __new__ method constructors\n * @example _super_('MySuperClass','MySuperMethod').call(this,params) #where this is the current instance and params are method parameters\n *\n * @param {String} className\n * @param {String} classMethodName\n * @param {Object} params\n */\n var _super_ = function (className, classMethodName, params) {\n return ClassFactory(className)[classMethodName];\n };\n _super_.prototype.toString = function () {\n return \"_super_(className,classMethodName,params) { [QCObjects native code] }\";\n };\n /**\n * Creates an object from a Class definition\n *\n * @param {QC_Object} o\n * @param {Object} args\n */\n var New = function (__class__, args) {\n args = (arguments.length > 1) ? (args) : ({});\n return (typeof __class__ === \"undefined\") ? (new Object()) : (new __class__(args));\n };\n New.prototype.toString = function () {\n return \"New(QCObjectsClassName, args) { [QCObjects native code] }\";\n };\n var Export = function (f) {\n return __make_global__(f);\n };\n Export.prototype.toString = function () {\n return \"Export(function or symbol) { [QCObjects native code] }\";\n };\n if (!isBrowser) {\n var findPackageNodePath = function (packagename) {\n const fs = _require_(\"fs\");\n var sdkPath = null;\n try {\n var sdkPaths = [\n `${_top.CONFIG.get(\"projectPath\")}${_top.CONFIG.get(\"relativeImportPath\")}`,\n `${_top.CONFIG.get(\"basePath\")}${_top.CONFIG.get(\"relativeImportPath\")}`,\n `${_top.CONFIG.get(\"projectPath\")}`,\n `${_top.CONFIG.get(\"basePath\")}`,\n `${_top.CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}${_top.CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}/node_modules/` + packagename,\n `${process.cwd()}/node_modules`,\n `${process.cwd()}`,\n \"node_modules\",\n \"./\",\n \"\"\n ].concat(module.paths);\n sdkPaths = sdkPaths.filter(p => {\n return fs.existsSync(p + \"/\" + packagename);\n });\n if (sdkPaths.length > 0) {\n sdkPath = sdkPaths[0];\n logger.info(packagename + \" is Installed.\");\n }\n else {\n // logger.debug(packagename + ' is not in a standard path.');\n }\n }\n catch (e) {\n // do nothing\n console.log(e);\n }\n return sdkPath;\n };\n Export(findPackageNodePath);\n }\n Class(\"_Crypt\", Object, {\n last_string: \"\",\n last_key: \"\",\n construct: false,\n _new_(o) {\n var string = o[\"string\"];\n var key = (o.hasOwnProperty.call(o, \"key\")) ? (o[\"key\"]) : (null);\n this.__new__(o);\n key = (key === null) ? (this.__instanceID) : (key);\n this.last_key = key;\n this.last_string = string;\n this.construct = true;\n },\n _encrypt() {\n var string = this.string;\n var key = this.key;\n var result = \"\";\n var char;\n var keychar;\n for (var i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) + keychar.charCodeAt(0));\n result += char;\n }\n this.last_string = Base64.encode(result);\n return this.last_string;\n },\n _decrypt() {\n var string = this.string;\n var key = this.key;\n var result = \"\";\n var char;\n var keychar;\n string = Base64.decode(string);\n for (var i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) - keychar.charCodeAt(0));\n result += char;\n }\n this.last_string = result;\n return this.last_string;\n },\n encrypt(string, key) {\n var crypt = New(ClassFactory(\"_Crypt\"), {\n string: string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._encrypt();\n },\n decrypt(string, key) {\n var crypt = New(ClassFactory(\"_Crypt\"), {\n string: string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._decrypt();\n }\n });\n var _CryptObject = function (o) {\n return ClassFactory(\"_Crypt\").encrypt(_DataStringify(o), _secretKey);\n };\n var _DecryptObject = function (s) {\n return (s === \"\") ? ({}) : (JSON.parse(ClassFactory(\"_Crypt\").decrypt(s, _secretKey)));\n };\n var shortCode = function () {\n var length = 1000;\n var code1 = ClassFactory(\"_Crypt\").encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date()).getTime().toString());\n var code2 = ClassFactory(\"_Crypt\").encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date((new Date()).getTime() - 1000 * 1000)).getTime().toString());\n var shortCode = code2.list().map((o1, index) => {\n return code1.list()[index] === o1 ? null : o1;\n }).filter(c => c !== null).join(\"\");\n return shortCode;\n };\n var uniqueId = shortCode;\n Class(\"InheritClass\", class {\n }, {});\n class Processor extends ClassFactory(\"InheritClass\") {\n component = null;\n __definition = {};\n __classType = \"Processor\";\n static processors = {\n \"config\"(component, arg) {\n return _top.CONFIG.get(arg, \"\");\n },\n \"ENV\"(component, arg) {\n return (typeof process !== \"undefined\") ? (process.env[arg]) : (\"\");\n },\n \"global\"(component, arg) {\n return (typeof global !== \"undefined\") ? (global[arg]) : (\"\");\n }\n };\n static setProcessor(_proc_) {\n if (typeof _proc_ === \"function\" && _proc_.name !== \"\") {\n this.processors[_proc_.name] = _proc_;\n }\n }\n constructor() {\n super(...arguments);\n this.processors = Processor.processors;\n this.process = Processor.process.bind(this);\n this.processObject = Processor.processObject.bind(this);\n this.setProcessor = Processor.setProcessor.bind(this);\n this.execute = Processor.execute.bind(this);\n }\n static execute(component, processorName, args) {\n var processorHandler = (typeof component !== \"undefined\" && component !== null) ? (component.processorHandler) : (this);\n return processorHandler.processors[processorName].bind(processorHandler).apply(processorHandler, [component, ...args.split(\",\")]);\n }\n static process(template, component = null) {\n var processorHandler = (component !== null) ? (component.processorHandler) : (New(Processor, { component: null }));\n if (typeof template === \"string\") {\n Object.keys(processorHandler.processors).map(function (funcName) {\n [...template.matchAll(new RegExp(\"\\\\$\" + funcName + \"\\\\((.*)\\\\).*\", \"g\"))].map(function (procesorMatch) {\n var match0 = `$${funcName}(${procesorMatch[1]})`;\n template = template.replace(match0, processorHandler.execute.bind(processorHandler).call(processorHandler, component, funcName, procesorMatch[1]));\n });\n });\n }\n return template;\n }\n static processObject(obj, component = null) {\n var __instance__ = (component === null) ? (this) : (component.processorHandler);\n if (typeof __instance__ === \"undefined\") {\n __instance__ = new Processor({ component: component });\n }\n if (typeof obj === \"object\") {\n Object.keys(obj).map(function (_k) {\n if (typeof obj[_k] === \"object\" && !obj[_k].hasOwnProperty.call(obj[_k], \"call\")) {\n obj[_k] = __instance__.processObject.bind(__instance__)(obj[_k], component);\n }\n else if (typeof obj[_k] === \"string\") {\n obj[_k] = __instance__.process.bind(__instance__)(obj[_k], component);\n }\n });\n }\n else if (typeof obj === \"string\") {\n obj = __instance__.process.bind(__instance__)(obj, component);\n }\n return obj;\n }\n }\n Processor.__definition = {};\n Processor.__classType = \"Processor\";\n RegisterClass(Processor, \"com.qcobjects\");\n __make_global__(Processor);\n class ConfigSettings {\n static _instance = null;\n static _CONFIG_ENC = null;\n static get instance() {\n if (this._instance === null) {\n var _config_settings = new ConfigSettings();\n _config_settings._CONFIG = {\n \"relativeImportPath\": \"\",\n \"remoteImportsPath\": \"\",\n \"remoteSDKPath\": \"https://sdk.qcobjects.dev/\",\n \"asynchronousImportsLoad\": false,\n \"removePackageScriptAfterLoading\": true,\n \"componentsBasePath\": \"\",\n \"delayForReady\": 0,\n \"preserveComponentBodyTag\": false,\n \"useConfigService\": false,\n \"routingWay\": \"hash\",\n \"useSDK\": true,\n \"useLocalSDK\": false,\n \"basePath\": _basePath_\n };\n _config_settings._CONFIG_ENC = null;\n this._instance = _config_settings;\n }\n return this._instance;\n }\n static set instance(value) {\n this._instance = value;\n }\n }\n _QC_CLASSES[\"ConfigSettings\"] = ConfigSettings;\n Class(\"CONFIG\", Object, {\n get _CONFIG_ENC() {\n return ClassFactory(\"ConfigSettings\").instance._CONFIG_ENC;\n },\n get _CONFIG() {\n return ClassFactory(\"ConfigSettings\").instance._CONFIG;\n },\n set(name, value) {\n logger.debug(`CONFIG.set ${name}: ${value}`);\n // hack to force update basePath from CONFIG\n if (name === \"basePath\") {\n _basePath_ = value;\n }\n var _conf;\n try {\n _conf = (function (config) {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = ClassFactory(\"_Crypt\").encrypt(_DataStringify({}), _secretKey);\n }\n var _protectedEnc = config._CONFIG_ENC.valueOf();\n var _protectedConf = config._CONFIG.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n })(ClassFactory(\"ConfigSettings\").instance);\n }\n catch (e) {\n _conf = {};\n console.error(e);\n logger.debug(\"failed to encrypt config\");\n }\n _conf[name] = value;\n ClassFactory(\"ConfigSettings\").instance._CONFIG_ENC = _CryptObject(_conf);\n if (Object.hasOwnProperty.call(ClassFactory(\"ConfigSettings\").instance, \"_CONFIG\") && Object.hasOwnProperty.call(ClassFactory(\"ConfigSettings\").instance._CONFIG, name)) {\n ClassFactory(\"ConfigSettings\").instance._CONFIG[name] = value;\n }\n },\n get(name, _default) {\n var _value;\n try {\n var _conf = (function (config) {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = ClassFactory(\"_Crypt\").encrypt(_DataStringify({}), _secretKey);\n }\n var _protectedEnc = config._CONFIG_ENC.valueOf();\n var _protectedConf = config._CONFIG.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n })(ClassFactory(\"ConfigSettings\").instance);\n if (typeof _conf[name] !== \"undefined\") {\n _value = _conf[name];\n }\n else if (typeof _default !== \"undefined\") {\n _value = _default;\n }\n }\n catch (e) {\n console.error(e);\n logger.debug(\"Something wrong when trying to get CONFIG values\");\n logger.debug(\"No config value for: \" + name);\n _value = _default;\n }\n return Processor.processObject.call(Processor, _value);\n }\n });\n Export(waitUntil);\n Export(_super_);\n Export(ComplexStorageCache);\n Export(ClassFactory);\n Export(_DOMCreateElement);\n Export(shortCode);\n Export(__getType__);\n Export(is_a);\n var isQCObjects_Object = function (_) {\n return (typeof _ === \"object\" &&\n Object.hasOwnProperty.call(_, \"__classType\") &&\n (!!_.__instanceID) &&\n Object.hasOwnProperty.call(_, \"__definition\") &&\n typeof _.__definition !== \"undefined\") ? (true) : (false);\n };\n var isQCObjects_Class = function (_) {\n return (typeof _ === \"function\" &&\n (!_.__instanceID) &&\n (!!_.__definition) &&\n typeof _.__definition !== \"undefined\" &&\n !!_.__definition.__classType) ? (true) : (false);\n };\n /**\n * Defines a package for Class classification\n *\n * @param {Object} namespace\n * @param {Object} classes\n */\n var Package = function (namespace, classes) {\n if (_QC_PACKAGES.hasOwnProperty.call(_QC_PACKAGES, namespace) &&\n typeof _QC_PACKAGES[namespace] !== \"undefined\" &&\n _QC_PACKAGES[namespace].hasOwnProperty.call(_QC_PACKAGES[namespace], \"length\") &&\n _QC_PACKAGES[namespace].length > 0 &&\n typeof classes !== \"undefined\" &&\n classes.hasOwnProperty.call(classes, \"length\") &&\n classes.length > 0) {\n classes.filter(function (_c1) {\n return isQCObjects_Class(_c1);\n }).map(function (_class_) {\n _class_.__definition.__namespace = namespace;\n _class_.__namespace = namespace;\n });\n _QC_PACKAGES[namespace] = _QC_PACKAGES[namespace].concat(classes);\n }\n else if (typeof classes !== \"undefined\") {\n if (typeof classes === \"object\" && classes.hasOwnProperty.call(classes, \"length\")) {\n classes.filter(function (_c1) {\n return isQCObjects_Class(_c1);\n }).map(function (_class_) {\n _class_.__definition.__namespace = namespace;\n _class_.__namespace = namespace;\n });\n }\n else if (isQCObjects_Class(classes)) {\n classes.__definition.__namespace = namespace;\n classes.__namespace = namespace;\n }\n _QC_PACKAGES[namespace] = classes;\n }\n if (Object.hasOwnProperty.call(_QC_PACKAGES, namespace)) {\n _QC_PACKAGES[namespace].map(function (_class_) {\n __register_class__(_class_, namespace);\n });\n }\n return (Object.hasOwnProperty.call(_QC_PACKAGES, namespace)) ? (_QC_PACKAGES[namespace]) : (undefined);\n };\n Package.prototype.toString = function () {\n return \"Package(namespace, classes) { [QCObjects native code] }\";\n };\n Package(\"com.qcobjects\", [Processor]);\n /**\n * Declare Namespace\n *\n * @param {String} packageName\n * @param {Object} package\n */\n var NamespaceRef = function (namespace) {\n let packageInstance = Package(namespace);\n let classes = packageInstance.filter(c => isQCObjects_Class(c)).map(c => {\n return {\n [c.__definition.__classType]: c\n };\n }).reduce((a, b) => Object.assign(a, b));\n return namespace.split(\".\").map(c => {\n return {\n [c]: classes\n };\n }).reverse().reduce((a, b) => {\n b[Object.keys(b)] = a;\n return b;\n });\n };\n /**\n * Imports a script with the package nomenclature\n *\n * @param {Object} packagename\n * @param {Object} ready\n * @param {Boolean} external\n */\n var Import = function () {\n var packagename;\n var ready = function () { };\n var external = false;\n if (arguments.length < 1) {\n return;\n }\n else if (arguments.length === 1) {\n packagename = arguments[0];\n }\n else if (arguments.length === 2) {\n packagename = arguments[0];\n ready = arguments[1];\n }\n else if (arguments.length > 2) {\n packagename = arguments[0];\n ready = arguments[1];\n external = arguments[2];\n logger.debug(\"[Import] Setting external=\" + external.toString() + \" resource to import: \" + packagename);\n }\n if (external) {\n logger.debug(\"[Import] Registering external resource to import: \" + packagename);\n }\n else {\n logger.debug(\"[Import] Registering local resource to import: \" + packagename);\n }\n var _promise_import_;\n if (isBrowser) {\n _promise_import_ = new Promise(function (resolve, reject) {\n var allPackagesImported = function () {\n var ret = false;\n var cp = 0;\n for (var p in _QC_PACKAGES) {\n cp++;\n }\n if (cp < _QC_PACKAGES_IMPORTED.length) {\n ret = false;\n }\n else {\n ret = true;\n }\n return ret;\n };\n var readyImported = function (e) {\n _QC_PACKAGES_IMPORTED.push(ready);\n if (allPackagesImported()) {\n _QC_PACKAGES_IMPORTED.map(function (_imported_) {\n _QC_READY_LISTENERS.push(_imported_);\n });\n }\n if (isBrowser && _top.CONFIG.get(\"removePackageScriptAfterLoading\")) {\n e.target.remove();\n }\n resolve.call(_promise_import_, {\n \"_imported_\": e.target,\n \"_package_name_\": packagename\n });\n };\n if (!_QC_PACKAGES.hasOwnProperty.call(_QC_PACKAGES, packagename)) {\n var s1 = _DOMCreateElement(\"script\");\n s1.type = _top.CONFIG.get(\"sourceType\", \"text/javascript\");\n s1.async = (_top.CONFIG.get(\"asynchronousImportsLoad\")) ? (true) : (false);\n s1.onreadystatechange = function () {\n if (s1.readyState === \"complete\") {\n readyImported.call();\n }\n };\n s1.onload = readyImported;\n s1.onerror = function (e) {\n reject.call(_promise_import_, {\n \"_imported_\": s1,\n \"_package_name_\": packagename\n });\n };\n s1.src = (external) ? (_top.CONFIG.get(\"remoteImportsPath\") + packagename + \".js\") : (_basePath_ + _top.CONFIG.get(\"relativeImportPath\") + packagename + \".js\");\n document.getElementsByTagName(\"head\")[0].appendChild(s1);\n }\n });\n _promise_import_.catch(function () {\n logger.debug(\"Import: Error loading a package \");\n });\n }\n else {\n // support to be used in a nodejs environment\n _promise_import_ = new Promise(function (resolve, reject) {\n try {\n var standardNodePath = findPackageNodePath(packagename);\n var packageAbsoluteName = \"\";\n if (standardNodePath !== null) {\n packageAbsoluteName = standardNodePath + \"/\" + packagename;\n }\n else {\n var jsNodePath = findPackageNodePath(packagename + \".js\");\n if (jsNodePath !== null) {\n packageAbsoluteName = jsNodePath + \"/\" + packagename + \".js\";\n }\n else {\n packageAbsoluteName = _basePath_ + _top.CONFIG.get(\"relativeImportPath\") + packagename;\n }\n }\n try {\n resolve.call(_promise_import_, {\n \"_imported_\": _require_(`${packageAbsoluteName}`),\n \"_package_name_\": packagename\n });\n }\n catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n }\n catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n }).catch(function (e) {\n // something wrong importing a package\n logger.debug(\"Something happened when importing \" + packagename);\n console.warn(e);\n });\n }\n _promise_import_.catch(function (e) {\n logger.warn(_DataStringify(e));\n });\n return _promise_import_;\n };\n Import.prototype.toString = function () {\n return \"Import(packagename,ready,external) { [QCObjects native code] }\";\n };\n if (isBrowser) {\n /**\n * Adds a Cast functionality to every Element of DOM\n */\n Element.prototype.Cast = function QC_Object(_o) {\n _o.__definition.body = this;\n var _o = New(_o);\n return _o;\n };\n }\n Class(\"TagElements\", Array, {\n show() {\n this.map(function (element) {\n return element.style.opacity = 1;\n });\n },\n hide() {\n this.map(function (element) {\n return element.style.opacity = 0;\n });\n },\n effect() {\n var effectArguments = [...arguments].slice(1);\n var effectClass = arguments[0];\n if ((typeof effectClass).toLowerCase() === \"string\") {\n effectClass = ClassFactory(effectClass);\n }\n this.map(function (element) {\n return effectClass.apply.apply(effectClass, [element].concat(effectArguments));\n });\n },\n findElements(elementName) {\n var _o = New(ClassFactory(\"TagElements\"));\n if (isBrowser) {\n for (var _k in this) {\n if (typeof _k === \"number\" && typeof this[_k] !== \"function\" && this[_k].hasOwnProperty.call(this[_k], \"subelements\")) {\n _o.push(this[_k].subelements(elementName));\n }\n }\n }\n else {\n // not yet implemented.\n }\n return _o;\n }\n });\n /**\n * Gets the element of DOM found by tag name\n *\n * @param {Object} tagname\n * @param {Object} innerHTML\n */\n var Tag = function (tagname, innerHTML) {\n var _o = New(ClassFactory(\"TagElements\"));\n if (isBrowser) {\n var o = document.subelements(tagname);\n var addedKeys = [];\n for (var _i = 0; _i < o.length; _i++) {\n if (typeof innerHTML !== \"undefined\" && o[_i].hasOwnProperty.call(o[_i], \"innerHTML\")) {\n o[_i].innerHTML = innerHTML;\n }\n if (addedKeys.indexOf(_i) < 0) {\n _o.push(o[_i]);\n addedKeys.push(_i);\n }\n }\n }\n else {\n // not yet implemented.\n }\n return _o;\n };\n /**\n * Defines a Custom Ready listener\n */\n function Ready(e) {\n if (isBrowser) {\n _QC_READY_LISTENERS.push(e.bind(window));\n }\n else if (typeof global !== \"undefined\") {\n _QC_READY_LISTENERS.push(e.bind(global));\n }\n }\n var ready = Ready; // case insensitive ready option\n /**\n * Default Ready event function for window. Executes all micro ready events of Import calls\n *\n * @param {Object} e\n */\n var _Ready = function (e) {\n var _execReady = function () {\n _QC_READY_LISTENERS.map(function (_ready_listener_, _r) {\n if (typeof _ready_listener_ === \"function\") {\n _ready_listener_.call();\n delete _QC_READY_LISTENERS[_r];\n }\n });\n };\n if (_top.CONFIG.get(\"delayForReady\") > 0) {\n if (isBrowser) {\n setTimeout(_execReady.bind(window), _top.CONFIG.get(\"delayForReady\"));\n }\n else if (typeof global !== \"undefined\") {\n setTimeout(_execReady.bind(global), _top.CONFIG.get(\"delayForReady\"));\n }\n }\n else {\n _execReady.call(_top);\n }\n };\n if (isBrowser) {\n window.onload = _Ready;\n if (is_phonegap) {\n document.addEventListener(\"deviceready\", _Ready, captureFalse);\n }\n }\n else {\n global.onload = _Ready;\n }\n /**\n * Dynamic Data Objects Class\n * Usage:\n * Class('TestDDO',{\n * data: {},\n * _new_ (){\n * this.ddo = New(DDO,{\n * instance:this,\n * name:'data',\n * value:{},\n * fget (value){\n * logger.debug('returned value '+ value );\n * }\n * })\n * }\n * });\n *\n */\n class DDO extends ClassFactory(\"InheritClass\") {\n constructor({ instance, name, fget, fset, value }) {\n super({\n instance,\n name,\n fget,\n fset,\n value\n });\n this._new_({\n instance,\n name,\n fget,\n fset,\n value\n });\n }\n _new_({ instance, name, fget, fset, value }) {\n var ddoInstance = this;\n var name = (typeof name === \"undefined\") ? (ObjectName(ddoInstance)) : (name);\n Object.defineProperty(instance, name, {\n set(val) {\n let _value = val;\n logger.debug(\"value changed \" + name);\n var ret;\n if (typeof fset !== \"undefined\" && typeof fset === \"function\") {\n ret = fset(_value);\n }\n else {\n ret = _value;\n }\n instance[\"_\" + name] = ret;\n return;\n },\n get() {\n let _value = instance[\"_\" + name];\n logger.debug(\"returning value \" + name);\n var is_ddo = function (v) {\n if (typeof v === \"object\" && Object.hasOwnProperty.call(v, \"value\")) {\n return v.value;\n }\n return v;\n };\n var ret;\n if (typeof fget !== \"undefined\" && typeof fget === \"function\") {\n ret = fget(is_ddo(_value));\n }\n else {\n ret = is_ddo(_value);\n }\n return ret;\n }\n });\n }\n }\n Export(DDO);\n class DefaultTemplateHandler {\n template = \"\";\n __definition = {};\n constructor({ component, template }) {\n this.component = component;\n this.template = template;\n }\n assign(data) {\n var templateInstance = this;\n if (typeof templateInstance.component === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component is undefined\");\n }\n if (typeof templateInstance.component.processorHandler === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component.processorHandler is undefined\");\n }\n var processorHandler = templateInstance.component.processorHandler;\n processorHandler.component = templateInstance.component;\n var parsedAssignmentText = (typeof templateInstance.template !== \"undefined\") ? (templateInstance.template) : (\"\");\n if (typeof data === \"object\") {\n [...Object.keys(data)].map(function (k) {\n var _value = data[k];\n if (typeof _value === \"string\" || typeof _value === \"number\" || (!isNaN(_value))) {\n try {\n _value = Processor.processObject.bind(processorHandler).call(processorHandler, _value, templateInstance.component);\n parsedAssignmentText = parsedAssignmentText.replace((new RegExp(`{{${k}}}`, \"g\")), _value);\n }\n catch (e) {\n logger.warn(`${templateInstance.component.name} could not parse processors.`);\n throw Error(`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);\n }\n }\n });\n }\n else {\n logger.debug(`${templateInstance.component.name}.data is not an object`);\n }\n try {\n parsedAssignmentText = Processor.processObject.call(processorHandler, parsedAssignmentText, templateInstance.component);\n }\n catch (e) {\n logger.warn(`${templateInstance.component.name} could not parse processors.`);\n throw Error(`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);\n }\n return parsedAssignmentText;\n }\n }\n DefaultTemplateHandler.__definition = {};\n RegisterClass(DefaultTemplateHandler, \"com.qcobjects\");\n var __routing_params__ = function (routing, routingPath) {\n let standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\"); //allowing {param}\n return {\n ...[...routingPath.matchAll((new RegExp(standardRoutingPath, \"g\")))][0][\"groups\"]\n };\n };\n var __valid_routings__ = function (routings, routingPath) {\n return routings.filter(function (routing) {\n var standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\");\n return (new RegExp(standardRoutingPath, \"g\")).test(routingPath);\n }).reverse();\n };\n var __valid_routing_way__ = function (validRoutingWays, routingWay) {\n return validRoutingWays.includes(routingWay);\n };\n var _buildComponentFromElement_ = function (element, __parent__) {\n var __shadowed_not_set = (element.getAttribute(\"shadowed\") === null) ? (true) : (false);\n var __tplsource_attr_not_set = (element.getAttribute(\"template-source\") === null) ? (true) : (false);\n var shadowed = (element.getAttribute(\"shadowed\") === \"true\") ? (true) : (false);\n var __cached_not_set = (element.getAttribute(\"cached\") === null) ? (true) : (false);\n var cached = (element.getAttribute(\"cached\") === \"true\") ? (true) : (false);\n var tplextension = (typeof _top.CONFIG.get(\"tplextension\") !== \"undefined\") ? (_top.CONFIG.get(\"tplextension\")) : (\"html\");\n tplextension = (element.getAttribute(\"tplextension\") !== null) ? (element.getAttribute(\"tplextension\")) : (tplextension);\n var _componentName = element.getAttribute(\"name\");\n var _componentClassName = (element.getAttribute(\"componentClass\") !== null) ? (element.getAttribute(\"componentClass\")) : (\"Component\");\n let __componentClassName = (_top.CONFIG.get(\"preserveComponentBodyTag\")) ? ((_componentName !== null) ? (\"com.qcobjects.components.\" + _componentName + \".ComponentBody\") : (\"com.qcobjects.components.ComponentBody\")) : (_componentClassName);\n _componentName = (_componentName !== null) ? (_componentName) : ((ClassFactory(__componentClassName) &&\n typeof ClassFactory(__componentClassName).name !== \"undefined\") ? (ClassFactory(__componentClassName).name) : (\"\"));\n var __classDefinition = ClassFactory(__componentClassName);\n var __tplsource_prop_set = (__componentClassName !== \"Component\" && ((typeof __classDefinition !== \"undefined\" && typeof __classDefinition.tplsource === \"string\") && __classDefinition.tplsource !== \"\")) ? (true) : (false);\n var tplsource = (__tplsource_attr_not_set && __tplsource_prop_set) ? (__classDefinition.tplsource) : ((__tplsource_attr_not_set) ? (\"default\") : (element.getAttribute(\"template-source\")));\n logger.debug(`template source for ${_componentName} is ${tplsource} `);\n logger.debug(`type for ${_componentName} is ${__getType__(__classDefinition)} `);\n var componentURI;\n componentURI = ComponentURI({\n \"COMPONENTS_BASE_PATH\": _top.CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": _componentName,\n \"TPLEXTENSION\": tplextension,\n \"TPL_SOURCE\": tplsource\n });\n if (_top.CONFIG.get(\"preserveComponentBodyTag\")) {\n Package((_componentName !== \"\") ? (\"com.qcobjects.components.\" + _componentName + \"\") : (\"com.qcobjects.components\"), [\n Class(\"ComponentBody\", ClassFactory(\"Component\"), {\n name: _componentName,\n tplsource: tplsource,\n tplextension: tplextension,\n reload: true\n })\n ]);\n }\n var __create_component_instance_ = function () {\n var __shadowed = (__shadowed_not_set) ? ((__classDefinition && __classDefinition.shadowed) || ClassFactory(\"Component\").shadowed) : (shadowed);\n var __definition = {\n __parent__: __parent__,\n name: _componentName,\n cached: (__cached_not_set) ? (ClassFactory(\"Component\").cached) : (cached),\n shadowed: __shadowed,\n tplextension: tplextension,\n body: (_top.CONFIG.get(\"preserveComponentBodyTag\")) ? (_DOMCreateElement(\"componentBody\")) : (element),\n templateURI: componentURI,\n tplsource: tplsource\n };\n if (typeof _componentName === \"undefined\" || _componentName === \"\" || _componentName === null) {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete __definition.name;\n }\n if (componentURI === \"\") {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete __definition.templateURI;\n }\n var newComponent = New(__classDefinition, __definition);\n if (_top.CONFIG.get(\"preserveComponentBodyTag\")) {\n element.append(newComponent);\n }\n return newComponent;\n };\n var newComponent = __create_component_instance_.call(this);\n return newComponent;\n };\n var _buildComponentsFromElements_ = function (elements, __parent__) {\n var componentsBuiltWith = [];\n if (isBrowser) {\n componentsBuiltWith = elements.map(function (element) {\n return _buildComponentFromElement_(element, __parent__);\n });\n }\n else {\n logger.debug(\"[_buildComponentsFromElements_] not implemented for Non-Browser environments\");\n }\n return componentsBuiltWith;\n };\n Package(\"com.qcobjects\", [\n class Component extends ClassFactory(\"InheritClass\") {\n validRoutingWays = [\"pathname\", \"hash\", \"search\"];\n basePath = _basePath_;\n domain = _domain_;\n templateHandler = \"DefaultTemplateHandler\";\n processorHandler = null;\n routingWay = null;\n routingNodes = [];\n routings = [];\n routingPath = \"\";\n routingPaths = [];\n _componentHelpers = [];\n subcomponents = [];\n splashScreenComponent = undefined;\n controller = undefined;\n view = undefined;\n effect = undefined;\n method = \"GET\";\n cached = true;\n __promise__ = null;\n __namespace = undefined;\n constructor({ __parent__, templateURI = \"\", template, tplsource = \"default\", tplextension, url = \"\", name = \"\", method = \"GET\", data = {}, reload = false, shadowed = false, cached = true, _body = _DOMCreateElement(\"div\"), __promise__ = null, __shadowRoot, body, shadowRoot, splashScreenComponent, controller, view }) {\n if (arguments.length < 1) {\n throw Error(`No arguments in component. You must at least give one argument.`);\n }\n super({\n __parent__,\n templateURI,\n template,\n tplextension,\n tplsource,\n url,\n name,\n method,\n data,\n reload,\n shadowed,\n cached,\n _body,\n __promise__,\n __shadowRoot,\n body,\n shadowRoot,\n splashScreenComponent,\n controller,\n view\n });\n var self = this;\n if (typeof self.name === \"undefined\") {\n logger.warn(\"A name is not defined for \" + __getType__(self));\n }\n self.routingWay = _top.CONFIG.get(\"routingWay\");\n self.processorHandler = New(Processor, {\n component: self\n });\n /* assign body data attributes to data */\n self.data = (typeof self.data === \"undefined\" || self.data === null) ? ({}) : (self.data);\n self.data = Object.assign(self.data, self.dataAttributes);\n self.createServiceInstance()\n .then(function (serviceResponse) {\n if (typeof self.__new__ === \"function\") {\n self.__new__.call(self, self);\n }\n self._generateRoutingPaths(self.body)\n .then(function () {\n self._reroute_()\n .then(function () {\n return self.rebuild()\n .then(function () {\n logger.info(`Component._new_ The component ${self.name} was built successfully!`);\n }).catch(function (standardResponse) {\n logger.warn(`Component._new_ Something went wrong building the component ${self.name}`);\n console.error(standardResponse);\n });\n });\n });\n });\n }\n set body(value) {\n var self = this;\n self._body = value;\n }\n get body() {\n var self = this;\n return self._body;\n }\n set cacheIndex(value) {\n // readonly\n logger.debug(\"[cacheIndex] This property is readonly\");\n }\n get cacheIndex() {\n var self = this;\n var __routing_path__ = _DataStringify(self.routingPath);\n return Base64.encode(self.name + __routing_path__);\n }\n set parsedAssignmentText(value) {\n // readonly\n logger.debug(\"[parsedAssignmentText] This property is readonly\");\n }\n get parsedAssignmentText() {\n var self = this;\n self._parsedAssignmentText = self.parseTemplate(self.template);\n if (typeof self._parsedAssignmentText === \"undefined\") {\n throw Error(`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);\n }\n return self._parsedAssignmentText;\n }\n set shadowRoot(value) {\n var self = this;\n if (typeof self.__shadowRoot == \"undefined\") {\n self.__shadowRoot = value;\n }\n else {\n logger.debug(\"[shadowRoot] This property can only be assigned once!\");\n }\n }\n get shadowRoot() {\n var self = this;\n return self.__shadowRoot;\n }\n set routingSelected(value) {\n logger.debug(\"[routingSelected] This is a read-only property of the component\");\n }\n get routingSelected() {\n var self = this;\n return __valid_routings__(self.routings, self.routingPath);\n }\n set routingParams(value) {\n logger.debug(\"[routingParams] This is a read-only property of the component\");\n }\n get routingParams() {\n var component = this;\n return [{}].concat(component.routingSelected.map(function (routing) {\n return __routing_params__(routing, component.routingPath);\n })).reduce(function (accumulator, colData, index) {\n return Object.assign(accumulator, colData);\n });\n }\n createServiceInstance() {\n var component = this;\n var body = component.body;\n var data = this.data;\n var __serviceClass;\n var __classDefinition = component.getClass().__definition;\n var _serviceClassName = (isBrowser && body.getAttribute(\"serviceClass\") !== null) ? (body.getAttribute(\"serviceClass\")) : (null);\n return new Promise(function (resolve, reject) {\n /* __enable_service_class__ = true by default */\n var __enable_service_class__ = ((Object.hasOwnProperty.call(body, \"enableServiceClass\") && body.enableServiceClass) ||\n (!Object.hasOwnProperty.call(body, \"enableServiceClass\"))) ? (true) : (false);\n var _response_to_data_ = (isBrowser && body.getAttribute(\"response-to\") !== null && body.getAttribute(\"response-to\") === \"data\") ? (true) : (false);\n var _response_to_template_ = (isBrowser && body.getAttribute(\"response-to\") !== null && body.getAttribute(\"response-to\") === \"template\") ? (true) : (false);\n if (__enable_service_class__ && _serviceClassName !== null) {\n __serviceClass = ClassFactory(_serviceClassName);\n }\n if (!_response_to_data_ && __classDefinition && Object.hasOwnProperty.call(__classDefinition, \"responseTo\")) {\n _response_to_data_ = (__classDefinition.responseTo === \"data\") ? (true) : (false);\n }\n else if (!_response_to_data_ && Object.hasOwnProperty.call(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_data_ = (ClassFactory(\"Component\").responseTo === \"data\") ? (true) : (false);\n }\n if (!_response_to_template_ && __classDefinition && Object.hasOwnProperty.call(__classDefinition, \"responseTo\")) {\n _response_to_template_ = (__classDefinition.responseTo === \"template\") ? (true) : (false);\n }\n else if (!_response_to_template_ && Object.hasOwnProperty.call(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_template_ = (ClassFactory(\"Component\").responseTo === \"template\") ? (true) : (false);\n }\n if (typeof __serviceClass !== \"undefined\" &&\n (typeof __enable_service_class__ !== \"undefined\" &&\n __enable_service_class__ === true) &&\n (_response_to_data_ || _response_to_template_)) {\n logger.info(\"Loading service \" + _serviceClassName);\n var serviceInstance = New(__serviceClass, {\n data: data\n });\n serviceLoader(serviceInstance).then(function ({ request, service }) {\n var serviceResponse;\n if (typeof service.JSONresponse !== \"undefined\" && service.JSONresponse !== null) {\n serviceResponse = service.JSONresponse;\n }\n else {\n serviceResponse = service.template;\n }\n if (_response_to_data_) {\n if (typeof data === \"object\" && typeof serviceResponse === \"object\") {\n data = Object.assign(data, serviceResponse);\n }\n else {\n data = serviceResponse;\n }\n component.data = data;\n }\n component.serviceInstance = serviceInstance;\n component.serviceData = data;\n if (_response_to_template_) {\n component.template = serviceResponse;\n }\n resolve(serviceResponse);\n }, function (rejectedResponse) {\n logger.debug(`Service loading rejected for ${_serviceClassName} in ${component.name}`);\n reject(rejectedResponse);\n }).catch(function (e) {\n logger.debug(\"Something went wroing while trying to load the service \" + _serviceClassName);\n throw Error(`Error loading ${_serviceClassName} for ${component.name}. Detail: ${e}`);\n });\n }\n else {\n resolve(null);\n }\n });\n }\n _bindroute_() {\n var _component_ = this;\n if (!_component_._bindroute_.loaded) {\n if (isBrowser) {\n _component_.hostElements(\"a\").map(function (a) {\n a.oldclick = a.onclick;\n a.onclick = function (e) {\n var _ret_ = true;\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n var routingWay = _top.CONFIG.get(\"routingWay\");\n var routingPath = e.target[routingWay];\n if (_top.global.get(\"routingPaths\").includes(routingPath) &&\n e.target[routingWay] !== document.location[routingWay] &&\n e.target.href !== document.location.href) {\n logger.debug(\"A ROUTING WAS FOUND: \" + routingPath);\n window.history.pushState({\n href: e.target.href\n }, e.target.href, e.target.href);\n ClassFactory(\"Component\").route();\n _ret_ = false;\n }\n else {\n logger.debug(\"NO ROUTING FOUND FOR: \" + routingPath);\n }\n if (typeof e.target.oldclick !== \"undefined\" && typeof e.target.oldclick === \"function\") {\n e.target.oldclick.call(e.target, e);\n }\n return _ret_;\n };\n return null;\n });\n }\n else {\n // not yet implemented.\n }\n this._bindroute_.loaded = true;\n }\n else {\n logger.debug(`Routes already bound to popstate events for ${_component_.name}`);\n }\n }\n done(standardResponse) {\n var _ret_;\n if (typeof standardResponse !== \"undefined\") {\n var { request, component } = standardResponse;\n _ret_ = Promise.resolve({ request, component });\n }\n return _ret_;\n }\n createControllerInstance() {\n var _Controller;\n if (isBrowser) {\n if (typeof this.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n var controllerName = this.body.getAttribute(\"controllerClass\");\n if (!controllerName) {\n controllerName = \"Controller\";\n }\n _Controller = ClassFactory(controllerName);\n if (typeof _Controller !== \"undefined\") {\n this.controller = New(_Controller, {\n component: this\n });\n }\n }\n return new Promise((resolve, reject) => {\n if (isBrowser) {\n if (typeof _Controller !== \"undefined\" && typeof this.controller !== \"undefined\") {\n if (typeof this.controller.done === \"function\") {\n try {\n this.controller.done.call(this.controller);\n }\n catch (e) {\n throw Error(e);\n }\n }\n else {\n logger.debug(`${controllerName} does not have a done() method.`);\n reject(`${controllerName} does not have a done() method.`);\n }\n if (typeof this.controller.createRoutingController === \"function\") {\n this.controller.createRoutingController.call(this.controller);\n }\n else {\n logger.debug(`${controllerName} does not have a createRoutingController() method.`);\n }\n }\n }\n resolve({ component: this, controller: this.controller });\n });\n }\n createEffectInstance() {\n var _component_ = this;\n return new Promise(function (resolve, reject) {\n if (isBrowser) {\n var effectClassName = _component_.body.getAttribute(\"effectClass\");\n var applyEffectTo = _component_.body.getAttribute(\"apply-effect-to\");\n applyEffectTo = (applyEffectTo !== null) ? (applyEffectTo) : (\"load\");\n if (effectClassName !== null && applyEffectTo === \"observe\") {\n _component_.applyObserveTransitionEffect(effectClassName);\n }\n else if (effectClassName !== null && applyEffectTo === \"load\") {\n _component_.applyTransitionEffect(effectClassName);\n }\n }\n resolve({ component: _component_, effect: _component_.effect });\n });\n }\n createViewInstance() {\n var _component_ = this;\n return new Promise(function (resolve, reject) {\n var viewName = (isBrowser) ? (_component_.body.getAttribute(\"viewClass\")) : (null);\n if (viewName !== null) {\n var _View = ClassFactory(viewName);\n if (typeof _View !== \"undefined\") {\n _component_.view = New(_View, {\n component: _component_\n }); // Initializes the main view for the component\n if (Object.hasOwnProperty.call(_component_.view, \"done\") && typeof _component_.view.done === \"function\") {\n _component_.view.done.call(_component_.view);\n }\n }\n }\n resolve({ component: _component_, view: _component_.view });\n });\n }\n __done__() {\n var _component_ = this;\n var componentDone = function () {\n if (typeof _component_ === \"undefined\") {\n throw new Error(\"componentDone() has lost its context\");\n }\n if (typeof _component_.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n _component_.createViewInstance();\n _component_.createControllerInstance();\n _component_.createEffectInstance();\n logger.debug(`Trying to run component helpers for ${_component_.name}...`);\n try {\n _component_.runComponentHelpers();\n logger.debug(`Component helpers for ${_component_.name} executed.`);\n }\n catch (e) {\n logger.debug(`Component helpers for ${_component_.name} could not be executed.`);\n throw Error(e);\n }\n _component_.subcomponents = _component_.__buildSubComponents__();\n _component_._bindroute_();\n if (isBrowser) {\n _component_.body.setAttribute(\"loaded\", true);\n }\n };\n return new Promise(function (resolve, reject) {\n try {\n resolve(componentDone.call(_component_));\n }\n catch (e) {\n reject(e);\n }\n });\n }\n hostElements(tagFilter) {\n var _component_ = this;\n var elementList = [];\n if (isBrowser) {\n elementList = (_component_.shadowed && (typeof _component_.shadowRoot !== \"undefined\")) ? (_component_.shadowRoot.subelements(tagFilter)) : (_component_.body.subelements(tagFilter));\n }\n return elementList;\n }\n get subtags() {\n var _component_ = this;\n var tagFilter = _tag_filter_;\n return _component_.hostElements(tagFilter);\n }\n get bodyAttributes() {\n var _component_ = this;\n var c = _component_.body;\n return (isBrowser) ? ([...c.getAttributeNames()].map(a => { return { [a]: c.getAttribute(a) }; }).reduce((accumulator, colData, index) => { return Object.assign(accumulator, colData); })) : ({});\n }\n get dataAttributes() {\n var _component_ = this;\n var c = _component_.body;\n return (isBrowser) ? ([{}].concat([...c.getAttributeNames()].filter(n => n.startsWith(\"data-\")).map(a => { return { [a.split(\"-\")[1]]: c.getAttribute(a) }; })).reduce((accumulator, colData, index) => { return Object.assign(accumulator, colData); })) : ({});\n }\n __buildSubComponents__(rebuildObjects = false) {\n var _component_ = this;\n var elementList = _component_.subtags;\n if (!rebuildObjects) {\n elementList = elementList.filter(t => t.getAttribute(\"loaded\") !== \"true\");\n }\n if ((typeof _component_ !== \"undefined\") || _component_.subcomponents.length < 1) {\n _component_.subcomponents = _buildComponentsFromElements_(elementList, _component_);\n }\n return _component_.subcomponents;\n }\n fail(standardResponse) {\n var _ret_;\n if (typeof standardResponse !== \"undefined\") {\n var { error, component } = standardResponse;\n _ret_ = Promise.resolve({ error, component });\n }\n return _ret_;\n }\n set(name, value) {\n this[name] = value;\n }\n get(name) {\n return this[name];\n }\n feedComponent() {\n var _component_ = this;\n logger.debug(`[Component][${this.name}][feedComponent] start feeding component...`);\n var _feedComponent_InBrowser = function (_component_) {\n if (typeof _component_.container === \"undefined\" && typeof _component_.body === \"undefined\") {\n logger.warn(\"COMPONENT {{NAME}} has an undefined container and body\".replace(\"{{NAME}}\", _component_.name));\n return;\n }\n var container = (typeof _component_.container === \"undefined\" || _component_.container === null) ? (_component_.body) : (_component_.container);\n var parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n if (_component_.shadowed) {\n logger.debug(\"COMPONENT {{NAME}} is shadowed\".replace(\"{{NAME}}\", _component_.name));\n logger.debug(\"Preparing slots for Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n var tmp_shadowContainer = _DOMCreateElement(\"div\");\n container.subelements(\"[slot]\").map(function (c) {\n if (c.parentElement === container) {\n tmp_shadowContainer.appendChild(c);\n }\n });\n logger.debug(\"Creating shadowedContainer for COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n var shadowContainer = _DOMCreateElement(\"div\");\n shadowContainer.classList.add(\"shadowHost\");\n try {\n _component_.shadowRoot = shadowContainer.attachShadow({\n mode: \"open\"\n });\n }\n catch (e) {\n try {\n logger.debug(\"Shadowed COMPONENT {{NAME}} is repeated\".replace(\"{{NAME}}\", _component_.name));\n _component_.shadowRoot = shadowContainer.shadowRoot;\n }\n catch (e) {\n logger.warn(\"Shadowed COMPONENT {{NAME}} is not allowed on this browser\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n if (typeof _component_.shadowRoot !== \"undefined\" && _component_.shadowRoot !== null) {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n shadowContainer.shadowRoot.innerHTML = _component_.innerHTML;\n }\n else {\n tmp_shadowContainer.innerHTML = _component_.parseTemplate(tmp_shadowContainer.innerHTML);\n logger.debug(\"ADDING Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n shadowContainer.shadowRoot.innerHTML += _component_.innerHTML;\n }\n logger.debug(\"ADDING Slots to Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n shadowContainer.innerHTML += tmp_shadowContainer.innerHTML;\n logger.debug(\"APPENDING Shadowed COMPONENT {{NAME}} to Container \".replace(\"{{NAME}}\", _component_.name));\n var qs = container.querySelector(\".shadowHost\");\n if (!(typeof qs !== \"undefined\" && qs !== null)) {\n container.appendChild(shadowContainer);\n }\n else {\n logger.debug(\"Shadowed Container for COMPONENT {{NAME}} is already present in the tree \".replace(\"{{NAME}}\", _component_.name));\n _component_.shadowRoot.innerHTML = shadowContainer.shadowRoot.innerHTML;\n }\n }\n else {\n logger.warn(\"Shadowed COMPONENT {{NAME}} is bad configured\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n else {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML = _component_.innerHTML;\n }\n else if (container && _component_) {\n logger.debug(\"ADDING COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML += _component_.innerHTML;\n }\n else {\n logger.warn(\"COMPONENT {{NAME}} is not added to the DOM\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n };\n var _feedComponent_InNode = function (_component_) {\n var parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n };\n var _ret_;\n if (!is_a(_component_, \"Component\")) {\n logger.warn(\"Trying to feed a non component object\");\n return;\n }\n if (isBrowser) {\n _ret_ = _feedComponent_InBrowser(_component_);\n }\n else {\n _ret_ = _feedComponent_InNode(_component_);\n }\n return _ret_;\n }\n rebuild() {\n var _component = this;\n var _promise = new Promise(function (resolve, reject) {\n if (typeof _component === \"undefined\" || _component === null) {\n reject(\"Component is undefined\");\n }\n if (isQCObjects_Object(_component) && is_a(_component, \"Component\")) {\n switch (true) {\n case (_component.get(\"tplsource\") === \"none\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=none, so no template load was done\");\n var standardResponse = {\n request: null,\n component: _component\n };\n _component.__done__().then(function () {\n if (typeof _component.done === \"function\") {\n _component.done.call(_component, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n }, function () {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"inline\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=inline, so it is assumed that template is already declared\");\n (async function (_component) {\n _component.feedComponent.bind(_component)();\n })(_component);\n var standardResponse = {\n request: null,\n component: _component\n };\n _component.__done__().then(function () {\n if (typeof _component.done === \"function\") {\n _component.done.call(_component, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n }, function () {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"default\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"basePath\") + _component.get(\"templateURI\"));\n componentLoader(_component, false).then(function (standardResponse) {\n resolve.call(_promise, standardResponse);\n }, function (standardResponse) {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"external\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"templateURI\"));\n componentLoader(_component, false).then(function (standardResponse) {\n resolve.call(_promise, standardResponse);\n }, function (standardResponse) {\n reject.call(_promise, standardResponse);\n });\n break;\n case _component.get(\"tplsource\") === \"default\" && _component.get(\"templateURI\", \"\") === \"\":\n logger.debug(`Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n reject.call(_promise, `Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n break;\n default:\n logger.debug(\"Component \" + _component.name + \" will not be rebuilt because no templateURI is present\");\n reject.call(_promise, {\n request: null,\n component: _component\n });\n break;\n }\n }\n });\n return _promise;\n }\n Cast(oClass) {\n /* Cast method for components has been deprecated. Don't use this method, it is available only for compatibility purposes */\n let o = _methods_(oClass).map(m => m.name.replace(/bound /g, \"\")).map(m => {\n return {\n [m]: oClass[m].bind(this)\n };\n }).reduce((c, p) => Object.assign(c, p), {});\n return _Cast(this, o);\n }\n static route() {\n var componentClass = this; /* is can be class or object*/\n var _route_promise_;\n var isValidInstance = (isQCObjects_Object(componentClass) && is_a(componentClass, \"Component\")) ? (true) : (false);\n var __route__ = function (componentList) {\n var _componentNames_ = [];\n var _promises_ = componentList.filter(function (rc) {\n return typeof rc !== \"undefined\";\n }).map(function (rc) {\n if (typeof rc.name !== \"undefined\") {\n _componentNames_.push(rc.name);\n }\n else {\n throw new Error(__getType__(rc) + \" does not have a name\");\n }\n return new Promise(function (resolve, reject) {\n var _promise_;\n if (typeof rc !== \"undefined\" && !!rc._reroute_) {\n _promise_ = rc._reroute_()\n .then(function () {\n rc.reload = true;\n return rc.rebuild();\n })\n .then(function (_rc_) {\n if (Object.hasOwnProperty.call(rc, \"subcomponents\") &&\n typeof rc.subcomponents !== \"undefined\" &&\n rc.subcomponents.length > 0) {\n logger.debug(\"LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: \" + rc.name);\n return __route__.call(rc, rc.subcomponents);\n }\n else {\n logger.debug(\"No subcomponents to look for routings in: \" + rc.name);\n if (rc.subtags.length > 0) {\n rc.subcomponents = rc.__buildSubComponents__(true);\n }\n resolve(rc);\n }\n });\n }\n else if (typeof rc !== \"undefined\") {\n reject(\"Component \" + rc.name + \" is not an instance of Component\");\n }\n return _promise_;\n });\n });\n return Promise.all(_promises_)\n .then(function () {\n logger.debug(\"ROUTING COMPLETED FOR \" + _componentNames_.join(\", \"));\n }).catch(function (err) {\n logger.warn(\"ROUTING FAILED FOR \" + _componentNames_.join(\", \") + \": \" + err);\n });\n };\n if (isValidInstance || !!_top.componentsStack) {\n if (isValidInstance) {\n logger.debug(\"loading routings for instance \" + componentClass.name);\n }\n _route_promise_ = __route__.call(componentClass, (isValidInstance) ? (componentClass.subcomponents) : (_top.componentsStack));\n }\n else {\n logger.debug(\"An undetermined result expected if load routings. So will not be loaded this time.\");\n throw Error(`There is no valid instance and no components stack available to apply rountings`);\n }\n return _route_promise_;\n }\n fullscreen() {\n if (isBrowser) {\n var elem = this.body;\n if (elem.requestFullscreen) {\n elem.requestFullscreen();\n }\n else if (elem.mozRequestFullScreen) {\n /* Firefox */\n elem.mozRequestFullScreen();\n }\n else if (elem.webkitRequestFullscreen) {\n /* Chrome, Safari & Opera */\n elem.webkitRequestFullscreen();\n }\n else if (elem.msRequestFullscreen) {\n /* IE/Edge */\n elem.msRequestFullscreen();\n }\n }\n else {\n // not yet implemented.\n }\n }\n closefullscreen() {\n if (isBrowser) {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n }\n else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n }\n else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n }\n else if (document.msExitFullscreen) {\n document.msExitFullscreen();\n }\n }\n else {\n // noy yet implemented.\n }\n }\n _generateRoutingPaths(componentBody) {\n var component = this;\n return new Promise(function (resolve, reject) {\n if (isBrowser) {\n if (__valid_routing_way__(component.validRoutingWays, component.routingWay)) {\n if (typeof componentBody !== \"undefined\") {\n component.innerHTML = componentBody.innerHTML;\n component.routingNodes = componentBody.subelements(\"routing\");\n component.routings = [];\n component.routingNodes.map(function (routingNode, r) {\n var attributeNames = routingNode.getAttributeNames();\n var routing = {};\n attributeNames.map(function (attributeName, a) {\n routing[attributeNames[a]] = routingNode.getAttribute(attributeNames[a]);\n });\n component.routings.push(routing);\n if (!component.routingPaths) {\n component.routingPaths = [];\n }\n if (!component.routingPaths.includes(routing.path)) {\n component.routingPaths.push(routing.path);\n }\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n if (!_top.global.get(\"routingPaths\").includes(routing.path)) {\n _top.global.get(\"routingPaths\").push(routing.path);\n }\n });\n }\n }\n }\n else {\n // not yet implemented.\n }\n resolve();\n });\n }\n parseTemplate(template) {\n var _self = this;\n var _parsedAssignmentText;\n var value = template;\n if (Object.hasOwnProperty.call(_self, \"templateHandler\")) {\n var templateHandlerName = _self.templateHandler;\n logger.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${templateHandlerName} ...`);\n var templateHandlerClass = ClassFactory(templateHandlerName);\n var templateInstance = New(templateHandlerClass, {\n component: _self,\n template: value\n });\n templateInstance.component = _self;\n var selfData = _self.data;\n if (Object.hasOwnProperty.call(_self, \"assignRoutingParams\") && _self.assignRoutingParams) {\n try {\n selfData = Object.assign(selfData, _self.routingParams);\n }\n catch (e) {\n logger.debug(\"[parseTemplate] it was not possible to assign the routing params to the template\");\n }\n }\n _parsedAssignmentText = templateInstance.assign(selfData);\n }\n else {\n logger.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`);\n _parsedAssignmentText = value;\n }\n return _parsedAssignmentText;\n }\n _reroute_() {\n /* This method set the selected routing and makes the switch to the templateURI */\n var rc = this;\n return new Promise(function (resolve, reject) {\n if (isBrowser) {\n if (__valid_routing_way__(rc.validRoutingWays, rc.routingWay)) {\n rc.routingPath = document.location[rc.routingWay];\n rc.routingSelected.map(function (routing, r) {\n var componentURI = ComponentURI({\n \"COMPONENTS_BASE_PATH\": _top.CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": routing.name.toString(),\n \"TPLEXTENSION\": (Object.hasOwnProperty.call(routing, \"tplextension\")) ? (routing.tplextension) : (rc.tplextension),\n \"TPL_SOURCE\": \"default\" /* here is always default in order to get the right uri */\n });\n rc.templateURI = componentURI;\n });\n if (rc.routingSelected.length > 0) {\n rc.template = \"\";\n rc.body.innerHTML = \"\";\n }\n }\n }\n resolve(rc);\n });\n }\n lazyLoadImages() {\n if (isBrowser) {\n var component = this;\n var _componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n var _imgLazyLoaded = [..._componentRoot.subelements(\"img[lazy-src]\")];\n var _lazyLoadImages = function (image) {\n image.setAttribute(\"src\", image.getAttribute(\"lazy-src\"));\n image.onload = () => {\n image.removeAttribute(\"lazy-src\");\n };\n };\n if (\"IntersectionObserver\" in window) {\n var observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _lazyLoadImages(item.target);\n observer.unobserve(item.target);\n }\n });\n });\n _imgLazyLoaded.map(function (img) {\n return observer.observe(img);\n });\n }\n else {\n _imgLazyLoaded.map(_lazyLoadImages);\n }\n }\n else {\n // not yet implemented\n }\n return null;\n }\n applyTransitionEffect(effectClassName) {\n var _Effect = ClassFactory(effectClassName);\n if (typeof _Effect === \"undefined\") {\n throw Error(`${effectClassName} not found.`);\n }\n if (typeof _Effect !== \"undefined\" && is_a(_Effect, \"TransitionEffect\")) {\n this.effect = New(_Effect, {\n component: this\n });\n this.effect.apply(this.effect.defaultParams);\n }\n else {\n logger.debug(`${effectClassName} is ${__getType__(_Effect)} but is not a TransitionEffect`);\n }\n }\n applyObserveTransitionEffect(effectClassName) {\n if (isBrowser) {\n var component = this;\n var _componentRoot = (component.shadowed) ? (component.shadowRoot.host) : (component.body);\n var _applyEffect_ = function (element) {\n component.applyTransitionEffect(effectClassName);\n };\n if (\"IntersectionObserver\" in window) {\n var observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _applyEffect_(item.target);\n observer.unobserve(item.target);\n }\n });\n });\n observer.observe(_componentRoot);\n }\n else {\n _applyEffect_(_componentRoot);\n }\n }\n else {\n // not yet implemented\n }\n return null;\n }\n scrollIntoHash() {\n if (isBrowser) {\n var component = this;\n if (document.location.hash !== \"\") {\n var _componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n _componentRoot.subelements(document.location.hash).map(function (element) {\n if (typeof element.scrollIntoView === \"function\") {\n element.scrollIntoView(_top.CONFIG.get(\"scrollIntoHash\", {\n behavior: \"auto\",\n block: \"top\",\n inline: \"top\"\n }));\n }\n });\n }\n }\n else {\n // not yet implemented\n }\n }\n i18n_translate() {\n if (isBrowser) {\n if (_top.CONFIG.get(\"use_i18n\")) {\n var component = this;\n var _componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n var lang1 = _top.CONFIG.get(\"lang\", \"en\");\n var lang2 = navigator.language.slice(0, 2);\n var i18n = _top.global.get(\"i18n\");\n if ((lang1 !== lang2) && (typeof i18n === \"object\" && Object.hasOwnProperty.call(i18n, \"messages\"))) {\n var callback_i18n = function () {\n var component = this;\n return new Promise(function (resolve, reject) {\n var messages = i18n.messages.filter(function (message) {\n return Object.hasOwnProperty.call(message, lang1) && Object.hasOwnProperty.call(message, lang2);\n });\n _componentRoot.subelements(\"ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component\")\n .map(function (element) {\n messages.map(function (message) {\n var _innerHTML = element.innerHTML;\n _innerHTML = _innerHTML.replace(new RegExp(`${message[lang1]}`, \"g\"), message[lang2]);\n element.innerHTML = _innerHTML;\n return null;\n });\n return element;\n });\n resolve();\n });\n };\n callback_i18n.call(component).then(function () {\n logger.debug(\"i18n loaded for component: \" + component.name);\n });\n }\n }\n }\n else {\n // not yet implemented\n }\n }\n addComponentHelper(componentHelper) {\n var component = this;\n component._componentHelpers.push(componentHelper);\n }\n runComponentHelpers() {\n if (isBrowser) {\n var component = this;\n var __component_helpers__ = [];\n /*\n * BEGIN use i18n translation\n */\n __component_helpers__.push(component.i18n_translate.bind(component));\n /*\n * END use i18n translation\n */\n /*\n * BEGIN component scrollIntoHash\n */\n __component_helpers__.push(component.scrollIntoHash.bind(component));\n /*\n * END component scrollIntoHash\n */\n /*\n * BEGIN component images lazy-load\n */\n __component_helpers__.push(component.lazyLoadImages.bind(component));\n /*\n * END component images lazy-load\n */\n __component_helpers__ = __component_helpers__.concat(component._componentHelpers);\n __component_helpers__.map(function (_component_helper_) {\n logger.debug(`Executing ${_component_helper_.name} as component helper for ${component.name}...`);\n _component_helper_();\n });\n }\n else {\n // not yet implemented\n }\n }\n }\n ]);\n (_methods_)(ClassFactory(\"Component\")).map(function (__c__) {\n (_protected_code_)(__c__);\n });\n if (isBrowser) {\n window.addEventListener(\"popstate\", function (popStateEvent) {\n popStateEvent.stopImmediatePropagation();\n popStateEvent.stopPropagation();\n ClassFactory(\"Component\").route();\n });\n }\n Package(\"com.qcobjects.controllers\", [\n class Controller extends ClassFactory(\"InheritClass\") {\n component = null;\n dependencies = [];\n constructor({ component, dependencies }) {\n super({ component, dependencies });\n this.component = component;\n this.dependencies = dependencies;\n if (typeof this.component === \"undefined\" || this.component === \"null\") {\n throw Error(`${__getType__(this)} must be called with a component`);\n }\n }\n routingSelectedAttr(attrName) {\n return this.component.routingSelected.map(function (r) {\n return r[attrName];\n }).filter(function (v) {\n return v;\n }).pop();\n }\n isTouchable() {\n return (\"ontouchstart\" in window) ||\n (navigator.MaxTouchPoints > 0) ||\n (navigator.msMaxTouchPoints > 0);\n }\n onpress(subelementSelector, handler) {\n try {\n if (this.isTouchable()) {\n this.component.body.subelements(subelementSelector)[0].addEventListener(\"touchstart\", handler, {\n passive: true\n });\n }\n else {\n this.component.body.subelements(subelementSelector)[0].addEventListener(\"click\", handler, {\n passive: true\n });\n }\n }\n catch (e) {\n logger.debug(\"No button to assign press event\");\n }\n }\n createRoutingController() {\n var controller = this;\n var component = controller.component;\n var controllerName = controller.routingSelectedAttr(\"controllerclass\");\n if (typeof controllerName !== \"undefined\") {\n var _Controller = ClassFactory(controllerName);\n if (typeof _Controller !== \"undefined\") {\n component.routingController = New(_Controller, {\n component: component\n }); // Initializes the main controller for the component\n if (Object.hasOwnProperty.call(component.routingController, \"done\") && typeof component.routingController.done === \"function\") {\n component.routingController.done.call(component.routingController);\n }\n }\n }\n }\n done() { }\n }\n ]);\n Package(\"com.qcobjects.views\", [\n class View extends ClassFactory(\"InheritClass\") {\n constructor({ component = undefined, dependencies = [] }) {\n super(...arguments);\n if (typeof this.component === \"undefined\" || this.component === \"null\") {\n throw Error(`${__getType__(this)} must be called with a component`);\n }\n }\n }\n ]);\n Package(\"com.qcobjects.api\", [\n class Service extends ClassFactory(\"InheritClass\") {\n kind = \"rest\";\n /* it can be rest, mockup, local */\n domain = _domain_;\n basePath = _basePath_;\n url = \"\";\n method = \"GET\";\n data = {};\n reload = false;\n cached = false;\n constructor() {\n super(...arguments);\n }\n set(name, value) {\n this[name] = value;\n }\n get(name) {\n return this[name];\n }\n }\n ]);\n Package(\"com.qcobjects.api.services\", [\n class JSONService extends ClassFactory(\"Service\") {\n method = \"GET\";\n cached = false;\n headers = {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n JSONresponse = null;\n done(result) {\n logger.debug(\"***** RECEIVED RESPONSE:\");\n logger.debug(result.service.template);\n this.JSONresponse = JSON.parse(result.service.template);\n }\n constructor() {\n super(...arguments);\n }\n }\n ]);\n Package(\"com.qcobjects.api.config\", [\n class ConfigService extends ClassFactory(\"JSONService\") {\n method = \"GET\";\n cached = false;\n configFileName = \"config.json\";\n headers = {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n JSONresponse = null;\n done(result) {\n logger.debug(\"***** CONFIG LOADED:\");\n logger.debug(result.service.template);\n this.JSONresponse = JSON.parse(result.service.template);\n if (Object.hasOwnProperty.call(this.JSONresponse, \"__encoded__\")) {\n this.JSONresponse = JSON.parse(ClassFactory(\"_Crypt\").decrypt(this.JSONresponse.__encoded__, _secretKey));\n }\n for (var k in this.JSONresponse) {\n _top.CONFIG.set(k, this.JSONresponse[k]);\n }\n this.configLoaded.call(this);\n }\n fail(result) {\n this.configLoaded.call(this);\n }\n constructor() {\n super(...arguments);\n this.set(\"url\", this.get(\"basePath\") + this.get(\"configFileName\"));\n }\n }\n ]);\n Package(\"com.qcobjects.valueObjects\", [\n class VO extends ClassFactory(\"InheritClass\") {\n constructor() {\n super(...arguments);\n }\n }\n ]);\n /**\n * Returns a standarized uri for a component\n * @example\n * templateURI = ComponentURI({'COMPONENTS_BASE_PATH':'','COMPONENT_NAME':'','TPLEXTENSION':'','TPL_SOURCE':''})\n * @author: Jean Machuca \n * @param params an object with the params to build the uri path\n */\n var ComponentURI = ({ TPL_SOURCE, COMPONENTS_BASE_PATH, COMPONENT_NAME, TPLEXTENSION }) => {\n const templateURI = (TPL_SOURCE === \"default\") ? (`${COMPONENTS_BASE_PATH}${COMPONENT_NAME}.${TPLEXTENSION}`) : (\"\");\n return templateURI;\n };\n /**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param component a Component object\n */\n var componentLoader = function (component, _async) {\n var __promise__;\n var _componentLoaderInBrowser = function (component, _async) {\n __promise__ = new Promise(function (resolve, reject) {\n var _promise = component.__promise__;\n var container = (Object.hasOwnProperty.call(component, \"container\") && typeof component.container !== \"undefined\" && component.container !== null) ? (component.container) : (component.body);\n if (container !== null) {\n var _feedComponent_ = function (component) {\n component.feedComponent();\n var standardResponse = {\n \"request\": xhr,\n \"component\": component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n var _componentLoaded = function () {\n var successStatus = (is_file) ? (0) : (200);\n if (xhr.status === successStatus) {\n var response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_.call(this, component);\n }\n else {\n var standardResponse = {\n \"request\": xhr,\n \"component\": component\n };\n reject.call(_promise, standardResponse);\n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_.call(this, component);\n }\n else {\n var is_file = (component.url.startsWith(\"file:\")) ? (true) : (false);\n var xhr = new XMLHttpRequest();\n if (!is_file) {\n try {\n logger.debug(\"Calling the url of component in async mode.\");\n xhr.open(component.method, component.url, true);\n }\n catch (e) {\n logger.debug(\"Last try has failed... The component cannot be loaded.\");\n }\n }\n else {\n if (\"fetch\" in _top) {\n logger.debug(\"I can use fetch...\");\n logger.debug(\"It is a file to be loaded, so I will try to use fetch\");\n var _p = fetch(component.url).then(response => {\n logger.debug(\"I got a response from fetch, so I'll feed the component\");\n response.text().then(text => {\n component.template = text;\n _feedComponent_.call(this, component);\n });\n });\n }\n }\n if (!is_phonegap && !is_file) {\n xhr.setRequestHeader(\"Content-Type\", \"text/html\");\n }\n if (!is_file) {\n xhr.onload = _componentLoaded;\n }\n var _directLoad = function (is_file) {\n is_file = (typeof is_file === \"undefined\" || !is_file) ? (false) : (true);\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n if (is_file) {\n if (!(\"fetch\" in _top)) {\n logger.debug(\"I have to try to load the file using xhr... \");\n xhr.send(null);\n if (xhr.status === XMLHttpRequest.DONE) {\n _componentLoaded.call(this);\n }\n }\n }\n else {\n logger.debug(\"Trying to send the data to the component... \");\n xhr.send(_DataStringify(component.data));\n }\n };\n if (component.cached && (!is_file)) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load(cacheController) {\n _directLoad.call(this, is_file);\n },\n alternate(cacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n }\n else {\n _directLoad.call(this, is_file);\n }\n return;\n }\n });\n global.lastCache = cache;\n }\n else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad.call(this, is_file);\n }\n }\n }\n else {\n logger.debug(\"CONTAINER DOESNT EXIST\");\n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then(function () {\n var _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n var _ret_;\n if (typeof component.fail === \"function\") {\n _ret_ = component.fail.call(component, standardResponse);\n }\n return Promise.reject(_ret_);\n }).catch(function (e) {\n logger.debug(\"Something wrong loading the component\");\n });\n return __promise__;\n };\n var _componentLoaderInNode = function (component, _async) {\n __promise__ = new Promise(function (resolve, reject) {\n var _promise = __promise__;\n var _feedComponent_ = function (component) {\n component.feedComponent();\n var standardResponse = {\n \"request\": null,\n \"component\": component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n var _componentLoaded = function (err, responseText) {\n if (!err) {\n var response = responseText.toString();\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_.call(this, component);\n }\n else {\n var standardResponse = {\n \"request\": null,\n \"component\": component\n };\n reject.call(_promise, standardResponse);\n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_.call(this, component);\n }\n else {\n logger.debug(\"Loading the component as a local file in server...\");\n var _directLoad = function (is_file) {\n const fs = _require_(\"fs\");\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n fs.readFile(component.url, _componentLoaded);\n };\n if (component.cached) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load(cacheController) {\n _directLoad.call(this);\n },\n alternate(cacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n }\n else {\n _directLoad.call(this);\n }\n return;\n }\n });\n global.lastCache = cache;\n }\n else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad.call(this);\n }\n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then(function () {\n var _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n var _ret_;\n if (typeof component.fail === \"function\") {\n _ret_ = component.fail.call(component, standardResponse);\n }\n return Promise.reject(_ret_);\n }).catch(function (e) {\n logger.debug(`Something wrong loading the component: ${e}`);\n });\n return __promise__;\n };\n var _ret_;\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_componentLoaderInBrowser, arguments);\n }\n else {\n _ret_ = _componentLoaderInBrowser(component, _async);\n }\n }\n else {\n _ret_ = _componentLoaderInNode(component, _async);\n }\n return _ret_;\n };\n /**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param service a Service object\n */\n var serviceLoader = function (service, _async) {\n var _serviceLoaderInBrowser = function (service, _async) {\n var _promise = new Promise(function (resolve, reject) {\n logger.debug(\"LOADING SERVICE DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n var xhr = new XMLHttpRequest();\n xhr.withCredentials = service.withCredentials;\n var xhrasync = true; // always async because xhr sync is deprecated\n xhr.open(service.method, service.url, xhrasync);\n for (var header in service.headers) {\n try {\n if (typeof service.headers[header] !== \"function\") {\n xhr.setRequestHeader(header, service.headers[header]);\n }\n }\n catch (e) {\n logger.debug(\"Something went wrong when assign the header \" + header);\n }\n }\n xhr.onload = function () {\n if (xhr.status === 200) {\n var response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING SERVICE {{NAME}}\".replace(\"{{NAME}}\", service.name));\n service.template = response;\n if (service.cached && (typeof cache !== \"undefined\")) {\n cache.save(service.name, service.template);\n }\n if (typeof service.done === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n \"service\": service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n }\n else {\n if (typeof service.fail === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n \"service\": service\n };\n service.fail.call(service, standardResponse);\n reject.call(_promise, standardResponse);\n }\n }\n };\n var _directLoad = function () {\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n try {\n xhr.send(_DataStringify(service.data));\n }\n catch (e) {\n logger.debug(\"SOMETHING WRONG WITH REQUEST \");\n reject.call(_promise, {\n request: xhr,\n service: service\n });\n }\n };\n if (service.cached) {\n var cache = new ComplexStorageCache({\n index: service.data,\n load(cacheController) {\n _directLoad.call(this);\n },\n alternate(cacheController) {\n if (service.method === \"GET\") {\n service.template = cacheController.cache.getCached(service.name);\n if (typeof service.done === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n \"service\": service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n }\n else {\n _directLoad.call(this);\n }\n return;\n }\n });\n global.lastCache = cache;\n }\n else {\n _directLoad.call(this);\n }\n return xhr;\n });\n return _promise;\n };\n var _serviceLoaderInNode = function (service, _async) {\n var _promise = new Promise(function (resolve, reject) {\n if (typeof URL === \"undefined\") {\n global.URL = _require_(\"url\").URL;\n let URL = global.URL;\n }\n var serviceURL = new URL(service.url);\n var req;\n service.useHTTP2 = Object.hasOwnProperty.call(service, \"useHTTP2\") && service.useHTTP2;\n var captureEvents = function (req) {\n logger.debug(\"LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n var dataXML;\n var standardResponse = {\n \"http2Client\": client,\n \"request\": req,\n \"service\": service,\n \"responseHeaders\": null\n };\n if (typeof service.data === \"object\" && service.data !== null) {\n if (service.useHTTP2) {\n try {\n logger.debug(\"Sending data...\");\n let buffer = new Buffer(_DataStringify(service.data));\n req.write(buffer);\n }\n catch (e) {\n logger.debug(\"It was not possible to send any data\");\n }\n }\n }\n dataXML = \"\";\n req.on(\"response\", (responseHeaders, flags) => {\n logger.debug(\"receiving response...\");\n standardResponse.responseHeaders = responseHeaders;\n /*\n for (const name in responseHeaders) {\n logger.debug(`${name}: ${responseHeaders[name]}`);\n }\n */\n dataXML = \"\";\n });\n req.on(\"data\", (chunk) => {\n logger.debug(\"receiving data...\");\n // do something with the data\n dataXML += \"\" + chunk.toString();\n service.template = dataXML;\n });\n if (service.useHTTP2) {\n req.resume();\n }\n req.on(\"end\", () => {\n logger.debug(\"ending call...\");\n service.template = dataXML;\n if (Object.hasOwnProperty.call(service, \"useHTTP2\") && service.useHTTP2) {\n client.destroy();\n }\n else {\n req.destroy();\n }\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n });\n if (service.useHTTP2) {\n req.end();\n }\n };\n try {\n var requestOptions;\n if (service.useHTTP2) {\n logger.debug(\"using http2\");\n var http2 = _require_(\"http2\");\n var client = http2.connect(serviceURL.origin);\n requestOptions = Object.assign({\n \":method\": service.method,\n \":path\": serviceURL.pathname\n }, service.options);\n requestOptions = Object.assign(requestOptions, service.headers);\n req = client.request(requestOptions);\n req.setEncoding(\"utf8\");\n captureEvents(req);\n }\n else {\n if (serviceURL.protocol === \"http:\") {\n var http = _require_(\"http\");\n var request = http.request;\n requestOptions = Object.assign({\n \"url\": service.url,\n headers: service.headers\n }, service.options);\n var req = request(service.url);\n captureEvents(req);\n }\n else if (serviceURL.protocol === \"https:\") {\n var https = _require_(\"https\");\n requestOptions = Object.assign({\n hostname: serviceURL.hostname,\n port: serviceURL.port,\n path: serviceURL.pathname,\n method: service.method,\n headers: service.headers\n }, service.options);\n var _req_ = https.request(requestOptions, function (req) {\n captureEvents(req);\n });\n _req_.end();\n }\n else {\n var e = \"Protocol not supported: \" + serviceURL.protocol;\n logger.debug(e);\n throw new Error(e);\n }\n }\n }\n catch (e) {\n logger.debug(e);\n service.fail.call(service, e);\n reject.call(_promise, e);\n }\n }).catch(function (e) {\n console.log(e);\n logger.debug(\"Something happened when trying to call the service: \" + service.name);\n service.fail.call(service, e);\n });\n return _promise;\n };\n var _serviceLoaderMockup = function (service, _async) {\n var _promise = new Promise(function (resolve, reject) {\n logger.debug(`Calling mockup service ${service.name} ...`);\n var standardResponse = {\n \"request\": null,\n \"service\": service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.mockup === \"function\") {\n service.mockup.call(service, standardResponse);\n }\n else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n var _serviceLoaderLocal = function (service, _async) {\n var _promise = new Promise(function (resolve, reject) {\n logger.debug(`Calling local service ${service.name} ...`);\n var standardResponse = {\n \"request\": null,\n \"service\": service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.local === \"function\") {\n service.local.call(service, standardResponse);\n }\n else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n var _ret_;\n switch (service.kind) {\n case \"rest\":\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_serviceLoaderInBrowser, arguments);\n }\n else {\n _ret_ = _serviceLoaderInBrowser(service, _async);\n }\n }\n else {\n _ret_ = _serviceLoaderInNode(service, _async);\n }\n break;\n case \"mockup\":\n _ret_ = _serviceLoaderMockup(service, _async);\n break;\n case \"local\":\n _ret_ = _serviceLoaderLocal(service, _async);\n break;\n default:\n logger.debug(`The value of the kind property of the service ${service.name} is not valid`);\n break;\n }\n return _ret_;\n };\n Export(serviceLoader);\n Export(componentLoader);\n Export(ComponentURI);\n Export(ObjectName);\n Export(_DataStringify);\n Export(isQCObjects_Class);\n Export(isQCObjects_Object);\n Export(NamespaceRef);\n if (isBrowser) {\n Element.prototype.buildComponents = function (rebuildObjects = false) {\n var tagFilter = _tag_filter_;\n var d = this;\n var elements = d.subelements(tagFilter);\n return _buildComponentsFromElements_(elements, null);\n };\n HTMLDocument.prototype.buildComponents = Element.prototype.buildComponents;\n HTMLElement.prototype.buildComponents = Element.prototype.buildComponents;\n var _ComponentWidget_ = class extends HTMLElement {\n constructor() {\n super(...arguments);\n const componentWidget = this;\n const componentName = componentWidget.nodeName.toLowerCase();\n const componentBody = _DOMCreateElement(\"quick-component\");\n const __enabled__atributes__ = componentWidget.getAttributeNames();\n componentBody.setAttribute(\"name\", componentName);\n if (!componentWidget.hasAttribute(\"shadowed\")) {\n componentBody.setAttribute(\"shadowed\", \"true\");\n }\n __enabled__atributes__.map(function (attributeName) {\n if (componentWidget.hasAttribute(attributeName)) {\n componentBody.setAttribute(attributeName, componentWidget.getAttribute(attributeName));\n componentWidget.removeAttribute(attributeName);\n }\n });\n var data_attributenames = componentWidget.getAttributeNames().filter(function (a) {\n return a.startsWith(\"data-\");\n }).map(function (a) {\n return a.split(\"-\")[1];\n });\n data_attributenames.map(function (_attribute_name_) {\n componentBody.setAttribute(\"data-\" + _attribute_name_, componentWidget.getAttribute(\"data-\" + _attribute_name_));\n componentWidget.removeAttribute(\"data-\" + _attribute_name_);\n });\n [...componentWidget.children].map(function (element) {\n componentBody.appendChild(element.cloneNode(true));\n element.remove();\n });\n componentWidget.append(componentBody);\n }\n };\n Export(_ComponentWidget_);\n var RegisterWidget = function (widgetName) {\n customElements.define(widgetName, class extends _ComponentWidget_ {\n });\n };\n var RegisterWidgets = function () {\n var widgetList = [...arguments];\n widgetList.filter(function (widgetName) {\n return typeof widgetName === \"string\";\n }).map(function (widgetName) {\n RegisterWidget(widgetName);\n });\n };\n (_protected_code_)(RegisterWidget);\n (_protected_code_)(RegisterWidgets);\n Export(RegisterWidget);\n Export(RegisterWidgets);\n }\n else {\n // not yet implemented.\n }\n if (!isBrowser) {\n Package(\"com.qcobjects.api\", [\n class BackendMicroservice extends ClassFactory(\"InheritClass\") {\n constructor({ domain = _domain_, basePath = _basePath_, body = null, stream = null, request = null }) {\n super(...arguments);\n logger.debug(\"Initializing BackendMicroservice...\");\n let microservice = this;\n if (typeof this.body === \"undefined\") {\n this.body = null;\n }\n if (typeof body !== \"undefined\") {\n this.body = body;\n }\n this.cors();\n microservice.stream = stream;\n stream.on(\"data\", (data) => {\n // data from POST, GET\n var requestMethod = request.method.toLowerCase();\n var supportedMethods = {\n \"post\": microservice.post,\n };\n if (Object.hasOwnProperty.call(supportedMethods, requestMethod)) {\n supportedMethods[requestMethod].call(microservice, data);\n }\n });\n // data from POST, GET\n var requestMethod = request.method.toLowerCase();\n var supportedMethods = {\n \"get\": microservice.get,\n \"head\": microservice.head,\n \"put\": microservice.put,\n \"delete\": microservice.delete,\n \"connect\": microservice.connect,\n \"options\": microservice.options,\n \"trace\": microservice.trace,\n \"patch\": microservice.patch\n };\n if (Object.hasOwnProperty.call(supportedMethods, requestMethod)) {\n supportedMethods[requestMethod].call(microservice);\n }\n }\n cors() {\n if (this.route.cors) {\n logger.debug(\"Validating CORS...\");\n let { allow_origins, allow_credentials, allow_methods, allow_headers } = this.route.cors;\n var microservice = this;\n if (typeof microservice.headers !== \"object\") {\n microservice.headers = {};\n }\n if (typeof microservice.route.responseHeaders !== \"object\") {\n microservice.route.responseHeaders = {};\n }\n if (typeof allow_origins !== \"undefined\") {\n logger.debug(\"CORS: allow_origins available. Validating origins...\");\n // an example of allow_origins is ['https://example.com','http://www.example.com']\n if (allow_origins === \"*\" || (typeof microservice.request.headers.origin === \"undefined\") || [...allow_origins].indexOf(microservice.request.headers.origin) !== -1) {\n // for compatibility with all browsers allways return a wildcard when the origin is allowed\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n }\n else {\n logger.debug(\"CORS: Origin is not allowed: \" + microservice.request.headers.origin);\n logger.debug(\"CORS: Forcing to finish the response...\");\n this.body = {};\n try {\n this.done();\n }\n catch (e) {\n logger.debug(`It was not possible to finish the call to the microservice: ${e}`);\n }\n }\n }\n else {\n logger.debug(\"CORS: no allow_origins available. Allowing all origins...\");\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n }\n if (typeof allow_credentials !== \"undefined\") {\n logger.debug(`CORS: allow_credentials present. Allowing ${allow_credentials}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = allow_credentials.toString();\n }\n else {\n logger.debug(\"CORS: No allow_credentials present. Allowing all credentials.\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = \"true\";\n }\n if (typeof allow_methods !== \"undefined\") {\n logger.debug(`CORS: allow_methods present. Allowing ${allow_methods}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = [...allow_methods].join(\",\");\n }\n else {\n logger.debug(\"CORS: No allow_methods present. Allowing only GET, OPTIONS and POST\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = \"GET, OPTIONS, POST\";\n }\n if (typeof allow_headers !== \"undefined\") {\n logger.debug(`CORS: allow_headers present. Allowing ${allow_headers}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = [...allow_headers].join(\",\");\n }\n else {\n logger.debug(`CORS: No allow_headers present. Allowing all headers...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = \"*\";\n }\n }\n else {\n logger.debug(\"No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors\");\n }\n }\n head(formData) {\n this.done();\n }\n get(formData) {\n logger.debug(`[BackendMicroservice.get] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n post(formData) {\n this.done();\n }\n put(formData) {\n this.done();\n }\n delete(formData) {\n this.done();\n }\n connect(formData) {\n this.done();\n }\n options(formData) {\n this.done();\n }\n trace(formData) {\n this.done();\n }\n patch(formData) {\n this.done();\n }\n finishWithBody(stream) {\n try {\n logger.debug(\"[BackendMicroservice.finishWithBody] Ending the stream...\");\n logger.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`);\n if (typeof this.body !== \"string\") {\n this.body = _DataStringify(this.body);\n }\n logger.debug(`[BackendMicroservice.finishWithBody] \\n body: ${this.body} `);\n stream.write(this.body);\n stream.end();\n logger.debug(`[BackendMicroservice.finishWithBody] Stream ended.`);\n }\n catch (e) {\n logger.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${e}`);\n }\n }\n done() {\n logger.debug(`[BackendMicroservice.done] Finalizing the response...`);\n var microservice = this;\n var stream = microservice.stream;\n try {\n logger.debug(`[BackendMicroservice.done] Sending response headers...`);\n if (microservice.route.responseHeaders) {\n logger.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(microservice.route.responseHeaders)}`);\n stream.respond(microservice.route.responseHeaders);\n }\n else {\n throw Error(`[BackendMicroservice.done] No headers present.`);\n }\n }\n catch (e) {\n logger.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${e}`);\n }\n if (microservice.body !== null) {\n try {\n logger.debug(`[BackendMicroservice.done] A body of message is present. Finalizing the response...`);\n microservice.finishWithBody.call(microservice, stream);\n }\n catch (e) {\n logger.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${e}`);\n }\n }\n else {\n logger.debug(\"[BackendMicroservice.done] No body present. Ending stream...\");\n stream.end();\n }\n }\n }\n ]);\n }\n Class(\"SourceJS\", Object, {\n domain: _domain_,\n basePath: _basePath_,\n body: _DOMCreateElement(\"script\"),\n type: \"text/javascript\",\n containerTag: \"body\",\n url: \"\",\n data: {},\n async: false,\n external: false,\n set(name, value) {\n this[name] = value;\n },\n get(name) {\n return this[name];\n },\n status: false,\n done() { },\n fail() { },\n rebuild() {\n var context = this;\n try {\n document.getElementsByTagName(context.containerTag)[0].appendChild((function (s, url, context) {\n s.type = context.type;\n s.src = url;\n s.crossOrigin = (Object.hasOwnProperty.call(context, \"crossOrigin\")) ? (context.crossOrigin) : (\"anonymous\");\n s.async = context.async;\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = function (e) {\n context.status = true;\n context.done.call(context, e);\n };\n s.onerror = function (e) {\n context.status = false;\n context.fail.call(context, e);\n };\n context.body = s;\n return s;\n }).call(this, _DOMCreateElement(\"script\"), (this.external) ? (this.url) : (this.basePath + this.url), context));\n }\n catch (e) {\n context.status = false;\n context.fail.call(context, e);\n }\n },\n Cast(o) {\n return _Cast(this, o);\n },\n _new_(properties) {\n this.__new__(properties);\n this.rebuild();\n }\n });\n Class(\"SourceCSS\", Object, {\n domain: _domain_,\n basePath: _basePath_,\n body: _DOMCreateElement(\"link\"),\n url: \"\",\n data: {},\n async: false,\n external: false,\n set(name, value) {\n this[name] = value;\n },\n get(name) {\n return this[name];\n },\n done() { },\n rebuild() {\n var context = this;\n if (isBrowser) {\n window.document.getElementsByTagName(\"head\")[0].appendChild((function (s, url, context) {\n s.type = \"text/css\";\n s.rel = \"stylesheet\";\n s.href = url;\n s.crossOrigin = \"anonymous\";\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = context.done;\n context.body = s;\n return s;\n }).call(this, _DOMCreateElement(\"link\"), (this.external) ? (this.url) : (this.basePath + this.url), context));\n }\n },\n Cast(o) {\n return _Cast(this, o);\n },\n _new_(properties) {\n this.__new__(properties);\n this.rebuild();\n }\n });\n /**\n * Array math functions\n */\n var __to_number = function (value) {\n return (isNaN(value)) ? (new Number(0)) : (new Number(value));\n };\n Array.prototype.unique = function () {\n return this.filter(function (value, index, self) {\n return self.indexOf(value) === index;\n });\n };\n Array.unique = function (a) {\n return a.unique();\n };\n (_protected_code_)(Array.unique);\n (_protected_code_)(Array.prototype.unique);\n Array.prototype.table = function () {\n console.table(this);\n };\n Array.table = function (a) {\n return a.table();\n };\n (_protected_code_)(Array.table);\n (_protected_code_)(Array.prototype.table);\n Array.prototype.sum = function () {\n return this.reduce(function (prev, current) {\n return __to_number(prev) + __to_number(current);\n }, 0);\n };\n Array.sum = function (a) {\n return a.sum();\n };\n (_protected_code_)(Array.sum);\n (_protected_code_)(Array.prototype.sum);\n Array.prototype.avg = function () {\n return (this.length < 1) ? (0) : (this.reduce(function (prev, current) {\n return ((__to_number(prev) + __to_number(current)) / 2);\n }));\n };\n Array.avg = function (a) {\n return a.avg();\n };\n (_protected_code_)(Array.avg);\n (_protected_code_)(Array.prototype.avg);\n Array.prototype.min = function () {\n return this.reduce(function (prev, current) {\n return (__to_number(prev) <= __to_number(current)) ? (prev) : (current);\n }, Infinity);\n };\n Array.min = function (a) {\n return a.min();\n };\n (_protected_code_)(Array.min);\n (_protected_code_)(Array.prototype.min);\n Array.prototype.max = function () {\n return this.reduce(function (prev, current) {\n return (__to_number(prev) >= __to_number(current)) ? (prev) : (current);\n }, 0);\n };\n Array.max = function (a) {\n return a.max();\n };\n (_protected_code_)(Array.max);\n (_protected_code_)(Array.prototype.max);\n Array.prototype.sortBy = function (propName, sortAsc = true) {\n var sort_function = (sortAsc) ? (function (prev, current) {\n return current[propName] < prev[propName] ? 1 : -1;\n }) : (function (prev, current) {\n return current[propName] > prev[propName] ? 1 : -1;\n });\n return this.sort(sort_function);\n };\n Array.sortBy = function (a, propName, sortAsc = true) {\n return a.sortBy(propName, sortAsc);\n };\n (_protected_code_)(Array.sortBy);\n (_protected_code_)(Array.prototype.sortBy);\n Array.matrix = function (_length, _fillValue = 0) {\n var x_func = function (x) {\n return _fillValue;\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n (_protected_code_)(Array.matrix);\n Array.matrix2d = function (_length, _fillValue = 0) {\n var y_func = function (y) {\n return _fillValue;\n };\n var x_func = function (x) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n (_protected_code_)(Array.matrix2d);\n Array.matrix3d = function (_length, _fillValue = 0) {\n var y_func = function (y) {\n return Array.from({\n length: _length\n }, function () {\n return _fillValue;\n });\n };\n var x_func = function (x) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n (_protected_code_)(Array.matrix3d);\n _top.range = function (start, stop = 0, step = 1) {\n if (stop === 0 || typeof stop === \"undefined\") {\n stop = start;\n start = 0;\n }\n return Array.from({\n length: (stop - start) / step + 1\n }, function (_, i) {\n return start + (i * step);\n });\n };\n (_protected_code_)(_top.range);\n String.prototype.list = function () {\n var __instance = this;\n return _top.range(0, __instance.length - 1).map(function (i) {\n return __instance[i];\n });\n };\n (_protected_code_)(String.prototype.list);\n _top.getDocumentLayout = function () {\n var h = (w, h) => {\n return w > h ? \"landscape\" : null;\n };\n var v = (w, h) => {\n return h > w ? \"portrait\" : null;\n };\n var square = (w, h) => {\n return w === h ? \"square\" : null;\n };\n return [\n h(document.documentElement.clientWidth, document.documentElement.clientHeight),\n v(document.documentElement.clientWidth, document.documentElement.clientHeight),\n square(document.documentElement.clientWidth, document.documentElement.clientHeight)\n ].filter(e => e !== null).pop();\n };\n /**\n * End of array math functions\n */\n Class(\"ArrayList\", Array, []);\n ClassFactory(\"ArrayList\").matrix = Array.matrix;\n ClassFactory(\"ArrayList\").matrix2d = Array.matrix2d;\n ClassFactory(\"ArrayList\").matrix3d = Array.matrix3d;\n (_protected_code_)(ClassFactory(\"ArrayList\").matrix);\n (_protected_code_)(ClassFactory(\"ArrayList\").matrix2d);\n (_protected_code_)(ClassFactory(\"ArrayList\").matrix3d);\n Class(\"ArrayCollection\", Object, {\n source: New(ClassFactory(\"ArrayList\"), []),\n changed(prop, value) {\n logger.debug(\"VALUE CHANGED\");\n logger.debug(prop);\n logger.debug(value);\n },\n push(value) {\n var self = this;\n logger.debug(\"VALUE ADDED\");\n logger.debug(value);\n self.source.push(value);\n },\n pop(value) {\n var self = this;\n logger.debug(\"VALUE POPPED\");\n logger.debug(value);\n self.source.pop(value);\n },\n _new_(source) {\n var self = this;\n var _index = 0;\n self.source = New(ClassFactory(\"ArrayList\"), source);\n for (var _k in self.source) {\n if (!isNaN(_k)) {\n logger.debug(\"binding \" + _k.toString());\n (function (_pname) {\n Object.defineProperty(self, _pname, {\n set(value) {\n logger.debug(\"setting \" + _pname + \"=\" + value);\n self.source[_pname] = value;\n self.changed(_pname, value);\n },\n get() {\n return self.source[_pname];\n }\n });\n })(_k);\n _index++;\n }\n }\n self.source.length = _index;\n Object.defineProperty(self, \"length\", {\n get() {\n return self.source.length;\n }\n });\n }\n });\n Package(\"com.qcobjects.effects.base\", [\n class Effect extends ClassFactory(\"InheritClass\") {\n duration = 1000;\n constructor() {\n super(...arguments);\n }\n animate({ timing, draw, duration }) {\n let start = performance.now();\n requestAnimationFrame(function animate(time) {\n // timeFraction goes from 0 to 1\n let timeFraction = (time - start) / duration;\n if (timeFraction > 1)\n timeFraction = 1;\n // calculate the current animation state\n let progress = timing(timeFraction);\n draw(Math.round(progress * 100)); // draw it\n if (timeFraction < 1) {\n requestAnimationFrame(animate);\n }\n else {\n // if this is an object with a done method\n if (typeof this !== \"undefined\" &&\n this !== null &&\n Object.hasOwnProperty.call(this, \"done\") &&\n (typeof this.done).toLowerCase() === \"function\") {\n this.done.call(this);\n }\n }\n });\n }\n }\n ]);\n Package(\"com.qcobjects.effects.transitions.base\", [\n class TransitionEffect extends ClassFactory(\"Effect\") {\n duration = 385;\n defaultParams = {\n alphaFrom: 0,\n alphaTo: 1,\n angleFrom: 180,\n angleTo: 0,\n radiusFrom: 0,\n radiusTo: 30,\n scaleFrom: 0,\n scaleTo: 1\n };\n fitToHeight = false;\n fitToWidth = false;\n effects = [];\n constructor() {\n super(...arguments);\n logger.info(\"DECLARING TransitionEffect \");\n this.component.defaultParams = this.defaultParams;\n }\n apply({ alphaFrom, alphaTo, angleFrom, angleTo, radiusFrom, radiusTo, scaleFrom, scaleTo }) {\n var _transition_ = this;\n logger.info(\"EXECUTING TransitionEffect \");\n var componentRoot = (_transition_.component.shadowed) ? (_transition_.component.shadowRoot.host) : (_transition_.component.body);\n if (_transition_.fitToHeight) {\n componentRoot.height = (typeof componentRoot.offsetParent === \"object\" && componentRoot.offsetParent !== null) ? (componentRoot.offsetParent.scrollHeight) : (componentRoot.getBoundingClientRect().height);\n }\n if (_transition_.fitToWidth) {\n componentRoot.width = (typeof componentRoot.offsetParent === \"object\" && componentRoot.offsetParent !== null) ? (componentRoot.offsetParent.scrollWidth) : (componentRoot.getBoundingClientRect().width);\n }\n componentRoot.style.display = \"block\";\n _transition_.effects.map(function (effectClassName, eff) {\n var __effectClass__ = ClassFactory(effectClassName);\n var effectObj = new __effectClass__({});\n var effectClassMethod = effectObj.apply;\n var args = [componentRoot].concat(Object.values({\n alphaFrom,\n alphaTo,\n angleFrom,\n angleTo,\n radiusFrom,\n radiusTo,\n scaleFrom,\n scaleTo\n }));\n effectClassMethod.apply(_transition_, args);\n });\n }\n }\n ]);\n Package(\"com.qcobjects.timing\", [\n class Timer extends ClassFactory(\"InheritClass\") {\n constructor() {\n super(...arguments);\n }\n duration = 1000;\n alive = true;\n thread({ timing, intervalInterceptor, duration }) {\n var timer = this;\n let start = performance.now();\n requestAnimationFrame(function thread(time) {\n // timeFraction goes from 0 to 1\n let elapsed = (time - start);\n let timeFraction = elapsed / duration;\n if (timeFraction > 1)\n timeFraction = 1;\n // calculate the current progress state\n let progress = timing(timeFraction, elapsed);\n intervalInterceptor(Math.round(progress * 100)); // draw it\n if ((timeFraction < 1 || duration === -1) && timer.alive) {\n requestAnimationFrame(thread);\n }\n });\n }\n }\n ]);\n Package(\"com.qcobjects.tools.essentials\", [\n class Toggle extends ClassFactory(\"InheritClass\") {\n _toggle = false;\n _inverse = true;\n _positive = null;\n _negative = null;\n _dispatched = null;\n _args = {};\n constructor() {\n super(...arguments);\n this._new_(...arguments);\n }\n changeToggle() {\n this._toggle = (this._toggle) ? (false) : (true);\n }\n _new_({ positive, negative, args }) {\n this._positive = positive;\n this._negative = negative;\n this._args = args;\n }\n fire() {\n var toggle = this;\n var _promise = new Promise(function (resolve, reject) {\n if (typeof toggle._positive === \"function\" && typeof toggle._negative === \"function\") {\n if (toggle._inverse) {\n toggle._dispatched = (toggle._toggle) ? (toggle._negative.bind(toggle)) : (toggle._positive.bind(toggle));\n }\n else {\n toggle._dispatched = (toggle._toggle) ? (toggle._positive.bind(toggle)) : (toggle._negative.bind(toggle));\n }\n toggle._dispatched.call(toggle, toggle._args);\n resolve.call(_promise, toggle);\n }\n else {\n logger.debug(\"Toggle functions are not declared\");\n reject.call(_promise, toggle);\n }\n }).then(function (toggle) {\n toggle.changeToggle();\n }).catch(function (e) {\n logger.debug(e.toString());\n });\n return _promise;\n }\n }\n ]);\n // Set Processors\n (function (_top) {\n let mapper = function (componentInstance, componentName, valueName) {\n /*\n * Mapper processor\n * @usage\n * $mapper(,)\n *\n * Where componentName is the name of the component (same value as in attribute tag name) without quotes\n * and valueName is the name of the variable that contains the value to map, it can be either a property of\n * the component instance, the data object or a global value\n */\n var self = this;\n if (typeof componentInstance === \"undefined\" || componentInstance === null) {\n throw Error(`mapper.${componentName}.${valueName} does not have a component instance or it is null.`);\n }\n let globalValue = _top.global.get(valueName);\n let componentValue = componentInstance.get(valueName);\n let dataValue = componentInstance.data[valueName];\n let list = (typeof dataValue !== \"undefined\") ? (dataValue) : ((typeof componentValue !== \"undefined\") ? (componentValue) : (globalValue));\n let listItems = \"\";\n if (typeof list !== \"undefined\" && typeof list[\"map\"] !== \"undefined\") {\n listItems = list.map(function (element) {\n let dataItems = [...Object.keys(element)].map(k => ` data-${k}=\"${(typeof element[k] !== \"undefined\" && element[k] !== null) ? (element[k].toString()) : (\"\")}\"`).join(\"\");\n return ``;\n }).join(\"\");\n }\n else {\n logger.debug(`${componentName}.${valueName} does not have a map property`);\n }\n return listItems;\n };\n Processor.setProcessor(mapper);\n let layout = function (componentInstance, layoutname, cssfile) {\n /*\n * Layout processor\n * @usage\n * $layout(, )\n * Where layoutname can be \"portrait\" or \"landscape\" without quotes\n * cssfile is the uri for the css file to import\n */\n var layout_portrait = `\n /* CSS Document for Mobile Imports */\n @import url(\"${cssfile}\") (orientation:portrait);\n @import url(\"${cssfile}\") (max-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 9/16);\n @import url(\"${cssfile}\") (aspect-ratio: 10/16);\n @import url(\"${cssfile}\") (aspect-ratio: 5/8);\n @import url(\"${cssfile}\") (aspect-ratio: 3/4);\n @import url(\"${cssfile}\") (aspect-ratio: 2/3);\n `;\n var layout_landscape = `\n @import url(\"${cssfile}\") (orientation:landscape) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/9) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/10) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 8/5) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 4/3) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 3/2) and (min-width:460px);\n `;\n var layout_code = {\n \"landscape\": layout_landscape,\n \"portrait\": layout_portrait\n };\n return (Object.hasOwnProperty.call(layout_code, layoutname)) ? (layout_code[layoutname]) : (\"\");\n };\n Processor.setProcessor(layout);\n let component = function () {\n /*\n * component processor\n * @usage\n * $component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n let arg = [...arguments].slice(1).map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n let attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a]}`;\n }).join(\" \");\n return ``;\n };\n Processor.setProcessor(component);\n let quick_component = function () {\n /*\n * component processor\n * @usage\n * $quick_component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n let arg = [...arguments].slice(1).map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n let attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a]}`;\n }).join(\" \");\n return ``;\n };\n Processor.setProcessor(quick_component);\n let repeat = function (componentInstance, length, text) {\n /*\n * Repeat processor\n * @usage\n * $repeat(, )\n * Where length is the number of occurrences of text\n */\n return _top.range(length).map(function (index) {\n return text.replace(\"{{index}}\", index.toString());\n }).join(\"\");\n };\n Processor.setProcessor(repeat);\n })(_top);\n /**\n * Load every component tag declared in the body\n **/\n Ready(function () {\n if (!_top.CONFIG.get(\"useSDK\")) {\n _top.__start__();\n }\n });\n /*\n Public variables and functions\n */\n Export(Export); /* exports the same Export function once */\n Export(Import);\n Export(Package);\n Export(Class);\n Export(New);\n Export(Tag);\n Export(Ready);\n Export(ready);\n Export(isBrowser);\n Export(_methods_);\n (function (_top) {\n Package(\"com.qcobjects\", [\n class GlobalSettings extends ClassFactory(\"InheritClass\") {\n _GLOBAL = {};\n __definition = {};\n __classType = \"GlobalSettings\";\n constructor() {\n super(...arguments);\n this.set = GlobalSettings.set.bind(this);\n this.get = GlobalSettings.get.bind(this);\n this.__start__ = GlobalSettings.__start__.bind(this);\n }\n static set(name, value) {\n this._GLOBAL[name] = value;\n }\n static get(name, _default) {\n var _value;\n if (typeof this._GLOBAL[name] !== \"undefined\") {\n _value = this._GLOBAL[name];\n }\n else if (typeof _default !== \"undefined\") {\n _value = _default;\n }\n return _value;\n }\n static __start__() {\n var __load__serviceWorker = function () {\n var _promise;\n if (isBrowser) {\n _promise = new Promise(function (resolve, reject) {\n if ((\"serviceWorker\" in navigator) &&\n (typeof _top.CONFIG.get(\"serviceWorkerURI\") !== \"undefined\")) {\n _top.CONFIG.set(\"serviceWorkerScope\", _top.CONFIG.get(\"serviceWorkerScope\") ? (_top.CONFIG.get(\"serviceWorkerScope\")) : (\"/\"));\n navigator.serviceWorker.register(_top.CONFIG.get(\"serviceWorkerURI\"), {\n scope: _top.CONFIG.get(\"serviceWorkerScope\")\n })\n .then(function (registration) {\n logger.debug(\"Service Worker Registered\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error registering Service Worker\");\n reject.call(_promise, registration);\n });\n navigator.serviceWorker.ready.then(function (registration) {\n logger.debug(\"Service Worker Ready\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error loading Service Worker\");\n reject.call(_promise, registration);\n });\n }\n });\n }\n return _promise;\n };\n var _buildComponents = function () {\n return new Promise((resolve, reject) => {\n if (isBrowser) {\n logger.debug(\"Starting to building components\");\n try {\n _top.componentsStack = document.buildComponents.call(document);\n }\n catch (e) {\n throw Error(`Something went wrong trying to start components tree: ${e.message}`);\n }\n logger.debug(\"Initializing the service worker\");\n __load__serviceWorker.call(_top)\n .catch(function (e) {\n logger.debug(`error loading the service worker ${e}`);\n });\n }\n resolve();\n });\n };\n logger.debug(\"Starting to load the config settings...\");\n if (_top.CONFIG.get(\"useConfigService\", false)) {\n logger.debug(\"Loading settings using local configuration file...\");\n _top.global.configService = New(ClassFactory(\"ConfigService\"));\n _top.global.configService.configLoaded = _buildComponents;\n serviceLoader(_top.global.configService);\n }\n else {\n logger.debug(\"Starting to load the components...\");\n _buildComponents.call(this);\n }\n }\n }\n ]);\n Export(ClassFactory(\"GlobalSettings\"));\n global = New(ClassFactory(\"GlobalSettings\"));\n _top = _CastProps(global, _top);\n Object.defineProperty(_top, \"PackagesNameList\", {\n set(val) {\n logger.debug(\"PackagesNameList is readonly\");\n return;\n },\n get() {\n var _get_packages_names = function (_packages) {\n var _keys = [];\n for (var _k in _packages) {\n if (typeof _packages[_k] !== \"undefined\" &&\n typeof _packages[_k] !== \"function\" &&\n Object.hasOwnProperty.call(_packages[_k], \"length\") &&\n _packages[_k].length > 0) {\n _keys.push(_k);\n _keys = _keys.concat(_get_packages_names(_packages[_k]));\n }\n }\n return _keys;\n };\n return _get_packages_names(_QC_PACKAGES);\n }\n });\n Object.defineProperty(_top, \"PackagesList\", {\n set(value) {\n logger.debug(\"PackagesList is readonly\");\n return;\n },\n get() {\n return _top.PackagesNameList.map(function (packagename) {\n let _classesList = Package(packagename);\n let _ret_;\n if (_classesList) {\n _ret_ = {\n packageName: packagename,\n classesList: _classesList.filter(function (_packageClass) {\n return isQCObjects_Class(_packageClass);\n })\n };\n }\n return _ret_;\n }).filter(function (_p) {\n return typeof _p !== \"undefined\";\n });\n }\n });\n Object.defineProperty(_top, \"ClassesList\", {\n set(value) {\n logger.debug(\"ClassesList is readonly\");\n return;\n },\n get() {\n var _classesList = [];\n _top.PackagesList.map(function (_package_element) {\n _classesList = _classesList.concat(_package_element.classesList.map(function (_class_element) {\n return {\n packageName: _package_element.packageName,\n className: _package_element.packageName + \".\" + _class_element.__definition.__classType,\n classFactory: _class_element\n };\n }));\n return _package_element;\n });\n return _classesList;\n }\n });\n Object.defineProperty(_top, \"ClassesNameList\", {\n set(value) {\n logger.debug(\"ClassesNameList is readonly\");\n return;\n },\n get() {\n return _top.ClassesList.map(function (_class_element) {\n return _class_element.className;\n });\n }\n });\n if (isBrowser) {\n // use of GLOBAL word is deprecated in node.js\n // this is only for compatibility purpose with old versions of QCObjects in browsers\n Class(\"GLOBAL\", _QC_CLASSES[\"global\"]); // case insensitive for compatibility con old versions;\n Export(ClassFactory(\"GLOBAL\"));\n }\n Export(global);\n if (_top.CONFIG.get(\"useSDK\")) {\n (function (_top) {\n var remoteImportsPath = _top.CONFIG.get(\"remoteImportsPath\");\n var external = (!_top.CONFIG.get(\"useLocalSDK\")) ? (true) : (false);\n _top.CONFIG.set(\"remoteImportsPath\", _top.CONFIG.get(\"remoteSDKPath\"));\n var tryImportingSDK = false;\n var sdkName = \"QCObjects-SDK\";\n if (isBrowser) {\n tryImportingSDK = true;\n }\n else {\n var sdkPath = findPackageNodePath(\"qcobjects-sdk\");\n if (sdkPath !== null) {\n sdkName = \"qcobjects-sdk\";\n tryImportingSDK = true;\n }\n else {\n sdkName = \"node_modules/qcobjects-sdk/QCObjects-SDK\";\n tryImportingSDK = true;\n }\n }\n if (tryImportingSDK) {\n logger.info(\"Importing SDK... \" + sdkName);\n if (isNodeCommonJS && typeof require !== \"undefined\") {\n let sdk = require(\"qcobjects-sdk\");\n }\n else {\n Import(sdkName, function () {\n if (external) {\n logger.debug(\"QCObjects-SDK.js loaded from remote location\");\n }\n else {\n logger.debug(\"QCObjects-SDK.js loaded from local\");\n }\n _top.CONFIG.set(\"remoteImportsPath\", remoteImportsPath);\n }, external);\n }\n }\n else {\n logger.debug(\"SDK has not been imported as it is not available at the moment\");\n }\n })(_top);\n }\n })(_top);\n if (isBrowser) {\n asyncLoad(function () {\n Ready(function () {\n /*\n * scroll management custom events\n * usage: document.addEventListener('percentY90',function(e){console.log(e.detail.percentY)});\n * possible events: scrollpercent, defaultscroll, percentY0, percentY25, percentY50, percentY75, percentY90\n */\n (function (_top) {\n let lastKnownScrollPosition = 0;\n let ticking = false;\n let scrollHeight = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight);\n let scrollWidth = Math.max(document.body.scrollWidth, document.documentElement.scrollWidth, document.body.offsetWidth, document.documentElement.offsetWidth, document.body.clientWidth, document.documentElement.clientWidth);\n function scrollDispatcher(event) {\n var percentY = Math.round(_top.scrollY * 100 / scrollHeight);\n var percentX = Math.round(_top.scrollX * 100 / scrollWidth);\n var scrollPercentEventEvent = new CustomEvent(\"scrollpercent\", {\n detail: {\n percentX: percentX,\n percentY: percentY\n }\n });\n event.target.dispatchEvent(scrollPercentEventEvent);\n var secondaryEventName = \"defaultscroll\";\n var __valid_scrolls__ = [0, 5, 10, 25, 50, 75, 90, 95, 100];\n __valid_scrolls__.filter(function (p) {\n return p === percentY;\n }).map(function (pY) {\n secondaryEventName = \"percentY\" + percentY.toString();\n var secondaryCustomEvent = new CustomEvent(secondaryEventName, {\n detail: {\n percentX: percentX,\n percentY: percentY\n }\n });\n event.target.dispatchEvent(secondaryCustomEvent);\n });\n }\n document.addEventListener(\"scroll\", function (event) {\n if (!ticking) {\n requestAnimationFrame(function () {\n scrollDispatcher(event);\n ticking = false;\n });\n ticking = true;\n }\n });\n })(_top);\n });\n }, null);\n }\n if (!isBrowser) {\n if (typeof _top.global !== \"undefined\" && Object.hasOwnProperty.call(_top.global, \"_fireAsyncLoad\")) {\n _top.global._fireAsyncLoad.call(this);\n }\n if (typeof _top.global !== \"undefined\" && Object.hasOwnProperty.call(_top.global, \"onload\")) {\n _top.global.onload.call(this);\n }\n }\n /* Freezing Object && Object.prototype to prevent prototype pollution risks */\n (function (isBrowser) {\n var __freeze__ = function () {\n Object.freeze(Object.prototype);\n Object.freeze(Object);\n };\n if (isBrowser && _top.CONFIG.get(\"secureObjects\", false)) {\n Ready(function () {\n __freeze__();\n });\n }\n else if (_top.CONFIG.get(\"secureObjects\", false)) {\n __freeze__();\n }\n })(isBrowser);\n }\n module.exports = _top;\n}).call(null, (typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({}))));\n"], + "mappings": "slCAAAA,GAAAC,EAAA,CAAAC,EAAAC,IAAA,CAwBCC,EAAAA,EAAA,SAASC,EAAmBC,EAAM,CACjC,aACA,GAAI,OAAO,OAAO,eAAmB,KAAe,OAAOA,EAAS,IAClE,GAAI,CACF,OAAO,eAAeA,EAAK,oBAAqB,CAC9C,WAAY,GACZ,aAAc,GACd,SAAU,GACV,MAAOD,CACT,CAAC,CACH,MAAA,CACM,OAAOC,EAAK,kBAAsB,MACpCA,EAAK,kBAAkB,WAAa,GAExC,CAGF,GAAI,OAAOA,EAAK,kBAAkB,WAAe,IAAY,CAE3D,GADAA,EAAK,kBAAkB,WA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I", + "names": ["require_QCObjects_SDK", "__commonJSMin", "exports", "module", "__name", "__qcobjects_sdk__", "_top", "global", "isBrowser", "isNodeCommonJS", "remoteImportsPath", "relativeImportPath", "external", "elementName", "_ret_", "_imports_", "_relative_path_", "__start__", "require_src", "sdk", "zt", "require_QCObjects", "__qcobjects__", "Ready", "e", "_QC_READY_LISTENERS", "isDeno", "deno_require", "_require_", "__require", "_protected_code_", "_", "__oldtoString", "_protected_symbols", "_methods_", "_m", "i", "regex", "matches", "match", "_DOMCreateElement", "fs", "_DataStringify", "data", "getCircularReplacer", "seen", "_level", "key", "value", "_LegacyCopy", "_subelements", "selector", "_domain_", "_basePath_", "_tag_filter_", "_basePath", "baseURI", "process", "_f", "_p", "response", "message", "_secretKey", "__secretKey", "is_phonegap", "asyncLoad", "callback", "args", "asyncCallback", "_fireAsyncLoad", "fc", "Logger", "color", "logger", "Base64", "t", "n", "r", "s", "o", "u", "a", "f", "c1", "c2", "c3", "waitUntil", "func", "exp", "_waitUntil", "maxWaitCycles", "_w", "_t", "localStorage", "name", "ComplexStorageCache", "params", "object", "load", "alternate", "cachedObjectID", "cachedResponse", "cachedNewResponse", "alternateResponse", "retrievedObject", "k", "c", "supportsPassive", "opts", "captureFalse", "tag", "_oo", "_tags", "_tt", "_Cast", "__instanceID", "_Object_Create", "hasOwn", "O", "QCObjects", "obj", "Properties", "prop", "target", "varArgs", "to", "index", "nextSource", "nextKey", "__is_raw_class__", "o_c", "_value_", "_QC_CLASSES", "_QC_PACKAGES", "_QC_PACKAGES_IMPORTED", "ObjectName", "ret", "obj_source", "obj_dest", "v", "_CastProps", "__is__forbidden_name__", "__getType__", "is_a", "typeName", "isQCObjects_Class", "isQCObjects_Object", "__make_global__", "__register_class__", "_class_", "__namespace", "RegisterClass", "Class", "_types_", "type", "definition", "_o_", "__publicField", "self", "m", "__class__", "__classType", "__hierarchy__proto__", "__hierarchy", "_css", "__instance__", "child", "tags", "j", "ClassFactory", "className", "_classFactory", "packageName", "_className", "_package", "Package", "packageClasses", "classFactory", "content", "_self", "_appendVDOM", "doc", "element", "_super_", "classMethodName", "New", "Export", "findPackageNodePath", "packagename", "sdkPath", "sdkPaths", "p", "string", "result", "char", "keychar", "crypt", "_CryptObject", "_DecryptObject", "shortCode", "length", "code1", "code2", "o1", "uniqueId", "_Processor", "_proc_", "component", "processorName", "processorHandler", "template", "funcName", "procesorMatch", "match0", "_k", "Processor", "arg", "_ConfigSettings", "_config_settings", "ConfigSettings", "_conf", "config", "_protectedEnc", "_protectedConf", "_default", "_value", "namespace", "classes", "_c1", "NamespaceRef", "b", "Import", "ready", "_promise_import_", "resolve", "reject", "allPackagesImported", "cp", "readyImported", "_imported_", "s1", "standardNodePath", "packageAbsoluteName", "jsNodePath", "_o", "effectArguments", "effectClass", "Tag", "tagname", "innerHTML", "addedKeys", "_i", "_Ready", "_execReady", "_ready_listener_", "_r", "DDO", "instance", "fget", "fset", "ddoInstance", "val", "is_ddo", "DefaultTemplateHandler", "templateInstance", "parsedAssignmentText", "__routing_params__", "routing", "routingPath", "standardRoutingPath", "__valid_routings__", "routings", "__valid_routing_way__", "validRoutingWays", "routingWay", "_buildComponentFromElement_", "__parent__", "__shadowed_not_set", "__tplsource_attr_not_set", "shadowed", "__cached_not_set", "cached", "tplextension", "_componentName", "_componentClassName", "__componentClassName", "__classDefinition", "__tplsource_prop_set", "tplsource", "componentURI", "ComponentURI", "__create_component_instance_", "__shadowed", "__definition", "newComponent", "_buildComponentsFromElements_", "elements", "componentsBuiltWith", "templateURI", "url", "method", "reload", "_body", "__promise__", "__shadowRoot", "body", "shadowRoot", "splashScreenComponent", "controller", "view", "serviceResponse", "standardResponse", "__routing_path__", "accumulator", "colData", "__serviceClass", "_serviceClassName", "__enable_service_class__", "_response_to_data_", "_response_to_template_", "serviceInstance", "serviceLoader", "request", "service", "rejectedResponse", "_component_", "_Controller", "controllerName", "effectClassName", "applyEffectTo", "viewName", "_View", "componentDone", "tagFilter", "elementList", "rebuildObjects", "error", "_feedComponent_InBrowser", "container", "tmp_shadowContainer", "shadowContainer", "qs", "_feedComponent_InNode", "_component", "_promise", "componentLoader", "oClass", "componentClass", "_route_promise_", "isValidInstance", "__route__", "componentList", "_componentNames_", "_promises_", "rc", "_promise_", "_rc_", "err", "elem", "componentBody", "routingNode", "attributeNames", "attributeName", "_parsedAssignmentText", "templateHandlerName", "templateHandlerClass", "selfData", "_componentRoot", "_imgLazyLoaded", "_lazyLoadImages", "image", "observer", "items", "item", "img", "_Effect", "_applyEffect_", "lang1", "lang2", "i18n", "callback_i18n", "messages", "_innerHTML", "componentHelper", "__component_helpers__", "_component_helper_", "__c__", "popStateEvent", "dependencies", "attrName", "subelementSelector", "handler", "param", "_async", "_componentLoaderInBrowser", "_feedComponent_", "xhr", "_componentLoaded", "successStatus", "is_file", "cache", "text", "_directLoad", "cacheController", "_componentLoaderInNode", "responseText", "_serviceLoaderInBrowser", "xhrasync", "header", "_serviceLoaderInNode", "URL", "serviceURL", "req", "captureEvents", "dataXML", "client", "buffer", "responseHeaders", "flags", "chunk", "requestOptions", "http2", "http", "https", "_req_", "_serviceLoaderMockup", "_serviceLoaderLocal", "d", "_ComponentWidget_", "componentWidget", "componentName", "__enabled__atributes__", "data_attributenames", "_attribute_name_", "RegisterWidget", "widgetName", "RegisterWidgets", "widgetList", "domain", "basePath", "stream", "microservice", "requestMethod", "supportedMethods", "allow_origins", "allow_credentials", "allow_methods", "allow_headers", "formData", "context", "properties", "__to_number", "prev", "current", "propName", "sortAsc", "sort_function", "_length", "_fillValue", "x_func", "x", "y_func", "y", "start", "stop", "step", "__instance", "h", "w", "square", "source", "_index", "_pname", "timing", "draw", "duration", "animate", "time", "timeFraction", "progress", "alphaFrom", "alphaTo", "angleFrom", "angleTo", "radiusFrom", "radiusTo", "scaleFrom", "scaleTo", "_transition_", "componentRoot", "eff", "__effectClass__", "effectObj", "effectClassMethod", "intervalInterceptor", "timer", "thread", "elapsed", "positive", "negative", "toggle", "mapper", "componentInstance", "valueName", "globalValue", "componentValue", "dataValue", "list", "listItems", "dataItems", "layout", "layoutname", "cssfile", "layout_portrait", "layout_landscape", "layout_code", "k1", "k2", "quick_component", "repeat", "GlobalSettings", "__load__serviceWorker", "registration", "_buildComponents", "_get_packages_names", "_packages", "_keys", "_classesList", "_packageClass", "_package_element", "_class_element", "tryImportingSDK", "sdkName", "Xt", "lastKnownScrollPosition", "ticking", "scrollHeight", "scrollWidth", "scrollDispatcher", "event", "percentY", "percentX", "scrollPercentEventEvent", "secondaryEventName", "__valid_scrolls__", "pY", "secondaryCustomEvent", "__freeze__", "Zt", "require_org_qcobjects_i18n_messages", "qcobjects_1", "J", "i18n_messages", "i18n_packagename", "require_org_qcobjects_models", "require_org_qcobjects_effects", "Fade", "da", "alpha", "Move", "xfrom", "yfrom", "xto", "yto", "dx", "dy", "MoveXInFromRight", "MoveXInFromLeft", "MoveYInFromBottom", "MoveYInFromTop", "RotateX", "angle", "RotateY", "RotateZ", "Rotate", "Radius", "dr", "radius", "Resize", "ds", "scale", "WipeLeft", "WipeRight", "WipeUp", "WipeDown", "ModalFade", "ModalMoveDown", "ModalMoveUp", "require_org_qcobjects_components", "org_qcobjects_effects_1", "Re", "FormField", "_objList", "_datak", "_obj", "_datamodel", "ShadowedComponent", "ButtonField", "InputField", "TextField", "EmailField", "ModalEnclosureComponent", "ModalComponent", "submodal", "modalId", "modal", "modalcontent", "closebtn", "SwaggerUIComponent", "require_org_qcobjects_components_grid", "GridItemComponent", "GridComponent", "subcomponentClass", "require_org_qcobjects_components_list", "ListItemComponent", "ListComponent", "require_org_qcobjects_components_slider", "require_org_qcobjects_components_notifications", "NotificationComponent", "_display_", "appearEffect", "disappearEffect", "require_org_qcobjects_components_splashscreen", "SplashScreenComponent", "isStartURL", "_enabled_", "_helper_", "mainComponent", "SplashScreenHandler", "mainElement", "slotlogo", "VideoSplashScreenComponent", "CubeSplashScreenComponent", "require_org_qcobjects_controllers", "require_org_qcobjects_controllers_grid", "templateRows", "templateCols", "page", "totalPage", "totalElements", "offset", "limit", "pagesNumber", "paginateIn", "record", "dataIndex", "subcomponent", "serviceClass", "serverDataCount", "successfulResponse", "failedResponse", "require_org_qcobjects_controllers_list", "valueField", "labelField", "cssLayout", "ul", "require_org_qcobjects_controllers_slider", "slideIndex", "interval", "sliderHandlerName", "slides", "dots", "slide", "dot", "dotHTML", "dotContent", "require_org_qcobjects_controllers_form", "org_qcobjects_components_1", "Ct", "fieldName", "_regex", "_pattern_", "_hasValidation", "_isInvalid", "_execValidation", "_componentRoot_", "fieldsToValidate", "_labelledby", "parentElement", "_e", "_ariatitle", "invalidFields", "validationMessage", "modalBody", "require_org_qcobjects_controllers_swagger", "ui", "swaggerUIPackagePath", "require_org_qcobjects_modal_controllers", "require_org_qcobjects_views", "require_org_qcobjects_tools_canvas", "canvas", "zoom", "px", "py", "width", "height", "resizedImage", "require_org_qcobjects_tools_layouts", "require_org_qcobjects_cloud_auth_session_usertoken", "SessionUserToken", "__token__", "username", "__index__", "password", "require_org_qcobjects_cloud_auth_session_data", "org_qcobjects_cloud_auth_session_usertoken_1", "Et", "sessionData", "defaultValue", "sessionContainer", "Jt", "en", "tn", "nn", "rn", "an", "dn", "un", "pn", "mn", "bn", "wn", "_n", "Nn", "Tn", "En", "Mn", "Ln", "require_public", "__commonJSMin", "exports", "module", "sdk", "require_QCObjects", "__commonJSMin", "exports", "module", "__name", "__qcobjects__", "_top", "Ready", "e", "isBrowser", "_QC_READY_LISTENERS", "global", "isDeno", "isNodeCommonJS", "deno_require", "_require_", "__require", "_protected_code_", "_", "__oldtoString", "_protected_symbols", "_ret_", "_methods_", "_m", "i", "regex", "matches", "match", "_DOMCreateElement", "elementName", "fs", "_DataStringify", "data", "getCircularReplacer", "seen", "_level", "key", "value", "_LegacyCopy", "_subelements", "selector", "_domain_", "_basePath_", "_tag_filter_", "_basePath", "baseURI", "process", "_f", "_p", "response", "message", "_secretKey", "__secretKey", "is_phonegap", "asyncLoad", "callback", "args", "asyncCallback", "_fireAsyncLoad", "fc", "Logger", "color", "logger", "Base64", "t", "n", "r", "s", "o", "u", "a", "f", "c1", "c2", "c3", "waitUntil", "func", "exp", "_waitUntil", "maxWaitCycles", "_w", "_t", "localStorage", "name", "ComplexStorageCache", "params", "object", "load", "alternate", "cachedObjectID", "cachedResponse", "cachedNewResponse", "alternateResponse", "retrievedObject", "k", "c", "supportsPassive", "opts", "captureFalse", "tag", "_oo", "_tags", "_tt", "_Cast", "__instanceID", "_Object_Create", "hasOwn", "O", "QCObjects", "obj", "Properties", "prop", "target", "varArgs", "to", "index", "nextSource", "nextKey", "__is_raw_class__", "o_c", "_value_", "_QC_CLASSES", "_QC_PACKAGES", "_QC_PACKAGES_IMPORTED", "ObjectName", "ret", "obj_source", "obj_dest", "v", "_CastProps", "__is__forbidden_name__", "__getType__", "is_a", "typeName", "isQCObjects_Class", "isQCObjects_Object", "__make_global__", "__register_class__", "_class_", "__namespace", "RegisterClass", "Class", "_types_", "type", "definition", "_o_", "__publicField", "self", "m", "__class__", "__classType", "__hierarchy__proto__", "__hierarchy", "_css", "__instance__", "child", "tags", "j", "ClassFactory", "className", "_classFactory", "packageName", "_className", "_package", "Package", "packageClasses", "classFactory", "content", "_self", "_appendVDOM", "doc", "element", "_super_", "classMethodName", "New", "Export", "findPackageNodePath", "packagename", "sdkPath", "sdkPaths", "p", "string", "result", "char", "keychar", "crypt", "_CryptObject", "_DecryptObject", "shortCode", "length", "code1", "code2", "o1", "uniqueId", "_Processor", "_proc_", "component", "processorName", "processorHandler", "template", "funcName", "procesorMatch", "match0", "_k", "Processor", "arg", "_ConfigSettings", "_config_settings", "ConfigSettings", "_conf", "config", "_protectedEnc", "_protectedConf", "_default", "_value", "namespace", "classes", "_c1", "NamespaceRef", "b", "Import", "ready", "external", "_promise_import_", "resolve", "reject", "allPackagesImported", "cp", "readyImported", "_imported_", "s1", "standardNodePath", "packageAbsoluteName", "jsNodePath", "_o", "effectArguments", "effectClass", "Tag", "tagname", "innerHTML", "addedKeys", "_i", "_Ready", "_execReady", "_ready_listener_", "_r", "DDO", "instance", "fget", "fset", "ddoInstance", "val", "is_ddo", "DefaultTemplateHandler", "templateInstance", "parsedAssignmentText", "__routing_params__", "routing", "routingPath", "standardRoutingPath", "__valid_routings__", "routings", "__valid_routing_way__", "validRoutingWays", "routingWay", "_buildComponentFromElement_", "__parent__", "__shadowed_not_set", "__tplsource_attr_not_set", "shadowed", "__cached_not_set", "cached", "tplextension", "_componentName", "_componentClassName", "__componentClassName", "__classDefinition", "__tplsource_prop_set", "tplsource", "componentURI", "ComponentURI", "__create_component_instance_", "__shadowed", "__definition", "newComponent", "_buildComponentsFromElements_", "elements", "componentsBuiltWith", "templateURI", "url", "method", "reload", "_body", "__promise__", "__shadowRoot", "body", "shadowRoot", "splashScreenComponent", "controller", "view", "serviceResponse", "standardResponse", "__routing_path__", "accumulator", "colData", "__serviceClass", "_serviceClassName", "__enable_service_class__", "_response_to_data_", "_response_to_template_", "serviceInstance", "serviceLoader", "request", "service", "rejectedResponse", "_component_", "_Controller", "controllerName", "effectClassName", "applyEffectTo", "viewName", "_View", "componentDone", "tagFilter", "elementList", "rebuildObjects", "error", "_feedComponent_InBrowser", "container", "tmp_shadowContainer", "shadowContainer", "qs", "_feedComponent_InNode", "_component", "_promise", "componentLoader", "oClass", "componentClass", "_route_promise_", "isValidInstance", "__route__", "componentList", "_componentNames_", "_promises_", "rc", "_promise_", "_rc_", "err", "elem", "componentBody", "routingNode", "attributeNames", "attributeName", "_parsedAssignmentText", "templateHandlerName", "templateHandlerClass", "selfData", "_componentRoot", "_imgLazyLoaded", "_lazyLoadImages", "image", "observer", "items", "item", "img", "_Effect", "_applyEffect_", "lang1", "lang2", "i18n", "callback_i18n", "messages", "_innerHTML", "componentHelper", "__component_helpers__", "_component_helper_", "__c__", "popStateEvent", "dependencies", "attrName", "subelementSelector", "handler", "TPL_SOURCE", "COMPONENTS_BASE_PATH", "COMPONENT_NAME", "TPLEXTENSION", "_async", "_componentLoaderInBrowser", "_feedComponent_", "xhr", "_componentLoaded", "successStatus", "is_file", "cache", "text", "_directLoad", "cacheController", "_componentLoaderInNode", "responseText", "_serviceLoaderInBrowser", "xhrasync", "header", "_serviceLoaderInNode", "URL", "serviceURL", "req", "captureEvents", "dataXML", "client", "buffer", "responseHeaders", "flags", "chunk", "requestOptions", "http2", "http", "https", "_req_", "_serviceLoaderMockup", "_serviceLoaderLocal", "d", "_ComponentWidget_", "componentWidget", "componentName", "__enabled__atributes__", "data_attributenames", "_attribute_name_", "RegisterWidget", "widgetName", "RegisterWidgets", "widgetList", "domain", "basePath", "stream", "microservice", "requestMethod", "supportedMethods", "allow_origins", "allow_credentials", "allow_methods", "allow_headers", "formData", "context", "properties", "__to_number", "prev", "current", "propName", "sortAsc", "sort_function", "_length", "_fillValue", "x_func", "x", "y_func", "y", "start", "stop", "step", "__instance", "h", "w", "square", "source", "_index", "_pname", "timing", "draw", "duration", "animate", "time", "timeFraction", "progress", "alphaFrom", "alphaTo", "angleFrom", "angleTo", "radiusFrom", "radiusTo", "scaleFrom", "scaleTo", "_transition_", "componentRoot", "eff", "__effectClass__", "effectObj", "effectClassMethod", "intervalInterceptor", "timer", "thread", "elapsed", "positive", "negative", "toggle", "mapper", "componentInstance", "valueName", "globalValue", "componentValue", "dataValue", "list", "listItems", "dataItems", "layout", "layoutname", "cssfile", "layout_portrait", "layout_landscape", "layout_code", "k1", "k2", "quick_component", "repeat", "GlobalSettings", "__load__serviceWorker", "registration", "_buildComponents", "_get_packages_names", "_packages", "_keys", "_classesList", "_packageClass", "_package_element", "_class_element", "remoteImportsPath", "tryImportingSDK", "sdkName", "sdk", "lastKnownScrollPosition", "ticking", "scrollHeight", "scrollWidth", "scrollDispatcher", "event", "percentY", "percentX", "scrollPercentEventEvent", "secondaryEventName", "__valid_scrolls__", "pY", "secondaryCustomEvent", "__freeze__"] +} diff --git a/browser/chunks/chunk-ZYLXOA35.js b/browser/chunks/chunk-ZYLXOA35.js new file mode 100644 index 00000000..5dfbd139 --- /dev/null +++ b/browser/chunks/chunk-ZYLXOA35.js @@ -0,0 +1,713 @@ +var Wt=Object.defineProperty;var Jt=(Me,j,y)=>j in Me?Wt(Me,j,{enumerable:!0,configurable:!0,writable:!0,value:y}):Me[j]=y;var O=(Me,j)=>Wt(Me,"name",{value:j,configurable:!0}),at=(Me=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(Me,{get:(j,y)=>(typeof require<"u"?require:j)[y]}):Me)(function(Me){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+Me+'" is not supported')});var Ht=(Me,j)=>()=>(j||Me((j={exports:{}}).exports,j),j.exports);var W=(Me,j,y)=>(Jt(Me,typeof j!="symbol"?j+"":j,y),y);var Bt=Ht(()=>{"use strict";var ae=(()=>{var Me=Object.defineProperty,j=O((A,f,d)=>f in A?Me(A,f,{enumerable:!0,configurable:!0,writable:!0,value:d}):A[f]=d,"Zn"),y=O((A,f)=>Me(A,"name",{value:f,configurable:!0}),"c"),_t=(A=>typeof at<"u"?at:typeof Proxy<"u"?new Proxy(A,{get:(f,d)=>(typeof at<"u"?at:f)[d]}):A)(function(A){if(typeof at<"u")return at.apply(this,arguments);throw new Error('Dynamic require of "'+A+'" is not supported')}),L=O((A,f)=>()=>(f||A((f={exports:{}}).exports,f),f.exports),"V"),U=O((A,f,d)=>(j(A,typeof f!="symbol"?f+"":f,d),d),"S"),jt=L((A,f)=>{y(O(function d(l){"use strict";if(typeof Object.defineProperty<"u"&&typeof l<"u")try{Object.defineProperty(l,"__qcobjects_sdk__",{enumerable:!0,configurable:!1,writable:!1,value:d})}catch{typeof l.__qcobjects_sdk__<"u"&&(l.__qcobjects_sdk__.__loaded__=!0)}if(typeof l.__qcobjects_sdk__.__loaded__>"u"){if(l.__qcobjects_sdk__.__loaded__=!0,typeof l>"u")throw Error("Top context empty: It should either global, module or window");var S=l;l.global=S;var x=typeof window<"u"&&typeof window.self<"u"&&window===window.self,C=typeof f<"u",T=CONFIG.get("remoteImportsPath"),M=CONFIG.get("relativeImportPath"),P=!CONFIG.get("useLocalSDK");P&&!C?CONFIG.set("remoteImportsPath","https://sdk.qcobjects.dev/v2.4/src/js/"):CONFIG.set("relativeImportPath","qcobjects-sdk/src/js/"),typeof l._DOMCreateElement>"u"&&(l._DOMCreateElement=function(V){var ue;return x?ue=document.createElement(V):ue={},ue});var F;if(x&&!C)F=[Import("org.qcobjects.i18n_messages",function(){},P),Import("org.qcobjects.models",function(){},P),Import("org.qcobjects.components",function(){},P),Import("org.qcobjects.components.grid",function(){},P),Import("org.qcobjects.components.list",function(){},P),Import("org.qcobjects.components.slider",function(){},P),Import("org.qcobjects.components.notifications",function(){},P),Import("org.qcobjects.components.splashscreen",function(){},P),Import("org.qcobjects.controllers",function(){},P),Import("org.qcobjects.controllers.grid",function(){},P),Import("org.qcobjects.controllers.list",function(){},P),Import("org.qcobjects.controllers.slider",function(){},P),Import("org.qcobjects.controllers.form",function(){},P),Import("org.qcobjects.controllers.swagger",function(){},P),Import("org.qcobjects.effects",function(){},P),Import("org.qcobjects.modal.controllers",function(){},P),Import("org.qcobjects.views",function(){},P),Import("org.qcobjects.tools.canvas",function(){},P),Import("org.qcobjects.tools.layouts",function(){},P),Import("org.qcobjects.cloud.auth.session.usertoken",function(){},P),Import("org.qcobjects.cloud.auth.session.data",function(){},P)];else{C&&CONFIG.set("remoteImportsPath",CONFIG.get("basePath",""));var oe="qcobjects-sdk/src/js/";F=[Import(oe+"org.qcobjects.models",function(){},P),Import(oe+"org.qcobjects.components",function(){},P),Import(oe+"org.qcobjects.controllers",function(){},P),Import(oe+"org.qcobjects.views",function(){},P),Import(oe+"org.qcobjects.effects",function(){},P),Import(oe+"org.qcobjects.tools.canvas",function(){},P),Import(oe+"org.qcobjects.tools.layouts",function(){},P),Import(oe+"org.qcobjects.cloud.auth.session.usertoken",function(){},P),Import(oe+"org.qcobjects.cloud.auth.session.data",function(){},P)]}let ce=GlobalSettings.__start__.bind(l);l._sdk_=Promise.all(F).then(()=>{CONFIG.set("useSDK",!0),CONFIG.set("remoteImportsPath",T),CONFIG.set("relativeImportPath",M),ce()})}},"w"),"__qcobjects_sdk__").call(null,typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{})}),Ke=L((A,f)=>{var d=jt();f.exports=d}),ve=L((A,f)=>{y(O(function d(l){"use strict";if(typeof Object.defineProperty<"u"&&typeof l<"u")try{Object.defineProperty(l,"__qcobjects__",{enumerable:!0,configurable:!1,writable:!1,value:d})}catch{typeof l.__qcobjects__<"u"&&(l.__qcobjects__.loaded=!0)}if(typeof l.__qcobjects__.loaded>"u"){let mt=O(function(e){C?Xe.push(e.bind(window)):typeof S<"u"&&Xe.push(e.bind(S))},"$e");y(mt,"Ready"),l.__qcobjects__.loaded=!0;var S=l;l.global=S;var x=typeof window<"u"&&"Deno"in window,C=typeof window<"u"&&typeof window.self<"u"&&window===window.self&&!x,T=typeof f<"u",M=y(function(){},"deno_require"),P=y(function(){return x?M(...arguments):_t(...arguments)},"_require_"),F=y(function(e){var n=typeof e.prototype<"u"?e.prototype.toString:function(){return""};typeof e.prototype<"u"&&(e.prototype.toString=function(){var s=["__qcobjects__","__qcobjects_sdk__","__loaded__","ComplexStorageCache","css","append","attachIn","debug","info","warn","QC_Append","set","get","done","componentDone","_new_","__new__","Class","ClassFactory","New","Export","Package","Import","subelements","componentLoader","buildComponents","Controller","View","VO","Service","serviceLoader","JSONService","ConfigService","SourceJS","SourceCSS","ArrayList","ArrayCollection","Effect","Timer","sum","avg","table","max","min","range","matrix","matrix2d","matrix3d","unique","uniqueId","shortCode","NamespaceRef"],c;return s.includes(this.name)?c=this.name+"{ [QCObjects native code] }":c=n.call(this),c})},"_protected_code_");F(Function);var oe=y(function(e){var n=[];for(var s in e)(typeof e[s]).toLowerCase()==="function"&&n.push(e[s]);return n},"_methods_");String.prototype.__mAll__=function(e){var n=[];return this.replace(e,function(){var s=Array.prototype.slice.call(arguments,0,-2);s.input=arguments[arguments.length-1],s.index=arguments[arguments.length-2],n.push(s)}),n},typeof String.prototype.matchAll>"u"&&(String.prototype.matchAll=String.prototype.__mAll__);var ce=y(function(e){var n;return C?n=document.createElement(e):n={},n},"_DOMCreateElement");if(!C){let e=P("fs")}var V=y(function(e){var n=y(function(){var s=new WeakSet,c=0;return function(p,m){if(typeof m=="object"&&m!==null){if(s.has(m))return c+=1,c<=3?ot(m):null;s.add(m)}return m}},"getCircularReplacer");return JSON.stringify(e,n())},"_DataStringify");if(C){var ue=y(function(e){return[...this.querySelectorAll(e)]},"subelements");Element.prototype.subelements=ue,HTMLDocument.prototype.subelements=ue,HTMLElement.prototype.subelements=ue,typeof ShadowRoot<"u"&&(ShadowRoot.prototype.subelements=ue)}if(C)try{l=typeof window.top<"u"?window.top:window,l._allowed_=!0}catch{try{l=document,l._allowed_=!0}catch{try{l=S,l._allowed_=!0}catch{l={},l._allowed_=!0}}}else typeof S<"u"&&(l=S);var R,Oe,de="quick-component:not([loaded]),component:not([loaded])";if(Oe=function(){var e="";if(C){var n=l.document.baseURI.split("?")[0].split("/");n.pop(),e=n.join("/")+"/"}else{var s;try{s=P("process")}catch{}typeof s<"u"?e=`${s.cwd()}/`:e=""}return e}(),C){"Promise"in l||(l.Promise=function(e){var n={then(){},catch(){},_then(s){this.then.call(n,s)},_catch(s){this.catch.call(n,s)}};return e.call(n,n._then,n._catch),n}),typeof l.console>"u"&&(l.console=function(){},l.console.prototype.log=function(e){}),R=function(){return typeof document<"u"&&document.domain!==""?document.domain:"localhost"}();var K=function(){var e=l[(![]+[])[+!+[]+ +!+[]]+(typeof![])[+!+[]]+(typeof[])[(+!+[]+ +!+[])*(+!+[]+ +!+[])]+(![]+[])[+!+[]]+(!![]+[])[+[]]+([]+[]+[][[]])[+[+!+[]+[+[]]]/(+!+[]+ +!+[])]+(typeof![])[+!+[]]+([]+[]+[][[]])[+!+[]]]["h"+(typeof![])[+!+[]]+(![]+[])[+!+[]+(+!+[]+ +!+[])]+(!![]+[])[+[]]].toLowerCase();return e}(),xe=function(){return typeof cordova<"u"}()}else{var K="secret";R="localhost"}l._asyncLoad=[];var we=y(function(e,n){var s={func:e,args:n,dispatch(){this.func.apply(null,this.args)}};return l._asyncLoad.push(s),s},"asyncLoad");if(C){var Fe=y(function(){document.readyState==="complete"&&l._asyncLoad.map(function(e){e.dispatch.call(e)})},"_fireAsyncLoad");document.onreadystatechange=Fe}else typeof l.global<"u"&&(l.global._fireAsyncLoad=function(){l._asyncLoad.map(function(e){e.dispatch.call(e)})});l.asyncLoad=we;var $e=y(function(){return{debugEnabled:!0,infoEnabled:!0,warnEnabled:!0,debug(e){this.debugEnabled&&console.log("\x1B[35m%s\x1B[0m",`[DEBUG][${performance.now().toLocaleString()}] ${e}`)},info(e){var n;this.infoEnabled&&(C?n="\x1B[103m%s\x1B[0m":n="\x1B[33m%s\x1B[0m",console.info(n,`[INFO][${performance.now().toLocaleString()}] ${e}`))},warn(e){this.warnEnabled&&console.warn("\x1B[31m%s\x1B[0m",`[WARN][${performance.now().toLocaleString()}] ${e}`)}}},"Logger"),v=new $e;v.debugEnabled=!1,v.infoEnabled=!0,l.logger=v;var fe={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode(e){var n="",s,c,p,m,_,b,E,k=0;for(e=fe._utf8_encode(e);k>2,_=(s&3)<<4|c>>4,b=(c&15)<<2|p>>6,E=p&63,isNaN(c)?b=E=64:isNaN(p)&&(E=64),n=n+this._keyStr.charAt(m)+this._keyStr.charAt(_)+this._keyStr.charAt(b)+this._keyStr.charAt(E);return n},decode(e){var n="",s,c,p,m,_,b,E,k=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");k>4,c=(_&15)<<4|b>>2,p=(b&3)<<6|E,n=n+String.fromCharCode(s),b!==64&&(n=n+String.fromCharCode(c)),E!==64&&(n=n+String.fromCharCode(p));return n=fe._utf8_decode(n),n},_utf8_encode(e){e=e.replace(/rn/g,"n");for(var n="",s=0;s127&&c<2048?(n+=String.fromCharCode(c>>6|192),n+=String.fromCharCode(c&63|128)):(n+=String.fromCharCode(c>>12|224),n+=String.fromCharCode(c>>6&63|128),n+=String.fromCharCode(c&63|128))}return n},_utf8_decode(e){for(var n="",s=0,c=0,p=0,m=0,_;s191&&c<224?(m=e.charCodeAt(s+1),n+=String.fromCharCode((c&31)<<6|m&63),s+=2):(m=e.charCodeAt(s+1),_=e.charCodeAt(s+2),n+=String.fromCharCode((c&15)<<12|(m&63)<<6|_&63),s+=3);return n}},B=y(function(e,n){var s=y(function(c,p){var m=2e3,_=0,b=setInterval(function(){p.call()?(clearInterval(b),c.call(),v.debug("Ejecuting "+c.name+" after wait")):_"u")var z={getItem(e){return Object.hasOwnProperty.call(this,e)?this[e]:null},setItem(e,n){this[e]=n},removeItem(e){delete this[e]}};var Ce=y(function(e){var n,s,c;if(n=e.index,typeof n<"u"){s=e.load,c=e.alternate;var p=this.getID(n),m=z.getItem(p);if(this.isEmpty(m)){var _=s.call(null,{cachedObjectID:p,cachedResponse:m,cache:this});this.save(n,_),v.debug("RESPONSE OF {{cachedObjectID}} CACHED".replace("{{cachedObjectID}}",p))}else{var b=c.call(null,{cachedObjectID:p,cachedResponse:m,cache:this});v.debug("RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED ".replace("{{cachedObjectID}}",p))}}else throw new Error("ComplexStorageCache: index is undefined");return this},"ComplexStorageCache");if(Ce.prototype.getItem=function(e){var n=z.getItem(e);return this.isEmpty(n)?null:JSON.parse(n)},Ce.prototype.setItem=function(e,n){z.setItem(e,V(n))},Ce.prototype.isEmpty=function(e){var n=!1;switch(!0){case typeof e>"u":case(typeof e=="string"&&e===""):case(typeof e=="string"&&e==="undefined"):case(typeof e=="number"&&e===0):case e===null:n=!0;break;default:n=!1}return n},Ce.prototype.getID=function(e){var n;return typeof e<"u"&&(n="cachedObject_"+fe.encode(V(e).replace(/\{|\}|,/g,"_"))),n},Ce.prototype.save=function(e,n){var s=this.getID(e);v.debug("CACHING THE RESPONSE OF {{cachedObjectID}} ".replace("{{cachedObjectID}}",s)),this.setItem(s,n)},Ce.prototype.getCached=function(e){var n=this.getID(e);return this.getItem(n)},Ce.prototype.clear=function(){Object.keys(z).filter(function(e){return e.startsWith("cachedObject_")}).map(function(e){z.removeItem(e)})},C){var qe=!1;try{var dt=Object.defineProperty({},"passive",{get(){return qe=!0,qe}});window.addEventListener("testPassive",null,dt),window.removeEventListener("testPassive",null,dt)}catch{}var ht=y(function(){return qe?{passive:!0}:!1},"captureFalse")}C&&(Element.prototype.find=function(e){var n=[],s=document.subelements(e);return s.map(function(c,p){typeof s[p]<"u"&&s[p].parentNode.tagName===this.parentNode.tagName&&n.push(Ye(c,new Object))}),n});var ze,bt=function(){var e=Object.prototype.hasOwnProperty;return function(n){if(typeof n!="object")throw TypeError("Object prototype may only be an Object or null. The type is "+typeof n);var s=y(function(){},"QCObjects");s.prototype=n;var c=new s;if(arguments.length>1){var p=Object(arguments[1]);for(var m in p)e.call(p,m)&&(c[m]=p[m])}return c}}();typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:y(function(e,n){"use strict";if(e===null)throw new TypeError("Cannot convert undefined or null to object");for(var s=Object(e),c=1;c"u"||c===null?c={}:c=ot(c),typeof c.__instanceID<"u"&&delete c.__instanceID,Pe[n]=class extends e[s.name]{constructor(){var p;arguments.length>0?p={...arguments[0]}:p={},super(p),U(this,"__classType",n),U(this,"__definition",{...c});let m=this;if(ze=typeof ze>"u"||ze===null?0:ze+1,m.__instanceID||Object.defineProperty(m,"__instanceID",{value:ze,writable:!1}),typeof m.__definition<"u"&&Object.keys(m.__definition).filter(function(_){return isNaN(_)&&!["name","__instanceID","__classType","__definition"].includes(_)}).forEach(function(_){typeof m.__definition[_]=="function"?m[_]=m.__definition[_].bind(m):m[_]=m.__definition[_]}),oe(Pe[m.__classType]).map(function(_){m[_.name]=_.bind(m)}),oe(m.__definition).map(function(_){m[_.name]=_.bind(m)}),m.body)if(typeof m.__definition>"u"||!Object.hasOwnProperty.call(m.__definition,"body")||typeof m.__definition.body>"u")try{C?m.body=ce(m.__definition.__classType):m.body={}}catch{m.body={}}else Object.hasOwnProperty.call(m.__definition,"body")&&(m.body=m.__definition.body);try{if(typeof m.__new__=="function"?m.__new__.call(m,p):typeof super.__new__=="function"&&(m.__new__=super.__new__.bind(m),m.__new__.call(m,p)),typeof m=="object"&&Object.hasOwnProperty.call(m,"_new_")&&typeof m._new_.isCalled>"u")try{m._new_.call(m,p),m._new_.isCalled=!0}catch(_){v.warn(`${m.__classType}._new_() failed with error: ${_}`)}}catch(_){v.warn(_)}}static hierarchy(p){var m=y(function(E){return Object.hasOwnProperty.call(E,"__classType")?E.__classType:Y.call(p,E)},"__classType"),_=y(E=>typeof E<"u"&&typeof E.__proto__<"u"&&E.__proto__!==null?(m(E)!==""?[m(E)]:[]).concat(_(E.__proto__)):[],"__hierarchy__proto__");(typeof p>"u"||p===null)&&(p=this);var b=[];return b.push(m(p)),b=b.concat(_(p.__proto__)),b}static getParentClass(){return Object.getPrototypeOf(this.prototype.constructor)}__new__(p){Ue(p,this)}_new_(){}getClass(){return Object.getPrototypeOf(this.constructor)}css(p){return typeof this.body<"u"&&this.body.style!=="undefined"&&(v.debug("body style"),this.body.style=Ye(p,this.body.style)),this.body.style}hierarchy(){var p=this;return this.getClass().hierarchy(p)}append(m){v.debug("append: start"),X(m,"Component")&&(v.debug("append: child is a Component"),v.debug(`appending the body of ${m.name}`));var m=arguments.length>0?arguments[0]:this.body;typeof this.body<"u"&&(v.debug("append element"),arguments.lenght>0?(v.debug("append to element"),this.body.append(m),typeof this.childs>"u"&&(this.childs=[]),this.childs.push(m)):C&&(v.debug("append to body"),document.body.append(m)))}attachIn(p){if(C)for(var m=document.subelements(p),_=0,b=m.length;_-1){var s=e.split(".").slice(0,e.split(".").length-1).join("."),c=e.split(".").slice(-1).join(""),p=N(s),m=typeof p<"u"?p.filter(_=>I(_)&&(_.__definition.__classType===c||typeof _=="function"&&!!_.name)).reverse():[];if(m.length>0)n=m[0];else throw Error(`Class ${e} not found.`)}else e!==null&&Object.hasOwnProperty.call(Pe,e)&&(n=Pe[e]);return n},"ClassFactory");C&&(Element.prototype.append=y(function(e){g(e)||typeof e.body<"u"?this.appendChild(e.body):this.appendChild(e)},"QC_Append"),Element.prototype.render=y(function(e){var n=this,s=y(function(c,p){if(typeof document.implementation.createHTMLDocument<"u"){var m=document.implementation.createHTMLDocument("");m.innerHTML=p,m.body.subelements("*").map(function(_){return c.append(_)})}},"_appendVDOM");if(typeof this.innerHTML<"u")try{this.innerHTML+=e}catch{s(n,e)}else s(n,e)},"QC_Render"));var Ze=y(function(e,n,s){return G(e)[n]},"_super_");Ze.prototype.toString=function(){return"_super_(className,classMethodName,params) { [QCObjects native code] }"};var o=y(function(e,n){return n=arguments.length>1?n:{},typeof e>"u"?new Object:new e(n)},"New");o.prototype.toString=function(){return"New(QCObjectsClassName, args) { [QCObjects native code] }"};var r=y(function(e){return pe(e)},"Export");if(r.prototype.toString=function(){return"Export(function or symbol) { [QCObjects native code] }"},!C){var t=y(function(e){let n=P("fs");var s=null;try{var c=[`${l.CONFIG.get("projectPath")}${l.CONFIG.get("relativeImportPath")}`,`${l.CONFIG.get("basePath")}${l.CONFIG.get("relativeImportPath")}`,`${l.CONFIG.get("projectPath")}`,`${l.CONFIG.get("basePath")}`,`${l.CONFIG.get("relativeImportPath")}`,`${process.cwd()}${l.CONFIG.get("relativeImportPath")}`,`${process.cwd()}/node_modules/`+e,`${process.cwd()}/node_modules`,`${process.cwd()}`,"node_modules","./",""].concat(f.paths);c=c.filter(p=>n.existsSync(p+"/"+e)),c.length>0&&(s=c[0],v.info(e+" is Installed."))}catch(p){console.log(p)}return s},"findPackageNodePath");r(t)}Q("_Crypt",Object,{last_string:"",last_key:"",construct:!1,_new_(e){var n=e.string,s=e.hasOwnProperty.call(e,"key")?e.key:null;this.__new__(e),s=s===null?this.__instanceID:s,this.last_key=s,this.last_string=n,this.construct=!0},_encrypt(){for(var e=this.string,n=this.key,s="",c,p,m=0;mn.list()[m]===p?null:p).filter(p=>p!==null).join("");return c},"shortCode"),i=h;Q("InheritClass",class{},{});let ft=O(class extends G("InheritClass"){constructor(){super(...arguments),U(this,"component",null),U(this,"__definition",{}),U(this,"__classType","Processor"),this.processors=ft.processors,this.process=ft.process.bind(this),this.processObject=ft.processObject.bind(this),this.setProcessor=ft.setProcessor.bind(this),this.execute=ft.execute.bind(this)}static setProcessor(e){typeof e=="function"&&e.name!==""&&(this.processors[e.name]=e)}static execute(e,n,s){var c=typeof e<"u"&&e!==null?e.processorHandler:this;return c.processors[n].bind(c).apply(c,[e,...s.split(",")])}static process(e,n=null){var s=n!==null?n.processorHandler:o(ft,{component:null});return typeof e=="string"&&Object.keys(s.processors).map(function(c){[...e.matchAll(new RegExp("\\$"+c+"\\((.*)\\).*","g"))].map(function(p){var m=`$${c}(${p[1]})`;e=e.replace(m,s.execute.bind(s).call(s,n,c,p[1]))})}),e}static processObject(e,n=null){var s=n===null?this:n.processorHandler;return typeof s>"u"&&(s=new ft({component:n})),typeof e=="object"?Object.keys(e).map(function(c){typeof e[c]=="object"&&!e[c].hasOwnProperty.call(e[c],"call")?e[c]=s.processObject.bind(s)(e[c],n):typeof e[c]=="string"&&(e[c]=s.process.bind(s)(e[c],n))}):typeof e=="string"&&(e=s.process.bind(s)(e,n)),e}},"we"),Re=ft;y(Re,"Processor"),U(Re,"processors",{config(e,n){return l.CONFIG.get(n,"")},ENV(e,n){return typeof process<"u"?process.env[n]:""},global(e,n){return typeof S<"u"?S[n]:""}}),Re.__definition={},Re.__classType="Processor",J(Re,"com.qcobjects"),pe(Re);let qt=O(class{static get instance(){if(this._instance===null){var e=new qt;e._CONFIG={relativeImportPath:"",remoteImportsPath:"",remoteSDKPath:"https://sdk.qcobjects.dev/v2.4/",asynchronousImportsLoad:!1,removePackageScriptAfterLoading:!0,componentsBasePath:"",delayForReady:0,preserveComponentBodyTag:!1,useConfigService:!1,routingWay:"hash",useSDK:!0,useLocalSDK:!1,basePath:Oe},e._CONFIG_ENC=null,this._instance=e}return this._instance}static set instance(e){this._instance=e}},"Ot"),Tt=qt;y(Tt,"ConfigSettings"),U(Tt,"_instance",null),U(Tt,"_CONFIG_ENC",null),Pe.ConfigSettings=Tt,Q("CONFIG",Object,{get _CONFIG_ENC(){return G("ConfigSettings").instance._CONFIG_ENC},get _CONFIG(){return G("ConfigSettings").instance._CONFIG},set(e,n){v.debug(`CONFIG.set ${e}: ${n}`),e==="basePath"&&(Oe=n);var s;try{s=function(c){c._CONFIG_ENC===null&&(c._CONFIG_ENC=G("_Crypt").encrypt(V({}),K));var p=c._CONFIG_ENC.valueOf(),m=c._CONFIG.valueOf();return Ue(m,u(p))}(G("ConfigSettings").instance)}catch(c){s={},console.error(c),v.debug("failed to encrypt config")}s[e]=n,G("ConfigSettings").instance._CONFIG_ENC=a(s),Object.hasOwnProperty.call(G("ConfigSettings").instance,"_CONFIG")&&Object.hasOwnProperty.call(G("ConfigSettings").instance._CONFIG,e)&&(G("ConfigSettings").instance._CONFIG[e]=n)},get(e,n){var s;try{var c=function(p){p._CONFIG_ENC===null&&(p._CONFIG_ENC=G("_Crypt").encrypt(V({}),K));var m=p._CONFIG_ENC.valueOf(),_=p._CONFIG.valueOf();return Ue(_,u(m))}(G("ConfigSettings").instance);typeof c[e]<"u"?s=c[e]:typeof n<"u"&&(s=n)}catch(p){console.error(p),v.debug("Something wrong when trying to get CONFIG values"),v.debug("No config value for: "+e),s=n}return Re.processObject.call(Re,s)}}),r(B),r(Ze),r(Ce),r(G),r(ce),r(h),r(Y),r(X);var g=y(function(e){return!!(typeof e=="object"&&Object.hasOwnProperty.call(e,"__classType")&&e.__instanceID&&Object.hasOwnProperty.call(e,"__definition")&&typeof e.__definition<"u")},"isQCObjects_Object"),I=y(function(e){return!!(typeof e=="function"&&!e.__instanceID&&e.__definition&&typeof e.__definition<"u"&&e.__definition.__classType)},"isQCObjects_Class"),N=y(function(e,n){return Ie.hasOwnProperty.call(Ie,e)&&typeof Ie[e]<"u"&&Ie[e].hasOwnProperty.call(Ie[e],"length")&&Ie[e].length>0&&typeof n<"u"&&n.hasOwnProperty.call(n,"length")&&n.length>0?(n.filter(function(s){return I(s)}).map(function(s){s.__definition.__namespace=e,s.__namespace=e}),Ie[e]=Ie[e].concat(n)):typeof n<"u"&&(typeof n=="object"&&n.hasOwnProperty.call(n,"length")?n.filter(function(s){return I(s)}).map(function(s){s.__definition.__namespace=e,s.__namespace=e}):I(n)&&(n.__definition.__namespace=e,n.__namespace=e),Ie[e]=n),Object.hasOwnProperty.call(Ie,e)&&Ie[e].map(function(s){me(s,e)}),Object.hasOwnProperty.call(Ie,e)?Ie[e]:void 0},"Package");N.prototype.toString=function(){return"Package(namespace, classes) { [QCObjects native code] }"},N("com.qcobjects",[Re]);var D=y(function(e){let n=N(e).filter(s=>I(s)).map(s=>({[s.__definition.__classType]:s})).reduce((s,c)=>Object.assign(s,c));return e.split(".").map(s=>({[s]:n})).reverse().reduce((s,c)=>(c[Object.keys(c)]=s,c))},"NamespaceRef"),H=y(function(){var e,n=y(function(){},"ready"),s=!1;if(!(arguments.length<1)){arguments.length===1?e=arguments[0]:arguments.length===2?(e=arguments[0],n=arguments[1]):arguments.length>2&&(e=arguments[0],n=arguments[1],s=arguments[2],v.debug("[Import] Setting external="+s.toString()+" resource to import: "+e)),s?v.debug("[Import] Registering external resource to import: "+e):v.debug("[Import] Registering local resource to import: "+e);var c;return C?(c=new Promise(function(p,m){var _=y(function(){var k=!1,q=0;for(var re in Ie)q++;return q0?C?setTimeout(n.bind(window),l.CONFIG.get("delayForReady")):typeof S<"u"&&setTimeout(n.bind(S),l.CONFIG.get("delayForReady")):n.call(l)},"_Ready");C?(window.onload=te,xe&&document.addEventListener("deviceready",te,ht)):S.onload=te;class Ft extends G("InheritClass"){constructor({instance:n,name:s,fget:c,fset:p,value:m}){super({instance:n,name:s,fget:c,fset:p,value:m}),this._new_({instance:n,name:s,fget:c,fset:p,value:m})}_new_({instance:n,name:b,fget:c,fset:p,value:m}){var _=this,b=typeof b>"u"?Je(_):b;Object.defineProperty(n,b,{set(E){let k=E;v.debug("value changed "+b);var q;typeof p<"u"&&typeof p=="function"?q=p(k):q=k,n["_"+b]=q},get(){let E=n["_"+b];v.debug("returning value "+b);var k=y(function(re){return typeof re=="object"&&Object.hasOwnProperty.call(re,"value")?re.value:re},"is_ddo"),q;return typeof c<"u"&&typeof c=="function"?q=c(k(E)):q=k(E),q}})}}O(Ft,"Ut"),y(Ft,"DDO"),r(Ft);class Et{constructor({component:n,template:s}){U(this,"template",""),U(this,"__definition",{}),this.component=n,this.template=s}assign(n){var s=this;if(typeof s.component>"u")throw new Error("DefaultTemplateHandler.assign: component is undefined");if(typeof s.component.processorHandler>"u")throw new Error("DefaultTemplateHandler.assign: component.processorHandler is undefined");var c=s.component.processorHandler;c.component=s.component;var p=typeof s.template<"u"?s.template:"";typeof n=="object"?[...Object.keys(n)].map(function(m){var _=n[m];if(typeof _=="string"||typeof _=="number"||!isNaN(_))try{_=Re.processObject.bind(c).call(c,_,s.component),p=p.replace(new RegExp(`{{${m}}}`,"g"),_)}catch(b){throw v.warn(`${s.component.name} could not parse processors.`),Error(`${s.component.name} could not parse processors. Reason: ${b.message}`)}}):v.debug(`${s.component.name}.data is not an object`);try{p=Re.processObject.call(c,p,s.component)}catch(m){throw v.warn(`${s.component.name} could not parse processors.`),Error(`${s.component.name} could not parse processors. Reason: ${m.message}`)}return p}}O(Et,"wt"),y(Et,"DefaultTemplateHandler"),Et.__definition={},J(Et,"com.qcobjects");var ee=y(function(e,n){let s=e.path.replace(/{(.*?)}/g,"(?<$1>.*)");return{...[...n.matchAll(new RegExp(s,"g"))][0].groups}},"__routing_params__"),be=y(function(e,n){return e.filter(function(s){var c=s.path.replace(/{(.*?)}/g,"(?<$1>.*)");return new RegExp(c,"g").test(n)}).reverse()},"__valid_routings__"),ge=y(function(e,n){return e.includes(n)},"__valid_routing_way__"),Se=y(function(e,n){var s=e.getAttribute("shadowed")===null,c=e.getAttribute("template-source")===null,p=e.getAttribute("shadowed")==="true",m=e.getAttribute("cached")===null,_=e.getAttribute("cached")==="true",b=typeof l.CONFIG.get("tplextension")<"u"?l.CONFIG.get("tplextension"):"html";b=e.getAttribute("tplextension")!==null?e.getAttribute("tplextension"):b;var E=e.getAttribute("name"),k=e.getAttribute("componentClass")!==null?e.getAttribute("componentClass"):"Component";let q=l.CONFIG.get("preserveComponentBodyTag")?E!==null?"com.qcobjects.components."+E+".ComponentBody":"com.qcobjects.components.ComponentBody":k;E=E!==null?E:G(q)&&typeof G(q).name<"u"?G(q).name:"";var re=G(q),Z=q!=="Component"&&typeof re<"u"&&typeof re.tplsource=="string"&&re.tplsource!=="",he=c&&Z?re.tplsource:c?"default":e.getAttribute("template-source");v.debug(`template source for ${E} is ${he} `),v.debug(`type for ${E} is ${Y(re)} `);var ie;ie=We({COMPONENTS_BASE_PATH:l.CONFIG.get("componentsBasePath"),COMPONENT_NAME:E,TPLEXTENSION:b,TPL_SOURCE:he}),l.CONFIG.get("preserveComponentBodyTag")&&N(E!==""?"com.qcobjects.components."+E:"com.qcobjects.components",[Q("ComponentBody",G("Component"),{name:E,tplsource:he,tplextension:b,reload:!0})]);var se=y(function(){var Te=s?re&&re.shadowed||G("Component").shadowed:p,ne={__parent__:n,name:E,cached:m?G("Component").cached:_,shadowed:Te,tplextension:b,body:l.CONFIG.get("preserveComponentBodyTag")?ce("componentBody"):e,templateURI:ie,tplsource:he};(typeof E>"u"||E===""||E===null)&&delete ne.name,ie===""&&delete ne.templateURI;var je=o(re,ne);return l.CONFIG.get("preserveComponentBodyTag")&&e.append(je),je},"__create_component_instance_"),Le=se.call(this);return Le},"_buildComponentFromElement_"),Ne=y(function(e,n){var s=[];return C?s=e.map(function(c){return Se(c,n)}):v.debug("[_buildComponentsFromElements_] not implemented for Non-Browser environments"),s},"_buildComponentsFromElements_");N("com.qcobjects",[y(class extends G("InheritClass"){constructor({templateURI:e="",template:n,tplsource:s="default",url:c="",name:p="",method:m="GET",data:_={},reload:b=!1,shadowed:E=!1,cached:k=!0,_body:q=ce("div"),__promise__:re=null,__shadowRoot:Z,body:he,shadowRoot:ie,splashScreenComponent:se,controller:Le,view:Te}){super(...arguments),U(this,"validRoutingWays",["pathname","hash","search"]),U(this,"basePath",Oe),U(this,"domain",R),U(this,"templateHandler","DefaultTemplateHandler"),U(this,"processorHandler",null),U(this,"routingWay",null),U(this,"routingNodes",[]),U(this,"routings",[]),U(this,"routingPath",""),U(this,"routingPaths",[]),U(this,"_componentHelpers",[]),U(this,"subcomponents",[]),U(this,"splashScreenComponent"),U(this,"controller"),U(this,"view"),U(this,"effect"),U(this,"method","GET"),U(this,"cached",!0),U(this,"__promise__",null),U(this,"__namespace");var ne=this;typeof ne.name>"u"&&v.warn("A name is not defined for "+Y(ne)),ne.routingWay=l.CONFIG.get("routingWay"),ne.processorHandler=o(Re,{component:ne}),ne.data=typeof ne.data>"u"||ne.data===null?{}:ne.data,ne.data=Object.assign(ne.data,ne.dataAttributes),ne.createServiceInstance().then(function(je){typeof ne.__new__=="function"&&ne.__new__.call(ne,ne),ne._generateRoutingPaths(ne.body).then(function(){ne._reroute_().then(function(){return ne.rebuild().then(function(){v.info(`Component._new_ The component ${ne.name} was built successfully!`)}).catch(function(rt){v.warn(`Component._new_ Something went wrong building the component ${ne.name}`),console.error(rt)})})})})}set body(e){var n=this;n._body=e}get body(){var e=this;return e._body}set cacheIndex(e){v.debug("[cacheIndex] This property is readonly")}get cacheIndex(){var e=this,n=V(e.routingPath);return fe.encode(e.name+n)}set parsedAssignmentText(e){v.debug("[parsedAssignmentText] This property is readonly")}get parsedAssignmentText(){var e=this;if(e._parsedAssignmentText=e.parseTemplate(e.template),typeof e._parsedAssignmentText>"u")throw Error(`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);return e._parsedAssignmentText}set shadowRoot(e){var n=this;typeof n.__shadowRoot>"u"?n.__shadowRoot=e:v.debug("[shadowRoot] This property can only be assigned once!")}get shadowRoot(){var e=this;return e.__shadowRoot}set routingSelected(e){v.debug("[routingSelected] This is a read-only property of the component")}get routingSelected(){var e=this;return be(e.routings,e.routingPath)}set routingParams(e){v.debug("[routingParams] This is a read-only property of the component")}get routingParams(){var e=this;return[{}].concat(e.routingSelected.map(function(n){return ee(n,e.routingPath)})).reduce(function(n,s,c){return Object.assign(n,s)})}createServiceInstance(){var e=this,n=e.body,s=this.data,c,p=e.getClass().__definition,m=C&&n.getAttribute("serviceClass")!==null?n.getAttribute("serviceClass"):null;return new Promise(function(_,b){var E=!!(Object.hasOwnProperty.call(n,"enableServiceClass")&&n.enableServiceClass||!Object.hasOwnProperty.call(n,"enableServiceClass")),k=!!(C&&n.getAttribute("response-to")!==null&&n.getAttribute("response-to")==="data"),q=!!(C&&n.getAttribute("response-to")!==null&&n.getAttribute("response-to")==="template");if(E&&m!==null&&(c=G(m)),!k&&p&&Object.hasOwnProperty.call(p,"responseTo")?k=p.responseTo==="data":!k&&Object.hasOwnProperty.call(G("Component"),"responseTo")&&(k=G("Component").responseTo==="data"),!q&&p&&Object.hasOwnProperty.call(p,"responseTo")?q=p.responseTo==="template":!q&&Object.hasOwnProperty.call(G("Component"),"responseTo")&&(q=G("Component").responseTo==="template"),typeof c<"u"&&typeof E<"u"&&E===!0&&(k||q)){v.info("Loading service "+m);var re=o(c,{data:s});ye(re).then(function({request:Z,service:he}){var ie;typeof he.JSONresponse<"u"&&he.JSONresponse!==null?ie=he.JSONresponse:ie=he.template,k&&(typeof s=="object"&&typeof ie=="object"?s=Object.assign(s,ie):s=ie,e.data=s),e.serviceInstance=re,e.serviceData=s,q&&(e.template=ie),_(ie)},function(Z){v.debug(`Service loading rejected for ${m} in ${e.name}`),b(Z)}).catch(function(Z){throw v.debug("Something went wroing while trying to load the service "+m),Error(`Error loading ${m} for ${e.name}. Detail: ${Z}`)})}else _(null)})}_bindroute_(){var e=this;e._bindroute_.loaded?v.debug(`Routes already bound to popstate events for ${e.name}`):(C&&e.hostElements("a").map(function(n){return n.oldclick=n.onclick,n.onclick=function(s){var c=!0;l.global.get("routingPaths")||l.global.set("routingPaths",[]);var p=l.CONFIG.get("routingWay"),m=s.target[p];return l.global.get("routingPaths").includes(m)&&s.target[p]!==document.location[p]&&s.target.href!==document.location.href?(v.debug("A ROUTING WAS FOUND: "+m),window.history.pushState({href:s.target.href},s.target.href,s.target.href),G("Component").route(),c=!1):v.debug("NO ROUTING FOUND FOR: "+m),typeof s.target.oldclick<"u"&&typeof s.target.oldclick=="function"&&s.target.oldclick.call(s.target,s),c},null}),this._bindroute_.loaded=!0)}done(e){var n;if(typeof e<"u"){var{request:s,component:c}=e;n=Promise.resolve({request:s,component:c})}return n}createControllerInstance(){var e;if(C){if(typeof this.body>"u")throw new Error("The component has no body");var n=this.body.getAttribute("controllerClass");n||(n="Controller"),e=G(n),typeof e<"u"&&(this.controller=o(e,{component:this}))}return new Promise((s,c)=>{if(C&&typeof e<"u"&&typeof this.controller<"u"){if(typeof this.controller.done=="function")try{this.controller.done.call(this.controller)}catch(p){throw Error(p)}else v.debug(`${n} does not have a done() method.`),c(`${n} does not have a done() method.`);typeof this.controller.createRoutingController=="function"?this.controller.createRoutingController.call(this.controller):v.debug(`${n} does not have a createRoutingController() method.`)}s({component:this,controller:this.controller})})}createEffectInstance(){var e=this;return new Promise(function(n,s){if(C){var c=e.body.getAttribute("effectClass"),p=e.body.getAttribute("apply-effect-to");p=p!==null?p:"load",c!==null&&p==="observe"?e.applyObserveTransitionEffect(c):c!==null&&p==="load"&&e.applyTransitionEffect(c)}n({component:e,effect:e.effect})})}createViewInstance(){var e=this;return new Promise(function(n,s){var c=C?e.body.getAttribute("viewClass"):null;if(c!==null){var p=G(c);typeof p<"u"&&(e.view=o(p,{component:e}),Object.hasOwnProperty.call(e.view,"done")&&typeof e.view.done=="function"&&e.view.done.call(e.view))}n({component:e,view:e.view})})}__done__(){var e=this,n=y(function(){if(typeof e>"u")throw new Error("componentDone() has lost its context");if(typeof e.body>"u")throw new Error("The component has no body");e.createViewInstance(),e.createControllerInstance(),e.createEffectInstance(),v.debug(`Trying to run component helpers for ${e.name}...`);try{e.runComponentHelpers(),v.debug(`Component helpers for ${e.name} executed.`)}catch(s){throw v.debug(`Component helpers for ${e.name} could not be executed.`),Error(s)}e.subcomponents=e.__buildSubComponents__(),e._bindroute_(),e.body.setAttribute("loaded",!0)},"componentDone");return new Promise(function(s,c){try{Promise.resolve(n.call(e))}catch(p){c(p)}})}hostElements(e){var n=this,s=n.shadowed&&typeof n.shadowRoot<"u"?n.shadowRoot.subelements(e):n.body.subelements(e);return s}get subtags(){var e=this,n=de;return e.hostElements(n)}get bodyAttributes(){var e=this,n=e.body;return C?[...n.getAttributeNames()].map(s=>({[s]:n.getAttribute(s)})).reduce((s,c,p)=>Object.assign(s,c)):{}}get dataAttributes(){var e=this,n=e.body;return C?[{}].concat([...n.getAttributeNames()].filter(s=>s.startsWith("data-")).map(s=>({[s.split("-")[1]]:n.getAttribute(s)}))).reduce((s,c,p)=>Object.assign(s,c)):{}}__buildSubComponents__(e=!1){var n=this,s=n.subtags;return e||(s=s.filter(c=>c.getAttribute("loaded")!=="true")),(typeof n<"u"||n.subcomponents.length<1)&&(n.subcomponents=Ne(s,n)),n.subcomponents}fail(e){var n;if(typeof e<"u"){var{error:s,component:c}=e;n=Promise.resolve({error:s,component:c})}return n}set(e,n){this[e]=n}get(e){return this[e]}feedComponent(){var e=this;v.debug(`[Component][${this.name}][feedComponent] start feeding component...`);var n=y(function(p){if(typeof p.container>"u"&&typeof p.body>"u"){v.warn("COMPONENT {{NAME}} has an undefined container and body".replace("{{NAME}}",p.name));return}var m=typeof p.container>"u"||p.container===null?p.body:p.container,_=p.parsedAssignmentText;if(p.innerHTML=_,p.shadowed){v.debug("COMPONENT {{NAME}} is shadowed".replace("{{NAME}}",p.name)),v.debug("Preparing slots for Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",p.name));var b=ce("div");m.subelements("[slot]").map(function(q){q.parentElement===m&&b.appendChild(q)}),v.debug("Creating shadowedContainer for COMPONENT {{NAME}}".replace("{{NAME}}",p.name));var E=ce("div");E.classList.add("shadowHost");try{p.shadowRoot=E.attachShadow({mode:"open"})}catch{try{v.debug("Shadowed COMPONENT {{NAME}} is repeated".replace("{{NAME}}",p.name)),p.shadowRoot=E.shadowRoot}catch{v.warn("Shadowed COMPONENT {{NAME}} is not allowed on this browser".replace("{{NAME}}",p.name))}}if(typeof p.shadowRoot<"u"&&p.shadowRoot!==null){p.reload?(v.debug("FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",p.name)),E.shadowRoot.innerHTML=p.innerHTML):(b.innerHTML=p.parseTemplate(b.innerHTML),v.debug("ADDING Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",p.name)),E.shadowRoot.innerHTML+=p.innerHTML),v.debug("ADDING Slots to Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",p.name)),E.innerHTML+=b.innerHTML,v.debug("APPENDING Shadowed COMPONENT {{NAME}} to Container ".replace("{{NAME}}",p.name));var k=m.querySelector(".shadowHost");typeof k<"u"&&k!==null?(v.debug("Shadowed Container for COMPONENT {{NAME}} is already present in the tree ".replace("{{NAME}}",p.name)),p.shadowRoot.innerHTML=E.shadowRoot.innerHTML):m.appendChild(E)}else v.warn("Shadowed COMPONENT {{NAME}} is bad configured".replace("{{NAME}}",p.name))}else p.reload?(v.debug("FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}".replace("{{NAME}}",p.name)),m.innerHTML=p.innerHTML):m&&p?(v.debug("ADDING COMPONENT {{NAME}} ".replace("{{NAME}}",p.name)),m.innerHTML+=p.innerHTML):v.warn("COMPONENT {{NAME}} is not added to the DOM".replace("{{NAME}}",p.name))},"_feedComponent_InBrowser"),s=y(function(p){var m=p.parsedAssignmentText;p.innerHTML=m},"_feedComponent_InNode"),c;if(!X(e,"Component")){v.warn("Trying to feed a non component object");return}return C?c=n(e):c=s(e),c}rebuild(){var e=this,n=new Promise(function(s,c){if((typeof e>"u"||e===null)&&c("Component is undefined"),g(e)&&X(e,"Component"))switch(!0){case e.get("tplsource")==="none":v.debug("Component "+e.name+" has specified template-source=none, so no template load was done");var p={request:null,component:e};e.__done__().then(function(){typeof e.done=="function"&&e.done.call(e,p),s.call(n,p)},function(){c.call(n,p)});break;case e.get("tplsource")==="inline":v.debug("Component "+e.name+" has specified template-source=inline, so it is assumed that template is already declared"),async function(m){m.feedComponent.bind(m)()}(e);var p={request:null,component:e};e.__done__().then(function(){typeof e.done=="function"&&e.done.call(e,p),s.call(n,p)},function(){c.call(n,p)});break;case(e.get("tplsource")==="default"&&e.get("templateURI")!==""):e.set("url",e.get("basePath")+e.get("templateURI")),st(e,!1).then(function(m){s.call(n,m)},function(m){c.call(n,m)});break;case(e.get("tplsource")==="external"&&e.get("templateURI")!==""):e.set("url",e.get("templateURI")),st(e,!1).then(function(m){s.call(n,m)},function(m){c.call(n,m)});break;case(e.get("tplsource")==="default"&&e.get("templateURI","")===""):v.debug(`Component ${e.name} template-source is ${e.get("tplsource")} and no templateURI is present`),c.call(n,`Component ${e.name} template-source is ${e.get("tplsource")} and no templateURI is present`);break;default:v.debug("Component "+e.name+" will not be rebuilt because no templateURI is present"),c.call(n,{request:null,component:e});break}});return n}Cast(e){let n=oe(e).map(s=>s.name.replace(/bound /g,"")).map(s=>({[s]:e[s].bind(this)})).reduce((s,c)=>Object.assign(s,c),{});return Ye(this,n)}static route(){var e=this,n,s=!!(g(e)&&X(e,"Component")),c=y(function(p){var m=[],_=p.filter(function(b){return typeof b<"u"}).map(function(b){if(typeof b.name<"u")m.push(b.name);else throw new Error(Y(b)+" does not have a name");return new Promise(function(E,k){var q;return typeof b<"u"&&b._reroute_?q=b._reroute_().then(function(){return b.reload=!0,b.rebuild()}).then(function(re){if(Object.hasOwnProperty.call(b,"subcomponents")&&typeof b.subcomponents<"u"&&b.subcomponents.length>0)return v.debug("LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: "+b.name),c.call(b,b.subcomponents);v.debug("No subcomponents to look for routings in: "+b.name),b.subtags.length>0&&(b.subcomponents=b.__buildSubComponents__(!0)),E(b)}):typeof b<"u"&&k("Component "+b.name+" is not an instance of Component"),q})});return Promise.all(_).then(function(){v.debug("ROUTING COMPLETED FOR "+m.join(", "))}).catch(function(b){v.warn("ROUTING FAILED FOR "+m.join(", ")+": "+b)})},"__route__");if(s||l.componentsStack)s&&v.debug("loading routings for instance "+e.name),n=c.call(e,s?e.subcomponents:l.componentsStack);else throw v.debug("An undetermined result expected if load routings. So will not be loaded this time."),Error("There is no valid instance and no components stack available to apply rountings");return n}fullscreen(){if(C){var e=this.body;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()}}closefullscreen(){C&&(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen())}_generateRoutingPaths(e){var n=this;return new Promise(function(s,c){C&&ge(n.validRoutingWays,n.routingWay)&&typeof e<"u"&&(n.innerHTML=e.innerHTML,n.routingNodes=e.subelements("routing"),n.routings=[],n.routingNodes.map(function(p,m){var _=p.getAttributeNames(),b={};_.map(function(E,k){b[_[k]]=p.getAttribute(_[k])}),n.routings.push(b),n.routingPaths||(n.routingPaths=[]),n.routingPaths.includes(b.path)||n.routingPaths.push(b.path),l.global.get("routingPaths")||l.global.set("routingPaths",[]),l.global.get("routingPaths").includes(b.path)||l.global.get("routingPaths").push(b.path)})),s()})}parseTemplate(e){var n=this,s,c=e;if(Object.hasOwnProperty.call(n,"templateHandler")){var p=n.templateHandler;v.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${p} ...`);var m=G(p),_=o(m,{component:n,template:c});_.component=n;var b=n.data;if(Object.hasOwnProperty.call(n,"assignRoutingParams")&&n.assignRoutingParams)try{b=Object.assign(b,n.routingParams)}catch{v.debug("[parseTemplate] it was not possible to assign the routing params to the template")}s=_.assign(b)}else v.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`),s=c;return s}_reroute_(){var e=this;return new Promise(function(n,s){C&&ge(e.validRoutingWays,e.routingWay)&&(e.routingPath=document.location[e.routingWay],e.routingSelected.map(function(c,p){var m=We({COMPONENTS_BASE_PATH:l.CONFIG.get("componentsBasePath"),COMPONENT_NAME:c.name.toString(),TPLEXTENSION:Object.hasOwnProperty.call(c,"tplextension")?c.tplextension:e.tplextension,TPL_SOURCE:"default"});e.templateURI=m}),e.routingSelected.length>0&&(e.template="",e.body.innerHTML="")),n(e)})}lazyLoadImages(){if(C){var e=this,n=e.shadowed?e.shadowRoot:e.body,s=[...n.subelements("img[lazy-src]")],c=y(function(m){m.setAttribute("src",m.getAttribute("lazy-src")),m.onload=()=>{m.removeAttribute("lazy-src")}},"_lazyLoadImages");if("IntersectionObserver"in window){var p=new IntersectionObserver((m,_)=>{m.forEach(b=>{b.isIntersecting&&(c(b.target),_.unobserve(b.target))})});s.map(function(m){return p.observe(m)})}else s.map(c)}return null}applyTransitionEffect(e){var n=G(e);if(typeof n>"u")throw Error(`${e} not found.`);typeof n<"u"&&X(n,"TransitionEffect")?(this.effect=o(n,{component:this}),this.effect.apply(this.effect.defaultParams)):v.debug(`${e} is ${Y(n)} but is not a TransitionEffect`)}applyObserveTransitionEffect(e){if(C){var n=this,s=n.shadowed?n.shadowRoot.host:n.body,c=y(function(m){n.applyTransitionEffect(e)},"_applyEffect_");if("IntersectionObserver"in window){var p=new IntersectionObserver((m,_)=>{m.forEach(b=>{b.isIntersecting&&(c(b.target),_.unobserve(b.target))})});p.observe(s)}else c(s)}return null}scrollIntoHash(){if(C){var e=this;if(document.location.hash!==""){var n=e.shadowed?e.shadowRoot:e.body;n.subelements(document.location.hash).map(function(s){typeof s.scrollIntoView=="function"&&s.scrollIntoView(l.CONFIG.get("scrollIntoHash",{behavior:"auto",block:"top",inline:"top"}))})}}}i18n_translate(){if(C&&l.CONFIG.get("use_i18n")){var e=this,n=e.shadowed?e.shadowRoot:e.body,s=l.CONFIG.get("lang","en"),c=navigator.language.slice(0,2),p=l.global.get("i18n");if(s!==c&&typeof p=="object"&&Object.hasOwnProperty.call(p,"messages")){var m=y(function(){var _=this;return new Promise(function(b,E){var k=p.messages.filter(function(q){return Object.hasOwnProperty.call(q,s)&&Object.hasOwnProperty.call(q,c)});n.subelements("ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component").map(function(q){return k.map(function(re){var Z=q.innerHTML;return Z=Z.replace(new RegExp(`${re[s]}`,"g"),re[c]),q.innerHTML=Z,null}),q}),b()})},"callback_i18n");m.call(e).then(function(){v.debug("i18n loaded for component: "+e.name)})}}}addComponentHelper(e){var n=this;n._componentHelpers.push(e)}runComponentHelpers(){if(C){var e=this,n=[];n.push(e.i18n_translate.bind(e)),n.push(e.scrollIntoHash.bind(e)),n.push(e.lazyLoadImages.bind(e)),n=n.concat(e._componentHelpers),n.map(function(s){v.debug(`Executing ${s.name} as component helper for ${e.name}...`),s()})}}},"Component")]),oe(G("Component")).map(function(e){F(e)}),C&&window.addEventListener("popstate",function(e){e.stopImmediatePropagation(),e.stopPropagation(),G("Component").route()}),N("com.qcobjects.controllers",[y(class extends G("InheritClass"){constructor({component:e,dependencies:n}){if(super({component:e,dependencies:n}),U(this,"component",null),U(this,"dependencies",[]),this.component=e,this.dependencies=n,typeof this.component>"u"||this.component==="null")throw Error(`${Y(this)} must be called with a component`)}routingSelectedAttr(e){return this.component.routingSelected.map(function(n){return n[e]}).filter(function(n){return n}).pop()}isTouchable(){return"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0}onpress(e,n){try{this.isTouchable()?this.component.body.subelements(e)[0].addEventListener("touchstart",n,{passive:!0}):this.component.body.subelements(e)[0].addEventListener("click",n,{passive:!0})}catch{v.debug("No button to assign press event")}}createRoutingController(){var e=this,n=e.component,s=e.routingSelectedAttr("controllerclass");if(typeof s<"u"){var c=G(s);typeof c<"u"&&(n.routingController=o(c,{component:n}),Object.hasOwnProperty.call(n.routingController,"done")&&typeof n.routingController.done=="function"&&n.routingController.done.call(n.routingController))}}done(){}},"Controller")]),N("com.qcobjects.views",[y(class extends G("InheritClass"){constructor({component:e=void 0,dependencies:n=[]}){if(super(...arguments),typeof this.component>"u"||this.component==="null")throw Error(`${Y(this)} must be called with a component`)}},"View")]),N("com.qcobjects.api",[y(class extends G("InheritClass"){constructor(){super(...arguments),U(this,"kind","rest"),U(this,"domain",R),U(this,"basePath",Oe),U(this,"url",""),U(this,"method","GET"),U(this,"data",{}),U(this,"reload",!1),U(this,"cached",!1)}set(e,n){this[e]=n}get(e){return this[e]}},"Service")]),N("com.qcobjects.api.services",[y(class extends G("Service"){constructor(){super(...arguments),U(this,"method","GET"),U(this,"cached",!1),U(this,"headers",{"Content-Type":"application/json",charset:"utf-8"}),U(this,"JSONresponse",null)}done(e){v.debug("***** RECEIVED RESPONSE:"),v.debug(e.service.template),this.JSONresponse=JSON.parse(e.service.template)}},"JSONService")]),N("com.qcobjects.api.config",[y(class extends G("JSONService"){constructor(){super(...arguments),U(this,"method","GET"),U(this,"cached",!1),U(this,"configFileName","config.json"),U(this,"headers",{"Content-Type":"application/json",charset:"utf-8"}),U(this,"JSONresponse",null),this.set("url",this.get("basePath")+this.get("configFileName"))}done(e){v.debug("***** CONFIG LOADED:"),v.debug(e.service.template),this.JSONresponse=JSON.parse(e.service.template),Object.hasOwnProperty.call(this.JSONresponse,"__encoded__")&&(this.JSONresponse=JSON.parse(G("_Crypt").decrypt(this.JSONresponse.__encoded__,K)));for(var n in this.JSONresponse)l.CONFIG.set(n,this.JSONresponse[n]);this.configLoaded.call(this)}fail(e){this.configLoaded.call(this)}},"ConfigService")]),N("com.qcobjects.valueObjects",[y(class extends G("InheritClass"){constructor(){super(...arguments)}},"VO")]);var We=y(function(e){var n="";if(e.TPL_SOURCE==="default"){n="{{COMPONENTS_BASE_PATH}}{{COMPONENT_NAME}}.{{TPLEXTENSION}}";for(var s in e){var c=e[s];n=n.replace("{{"+s+"}}",e[s])}}return n},"ComponentURI"),st=y(function(e,n){var s,c=y(function(_,b){return s=new Promise(function(E,k){var q=_.__promise__,re=Object.hasOwnProperty.call(_,"container")&&typeof _.container<"u"&&_.container!==null?_.container:_.body;if(re!==null){var Z=y(function(je){je.feedComponent();var rt={request:se,component:je};E.call(q,rt)},"_feedComponent_");v.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",V(_.data)).replace("{{URL}}",_.url));var he=y(function(){var je=ie?0:200;if(se.status===je){var rt=se.responseText;v.debug("Data received {{DATA}}".replace("{{DATA}}",V(rt))),v.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",_.name)),_.template=rt,_.cached&&typeof ne<"u"&&ne.save(_.name,_.template),Z.call(this,_)}else{var Gt={request:se,component:_};k.call(q,Gt)}},"_componentLoaded");if(typeof _.template=="string"&&_.template!=="")Z.call(this,_);else{var ie=!!_.url.startsWith("file:"),se=new XMLHttpRequest;if(ie){if("fetch"in l){v.debug("I can use fetch..."),v.debug("It is a file to be loaded, so I will try to use fetch");var Le=fetch(_.url).then(je=>{v.debug("I got a response from fetch, so I'll feed the component"),je.text().then(rt=>{_.template=rt,Z.call(this,_)})})}}else try{v.debug("Calling the url of component in async mode."),se.open(_.method,_.url,!0)}catch{v.debug("Last try has failed... The component cannot be loaded.")}!xe&&!ie&&se.setRequestHeader("Content-Type","text/html"),ie||(se.onload=he);var Te=y(function(je){je=!(typeof je>"u"||!je),v.debug("SENDING THE NORMAL REQUEST "),je?"fetch"in l||(v.debug("I have to try to load the file using xhr... "),se.send(null),se.status===XMLHttpRequest.DONE&&he.call(this)):(v.debug("Trying to send the data to the component... "),se.send(V(_.data)))},"_directLoad");if(_.cached&&!ie){v.debug("USING CACHE FOR COMPONENT: "+_.name);var ne=new Ce({index:_.cacheIndex,load(je){Te.call(this,ie)},alternate(je){_.method==="GET"?(_.template=je.cache.getCached(_.cacheIndex),Z.call(this,_)):Te.call(this,ie)}});S.lastCache=ne}else v.debug("NOT USING CACHE FOR COMPONENT: "+_.name),Te.call(this,ie)}}else v.debug("CONTAINER DOESNT EXIST")}),s.then(function(E){return _.__done__().then(function(){var k;return typeof _.done=="function"&&(k=_.done.call(_,E)),Promise.resolve(k)})},function(E){var k;return typeof _.fail=="function"&&(k=_.fail.call(_,E)),Promise.reject(k)}).catch(function(E){v.debug("Something wrong loading the component")}),s},"_componentLoaderInBrowser"),p=y(function(_,b){return s=new Promise(function(E,k){var q=s,re=y(function(se){se.feedComponent();var Le={request:null,component:se};E.call(q,Le)},"_feedComponent_");v.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",V(_.data)).replace("{{URL}}",_.url));var Z=y(function(se,Le){if(se){var Te={request:null,component:_};k.call(q,Te)}else{var ne=Le.toString();v.debug("Data received {{DATA}}".replace("{{DATA}}",V(ne))),v.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",_.name)),_.template=ne,_.cached&&typeof ie<"u"&&ie.save(_.name,_.template),re.call(this,_)}},"_componentLoaded");if(typeof _.template=="string"&&_.template!=="")re.call(this,_);else{v.debug("Loading the component as a local file in server...");var he=y(function(se){let Le=P("fs");v.debug("SENDING THE NORMAL REQUEST "),Le.readFile(_.url,Z)},"_directLoad");if(_.cached){v.debug("USING CACHE FOR COMPONENT: "+_.name);var ie=new Ce({index:_.cacheIndex,load(se){he.call(this)},alternate(se){_.method==="GET"?(_.template=se.cache.getCached(_.cacheIndex),re.call(this,_)):he.call(this)}});S.lastCache=ie}else v.debug("NOT USING CACHE FOR COMPONENT: "+_.name),he.call(this)}}),s.then(function(E){return _.__done__().then(function(){var k;return typeof _.done=="function"&&(k=_.done.call(_,E)),Promise.resolve(k)})},function(E){var k;return typeof _.fail=="function"&&(k=_.fail.call(_,E)),Promise.reject(k)}).catch(function(E){v.debug("Something wrong loading the component")}),s},"_componentLoaderInNode"),m;return C?typeof n<"u"&&n?m=we(c,arguments):m=c(e,n):m=p(e,n),m},"componentLoader"),ye=y(function(e,n){var s=y(function(b,E){var k=new Promise(function(q,re){v.debug("LOADING SERVICE DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",V(b.data)).replace("{{URL}}",b.url));var Z=new XMLHttpRequest;Z.withCredentials=b.withCredentials;var he=!0;Z.open(b.method,b.url,he);for(var ie in b.headers)try{typeof b.headers[ie]!="function"&&Z.setRequestHeader(ie,b.headers[ie])}catch{v.debug("Something went wrong when assign the header "+ie)}Z.onload=function(){if(Z.status===200){var Te=Z.responseText;if(v.debug("Data received {{DATA}}".replace("{{DATA}}",V(Te))),v.debug("CREATING SERVICE {{NAME}}".replace("{{NAME}}",b.name)),b.template=Te,b.cached&&typeof Le<"u"&&Le.save(b.name,b.template),typeof b.done=="function"){var ne={request:Z,service:b};b.done.call(b,ne),q.call(k,ne)}}else if(typeof b.fail=="function"){var ne={request:Z,service:b};b.fail.call(b,ne),re.call(k,ne)}};var se=y(function(){v.debug("SENDING THE NORMAL REQUEST ");try{Z.send(V(b.data))}catch{v.debug("SOMETHING WRONG WITH REQUEST "),re.call(k,{request:Z,service:b})}},"_directLoad");if(b.cached){var Le=new Ce({index:b.data,load(Te){se.call(this)},alternate(Te){if(b.method==="GET"){if(b.template=Te.cache.getCached(b.name),typeof b.done=="function"){var ne={request:Z,service:b};b.done.call(b,ne),q.call(k,ne)}}else se.call(this)}});S.lastCache=Le}else se.call(this);return Z});return k},"_serviceLoaderInBrowser"),c=y(function(b,E){var k=new Promise(function(q,re){if(typeof URL>"u"){S.URL=P("url").URL;let De=S.URL}var Z=new URL(b.url),he;b.useHTTP2=Object.hasOwnProperty.call(b,"useHTTP2")&&b.useHTTP2;var ie=y(function(De){v.debug("LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}".replace("{{DATA}}",V(b.data)).replace("{{URL}}",b.url));var Ot,Dt={http2Client:Te,request:De,service:b,responseHeaders:null};if(typeof b.data=="object"&&b.data!==null&&b.useHTTP2)try{v.debug("Sending data...");let Ct=new Buffer(V(b.data));De.write(Ct)}catch{v.debug("It was not possible to send any data")}Ot="",De.on("response",(Ct,Kt)=>{v.debug("receiving response..."),Dt.responseHeaders=Ct,Ot=""}),De.on("data",Ct=>{v.debug("receiving data..."),Ot+=""+Ct.toString(),b.template=Ot}),b.useHTTP2&&De.resume(),De.on("end",()=>{v.debug("ending call..."),b.template=Ot,Object.hasOwnProperty.call(b,"useHTTP2")&&b.useHTTP2?Te.destroy():De.destroy(),b.done.call(b,Dt),q.call(k,Dt)}),b.useHTTP2&&De.end()},"captureEvents");try{var se;if(b.useHTTP2){v.debug("using http2");var Le=P("http2"),Te=Le.connect(Z.origin);se=Object.assign({":method":b.method,":path":Z.pathname},b.options),se=Object.assign(se,b.headers),he=Te.request(se),he.setEncoding("utf8"),ie(he)}else if(Z.protocol==="http:"){var ne=P("http"),je=ne.request;se=Object.assign({url:b.url,headers:b.headers},b.options);var he=je(b.url);ie(he)}else if(Z.protocol==="https:"){var rt=P("https");se=Object.assign({hostname:Z.hostname,port:Z.port,path:Z.pathname,method:b.method,headers:b.headers},b.options);var Gt=rt.request(se,function(De){ie(De)});Gt.end()}else{var Ut="Protocol not supported: "+Z.protocol;throw v.debug(Ut),new Error(Ut)}}catch(De){v.debug(De),b.fail.call(b,De),re.call(k,De)}}).catch(function(q){console.log(q),v.debug("Something happened when trying to call the service: "+b.name),b.fail.call(b,q)});return k},"_serviceLoaderInNode"),p=y(function(b,E){var k=new Promise(function(q,re){v.debug(`Calling mockup service ${b.name} ...`);var Z={request:null,service:b,responseHeaders:b.responseHeaders};typeof b.mockup=="function"?b.mockup.call(b,Z):b.done.call(b,Z),q.call(k,Z)});return k},"_serviceLoaderMockup"),m=y(function(b,E){var k=new Promise(function(q,re){v.debug(`Calling local service ${b.name} ...`);var Z={request:null,service:b,responseHeaders:b.responseHeaders};typeof b.local=="function"?b.local.call(b,Z):b.done.call(b,Z),q.call(k,Z)});return k},"_serviceLoaderLocal"),_;switch(e.kind){case"rest":C?typeof n<"u"&&n?_=we(s,arguments):_=s(e,n):_=c(e,n);break;case"mockup":_=p(e,n);break;case"local":_=m(e,n);break;default:v.debug(`The value of the kind property of the service ${e.name} is not valid`);break}return _},"serviceLoader");if(r(ye),r(st),r(We),r(Je),r(V),r(I),r(g),r(D),C){Element.prototype.buildComponents=function(e=!1){var n=de,s=this,c=s.subelements(n);return Ne(c,null)},HTMLDocument.prototype.buildComponents=Element.prototype.buildComponents,HTMLElement.prototype.buildComponents=Element.prototype.buildComponents;var ke=y(class extends HTMLElement{constructor(){super(...arguments);let e=this,n=e.nodeName.toLowerCase(),s=ce("quick-component"),c=e.getAttributeNames();s.setAttribute("name",n),e.hasAttribute("shadowed")||s.setAttribute("shadowed","true"),c.map(function(m){e.hasAttribute(m)&&(s.setAttribute(m,e.getAttribute(m)),e.removeAttribute(m))});var p=e.getAttributeNames().filter(function(m){return m.startsWith("data-")}).map(function(m){return m.split("-")[1]});p.map(function(m){s.setAttribute("data-"+m,e.getAttribute("data-"+m)),e.removeAttribute("data-"+m)}),[...e.children].map(function(m){s.appendChild(m.cloneNode(!0)),m.remove()}),e.append(s)}},"_ComponentWidget_");r(ke);var et=y(function(e){customElements.define(e,class extends ke{})},"RegisterWidget"),yt=y(function(){var e=[...arguments];e.filter(function(n){return typeof n=="string"}).map(function(n){et(n)})},"RegisterWidgets");F(et),F(yt),r(et),r(yt)}C||N("com.qcobjects.api",[y(class extends G("InheritClass"){constructor({domain:e=R,basePath:n=Oe,body:s=null,stream:c=null,request:p=null}){super(...arguments),v.debug("Initializing BackendMicroservice...");let m=this;typeof this.body>"u"&&(this.body=null),typeof s<"u"&&(this.body=s),this.cors(),m.stream=c,c.on("data",E=>{var k=p.method.toLowerCase(),q={post:m.post};Object.hasOwnProperty.call(q,k)&&q[k].call(m,E)});var _=p.method.toLowerCase(),b={get:m.get,head:m.head,put:m.put,delete:m.delete,connect:m.connect,options:m.options,trace:m.trace,patch:m.patch};Object.hasOwnProperty.call(b,_)&&b[_].call(m)}cors(){if(this.route.cors){v.debug("Validating CORS...");let{allow_origins:n,allow_credentials:s,allow_methods:c,allow_headers:p}=this.route.cors;var e=this;if(typeof e.headers!="object"&&(e.headers={}),typeof e.route.responseHeaders!="object"&&(e.route.responseHeaders={}),typeof n<"u")if(v.debug("CORS: allow_origins available. Validating origins..."),n==="*"||typeof e.request.headers.origin>"u"||[...n].indexOf(e.request.headers.origin)!==-1)v.debug("CORS: Adding header Access-Control-Allow-Origin=*"),e.route.responseHeaders["Access-Control-Allow-Origin"]="*";else{v.debug("CORS: Origin is not allowed: "+e.request.headers.origin),v.debug("CORS: Forcing to finish the response..."),this.body={};try{this.done()}catch(m){v.debug(`It was not possible to finish the call to the microservice: ${m}`)}}else v.debug("CORS: no allow_origins available. Allowing all origins..."),v.debug("CORS: Adding header Access-Control-Allow-Origin=*"),e.route.responseHeaders["Access-Control-Allow-Origin"]="*";typeof s<"u"?(v.debug(`CORS: allow_credentials present. Allowing ${s}...`),e.route.responseHeaders["Access-Control-Allow-Credentials"]=s.toString()):(v.debug("CORS: No allow_credentials present. Allowing all credentials."),e.route.responseHeaders["Access-Control-Allow-Credentials"]="true"),typeof c<"u"?(v.debug(`CORS: allow_methods present. Allowing ${c}...`),e.route.responseHeaders["Access-Control-Allow-Methods"]=[...c].join(",")):(v.debug("CORS: No allow_methods present. Allowing only GET, OPTIONS and POST"),e.route.responseHeaders["Access-Control-Allow-Methods"]="GET, OPTIONS, POST"),typeof p<"u"?(v.debug(`CORS: allow_headers present. Allowing ${p}...`),e.route.responseHeaders["Access-Control-Allow-Headers"]=[...p].join(",")):(v.debug("CORS: No allow_headers present. Allowing all headers..."),e.route.responseHeaders["Access-Control-Allow-Headers"]="*")}else v.debug("No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors")}head(e){this.done()}get(e){v.debug(`[BackendMicroservice.get] Data received: ${V(e)}`),this.done()}post(e){this.done()}put(e){this.done()}delete(e){this.done()}connect(e){this.done()}options(e){this.done()}trace(e){this.done()}patch(e){this.done()}finishWithBody(e){try{v.debug("[BackendMicroservice.finishWithBody] Ending the stream..."),v.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`),typeof this.body!="string"&&(this.body=V(this.body)),v.debug(`[BackendMicroservice.finishWithBody] + body: ${this.body} `),e.write(this.body),e.end(),v.debug("[BackendMicroservice.finishWithBody] Stream ended.")}catch(n){v.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${n}`)}}done(){v.debug("[BackendMicroservice.done] Finalizing the response...");var e=this,n=e.stream;try{if(v.debug("[BackendMicroservice.done] Sending response headers..."),e.route.responseHeaders)v.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(e.route.responseHeaders)}`),n.respond(e.route.responseHeaders);else throw Error("[BackendMicroservice.done] No headers present.")}catch(s){v.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${s}`)}if(e.body!==null)try{v.debug("[BackendMicroservice.done] A body of message is present. Finalizing the response..."),e.finishWithBody.call(e,n)}catch(s){v.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${s}`)}else v.debug("[BackendMicroservice.done] No body present. Ending stream..."),n.end()}},"BackendMicroservice")]),Q("SourceJS",Object,{domain:R,basePath:Oe,body:ce("script"),type:"text/javascript",containerTag:"body",url:"",data:{},async:!1,external:!1,set(e,n){this[e]=n},get(e){return this[e]},status:!1,done(){},fail(){},rebuild(){var e=this;try{document.getElementsByTagName(e.containerTag)[0].appendChild(function(n,s,c){return n.type=c.type,n.src=s,n.crossOrigin=Object.hasOwnProperty.call(c,"crossOrigin")?c.crossOrigin:"anonymous",n.async=c.async,n.onreadystatechange=function(){this.readyState==="complete"&&c.done.call(c)},n.onload=function(p){c.status=!0,c.done.call(c,p)},n.onerror=function(p){c.status=!1,c.fail.call(c,p)},c.body=n,n}.call(this,ce("script"),this.external?this.url:this.basePath+this.url,e))}catch(n){e.status=!1,e.fail.call(e,n)}},Cast(e){return Ye(this,e)},_new_(e){this.__new__(e),this.rebuild()}}),Q("SourceCSS",Object,{domain:R,basePath:Oe,body:ce("link"),url:"",data:{},async:!1,external:!1,set(e,n){this[e]=n},get(e){return this[e]},done(){},rebuild(){var e=this;C&&window.document.getElementsByTagName("head")[0].appendChild(function(n,s,c){return n.type="text/css",n.rel="stylesheet",n.href=s,n.crossOrigin="anonymous",n.onreadystatechange=function(){this.readyState==="complete"&&c.done.call(c)},n.onload=c.done,c.body=n,n}.call(this,ce("link"),this.external?this.url:this.basePath+this.url,e))},Cast(e){return Ye(this,e)},_new_(e){this.__new__(e),this.rebuild()}});var Ge=y(function(e){return isNaN(e)?new Number(0):new Number(e)},"__to_number");Array.prototype.unique=function(){return this.filter(function(e,n,s){return s.indexOf(e)===n})},Array.unique=function(e){return e.unique()},F(Array.unique),F(Array.prototype.unique),Array.prototype.table=function(){console.table(this)},Array.table=function(e){return e.table()},F(Array.table),F(Array.prototype.table),Array.prototype.sum=function(){return this.reduce(function(e,n){return Ge(e)+Ge(n)},0)},Array.sum=function(e){return e.sum()},F(Array.sum),F(Array.prototype.sum),Array.prototype.avg=function(){return this.length<1?0:this.reduce(function(e,n){return(Ge(e)+Ge(n))/2})},Array.avg=function(e){return e.avg()},F(Array.avg),F(Array.prototype.avg),Array.prototype.min=function(){return this.reduce(function(e,n){return Ge(e)<=Ge(n)?e:n},1/0)},Array.min=function(e){return e.min()},F(Array.min),F(Array.prototype.min),Array.prototype.max=function(){return this.reduce(function(e,n){return Ge(e)>=Ge(n)?e:n},0)},Array.max=function(e){return e.max()},F(Array.max),F(Array.prototype.max),Array.prototype.sortBy=function(e,n=!0){var s=n?function(c,p){return p[e]c[e]?1:-1};return this.sort(s)},Array.sortBy=function(e,n,s=!0){return e.sortBy(n,s)},F(Array.sortBy),F(Array.prototype.sortBy),Array.matrix=function(e,n=0){var s=y(function(c){return n},"x_func");return Array.from({length:e},s)},F(Array.matrix),Array.matrix2d=function(e,n=0){var s=y(function(p){return n},"y_func"),c=y(function(p){return Array.from({length:e},s)},"x_func");return Array.from({length:e},c)},F(Array.matrix2d),Array.matrix3d=function(e,n=0){var s=y(function(p){return Array.from({length:e},function(){return n})},"y_func"),c=y(function(p){return Array.from({length:e},s)},"x_func");return Array.from({length:e},c)},F(Array.matrix3d),l.range=function(e,n=0,s=1){return(n===0||typeof n>"u")&&(n=e,e=0),Array.from({length:(n-e)/s+1},function(c,p){return e+p*s})},F(l.range),String.prototype.list=function(){var e=this;return l.range(0,e.length-1).map(function(n){return e[n]})},F(String.prototype.list),l.getDocumentLayout=function(){var e=y((c,p)=>c>p?"landscape":null,"h"),n=y((c,p)=>p>c?"portrait":null,"v"),s=y((c,p)=>c===p?"square":null,"square");return[e(document.documentElement.clientWidth,document.documentElement.clientHeight),n(document.documentElement.clientWidth,document.documentElement.clientHeight),s(document.documentElement.clientWidth,document.documentElement.clientHeight)].filter(c=>c!==null).pop()},Q("ArrayList",Array,[]),G("ArrayList").matrix=Array.matrix,G("ArrayList").matrix2d=Array.matrix2d,G("ArrayList").matrix3d=Array.matrix3d,F(G("ArrayList").matrix),F(G("ArrayList").matrix2d),F(G("ArrayList").matrix3d),Q("ArrayCollection",Object,{source:o(G("ArrayList"),[]),changed(e,n){v.debug("VALUE CHANGED"),v.debug(e),v.debug(n)},push(e){var n=this;v.debug("VALUE ADDED"),v.debug(e),n.source.push(e)},pop(e){var n=this;v.debug("VALUE POPPED"),v.debug(e),n.source.pop(e)},_new_(e){var n=this,s=0;n.source=o(G("ArrayList"),e);for(var c in n.source)isNaN(c)||(v.debug("binding "+c.toString()),function(p){Object.defineProperty(n,p,{set(m){v.debug("setting "+p+"="+m),n.source[p]=m,n.changed(p,m)},get(){return n.source[p]}})}(c),s++);n.source.length=s,Object.defineProperty(n,"length",{get(){return n.source.length}})}}),N("com.qcobjects.effects.base",[y(class extends G("InheritClass"){constructor(){super(...arguments),U(this,"duration",1e3)}animate({timing:e,draw:n,duration:s}){let c=performance.now();requestAnimationFrame(y(O(function p(m){let _=(m-c)/s;_>1&&(_=1);let b=e(_);n(Math.round(b*100)),_<1?requestAnimationFrame(p):typeof this<"u"&&this!==null&&Object.hasOwnProperty.call(this,"done")&&(typeof this.done).toLowerCase()==="function"&&this.done.call(this)},"i"),"animate"))}},"Effect")]),N("com.qcobjects.effects.transitions.base",[y(class extends G("Effect"){constructor(){super(...arguments),U(this,"duration",385),U(this,"defaultParams",{alphaFrom:0,alphaTo:1,angleFrom:180,angleTo:0,radiusFrom:0,radiusTo:30,scaleFrom:0,scaleTo:1}),U(this,"fitToHeight",!1),U(this,"fitToWidth",!1),U(this,"effects",[]),v.info("DECLARING TransitionEffect "),this.component.defaultParams=this.defaultParams}apply({alphaFrom:e,alphaTo:n,angleFrom:s,angleTo:c,radiusFrom:p,radiusTo:m,scaleFrom:_,scaleTo:b}){var E=this;v.info("EXECUTING TransitionEffect ");var k=E.component.shadowed?E.component.shadowRoot.host:E.component.body;E.fitToHeight&&(k.height=typeof k.offsetParent=="object"&&k.offsetParent!==null?k.offsetParent.scrollHeight:k.getBoundingClientRect().height),E.fitToWidth&&(k.width=typeof k.offsetParent=="object"&&k.offsetParent!==null?k.offsetParent.scrollWidth:k.getBoundingClientRect().width),k.style.display="block",E.effects.map(function(q,re){var Z=G(q),he=new Z,ie=he.apply,se=[k].concat(Object.values({alphaFrom:e,alphaTo:n,angleFrom:s,angleTo:c,radiusFrom:p,radiusTo:m,scaleFrom:_,scaleTo:b}));ie.apply(E,se)})}},"TransitionEffect")]),N("com.qcobjects.timing",[y(class extends G("InheritClass"){constructor(){super(...arguments),U(this,"duration",1e3),U(this,"alive",!0)}thread({timing:e,intervalInterceptor:n,duration:s}){var c=this;let p=performance.now();requestAnimationFrame(y(O(function m(_){let b=_-p,E=b/s;E>1&&(E=1);let k=e(E,b);n(Math.round(k*100)),(E<1||s===-1)&&c.alive&&requestAnimationFrame(m)},"d"),"thread"))}},"Timer")]),N("com.qcobjects.tools.essentials",[y(class extends G("InheritClass"){constructor(){super(...arguments),U(this,"_toggle",!1),U(this,"_inverse",!0),U(this,"_positive",null),U(this,"_negative",null),U(this,"_dispatched",null),U(this,"_args",{}),this._new_(...arguments)}changeToggle(){this._toggle=!this._toggle}_new_({positive:e,negative:n,args:s}){this._positive=e,this._negative=n,this._args=s}fire(){var e=this,n=new Promise(function(s,c){typeof e._positive=="function"&&typeof e._negative=="function"?(e._inverse?e._dispatched=e._toggle?e._negative.bind(e):e._positive.bind(e):e._dispatched=e._toggle?e._positive.bind(e):e._negative.bind(e),e._dispatched.call(e,e._args),s.call(n,e)):(v.debug("Toggle functions are not declared"),c.call(n,e))}).then(function(s){s.changeToggle()}).catch(function(s){v.debug(s.toString())});return n}},"Toggle")]),function(e){let n=y(function(_,b,E){var k=this;if(typeof _>"u"||_===null)throw Error(`mapper.${b}.${E} does not have a component instance or it is null.`);let q=e.global.get(E),re=_.get(E),Z=_.data[E],he=typeof Z<"u"?Z:typeof re<"u"?re:q,ie="";return typeof he<"u"&&typeof he.map<"u"?ie=he.map(function(se){let Le=[...Object.keys(se)].map(Te=>` data-${Te}="${typeof se[Te]<"u"&&se[Te]!==null?se[Te].toString():""}"`).join("");return``}).join(""):v.debug(`${b}.${E} does not have a map property`),ie},"mapper");Re.setProcessor(n);let s=y(function(_,b,E){var k=` + /* CSS Document for Mobile Imports */ + @import url("${E}") (orientation:portrait); + @import url("${E}") (max-width:460px); + @import url("${E}") (aspect-ratio: 9/16); + @import url("${E}") (aspect-ratio: 10/16); + @import url("${E}") (aspect-ratio: 5/8); + @import url("${E}") (aspect-ratio: 3/4); + @import url("${E}") (aspect-ratio: 2/3); + `,q=` + @import url("${E}") (orientation:landscape) and (min-width:460px); + @import url("${E}") (aspect-ratio: 16/9) and (min-width:460px); + @import url("${E}") (aspect-ratio: 16/10) and (min-width:460px); + @import url("${E}") (aspect-ratio: 8/5) and (min-width:460px); + @import url("${E}") (aspect-ratio: 4/3) and (min-width:460px); + @import url("${E}") (aspect-ratio: 3/2) and (min-width:460px); + `,re={landscape:q,portrait:k};return Object.hasOwnProperty.call(re,b)?re[b]:""},"layout");Re.setProcessor(s);let c=y(function(){let _=[...arguments].slice(1).map(function(b){return{[b.split("=")[0]]:b.split("=")[1]}}).reduce(function(b,E){return Object.assign(b,E)});return``},"component");Re.setProcessor(c);let p=y(function(){let _=[...arguments].slice(1).map(function(b){return{[b.split("=")[0]]:b.split("=")[1]}}).reduce(function(b,E){return Object.assign(b,E)});return``},"quick_component");Re.setProcessor(p);let m=y(function(_,b,E){return e.range(b).map(function(k){return E.replace("{{index}}",k.toString())}).join("")},"repeat");Re.setProcessor(m)}(l),mt(function(){l.CONFIG.get("useSDK")||l.__start__()}),r(r),r(H),r(N),r(Q),r(o),r($),r(mt),r(le),r(C),r(oe),function(e){N("com.qcobjects",[y(O(class xt extends G("InheritClass"){constructor(){super(...arguments),U(this,"_GLOBAL",{}),U(this,"__definition",{}),U(this,"__classType","GlobalSettings"),this.set=xt.set.bind(this),this.get=xt.get.bind(this),this.__start__=xt.__start__.bind(this)}static set(s,c){this._GLOBAL[s]=c}static get(s,c){var p;return typeof this._GLOBAL[s]<"u"?p=this._GLOBAL[s]:typeof c<"u"&&(p=c),p}static __start__(){var s=y(function(){var p;return C&&(p=new Promise(function(m,_){"serviceWorker"in navigator&&typeof e.CONFIG.get("serviceWorkerURI")<"u"&&(e.CONFIG.set("serviceWorkerScope",e.CONFIG.get("serviceWorkerScope")?e.CONFIG.get("serviceWorkerScope"):"/"),navigator.serviceWorker.register(e.CONFIG.get("serviceWorkerURI"),{scope:e.CONFIG.get("serviceWorkerScope")}).then(function(b){v.debug("Service Worker Registered"),m.call(p,b)},function(b){v.debug("Error registering Service Worker"),_.call(p,b)}),navigator.serviceWorker.ready.then(function(b){v.debug("Service Worker Ready"),m.call(p,b)},function(b){v.debug("Error loading Service Worker"),_.call(p,b)}))})),p},"__load__serviceWorker"),c=y(function(){return new Promise((p,m)=>{if(C){v.debug("Starting to building components");try{e.componentsStack=document.buildComponents.call(document)}catch(_){throw Error(`Something went wrong trying to start components tree: ${_.message}`)}v.debug("Initializing the service worker"),s.call(e).catch(function(_){v.debug(`error loading the service worker ${_}`)})}p()})},"_buildComponents");v.debug("Starting to load the config settings..."),e.CONFIG.get("useConfigService",!1)?(v.debug("Loading settings using local configuration file..."),e.global.configService=o(G("ConfigService")),e.global.configService.configLoaded=c,ye(e.global.configService)):(v.debug("Starting to load the components..."),c.call(this))}},"Ye"),"GlobalSettings")]),r(G("GlobalSettings")),S=o(G("GlobalSettings")),e=Ue(S,e),Object.defineProperty(e,"PackagesNameList",{set(n){v.debug("PackagesNameList is readonly")},get(){var n=y(function(s){var c=[];for(var p in s)typeof s[p]<"u"&&typeof s[p]!="function"&&Object.hasOwnProperty.call(s[p],"length")&&s[p].length>0&&(c.push(p),c=c.concat(n(s[p])));return c},"_get_packages_names");return n(Ie)}}),Object.defineProperty(e,"PackagesList",{set(n){v.debug("PackagesList is readonly")},get(){return e.PackagesNameList.map(function(n){let s=N(n),c;return s&&(c={packageName:n,classesList:s.filter(function(p){return I(p)})}),c}).filter(function(n){return typeof n<"u"})}}),Object.defineProperty(e,"ClassesList",{set(n){v.debug("ClassesList is readonly")},get(){var n=[];return e.PackagesList.map(function(s){return n=n.concat(s.classesList.map(function(c){return{packageName:s.packageName,className:s.packageName+"."+c.__definition.__classType,classFactory:c}})),s}),n}}),Object.defineProperty(e,"ClassesNameList",{set(n){v.debug("ClassesNameList is readonly")},get(){return e.ClassesList.map(function(n){return n.className})}}),C&&(Q("GLOBAL",Pe.global),r(G("GLOBAL"))),r(S),e.CONFIG.get("useSDK")&&function(n){var s=n.CONFIG.get("remoteImportsPath"),c=!n.CONFIG.get("useLocalSDK");n.CONFIG.set("remoteImportsPath",n.CONFIG.get("remoteSDKPath"));var p=!1,m="QCObjects-SDK";if(C)p=!0;else{var _=t("qcobjects-sdk");_!==null?(m="qcobjects-sdk",p=!0):(m="node_modules/qcobjects-sdk/QCObjects-SDK",p=!0)}if(p)if(v.info("Importing SDK... "+m),T&&typeof _t<"u"){let b=Ke()}else H(m,function(){c?v.debug("QCObjects-SDK.js loaded from remote location"):v.debug("QCObjects-SDK.js loaded from local"),n.CONFIG.set("remoteImportsPath",s)},c);else v.debug("SDK has not been imported as it is not available at the moment")}(e)}(l),C&&we(function(){mt(function(){(function(e){let n=0,s=!1,c=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),p=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth);function m(_){var b=Math.round(e.scrollY*100/c),E=Math.round(e.scrollX*100/p),k=new CustomEvent("scrollpercent",{detail:{percentX:E,percentY:b}});_.target.dispatchEvent(k);var q="defaultscroll",re=[0,5,10,25,50,75,90,95,100];re.filter(function(Z){return Z===b}).map(function(Z){q="percentY"+b.toString();var he=new CustomEvent(q,{detail:{percentX:E,percentY:b}});_.target.dispatchEvent(he)})}O(m,"a"),y(m,"scrollDispatcher"),document.addEventListener("scroll",function(_){s||(requestAnimationFrame(function(){m(_),s=!1}),s=!0)})})(l)})},null),C||(typeof l.global<"u"&&Object.hasOwnProperty.call(l.global,"_fireAsyncLoad")&&l.global._fireAsyncLoad.call(this),typeof l.global<"u"&&Object.hasOwnProperty.call(l.global,"onload")&&l.global.onload.call(this)),function(e){var n=y(function(){Object.freeze(Object.prototype),Object.freeze(Object)},"__freeze__");e&&l.CONFIG.get("secureObjects",!1)?mt(function(){n()}):l.CONFIG.get("secureObjects",!1)&&n()}(C)}},"w"),"__qcobjects__").call(null,typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{})}),_e=L((A,f)=>{var d=ve();f.exports=d}),He=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var d=_e();(function(l){"use strict";class S extends d.InheritClass{constructor({messages:C=[]}){super({messages:C}),d.CONFIG.get("use_i18n",!1)&&(d.CONFIG.set("lang","en"),l.get("i18n")?l.set("i18n",{messages:l.get("i18n").messages.concat(C)}):l.set("i18n",{messages:C}))}_load_i18n_packages_(){return d.CONFIG.get("i18n_languages",[]).map(C=>{(0,d.Import)(`org.quickcorp.i18n_messages.${C}`)})}}O(S,"r"),y(S,"i18n_messages"),(0,d.Package)("org.qcobjects.i18n_messages",[S]),new S({})._load_i18n_packages_()})(typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{})}),Ee=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.models",[y(class extends f.VO{},"Contact")])})()}),tt=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.ModalMoveUp=A.ModalMoveDown=A.ModalFade=A.WipeDown=A.WipeUp=A.WipeRight=A.WipeLeft=A.Resize=A.Radius=A.Rotate=A.RotateZ=A.RotateY=A.RotateX=A.MoveYInFromTop=A.MoveYInFromBottom=A.MoveXInFromLeft=A.MoveXInFromRight=A.Move=A.Fade=void 0;var d=_e(),l=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};(function(){"use strict";class v extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("alpha: "+Q.toString()),Y.style.opacity=Q.toString()}})}}O(v,"w"),y(v,"Fade");class fe extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe,me,J){let Q=me-X,G=J-pe;Y.style.transform="translate("+X+"px,"+pe+"px)",this.animate({duration:this.duration,timing(Ze){return Ze},draw(Ze){d.logger.debug("animation progress: "+Ze.toString());let o=pe+Ze*G/100,r=X+Ze*Q/100;d.logger.debug("x: "+r.toString()+" y:"+o.toString()),Y.style.transform="translate("+r+"px,"+o+"px)"}})}}O(fe,"r"),y(fe,"Move"),(0,d.Package)("org.qcobjects.effects.base",[v,fe]);class B extends fe{constructor(){super(...arguments),this.duration=1e3}apply(Y){super.apply.call(this,Y,Y.width,0,0,0)}}O(B,"f"),y(B,"MoveXInFromRight");class z extends fe{constructor(){super(...arguments),this.duration=1e3}apply(Y){super.apply.call(this,Y,-Y.width,0,0,0)}}O(z,"p"),y(z,"MoveXInFromLeft");class Ce extends fe{constructor(){super(...arguments),this.duration=1e3}apply(Y){super.apply.call(this,Y,0,Y.height,0,0)}}O(Ce,"u"),y(Ce,"MoveYInFromBottom");class qe extends fe{constructor(){super(...arguments),this.duration=1e3}apply(Y){super.apply.call(this,Y,0,-Y.height,0,0)}}O(qe,"v"),y(qe,"MoveYInFromTop");class dt extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=Math.round(X+J*me/100);d.logger.debug("angle: "+Q.toString()),Y.style.transform="rotate3d(1,0,0,"+Q.toString()+"deg)"}})}}O(dt,"g"),y(dt,"RotateX");class ht extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=Math.round(X+J*me/100);d.logger.debug("angle: "+Q.toString()),Y.style.transform="rotate3d(0,1,0,"+Q.toString()+"deg)"}})}}O(ht,"b"),y(ht,"RotateY");class ze extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=Math.round(X+J*me/100);d.logger.debug("angle: "+Q.toString()),Y.style.transform="rotate3d(0,0,1,"+Q.toString()+"deg)"}})}}O(ze,"O"),y(ze,"RotateZ");class bt extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=Math.round(X+J*me/100);d.logger.debug("angle: "+Q.toString()),Y.style.transform="rotate3d(1,1,1,"+Q.toString()+"deg)"}})}}O(bt,"G"),y(bt,"Rotate");class pt extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("radius: "+Q.toString()),Y.style.borderRadius=Q.toString()+"px"}})}}O(pt,"P"),y(pt,"Radius");class ot extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("resize: "+Q.toString()),Y.style.transformOrigin="center",Y.style.transform="scale("+Q+","+Q+")"}})}}O(ot,"y"),y(ot,"Resize");class Pe extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("wipe: "+Q.toString()),Y.style.transformOrigin="right",Y.style.transform="scaleX("+Q+")"}})}}O(Pe,"T"),y(Pe,"WipeLeft");class Ie extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("wipe: "+Q.toString()),Y.style.transformOrigin="left",Y.style.transform="scaleX("+Q+")"}})}}O(Ie,"L"),y(Ie,"WipeRight");class Qe extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("wipe: "+Q.toString()),Y.style.transformOrigin="bottom",Y.style.transform="scaleY("+Q+")"}})}}O(Qe,"D"),y(Qe,"WipeUp");class Xe extends d.Effect{constructor(){super(...arguments),this.duration=1e3}apply(Y,X,pe){let me=pe-X;this.animate({duration:this.duration,timing(J){return J},draw(J){d.logger.debug("animation progress: "+J.toString());let Q=X+J*me/100;d.logger.debug("wipe: "+Q.toString()),Y.style.transformOrigin="top",Y.style.transform="scaleY("+Q+")"}})}}O(Xe,"ae"),y(Xe,"WipeDown"),(0,d.Package)("org.qcobjects.effects.extended",[B,z,Ce,qe,dt,ht,ze,bt,pt,ot,Pe,Ie,Qe,Xe]);class Je extends v{constructor(){super(...arguments),this.duration=500}}O(Je,"le"),y(Je,"ModalFade");class Ye extends fe{constructor(){super(...arguments),this.duration=300}}O(Ye,"he"),y(Ye,"ModalMoveDown");class Ue extends fe{constructor(){super(...arguments),this.duration=800}}O(Ue,"be"),y(Ue,"ModalMoveUp"),(0,d.Package)("org.qcobjects.modal.effects",[Je,Ye,Ue])})();var S=l.Fade;A.Fade=S;var x=l.Fade;A.Move=x;var C=l.MoveXInFromRight;A.MoveXInFromRight=C;var T=l.MoveXInFromLeft;A.MoveXInFromLeft=T;var M=l.MoveYInFromBottom;A.MoveYInFromBottom=M;var P=l.MoveYInFromTop;A.MoveYInFromTop=P;var F=l.RotateX;A.RotateX=F;var oe=l.RotateY;A.RotateY=oe;var ce=l.RotateZ;A.RotateZ=ce;var V=l.Rotate;A.Rotate=V;var ue=l.Radius;A.Radius=ue;var R=l.Resize;A.Resize=R;var Oe=l.WipeLeft;A.WipeLeft=Oe;var de=l.WipeRight;A.WipeRight=de;var K=l.WipeUp;A.WipeUp=K;var xe=l.WipeDown;A.WipeDown=xe;var we=l.ModalFade;A.ModalFade=we;var Fe=l.ModalMoveDown;A.ModalMoveDown=Fe;var $e=l.ModalMoveUp;A.ModalMoveUp=$e}),nt=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.SwaggerUIComponent=A.ModalEnclosureComponent=A.ModalComponent=A.EmailField=A.TextField=A.InputField=A.ButtonField=A.ShadowedComponent=A.FormField=void 0;var d=_e(),l=tt(),S=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};(function(ue){class R extends d.Component{constructor(B){B.name=typeof B.name<"u"?B.name:"form-field",super(B),this.cached=!1,this.reload=!0}createBindingEvents(){let B;typeof this.fieldType>"u"||this.fieldType==null?B=this.body.subelements("*[data-field]"):B=this.body.subelements(this.fieldType+"[data-field]");for(let z=0;z{d.logger.debug("Executing change event binding"),this.executeBindings()}),Ce.addEventListener("blur",()=>{d.logger.debug("Executing change event binding"),this.executeBindings()}),Ce.addEventListener("focus",()=>{d.logger.debug("Executing change event binding"),this.executeBindings()}),Ce.addEventListener("keydown",()=>{d.logger.debug("Executing keydown event binding"),this.executeBindings()})}}executeBinding(B){let z=B.getAttribute("data-field");d.logger.debug("Binding "+z+" for "+this.name),this.data[z]=B.value}executeBindings(){let B;typeof this.fieldType>"u"||this.fieldType==null?B=this.body.subelements("*[data-field]"):B=this.body.subelements(this.fieldType+"[data-field]");for(let z=0;z + + +`,this.data={}}}O(Fe,"b"),y(Fe,"ModalEnclosureComponent");class $e extends d.Component{constructor(B){B.basePath=d.CONFIG.get("modalBasePath",d.CONFIG.get("remoteSDKPath","")),super(B),this.name="modal",this.cached=!1,this.modalEnclosureComponentClass="ModalEnclosureComponent",this.controller=null,this.view=null,this.tplsource="none",this.closeOnClickOutside=!1,this.data={content:"",modalId:0},this.submodal=null,this.data.modalId=this.__instanceID;let z=(0,d.New)((0,d.ClassFactory)(this.modalEnclosureComponentClass),{name:this.name,basePath:this.basePath,data:this.data});this.subcomponents.push(z),this.submodal=z,z.tplsource==="none"?this.body.innerHTML=z.parsedAssignmentText:this.body.append(z.body)}modal(){let B=this.data.modalId;(0,d.Tag)("#modalInstance_"+B+".modal").map(z=>(z.style.display="block",new l.ModalFade({}).apply(z,0,1))),(0,d.Tag)("#modalInstance_"+B+".modal .modal-content").map(z=>new l.ModalMoveDown({}).apply(z,0,-document.body.clientHeight,0,0)),(0,d.Tag)("#modalInstance_"+B+".modal .modal-content .close").map(z=>z.addEventListener("click",()=>{this.close()},!1)),this.closeOnClickOutside&&window.addEventListener("click",()=>{this.close()},!1)}close(){let B=this.data.modalId;(0,d.Tag)("#modalInstance_"+B+".modal").map(z=>(z.style.display="block",new l.ModalFade({}).apply(z,1,0))),(0,d.Tag)("#modalInstance_"+B+".modal .modal-content").map(function(z){return new l.ModalMoveUp({}).apply(z,0,0,0,-document.body.clientHeight)}),setTimeout(function(){(0,d.Tag)("#modalInstance_"+B+".modal").map(z=>(z.style.display="none",!0))},900)}rebuild(){let B=super.rebuild();return this.templateURI=(0,d.ComponentURI)({COMPONENTS_BASE_PATH:d.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:"modal",TPLEXTENSION:d.CONFIG.get("tplextension",""),TPL_SOURCE:"default"}),B}}O($e,"O"),y($e,"ModalComponent");class v extends d.Component{constructor(){super(...arguments),this.cached=!1,this.basePath=d.CONFIG.get("remoteSDKPath",""),this.tplextension="tpl.html",this.name="swagger-ui"}}O(v,"G"),y(v,"SwaggerUIComponent"),(0,d.Package)("org.qcobjects.form.components",[Oe,de,K,xe,we,Fe,$e,v]),ue.FormField=R,ue.ShadowedComponent=Oe,ue.ButtonField=de,ue.InputField=K,ue.TextField=xe,ue.EmailField=we,ue.ModalEnclosureComponent=Fe,ue.ModalComponent=$e,ue.SwaggerUIComponent=v})(S);var x=S.FormField;A.FormField=x;var C=S.ShadowedComponent;A.ShadowedComponent=C;var T=S.ButtonField;A.ButtonField=T;var M=S.InputField;A.InputField=M;var P=S.TextField;A.TextField=P;var F=S.EmailField;A.EmailField=F;var oe=S.ModalEnclosureComponent;A.ModalEnclosureComponent=oe;var ce=S.ModalComponent;A.ModalComponent=ce;var V=S.SwaggerUIComponent;A.SwaggerUIComponent=V}),Ve=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.GridItemComponent=A.GridComponent=void 0;var d=_e(),l=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};(function(C){"use strict";class T extends d.Component{constructor(){super(...arguments),this.name="grid-item",this.shadowed=!0,this.tplsource="inline",this.template=` + +

      {{description}}

      +`,this.cached=!1}}O(T,"r"),y(T,"GridItemComponent");class M extends d.Component{constructor(F){super(F),this.name="grid",this.cached=!1,this.view=null,this.shadowed=!0,this.rows=3,this.cols=3,this.templateURI="",this.data={},this.tplsource="inline",this.template="

      Loading...

      ",this.body.setAttribute("controllerClass","DataGridController");let oe=this.body.getAttribute("subcomponentClass")!==null?this.body.getAttribute("subcomponentClass"):"GridItemComponent";this.body.setAttribute("subcomponentClass",oe)}}O(M,"f"),y(M,"GridComponent"),(0,d.Package)("org.qcobjects.components.grid",[M,T]),C.GridComponent=M,C.GridItemComponent=T})(l);var S=l.GridComponent;A.GridComponent=S;var x=l.GridItemComponent;A.GridItemComponent=x}),Nt=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.ListItemComponent=A.ListComponent=void 0;var d=_e(),l=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};(function(C){"use strict";class T extends d.Component{constructor(F){F.name="list-item",super(F),this.shadowed=!1,this.tplsource="inline",this.template='{{label}}',this.cached=!1}}O(T,"r"),y(T,"ListItemComponent");class M extends d.Component{constructor(F){F.name="list",super(F),this.shadowed=!0,this.tplsource="inline",this.template="

      Loading...

      ",this.body.setAttribute("controllerClass","ListController"),this.body.setAttribute("subcomponentClass","ListItemComponent")}}O(M,"f"),y(M,"ListComponent"),(0,d.Package)("org.qcobjects.components.list",[T,M]),C.ListComponent=M,C.ListItemComponent=T})(l);var S=l.ListComponent;A.ListComponent=S;var x=l.ListItemComponent;A.ListItemComponent=x}),it=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.components.slider",[y(class extends f.Component{constructor(d){super(d),this.tplsource="inline",this.template="

      Loading...

      ",this.name="slidelist",this.body.setAttribute("controllerClass","DataGridController");let l=this.body.getAttribute("subcomponentClass")!==null?this.body.getAttribute("subcomponentClass"):"GridItemComponent";this.body.setAttribute("subcomponentClass",l)}},"SlideListComponent"),y(class extends f.Component{constructor(d){super(d),this.effectClass="Fade",this.name="slider_item",this.data.slideNumber=this.data.__dataIndex+1,this.template=` + + `,this.tplsource="inline"}},"SlideItemComponent"),y(class extends f.Component{constructor(d){super(d),this.name="slider",this.template=` + + +
      + + + + +
      +
      + +
      +
      + + `,this.tplsource="inline",this.shadowed=!0,this.data.SERVICE_CLASS=this.body.getAttribute("serviceClass"),this.data.sliderHandler="slider_"+this.__instanceID.toString(),this.body.setAttribute("controllerClass","SliderController")}},"SliderComponent")])})()}),It=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e(),d=tt();(function(){"use strict";class l extends f.Component{constructor(x){x.name="notification",x.body=(0,f._DOMCreateElement)("div"),super(x),this.cached=!1,this.tplsource="inline",this.shadowed=!1,this.template=` + +
      +
      +

      {{title}} {{message}}

      +
      +
      + `,this.kinds=["danger","success","info","warning"]}display(x){let C=y(function(T){T.style.display="block";let M=(0,f.New)(d.Move,{duration:900,apply(F){(0,f._super_)("Fade","apply").call(this,F,0,1),(0,f._super_)("Move","apply").call(this,F,0,-document.body.clientHeight,0,0)}}),P=(0,f.New)(d.Move,{duration:650,apply(F){(0,f._super_)("Fade","apply").call(this,F,1,0),(0,f._super_)("Move","apply").call(this,F,0,0,0,-document.body.clientHeight)}});M.apply(T),setTimeout(function(){P.apply(T)},2e3)},"_display_");x.subelements("div.notification_background").map(T=>(0,f.New)(d.Fade,{duration:500}).apply(T,0,1)),x.subelements("div.notification").map(T=>C(T)),setTimeout(function(){x.remove()},2200)}static success(x){let C=(0,f.New)(l,{name:"notification",shadowed:!0,body:(0,f._DOMCreateElement)("div"),data:{kind:"success",title:"Success!",message:`${x}...`}});document.body.append(C);let T=C.shadowed?C.shadowRoot.host:C.body;C.display(T)}static danger(x){let C=(0,f.New)(l,{name:"notification",shadowed:!0,body:(0,f._DOMCreateElement)("div"),data:{kind:"danger",title:"Danger!",message:`${x}...`}});document.body.append(C);let T=C.shadowed?C.shadowRoot.host:C.body;C.display(T)}static info(x){let C=(0,f.New)(l,{name:"notification",shadowed:!0,body:(0,f._DOMCreateElement)("div"),data:{kind:"info",title:"Info!",message:`${x}...`}});document.body.append(C);let T=C.shadowed?C.shadowRoot.host:C.body;C.display(T)}static warning(x){let C=(0,f.New)(l,{name:"notification",shadowed:!0,body:(0,f._DOMCreateElement)("div"),data:{kind:"warning",title:"Warning!",message:`${x}...`}});document.body.append(C);let T=C.shadowed?C.shadowRoot.host:C.body;C.display(T)}}O(l,"w"),y(l,"NotificationComponent"),(0,f.Package)("org.quickcorp.components.notifications",[l])})()}),gt=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.CubeSplashScreenComponent=A.VideoSplashScreenComponent=A.SplashScreenComponent=void 0;var d=_e(),l=tt(),S=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};y(function(M){"use strict";class P extends d.Component{constructor(V){V.name=typeof V.name>"u"?"splashscreen":V.name;let ue=typeof window<"u"&&typeof window.self<"u"&&window===window.self,R=location.hash===""&&location.pathname==="/"&&location.search===""||d.CONFIG.get("routingWay","pathname")==="hash"&&d.CONFIG.get("start_url","/")===location.hash||d.CONFIG.get("routingWay","pathname")==="pathname"&&d.CONFIG.get("start_url","/")===location.pathname||d.CONFIG.get("routingWay","pathname")==="search"&&d.CONFIG.get("start_url","/")===location.search,Oe=ue&&R;if(Oe?(V.basePath=d.CONFIG.get("splashscreenBasePath",d.CONFIG.get("remoteSDKPath","")),typeof V.data>"u"&&(V.data={}),V.data.basePath=V.basePath):typeof V<"u"&&typeof V.body<"u"&&(V.body.style.display="none"),super(V),this.cached=!1,this.shadowed=!0,this._bgcolor="",this._enabled_=Oe,this._enabled_){let de=this.body.getAttribute("duration");de===null?de=1e3:de=parseInt(de.toString()),this._bgcolor=this.body.style.backgroundColor;let K=y(()=>{setTimeout(()=>{if(!K.executed){let xe=this.shadowed?this.shadowRoot?.host:this.body;typeof M.componentsStack<"u"&&M.componentsStack.filter(we=>we.body.hasAttribute("splashscreen")).map(we=>{d.logger.debug(`Splash Screen of Main Component: ${we.name}`),we.splashScreenComponent=this;let Fe=y(()=>{if(!Fe.executed){let $e=we.splashScreenComponent,v=we.shadowed?we.shadowRoot?.host:we.body;we._mainPosition=v.style.position,typeof v<"u"&&(v.style.position="fixed"),we._mainOpacity=v.style.opacity,xe.style.width="100%",xe.style.height="100%",document.body.style.backgroundColor="#111111",v.style.opacity="0",setTimeout(function(){typeof xe<"u"&&(document.body.style.backgroundColor=$e?._bgcolor,xe.subelements("#slot-logo").map(fe=>(fe.style.display="block",fe.style.transformOrigin="center",new l.Resize().apply(fe,1,0))),new l.Fade().apply(xe,1,0))},de-1e3),setTimeout(function(){new l.Fade().apply(v,0,1),v.style.position=we._mainPosition,document.body.style.backgroundColor=$e._bgcolor,xe.parentElement!==null&&xe.parentElement.remove()},de)}Fe.executed=!0},"SplashScreenHandler");return we.addComponentHelper(Fe.bind(we))}),K.executed=!0}})},"_helper_");K.executed=!1,this.addComponentHelper(K.bind(V))}}}O(P,"f"),y(P,"SplashScreenComponent"),(0,d.Package)("org.qcobjects.components.base",[P]);class F extends P{constructor(V){V.name="videosplashscreen",super(V),this.cached=!1,this.shadowed=!0,this.tplsource="inline",this.template=` + +
      +
      + + +
      +
      + + `}}O(F,"p"),y(F,"VideoSplashScreenComponent");class oe extends P{constructor(V){V.name="cubesplashscreen",super(V),this.cached=!1,this.shadowed=!0,this.tplsource="inline",this.template=` + + +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      +
      + + `}}O(oe,"u"),y(oe,"CubeSplashScreenComponent"),(0,d.Package)("org.qcobjects.components.splashscreen",[F,oe])},"__splash_screen__")(S);var x=S.SplashScreenComponent;A.SplashScreenComponent=x;var C=S.VideoSplashScreenComponent;A.VideoSplashScreenComponent=C;var T=S.CubeSplashScreenComponent;A.CubeSplashScreenComponent=T}),Mt=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.controllers",[y(class extends f.Controller{},"GenericController")])})()}),kt=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.controllers.grid",[y(class extends f.Controller{constructor(d){super(d),this.rows=this.component.body.getAttribute("rows"),this.rows=this.rows!==null?this.rows:this.component.rows,this.cols=this.component.body.getAttribute("cols"),this.cols=this.cols!==null?this.cols:this.component.cols}cssGrid(){let d=this.component,l=d.shadowed?d.shadowRoot:d.body;if(typeof this.rows<"u"&&typeof this.cols<"u"){let S=(0,f._DOMCreateElement)("style"),x="auto ".repeat(this.rows),C="auto ".repeat(this.cols),T="grid"+this.__instanceID.toString();S.innerHTML=`.${T}{ + display: grid; grid-template-rows: ${x}; grid-template-columns: ${C}; margin:0 auto; }`,l?.append(S),d.shadowed?l?.host.classList.add(T):l.classList.add(T)}}done(){this.cssGrid(),f.logger.debug("GridComponent built")}},"GridController"),y(class extends f.Controller{constructor(d){super(d),this._componentRoot=d.component.shadowed?d.component.shadowRoot:d.component.body,this.rows=d.component.body.getAttribute("rows"),this.rows=d.rows!==null?d.rows:d.component.rows,this.cols=d.component.body.getAttribute("cols"),this.cols=d.cols!==null?d.cols:d.component.cols,f.logger.debug("DataGridController INIT")}getPageIndex(d,l,S){return d=d>0?d-1:0,[S*d/l,S*d/l+S/l]}addSubcomponents(){this.component.subcomponents=[],typeof this._componentRoot<"u"&&(this._componentRoot.innerHTML=""),this.cssGrid(),f.logger.debug((0,f._DataStringify)(this.component.data));try{let d=this.component.body.getAttribute("subcomponentClass");if(d!=null){let l,S,x,C=[...this.component.data],T=this.component.body.getAttribute("paginate-in"),M;T=T!==null?T:"client",T==="client"?(M=this.component.body.getAttribute("page-number"),M=isNaN(M)||M===null?-1:M,M!==-1?(x=this.component.body.getAttribute("total-pages"),x=isNaN(x)?1:x,l=this.getPageIndex(M,x,C.length)[0],S=this.getPageIndex(M,x,C.length)[1]):(l=0,S=C.length,x=1),C=C.slice(l,S)):(l=0,S=C.length,x=1),C.map((P,F,oe)=>{try{let ce=(0,f._DOMCreateElement)("component");ce.setAttribute("name",(0,f.ClassFactory)(d).name),ce.setAttribute("shadowed",(0,f.ClassFactory)(d).shadowed),ce.setAttribute("cached",(0,f.ClassFactory)(d).cached),P=Object.assign(P,{__dataIndex:F,__dataLength:oe.length,__page:M,__totalPages:x,__limit:S,__offset:l});let V=(0,f.New)((0,f.ClassFactory)(d),{name:"item",data:P,templateURI:(0,f.ComponentURI)({COMPONENTS_BASE_PATH:f.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:(0,f.ClassFactory)(d).name,TPLEXTENSION:f.CONFIG.get("tplextension",""),TPL_SOURCE:(0,f.ClassFactory)(d).tplsource}),body:ce,template:(0,f.ClassFactory)(d).template});V.done=this.component.done.bind(V);try{if(V){V.data.__dataIndex=F,Object.hasOwnProperty.call(this.component.data,"length")&&(V.data.__dataLength=this.component.data.length),f.logger.debug("adding subcomponent to body"),this._componentRoot?.append(V.body);try{this.component.subcomponents.push(V)}catch{f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}}else f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}catch{f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}}catch{f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}})}else f.logger.debug("NO SUBCOMPONENT CLASS IN COMPONENT")}catch{f.logger.debug("No data for component")}}cssGrid(){let d=this.component,l=d.shadowed?d.shadowRoot:d.body;if(typeof this.rows<"u"&&typeof this.cols<"u"){let S=(0,f._DOMCreateElement)("style"),x="auto ".repeat(this.rows),C="auto ".repeat(this.cols),T="grid"+this.__instanceID.toString();S.innerHTML=`.${T}{ + display: grid; grid-template-rows: ${x}; grid-template-columns: ${C}; margin:0 auto; }`,d.shadowed?(d.body.append(S),l.host.classList.add(T)):(l?.append(S),l.classList.add(T))}}done(){let d=this.component;f.logger.debug("DataGridController DONE");let l=this.component.body.getAttribute("serviceClass");if(l!=null){let S,x,C=d.body.getAttribute("paginate-in");if(C=C!==null?C:"client",C==="server"){let T=d.body.getAttribute("page-number");T=isNaN(T)||T===null?-1:T;let M;if(T!==-1){let P=this.component.body.getAttribute("server-data-count")!==null?this.component.body.getAttribute("server-data-count"):1;M=this.component.body.getAttribute("total-pages"),M=isNaN(M)?1:M,S=this.getPageIndex(T,M,P)[0],x=this.getPageIndex(T,M,P)[1],d.serviceData=typeof d.serviceData<"u"?d.serviceData:{},d.serviceData.params=typeof d.serviceData.params<"u"?d.serviceData.params:{},d.serviceData.params.offset=S,d.serviceData.params.limit=x}}(0,f.serviceLoader)((0,f.New)((0,f.ClassFactory)(l),{data:d.serviceData}),!1).then(T=>{f.logger.debug("DONE SERVICE COMPONENT"),T.service.JSONresponse=JSON.parse(T.service.template),typeof T.service.JSONresponse.result<"u"?(f.logger.debug((0,f._DataStringify)(T.service.JSONresponse.result)),d.data=T.service.JSONresponse.result):d.data=T.service.JSONresponse,this.addSubcomponents()},T=>{f.logger.debug(T)}).catch(T=>{f.logger.debug("Something went wrong when calling the service from: "+l),f.logger.debug(T.message)})}}},"DataGridController")])})()}),w=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.controllers.list",[y(class extends f.Controller{constructor({component:d,dependencies:l=[],valueField:S=void 0,labelField:x=void 0}){super({component:d,dependencies:l,valueField:S,labelField:x}),this.component=d,this._componentRoot=this.component.shadowed?this.component.shadowRoot:this.component.body,this.labelField=this.component.body.getAttribute("label-field"),this.valueField=this.component.body.getAttribute("value-field"),this.rows=this.component.body.getAttribute("rows"),this.rows=this.rows!==null?this.rows:this.component.rows,this.cols=1,f.logger.debug("ListController INIT")}getPageIndex(d,l,S){return d=d>0?d-1:0,[S*d/l,S*d/l+S/l]}addSubcomponents(){this.component.subcomponents=[];let d=this.component.body.getAttribute("layout"),l=f.CONFIG.get("listBasePath",f.CONFIG.get("remoteSDKPath","")),S="";this.labelField=this.component.body.getAttribute("label-field"),this.valueField=this.component.body.getAttribute("value-field"),d==="horizontal"?S=`@import url("${l}css/components/horizontal-list.css");`:S=`@import url("${l}css/components/list.css");`,typeof this._componentRoot<"u"&&(this._componentRoot.innerHTML=`
        `),f.logger.debug((0,f._DataStringify)(this.component.data));try{let x=this.component.body.getAttribute("subcomponentClass");if(x!=null){let C,T,M,P=[...this.component.data],F=this.component.body.getAttribute("paginate-in");F=F!==null?F:"client";let oe;F==="client"?(oe=this.component.body.getAttribute("page-number"),oe=isNaN(oe)||oe===null?-1:oe,oe!==-1?(M=this.component.body.getAttribute("total-pages"),M=isNaN(M)?1:M,C=this.getPageIndex(oe,M,P.length)[0],T=this.getPageIndex(oe,M,P.length)[1]):(C=0,T=P.length,M=1),P=P.slice(C,T)):(C=0,T=P.length,M=1),P.map((ce,V)=>{try{let ue=(0,f._DOMCreateElement)("li");ce.label=ce[this.labelField],ce.value=ce[this.valueField];let R=(0,f.New)((0,f.ClassFactory)(x),{name:"list-item",data:{label:ce[this.labelField],value:ce[this.valueField],__dataIndex:V,__page:oe,__totalPages:M,__limit:T,__offset:C},templateURI:(0,f.ComponentURI)({COMPONENTS_BASE_PATH:f.CONFIG.get("componentsBasePath",""),COMPONENT_NAME:(0,f.ClassFactory)(x).name,TPLEXTENSION:f.CONFIG.get("tplextension",""),TPL_SOURCE:(0,f.ClassFactory)(x).tplsource}),body:ue,template:(0,f.ClassFactory)(x).template});R.done=this.component.done.bind(R);try{if(R){R.data.__dataIndex=V,Object.hasOwnProperty.call(this.component.data,"length")&&(R.data.__dataLength=this.component.data.length),f.logger.debug("adding subcomponent to body"),this._componentRoot.subelements("ul").map(Oe=>Oe.append(R));try{this.component.subcomponents.push(R)}catch{f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}}else f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}catch{f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}}catch{f.logger.debug("ERROR LOADING SUBCOMPONENT IN DATAGRID")}})}else f.logger.debug("NO SUBCOMPONENT CLASS IN COMPONENT")}catch{f.logger.debug("No data for component")}}cssGrid(){let d=this.component,l=d.shadowed?d.shadowRoot:d.body;if(typeof this.rows<"u"&&typeof this.cols<"u"){let S=(0,f._DOMCreateElement)("style"),x="auto ".repeat(this.rows),C="auto ".repeat(this.cols),T="grid"+this.__instanceID.toString();S.innerHTML=`.${T}{ + display: grid; grid-template-rows: ${x}; grid-template-columns: ${C}; margin:0 auto; }`,l.append(S),l.classList.add(T)}}done(){this.cssGrid();let d=this.component;f.logger.debug("ListController DONE");let l=this.component.body.getAttribute("serviceClass");if(l!=null){let S,x,C=d.body.getAttribute("paginate-in");if(C=C!==null?C:"client",C==="server"){let T=d.body.getAttribute("page-number");T=isNaN(T)||T===null?-1:T;let M;if(T!==-1){let P=this.component.body.getAttribute("server-data-count")!==null?this.component.body.getAttribute("server-data-count"):1;M=this.component.body.getAttribute("total-pages"),M=isNaN(M)?1:M,S=this.getPageIndex(T,M,P)[0],x=this.getPageIndex(T,M,P)[1],d.serviceData=typeof d.serviceData<"u"?d.serviceData:{},d.serviceData.params=typeof d.serviceData.params<"u"?d.serviceData.params:{},d.serviceData.params.offset=S,d.serviceData.params.limit=x}}(0,f.serviceLoader)((0,f.New)((0,f.ClassFactory)(l),{data:d.serviceData}),!1).then(T=>{f.logger.debug("DONE SERVICE COMPONENT"),T.service.JSONresponse=JSON.parse(T.service.template),typeof T.service.JSONresponse.result<"u"?(f.logger.debug((0,f._DataStringify)(T.service.JSONresponse.result)),d.data=T.service.JSONresponse.result):d.data=T.service.JSONresponse,this.addSubcomponents()},T=>{f.logger.debug(T)}).catch(T=>{f.logger.debug("Something went wrong when calling the service from: "+l),f.logger.debug(T.message)})}}},"ListController")])})()}),ct=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var d=_e();(function(l){"use strict";(0,d.Package)("org.qcobjects.controllers.slider",[y(class extends d.Controller{constructor({component:S,dependencies:x=[],duration:C=7100,slideIndex:T=0,interval:M=null,sliderHandlerName:P=null}){super({component:S,dependencies:x,duration:C,slideIndex:T,interval:M,sliderHandlerName:P}),this.slideIndex=0,this.duration=7100,this.interval=null,this.sliderHandlerName="",this.component=S,this._componentRoot=S.shadowed?S.shadowRoot:S.body,this.sliderHandlerName="slider_"+this.component.__instanceID.toString(),l.set(this.sliderHandlerName,this)}stop(){this.interval!=null&&clearInterval(this.interval)}plusSlidesAndStop(S){this.stop(),this.plusSlides(S)}plusSlides(S){this.showSlides(this.slideIndex+=S)}currentSlide(S){this.stop(),this.showSlides(this.slideIndex=S)}automate(){this.interval=setInterval(()=>{this.plusSlides(1)},this.duration)}showSlides(S){let x=this._componentRoot?.subelements(".qcoSlides"),C=this._componentRoot?.subelements(".qcoSlider__dots--dot");S>x.length-1&&(this.slideIndex=0),S<0&&(this.slideIndex=0),x.filter((T,M)=>M!==this.slideIndex).map(T=>(0,d.New)((0,d.ClassFactory)("Fade"),{}).apply(T,1,0)),C.filter((T,M)=>M!==this.slideIndex).map(T=>T.classList.remove("active"));try{C[this.slideIndex].classList.add("active")}catch(T){d.logger.debug(`Something went wrong when trying to activate a slide: ${this.slideIndex} - ${T.message}`)}setTimeout(()=>{x.filter((T,M)=>M!==this.slideIndex).map(T=>(T.style.display="none",T.style.display));try{x[this.slideIndex].style.display="block",(0,d.New)((0,d.ClassFactory)("Fade"),{}).apply(x[this.slideIndex],0,1)}catch(T){d.logger.debug(`Something went wrong when trying to show a slide: ${this.slideIndex} - ${T.message}`)}},700)}fillDots(){(this._componentRoot?.subelements(".qcoSlides")).map((S,x)=>{let C=document.createElement("span"),T=``;return C.innerHTML=T,this._componentRoot?.subelements(".qcoSlider__dots")[0].append(C)})}done(){(this._componentRoot?.subelements(".qcoSlides")).filter((S,x)=>x!==this.slideIndex).map(S=>(S.style.display="none",S.style.display)),setTimeout(()=>{this.fillDots(),this.slideIndex=0,this.showSlides(this.slideIndex),this.automate()},3e3)}},"SliderController")])})(typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{})}),Rt=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e(),d=nt();(function(){"use strict";(0,f.Package)("org.qcobjects.controllers.form",[y(class extends f.Controller{getDefault(){return function(l,S,x){let C={name:"^[a-zA-Z]+(([',. -][a-zA-Z ])?[a-zA-Z]*)*$",email:"^([A-Za-z0-9]+)@([A-Za-z0-9]+).([A-Za-z0-9]+)$"},T=x.getAttribute("pattern")||C[l];return new RegExp(T).test(S)}}},"FormValidations"),y(class extends f.Controller{hasValidation(l){let S=l.getAttribute("data-field"),x=!1;return typeof this.validations<"u"&&Object.hasOwnProperty.call(this.validations,S)&&(x=!0),x}isInvalid(l){let S=!1,x=l.getAttribute("data-field"),C=this.component.data[x],T=y((M,P,F)=>typeof this.validations<"u"&&Object.hasOwnProperty.call(this.validations,M)&&this.validations[M].call(null,M,P,F),"_execValidation");return typeof this.validations<"u"&&!T(x,C,l)&&(S=!0),S}isValid(l){return!this.isInvalid(l)}save(){this.serviceClass!==""?(location.href=this.formSettings.loadingRouting,(0,f.serviceLoader)((0,f.New)((0,f.ClassFactory)(this.serviceClass),{data:this.component.data}),!1).then(l=>{console.log("DONE SERVICE COMPONENT");try{console.log(l.service.JSONresponse)}catch{}location.href=this.formSettings.nextRouting},l=>{f.logger.debug(l),location.href=this.formSettings.backRouting})):f.logger.debug("No service name declared on serviceClass property")}formSaveTouchHandler(){f.logger.debug("Saving data...");let l=this.component.shadowed?(this.component?.shadowRoot).host:this.component.body;if(this.component.executeBindings(),this.formValidatorModal!=null){let S=l.subelements("*[data-field]").filter(M=>this.hasValidation(M)),x=y(function(M,P){return y((F,oe)=>oe.getAttribute("aria-labelledby")!==null?(oe.getAttribute("aria-labelledby")||"").split(" ").map(ce=>F.subelements(`#${ce}`).map(V=>V.innerHTML)).join(" "):null,"_arialabelledby")(M,P)||P.getAttribute("aria-label")||P.getAttribute("placeholder")||P.getAttribute("name")||P.getAttribute("data-field")},"_labelledby"),C=y(function(M){return M.getAttribute("title")||M.getAttribute("aria-title")||""},"_ariatitle"),T=S.filter(M=>this.isInvalid(M));if(T.length>0){let M=` +
        + Please verify the following incorrect fields: +
          +
          + ${T.map(P=>"
        • "+x(l,P)+"
          "+C(P)+"
        • ").join("")} +
          +
        +
        +`;this.formValidatorModal.body.subelements(".validationMessage")[0].innerHTML=M,this.formValidatorModal.modal()}else this.save()}else f.logger.debug("Unable to find the modal validator..."),f.logger.debug("Saving data..."),this.save()}constructor(l){super(l),this.validations=[],this.serviceClass="",this.formSettings={backRouting:"#",loadingRouting:"#loading",nextRouting:"#signupsuccessful"},this.component=l.component,this.component=this.component.Cast(d.FormField)}done(){f.logger.debugEnabled=!0;try{this.component.createBindingEvents();let l=(0,f._DOMCreateElement)("div");l.className="modal_body",this.formValidatorModal=(0,f.New)(d.ModalComponent,{body:l,subcomponents:[],data:{content:'
        '}}),(0,f.Tag)(".modal_body").map(S=>document.body.removeChild(S)),document.body.append(this.formValidatorModal)}catch{f.logger.debug("Unable to create the modal")}this.onpress(".submit",()=>{this.formSaveTouchHandler()})}},"FormController")])})()}),lt=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.controllers.swagger",[y(class extends f.Controller{startSwaggerUI(){if(typeof SwaggerUIBundle<"u"){let d=SwaggerUIBundle({url:f.CONFIG.get("swagger-ui-url","https://petstore.swagger.io/v2/swagger.json"),dom_id:"#"+f.CONFIG.get("swagger-ui-dom_id","swagger-ui"),deepLinking:!0,presets:[SwaggerUIBundle.presets.apis,SwaggerUIStandalonePreset],plugins:[SwaggerUIBundle.plugins.DownloadUrl],layout:"StandaloneLayout"});window.ui=d}}done(){this.component.body.innerHTML='
        ';let d=f.CONFIG.get("swagger-ui-package-path","node_modules/swagger-ui-dist/");this.dependencies?.push((0,f.New)(f.SourceJS,{url:d+"swagger-ui-standalone-preset.js",external:f.CONFIG.get("swagger-ui-external",!1)})),this.dependencies?.push((0,f.New)(f.SourceCSS,{url:d+"swagger-ui.css",external:f.CONFIG.get("swagger-ui-external",!1)})),this.dependencies?.push((0,f.New)(f.SourceJS,{url:d+"swagger-ui-bundle.js",external:f.CONFIG.get("swagger-ui-external",!1),done:()=>{this.startSwaggerUI()}}))}},"SwaggerUIController")])})()}),Be=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.modal.controllers",[y(class extends f.Controller{done(){let d=this.component;d.body.innerHTML=d.body.innerHTML.replace("/{{content}}/g",d.submodal.template)}},"ModalController")])})()}),wt=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){"use strict";(0,f.Package)("org.qcobjects.views",[y(class extends f.View{},"GridView")])})()}),St=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e();(function(){(0,f.Package)("org.qcobjects.tools.canvas",[y(class extends f.InheritClass{drawImageFilled(d,l,S=1,x=0,C=0){let T=Math.max(l.width/d.width,l.height/d.height);T=T*S;let M=l.width/2-d.width/2*T,P=l.height/2-d.height/2*T;l.getContext("2d")?.drawImage(d,x+M,C+P,d.width*T,d.height*T)}getImageResized(d,l,S,x,C=1,T=0,M=0){let P=document.createElement("canvas");return P.width=l,P.height=S,P.style.width=l.toString(),P.style.height=S.toString(),this.drawImageFilled(d,P,C,T,M),x.src=P.toDataURL("image/png"),P}},"CanvasTool")])})()}),Lt=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e(),d=tt();(function(){(0,f.Package)("org.qcobjects.tools.layouts",[y(class extends f.InheritClass{constructor({component:l=null,dependencies:S=[]}){super({component:l,dependencies:S}),this.dependencies=[]}load(){this.dependencies.push((0,f.New)(f.SourceCSS,{external:!f.CONFIG.get("useLocalSDK",!1),url:f.CONFIG.get("useLocalSDK",!1)?"css/basic-layout.css":f.CONFIG.get("remoteSDKPath",!1)+"css/basic-layout.css"}))}coloredBorder(){setTimeout(function(){(0,f.Tag)("nav").map(l=>{l.style.border="20px solid #3333"}),(0,f.Tag)("nav").map(l=>{l.style.backgroundColor="#129999"}),(0,f.Tag)("component>footer").map(l=>{l.style.background="#876"}),(0,f.Tag)("component>div").map(l=>{l.style.border="3px dashed #fff"}),(0,f.Tag)("component>section").map(l=>{l.style.border="3px solid #000"}),(0,f.Tag)("component>section").map(l=>{l.style.backgroundColor="#fffaaa"}),(0,f.Tag)("component>article").map(l=>{l.style.border="3px dotted #000"}),(0,f.Tag)("component>header").map(l=>{l.style.background="#789"}),(0,f.Tag)("component>footer").map(l=>{l.style.background="#876"}),(0,f.Tag)("component>article:nth-child(1)").map(l=>{l.style.border="1px solid #444"}),(0,f.Tag)("component>article:nth-child(1)").map(l=>{l.style.backgroundColor="#555aaa"}),(0,f.Tag)("component>article:nth-child(2)").map(l=>{l.style.backgroundColor="#aaa333"}),(0,f.Tag)("component>article:nth-child(3)").map(l=>{l.style.backgroundColor="#54da82"}),(0,f.Tag)("*").map(l=>{l.style.color="#fff"}),(0,f.Tag)("component>article").map(l=>d.Fade.apply(l,0,1)),(0,f.Tag)("component>footer").map(l=>d.Fade.apply(l,0,1)),(0,f.Tag)("component>header").map(l=>d.Fade.apply(l,0,1)),(0,f.Tag)("nav").map(l=>{l.style.display="block",l.style.width=l.offsetParent?.scrollWidth.toString()||l.clientWidth.toString(),d.MoveXInFromLeft.apply(l)}),(0,f.Tag)("component>article").map(l=>{l.style.display="block",l.style.height=l.offsetParent?.scrollHeight.toString()||l.clientHeight.toString(),d.MoveYInFromBottom.apply(l)}),(0,f.Tag)("component>article:nth-child(2)").map(l=>{l.style.display="block",l.style.width=l.offsetParent?.scrollWidth.toString()||l.clientWidth.toString(),d.MoveXInFromRight.apply(l)})},300)}},"BasicLayout")])})()}),ut=L((A,f)=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.SessionUserToken=void 0;var d=_e(),l=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};(function(x){"use strict";class C extends d.InheritClass{constructor(M){super(M);let P=this;this.__cache__=new d.ComplexStorageCache({index:P.__instanceID.toString(),load(){let F;return typeof navigator<"u"&&typeof origin<"u"?F=d._Crypt.encrypt(`${navigator.userAgent}|${M.username}|${(+new Date).toString()}`,origin):F=d._Crypt.encrypt(`${M.username}|${(+new Date).toString()}`,d.CONFIG.get("domain","localhost")),C.user={priority:P.__instanceID.toString(),token:F},C.user},alternate(F){C.user=F?.cache.getCached(P.__instanceID.toString())}})}static generateIndex(M){return typeof Buffer<"u"?Buffer.from(M,"ascii").toString("base64"):btoa(M)}getGlobalUser(...M){let P=[M].join("|"),F="userToken_"+C.generateIndex(P);return(typeof x.get(F)>"u"||x.get(F)===null)&&x.set(F,(0,d.New)(C,{username:P})),C.user=x.get(F).user,x.get(F).user}getGlobalUserToken(...M){return this.getGlobalUser(M).token}getGlobalUserId(...M){return this.getGlobalUser(M).id}getGlobalUserPriority(...M){return this.getGlobalUser(M).priority}getLoginCredentialsToken(M,P){return d._Crypt.encrypt(`${M}${P}`,this.getGlobalUserToken(M))}closeGlobalSession(...M){this.getGlobalUser(M);let P=[M].join("|"),F="userToken_"+C.generateIndex(P);typeof x.get(F)<"u"&&(x.get(F).__cache__.clear(),x.set(F,null),C.user={})}}O(C,"r"),y(C,"SessionUserToken"),C.user={},(0,d.Package)("org.qcobjects.cloud.auth.session.usertoken",[C])})(l);var S=l.SessionUserToken;A.SessionUserToken=S}),$t=L(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0});var f=_e(),d=ut();(function(){"use strict";(0,f.Package)("org.qcobjects.cloud.auth.session.data",[y(class extends f.InheritClass{constructor(){super(...arguments),this.__session_container__=null}setSessionContainer(){this.__session_container__=[...arguments]}getSessionContainer(){if(typeof this.__session_container__>"u"||this.__session_container__===null)throw new Error("You need to set a session container first: sessionData.setSessionContainer(...arguments)");return this.__session_container__}getSessionData(...l){let S=sessionStorage.getItem(`${this.index(l)}`),x;return S!==null&&(x=JSON.parse(S)),(typeof x>"u"||x===null)&&(x={}),x}index(...l){if(typeof d.SessionUserToken>"u")throw new Error('You need to import SessionUserToken first: Import ("org.qcobjects.cloud.auth.session.usertoken")');return`session_${btoa(d.SessionUserToken.getGlobalUserToken(l))}`}save(...l){let S=(0,f._DataStringify)(this.sessionData);sessionStorage.setItem(`${this.index(l)}`,S)}get(l,S){let x=this.getSessionData(this.getSessionContainer());return typeof x[l]<"u"?x[l]:S}set(l,S){let x=this.getSessionContainer(),C=this.getSessionData(x);this.sessionData=C,this.sessionData[l]=S,this.save(x)}},"SessionData")])})()}),At=L((A,f)=>{Object.defineProperty(A,"__esModule",{value:!0});var d=_e(),l=typeof f=="object"&&typeof f.exports=="object"?f.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof ae<"u"?ae:{}:typeof ae=="object"?ae:typeof window=="object"?window:{};y(O(function S(x){"use strict";if(typeof Object.defineProperty<"u"&&typeof x<"u")try{Object.defineProperty(x,"__qcobjects_sdk__",{enumerable:!0,configurable:!1,writable:!1,value:S})}catch{typeof x.__qcobjects_sdk__<"u"&&(x.__qcobjects_sdk__.__loaded__=!0)}if(typeof x.__qcobjects_sdk__.__loaded__>"u"){if(x.__qcobjects_sdk__.__loaded__=!0,typeof x>"u")throw Error("Top context empty: It should either global, module or window");let C=d.GlobalSettings.__start__.bind(x),T=[];T=[new Promise(M=>{He(),Ee(),nt(),Ve(),Nt(),it(),It(),gt(),Mt(),kt(),w(),ct(),Rt(),lt(),tt(),Be(),wt(),St(),Lt(),ut(),$t(),M()})],x._sdk_=Promise.all(T).then(()=>{d.CONFIG.set("useSDK",!0),C()})}},"w"),"__qcobjects_sdk__")(l),A.default=l});return At()})()});var Vt=Ht((zt,Xt)=>{"use strict";Object.defineProperty(zt,"__esModule",{value:!0});var Yt=Bt();Xt.exports=Yt});var Zt=Ht((to,vt)=>{O(function Me(j){"use strict";if(typeof Object.defineProperty<"u"&&typeof j<"u")try{Object.defineProperty(j,"__qcobjects__",{enumerable:!0,configurable:!1,writable:!1,value:Me})}catch{typeof j.__qcobjects__<"u"&&(j.__qcobjects__.loaded=!0)}if(typeof j.__qcobjects__.loaded>"u"){let me=function(o){L?S.push(o.bind(window)):typeof y<"u"&&S.push(o.bind(y))};O(me,"Ready"),j.__qcobjects__.loaded=!0;var y=j;j.global=y;var _t=typeof window<"u"&&"Deno"in window,L=typeof window<"u"&&typeof window.self<"u"&&window===window.self&&!_t,U=typeof vt<"u",jt=O(function(){},"deno_require"),Ke=O(function(){return _t?jt(...arguments):at(...arguments)},"_require_"),ve=O(function(o){var r=typeof o.prototype<"u"?o.prototype.toString:function(){return""};typeof o.prototype<"u"&&(o.prototype.toString=function(){var t=["__qcobjects__","__qcobjects_sdk__","__loaded__","ComplexStorageCache","css","append","attachIn","debug","info","warn","QC_Append","set","get","done","componentDone","_new_","__new__","Class","ClassFactory","New","Export","Package","Import","subelements","componentLoader","buildComponents","Controller","View","VO","Service","serviceLoader","JSONService","ConfigService","SourceJS","SourceCSS","ArrayList","ArrayCollection","Effect","Timer","sum","avg","table","max","min","range","matrix","matrix2d","matrix3d","unique","uniqueId","shortCode","NamespaceRef"],a;return t.includes(this.name)?a=this.name+"{ [QCObjects native code] }":a=r.call(this),a})},"_protected_code_");ve(Function);var _e=O(function(o){var r=[];for(var t in o)(typeof o[t]).toLowerCase()==="function"&&r.push(o[t]);return r},"_methods_");String.prototype.__mAll__=function(o){var r=[];return this.replace(o,function(){var t=Array.prototype.slice.call(arguments,0,-2);t.input=arguments[arguments.length-1],t.index=arguments[arguments.length-2],r.push(t)}),r},typeof String.prototype.matchAll>"u"&&(String.prototype.matchAll=String.prototype.__mAll__);var He=O(function(o){var r;return L?r=document.createElement(o):r={},r},"_DOMCreateElement");if(!L){let o=Ke("fs")}var Ee=O(function(o){var r=O(function(){var t=new WeakSet,a=0;return function(u,h){if(typeof h=="object"&&h!==null){if(t.has(h))return a+=1,a<=3?A(h):null;t.add(h)}return h}},"getCircularReplacer");return JSON.stringify(o,r())},"_DataStringify");if(L){var tt=O(function(r){return[...this.querySelectorAll(r)]},"subelements");Element.prototype.subelements=tt,HTMLDocument.prototype.subelements=tt,HTMLElement.prototype.subelements=tt,typeof ShadowRoot<"u"&&(ShadowRoot.prototype.subelements=tt)}if(L)try{j=typeof window.top<"u"?window.top:window,j._allowed_=!0}catch{try{j=document,j._allowed_=!0}catch{try{j=y,j._allowed_=!0}catch{j={},j._allowed_=!0}}}else typeof y<"u"&&(j=y);var nt,Ve,Nt="quick-component:not([loaded]),component:not([loaded])";if(Ve=function(){var o="";if(L){var r=j.document.baseURI.split("?")[0].split("/");r.pop(),o=r.join("/")+"/"}else{var t;try{t=Ke("process")}catch{}typeof t<"u"?o=`${t.cwd()}/`:o=""}return o}(),L){"Promise"in j||(j.Promise=function(o){var r={then(){},catch(){},_then(t){this.then.call(r,t)},_catch(t){this.catch.call(r,t)}};return o.call(r,r._then,r._catch),r}),typeof j.console>"u"&&(j.console=function(){},j.console.prototype.log=function(o){}),nt=function(){return typeof document<"u"&&document.domain!==""?document.domain:"localhost"}();var it=function(){var o=j[(![]+[])[+!+[]+ +!+[]]+(typeof![])[+!+[]]+(typeof[])[(+!+[]+ +!+[])*(+!+[]+ +!+[])]+(![]+[])[+!+[]]+(!![]+[])[+[]]+([]+[]+[][[]])[+[+!+[]+[+[]]]/(+!+[]+ +!+[])]+(typeof![])[+!+[]]+([]+[]+[][[]])[+!+[]]]["h"+(typeof![])[+!+[]]+(![]+[])[+!+[]+(+!+[]+ +!+[])]+(!![]+[])[+[]]].toLowerCase();return o}(),It=function(){return typeof cordova<"u"}()}else{var it="secret";nt="localhost"}j._asyncLoad=[];var gt=O(function(o,r){var t={func:o,args:r,dispatch(){this.func.apply(null,this.args)}};return j._asyncLoad.push(t),t},"asyncLoad");if(L){var Mt=O(function(){document.readyState==="complete"&&j._asyncLoad.map(function(o){o.dispatch.call(o)})},"_fireAsyncLoad");document.onreadystatechange=Mt}else typeof j.global<"u"&&(j.global._fireAsyncLoad=function(){j._asyncLoad.map(function(o){o.dispatch.call(o)})});j.asyncLoad=gt;var kt=O(function(){return{debugEnabled:!0,infoEnabled:!0,warnEnabled:!0,debug(o){this.debugEnabled&&console.log("\x1B[35m%s\x1B[0m",`[DEBUG][${performance.now().toLocaleString()}] ${o}`)},info(o){var r;this.infoEnabled&&(L?r="\x1B[103m%s\x1B[0m":r="\x1B[33m%s\x1B[0m",console.info(r,`[INFO][${performance.now().toLocaleString()}] ${o}`))},warn(o){this.warnEnabled&&console.warn("\x1B[31m%s\x1B[0m",`[WARN][${performance.now().toLocaleString()}] ${o}`)}}},"Logger"),w=new kt;w.debugEnabled=!1,w.infoEnabled=!0,j.logger=w;var ct={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode(o){var r="",t,a,u,h,i,g,I,N=0;for(o=ct._utf8_encode(o);N>2,i=(t&3)<<4|a>>4,g=(a&15)<<2|u>>6,I=u&63,isNaN(a)?g=I=64:isNaN(u)&&(I=64),r=r+this._keyStr.charAt(h)+this._keyStr.charAt(i)+this._keyStr.charAt(g)+this._keyStr.charAt(I);return r},decode(o){var r="",t,a,u,h,i,g,I,N=0;for(o=o.replace(/[^A-Za-z0-9+/=]/g,"");N>4,a=(i&15)<<4|g>>2,u=(g&3)<<6|I,r=r+String.fromCharCode(t),g!==64&&(r=r+String.fromCharCode(a)),I!==64&&(r=r+String.fromCharCode(u));return r=ct._utf8_decode(r),r},_utf8_encode(o){o=o.replace(/rn/g,"n");for(var r="",t=0;t127&&a<2048?(r+=String.fromCharCode(a>>6|192),r+=String.fromCharCode(a&63|128)):(r+=String.fromCharCode(a>>12|224),r+=String.fromCharCode(a>>6&63|128),r+=String.fromCharCode(a&63|128))}return r},_utf8_decode(o){for(var r="",t=0,a=0,u=0,h=0,i;t191&&a<224?(h=o.charCodeAt(t+1),r+=String.fromCharCode((a&31)<<6|h&63),t+=2):(h=o.charCodeAt(t+1),i=o.charCodeAt(t+2),r+=String.fromCharCode((a&15)<<12|(h&63)<<6|i&63),t+=3);return r}},Rt=O(function(o,r){var t=O(function(a,u){var h=2e3,i=0,g=setInterval(function(){u.call()?(clearInterval(g),a.call(),w.debug("Ejecuting "+a.name+" after wait")):i"u")var lt={getItem(o){return Object.hasOwnProperty.call(this,o)?this[o]:null},setItem(o,r){this[o]=r},removeItem(o){delete this[o]}};var Be=O(function(o){var r,t,a;if(r=o.index,typeof r<"u"){t=o.load,a=o.alternate;var u=this.getID(r),h=lt.getItem(u);if(this.isEmpty(h)){var i=t.call(null,{cachedObjectID:u,cachedResponse:h,cache:this});this.save(r,i),w.debug("RESPONSE OF {{cachedObjectID}} CACHED".replace("{{cachedObjectID}}",u))}else{var g=a.call(null,{cachedObjectID:u,cachedResponse:h,cache:this});w.debug("RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED ".replace("{{cachedObjectID}}",u))}}else throw new Error("ComplexStorageCache: index is undefined");return this},"ComplexStorageCache");if(Be.prototype.getItem=function(o){var r=lt.getItem(o);return this.isEmpty(r)?null:JSON.parse(r)},Be.prototype.setItem=function(o,r){lt.setItem(o,Ee(r))},Be.prototype.isEmpty=function(o){var r=!1;switch(!0){case typeof o>"u":case(typeof o=="string"&&o===""):case(typeof o=="string"&&o==="undefined"):case(typeof o=="number"&&o===0):case o===null:r=!0;break;default:r=!1}return r},Be.prototype.getID=function(o){var r;return typeof o<"u"&&(r="cachedObject_"+ct.encode(Ee(o).replace(/\{|\}|,/g,"_"))),r},Be.prototype.save=function(o,r){var t=this.getID(o);w.debug("CACHING THE RESPONSE OF {{cachedObjectID}} ".replace("{{cachedObjectID}}",t)),this.setItem(t,r)},Be.prototype.getCached=function(o){var r=this.getID(o);return this.getItem(r)},Be.prototype.clear=function(){Object.keys(lt).filter(function(o){return o.startsWith("cachedObject_")}).map(function(o){lt.removeItem(o)})},L){var wt=!1;try{var St=Object.defineProperty({},"passive",{get(){return wt=!0,wt}});window.addEventListener("testPassive",null,St),window.removeEventListener("testPassive",null,St)}catch{}var Lt=O(function(){return wt?{passive:!0}:!1},"captureFalse")}L&&(Element.prototype.find=function(o){var r=[],t=document.subelements(o);return t.map(function(a,u){typeof t[u]<"u"&&t[u].parentNode.tagName===this.parentNode.tagName&&r.push(C(a,new Object))}),r});var ut,$t=function(){var o=Object.prototype.hasOwnProperty;return function(r){if(typeof r!="object")throw TypeError("Object prototype may only be an Object or null. The type is "+typeof r);var t=O(function(){},"QCObjects");t.prototype=r;var a=new t;if(arguments.length>1){var u=Object(arguments[1]);for(var h in u)o.call(u,h)&&(a[h]=u[h])}return a}}();typeof Object.assign!="function"&&Object.defineProperty(Object,"assign",{value:O(function(r,t){"use strict";if(r===null)throw new TypeError("Cannot convert undefined or null to object");for(var a=Object(r),u=1;u"u"&&(o.__definition={}),o.__definition.__classType=t,typeof r<"u"&&(o.__definition.__namespace=r),f[t]=o,j[t]=f[t],j[t]},"__register_class__"),V=O(function(o,r){return ce(o,r)},"RegisterClass");oe(V);var ue=O(function(){var o={},r,t,a;switch(arguments.length){case 0:return class{};case 1:r=arguments[0],t=O(class{},"type"),a={};break;case 2:r=arguments[0],t=O(class{},"type"),a=arguments[1];break;case 3:r=arguments[0],t=arguments[1],a=arguments[2];break;default:break}if(typeof t!="function")throw new Error("Class type must be a function or class");if(M.call(this,r))throw new Error(`${r} is not an allowed word in the name of a class`);return typeof t.__definition<"u"&&(a.__definition=Object.assign(A(t.__definition),t)),o[t.name]=t,typeof a>"u"||a===null?a={}:a=A(a),typeof a.__instanceID<"u"&&delete a.__instanceID,f[r]=class extends o[t.name]{constructor(){var h;arguments.length>0?h={...arguments[0]}:h={};super(h);W(this,"__classType",r);W(this,"__definition",{...a});let i=this;if(ut=typeof ut>"u"||ut===null?0:ut+1,i.__instanceID||Object.defineProperty(i,"__instanceID",{value:ut,writable:!1}),typeof i.__definition<"u"&&Object.keys(i.__definition).filter(function(g){return isNaN(g)&&!["name","__instanceID","__classType","__definition"].includes(g)}).forEach(function(g){typeof i.__definition[g]=="function"?i[g]=i.__definition[g].bind(i):i[g]=i.__definition[g]}),_e(f[i.__classType]).map(function(g){i[g.name]=g.bind(i)}),_e(i.__definition).map(function(g){i[g.name]=g.bind(i)}),i.body)if(typeof i.__definition>"u"||!Object.hasOwnProperty.call(i.__definition,"body")||typeof i.__definition.body>"u")try{L?i.body=He(i.__definition.__classType):i.body={}}catch{i.body={}}else Object.hasOwnProperty.call(i.__definition,"body")&&(i.body=i.__definition.body);try{if(typeof i.__new__=="function"?i.__new__.call(i,h):typeof super.__new__=="function"&&(i.__new__=super.__new__.bind(i),i.__new__.call(i,h)),typeof i=="object"&&Object.hasOwnProperty.call(i,"_new_")&&typeof i._new_.isCalled>"u")try{i._new_.call(i,h),i._new_.isCalled=!0}catch(g){w.warn(`${i.__classType}._new_() failed with error: ${g}`)}}catch(g){w.warn(g)}}static hierarchy(h){var i=O(function(N){return Object.hasOwnProperty.call(N,"__classType")?N.__classType:P.call(h,N)},"__classType"),g=O(N=>typeof N<"u"&&typeof N.__proto__<"u"&&N.__proto__!==null?(i(N)!==""?[i(N)]:[]).concat(g(N.__proto__)):[],"__hierarchy__proto__");(typeof h>"u"||h===null)&&(h=this);var I=[];return I.push(i(h)),I=I.concat(g(h.__proto__)),I}static getParentClass(){return Object.getPrototypeOf(this.prototype.constructor)}__new__(h){T(h,this)}_new_(){}getClass(){return Object.getPrototypeOf(this.constructor)}css(h){return typeof this.body<"u"&&this.body.style!=="undefined"&&(w.debug("body style"),this.body.style=C(h,this.body.style)),this.body.style}hierarchy(){var h=this;return this.getClass().hierarchy(h)}append(i){w.debug("append: start"),F(i,"Component")&&(w.debug("append: child is a Component"),w.debug(`appending the body of ${i.name}`));var i=arguments.length>0?arguments[0]:this.body;typeof this.body<"u"&&(w.debug("append element"),arguments.lenght>0?(w.debug("append to element"),this.body.append(i),typeof this.childs>"u"&&(this.childs=[]),this.childs.push(i)):L&&(w.debug("append to body"),document.body.append(i)))}attachIn(h){if(L)for(var i=document.subelements(h),g=0,I=i.length;g-1){var t=o.split(".").slice(0,o.split(".").length-1).join("."),a=o.split(".").slice(-1).join(""),u=z(t),h=typeof u<"u"?u.filter(i=>B(i)&&(i.__definition.__classType===a||typeof i=="function"&&!!i.name)).reverse():[];if(h.length>0)r=h[0];else throw Error(`Class ${o} not found.`)}else o!==null&&Object.hasOwnProperty.call(f,o)&&(r=f[o]);return r},"ClassFactory");L&&(Element.prototype.append=O(function(r){fe(r)||typeof r.body<"u"?this.appendChild(r.body):this.appendChild(r)},"QC_Append"),Element.prototype.render=O(function(r){var t=this,a=O(function(u,h){if(typeof document.implementation.createHTMLDocument<"u"){var i=document.implementation.createHTMLDocument("");i.innerHTML=h,i.body.subelements("*").map(function(g){return u.append(g)})}},"_appendVDOM");if(typeof this.innerHTML<"u")try{this.innerHTML+=r}catch{a(t,r)}else a(t,r)},"QC_Render"));var Oe=O(function(o,r,t){return R(o)[r]},"_super_");Oe.prototype.toString=function(){return"_super_(className,classMethodName,params) { [QCObjects native code] }"};var de=O(function(o,r){return r=arguments.length>1?r:{},typeof o>"u"?new Object:new o(r)},"New");de.prototype.toString=function(){return"New(QCObjectsClassName, args) { [QCObjects native code] }"};var K=O(function(o){return oe(o)},"Export");if(K.prototype.toString=function(){return"Export(function or symbol) { [QCObjects native code] }"},!L){var xe=O(function(o){let r=Ke("fs");var t=null;try{var a=[`${j.CONFIG.get("projectPath")}${j.CONFIG.get("relativeImportPath")}`,`${j.CONFIG.get("basePath")}${j.CONFIG.get("relativeImportPath")}`,`${j.CONFIG.get("projectPath")}`,`${j.CONFIG.get("basePath")}`,`${j.CONFIG.get("relativeImportPath")}`,`${process.cwd()}${j.CONFIG.get("relativeImportPath")}`,`${process.cwd()}/node_modules/`+o,`${process.cwd()}/node_modules`,`${process.cwd()}`,"node_modules","./",""].concat(vt.paths);a=a.filter(u=>r.existsSync(u+"/"+o)),a.length>0&&(t=a[0],w.info(o+" is Installed."))}catch(u){console.log(u)}return t},"findPackageNodePath");K(xe)}ue("_Crypt",Object,{last_string:"",last_key:"",construct:!1,_new_(o){var r=o.string,t=o.hasOwnProperty.call(o,"key")?o.key:null;this.__new__(o),t=t===null?this.__instanceID:t,this.last_key=t,this.last_string=r,this.construct=!0},_encrypt(){for(var o=this.string,r=this.key,t="",a,u,h=0;hr.list()[h]===u?null:u).filter(u=>u!==null).join("");return a},"shortCode"),v=$e;ue("InheritClass",class{},{});let G=class extends R("InheritClass"){constructor(){super(...arguments);W(this,"component",null);W(this,"__definition",{});W(this,"__classType","Processor");this.processors=G.processors,this.process=G.process.bind(this),this.processObject=G.processObject.bind(this),this.setProcessor=G.setProcessor.bind(this),this.execute=G.execute.bind(this)}static setProcessor(t){typeof t=="function"&&t.name!==""&&(this.processors[t.name]=t)}static execute(t,a,u){var h=typeof t<"u"&&t!==null?t.processorHandler:this;return h.processors[a].bind(h).apply(h,[t,...u.split(",")])}static process(t,a=null){var u=a!==null?a.processorHandler:de(G,{component:null});return typeof t=="string"&&Object.keys(u.processors).map(function(h){[...t.matchAll(new RegExp("\\$"+h+"\\((.*)\\).*","g"))].map(function(i){var g=`$${h}(${i[1]})`;t=t.replace(g,u.execute.bind(u).call(u,a,h,i[1]))})}),t}static processObject(t,a=null){var u=a===null?this:a.processorHandler;return typeof u>"u"&&(u=new G({component:a})),typeof t=="object"?Object.keys(t).map(function(h){typeof t[h]=="object"&&!t[h].hasOwnProperty.call(t[h],"call")?t[h]=u.processObject.bind(u)(t[h],a):typeof t[h]=="string"&&(t[h]=u.process.bind(u)(t[h],a))}):typeof t=="string"&&(t=u.process.bind(u)(t,a)),t}},X=G;O(X,"Processor"),W(X,"processors",{config(t,a){return j.CONFIG.get(a,"")},ENV(t,a){return typeof process<"u"?process.env[a]:""},global(t,a){return typeof y<"u"?y[a]:""}}),X.__definition={},X.__classType="Processor",V(X,"com.qcobjects"),oe(X);let Ze=class{static get instance(){if(this._instance===null){var r=new Ze;r._CONFIG={relativeImportPath:"",remoteImportsPath:"",remoteSDKPath:"https://sdk.qcobjects.dev/",asynchronousImportsLoad:!1,removePackageScriptAfterLoading:!0,componentsBasePath:"",delayForReady:0,preserveComponentBodyTag:!1,useConfigService:!1,routingWay:"hash",useSDK:!0,useLocalSDK:!1,basePath:Ve},r._CONFIG_ENC=null,this._instance=r}return this._instance}static set instance(r){this._instance=r}},pe=Ze;O(pe,"ConfigSettings"),W(pe,"_instance",null),W(pe,"_CONFIG_ENC",null),f.ConfigSettings=pe,ue("CONFIG",Object,{get _CONFIG_ENC(){return R("ConfigSettings").instance._CONFIG_ENC},get _CONFIG(){return R("ConfigSettings").instance._CONFIG},set(o,r){w.debug(`CONFIG.set ${o}: ${r}`),o==="basePath"&&(Ve=r);var t;try{t=function(a){a._CONFIG_ENC===null&&(a._CONFIG_ENC=R("_Crypt").encrypt(Ee({}),it));var u=a._CONFIG_ENC.valueOf(),h=a._CONFIG.valueOf();return T(h,Fe(u))}(R("ConfigSettings").instance)}catch(a){t={},console.error(a),w.debug("failed to encrypt config")}t[o]=r,R("ConfigSettings").instance._CONFIG_ENC=we(t),Object.hasOwnProperty.call(R("ConfigSettings").instance,"_CONFIG")&&Object.hasOwnProperty.call(R("ConfigSettings").instance._CONFIG,o)&&(R("ConfigSettings").instance._CONFIG[o]=r)},get(o,r){var t;try{var a=function(u){u._CONFIG_ENC===null&&(u._CONFIG_ENC=R("_Crypt").encrypt(Ee({}),it));var h=u._CONFIG_ENC.valueOf(),i=u._CONFIG.valueOf();return T(i,Fe(h))}(R("ConfigSettings").instance);typeof a[o]<"u"?t=a[o]:typeof r<"u"&&(t=r)}catch(u){console.error(u),w.debug("Something wrong when trying to get CONFIG values"),w.debug("No config value for: "+o),t=r}return X.processObject.call(X,t)}}),K(Rt),K(Oe),K(Be),K(R),K(He),K($e),K(P),K(F);var fe=O(function(o){return!!(typeof o=="object"&&Object.hasOwnProperty.call(o,"__classType")&&o.__instanceID&&Object.hasOwnProperty.call(o,"__definition")&&typeof o.__definition<"u")},"isQCObjects_Object"),B=O(function(o){return!!(typeof o=="function"&&!o.__instanceID&&o.__definition&&typeof o.__definition<"u"&&o.__definition.__classType)},"isQCObjects_Class"),z=O(function(o,r){return d.hasOwnProperty.call(d,o)&&typeof d[o]<"u"&&d[o].hasOwnProperty.call(d[o],"length")&&d[o].length>0&&typeof r<"u"&&r.hasOwnProperty.call(r,"length")&&r.length>0?(r.filter(function(t){return B(t)}).map(function(t){t.__definition.__namespace=o,t.__namespace=o}),d[o]=d[o].concat(r)):typeof r<"u"&&(typeof r=="object"&&r.hasOwnProperty.call(r,"length")?r.filter(function(t){return B(t)}).map(function(t){t.__definition.__namespace=o,t.__namespace=o}):B(r)&&(r.__definition.__namespace=o,r.__namespace=o),d[o]=r),Object.hasOwnProperty.call(d,o)&&d[o].map(function(t){ce(t,o)}),Object.hasOwnProperty.call(d,o)?d[o]:void 0},"Package");z.prototype.toString=function(){return"Package(namespace, classes) { [QCObjects native code] }"},z("com.qcobjects",[X]);var Ce=O(function(o){let t=z(o).filter(a=>B(a)).map(a=>({[a.__definition.__classType]:a})).reduce((a,u)=>Object.assign(a,u));return o.split(".").map(a=>({[a]:t})).reverse().reduce((a,u)=>(u[Object.keys(u)]=a,u))},"NamespaceRef"),qe=O(function(){var o,r=O(function(){},"ready"),t=!1;if(!(arguments.length<1)){arguments.length===1?o=arguments[0]:arguments.length===2?(o=arguments[0],r=arguments[1]):arguments.length>2&&(o=arguments[0],r=arguments[1],t=arguments[2],w.debug("[Import] Setting external="+t.toString()+" resource to import: "+o)),t?w.debug("[Import] Registering external resource to import: "+o):w.debug("[Import] Registering local resource to import: "+o);var a;return L?(a=new Promise(function(u,h){var i=O(function(){var N=!1,D=0;for(var H in d)D++;return D0?L?setTimeout(r.bind(window),j.CONFIG.get("delayForReady")):typeof y<"u"&&setTimeout(r.bind(y),j.CONFIG.get("delayForReady")):r.call(j)},"_Ready");L?(window.onload=ze,It&&document.addEventListener("deviceready",ze,Lt)):y.onload=ze;class J extends R("InheritClass"){constructor({instance:r,name:t,fget:a,fset:u,value:h}){super({instance:r,name:t,fget:a,fset:u,value:h}),this._new_({instance:r,name:t,fget:a,fset:u,value:h})}_new_({instance:r,name:g,fget:a,fset:u,value:h}){var i=this,g=typeof g>"u"?x(i):g;Object.defineProperty(r,g,{set(I){let N=I;w.debug("value changed "+g);var D;typeof u<"u"&&typeof u=="function"?D=u(N):D=N,r["_"+g]=D},get(){let I=r["_"+g];w.debug("returning value "+g);var N=O(function(H){return typeof H=="object"&&Object.hasOwnProperty.call(H,"value")?H.value:H},"is_ddo"),D;return typeof a<"u"&&typeof a=="function"?D=a(N(I)):D=N(I),D}})}}O(J,"DDO"),K(J);class Q{constructor({component:r,template:t}){W(this,"template","");W(this,"__definition",{});this.component=r,this.template=t}assign(r){var t=this;if(typeof t.component>"u")throw new Error("DefaultTemplateHandler.assign: component is undefined");if(typeof t.component.processorHandler>"u")throw new Error("DefaultTemplateHandler.assign: component.processorHandler is undefined");var a=t.component.processorHandler;a.component=t.component;var u=typeof t.template<"u"?t.template:"";typeof r=="object"?[...Object.keys(r)].map(function(h){var i=r[h];if(typeof i=="string"||typeof i=="number"||!isNaN(i))try{i=X.processObject.bind(a).call(a,i,t.component),u=u.replace(new RegExp(`{{${h}}}`,"g"),i)}catch(g){throw w.warn(`${t.component.name} could not parse processors.`),Error(`${t.component.name} could not parse processors. Reason: ${g.message}`)}}):w.debug(`${t.component.name}.data is not an object`);try{u=X.processObject.call(a,u,t.component)}catch(h){throw w.warn(`${t.component.name} could not parse processors.`),Error(`${t.component.name} could not parse processors. Reason: ${h.message}`)}return u}}O(Q,"DefaultTemplateHandler"),Q.__definition={},V(Q,"com.qcobjects");var bt=O(function(o,r){let t=o.path.replace(/{(.*?)}/g,"(?<$1>.*)");return{...[...r.matchAll(new RegExp(t,"g"))][0].groups}},"__routing_params__"),pt=O(function(o,r){return o.filter(function(t){var a=t.path.replace(/{(.*?)}/g,"(?<$1>.*)");return new RegExp(a,"g").test(r)}).reverse()},"__valid_routings__"),ot=O(function(o,r){return o.includes(r)},"__valid_routing_way__"),Pe=O(function(o,r){var t=o.getAttribute("shadowed")===null,a=o.getAttribute("template-source")===null,u=o.getAttribute("shadowed")==="true",h=o.getAttribute("cached")===null,i=o.getAttribute("cached")==="true",g=typeof j.CONFIG.get("tplextension")<"u"?j.CONFIG.get("tplextension"):"html";g=o.getAttribute("tplextension")!==null?o.getAttribute("tplextension"):g;var I=o.getAttribute("name"),N=o.getAttribute("componentClass")!==null?o.getAttribute("componentClass"):"Component";let D=j.CONFIG.get("preserveComponentBodyTag")?I!==null?"com.qcobjects.components."+I+".ComponentBody":"com.qcobjects.components.ComponentBody":N;I=I!==null?I:R(D)&&typeof R(D).name<"u"?R(D).name:"";var H=R(D),$=D!=="Component"&&typeof H<"u"&&typeof H.tplsource=="string"&&H.tplsource!=="",le=a&&$?H.tplsource:a?"default":o.getAttribute("template-source");w.debug(`template source for ${I} is ${le} `),w.debug(`type for ${I} is ${P(H)} `);var te;te=Qe({COMPONENTS_BASE_PATH:j.CONFIG.get("componentsBasePath"),COMPONENT_NAME:I,TPLEXTENSION:g,TPL_SOURCE:le}),j.CONFIG.get("preserveComponentBodyTag")&&z(I!==""?"com.qcobjects.components."+I:"com.qcobjects.components",[ue("ComponentBody",R("Component"),{name:I,tplsource:le,tplextension:g,reload:!0})]);var ee=O(function(){var ge=t?H&&H.shadowed||R("Component").shadowed:u,Se={__parent__:r,name:I,cached:h?R("Component").cached:i,shadowed:ge,tplextension:g,body:j.CONFIG.get("preserveComponentBodyTag")?He("componentBody"):o,templateURI:te,tplsource:le};(typeof I>"u"||I===""||I===null)&&delete Se.name,te===""&&delete Se.templateURI;var Ne=de(H,Se);return j.CONFIG.get("preserveComponentBodyTag")&&o.append(Ne),Ne},"__create_component_instance_"),be=ee.call(this);return be},"_buildComponentFromElement_"),Ie=O(function(o,r){var t=[];return L?t=o.map(function(a){return Pe(a,r)}):w.debug("[_buildComponentsFromElements_] not implemented for Non-Browser environments"),t},"_buildComponentsFromElements_");z("com.qcobjects",[O(class extends R("InheritClass"){constructor({__parent__:t,templateURI:a="",template:u,tplsource:h="default",tplextension:i,url:g="",name:I="",method:N="GET",data:D={},reload:H=!1,shadowed:$=!1,cached:le=!0,_body:te=He("div"),__promise__:ee=null,__shadowRoot:be,body:ge,shadowRoot:Se,splashScreenComponent:Ne,controller:We,view:st}){if(arguments.length<1)throw Error("No arguments in component. You must at least give one argument.");super({__parent__:t,templateURI:a,template:u,tplextension:i,tplsource:h,url:g,name:I,method:N,data:D,reload:H,shadowed:$,cached:le,_body:te,__promise__:ee,__shadowRoot:be,body:ge,shadowRoot:Se,splashScreenComponent:Ne,controller:We,view:st});W(this,"validRoutingWays",["pathname","hash","search"]);W(this,"basePath",Ve);W(this,"domain",nt);W(this,"templateHandler","DefaultTemplateHandler");W(this,"processorHandler",null);W(this,"routingWay",null);W(this,"routingNodes",[]);W(this,"routings",[]);W(this,"routingPath","");W(this,"routingPaths",[]);W(this,"_componentHelpers",[]);W(this,"subcomponents",[]);W(this,"splashScreenComponent");W(this,"controller");W(this,"view");W(this,"effect");W(this,"method","GET");W(this,"cached",!0);W(this,"__promise__",null);W(this,"__namespace");var ye=this;typeof ye.name>"u"&&w.warn("A name is not defined for "+P(ye)),ye.routingWay=j.CONFIG.get("routingWay"),ye.processorHandler=de(X,{component:ye}),ye.data=typeof ye.data>"u"||ye.data===null?{}:ye.data,ye.data=Object.assign(ye.data,ye.dataAttributes),ye.createServiceInstance().then(function(ke){typeof ye.__new__=="function"&&ye.__new__.call(ye,ye),ye._generateRoutingPaths(ye.body).then(function(){ye._reroute_().then(function(){return ye.rebuild().then(function(){w.info(`Component._new_ The component ${ye.name} was built successfully!`)}).catch(function(et){w.warn(`Component._new_ Something went wrong building the component ${ye.name}`),console.error(et)})})})})}set body(t){var a=this;a._body=t}get body(){var t=this;return t._body}set cacheIndex(t){w.debug("[cacheIndex] This property is readonly")}get cacheIndex(){var t=this,a=Ee(t.routingPath);return ct.encode(t.name+a)}set parsedAssignmentText(t){w.debug("[parsedAssignmentText] This property is readonly")}get parsedAssignmentText(){var t=this;if(t._parsedAssignmentText=t.parseTemplate(t.template),typeof t._parsedAssignmentText>"u")throw Error(`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);return t._parsedAssignmentText}set shadowRoot(t){var a=this;typeof a.__shadowRoot>"u"?a.__shadowRoot=t:w.debug("[shadowRoot] This property can only be assigned once!")}get shadowRoot(){var t=this;return t.__shadowRoot}set routingSelected(t){w.debug("[routingSelected] This is a read-only property of the component")}get routingSelected(){var t=this;return pt(t.routings,t.routingPath)}set routingParams(t){w.debug("[routingParams] This is a read-only property of the component")}get routingParams(){var t=this;return[{}].concat(t.routingSelected.map(function(a){return bt(a,t.routingPath)})).reduce(function(a,u,h){return Object.assign(a,u)})}createServiceInstance(){var t=this,a=t.body,u=this.data,h,i=t.getClass().__definition,g=L&&a.getAttribute("serviceClass")!==null?a.getAttribute("serviceClass"):null;return new Promise(function(I,N){var D=!!(Object.hasOwnProperty.call(a,"enableServiceClass")&&a.enableServiceClass||!Object.hasOwnProperty.call(a,"enableServiceClass")),H=!!(L&&a.getAttribute("response-to")!==null&&a.getAttribute("response-to")==="data"),$=!!(L&&a.getAttribute("response-to")!==null&&a.getAttribute("response-to")==="template");if(D&&g!==null&&(h=R(g)),!H&&i&&Object.hasOwnProperty.call(i,"responseTo")?H=i.responseTo==="data":!H&&Object.hasOwnProperty.call(R("Component"),"responseTo")&&(H=R("Component").responseTo==="data"),!$&&i&&Object.hasOwnProperty.call(i,"responseTo")?$=i.responseTo==="template":!$&&Object.hasOwnProperty.call(R("Component"),"responseTo")&&($=R("Component").responseTo==="template"),typeof h<"u"&&typeof D<"u"&&D===!0&&(H||$)){w.info("Loading service "+g);var le=de(h,{data:u});Je(le).then(function({request:te,service:ee}){var be;typeof ee.JSONresponse<"u"&&ee.JSONresponse!==null?be=ee.JSONresponse:be=ee.template,H&&(typeof u=="object"&&typeof be=="object"?u=Object.assign(u,be):u=be,t.data=u),t.serviceInstance=le,t.serviceData=u,$&&(t.template=be),I(be)},function(te){w.debug(`Service loading rejected for ${g} in ${t.name}`),N(te)}).catch(function(te){throw w.debug("Something went wroing while trying to load the service "+g),Error(`Error loading ${g} for ${t.name}. Detail: ${te}`)})}else I(null)})}_bindroute_(){var t=this;t._bindroute_.loaded?w.debug(`Routes already bound to popstate events for ${t.name}`):(L&&t.hostElements("a").map(function(a){return a.oldclick=a.onclick,a.onclick=function(u){var h=!0;j.global.get("routingPaths")||j.global.set("routingPaths",[]);var i=j.CONFIG.get("routingWay"),g=u.target[i];return j.global.get("routingPaths").includes(g)&&u.target[i]!==document.location[i]&&u.target.href!==document.location.href?(w.debug("A ROUTING WAS FOUND: "+g),window.history.pushState({href:u.target.href},u.target.href,u.target.href),R("Component").route(),h=!1):w.debug("NO ROUTING FOUND FOR: "+g),typeof u.target.oldclick<"u"&&typeof u.target.oldclick=="function"&&u.target.oldclick.call(u.target,u),h},null}),this._bindroute_.loaded=!0)}done(t){var a;if(typeof t<"u"){var{request:u,component:h}=t;a=Promise.resolve({request:u,component:h})}return a}createControllerInstance(){var t;if(L){if(typeof this.body>"u")throw new Error("The component has no body");var a=this.body.getAttribute("controllerClass");a||(a="Controller"),t=R(a),typeof t<"u"&&(this.controller=de(t,{component:this}))}return new Promise((u,h)=>{if(L&&typeof t<"u"&&typeof this.controller<"u"){if(typeof this.controller.done=="function")try{this.controller.done.call(this.controller)}catch(i){throw Error(i)}else w.debug(`${a} does not have a done() method.`),h(`${a} does not have a done() method.`);typeof this.controller.createRoutingController=="function"?this.controller.createRoutingController.call(this.controller):w.debug(`${a} does not have a createRoutingController() method.`)}u({component:this,controller:this.controller})})}createEffectInstance(){var t=this;return new Promise(function(a,u){if(L){var h=t.body.getAttribute("effectClass"),i=t.body.getAttribute("apply-effect-to");i=i!==null?i:"load",h!==null&&i==="observe"?t.applyObserveTransitionEffect(h):h!==null&&i==="load"&&t.applyTransitionEffect(h)}a({component:t,effect:t.effect})})}createViewInstance(){var t=this;return new Promise(function(a,u){var h=L?t.body.getAttribute("viewClass"):null;if(h!==null){var i=R(h);typeof i<"u"&&(t.view=de(i,{component:t}),Object.hasOwnProperty.call(t.view,"done")&&typeof t.view.done=="function"&&t.view.done.call(t.view))}a({component:t,view:t.view})})}__done__(){var t=this,a=O(function(){if(typeof t>"u")throw new Error("componentDone() has lost its context");if(typeof t.body>"u")throw new Error("The component has no body");t.createViewInstance(),t.createControllerInstance(),t.createEffectInstance(),w.debug(`Trying to run component helpers for ${t.name}...`);try{t.runComponentHelpers(),w.debug(`Component helpers for ${t.name} executed.`)}catch(u){throw w.debug(`Component helpers for ${t.name} could not be executed.`),Error(u)}t.subcomponents=t.__buildSubComponents__(),t._bindroute_(),L&&t.body.setAttribute("loaded",!0)},"componentDone");return new Promise(function(u,h){try{u(a.call(t))}catch(i){h(i)}})}hostElements(t){var a=this,u=[];return L&&(u=a.shadowed&&typeof a.shadowRoot<"u"?a.shadowRoot.subelements(t):a.body.subelements(t)),u}get subtags(){var t=this,a=Nt;return t.hostElements(a)}get bodyAttributes(){var t=this,a=t.body;return L?[...a.getAttributeNames()].map(u=>({[u]:a.getAttribute(u)})).reduce((u,h,i)=>Object.assign(u,h)):{}}get dataAttributes(){var t=this,a=t.body;return L?[{}].concat([...a.getAttributeNames()].filter(u=>u.startsWith("data-")).map(u=>({[u.split("-")[1]]:a.getAttribute(u)}))).reduce((u,h,i)=>Object.assign(u,h)):{}}__buildSubComponents__(t=!1){var a=this,u=a.subtags;return t||(u=u.filter(h=>h.getAttribute("loaded")!=="true")),(typeof a<"u"||a.subcomponents.length<1)&&(a.subcomponents=Ie(u,a)),a.subcomponents}fail(t){var a;if(typeof t<"u"){var{error:u,component:h}=t;a=Promise.resolve({error:u,component:h})}return a}set(t,a){this[t]=a}get(t){return this[t]}feedComponent(){var t=this;w.debug(`[Component][${this.name}][feedComponent] start feeding component...`);var a=O(function(i){if(typeof i.container>"u"&&typeof i.body>"u"){w.warn("COMPONENT {{NAME}} has an undefined container and body".replace("{{NAME}}",i.name));return}var g=typeof i.container>"u"||i.container===null?i.body:i.container,I=i.parsedAssignmentText;if(i.innerHTML=I,i.shadowed){w.debug("COMPONENT {{NAME}} is shadowed".replace("{{NAME}}",i.name)),w.debug("Preparing slots for Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",i.name));var N=He("div");g.subelements("[slot]").map(function($){$.parentElement===g&&N.appendChild($)}),w.debug("Creating shadowedContainer for COMPONENT {{NAME}}".replace("{{NAME}}",i.name));var D=He("div");D.classList.add("shadowHost");try{i.shadowRoot=D.attachShadow({mode:"open"})}catch{try{w.debug("Shadowed COMPONENT {{NAME}} is repeated".replace("{{NAME}}",i.name)),i.shadowRoot=D.shadowRoot}catch{w.warn("Shadowed COMPONENT {{NAME}} is not allowed on this browser".replace("{{NAME}}",i.name))}}if(typeof i.shadowRoot<"u"&&i.shadowRoot!==null){i.reload?(w.debug("FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}".replace("{{NAME}}",i.name)),D.shadowRoot.innerHTML=i.innerHTML):(N.innerHTML=i.parseTemplate(N.innerHTML),w.debug("ADDING Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",i.name)),D.shadowRoot.innerHTML+=i.innerHTML),w.debug("ADDING Slots to Shadowed COMPONENT {{NAME}} ".replace("{{NAME}}",i.name)),D.innerHTML+=N.innerHTML,w.debug("APPENDING Shadowed COMPONENT {{NAME}} to Container ".replace("{{NAME}}",i.name));var H=g.querySelector(".shadowHost");typeof H<"u"&&H!==null?(w.debug("Shadowed Container for COMPONENT {{NAME}} is already present in the tree ".replace("{{NAME}}",i.name)),i.shadowRoot.innerHTML=D.shadowRoot.innerHTML):g.appendChild(D)}else w.warn("Shadowed COMPONENT {{NAME}} is bad configured".replace("{{NAME}}",i.name))}else i.reload?(w.debug("FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}".replace("{{NAME}}",i.name)),g.innerHTML=i.innerHTML):g&&i?(w.debug("ADDING COMPONENT {{NAME}} ".replace("{{NAME}}",i.name)),g.innerHTML+=i.innerHTML):w.warn("COMPONENT {{NAME}} is not added to the DOM".replace("{{NAME}}",i.name))},"_feedComponent_InBrowser"),u=O(function(i){var g=i.parsedAssignmentText;i.innerHTML=g},"_feedComponent_InNode"),h;if(!F(t,"Component")){w.warn("Trying to feed a non component object");return}return L?h=a(t):h=u(t),h}rebuild(){var t=this,a=new Promise(function(u,h){if((typeof t>"u"||t===null)&&h("Component is undefined"),fe(t)&&F(t,"Component"))switch(!0){case t.get("tplsource")==="none":w.debug("Component "+t.name+" has specified template-source=none, so no template load was done");var i={request:null,component:t};t.__done__().then(function(){typeof t.done=="function"&&t.done.call(t,i),u.call(a,i)},function(){h.call(a,i)});break;case t.get("tplsource")==="inline":w.debug("Component "+t.name+" has specified template-source=inline, so it is assumed that template is already declared"),async function(g){g.feedComponent.bind(g)()}(t);var i={request:null,component:t};t.__done__().then(function(){typeof t.done=="function"&&t.done.call(t,i),u.call(a,i)},function(){h.call(a,i)});break;case(t.get("tplsource")==="default"&&t.get("templateURI")!==""):t.set("url",t.get("basePath")+t.get("templateURI")),Xe(t,!1).then(function(g){u.call(a,g)},function(g){h.call(a,g)});break;case(t.get("tplsource")==="external"&&t.get("templateURI")!==""):t.set("url",t.get("templateURI")),Xe(t,!1).then(function(g){u.call(a,g)},function(g){h.call(a,g)});break;case(t.get("tplsource")==="default"&&t.get("templateURI","")===""):w.debug(`Component ${t.name} template-source is ${t.get("tplsource")} and no templateURI is present`),h.call(a,`Component ${t.name} template-source is ${t.get("tplsource")} and no templateURI is present`);break;default:w.debug("Component "+t.name+" will not be rebuilt because no templateURI is present"),h.call(a,{request:null,component:t});break}});return a}Cast(t){let a=_e(t).map(u=>u.name.replace(/bound /g,"")).map(u=>({[u]:t[u].bind(this)})).reduce((u,h)=>Object.assign(u,h),{});return C(this,a)}static route(){var t=this,a,u=!!(fe(t)&&F(t,"Component")),h=O(function(i){var g=[],I=i.filter(function(N){return typeof N<"u"}).map(function(N){if(typeof N.name<"u")g.push(N.name);else throw new Error(P(N)+" does not have a name");return new Promise(function(D,H){var $;return typeof N<"u"&&N._reroute_?$=N._reroute_().then(function(){return N.reload=!0,N.rebuild()}).then(function(le){if(Object.hasOwnProperty.call(N,"subcomponents")&&typeof N.subcomponents<"u"&&N.subcomponents.length>0)return w.debug("LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: "+N.name),h.call(N,N.subcomponents);w.debug("No subcomponents to look for routings in: "+N.name),N.subtags.length>0&&(N.subcomponents=N.__buildSubComponents__(!0)),D(N)}):typeof N<"u"&&H("Component "+N.name+" is not an instance of Component"),$})});return Promise.all(I).then(function(){w.debug("ROUTING COMPLETED FOR "+g.join(", "))}).catch(function(N){w.warn("ROUTING FAILED FOR "+g.join(", ")+": "+N)})},"__route__");if(u||j.componentsStack)u&&w.debug("loading routings for instance "+t.name),a=h.call(t,u?t.subcomponents:j.componentsStack);else throw w.debug("An undetermined result expected if load routings. So will not be loaded this time."),Error("There is no valid instance and no components stack available to apply rountings");return a}fullscreen(){if(L){var t=this.body;t.requestFullscreen?t.requestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.msRequestFullscreen&&t.msRequestFullscreen()}}closefullscreen(){L&&(document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen())}_generateRoutingPaths(t){var a=this;return new Promise(function(u,h){L&&ot(a.validRoutingWays,a.routingWay)&&typeof t<"u"&&(a.innerHTML=t.innerHTML,a.routingNodes=t.subelements("routing"),a.routings=[],a.routingNodes.map(function(i,g){var I=i.getAttributeNames(),N={};I.map(function(D,H){N[I[H]]=i.getAttribute(I[H])}),a.routings.push(N),a.routingPaths||(a.routingPaths=[]),a.routingPaths.includes(N.path)||a.routingPaths.push(N.path),j.global.get("routingPaths")||j.global.set("routingPaths",[]),j.global.get("routingPaths").includes(N.path)||j.global.get("routingPaths").push(N.path)})),u()})}parseTemplate(t){var a=this,u,h=t;if(Object.hasOwnProperty.call(a,"templateHandler")){var i=a.templateHandler;w.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${i} ...`);var g=R(i),I=de(g,{component:a,template:h});I.component=a;var N=a.data;if(Object.hasOwnProperty.call(a,"assignRoutingParams")&&a.assignRoutingParams)try{N=Object.assign(N,a.routingParams)}catch{w.debug("[parseTemplate] it was not possible to assign the routing params to the template")}u=I.assign(N)}else w.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`),u=h;return u}_reroute_(){var t=this;return new Promise(function(a,u){L&&ot(t.validRoutingWays,t.routingWay)&&(t.routingPath=document.location[t.routingWay],t.routingSelected.map(function(h,i){var g=Qe({COMPONENTS_BASE_PATH:j.CONFIG.get("componentsBasePath"),COMPONENT_NAME:h.name.toString(),TPLEXTENSION:Object.hasOwnProperty.call(h,"tplextension")?h.tplextension:t.tplextension,TPL_SOURCE:"default"});t.templateURI=g}),t.routingSelected.length>0&&(t.template="",t.body.innerHTML="")),a(t)})}lazyLoadImages(){if(L){var t=this,a=t.shadowed?t.shadowRoot:t.body,u=[...a.subelements("img[lazy-src]")],h=O(function(g){g.setAttribute("src",g.getAttribute("lazy-src")),g.onload=()=>{g.removeAttribute("lazy-src")}},"_lazyLoadImages");if("IntersectionObserver"in window){var i=new IntersectionObserver((g,I)=>{g.forEach(N=>{N.isIntersecting&&(h(N.target),I.unobserve(N.target))})});u.map(function(g){return i.observe(g)})}else u.map(h)}return null}applyTransitionEffect(t){var a=R(t);if(typeof a>"u")throw Error(`${t} not found.`);typeof a<"u"&&F(a,"TransitionEffect")?(this.effect=de(a,{component:this}),this.effect.apply(this.effect.defaultParams)):w.debug(`${t} is ${P(a)} but is not a TransitionEffect`)}applyObserveTransitionEffect(t){if(L){var a=this,u=a.shadowed?a.shadowRoot.host:a.body,h=O(function(g){a.applyTransitionEffect(t)},"_applyEffect_");if("IntersectionObserver"in window){var i=new IntersectionObserver((g,I)=>{g.forEach(N=>{N.isIntersecting&&(h(N.target),I.unobserve(N.target))})});i.observe(u)}else h(u)}return null}scrollIntoHash(){if(L){var t=this;if(document.location.hash!==""){var a=t.shadowed?t.shadowRoot:t.body;a.subelements(document.location.hash).map(function(u){typeof u.scrollIntoView=="function"&&u.scrollIntoView(j.CONFIG.get("scrollIntoHash",{behavior:"auto",block:"top",inline:"top"}))})}}}i18n_translate(){if(L&&j.CONFIG.get("use_i18n")){var t=this,a=t.shadowed?t.shadowRoot:t.body,u=j.CONFIG.get("lang","en"),h=navigator.language.slice(0,2),i=j.global.get("i18n");if(u!==h&&typeof i=="object"&&Object.hasOwnProperty.call(i,"messages")){var g=O(function(){var I=this;return new Promise(function(N,D){var H=i.messages.filter(function($){return Object.hasOwnProperty.call($,u)&&Object.hasOwnProperty.call($,h)});a.subelements("ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component").map(function($){return H.map(function(le){var te=$.innerHTML;return te=te.replace(new RegExp(`${le[u]}`,"g"),le[h]),$.innerHTML=te,null}),$}),N()})},"callback_i18n");g.call(t).then(function(){w.debug("i18n loaded for component: "+t.name)})}}}addComponentHelper(t){var a=this;a._componentHelpers.push(t)}runComponentHelpers(){if(L){var t=this,a=[];a.push(t.i18n_translate.bind(t)),a.push(t.scrollIntoHash.bind(t)),a.push(t.lazyLoadImages.bind(t)),a=a.concat(t._componentHelpers),a.map(function(u){w.debug(`Executing ${u.name} as component helper for ${t.name}...`),u()})}}},"Component")]),_e(R("Component")).map(function(o){ve(o)}),L&&window.addEventListener("popstate",function(o){o.stopImmediatePropagation(),o.stopPropagation(),R("Component").route()}),z("com.qcobjects.controllers",[O(class extends R("InheritClass"){constructor({component:t,dependencies:a}){super({component:t,dependencies:a});W(this,"component",null);W(this,"dependencies",[]);if(this.component=t,this.dependencies=a,typeof this.component>"u"||this.component==="null")throw Error(`${P(this)} must be called with a component`)}routingSelectedAttr(t){return this.component.routingSelected.map(function(a){return a[t]}).filter(function(a){return a}).pop()}isTouchable(){return"ontouchstart"in window||navigator.MaxTouchPoints>0||navigator.msMaxTouchPoints>0}onpress(t,a){try{this.isTouchable()?this.component.body.subelements(t)[0].addEventListener("touchstart",a,{passive:!0}):this.component.body.subelements(t)[0].addEventListener("click",a,{passive:!0})}catch{w.debug("No button to assign press event")}}createRoutingController(){var t=this,a=t.component,u=t.routingSelectedAttr("controllerclass");if(typeof u<"u"){var h=R(u);typeof h<"u"&&(a.routingController=de(h,{component:a}),Object.hasOwnProperty.call(a.routingController,"done")&&typeof a.routingController.done=="function"&&a.routingController.done.call(a.routingController))}}done(){}},"Controller")]),z("com.qcobjects.views",[O(class extends R("InheritClass"){constructor({component:r=void 0,dependencies:t=[]}){if(super(...arguments),typeof this.component>"u"||this.component==="null")throw Error(`${P(this)} must be called with a component`)}},"View")]),z("com.qcobjects.api",[O(class extends R("InheritClass"){constructor(){super(...arguments);W(this,"kind","rest");W(this,"domain",nt);W(this,"basePath",Ve);W(this,"url","");W(this,"method","GET");W(this,"data",{});W(this,"reload",!1);W(this,"cached",!1)}set(t,a){this[t]=a}get(t){return this[t]}},"Service")]),z("com.qcobjects.api.services",[O(class extends R("Service"){constructor(){super(...arguments);W(this,"method","GET");W(this,"cached",!1);W(this,"headers",{"Content-Type":"application/json",charset:"utf-8"});W(this,"JSONresponse",null)}done(t){w.debug("***** RECEIVED RESPONSE:"),w.debug(t.service.template),this.JSONresponse=JSON.parse(t.service.template)}},"JSONService")]),z("com.qcobjects.api.config",[O(class extends R("JSONService"){constructor(){super(...arguments);W(this,"method","GET");W(this,"cached",!1);W(this,"configFileName","config.json");W(this,"headers",{"Content-Type":"application/json",charset:"utf-8"});W(this,"JSONresponse",null);this.set("url",this.get("basePath")+this.get("configFileName"))}done(t){w.debug("***** CONFIG LOADED:"),w.debug(t.service.template),this.JSONresponse=JSON.parse(t.service.template),Object.hasOwnProperty.call(this.JSONresponse,"__encoded__")&&(this.JSONresponse=JSON.parse(R("_Crypt").decrypt(this.JSONresponse.__encoded__,it)));for(var a in this.JSONresponse)j.CONFIG.set(a,this.JSONresponse[a]);this.configLoaded.call(this)}fail(t){this.configLoaded.call(this)}},"ConfigService")]),z("com.qcobjects.valueObjects",[O(class extends R("InheritClass"){constructor(){super(...arguments)}},"VO")]);var Qe=O(({TPL_SOURCE:o,COMPONENTS_BASE_PATH:r,COMPONENT_NAME:t,TPLEXTENSION:a})=>o==="default"?`${r}${t}.${a}`:"","ComponentURI"),Xe=O(function(o,r){var t,a=O(function(i,g){return t=new Promise(function(I,N){var D=i.__promise__,H=Object.hasOwnProperty.call(i,"container")&&typeof i.container<"u"&&i.container!==null?i.container:i.body;if(H!==null){var $=O(function(Ne){Ne.feedComponent();var We={request:ee,component:Ne};I.call(D,We)},"_feedComponent_");w.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",Ee(i.data)).replace("{{URL}}",i.url));var le=O(function(){var Ne=te?0:200;if(ee.status===Ne){var We=ee.responseText;w.debug("Data received {{DATA}}".replace("{{DATA}}",Ee(We))),w.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",i.name)),i.template=We,i.cached&&typeof Se<"u"&&Se.save(i.name,i.template),$.call(this,i)}else{var st={request:ee,component:i};N.call(D,st)}},"_componentLoaded");if(typeof i.template=="string"&&i.template!=="")$.call(this,i);else{var te=!!i.url.startsWith("file:"),ee=new XMLHttpRequest;if(te){if("fetch"in j){w.debug("I can use fetch..."),w.debug("It is a file to be loaded, so I will try to use fetch");var be=fetch(i.url).then(Ne=>{w.debug("I got a response from fetch, so I'll feed the component"),Ne.text().then(We=>{i.template=We,$.call(this,i)})})}}else try{w.debug("Calling the url of component in async mode."),ee.open(i.method,i.url,!0)}catch{w.debug("Last try has failed... The component cannot be loaded.")}!It&&!te&&ee.setRequestHeader("Content-Type","text/html"),te||(ee.onload=le);var ge=O(function(Ne){Ne=!(typeof Ne>"u"||!Ne),w.debug("SENDING THE NORMAL REQUEST "),Ne?"fetch"in j||(w.debug("I have to try to load the file using xhr... "),ee.send(null),ee.status===XMLHttpRequest.DONE&&le.call(this)):(w.debug("Trying to send the data to the component... "),ee.send(Ee(i.data)))},"_directLoad");if(i.cached&&!te){w.debug("USING CACHE FOR COMPONENT: "+i.name);var Se=new Be({index:i.cacheIndex,load(Ne){ge.call(this,te)},alternate(Ne){i.method==="GET"?(i.template=Ne.cache.getCached(i.cacheIndex),$.call(this,i)):ge.call(this,te)}});y.lastCache=Se}else w.debug("NOT USING CACHE FOR COMPONENT: "+i.name),ge.call(this,te)}}else w.debug("CONTAINER DOESNT EXIST")}),t.then(function(I){return i.__done__().then(function(){var N;return typeof i.done=="function"&&(N=i.done.call(i,I)),Promise.resolve(N)})},function(I){var N;return typeof i.fail=="function"&&(N=i.fail.call(i,I)),Promise.reject(N)}).catch(function(I){w.debug("Something wrong loading the component")}),t},"_componentLoaderInBrowser"),u=O(function(i,g){return t=new Promise(function(I,N){var D=t,H=O(function(ee){ee.feedComponent();var be={request:null,component:ee};I.call(D,be)},"_feedComponent_");w.debug("LOADING COMPONENT DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",Ee(i.data)).replace("{{URL}}",i.url));var $=O(function(ee,be){if(ee){var Se={request:null,component:i};N.call(D,Se)}else{var ge=be.toString();w.debug("Data received {{DATA}}".replace("{{DATA}}",Ee(ge))),w.debug("CREATING COMPONENT {{NAME}}".replace("{{NAME}}",i.name)),i.template=ge,i.cached&&typeof te<"u"&&te.save(i.name,i.template),H.call(this,i)}},"_componentLoaded");if(typeof i.template=="string"&&i.template!=="")H.call(this,i);else{w.debug("Loading the component as a local file in server...");var le=O(function(ee){let be=Ke("fs");w.debug("SENDING THE NORMAL REQUEST "),be.readFile(i.url,$)},"_directLoad");if(i.cached){w.debug("USING CACHE FOR COMPONENT: "+i.name);var te=new Be({index:i.cacheIndex,load(ee){le.call(this)},alternate(ee){i.method==="GET"?(i.template=ee.cache.getCached(i.cacheIndex),H.call(this,i)):le.call(this)}});y.lastCache=te}else w.debug("NOT USING CACHE FOR COMPONENT: "+i.name),le.call(this)}}),t.then(function(I){return i.__done__().then(function(){var N;return typeof i.done=="function"&&(N=i.done.call(i,I)),Promise.resolve(N)})},function(I){var N;return typeof i.fail=="function"&&(N=i.fail.call(i,I)),Promise.reject(N)}).catch(function(I){w.debug(`Something wrong loading the component: ${I}`)}),t},"_componentLoaderInNode"),h;return L?typeof r<"u"&&r?h=gt(a,arguments):h=a(o,r):h=u(o,r),h},"componentLoader"),Je=O(function(o,r){var t=O(function(g,I){var N=new Promise(function(D,H){w.debug("LOADING SERVICE DATA {{DATA}} FROM {{URL}}".replace("{{DATA}}",Ee(g.data)).replace("{{URL}}",g.url));var $=new XMLHttpRequest;$.withCredentials=g.withCredentials;var le=!0;$.open(g.method,g.url,le);for(var te in g.headers)try{typeof g.headers[te]!="function"&&$.setRequestHeader(te,g.headers[te])}catch{w.debug("Something went wrong when assign the header "+te)}$.onload=function(){if($.status===200){var ge=$.responseText;if(w.debug("Data received {{DATA}}".replace("{{DATA}}",Ee(ge))),w.debug("CREATING SERVICE {{NAME}}".replace("{{NAME}}",g.name)),g.template=ge,g.cached&&typeof be<"u"&&be.save(g.name,g.template),typeof g.done=="function"){var Se={request:$,service:g};g.done.call(g,Se),D.call(N,Se)}}else if(typeof g.fail=="function"){var Se={request:$,service:g};g.fail.call(g,Se),H.call(N,Se)}};var ee=O(function(){w.debug("SENDING THE NORMAL REQUEST ");try{$.send(Ee(g.data))}catch{w.debug("SOMETHING WRONG WITH REQUEST "),H.call(N,{request:$,service:g})}},"_directLoad");if(g.cached){var be=new Be({index:g.data,load(ge){ee.call(this)},alternate(ge){if(g.method==="GET"){if(g.template=ge.cache.getCached(g.name),typeof g.done=="function"){var Se={request:$,service:g};g.done.call(g,Se),D.call(N,Se)}}else ee.call(this)}});y.lastCache=be}else ee.call(this);return $});return N},"_serviceLoaderInBrowser"),a=O(function(g,I){var N=new Promise(function(D,H){if(typeof URL>"u"){y.URL=Ke("url").URL;let ke=y.URL}var $=new URL(g.url),le;g.useHTTP2=Object.hasOwnProperty.call(g,"useHTTP2")&&g.useHTTP2;var te=O(function(ke){w.debug("LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}".replace("{{DATA}}",Ee(g.data)).replace("{{URL}}",g.url));var et,yt={http2Client:ge,request:ke,service:g,responseHeaders:null};if(typeof g.data=="object"&&g.data!==null&&g.useHTTP2)try{w.debug("Sending data...");let Ge=new Buffer(Ee(g.data));ke.write(Ge)}catch{w.debug("It was not possible to send any data")}et="",ke.on("response",(Ge,mt)=>{w.debug("receiving response..."),yt.responseHeaders=Ge,et=""}),ke.on("data",Ge=>{w.debug("receiving data..."),et+=""+Ge.toString(),g.template=et}),g.useHTTP2&&ke.resume(),ke.on("end",()=>{w.debug("ending call..."),g.template=et,Object.hasOwnProperty.call(g,"useHTTP2")&&g.useHTTP2?ge.destroy():ke.destroy(),g.done.call(g,yt),D.call(N,yt)}),g.useHTTP2&&ke.end()},"captureEvents");try{var ee;if(g.useHTTP2){w.debug("using http2");var be=Ke("http2"),ge=be.connect($.origin);ee=Object.assign({":method":g.method,":path":$.pathname},g.options),ee=Object.assign(ee,g.headers),le=ge.request(ee),le.setEncoding("utf8"),te(le)}else if($.protocol==="http:"){var Se=Ke("http"),Ne=Se.request;ee=Object.assign({url:g.url,headers:g.headers},g.options);var le=Ne(g.url);te(le)}else if($.protocol==="https:"){var We=Ke("https");ee=Object.assign({hostname:$.hostname,port:$.port,path:$.pathname,method:g.method,headers:g.headers},g.options);var st=We.request(ee,function(ke){te(ke)});st.end()}else{var ye="Protocol not supported: "+$.protocol;throw w.debug(ye),new Error(ye)}}catch(ke){w.debug(ke),g.fail.call(g,ke),H.call(N,ke)}}).catch(function(D){console.log(D),w.debug("Something happened when trying to call the service: "+g.name),g.fail.call(g,D)});return N},"_serviceLoaderInNode"),u=O(function(g,I){var N=new Promise(function(D,H){w.debug(`Calling mockup service ${g.name} ...`);var $={request:null,service:g,responseHeaders:g.responseHeaders};typeof g.mockup=="function"?g.mockup.call(g,$):g.done.call(g,$),D.call(N,$)});return N},"_serviceLoaderMockup"),h=O(function(g,I){var N=new Promise(function(D,H){w.debug(`Calling local service ${g.name} ...`);var $={request:null,service:g,responseHeaders:g.responseHeaders};typeof g.local=="function"?g.local.call(g,$):g.done.call(g,$),D.call(N,$)});return N},"_serviceLoaderLocal"),i;switch(o.kind){case"rest":L?typeof r<"u"&&r?i=gt(t,arguments):i=t(o,r):i=a(o,r);break;case"mockup":i=u(o,r);break;case"local":i=h(o,r);break;default:w.debug(`The value of the kind property of the service ${o.name} is not valid`);break}return i},"serviceLoader");if(K(Je),K(Xe),K(Qe),K(x),K(Ee),K(B),K(fe),K(Ce),L){Element.prototype.buildComponents=function(o=!1){var r=Nt,t=this,a=t.subelements(r);return Ie(a,null)},HTMLDocument.prototype.buildComponents=Element.prototype.buildComponents,HTMLElement.prototype.buildComponents=Element.prototype.buildComponents;var Ye=O(class extends HTMLElement{constructor(){super(...arguments);let o=this,r=o.nodeName.toLowerCase(),t=He("quick-component"),a=o.getAttributeNames();t.setAttribute("name",r),o.hasAttribute("shadowed")||t.setAttribute("shadowed","true"),a.map(function(h){o.hasAttribute(h)&&(t.setAttribute(h,o.getAttribute(h)),o.removeAttribute(h))});var u=o.getAttributeNames().filter(function(h){return h.startsWith("data-")}).map(function(h){return h.split("-")[1]});u.map(function(h){t.setAttribute("data-"+h,o.getAttribute("data-"+h)),o.removeAttribute("data-"+h)}),[...o.children].map(function(h){t.appendChild(h.cloneNode(!0)),h.remove()}),o.append(t)}},"_ComponentWidget_");K(Ye);var Ue=O(function(o){customElements.define(o,class extends Ye{})},"RegisterWidget"),Ae=O(function(){var o=[...arguments];o.filter(function(r){return typeof r=="string"}).map(function(r){Ue(r)})},"RegisterWidgets");ve(Ue),ve(Ae),K(Ue),K(Ae)}L||z("com.qcobjects.api",[O(class extends R("InheritClass"){constructor({domain:r=nt,basePath:t=Ve,body:a=null,stream:u=null,request:h=null}){super(...arguments),w.debug("Initializing BackendMicroservice...");let i=this;typeof this.body>"u"&&(this.body=null),typeof a<"u"&&(this.body=a),this.cors(),i.stream=u,u.on("data",N=>{var D=h.method.toLowerCase(),H={post:i.post};Object.hasOwnProperty.call(H,D)&&H[D].call(i,N)});var g=h.method.toLowerCase(),I={get:i.get,head:i.head,put:i.put,delete:i.delete,connect:i.connect,options:i.options,trace:i.trace,patch:i.patch};Object.hasOwnProperty.call(I,g)&&I[g].call(i)}cors(){if(this.route.cors){w.debug("Validating CORS...");let{allow_origins:t,allow_credentials:a,allow_methods:u,allow_headers:h}=this.route.cors;var r=this;if(typeof r.headers!="object"&&(r.headers={}),typeof r.route.responseHeaders!="object"&&(r.route.responseHeaders={}),typeof t<"u")if(w.debug("CORS: allow_origins available. Validating origins..."),t==="*"||typeof r.request.headers.origin>"u"||[...t].indexOf(r.request.headers.origin)!==-1)w.debug("CORS: Adding header Access-Control-Allow-Origin=*"),r.route.responseHeaders["Access-Control-Allow-Origin"]="*";else{w.debug("CORS: Origin is not allowed: "+r.request.headers.origin),w.debug("CORS: Forcing to finish the response..."),this.body={};try{this.done()}catch(i){w.debug(`It was not possible to finish the call to the microservice: ${i}`)}}else w.debug("CORS: no allow_origins available. Allowing all origins..."),w.debug("CORS: Adding header Access-Control-Allow-Origin=*"),r.route.responseHeaders["Access-Control-Allow-Origin"]="*";typeof a<"u"?(w.debug(`CORS: allow_credentials present. Allowing ${a}...`),r.route.responseHeaders["Access-Control-Allow-Credentials"]=a.toString()):(w.debug("CORS: No allow_credentials present. Allowing all credentials."),r.route.responseHeaders["Access-Control-Allow-Credentials"]="true"),typeof u<"u"?(w.debug(`CORS: allow_methods present. Allowing ${u}...`),r.route.responseHeaders["Access-Control-Allow-Methods"]=[...u].join(",")):(w.debug("CORS: No allow_methods present. Allowing only GET, OPTIONS and POST"),r.route.responseHeaders["Access-Control-Allow-Methods"]="GET, OPTIONS, POST"),typeof h<"u"?(w.debug(`CORS: allow_headers present. Allowing ${h}...`),r.route.responseHeaders["Access-Control-Allow-Headers"]=[...h].join(",")):(w.debug("CORS: No allow_headers present. Allowing all headers..."),r.route.responseHeaders["Access-Control-Allow-Headers"]="*")}else w.debug("No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors")}head(r){this.done()}get(r){w.debug(`[BackendMicroservice.get] Data received: ${Ee(r)}`),this.done()}post(r){this.done()}put(r){this.done()}delete(r){this.done()}connect(r){this.done()}options(r){this.done()}trace(r){this.done()}patch(r){this.done()}finishWithBody(r){try{w.debug("[BackendMicroservice.finishWithBody] Ending the stream..."),w.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`),typeof this.body!="string"&&(this.body=Ee(this.body)),w.debug(`[BackendMicroservice.finishWithBody] + body: ${this.body} `),r.write(this.body),r.end(),w.debug("[BackendMicroservice.finishWithBody] Stream ended.")}catch(t){w.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${t}`)}}done(){w.debug("[BackendMicroservice.done] Finalizing the response...");var r=this,t=r.stream;try{if(w.debug("[BackendMicroservice.done] Sending response headers..."),r.route.responseHeaders)w.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(r.route.responseHeaders)}`),t.respond(r.route.responseHeaders);else throw Error("[BackendMicroservice.done] No headers present.")}catch(a){w.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${a}`)}if(r.body!==null)try{w.debug("[BackendMicroservice.done] A body of message is present. Finalizing the response..."),r.finishWithBody.call(r,t)}catch(a){w.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${a}`)}else w.debug("[BackendMicroservice.done] No body present. Ending stream..."),t.end()}},"BackendMicroservice")]),ue("SourceJS",Object,{domain:nt,basePath:Ve,body:He("script"),type:"text/javascript",containerTag:"body",url:"",data:{},async:!1,external:!1,set(o,r){this[o]=r},get(o){return this[o]},status:!1,done(){},fail(){},rebuild(){var o=this;try{document.getElementsByTagName(o.containerTag)[0].appendChild(function(r,t,a){return r.type=a.type,r.src=t,r.crossOrigin=Object.hasOwnProperty.call(a,"crossOrigin")?a.crossOrigin:"anonymous",r.async=a.async,r.onreadystatechange=function(){this.readyState==="complete"&&a.done.call(a)},r.onload=function(u){a.status=!0,a.done.call(a,u)},r.onerror=function(u){a.status=!1,a.fail.call(a,u)},a.body=r,r}.call(this,He("script"),this.external?this.url:this.basePath+this.url,o))}catch(r){o.status=!1,o.fail.call(o,r)}},Cast(o){return C(this,o)},_new_(o){this.__new__(o),this.rebuild()}}),ue("SourceCSS",Object,{domain:nt,basePath:Ve,body:He("link"),url:"",data:{},async:!1,external:!1,set(o,r){this[o]=r},get(o){return this[o]},done(){},rebuild(){var o=this;L&&window.document.getElementsByTagName("head")[0].appendChild(function(r,t,a){return r.type="text/css",r.rel="stylesheet",r.href=t,r.crossOrigin="anonymous",r.onreadystatechange=function(){this.readyState==="complete"&&a.done.call(a)},r.onload=a.done,a.body=r,r}.call(this,He("link"),this.external?this.url:this.basePath+this.url,o))},Cast(o){return C(this,o)},_new_(o){this.__new__(o),this.rebuild()}});var Y=O(function(o){return isNaN(o)?new Number(0):new Number(o)},"__to_number");Array.prototype.unique=function(){return this.filter(function(o,r,t){return t.indexOf(o)===r})},Array.unique=function(o){return o.unique()},ve(Array.unique),ve(Array.prototype.unique),Array.prototype.table=function(){console.table(this)},Array.table=function(o){return o.table()},ve(Array.table),ve(Array.prototype.table),Array.prototype.sum=function(){return this.reduce(function(o,r){return Y(o)+Y(r)},0)},Array.sum=function(o){return o.sum()},ve(Array.sum),ve(Array.prototype.sum),Array.prototype.avg=function(){return this.length<1?0:this.reduce(function(o,r){return(Y(o)+Y(r))/2})},Array.avg=function(o){return o.avg()},ve(Array.avg),ve(Array.prototype.avg),Array.prototype.min=function(){return this.reduce(function(o,r){return Y(o)<=Y(r)?o:r},1/0)},Array.min=function(o){return o.min()},ve(Array.min),ve(Array.prototype.min),Array.prototype.max=function(){return this.reduce(function(o,r){return Y(o)>=Y(r)?o:r},0)},Array.max=function(o){return o.max()},ve(Array.max),ve(Array.prototype.max),Array.prototype.sortBy=function(o,r=!0){var t=r?function(a,u){return u[o]a[o]?1:-1};return this.sort(t)},Array.sortBy=function(o,r,t=!0){return o.sortBy(r,t)},ve(Array.sortBy),ve(Array.prototype.sortBy),Array.matrix=function(o,r=0){var t=O(function(a){return r},"x_func");return Array.from({length:o},t)},ve(Array.matrix),Array.matrix2d=function(o,r=0){var t=O(function(u){return r},"y_func"),a=O(function(u){return Array.from({length:o},t)},"x_func");return Array.from({length:o},a)},ve(Array.matrix2d),Array.matrix3d=function(o,r=0){var t=O(function(u){return Array.from({length:o},function(){return r})},"y_func"),a=O(function(u){return Array.from({length:o},t)},"x_func");return Array.from({length:o},a)},ve(Array.matrix3d),j.range=function(o,r=0,t=1){return(r===0||typeof r>"u")&&(r=o,o=0),Array.from({length:(r-o)/t+1},function(a,u){return o+u*t})},ve(j.range),String.prototype.list=function(){var o=this;return j.range(0,o.length-1).map(function(r){return o[r]})},ve(String.prototype.list),j.getDocumentLayout=function(){var o=O((a,u)=>a>u?"landscape":null,"h"),r=O((a,u)=>u>a?"portrait":null,"v"),t=O((a,u)=>a===u?"square":null,"square");return[o(document.documentElement.clientWidth,document.documentElement.clientHeight),r(document.documentElement.clientWidth,document.documentElement.clientHeight),t(document.documentElement.clientWidth,document.documentElement.clientHeight)].filter(a=>a!==null).pop()},ue("ArrayList",Array,[]),R("ArrayList").matrix=Array.matrix,R("ArrayList").matrix2d=Array.matrix2d,R("ArrayList").matrix3d=Array.matrix3d,ve(R("ArrayList").matrix),ve(R("ArrayList").matrix2d),ve(R("ArrayList").matrix3d),ue("ArrayCollection",Object,{source:de(R("ArrayList"),[]),changed(o,r){w.debug("VALUE CHANGED"),w.debug(o),w.debug(r)},push(o){var r=this;w.debug("VALUE ADDED"),w.debug(o),r.source.push(o)},pop(o){var r=this;w.debug("VALUE POPPED"),w.debug(o),r.source.pop(o)},_new_(o){var r=this,t=0;r.source=de(R("ArrayList"),o);for(var a in r.source)isNaN(a)||(w.debug("binding "+a.toString()),function(u){Object.defineProperty(r,u,{set(h){w.debug("setting "+u+"="+h),r.source[u]=h,r.changed(u,h)},get(){return r.source[u]}})}(a),t++);r.source.length=t,Object.defineProperty(r,"length",{get(){return r.source.length}})}}),z("com.qcobjects.effects.base",[O(class extends R("InheritClass"){constructor(){super(...arguments);W(this,"duration",1e3)}animate({timing:t,draw:a,duration:u}){let h=performance.now();requestAnimationFrame(O(function i(g){let I=(g-h)/u;I>1&&(I=1);let N=t(I);a(Math.round(N*100)),I<1?requestAnimationFrame(i):typeof this<"u"&&this!==null&&Object.hasOwnProperty.call(this,"done")&&(typeof this.done).toLowerCase()==="function"&&this.done.call(this)},"animate"))}},"Effect")]),z("com.qcobjects.effects.transitions.base",[O(class extends R("Effect"){constructor(){super(...arguments);W(this,"duration",385);W(this,"defaultParams",{alphaFrom:0,alphaTo:1,angleFrom:180,angleTo:0,radiusFrom:0,radiusTo:30,scaleFrom:0,scaleTo:1});W(this,"fitToHeight",!1);W(this,"fitToWidth",!1);W(this,"effects",[]);w.info("DECLARING TransitionEffect "),this.component.defaultParams=this.defaultParams}apply({alphaFrom:t,alphaTo:a,angleFrom:u,angleTo:h,radiusFrom:i,radiusTo:g,scaleFrom:I,scaleTo:N}){var D=this;w.info("EXECUTING TransitionEffect ");var H=D.component.shadowed?D.component.shadowRoot.host:D.component.body;D.fitToHeight&&(H.height=typeof H.offsetParent=="object"&&H.offsetParent!==null?H.offsetParent.scrollHeight:H.getBoundingClientRect().height),D.fitToWidth&&(H.width=typeof H.offsetParent=="object"&&H.offsetParent!==null?H.offsetParent.scrollWidth:H.getBoundingClientRect().width),H.style.display="block",D.effects.map(function($,le){var te=R($),ee=new te({}),be=ee.apply,ge=[H].concat(Object.values({alphaFrom:t,alphaTo:a,angleFrom:u,angleTo:h,radiusFrom:i,radiusTo:g,scaleFrom:I,scaleTo:N}));be.apply(D,ge)})}},"TransitionEffect")]),z("com.qcobjects.timing",[O(class extends R("InheritClass"){constructor(){super(...arguments);W(this,"duration",1e3);W(this,"alive",!0)}thread({timing:t,intervalInterceptor:a,duration:u}){var h=this;let i=performance.now();requestAnimationFrame(O(function g(I){let N=I-i,D=N/u;D>1&&(D=1);let H=t(D,N);a(Math.round(H*100)),(D<1||u===-1)&&h.alive&&requestAnimationFrame(g)},"thread"))}},"Timer")]),z("com.qcobjects.tools.essentials",[O(class extends R("InheritClass"){constructor(){super(...arguments);W(this,"_toggle",!1);W(this,"_inverse",!0);W(this,"_positive",null);W(this,"_negative",null);W(this,"_dispatched",null);W(this,"_args",{});this._new_(...arguments)}changeToggle(){this._toggle=!this._toggle}_new_({positive:t,negative:a,args:u}){this._positive=t,this._negative=a,this._args=u}fire(){var t=this,a=new Promise(function(u,h){typeof t._positive=="function"&&typeof t._negative=="function"?(t._inverse?t._dispatched=t._toggle?t._negative.bind(t):t._positive.bind(t):t._dispatched=t._toggle?t._positive.bind(t):t._negative.bind(t),t._dispatched.call(t,t._args),u.call(a,t)):(w.debug("Toggle functions are not declared"),h.call(a,t))}).then(function(u){u.changeToggle()}).catch(function(u){w.debug(u.toString())});return a}},"Toggle")]),function(o){let r=O(function(i,g,I){var N=this;if(typeof i>"u"||i===null)throw Error(`mapper.${g}.${I} does not have a component instance or it is null.`);let D=o.global.get(I),H=i.get(I),$=i.data[I],le=typeof $<"u"?$:typeof H<"u"?H:D,te="";return typeof le<"u"&&typeof le.map<"u"?te=le.map(function(ee){let be=[...Object.keys(ee)].map(ge=>` data-${ge}="${typeof ee[ge]<"u"&&ee[ge]!==null?ee[ge].toString():""}"`).join("");return``}).join(""):w.debug(`${g}.${I} does not have a map property`),te},"mapper");X.setProcessor(r);let t=O(function(i,g,I){var N=` + /* CSS Document for Mobile Imports */ + @import url("${I}") (orientation:portrait); + @import url("${I}") (max-width:460px); + @import url("${I}") (aspect-ratio: 9/16); + @import url("${I}") (aspect-ratio: 10/16); + @import url("${I}") (aspect-ratio: 5/8); + @import url("${I}") (aspect-ratio: 3/4); + @import url("${I}") (aspect-ratio: 2/3); + `,D=` + @import url("${I}") (orientation:landscape) and (min-width:460px); + @import url("${I}") (aspect-ratio: 16/9) and (min-width:460px); + @import url("${I}") (aspect-ratio: 16/10) and (min-width:460px); + @import url("${I}") (aspect-ratio: 8/5) and (min-width:460px); + @import url("${I}") (aspect-ratio: 4/3) and (min-width:460px); + @import url("${I}") (aspect-ratio: 3/2) and (min-width:460px); + `,H={landscape:D,portrait:N};return Object.hasOwnProperty.call(H,g)?H[g]:""},"layout");X.setProcessor(t);let a=O(function(){let i=[...arguments].slice(1).map(function(I){return{[I.split("=")[0]]:I.split("=")[1]}}).reduce(function(I,N){return Object.assign(I,N)});return``},"component");X.setProcessor(a);let u=O(function(){let i=[...arguments].slice(1).map(function(I){return{[I.split("=")[0]]:I.split("=")[1]}}).reduce(function(I,N){return Object.assign(I,N)});return``},"quick_component");X.setProcessor(u);let h=O(function(i,g,I){return o.range(g).map(function(N){return I.replace("{{index}}",N.toString())}).join("")},"repeat");X.setProcessor(h)}(j),me(function(){j.CONFIG.get("useSDK")||j.__start__()}),K(K),K(qe),K(z),K(ue),K(de),K(dt),K(me),K(ht),K(L),K(_e),function(o){z("com.qcobjects",[O(class Pt extends R("InheritClass"){constructor(){super(...arguments);W(this,"_GLOBAL",{});W(this,"__definition",{});W(this,"__classType","GlobalSettings");this.set=Pt.set.bind(this),this.get=Pt.get.bind(this),this.__start__=Pt.__start__.bind(this)}static set(a,u){this._GLOBAL[a]=u}static get(a,u){var h;return typeof this._GLOBAL[a]<"u"?h=this._GLOBAL[a]:typeof u<"u"&&(h=u),h}static __start__(){var a=O(function(){var h;return L&&(h=new Promise(function(i,g){"serviceWorker"in navigator&&typeof o.CONFIG.get("serviceWorkerURI")<"u"&&(o.CONFIG.set("serviceWorkerScope",o.CONFIG.get("serviceWorkerScope")?o.CONFIG.get("serviceWorkerScope"):"/"),navigator.serviceWorker.register(o.CONFIG.get("serviceWorkerURI"),{scope:o.CONFIG.get("serviceWorkerScope")}).then(function(I){w.debug("Service Worker Registered"),i.call(h,I)},function(I){w.debug("Error registering Service Worker"),g.call(h,I)}),navigator.serviceWorker.ready.then(function(I){w.debug("Service Worker Ready"),i.call(h,I)},function(I){w.debug("Error loading Service Worker"),g.call(h,I)}))})),h},"__load__serviceWorker"),u=O(function(){return new Promise((h,i)=>{if(L){w.debug("Starting to building components");try{o.componentsStack=document.buildComponents.call(document)}catch(g){throw Error(`Something went wrong trying to start components tree: ${g.message}`)}w.debug("Initializing the service worker"),a.call(o).catch(function(g){w.debug(`error loading the service worker ${g}`)})}h()})},"_buildComponents");w.debug("Starting to load the config settings..."),o.CONFIG.get("useConfigService",!1)?(w.debug("Loading settings using local configuration file..."),o.global.configService=de(R("ConfigService")),o.global.configService.configLoaded=u,Je(o.global.configService)):(w.debug("Starting to load the components..."),u.call(this))}},"GlobalSettings")]),K(R("GlobalSettings")),y=de(R("GlobalSettings")),o=T(y,o),Object.defineProperty(o,"PackagesNameList",{set(r){w.debug("PackagesNameList is readonly")},get(){var r=O(function(t){var a=[];for(var u in t)typeof t[u]<"u"&&typeof t[u]!="function"&&Object.hasOwnProperty.call(t[u],"length")&&t[u].length>0&&(a.push(u),a=a.concat(r(t[u])));return a},"_get_packages_names");return r(d)}}),Object.defineProperty(o,"PackagesList",{set(r){w.debug("PackagesList is readonly")},get(){return o.PackagesNameList.map(function(r){let t=z(r),a;return t&&(a={packageName:r,classesList:t.filter(function(u){return B(u)})}),a}).filter(function(r){return typeof r<"u"})}}),Object.defineProperty(o,"ClassesList",{set(r){w.debug("ClassesList is readonly")},get(){var r=[];return o.PackagesList.map(function(t){return r=r.concat(t.classesList.map(function(a){return{packageName:t.packageName,className:t.packageName+"."+a.__definition.__classType,classFactory:a}})),t}),r}}),Object.defineProperty(o,"ClassesNameList",{set(r){w.debug("ClassesNameList is readonly")},get(){return o.ClassesList.map(function(r){return r.className})}}),L&&(ue("GLOBAL",f.global),K(R("GLOBAL"))),K(y),o.CONFIG.get("useSDK")&&function(r){var t=r.CONFIG.get("remoteImportsPath"),a=!r.CONFIG.get("useLocalSDK");r.CONFIG.set("remoteImportsPath",r.CONFIG.get("remoteSDKPath"));var u=!1,h="QCObjects-SDK";if(L)u=!0;else{var i=xe("qcobjects-sdk");i!==null?(h="qcobjects-sdk",u=!0):(h="node_modules/qcobjects-sdk/QCObjects-SDK",u=!0)}if(u)if(w.info("Importing SDK... "+h),U&&typeof at<"u"){let g=Vt()}else qe(h,function(){a?w.debug("QCObjects-SDK.js loaded from remote location"):w.debug("QCObjects-SDK.js loaded from local"),r.CONFIG.set("remoteImportsPath",t)},a);else w.debug("SDK has not been imported as it is not available at the moment")}(o)}(j),L&>(function(){me(function(){(function(o){let r=0,t=!1,a=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight),u=Math.max(document.body.scrollWidth,document.documentElement.scrollWidth,document.body.offsetWidth,document.documentElement.offsetWidth,document.body.clientWidth,document.documentElement.clientWidth);function h(i){var g=Math.round(o.scrollY*100/a),I=Math.round(o.scrollX*100/u),N=new CustomEvent("scrollpercent",{detail:{percentX:I,percentY:g}});i.target.dispatchEvent(N);var D="defaultscroll",H=[0,5,10,25,50,75,90,95,100];H.filter(function($){return $===g}).map(function($){D="percentY"+g.toString();var le=new CustomEvent(D,{detail:{percentX:I,percentY:g}});i.target.dispatchEvent(le)})}O(h,"scrollDispatcher"),document.addEventListener("scroll",function(i){t||(requestAnimationFrame(function(){h(i),t=!1}),t=!0)})})(j)})},null),L||(typeof j.global<"u"&&Object.hasOwnProperty.call(j.global,"_fireAsyncLoad")&&j.global._fireAsyncLoad.call(this),typeof j.global<"u"&&Object.hasOwnProperty.call(j.global,"onload")&&j.global.onload.call(this)),function(o){var r=O(function(){Object.freeze(Object.prototype),Object.freeze(Object)},"__freeze__");o&&j.CONFIG.get("secureObjects",!1)?me(function(){r()}):j.CONFIG.get("secureObjects",!1)&&r()}(L)}},"__qcobjects__").call(null,typeof vt=="object"&&typeof vt.exports=="object"?vt.exports=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:object:typeof global=="object"?global:typeof window=="object"?window:object)});export{Ht as a,Zt as b}; +//# sourceMappingURL=chunk-ZYLXOA35.js.map diff --git a/browser/chunks/chunk-ZYLXOA35.js.map b/browser/chunks/chunk-ZYLXOA35.js.map new file mode 100644 index 00000000..686c867e --- /dev/null +++ b/browser/chunks/chunk-ZYLXOA35.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../node_modules/qcobjects-sdk/node_modules/qcobjects-sdk/src/QCObjects-SDK.js", "../../node_modules/qcobjects-sdk/node_modules/qcobjects-sdk/src/index.cjs", "../../node_modules/qcobjects-sdk/node_modules/qcobjects/src/QCObjects.js", "../../node_modules/qcobjects-sdk/node_modules/qcobjects/src/index.cjs", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.i18n_messages.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.models.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.effects.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.components.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.components.grid.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.components.list.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.components.slider.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.components.notifications.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.components.splashscreen.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.controllers.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.controllers.grid.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.controllers.list.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.controllers.slider.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.controllers.form.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.controllers.swagger.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.modal.controllers.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.views.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.tools.canvas.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.tools.layouts.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.cloud.auth.session.usertoken.js", "../../node_modules/qcobjects-sdk/build/js/org.qcobjects.cloud.auth.session.data.js", "../../node_modules/qcobjects-sdk/build/QCObjects-SDK.js", "../../node_modules/qcobjects-sdk/public/index.cjs", "../../build/QCObjects.js"], + "sourcesContent": ["/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n(function __qcobjects_sdk__ (_top) {\n \"use strict\";\n if (typeof Object.defineProperty !== \"undefined\" && typeof _top !== \"undefined\"){\n try {\n Object.defineProperty(_top,\"__qcobjects_sdk__\", {\n enumerable: true,\n configurable: false,\n writable: false,\n value: __qcobjects_sdk__,\n });\n } catch (e){\n if (typeof _top.__qcobjects_sdk__ !== \"undefined\"){\n _top.__qcobjects_sdk__.__loaded__ = true;\n }\n }\n }\n\n if (typeof _top.__qcobjects_sdk__.__loaded__ === \"undefined\"){\n _top.__qcobjects_sdk__.__loaded__ = true;\n if (typeof _top === \"undefined\"){\n throw Error(\"Top context empty: It should either global, module or window\");\n }\n var global = _top;\n _top.global = global;\n var isBrowser = typeof window !== \"undefined\" && typeof window.self !== \"undefined\" && window === window.self;\n var isNodeCommonJS = (typeof module !== \"undefined\") ? (true): (false);\n var remoteImportsPath = CONFIG.get(\"remoteImportsPath\");\n var relativeImportPath = CONFIG.get(\"relativeImportPath\");\n var external = (!CONFIG.get(\"useLocalSDK\")) ? (true) : (false);\n if (external && !isNodeCommonJS) {\n CONFIG.set(\"remoteImportsPath\", \"https://sdk.qcobjects.dev/v2.4/src/js/\");\n } else {\n CONFIG.set(\"relativeImportPath\", \"qcobjects-sdk/src/js/\");\n }\n if (typeof _top._DOMCreateElement === \"undefined\") {\n _top._DOMCreateElement = function (elementName) {\n var _ret_;\n if (isBrowser) {\n _ret_ = document.createElement(elementName);\n } else {\n _ret_ = {};\n }\n return _ret_;\n };\n }\n var _imports_;\n if (isBrowser && !isNodeCommonJS) {\n _imports_ = [\n Import(\"org.qcobjects.i18n_messages\", function () {}, external),\n Import(\"org.qcobjects.models\", function () {}, external),\n Import(\"org.qcobjects.components\", function () {}, external),\n Import(\"org.qcobjects.components.grid\", function () {}, external),\n Import(\"org.qcobjects.components.list\", function () {}, external),\n Import(\"org.qcobjects.components.slider\", function () {}, external),\n Import(\"org.qcobjects.components.notifications\", function () {}, external),\n Import(\"org.qcobjects.components.splashscreen\", function () {}, external),\n Import(\"org.qcobjects.controllers\", function () {}, external),\n Import(\"org.qcobjects.controllers.grid\", function () {}, external),\n Import(\"org.qcobjects.controllers.list\", function () {}, external),\n Import(\"org.qcobjects.controllers.slider\", function () {}, external),\n Import(\"org.qcobjects.controllers.form\", function () {}, external),\n Import(\"org.qcobjects.controllers.swagger\", function () {}, external),\n Import(\"org.qcobjects.effects\", function () {}, external),\n Import(\"org.qcobjects.modal.controllers\", function () {}, external),\n Import(\"org.qcobjects.views\", function () {}, external),\n Import(\"org.qcobjects.tools.canvas\", function () {}, external),\n Import(\"org.qcobjects.tools.layouts\", function () {}, external),\n Import(\"org.qcobjects.cloud.auth.session.usertoken\", function () {}, external),\n Import(\"org.qcobjects.cloud.auth.session.data\", function () {}, external)\n ];\n } else {\n // non-browsers environment\n if (isNodeCommonJS){\n CONFIG.set(\"remoteImportsPath\", CONFIG.get(\"basePath\",\"\"));\n }\n \n var _relative_path_ = \"qcobjects-sdk/src/js/\";\n _imports_ = [\n Import(_relative_path_ + \"org.qcobjects.models\", function () {}, external),\n Import(_relative_path_ + \"org.qcobjects.components\", function () {}, external),\n Import(_relative_path_ + \"org.qcobjects.controllers\", function () {}, external),\n Import(_relative_path_ + \"org.qcobjects.views\", function () {}, external),\n Import(_relative_path_ + \"org.qcobjects.effects\", function () {}, external),\n Import(_relative_path_ + \"org.qcobjects.tools.canvas\", function () {}, external),\n Import(_relative_path_ + \"org.qcobjects.tools.layouts\", function () {}, external),\n Import(_relative_path_ + \"org.qcobjects.cloud.auth.session.usertoken\", function () {}, external),\n Import(_relative_path_ + \"org.qcobjects.cloud.auth.session.data\", function () {}, external)\n ];\n \n \n }\n const __start__ = GlobalSettings.__start__.bind(_top);\n _top._sdk_ = Promise.all(_imports_).then(()=>{\n CONFIG.set(\"useSDK\", true);\n CONFIG.set(\"remoteImportsPath\", remoteImportsPath);\n CONFIG.set(\"relativeImportPath\", relativeImportPath);\n __start__();\n });\n \n }\n\n}).call(null, (typeof module === \"object\" && typeof module.exports === \"object\") ? (\n module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})\n) : ((typeof global === \"object\") ? (global) : (\n (typeof window === \"object\") ? (window) : ({})\n)));", "const sdk = require (\"./QCObjects-SDK\");\nmodule.exports = sdk;", "/**\n * QCObjects 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n/*eslint no-unused-vars: \"off\"*/\n/*eslint no-redeclare: \"off\"*/\n/*eslint no-empty: \"off\"*/\n/*eslint strict: \"off\"*/\n\n/*eslint no-mixed-operators: \"off\"*/\n(function __qcobjects__ (_top) {\n \"use strict\";\n\n if (typeof Object.defineProperty !== \"undefined\" && typeof _top !== \"undefined\"){\n try {\n Object.defineProperty(_top,\"__qcobjects__\", {\n enumerable: true,\n configurable: false,\n writable: false,\n value: __qcobjects__,\n });\n } catch (e){\n if (typeof _top.__qcobjects__ !== \"undefined\"){\n _top.__qcobjects__.loaded = true;\n }\n }\n }\n if (typeof _top.__qcobjects__.loaded === \"undefined\"){\n _top.__qcobjects__.loaded = true;\n \n var global = _top;\n _top.global = global;\n \n var isDeno = (typeof window !== \"undefined\" && \"Deno\" in window);\n var isBrowser = (typeof window !== \"undefined\" && typeof window.self !== \"undefined\" && window === window.self) && !isDeno;\n var isNodeCommonJS = (typeof module !== \"undefined\") ? (true): (false);\n var deno_require = function (){ /* not yet implemented */};\n var _require_ = function (){\n return (isDeno)?(deno_require(...arguments)):(require(...arguments));\n };\n \n var _protected_code_ = function (_) {\n var __oldtoString = (typeof _.prototype !== \"undefined\") ? (_.prototype.toString) : (function () {\n return \"\";\n });\n if (typeof _.prototype !== \"undefined\") {\n _.prototype.toString = function () {\n var _protected_symbols = [\n \"__qcobjects__\",\n \"__qcobjects_sdk__\",\n \"__loaded__\",\n \"ComplexStorageCache\",\n \"css\",\n \"append\",\n \"attachIn\",\n \"debug\",\n \"info\",\n \"warn\",\n \"QC_Append\",\n \"set\",\n \"get\",\n \"done\",\n \"componentDone\",\n \"_new_\",\n \"__new__\",\n \"Class\",\n \"ClassFactory\",\n \"New\",\n \"Export\",\n \"Package\",\n \"Import\",\n \"subelements\",\n \"componentLoader\",\n \"buildComponents\",\n \"Controller\",\n \"View\",\n \"VO\",\n \"Service\",\n \"serviceLoader\",\n \"JSONService\",\n \"ConfigService\",\n \"SourceJS\",\n \"SourceCSS\",\n \"ArrayList\",\n \"ArrayCollection\",\n \"Effect\",\n \"Timer\",\n \"sum\",\n \"avg\",\n \"table\",\n \"max\",\n \"min\",\n \"range\",\n \"matrix\",\n \"matrix2d\",\n \"matrix3d\",\n \"unique\",\n \"uniqueId\",\n \"shortCode\",\n \"NamespaceRef\"\n ];\n var _ret_;\n if (_protected_symbols.includes(this.name)) {\n _ret_ = this.name + \"{ [QCObjects native code] }\";\n } else {\n _ret_ = __oldtoString.call(this);\n }\n return _ret_;\n };\n }\n };\n (_protected_code_)(Function);\n var _methods_ = function (_) {\n var _m = [];\n for (var i in _) {\n if ((typeof _[i]).toLowerCase() === \"function\") {\n _m.push(_[i]);\n }\n }\n return _m;\n };\n \n String.prototype.__mAll__ = function (regex) {\n // This is an alternative to old browsers that dont support String.prototype.matchAll\n // https://github.com/tc39/proposal-string-matchall\n var matches = [];\n this.replace(regex, function () {\n var match = Array.prototype.slice.call(arguments, 0, -2);\n match.input = arguments[arguments.length - 1];\n match.index = arguments[arguments.length - 2];\n matches.push(match);\n });\n return matches;\n };\n if (typeof String.prototype.matchAll === \"undefined\") {\n String.prototype.matchAll = String.prototype.__mAll__;\n }\n var _DOMCreateElement = function (elementName) {\n var _ret_;\n if (isBrowser) {\n _ret_ = document.createElement(elementName);\n } else {\n _ret_ = {};\n }\n return _ret_;\n };\n \n if (!isBrowser) {\n const fs = _require_(\"fs\");\n }\n \n var _DataStringify = function (data) {\n var getCircularReplacer = function () {\n var seen = new WeakSet();\n var _level = 0;\n return function (key, value) {\n if (typeof value === \"object\" && value !== null) {\n if (seen.has(value)) {\n _level += 1;\n return (_level <= 3) ? (_LegacyCopy(value)) : (null);\n }\n seen.add(value);\n }\n return value;\n };\n };\n return JSON.stringify(data, getCircularReplacer());\n };\n \n if (isBrowser) {\n var _subelements = function subelements(selector) {\n return [...this.querySelectorAll(selector)];\n };\n Element.prototype.subelements = _subelements;\n HTMLDocument.prototype.subelements = _subelements;\n HTMLElement.prototype.subelements = _subelements;\n if (typeof ShadowRoot !== \"undefined\") {\n ShadowRoot.prototype.subelements = _subelements;\n }\n }\n if (isBrowser) {\n try {\n _top = (typeof window.top !== \"undefined\") ? (window.top) : (window);\n _top[\"_allowed_\"] = true;\n } catch (e) {\n try {\n _top = document;\n _top[\"_allowed_\"] = true;\n } catch (e2) {\n try {\n _top = global;\n _top[\"_allowed_\"] = true;\n } catch (e3) {\n _top = {};\n _top[\"_allowed_\"] = true;\n }\n }\n }\n } else if (typeof global !== \"undefined\") {\n _top = global;\n }\n var _domain_, _basePath_;\n var _tag_filter_ = \"quick-component:not([loaded]),component:not([loaded])\";\n _basePath_ = (\n function () {\n var _basePath = \"\";\n if (isBrowser) {\n var baseURI = _top.document.baseURI.split(\"?\")[0].split(\"/\");\n baseURI.pop();\n _basePath = baseURI.join(\"/\") + \"/\";\n } else {\n var process;\n try {\n process = _require_(\"process\");\n } catch (e) {\n // not a process module\n }\n if (typeof process !== \"undefined\") {\n _basePath = `${process.cwd()}/`;\n } else {\n _basePath = \"\";\n }\n }\n return _basePath;\n }\n )();\n if (isBrowser) {\n /**\n * Polyfilling Promise\n */\n if (!(\"Promise\" in _top)) {\n _top.Promise = function (_f) {\n var _p = {\n then() {},\n catch () {},\n _then(response) {\n this.then.call(_p, response);\n },\n _catch(response) {\n this.catch.call(_p, response);\n }\n };\n _f.call(_p, _p._then, _p._catch);\n return _p;\n };\n }\n if (typeof _top.console === \"undefined\") {\n _top.console = function () {};\n _top.console.prototype.log = function (message) {};\n }\n \n _domain_ = (\n function () {\n return (typeof document !== \"undefined\" && document.domain !== \"\") ? (document.domain) : (\"localhost\");\n }\n )();\n \n var _secretKey = (\n function () {\n var __secretKey = _top[(![] + [])[((+!+[]) + (+!+[]))] + (typeof ![])[(+!+[])] + (typeof [])[((+!+[]) + (+!+[])) * ((+!+[]) + (+!+[]))] + (![] + [])[(+!+[])] + (!![] + [])[(+[])] + ([] + [] + [][\n []\n ])[(+[+!+[] + [+[]]]) / ((+!+[]) + (+!+[]))] + (typeof ![])[(+!+[])] + ([] + [] + [][\n []\n ])[(+!+[])]][\"h\" + (typeof ![])[(+!+[])] + (![] + [])[(+!+[] + ((+!+[]) + (+!+[])))] + (!![] + [])[(+[])]].toLowerCase();\n return __secretKey;\n }\n )();\n var is_phonegap = (\n function () {\n return (typeof cordova !== \"undefined\") ? (true) : (false);\n }\n )();\n \n } else {\n // This is only for code integrity purpose using non-browser implementations\n // like using node.js\n var _secretKey = \"secret\";\n _domain_ = \"localhost\";\n }\n \n _top._asyncLoad = [];\n var asyncLoad = function (callback, args) {\n var asyncCallback = {\n \"func\": callback,\n \"args\": args,\n \"dispatch\"() {\n this.func.apply(null, this.args);\n }\n };\n _top._asyncLoad.push(asyncCallback);\n return asyncCallback;\n };\n \n if (isBrowser) {\n var _fireAsyncLoad = function () {\n if (document.readyState === \"complete\") {\n _top._asyncLoad.map(function (fc) {\n fc.dispatch.call(fc);\n });\n }\n };\n document.onreadystatechange = _fireAsyncLoad;\n } else if (typeof _top.global !== \"undefined\") {\n _top.global._fireAsyncLoad = function () {\n _top._asyncLoad.map(function (fc) {\n fc.dispatch.call(fc);\n });\n };\n }\n \n _top.asyncLoad = asyncLoad;\n var Logger = function () {\n return {\n debugEnabled: true,\n infoEnabled: true,\n warnEnabled: true,\n debug(message) {\n if (this.debugEnabled) {\n console.log(\"\\x1b[35m%s\\x1b[0m\", `[DEBUG][${performance.now().toLocaleString()}] ${message}`);\n }\n },\n info(message) {\n var color;\n if (this.infoEnabled) {\n if (isBrowser) {\n color = \"\\x1b[103m%s\\x1b[0m\";\n } else {\n color = \"\\x1b[33m%s\\x1b[0m\";\n }\n console.info(color, `[INFO][${performance.now().toLocaleString()}] ${message}`);\n }\n },\n warn(message) {\n if (this.warnEnabled) {\n console.warn(\"\\x1b[31m%s\\x1b[0m\", `[WARN][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n };\n };\n var logger = new Logger();\n logger.debugEnabled = false;\n logger.infoEnabled = true;\n _top.logger = logger;\n var Base64 = {\n _keyStr: \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",\n encode(e) {\n var t = \"\";\n var n, r, i, s, o, u, a;\n var f = 0;\n e = Base64._utf8_encode(e);\n while (f < e.length) {\n n = e.charCodeAt(f++);\n r = e.charCodeAt(f++);\n i = e.charCodeAt(f++);\n s = n >> 2;\n o = (n & 3) << 4 | r >> 4;\n u = (r & 15) << 2 | i >> 6;\n a = i & 63;\n if (isNaN(r)) {\n u = a = 64;\n } else if (isNaN(i)) {\n a = 64;\n }\n t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a);\n }\n return t;\n },\n decode(e) {\n var t = \"\";\n var n, r, i;\n var s, o, u, a;\n var f = 0;\n e = e.replace(/[^A-Za-z0-9+/=]/g, \"\");\n while (f < e.length) {\n s = this._keyStr.indexOf(e.charAt(f++));\n o = this._keyStr.indexOf(e.charAt(f++));\n u = this._keyStr.indexOf(e.charAt(f++));\n a = this._keyStr.indexOf(e.charAt(f++));\n n = s << 2 | o >> 4;\n r = (o & 15) << 4 | u >> 2;\n i = (u & 3) << 6 | a;\n t = t + String.fromCharCode(n);\n if (u !== 64) {\n t = t + String.fromCharCode(r);\n }\n if (a !== 64) {\n t = t + String.fromCharCode(i);\n }\n }\n t = Base64._utf8_decode(t);\n return t;\n },\n _utf8_encode(e) {\n e = e.replace(/rn/g, \"n\");\n var t = \"\";\n for (var n = 0; n < e.length; n++) {\n var r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n } else if (r > 127 && r < 2048) {\n t += String.fromCharCode(r >> 6 | 192);\n t += String.fromCharCode(r & 63 | 128);\n } else {\n t += String.fromCharCode(r >> 12 | 224);\n t += String.fromCharCode(r >> 6 & 63 | 128);\n t += String.fromCharCode(r & 63 | 128);\n }\n }\n return t;\n },\n _utf8_decode(e) {\n var t = \"\";\n var n = 0;\n var r = 0;\n var c1 = 0;\n var c2 = 0;\n var c3;\n while (n < e.length) {\n r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n n++;\n } else if (r > 191 && r < 224) {\n c2 = e.charCodeAt(n + 1);\n t += String.fromCharCode((r & 31) << 6 | c2 & 63);\n n += 2;\n } else {\n c2 = e.charCodeAt(n + 1);\n c3 = e.charCodeAt(n + 2);\n t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63);\n n += 3;\n }\n }\n return t;\n }\n };\n var waitUntil = function (func, exp) {\n var _waitUntil = function (func, exp) {\n var maxWaitCycles = 2000;\n var _w = 0;\n var _t = setInterval(function () {\n if (exp.call()) {\n clearInterval(_t);\n func.call();\n logger.debug(\"Ejecuting \" + func.name + \" after wait\");\n } else {\n if (_w < maxWaitCycles) {\n _w += 1;\n logger.debug(\"WAIT UNTIL \" + func.name + \" is true, \" + _w.toString() + \" cycles\");\n } else {\n logger.debug(\"Max execution time for \" + func.name + \" expression until true\");\n clearInterval(_t);\n }\n }\n }, 1);\n };\n setTimeout(function () {\n _waitUntil(func, exp);\n }, 1);\n };\n if (typeof localStorage === \"undefined\") {\n /* Polyfill for localStorage */\n var localStorage = {\n getItem(name) {\n return (Object.hasOwnProperty.call(this, name)) ? (this[name]) : (null);\n },\n setItem(name, value) {\n this[name] = value;\n },\n removeItem(name) {\n delete this[name];\n }\n };\n /* end Polyfill for localStorage */\n }\n var ComplexStorageCache = function (params) {\n var object, load, alternate;\n object = params.index;\n if (typeof object !== \"undefined\") {\n load = params.load;\n alternate = params.alternate;\n var cachedObjectID = this.getID(object);\n var cachedResponse = localStorage.getItem(cachedObjectID);\n if (this.isEmpty(cachedResponse)) {\n var cachedNewResponse = load.call(null, {\n \"cachedObjectID\": cachedObjectID,\n \"cachedResponse\": cachedResponse,\n \"cache\": this\n });\n this.save(object, cachedNewResponse);\n logger.debug(\"RESPONSE OF {{cachedObjectID}} CACHED\".replace(\"{{cachedObjectID}}\", cachedObjectID));\n } else {\n var alternateResponse = alternate.call(null, {\n \"cachedObjectID\": cachedObjectID,\n \"cachedResponse\": cachedResponse,\n \"cache\": this\n });\n logger.debug(\"RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED \".replace(\"{{cachedObjectID}}\", cachedObjectID));\n }\n \n } else {\n throw new Error(\"ComplexStorageCache: index is undefined\");\n }\n return this;\n };\n ComplexStorageCache.prototype.getItem = function (cachedObjectID) {\n var retrievedObject = localStorage.getItem(cachedObjectID);\n if (!this.isEmpty(retrievedObject)) {\n return JSON.parse(retrievedObject);\n } else {\n return null;\n }\n };\n ComplexStorageCache.prototype.setItem = function (cachedObjectID, value) {\n localStorage.setItem(cachedObjectID, _DataStringify(value));\n };\n ComplexStorageCache.prototype.isEmpty = function (object) {\n var r = false;\n switch (true) {\n case (typeof object === \"undefined\"):\n case (typeof object === \"string\" && object === \"\"):\n case (typeof object === \"string\" && object === \"undefined\"):\n case (typeof object === \"number\" && object === 0):\n case (object === null):\n r = true;\n break;\n default:\n r = false;\n }\n return r;\n };\n ComplexStorageCache.prototype.getID = function (object) {\n var cachedObjectID;\n if (typeof object !== \"undefined\") {\n cachedObjectID = \"cachedObject_\" + Base64.encode(_DataStringify(object).replace(/\\{|\\}|,/g, \"_\"));\n }\n return cachedObjectID;\n };\n ComplexStorageCache.prototype.save = function (object, cachedNewResponse) {\n var cachedObjectID = this.getID(object);\n logger.debug(\"CACHING THE RESPONSE OF {{cachedObjectID}} \".replace(\"{{cachedObjectID}}\", cachedObjectID));\n this.setItem(cachedObjectID, cachedNewResponse);\n };\n ComplexStorageCache.prototype.getCached = function (object) {\n var cachedObjectID = this.getID(object);\n return this.getItem(cachedObjectID);\n };\n ComplexStorageCache.prototype.clear = function () {\n Object.keys(localStorage).filter(function (k) {\n return k.startsWith(\"cachedObject_\");\n }).map(function (c) {\n localStorage.removeItem(c);\n });\n };\n \n /**\n * Detecting passive events feature\n *\n * https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection\n **/\n \n // Test via a getter in the options object to see if the passive property is accessed\n if (isBrowser) {\n var supportsPassive = false;\n try {\n var opts = Object.defineProperty({}, \"passive\", {\n get() {\n supportsPassive = true;\n return supportsPassive;\n }\n });\n window.addEventListener(\"testPassive\", null, opts);\n window.removeEventListener(\"testPassive\", null, opts);\n } catch (e) {}\n var captureFalse = function () {\n return (supportsPassive) ? ({\n passive: true\n }) : (false);\n };\n \n // Use our detect's results. passive applied if supported, capture will be false either way.\n //elem.addEventListener('touchstart', fn, captureFalse);\n \n }\n \n \n /**\n * Basic Type of all elements\n */\n if (isBrowser) {\n Element.prototype.find = function (tag) {\n var _oo = [];\n var _tags = document.subelements(tag);\n _tags.map(function (_tt, _t) {\n if ((typeof _tags[_t] !== \"undefined\") && _tags[_t].parentNode.tagName === this.parentNode.tagName) {\n _oo.push(_Cast(_tt, (new Object())));\n }\n });\n return _oo;\n };\n }\n \n /**\n * Primary instance ID of all objects\n */\n var __instanceID;\n // Adaptation of Production steps of ECMA-262, Edition 5, 15.2.3.5\n // Reference: http://es5.github.io/#x15.2.3.5\n var _Object_Create = (function () {\n \n // make a safe reference to Object.prototype.hasOwnProperty\n var hasOwn = Object.prototype.hasOwnProperty;\n \n return function (O) {\n // 1. If Type(O) is not Object or Null throw a TypeError exception.\n if (typeof O !== \"object\") {\n throw TypeError(\"Object prototype may only be an Object or null. The type is \" + typeof (O));\n }\n \n // 2. Let obj be the result of creating a new object as if by the\n //\t\texpression new Object() where Object is the standard built-in\n //\t\tconstructor with that name\n // 3. Set the [[Prototype]] internal property of obj to O.\n var QCObjects = function () {};\n QCObjects.prototype = O;\n var obj = new QCObjects();\n \n // Let's not keep a stray reference to O...\n \n // 4. If the argument Properties is present and not undefined, add\n //\t\town properties to obj as if by calling the standard built-in\n //\t\tfunction Object.defineProperties with arguments obj and\n //\t\tProperties.\n if (arguments.length > 1) {\n // Object.defineProperties does ToObject on its first argument.\n var Properties = Object(arguments[1]);\n for (var prop in Properties) {\n if (hasOwn.call(Properties, prop)) {\n obj[prop] = Properties[prop];\n }\n }\n }\n \n // 5. Return obj\n return obj;\n };\n })();\n \n // Object.assign Polyfilling\n // Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill\n if (typeof Object.assign !== \"function\") {\n // Must be writable: true, enumerable: false, configurable: true\n Object.defineProperty(Object, \"assign\", {\n value: function assign(target, varArgs) { // .length of function is 2\n \"use strict\";\n if (target === null) { // TypeError if undefined or null\n throw new TypeError(\"Cannot convert undefined or null to object\");\n }\n \n var to = Object(target);\n \n for (var index = 1; index < arguments.length; index++) {\n var nextSource = arguments[index];\n \n if (nextSource !== null) { // Skip over if undefined or null\n for (var nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n return to;\n },\n writable: true,\n configurable: true\n });\n }\n \n var __is_raw_class__ = function (o_c) {\n return (typeof o_c === \"function\" && o_c.toString().startsWith(\"class\")) ? (true) : (false);\n };\n \n var _LegacyCopy = function (obj) {\n var _value_;\n switch (true) {\n case typeof obj === \"string\":\n _value_ = obj;\n break;\n case typeof obj === \"number\":\n _value_ = obj;\n break;\n case typeof obj === \"object\":\n _value_ = Object.assign({}, obj);\n break;\n case typeof obj === \"function\":\n _value_ = obj.bind({});\n break;\n case __is_raw_class__(obj):\n _value_ = class extends obj {};\n break;\n default:\n break;\n }\n return _value_;\n };\n \n \n var _QC_CLASSES = {};\n var _QC_PACKAGES = {};\n var _QC_PACKAGES_IMPORTED = [];\n var _QC_READY_LISTENERS = [];\n \n /**\n * Returns the object or function name\n *\n * @param Object or function\n */\n var ObjectName = function (o) {\n var ret = \"\";\n if (typeof o === \"function\" && Object.hasOwnProperty.call(o, \"name\") && o.name !== \"\") {\n ret = o.name;\n } else if (typeof o !== \"undefined\" && typeof o.constructor === \"function\" && o.constructor.name !== \"\") {\n ret = o.constructor.name;\n } else if (typeof o !== \"undefined\" && typeof o.constructor === \"object\") {\n ret = o.constructor.toString().replace(/\\[(.*?)\\]/g, \"$1\").split(\" \").slice(1).join(\"\");\n }\n return ret;\n };\n \n /**\n * Casts an object to another object class type\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\n var _Cast = function (obj_source, obj_dest) {\n for (var v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\") {\n try {\n obj_dest[v] = obj_source[v];\n } catch (e) {\n \n }\n }\n }\n return obj_dest;\n };\n \n /**\n * Casts an object to another object class type. Only properties\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\n var _CastProps = function (obj_source, obj_dest) {\n for (var v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\" && typeof obj_source[v] !== \"function\") {\n try {\n obj_dest[v] = obj_source[v];\n } catch (e) {\n // DO NOTHING\n }\n } else if (typeof obj_source[v] === \"function\") {\n try {\n obj_dest[v] = obj_source[v].bind(obj_dest);\n } catch (e) {\n logger.warn(e);\n }\n }\n }\n return obj_dest;\n };\n \n /**\n * Internal use to determine the forbidden names for classes\n * Reserved words\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n */\n var __is__forbidden_name__ = function () {\n return ([\"__proto__\", \"prototype\", \"Object\", \"Map\", \"defineProperty\", \"indexOf\", \"toString\", \"__instanceID\"].indexOf(arguments[0]) !== -1) ? (true) : (false);\n };\n \n /**\n * Determine the type of the Object for any QCObjects Object\n *\n * @param {Object} object\n */\n var __getType__ = function __getType__(o_c) {\n var _ret_ = \"\";\n switch (true) {\n case __is_raw_class__(o_c) && !!o_c.name:\n _ret_ = o_c.name;\n break;\n case typeof o_c === \"object\" &&\n (!!o_c.constructor &&\n !!o_c.constructor.name) \n && o_c.constructor.name !== \"\":\n _ret_ = o_c.constructor.name;\n break;\n case (!!o_c && !!o_c.__classType) && o_c.__classType !== \"\":\n _ret_ = o_c.__classType;\n break;\n case (!!o_c && !!o_c.__definition) && (!!o_c.__definition.__classType) && o_c.__definition.__classType !== \"\":\n _ret_ = o_c.__definition.__classType;\n break;\n case typeof o_c === \"function\" && !!o_c.name:\n _ret_ = o_c.name;\n break;\n default:\n _ret_ = ObjectName(o_c);\n break;\n }\n return _ret_;\n };\n \n /**\n * Returns if a class or object is from a determinated type\n * @param {Object} object\n * @param {String} typeName\n */\n var is_a = function is_a(obj, typeName) {\n return (typeof obj !== \"undefined\" && obj !== null &&\n (((isQCObjects_Class(obj) || isQCObjects_Object(obj)) && (obj.hierarchy().includes(typeName))) ||\n __getType__(obj) === typeName ||\n ObjectName(obj) === typeName ||\n typeof obj === typeName)) ? (true) : (false);\n };\n \n \n var __make_global__ = function (f) {\n if (typeof f !== \"undefined\") {\n if (isBrowser) {\n try {\n _top[f.name] = f;\n window[f.name] = f;\n } catch (e) {}\n } else if (typeof global !== \"undefined\") {\n if (!Object.hasOwnProperty.call(global, f.name)) {\n global[f.name] = f;\n }\n }\n }\n \n };\n \n var __register_class__ = function (_class_, __namespace) {\n var name = _class_.name || __getType__(_class_);\n _class_.__definition.__classType = name;\n if (typeof __namespace !== \"undefined\"){\n _class_.__definition.__namespace = __namespace;\n }\n _QC_CLASSES[name] = _class_;\n _top[name] = _QC_CLASSES[name];\n return _top[name];\n };\n \n var RegisterClass = function (_class_, __namespace) {\n return __register_class__(_class_, __namespace);\n };\n __make_global__(RegisterClass);\n \n /**\n * Creates new object class of another object\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n */\n var Class = function () {\n var _types_ = {};\n var name, type, definition;\n \n switch (arguments.length) {\n case 0:\n return class {};\n case 1:\n name = arguments[0];\n type = class {};\n definition = {};\n break;\n case 2:\n name = arguments[0];\n type = class {};\n definition = arguments[1];\n break;\n case 3:\n name = arguments[0];\n type = arguments[1];\n definition = arguments[2];\n break;\n default:\n break;\n }\n \n if (typeof type !== \"function\") {\n throw new Error(\"Class type must be a function or class\");\n }\n \n if (__is__forbidden_name__.call(this, name)) {\n throw new Error(`${name} is not an allowed word in the name of a class`);\n }\n \n if (typeof type[\"__definition\"] !== \"undefined\") {\n definition[\"__definition\"] = Object.assign(_LegacyCopy(type.__definition), type);\n }\n \n _types_[type.name] = type;\n \n if (typeof definition === \"undefined\" || definition === null) {\n definition = {};\n } else {\n definition = _LegacyCopy(definition);\n }\n \n /* hack to prevent duplicate __instanceID */\n if (typeof definition[\"__instanceID\"] !== \"undefined\") {\n delete definition[\"__instanceID\"];\n }\n \n _QC_CLASSES[name] = class extends _types_[type.name] {\n __classType = name;\n __definition = {\n ...definition\n };\n \n static hierarchy(__class__) {\n var __classType = function (o_c) {\n return (Object.hasOwnProperty.call(o_c, \"__classType\")) ? (o_c.__classType) : (__getType__.call(__class__, o_c));\n };\n var __hierarchy__proto__ = (c) => {\n return (typeof c !== \"undefined\" && typeof c.__proto__ !== \"undefined\" && c.__proto__ !== null) ? (((__classType(c) !== \"\") ? ([__classType(c)]) : ([])).concat(__hierarchy__proto__(c.__proto__))) : ([]);\n };\n \n if (typeof __class__ === \"undefined\" || __class__ === null) {\n __class__ = this;\n }\n var __hierarchy = [];\n __hierarchy.push(__classType(__class__));\n __hierarchy = __hierarchy.concat(__hierarchy__proto__(__class__.__proto__));\n return __hierarchy;\n }\n \n static getParentClass() {\n return Object.getPrototypeOf(this.prototype.constructor);\n }\n \n constructor() {\n var _o_;\n if (arguments.length > 0) {\n _o_ = {\n ...arguments[0]\n };\n } else {\n _o_ = {};\n }\n super(_o_);\n \n let self = this;\n __instanceID = (typeof __instanceID === \"undefined\" || __instanceID === null) ? (0) : (__instanceID + 1);\n if (!self.__instanceID) {\n Object.defineProperty(self, \"__instanceID\", {\n value: __instanceID,\n writable: false\n });\n }\n \n if (typeof self.__definition !== \"undefined\") {\n Object.keys(self.__definition).filter(function (k) {\n return isNaN(k) && ![\"name\", \"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n }).forEach(function (key) {\n if (typeof self.__definition[key] === \"function\") {\n self[key] = self.__definition[key].bind(self);\n } else {\n self[key] = self.__definition[key];\n }\n });\n }\n _methods_(_QC_CLASSES[self.__classType]).map(function (m) {\n self[m.name] = m.bind(self);\n });\n _methods_(self.__definition).map(function (m) {\n self[m.name] = m.bind(self);\n });\n\n if (!!self[\"body\"]){\n if (typeof self.__definition === \"undefined\" || (!Object.hasOwnProperty.call(self.__definition, \"body\")) || typeof self.__definition.body === \"undefined\") {\n try {\n if (isBrowser) {\n self[\"body\"] = _DOMCreateElement(self.__definition.__classType);\n } else {\n self[\"body\"] = {};\n }\n } catch (e) {\n self[\"body\"] = {};\n }\n } else if (Object.hasOwnProperty.call(self.__definition, \"body\")) {\n self[\"body\"] = self.__definition.body;\n } \n }\n \n \n try {\n if (typeof self.__new__ === \"function\") {\n self.__new__.call(self, _o_);\n } else if (typeof super.__new__ === \"function\") {\n self.__new__ = super.__new__.bind(self);\n self.__new__.call(self, _o_);\n }\n if (typeof self === \"object\" && Object.hasOwnProperty.call(self, \"_new_\") && typeof self._new_.isCalled === \"undefined\") {\n try {\n self._new_.call(self, _o_);\n self._new_.isCalled = true;\n } catch (e) {\n logger.warn(`${self.__classType}._new_() failed with error: ${e}`);\n }\n }\n } catch (e) {\n logger.warn(e);\n }\n }\n \n __new__(_o_) {\n _CastProps(_o_, this);\n }\n _new_() {}\n \n getClass() {\n return Object.getPrototypeOf(this.constructor);\n }\n \n css(_css) {\n if (typeof this[\"body\"] !== \"undefined\" && this[\"body\"][\"style\"] !== \"undefined\") {\n logger.debug(\"body style\");\n this[\"body\"][\"style\"] = _Cast(_css, this[\"body\"][\"style\"]);\n }\n return this[\"body\"][\"style\"];\n }\n \n hierarchy() {\n var __instance__ = this;\n return this.getClass().hierarchy(__instance__);\n }\n \n \n append(child) {\n logger.debug(\"append: start\");\n if (is_a(child, \"Component\")) {\n logger.debug(\"append: child is a Component\");\n logger.debug(`appending the body of ${child.name}`);\n }\n var child = (arguments.length > 0) ? (arguments[0]) : (this[\"body\"]);\n if (typeof this[\"body\"] !== \"undefined\") {\n logger.debug(\"append element\");\n if (arguments.lenght > 0) {\n logger.debug(\"append to element\");\n this[\"body\"].append(child);\n if (typeof this[\"childs\"] === \"undefined\") {\n this[\"childs\"] = [];\n }\n this[\"childs\"].push(child);\n } else {\n if (isBrowser) {\n logger.debug(\"append to body\");\n document.body.append(child);\n }\n }\n }\n }\n \n attachIn(tag) {\n if (isBrowser) {\n var tags = document.subelements(tag);\n for (var i = 0, j = tags.length; i < j; i++) {\n tags[i].append(this);\n }\n } else {\n throw new Error(\"attachIn not yet implemented for non browser platforms\");\n }\n }\n \n };\n \n // remove the keys from definition that exist in the prototype\n \n _QC_CLASSES[name] = _CastProps(definition, _QC_CLASSES[name]);\n _QC_CLASSES[name][\"__definition\"] = definition;\n _QC_CLASSES[name][\"__definition\"][\"__classType\"] = name;\n _QC_CLASSES[name][\"__definition\"][\"__new__\"] = function __new__(_o_) {\n _CastProps(_o_, this);\n };\n \n _top[name] = _QC_CLASSES[name];\n \n return _top[name];\n };\n \n Class.prototype.toString = function () {\n return \"Class(name, type, definition) { [QCObjects native code] }\";\n };\n \n /**\n * Returns the QCObjects Class Factory of a given ClassName\n *\n * @param {String} name\n */\n \n var ClassFactory = function (className) {\n var _classFactory;\n if (className !== null && className.indexOf(\".\") > -1) {\n var packageName = className.split(\".\").slice(0, className.split(\".\").length - 1).join(\".\");\n var _className = className.split(\".\").slice(-1).join(\"\");\n var _package = Package(packageName);\n var packageClasses = (typeof _package !== \"undefined\") ? (_package.filter(classFactory => {\n return isQCObjects_Class(classFactory) &&\n (classFactory.__definition.__classType === _className || (typeof classFactory === \"function\" && !!classFactory.name) ) ;\n }).reverse()) : ([]);\n if (packageClasses.length > 0) {\n _classFactory = packageClasses[0];\n } else {\n throw Error (`Class ${className} not found.`);\n }\n } else if (className !== null && Object.hasOwnProperty.call(_QC_CLASSES, className)) {\n _classFactory = _QC_CLASSES[className];\n }\n return _classFactory;\n };\n \n if (isBrowser) {\n Element.prototype.append = function QC_Append(child) {\n if (isQCObjects_Object(child) || typeof child.body !== \"undefined\") {\n this.appendChild(child.body);\n } else {\n this.appendChild(child);\n }\n };\n \n /**\n * A replacement for direct using of innerHTML\n * use: [element].render('content') where 'content' is the string corresponding\n * to the DOM to insert in the element\n **/\n Element.prototype.render = function QC_Render(content) {\n var _self = this;\n var _appendVDOM = function (_self, content) {\n if (typeof document.implementation.createHTMLDocument !== \"undefined\") {\n var doc = document.implementation.createHTMLDocument(\"\");\n doc.innerHTML = content;\n doc.body.subelements(\"*\").map(function (element) {\n return _self.append(element);\n });\n }\n };\n if (typeof this.innerHTML !== \"undefined\") {\n try {\n this.innerHTML += content;\n } catch (e) {\n _appendVDOM(_self, content);\n }\n } else {\n _appendVDOM(_self, content);\n }\n };\n }\n \n /**\n * Returns a method from a superior QCObjects Class\n * It is useful for Class Inheritance in the _new_ and __new__ method constructors\n * @example _super_('MySuperClass','MySuperMethod').call(this,params) #where this is the current instance and params are method parameters\n *\n * @param {String} className\n * @param {String} classMethodName\n * @param {Object} params\n */\n var _super_ = function (className, classMethodName, params) {\n return ClassFactory(className)[classMethodName];\n };\n _super_.prototype.toString = function () {\n return \"_super_(className,classMethodName,params) { [QCObjects native code] }\";\n };\n \n /**\n * Creates an object from a Class definition\n *\n * @param {QC_Object} o\n * @param {Object} args\n */\n \n var New = function (__class__, args) {\n args = (arguments.length > 1) ? (args) : ({});\n return (typeof __class__ === \"undefined\") ? (new Object()) : (new __class__(args));\n };\n \n New.prototype.toString = function () {\n return \"New(QCObjectsClassName, args) { [QCObjects native code] }\";\n };\n \n \n var Export = function (f) {\n return __make_global__(f);\n };\n Export.prototype.toString = function () {\n return \"Export(function or symbol) { [QCObjects native code] }\";\n };\n \n if (!isBrowser) {\n var findPackageNodePath = function (packagename) {\n const fs = _require_(\"fs\");\n var sdkPath = null;\n try {\n var sdkPaths = [\n `${_top.CONFIG.get(\"projectPath\")}${_top.CONFIG.get(\"relativeImportPath\")}`,\n `${_top.CONFIG.get(\"basePath\")}${_top.CONFIG.get(\"relativeImportPath\")}`,\n `${_top.CONFIG.get(\"projectPath\")}`,\n `${_top.CONFIG.get(\"basePath\")}`,\n `${_top.CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}${_top.CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}/node_modules/` + packagename,\n `${process.cwd()}/node_modules`,\n `${process.cwd()}`,\n \"node_modules\",\n \"./\",\n \"\"\n ].concat(module.paths);\n sdkPaths = sdkPaths.filter(p => {\n return fs.existsSync(p + \"/\" + packagename);\n });\n if (sdkPaths.length > 0) {\n sdkPath = sdkPaths[0];\n logger.info(packagename + \" is Installed.\");\n } else {\n // logger.debug(packagename + ' is not in a standard path.');\n }\n } catch (e) {\n // do nothing\n console.log(e);\n }\n return sdkPath;\n };\n Export(findPackageNodePath);\n }\n \n Class(\"_Crypt\", Object, {\n last_string: \"\",\n last_key: \"\",\n construct: false,\n _new_(o) {\n var string = o[\"string\"];\n var key = (o.hasOwnProperty.call(o, \"key\")) ? (o[\"key\"]) : (null);\n this.__new__(o);\n key = (key === null) ? (this.__instanceID) : (key);\n this.last_key = key;\n this.last_string = string;\n this.construct = true;\n },\n _encrypt() {\n var string = this.string;\n var key = this.key;\n var result = \"\";\n var char;\n var keychar;\n for (var i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) + keychar.charCodeAt(0));\n result += char;\n }\n this.last_string = Base64.encode(result);\n return this.last_string;\n },\n _decrypt() {\n var string = this.string;\n var key = this.key;\n var result = \"\";\n var char;\n var keychar;\n string = Base64.decode(string);\n for (var i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) - keychar.charCodeAt(0));\n result += char;\n }\n \n this.last_string = result;\n return this.last_string;\n },\n encrypt(string, key) {\n var crypt = New(ClassFactory(\"_Crypt\"), {\n string: string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._encrypt();\n },\n decrypt(string, key) {\n var crypt = New(ClassFactory(\"_Crypt\"), {\n string: string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._decrypt();\n }\n });\n \n var _CryptObject = function (o) {\n return ClassFactory(\"_Crypt\").encrypt(_DataStringify(o), _secretKey);\n };\n var _DecryptObject = function (s) {\n return (s === \"\") ? ({}) : (JSON.parse(ClassFactory(\"_Crypt\").decrypt(s, _secretKey)));\n };\n \n var shortCode = function () {\n var length = 1000;\n var code1 = ClassFactory(\"_Crypt\").encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date()).getTime().toString());\n var code2 = ClassFactory(\"_Crypt\").encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date((new Date()).getTime() - 1000 * 1000)).getTime().toString());\n var shortCode = code2.list().map((o1, index) => {\n return code1.list()[index] === o1 ? null : o1;\n }).filter(c => c !== null).join(\"\");\n return shortCode;\n };\n var uniqueId = shortCode;\n Class(\"InheritClass\", class {}, {});\n \n class Processor extends ClassFactory(\"InheritClass\") {\n component = null;\n __definition = {};\n __classType = \"Processor\";\n \n static processors= {\n \"config\"(component,arg) {\n return _top.CONFIG.get(arg, \"\");\n },\n \"ENV\"(component, arg) {\n return (typeof process !== \"undefined\") ? (process.env[arg]) : (\"\");\n },\n \"global\"(component, arg) {\n return (typeof global !== \"undefined\") ? (global[arg]) : (\"\");\n }\n };\n static setProcessor(_proc_) {\n if (typeof _proc_ === \"function\" && _proc_.name !== \"\") {\n this.processors[_proc_.name] = _proc_;\n }\n }\n \n constructor (){\n super(...arguments);\n this.processors = Processor.processors;\n this.process = Processor.process.bind(this);\n this.processObject = Processor.processObject.bind(this);\n this.setProcessor = Processor.setProcessor.bind(this);\n this.execute = Processor.execute.bind(this);\n }\n \n static execute(component,processorName, args) {\n var processorHandler = (typeof component !== \"undefined\" && component !== null)?(component.processorHandler):(this);\n return processorHandler.processors[processorName].bind(processorHandler).apply(processorHandler,[component,...args.split(\",\")]);\n }\n \n static process(template, component = null) {\n var processorHandler = (component !== null)?(component.processorHandler):( New(Processor,{component:null}) ) ;\n if (typeof template === \"string\") {\n Object.keys(processorHandler.processors).map(function (funcName) {\n [...template.matchAll(new RegExp(\"\\\\$\" + funcName + \"\\\\((.*)\\\\).*\", \"g\"))].map(\n function (procesorMatch) {\n var match0 = `$${funcName}(${procesorMatch[1]})`;\n template = template.replace(match0, processorHandler.execute.bind(processorHandler).call(processorHandler, component, funcName, procesorMatch[1]));\n }\n );\n });\n }\n return template;\n }\n \n static processObject(obj, component = null) {\n var __instance__ = (component === null)?(this):(component.processorHandler);\n if (typeof __instance__ === \"undefined\"){\n __instance__ = new Processor({component:component});\n }\n if (typeof obj === \"object\") {\n Object.keys(obj).map(\n function (_k) {\n if (typeof obj[_k] === \"object\" && !obj[_k].hasOwnProperty.call(obj[_k], \"call\")) {\n obj[_k] = __instance__.processObject.bind(__instance__)(obj[_k], component);\n } else if (typeof obj[_k] === \"string\") {\n obj[_k] = __instance__.process.bind(__instance__)(obj[_k], component);\n }\n }\n );\n } else if (typeof obj === \"string\") {\n obj = __instance__.process.bind(__instance__)(obj, component);\n }\n return obj;\n }\n \n }\n Processor.__definition = {};\n Processor.__classType = \"Processor\";\n RegisterClass(Processor,\"com.qcobjects\");\n __make_global__(Processor);\n \n \n class ConfigSettings {\n static _instance = null;\n static _CONFIG_ENC = null;\n static get instance() {\n \n if (this._instance === null) {\n var _config_settings = new ConfigSettings();\n _config_settings._CONFIG = {\n \"relativeImportPath\": \"\",\n \"remoteImportsPath\": \"\",\n \"remoteSDKPath\": \"https://sdk.qcobjects.dev/v2.4/\",\n \"asynchronousImportsLoad\": false,\n \"removePackageScriptAfterLoading\": true,\n \"componentsBasePath\": \"\",\n \"delayForReady\": 0,\n \"preserveComponentBodyTag\": false,\n \"useConfigService\": false,\n \"routingWay\": \"hash\",\n \"useSDK\": true,\n \"useLocalSDK\": false,\n \"basePath\": _basePath_\n };\n _config_settings._CONFIG_ENC = null;\n this._instance = _config_settings;\n }\n \n return this._instance;\n }\n \n static set instance(value) {\n this._instance = value;\n }\n }\n _QC_CLASSES[\"ConfigSettings\"] = ConfigSettings;\n \n Class(\"CONFIG\", Object, {\n \n get _CONFIG_ENC() {\n return ClassFactory(\"ConfigSettings\").instance._CONFIG_ENC;\n },\n \n get _CONFIG() {\n return ClassFactory(\"ConfigSettings\").instance._CONFIG;\n },\n \n set(name, value) {\n logger.debug(`CONFIG.set ${name}: ${value}`);\n // hack to force update basePath from CONFIG\n if (name === \"basePath\") {\n _basePath_ = value;\n }\n var _conf;\n try {\n _conf = (\n function (config) {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = ClassFactory(\"_Crypt\").encrypt(_DataStringify({}), _secretKey);\n }\n var _protectedEnc = config._CONFIG_ENC.valueOf();\n var _protectedConf = config._CONFIG.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n }\n )(ClassFactory(\"ConfigSettings\").instance);\n } catch (e) {\n _conf = {};\n console.error(e);\n logger.debug(\"failed to encrypt config\");\n }\n \n _conf[name] = value;\n ClassFactory(\"ConfigSettings\").instance._CONFIG_ENC = _CryptObject(_conf);\n if (Object.hasOwnProperty.call(ClassFactory(\"ConfigSettings\").instance, \"_CONFIG\") && Object.hasOwnProperty.call(ClassFactory(\"ConfigSettings\").instance._CONFIG, name)) {\n ClassFactory(\"ConfigSettings\").instance._CONFIG[name] = value;\n }\n },\n get(name, _default) {\n var _value;\n try {\n var _conf = (\n function (config) {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = ClassFactory(\"_Crypt\").encrypt(_DataStringify({}), _secretKey);\n }\n var _protectedEnc = config._CONFIG_ENC.valueOf();\n var _protectedConf = config._CONFIG.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n }\n )(ClassFactory(\"ConfigSettings\").instance);\n if (typeof _conf[name] !== \"undefined\") {\n _value = _conf[name];\n } else if (typeof _default !== \"undefined\") {\n _value = _default;\n }\n } catch (e) {\n console.error(e);\n logger.debug(\"Something wrong when trying to get CONFIG values\");\n logger.debug(\"No config value for: \" + name);\n _value = _default;\n }\n return Processor.processObject.call(Processor, _value);\n }\n });\n \n Export(waitUntil);\n Export(_super_);\n Export(ComplexStorageCache);\n Export(ClassFactory);\n Export(_DOMCreateElement);\n Export(shortCode);\n Export(__getType__);\n Export(is_a);\n \n var isQCObjects_Object = function (_) {\n return (typeof _ === \"object\" &&\n Object.hasOwnProperty.call(_, \"__classType\") &&\n (!!_.__instanceID) &&\n Object.hasOwnProperty.call(_, \"__definition\") &&\n typeof _.__definition !== \"undefined\"\n ) ? (true) : (false);\n };\n \n var isQCObjects_Class = function (_) {\n return (typeof _ === \"function\" &&\n (!_.__instanceID) &&\n (!!_.__definition) &&\n typeof _.__definition !== \"undefined\" &&\n !!_.__definition.__classType\n ) ? (true) : (false);\n };\n \n /**\n * Defines a package for Class classification\n *\n * @param {Object} namespace\n * @param {Object} classes\n */\n var Package = function (namespace, classes) {\n if (_QC_PACKAGES.hasOwnProperty.call(_QC_PACKAGES, namespace) &&\n typeof _QC_PACKAGES[namespace] !== \"undefined\" &&\n _QC_PACKAGES[namespace].hasOwnProperty.call(_QC_PACKAGES[namespace], \"length\") &&\n _QC_PACKAGES[namespace].length > 0 &&\n typeof classes !== \"undefined\" &&\n classes.hasOwnProperty.call(classes, \"length\") &&\n classes.length > 0\n ) {\n classes.filter(\n function (_c1) {\n return isQCObjects_Class(_c1);\n }\n ).map(function (_class_) {\n _class_.__definition.__namespace = namespace;\n _class_.__namespace = namespace;\n });\n _QC_PACKAGES[namespace] = _QC_PACKAGES[namespace].concat(classes);\n } else if (typeof classes !== \"undefined\") {\n if (typeof classes === \"object\" && classes.hasOwnProperty.call(classes, \"length\")) {\n classes.filter(\n function (_c1) {\n return isQCObjects_Class(_c1);\n }\n ).map(function (_class_) {\n _class_.__definition.__namespace = namespace;\n _class_.__namespace = namespace;\n });\n } else if (isQCObjects_Class(classes)) {\n classes.__definition.__namespace = namespace;\n classes.__namespace = namespace;\n }\n _QC_PACKAGES[namespace] = classes;\n }\n if (Object.hasOwnProperty.call(_QC_PACKAGES, namespace)) {\n _QC_PACKAGES[namespace].map(function (_class_) {\n __register_class__(_class_, namespace);\n });\n }\n return (Object.hasOwnProperty.call(_QC_PACKAGES, namespace)) ? (_QC_PACKAGES[namespace]) : (undefined);\n };\n Package.prototype.toString = function () {\n return \"Package(namespace, classes) { [QCObjects native code] }\";\n };\n \n Package(\"com.qcobjects\",[Processor]);\n \n /**\n * Declare Namespace\n *\n * @param {String} packageName\n * @param {Object} package\n */\n var NamespaceRef = function (namespace) {\n let packageInstance = Package(namespace);\n let classes = packageInstance.filter(c => isQCObjects_Class(c)).map(c => {\n return {\n [c.__definition.__classType]: c\n };\n }).reduce((a, b) => Object.assign(a, b));\n return namespace.split(\".\").map(c => {\n return {\n [c]: classes\n };\n }).reverse().reduce((a, b) => {\n b[Object.keys(b)] = a;\n return b;\n });\n };\n \n \n /**\n * Imports a script with the package nomenclature\n *\n * @param {Object} packagename\n * @param {Object} ready\n * @param {Boolean} external\n */\n var Import = function () {\n var packagename;\n var ready = function () {};\n var external = false;\n if (arguments.length < 1) {\n return;\n } else if (arguments.length === 1) {\n packagename = arguments[0];\n } else if (arguments.length === 2) {\n packagename = arguments[0];\n ready = arguments[1];\n } else if (arguments.length > 2) {\n packagename = arguments[0];\n ready = arguments[1];\n external = arguments[2];\n logger.debug(\"[Import] Setting external=\" + external.toString() + \" resource to import: \" + packagename);\n }\n if (external) {\n logger.debug(\"[Import] Registering external resource to import: \" + packagename);\n } else {\n logger.debug(\"[Import] Registering local resource to import: \" + packagename);\n }\n var _promise_import_;\n if (isBrowser) {\n _promise_import_ = new Promise(function (resolve, reject) {\n \n var allPackagesImported = function () {\n var ret = false;\n var cp = 0;\n for (var p in _QC_PACKAGES) {\n cp++;\n }\n if (cp < _QC_PACKAGES_IMPORTED.length) {\n ret = false;\n } else {\n ret = true;\n }\n return ret;\n };\n \n var readyImported = function (e) {\n _QC_PACKAGES_IMPORTED.push(ready);\n if (allPackagesImported()) {\n _QC_PACKAGES_IMPORTED.map(function (_imported_) {\n _QC_READY_LISTENERS.push(_imported_);\n });\n }\n if (isBrowser && _top.CONFIG.get(\"removePackageScriptAfterLoading\")) {\n e.target.remove();\n }\n resolve.call(_promise_import_, {\n \"_imported_\": e.target,\n \"_package_name_\": packagename\n });\n };\n \n if (!_QC_PACKAGES.hasOwnProperty.call(_QC_PACKAGES, packagename)) {\n var s1 = _DOMCreateElement(\"script\");\n s1.type = _top.CONFIG.get(\"sourceType\", \"text/javascript\");\n s1.async = (_top.CONFIG.get(\"asynchronousImportsLoad\")) ? (true) : (false);\n s1.onreadystatechange = function () {\n if (s1.readyState === \"complete\") {\n readyImported.call();\n }\n };\n s1.onload = readyImported;\n s1.onerror = function (e) {\n reject.call(_promise_import_, {\n \"_imported_\": s1,\n \"_package_name_\": packagename\n });\n };\n s1.src = (external) ? (_top.CONFIG.get(\"remoteImportsPath\") + packagename + \".js\") : (_basePath_ + _top.CONFIG.get(\"relativeImportPath\") + packagename + \".js\");\n document.getElementsByTagName(\"head\")[0].appendChild(s1);\n }\n });\n _promise_import_.catch(function () {\n logger.debug(\"Import: Error loading a package \");\n });\n \n } else {\n // support to be used in a nodejs environment\n _promise_import_ = new Promise(function (resolve, reject) {\n try {\n var standardNodePath = findPackageNodePath(packagename);\n var packageAbsoluteName = \"\";\n if (standardNodePath !== null) {\n packageAbsoluteName = standardNodePath + \"/\" + packagename;\n } else {\n var jsNodePath = findPackageNodePath(packagename + \".js\");\n if (jsNodePath !== null) {\n packageAbsoluteName = jsNodePath + \"/\" + packagename + \".js\";\n } else {\n packageAbsoluteName = _basePath_ + _top.CONFIG.get(\"relativeImportPath\") + packagename;\n }\n }\n try {\n resolve.call(_promise_import_, {\n \"_imported_\": _require_(`${packageAbsoluteName}`),\n \"_package_name_\": packagename\n });\n } catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n } catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n }).catch(function (e) {\n // something wrong importing a package\n logger.debug(\"Something happened when importing \" + packagename);\n console.warn(e);\n });\n }\n _promise_import_.catch(function (e) {\n logger.warn(_DataStringify(e));\n });\n return _promise_import_;\n };\n Import.prototype.toString = function () {\n return \"Import(packagename,ready,external) { [QCObjects native code] }\";\n };\n \n if (isBrowser) {\n /**\n * Adds a Cast functionality to every Element of DOM\n */\n Element.prototype.Cast = function QC_Object(_o) {\n _o.__definition.body = this;\n var _o = New(_o);\n return _o;\n };\n }\n \n Class(\"TagElements\", Array, {\n show() {\n this.map(function (element) {\n return element.style.opacity = 1;\n });\n },\n hide() {\n this.map(function (element) {\n return element.style.opacity = 0;\n });\n },\n effect() {\n var effectArguments = [...arguments].slice(1);\n var effectClass = arguments[0];\n if ((typeof effectClass).toLowerCase() === \"string\") {\n effectClass = ClassFactory(effectClass);\n }\n this.map(function (element) {\n return effectClass.apply.apply(effectClass, [element].concat(effectArguments));\n });\n },\n findElements(elementName) {\n var _o = New(ClassFactory(\"TagElements\"));\n if (isBrowser) {\n for (var _k in this) {\n if (typeof _k === \"number\" && typeof this[_k] !== \"function\" && this[_k].hasOwnProperty.call(this[_k], \"subelements\")) {\n _o.push(this[_k].subelements(elementName));\n }\n }\n } else {\n // not yet implemented.\n }\n return _o;\n }\n });\n \n /**\n * Gets the element of DOM found by tag name\n *\n * @param {Object} tagname\n * @param {Object} innerHTML\n */\n var Tag = function (tagname, innerHTML) {\n var _o = New(ClassFactory(\"TagElements\"));\n if (isBrowser) {\n var o = document.subelements(tagname);\n var addedKeys = [];\n for (var _i = 0; _i < o.length; _i++) {\n if (typeof innerHTML !== \"undefined\" && o[_i].hasOwnProperty.call(o[_i], \"innerHTML\")) {\n o[_i].innerHTML = innerHTML;\n }\n if (addedKeys.indexOf(_i) < 0) {\n _o.push(o[_i]);\n addedKeys.push(_i);\n }\n }\n } else {\n // not yet implemented.\n }\n return _o;\n };\n \n /**\n * Defines a Custom Ready listener\n */\n function Ready(e) {\n if (isBrowser) {\n _QC_READY_LISTENERS.push(e.bind(window));\n } else if (typeof global !== \"undefined\") {\n _QC_READY_LISTENERS.push(e.bind(global));\n }\n }\n var ready = Ready; // case insensitive ready option\n \n /**\n * Default Ready event function for window. Executes all micro ready events of Import calls\n *\n * @param {Object} e\n */\n var _Ready = function (e) {\n var _execReady = function () {\n _QC_READY_LISTENERS.map(function (_ready_listener_, _r) {\n if (typeof _ready_listener_ === \"function\") {\n _ready_listener_.call();\n delete _QC_READY_LISTENERS[_r];\n }\n });\n };\n if (_top.CONFIG.get(\"delayForReady\") > 0) {\n if (isBrowser) {\n setTimeout(_execReady.bind(window), _top.CONFIG.get(\"delayForReady\"));\n } else if (typeof global !== \"undefined\") {\n setTimeout(_execReady.bind(global), _top.CONFIG.get(\"delayForReady\"));\n }\n } else {\n _execReady.call(_top);\n }\n };\n \n if (isBrowser) {\n window.onload = _Ready;\n if (is_phonegap) {\n document.addEventListener(\"deviceready\", _Ready, captureFalse);\n }\n } else {\n global.onload = _Ready;\n }\n \n /**\n * Dynamic Data Objects Class\n * Usage:\n * Class('TestDDO',{\n * data: {},\n * _new_ (){\n * this.ddo = New(DDO,{\n * instance:this,\n * name:'data',\n * value:{},\n * fget (value){\n * logger.debug('returned value '+ value );\n * }\n * })\n * }\n * });\n *\n */\n class DDO extends ClassFactory(\"InheritClass\") {\n constructor({\n instance,\n name,\n fget,\n fset,\n value\n }) {\n super({\n instance,\n name,\n fget,\n fset,\n value\n });\n this._new_({\n instance,\n name,\n fget,\n fset,\n value\n });\n \n }\n \n _new_({\n instance,\n name,\n fget,\n fset,\n value\n }) {\n var ddoInstance = this;\n var name = (typeof name === \"undefined\") ? (ObjectName(ddoInstance)) : (name);\n \n Object.defineProperty(instance, name, {\n set(val) {\n let _value = val;\n logger.debug(\"value changed \" + name);\n var ret;\n if (typeof fset !== \"undefined\" && typeof fset === \"function\") {\n ret = fset(_value);\n } else {\n ret = _value;\n }\n instance[\"_\" + name] = ret;\n return;\n },\n get() {\n let _value = instance[\"_\" + name];\n logger.debug(\"returning value \" + name);\n var is_ddo = function (v) {\n if (typeof v === \"object\" && Object.hasOwnProperty.call(v, \"value\")) {\n return v.value;\n }\n return v;\n };\n var ret;\n if (typeof fget !== \"undefined\" && typeof fget === \"function\") {\n ret = fget(is_ddo(_value));\n } else {\n ret = is_ddo(_value);\n }\n return ret;\n }\n });\n }\n \n }\n Export(DDO);\n \n class DefaultTemplateHandler {\n template= \"\";\n __definition = {};\n constructor ({component, template}){\n this.component = component;\n this.template = template;\n }\n assign(data) {\n var templateInstance = this;\n if (typeof templateInstance.component === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component is undefined\");\n }\n if (typeof templateInstance.component.processorHandler === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component.processorHandler is undefined\");\n }\n var processorHandler = templateInstance.component.processorHandler;\n processorHandler.component = templateInstance.component;\n var parsedAssignmentText = (typeof templateInstance.template !== \"undefined\") ? (templateInstance.template) : (\"\");\n if (typeof data === \"object\") {\n [...Object.keys(data)].map(function (k) {\n var _value = data[k];\n if (typeof _value === \"string\" || typeof _value === \"number\" || (!isNaN(_value))) {\n try {\n _value = Processor.processObject.bind(processorHandler).call(processorHandler, _value, templateInstance.component);\n parsedAssignmentText = parsedAssignmentText.replace((new RegExp(`{{${k}}}`, \"g\")), _value);\n } catch (e) {\n logger.warn(`${templateInstance.component.name} could not parse processors.`);\n throw Error (`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);\n }\n }\n });\n } else {\n logger.debug(`${templateInstance.component.name}.data is not an object`);\n }\n try {\n parsedAssignmentText = Processor.processObject.call(processorHandler, parsedAssignmentText, templateInstance.component);\n }catch (e){\n logger.warn(`${templateInstance.component.name} could not parse processors.`);\n throw Error (`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);\n }\n return parsedAssignmentText;\n }\n \n }\n DefaultTemplateHandler.__definition = {};\n RegisterClass(DefaultTemplateHandler,\"com.qcobjects\");\n \n var __routing_params__ = function (routing, routingPath) {\n let standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\"); //allowing {param}\n return {\n ...[...routingPath.matchAll((new RegExp(standardRoutingPath, \"g\")))][0][\"groups\"]\n };\n };\n \n var __valid_routings__ = function (routings, routingPath) {\n return routings.filter(function (routing) {\n var standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\");\n return (new RegExp(standardRoutingPath, \"g\")).test(routingPath);\n }).reverse();\n };\n var __valid_routing_way__ = function (validRoutingWays, routingWay) {\n return validRoutingWays.includes(routingWay);\n };\n \n var _buildComponentFromElement_ = function (element, __parent__){\n var __shadowed_not_set = (element.getAttribute(\"shadowed\") === null) ? (true) : (false);\n var __tplsource_attr_not_set = (element.getAttribute(\"template-source\") === null) ? (true) : (false);\n var shadowed = (element.getAttribute(\"shadowed\") === \"true\") ? (true) : (false);\n var __cached_not_set = (element.getAttribute(\"cached\") === null) ? (true) : (false);\n var cached = (element.getAttribute(\"cached\") === \"true\") ? (true) : (false);\n var tplextension = (typeof _top.CONFIG.get(\"tplextension\") !== \"undefined\") ? (_top.CONFIG.get(\"tplextension\")) : (\"html\");\n tplextension = (element.getAttribute(\"tplextension\") !== null) ? (element.getAttribute(\"tplextension\")) : (tplextension);\n var _componentName = element.getAttribute(\"name\");\n var _componentClassName = (element.getAttribute(\"componentClass\") !== null) ? (element.getAttribute(\"componentClass\")) : (\"Component\");\n let __componentClassName = (_top.CONFIG.get(\"preserveComponentBodyTag\")) ? (\n (_componentName !== null) ? (\"com.qcobjects.components.\" + _componentName + \".ComponentBody\") : (\"com.qcobjects.components.ComponentBody\")\n ) : (_componentClassName);\n _componentName = (_componentName !== null) ? (_componentName) : (\n (ClassFactory(__componentClassName) &&\n typeof ClassFactory(__componentClassName).name !== \"undefined\"\n ) ? (\n ClassFactory(__componentClassName).name\n ) : (\"\")\n );\n var __classDefinition = ClassFactory(__componentClassName);\n var __tplsource_prop_set = (__componentClassName !== \"Component\" && ((typeof __classDefinition !== \"undefined\" && typeof __classDefinition.tplsource === \"string\") && __classDefinition.tplsource !== \"\")) ? (true) : (false);\n var tplsource = (__tplsource_attr_not_set && __tplsource_prop_set) ? (__classDefinition.tplsource) : ((__tplsource_attr_not_set) ? (\"default\") : (element.getAttribute(\"template-source\")));\n logger.debug(`template source for ${_componentName} is ${tplsource} `);\n logger.debug(`type for ${_componentName} is ${__getType__(__classDefinition)} `);\n \n var componentURI;\n componentURI = ComponentURI({\n \"COMPONENTS_BASE_PATH\": _top.CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": _componentName,\n \"TPLEXTENSION\": tplextension,\n \"TPL_SOURCE\": tplsource\n });\n if (_top.CONFIG.get(\"preserveComponentBodyTag\")) {\n Package((_componentName !== \"\") ? (\"com.qcobjects.components.\" + _componentName + \"\") : (\"com.qcobjects.components\"), [\n Class(\"ComponentBody\", ClassFactory(\"Component\"), {\n name: _componentName,\n tplsource: tplsource,\n tplextension: tplextension,\n reload: true\n })\n ]);\n }\n \n var __create_component_instance_ = function () {\n var __shadowed = (__shadowed_not_set) ? ((__classDefinition && __classDefinition.shadowed) || ClassFactory(\"Component\").shadowed) : (shadowed);\n var __definition = {\n __parent__: __parent__,\n name: _componentName,\n cached: (__cached_not_set) ? (ClassFactory(\"Component\").cached) : (cached),\n shadowed: __shadowed,\n tplextension: tplextension,\n body: (_top.CONFIG.get(\"preserveComponentBodyTag\")) ? (_DOMCreateElement(\"componentBody\")) : (element),\n templateURI: componentURI,\n tplsource: tplsource\n };\n if (typeof _componentName === \"undefined\" || _componentName === \"\" || _componentName === null) {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete __definition.name;\n }\n if (componentURI === \"\") {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete __definition.templateURI;\n }\n var newComponent = New(__classDefinition, __definition);\n \n if (_top.CONFIG.get(\"preserveComponentBodyTag\")) {\n element.append(newComponent);\n }\n return newComponent;\n };\n var newComponent = __create_component_instance_.call(this);\n return newComponent;\n };\n \n var _buildComponentsFromElements_ = function (elements, __parent__) {\n var componentsBuiltWith = [];\n if (isBrowser){\n componentsBuiltWith = elements.map(\n function(element){\n return _buildComponentFromElement_(element, __parent__);\n }\n );\n } else {\n logger.debug(\"[_buildComponentsFromElements_] not implemented for Non-Browser environments\");\n }\n return componentsBuiltWith;\n };\n \n \n Package(\"com.qcobjects\", [\n class Component extends ClassFactory(\"InheritClass\") {\n validRoutingWays= [\"pathname\", \"hash\", \"search\"];\n basePath= _basePath_;\n domain= _domain_;\n templateHandler= \"DefaultTemplateHandler\";\n processorHandler= null;\n routingWay= null;\n routingNodes= [];\n routings= [];\n routingPath= \"\";\n routingPaths=[];\n _componentHelpers= [];\n subcomponents=[];\n splashScreenComponent=undefined;\n controller=undefined;\n view=undefined;\n effect=undefined;\n method = \"GET\";\n cached= true;\n __promise__ = null;\n __namespace = undefined;\n \n constructor ({\n templateURI= \"\",\n template,\n tplsource= \"default\",\n url= \"\",\n name= \"\",\n method= \"GET\",\n data= {},\n reload= false,\n shadowed= false,\n cached= true,\n _body=_DOMCreateElement(\"div\"),\n __promise__= null,\n __shadowRoot,\n body,\n shadowRoot,\n splashScreenComponent,\n controller,\n view\n }){\n super(...arguments);\n var self = this;\n \n if (typeof self.name === \"undefined\") {\n logger.warn(\"A name is not defined for \" + __getType__(self));\n }\n \n self.routingWay = _top.CONFIG.get(\"routingWay\");\n \n self.processorHandler = New(Processor, {\n component: self\n });\n \n /* assign body data attributes to data */\n self.data = (typeof self.data === \"undefined\" || self.data === null)?({}):(self.data);\n self.data = Object.assign(self.data, self.dataAttributes);\n \n self.createServiceInstance()\n .then(function (serviceResponse){\n if (typeof self.__new__ === \"function\") {\n self.__new__.call(self, self);\n }\n \n self._generateRoutingPaths(self.body)\n .then(function (){\n self._reroute_()\n .then(function () {\n return self.rebuild()\n .then(function () {\n logger.info(`Component._new_ The component ${self.name} was built successfully!`);\n }).catch(function (standardResponse) {\n logger.warn(`Component._new_ Something went wrong building the component ${self.name}`);\n console.error(standardResponse);\n });\n });\n });\n \n });\n \n }\n \n set body(value) {\n var self = this;\n self._body = value;\n }\n \n get body() {\n var self= this;\n return self._body;\n }\n \n set cacheIndex(value) {\n // readonly\n logger.debug(\"[cacheIndex] This property is readonly\");\n }\n \n get cacheIndex() {\n var self= this;\n var __routing_path__ = _DataStringify(self.routingPath);\n return Base64.encode(self.name + __routing_path__);\n }\n \n set parsedAssignmentText(value) {\n // readonly\n logger.debug(\"[parsedAssignmentText] This property is readonly\");\n }\n \n get parsedAssignmentText() {\n var self= this;\n self._parsedAssignmentText = self.parseTemplate(self.template);\n if (typeof self._parsedAssignmentText === \"undefined\"){\n throw Error (`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);\n }\n return self._parsedAssignmentText;\n }\n \n \n set shadowRoot(value) {\n var self= this;\n if (typeof self.__shadowRoot == \"undefined\") {\n self.__shadowRoot = value;\n } else {\n logger.debug(\"[shadowRoot] This property can only be assigned once!\");\n }\n }\n \n get shadowRoot() {\n var self= this;\n return self.__shadowRoot;\n }\n \n \n set routingSelected(value){\n logger.debug(\"[routingSelected] This is a read-only property of the component\");\n }\n \n get routingSelected (){\n var self= this;\n return __valid_routings__(self.routings, self.routingPath);\n }\n \n set routingParams (value){\n logger.debug(\"[routingParams] This is a read-only property of the component\");\n }\n \n get routingParams (){\n var component = this;\n return [{}].concat(component.routingSelected.map(function (routing) {\n return __routing_params__(routing, component.routingPath);\n })).reduce(function (accumulator, colData, index) {\n return Object.assign(accumulator, colData);\n });\n }\n \n createServiceInstance (){\n var component = this;\n var body = component.body;\n var data = this.data;\n var __serviceClass;\n var __classDefinition = component.getClass().__definition;\n var _serviceClassName = (isBrowser && body.getAttribute(\"serviceClass\") !== null) ? (body.getAttribute(\"serviceClass\")) : (null);\n \n return new Promise (function (resolve, reject){\n /* __enable_service_class__ = true by default */\n var __enable_service_class__ = (\n (Object.hasOwnProperty.call(body, \"enableServiceClass\") && body.enableServiceClass) ||\n (!Object.hasOwnProperty.call(body, \"enableServiceClass\"))\n ) ? (true) : (false);\n var _response_to_data_ = (isBrowser && body.getAttribute(\"response-to\") !== null && body.getAttribute(\"response-to\") === \"data\") ? (true) : (false);\n var _response_to_template_ = (isBrowser && body.getAttribute(\"response-to\") !== null && body.getAttribute(\"response-to\") === \"template\") ? (true) : (false);\n \n if (__enable_service_class__ && _serviceClassName !== null) {\n __serviceClass = ClassFactory(_serviceClassName);\n }\n if (!_response_to_data_ && __classDefinition && Object.hasOwnProperty.call(__classDefinition, \"responseTo\")) {\n _response_to_data_ = (__classDefinition.responseTo === \"data\") ? (true) : (false);\n } else if (!_response_to_data_ && Object.hasOwnProperty.call(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_data_ = (ClassFactory(\"Component\").responseTo === \"data\") ? (true) : (false);\n }\n if (!_response_to_template_ && __classDefinition && Object.hasOwnProperty.call(__classDefinition, \"responseTo\")) {\n _response_to_template_ = (__classDefinition.responseTo === \"template\") ? (true) : (false);\n } else if (!_response_to_template_ && Object.hasOwnProperty.call(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_template_ = (ClassFactory(\"Component\").responseTo === \"template\") ? (true) : (false);\n }\n \n if (typeof __serviceClass !== \"undefined\" &&\n (typeof __enable_service_class__ !== \"undefined\" &&\n __enable_service_class__ === true) &&\n (_response_to_data_ || _response_to_template_)\n ) {\n logger.info(\"Loading service \" + _serviceClassName);\n var serviceInstance = New(__serviceClass, {\n data: data\n });\n serviceLoader(serviceInstance).then(function ({\n request,\n service\n }) {\n var serviceResponse;\n if (typeof service.JSONresponse !== \"undefined\" && service.JSONresponse !== null){\n serviceResponse = service.JSONresponse;\n } else {\n serviceResponse = service.template;\n }\n if (_response_to_data_) {\n if (typeof data === \"object\" && typeof serviceResponse === \"object\") {\n data = Object.assign(data, serviceResponse);\n } else {\n data = serviceResponse;\n }\n component.data = data;\n }\n component.serviceInstance = serviceInstance;\n component.serviceData = data;\n \n if (_response_to_template_) {\n component.template = serviceResponse;\n }\n resolve (serviceResponse);\n }, function (rejectedResponse){\n logger.debug(`Service loading rejected for ${_serviceClassName} in ${component.name}`);\n reject (rejectedResponse);\n } ).catch(function (e) {\n logger.debug(\"Something went wroing while trying to load the service \" + _serviceClassName);\n throw Error (`Error loading ${_serviceClassName} for ${component.name}. Detail: ${e}`);\n });\n } else {\n resolve(null);\n }\n });\n }\n \n _bindroute_ () {\n var _component_ = this;\n if (!_component_._bindroute_.loaded){\n if (isBrowser) {\n \n _component_.hostElements(\"a\").map(function (a) {\n a.oldclick = a.onclick;\n a.onclick = function (e) {\n var _ret_ = true;\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n var routingWay = _top.CONFIG.get(\"routingWay\");\n var routingPath = e.target[routingWay];\n if (_top.global.get(\"routingPaths\").includes(routingPath) &&\n e.target[routingWay] !== document.location[routingWay] &&\n e.target.href !== document.location.href\n ) {\n logger.debug(\"A ROUTING WAS FOUND: \" + routingPath);\n window.history.pushState({\n href: e.target.href\n }, e.target.href, e.target.href);\n ClassFactory(\"Component\").route();\n _ret_ = false;\n } else {\n logger.debug(\"NO ROUTING FOUND FOR: \" + routingPath);\n }\n if (typeof e.target.oldclick !== \"undefined\" && typeof e.target.oldclick === \"function\") {\n e.target.oldclick.call(e.target, e);\n }\n return _ret_;\n };\n return null;\n });\n \n } else {\n // not yet implemented.\n }\n this._bindroute_.loaded = true;\n } else {\n logger.debug(`Routes already bound to popstate events for ${_component_.name}`);\n }\n \n }\n \n done(standardResponse) {\n var _ret_;\n if (typeof standardResponse !== \"undefined\"){\n var {request, component} = standardResponse;\n _ret_ = Promise.resolve({request, component});\n }\n return _ret_;\n }\n \n createControllerInstance (){\n var _Controller;\n if (isBrowser){\n if (typeof this.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n var controllerName = this.body.getAttribute(\"controllerClass\");\n if (!controllerName) {\n controllerName = \"Controller\";\n }\n _Controller = ClassFactory(controllerName);\n if (typeof _Controller !== \"undefined\"){\n this.controller = New(_Controller, {\n component: this\n });\n }\n \n }\n \n return new Promise ( (resolve, reject) => {\n if (isBrowser){\n if (typeof _Controller !== \"undefined\" && typeof this.controller !== \"undefined\") {\n if (typeof this.controller.done === \"function\") {\n try {\n this.controller.done.call(this.controller);\n } catch (e){\n throw Error (e);\n }\n } else {\n logger.debug(`${controllerName} does not have a done() method.`);\n reject(`${controllerName} does not have a done() method.`);\n }\n if (typeof this.controller.createRoutingController === \"function\") {\n this.controller.createRoutingController.call(this.controller);\n } else {\n logger.debug(`${controllerName} does not have a createRoutingController() method.`);\n }\n }\n }\n resolve ({component:this,controller:this.controller});\n });\n }\n \n createEffectInstance (){\n var _component_ = this;\n return new Promise (function (resolve, reject){\n if (isBrowser){\n var effectClassName = _component_.body.getAttribute(\"effectClass\");\n var applyEffectTo = _component_.body.getAttribute(\"apply-effect-to\");\n applyEffectTo = (applyEffectTo !== null) ? (applyEffectTo) : (\"load\");\n if (effectClassName !== null && applyEffectTo === \"observe\") {\n _component_.applyObserveTransitionEffect(effectClassName);\n } else if (effectClassName !== null && applyEffectTo === \"load\") {\n _component_.applyTransitionEffect(effectClassName);\n }\n }\n resolve({component:_component_, effect:_component_.effect});\n });\n }\n \n createViewInstance(){\n var _component_ = this;\n return new Promise (function (resolve, reject){\n var viewName = (isBrowser)?(_component_.body.getAttribute(\"viewClass\")):(null);\n if (viewName !== null){\n var _View = ClassFactory(viewName);\n if (typeof _View !== \"undefined\") {\n _component_.view = New(_View, {\n component: _component_\n }); // Initializes the main view for the component\n if (Object.hasOwnProperty.call(_component_.view, \"done\") && typeof _component_.view.done === \"function\") {\n _component_.view.done.call(_component_.view);\n }\n }\n \n }\n resolve({component:_component_, view:_component_.view});\n \n });\n }\n \n __done__ () {\n var _component_ = this;\n var componentDone = function () {\n if (typeof _component_ === \"undefined\") {\n throw new Error(\"componentDone() has lost its context\");\n }\n if (typeof _component_.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n _component_.createViewInstance();\n _component_.createControllerInstance();\n _component_.createEffectInstance();\n \n logger.debug(`Trying to run component helpers for ${_component_.name}...`);\n try {\n _component_.runComponentHelpers();\n logger.debug(`Component helpers for ${_component_.name} executed.`);\n } catch (e){\n logger.debug(`Component helpers for ${_component_.name} could not be executed.`);\n throw Error(e);\n }\n \n _component_.subcomponents = _component_.__buildSubComponents__();\n \n _component_._bindroute_();\n _component_.body.setAttribute(\"loaded\", true);\n };\n \n return new Promise (function (resolve, reject){\n try {\n Promise.resolve(componentDone.call(_component_));\n } catch (e){\n reject(e);\n }\n });\n \n }\n \n hostElements(tagFilter){\n var _component_ = this;\n var elementList = (_component_.shadowed && (typeof _component_.shadowRoot !== \"undefined\"))?(\n _component_.shadowRoot.subelements(tagFilter)\n ):(\n _component_.body.subelements(tagFilter)\n );\n return elementList;\n }\n \n get subtags(){\n var _component_ = this;\n var tagFilter = _tag_filter_;\n return _component_.hostElements(tagFilter);\n }\n \n get bodyAttributes() {\n var _component_ = this;\n var c = _component_.body;\n return (isBrowser)?([...c.getAttributeNames()].map (a => {return {[a]:c.getAttribute(a)};}).reduce ((accumulator,colData, index) => {return Object.assign(accumulator, colData);} )):({});\n }\n \n get dataAttributes(){\n var _component_ = this;\n var c = _component_.body;\n return (isBrowser)?([{}].concat([...c.getAttributeNames()].filter(n=>n.startsWith(\"data-\")).map (a => {return {[a.split(\"-\")[1]]:c.getAttribute(a)};})).reduce ((accumulator,colData, index) => {return Object.assign(accumulator, colData);} )):({});\n }\n \n __buildSubComponents__ (rebuildObjects = false) {\n var _component_ = this;\n var elementList = _component_.subtags;\n if (!rebuildObjects){\n elementList = elementList.filter(t=>t.getAttribute(\"loaded\") !== \"true\");\n }\n if ((typeof _component_ !== \"undefined\") || _component_.subcomponents.length<1){\n _component_.subcomponents = _buildComponentsFromElements_(elementList, _component_);\n }\n return _component_.subcomponents;\n }\n \n fail(standardResponse) {\n var _ret_;\n if (typeof standardResponse !== \"undefined\"){\n var {error, component} = standardResponse;\n _ret_ = Promise.resolve({error, component});\n }\n return _ret_;\n }\n \n set(name, value) {\n this[name] = value;\n }\n \n get(name) {\n return this[name];\n }\n \n feedComponent() {\n var _component_ = this;\n logger.debug(`[Component][${this.name}][feedComponent] start feeding component...`);\n var _feedComponent_InBrowser = function (_component_) {\n if (typeof _component_.container === \"undefined\" && typeof _component_.body === \"undefined\") {\n logger.warn(\"COMPONENT {{NAME}} has an undefined container and body\".replace(\"{{NAME}}\", _component_.name));\n return;\n }\n var container = (typeof _component_.container === \"undefined\" || _component_.container === null) ? (_component_.body) : (_component_.container);\n var parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n if (_component_.shadowed) {\n logger.debug(\"COMPONENT {{NAME}} is shadowed\".replace(\"{{NAME}}\", _component_.name));\n logger.debug(\"Preparing slots for Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n var tmp_shadowContainer = _DOMCreateElement(\"div\");\n container.subelements(\"[slot]\").map(\n function (c) {\n if (c.parentElement === container) {\n tmp_shadowContainer.appendChild(c);\n }\n });\n logger.debug(\"Creating shadowedContainer for COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n var shadowContainer = _DOMCreateElement(\"div\");\n shadowContainer.classList.add(\"shadowHost\");\n try {\n _component_.shadowRoot = shadowContainer.attachShadow({\n mode: \"open\"\n });\n } catch (e) {\n try {\n logger.debug(\"Shadowed COMPONENT {{NAME}} is repeated\".replace(\"{{NAME}}\", _component_.name));\n _component_.shadowRoot = shadowContainer.shadowRoot;\n } catch (e) {\n logger.warn(\"Shadowed COMPONENT {{NAME}} is not allowed on this browser\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n if (typeof _component_.shadowRoot !== \"undefined\" && _component_.shadowRoot !== null) {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n shadowContainer.shadowRoot.innerHTML = _component_.innerHTML;\n } else {\n tmp_shadowContainer.innerHTML = _component_.parseTemplate(tmp_shadowContainer.innerHTML);\n logger.debug(\"ADDING Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n shadowContainer.shadowRoot.innerHTML += _component_.innerHTML;\n }\n logger.debug(\"ADDING Slots to Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n shadowContainer.innerHTML += tmp_shadowContainer.innerHTML;\n logger.debug(\"APPENDING Shadowed COMPONENT {{NAME}} to Container \".replace(\"{{NAME}}\", _component_.name));\n var qs = container.querySelector(\".shadowHost\");\n if (!(typeof qs !== \"undefined\" && qs !== null)) {\n container.appendChild(shadowContainer);\n } else {\n logger.debug(\"Shadowed Container for COMPONENT {{NAME}} is already present in the tree \".replace(\"{{NAME}}\", _component_.name));\n _component_.shadowRoot.innerHTML = shadowContainer.shadowRoot.innerHTML;\n }\n } else {\n logger.warn(\"Shadowed COMPONENT {{NAME}} is bad configured\".replace(\"{{NAME}}\", _component_.name));\n }\n } else {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML = _component_.innerHTML;\n } else if (container && _component_) {\n logger.debug(\"ADDING COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML += _component_.innerHTML;\n } else {\n logger.warn(\"COMPONENT {{NAME}} is not added to the DOM\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n \n };\n \n var _feedComponent_InNode = function (_component_) {\n var parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n };\n \n var _ret_;\n if (!is_a(_component_, \"Component\")) {\n logger.warn(\"Trying to feed a non component object\");\n return;\n }\n if (isBrowser) {\n _ret_ = _feedComponent_InBrowser(_component_);\n } else {\n _ret_ = _feedComponent_InNode(_component_);\n }\n return _ret_;\n }\n \n rebuild() {\n var _component = this;\n var _promise = new Promise(function (resolve, reject) {\n if (typeof _component === \"undefined\" || _component === null) {\n reject(\"Component is undefined\");\n }\n if (isQCObjects_Object(_component) && is_a(_component, \"Component\")) {\n switch (true) {\n case (_component.get(\"tplsource\") === \"none\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=none, so no template load was done\");\n var standardResponse = {\n request: null,\n component: _component\n };\n _component.__done__().then(function (){\n if (typeof _component.done === \"function\") {\n _component.done.call(_component, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n }, function (){\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"inline\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=inline, so it is assumed that template is already declared\");\n (async function (_component){\n _component.feedComponent.bind(_component)();\n })(_component);\n var standardResponse = {\n request: null,\n component: _component\n };\n _component.__done__().then(function (){\n if (typeof _component.done === \"function\") {\n _component.done.call(_component, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n }, function (){\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"default\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"basePath\") + _component.get(\"templateURI\"));\n componentLoader(_component, false).then(\n function (standardResponse) {\n resolve.call(_promise, standardResponse);\n },\n function (standardResponse) {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"external\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"templateURI\"));\n componentLoader(_component, false).then(\n function (standardResponse) {\n resolve.call(_promise, standardResponse);\n },\n function (standardResponse) {\n reject.call(_promise, standardResponse);\n });\n break;\n case _component.get(\"tplsource\") === \"default\" && _component.get(\"templateURI\", \"\") === \"\":\n logger.debug(`Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n reject.call(_promise, `Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n break;\n default:\n logger.debug(\"Component \" + _component.name + \" will not be rebuilt because no templateURI is present\");\n reject.call(_promise, {\n request: null,\n component: _component\n });\n break;\n }\n \n }\n });\n return _promise;\n }\n \n Cast(oClass) {\n /* Cast method for components has been deprecated. Don't use this method, it is available only for compatibility purposes */\n let o = _methods_(oClass).map(m => m.name.replace(/bound /g, \"\")).map(m => {\n return {\n [m]: oClass[m].bind(this)\n };\n }).reduce((c, p) => Object.assign(c, p), {});\n return _Cast(this, o);\n }\n \n static route() {\n var componentClass = this; /* is can be class or object*/\n var _route_promise_;\n var isValidInstance = ( isQCObjects_Object(componentClass) && is_a(componentClass,\"Component\") ) ? (true) : (false);\n var __route__ = function (componentList) {\n var _componentNames_ = [];\n var _promises_ = componentList.filter(function (rc) {\n return typeof rc !== \"undefined\";\n }).map(function (rc) {\n if (typeof rc.name !== \"undefined\") {\n _componentNames_.push(rc.name);\n } else {\n throw new Error(__getType__(rc) + \" does not have a name\");\n }\n return new Promise(function (resolve, reject) {\n var _promise_;\n if (typeof rc !== \"undefined\" && !!rc._reroute_) {\n _promise_ = rc._reroute_()\n .then(function () {\n rc.reload = true;\n return rc.rebuild();\n })\n .then(function (_rc_) {\n if (Object.hasOwnProperty.call(rc, \"subcomponents\") &&\n typeof rc.subcomponents !== \"undefined\" &&\n rc.subcomponents.length > 0\n ) {\n logger.debug(\"LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: \" + rc.name);\n return __route__.call(rc, rc.subcomponents);\n } else {\n logger.debug(\"No subcomponents to look for routings in: \" + rc.name);\n if (rc.subtags.length>0){\n rc.subcomponents = rc.__buildSubComponents__(true);\n }\n resolve(rc);\n }\n });\n } else if (typeof rc !== \"undefined\") {\n reject(\"Component \" + rc.name + \" is not an instance of Component\");\n }\n return _promise_;\n });\n });\n return Promise.all(_promises_)\n .then(function () {\n logger.debug(\"ROUTING COMPLETED FOR \" + _componentNames_.join(\", \"));\n }).catch(function (err) {\n logger.warn(\"ROUTING FAILED FOR \" + _componentNames_.join(\", \") + \": \" + err);\n });\n };\n if (isValidInstance || !!_top.componentsStack) {\n if (isValidInstance) {\n logger.debug(\"loading routings for instance \" + componentClass.name);\n }\n _route_promise_ = __route__.call(componentClass, (isValidInstance) ? (componentClass.subcomponents) : (_top.componentsStack));\n } else {\n logger.debug(\"An undetermined result expected if load routings. So will not be loaded this time.\");\n throw Error (`There is no valid instance and no components stack available to apply rountings`);\n }\n return _route_promise_;\n }\n \n fullscreen() {\n if (isBrowser) {\n var elem = this.body;\n if (elem.requestFullscreen) {\n elem.requestFullscreen();\n } else if (elem.mozRequestFullScreen) {\n /* Firefox */\n elem.mozRequestFullScreen();\n } else if (elem.webkitRequestFullscreen) {\n /* Chrome, Safari & Opera */\n elem.webkitRequestFullscreen();\n } else if (elem.msRequestFullscreen) {\n /* IE/Edge */\n elem.msRequestFullscreen();\n }\n } else {\n // not yet implemented.\n }\n }\n \n closefullscreen() {\n if (isBrowser) {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n } else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n } else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n } else if (document.msExitFullscreen) {\n document.msExitFullscreen();\n }\n } else {\n // noy yet implemented.\n }\n }\n \n _generateRoutingPaths(componentBody) {\n var component = this;\n return new Promise(function (resolve, reject){\n if (isBrowser) {\n if (__valid_routing_way__(component.validRoutingWays, component.routingWay)) {\n if (typeof componentBody !== \"undefined\") {\n component.innerHTML = componentBody.innerHTML;\n component.routingNodes = componentBody.subelements(\"routing\");\n component.routings = [];\n component.routingNodes.map(function (routingNode, r) {\n var attributeNames = routingNode.getAttributeNames();\n var routing = {};\n attributeNames.map(function (attributeName, a) {\n routing[attributeNames[a]] = routingNode.getAttribute(attributeNames[a]);\n });\n component.routings.push(routing);\n if (!component.routingPaths) {\n component.routingPaths = [];\n }\n if (!component.routingPaths.includes(routing.path)) {\n component.routingPaths.push(routing.path);\n }\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n if (!_top.global.get(\"routingPaths\").includes(routing.path)) {\n _top.global.get(\"routingPaths\").push(routing.path);\n }\n });\n }\n }\n } else {\n // not yet implemented.\n }\n resolve();\n \n });\n }\n \n parseTemplate(template) {\n var _self = this;\n var _parsedAssignmentText;\n var value = template;\n if (Object.hasOwnProperty.call(_self, \"templateHandler\")) {\n var templateHandlerName = _self.templateHandler;\n logger.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${templateHandlerName} ...`);\n var templateHandlerClass = ClassFactory(templateHandlerName);\n var templateInstance = New(templateHandlerClass, {\n component: _self,\n template: value\n });\n templateInstance.component = _self;\n var selfData = _self.data;\n if (Object.hasOwnProperty.call(_self, \"assignRoutingParams\") && _self.assignRoutingParams) {\n try {\n selfData = Object.assign(selfData, _self.routingParams);\n } catch (e) {\n logger.debug(\"[parseTemplate] it was not possible to assign the routing params to the template\");\n }\n }\n _parsedAssignmentText = templateInstance.assign(selfData);\n } else {\n logger.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`);\n _parsedAssignmentText = value;\n }\n return _parsedAssignmentText;\n }\n \n _reroute_() {\n /* This method set the selected routing and makes the switch to the templateURI */\n var rc = this;\n return new Promise(function (resolve, reject) {\n if (isBrowser) {\n if (__valid_routing_way__(rc.validRoutingWays, rc.routingWay)) {\n rc.routingPath = document.location[rc.routingWay];\n rc.routingSelected.map(function (routing, r) {\n var componentURI = ComponentURI({\n \"COMPONENTS_BASE_PATH\": _top.CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": routing.name.toString(),\n \"TPLEXTENSION\": (Object.hasOwnProperty.call(routing, \"tplextension\")) ? (routing.tplextension) : (rc.tplextension),\n \"TPL_SOURCE\": \"default\" /* here is always default in order to get the right uri */\n });\n rc.templateURI = componentURI;\n });\n if (rc.routingSelected.length > 0) {\n rc.template = \"\";\n rc.body.innerHTML = \"\";\n }\n }\n }\n resolve(rc);\n \n });\n }\n \n lazyLoadImages() {\n if (isBrowser) {\n var component = this;\n var _componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n var _imgLazyLoaded = [..._componentRoot.subelements(\"img[lazy-src]\")];\n var _lazyLoadImages = function (image) {\n image.setAttribute(\"src\", image.getAttribute(\"lazy-src\"));\n image.onload = () => {\n image.removeAttribute(\"lazy-src\");\n };\n };\n if (\"IntersectionObserver\" in window) {\n var observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _lazyLoadImages(item.target);\n observer.unobserve(item.target);\n }\n });\n });\n _imgLazyLoaded.map(function (img) {\n return observer.observe(img);\n });\n } else {\n _imgLazyLoaded.map(_lazyLoadImages);\n }\n \n } else {\n // not yet implemented\n }\n return null;\n }\n \n applyTransitionEffect(effectClassName) {\n var _Effect = ClassFactory(effectClassName);\n if (typeof _Effect === \"undefined\" ){\n throw Error (`${effectClassName} not found.`);\n }\n if (typeof _Effect !== \"undefined\" && is_a(_Effect, \"TransitionEffect\")) {\n this.effect = New(_Effect, {\n component: this\n });\n this.effect.apply(this.effect.defaultParams);\n } else {\n logger.debug(`${effectClassName} is ${__getType__(_Effect)} but is not a TransitionEffect`);\n }\n }\n \n applyObserveTransitionEffect(effectClassName) {\n if (isBrowser) {\n var component = this;\n var _componentRoot = (component.shadowed) ? (component.shadowRoot.host) : (component.body);\n var _applyEffect_ = function (element) {\n component.applyTransitionEffect(effectClassName);\n };\n if (\"IntersectionObserver\" in window) {\n var observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _applyEffect_(item.target);\n observer.unobserve(item.target);\n }\n });\n });\n observer.observe(_componentRoot);\n } else {\n _applyEffect_(_componentRoot);\n }\n } else {\n // not yet implemented\n }\n return null;\n }\n \n scrollIntoHash() {\n if (isBrowser) {\n var component = this;\n if (document.location.hash !== \"\") {\n var _componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n _componentRoot.subelements(document.location.hash).map(\n function (element) {\n if (typeof element.scrollIntoView === \"function\") {\n element.scrollIntoView(\n _top.CONFIG.get(\"scrollIntoHash\", {\n behavior: \"auto\",\n block: \"top\",\n inline: \"top\"\n })\n );\n }\n }\n );\n }\n } else {\n // not yet implemented\n }\n }\n \n i18n_translate() {\n if (isBrowser) {\n if (_top.CONFIG.get(\"use_i18n\")) {\n var component = this;\n var _componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n var lang1 = _top.CONFIG.get(\"lang\", \"en\");\n var lang2 = navigator.language.slice(0, 2);\n var i18n = _top.global.get(\"i18n\");\n if ((lang1 !== lang2) && (typeof i18n === \"object\" && Object.hasOwnProperty.call(i18n, \"messages\"))) {\n var callback_i18n = function () {\n var component = this;\n return new Promise(function (resolve, reject) {\n var messages = i18n.messages.filter(function (message) {\n return Object.hasOwnProperty.call(message, lang1) && Object.hasOwnProperty.call(message, lang2);\n });\n _componentRoot.subelements(\"ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component\")\n .map(function (element) {\n messages.map(function (message) {\n var _innerHTML = element.innerHTML;\n _innerHTML = _innerHTML.replace(new RegExp(`${message[lang1]}`, \"g\"), message[lang2]);\n element.innerHTML = _innerHTML;\n return null;\n });\n return element;\n });\n resolve();\n });\n };\n callback_i18n.call(component).then(function () {\n logger.debug(\"i18n loaded for component: \" + component.name);\n });\n \n }\n }\n } else {\n // not yet implemented\n }\n }\n \n addComponentHelper(componentHelper) {\n var component = this;\n component._componentHelpers.push(componentHelper);\n }\n \n runComponentHelpers() {\n if (isBrowser) {\n var component = this;\n var __component_helpers__ = [];\n /*\n * BEGIN use i18n translation\n */\n __component_helpers__.push(component.i18n_translate.bind(component));\n /*\n * END use i18n translation\n */\n \n /*\n * BEGIN component scrollIntoHash\n */\n __component_helpers__.push(component.scrollIntoHash.bind(component));\n /*\n * END component scrollIntoHash\n */\n \n /*\n * BEGIN component images lazy-load\n */\n \n __component_helpers__.push(component.lazyLoadImages.bind(component));\n \n /*\n * END component images lazy-load\n */\n \n __component_helpers__ = __component_helpers__.concat(component._componentHelpers);\n \n __component_helpers__.map(\n function (_component_helper_) {\n logger.debug(`Executing ${_component_helper_.name} as component helper for ${component.name}...`);\n _component_helper_();\n }\n );\n \n } else {\n // not yet implemented\n }\n \n }\n \n }\n \n ]);\n \n (_methods_)(ClassFactory(\"Component\")).map(function (__c__) {\n (_protected_code_)(__c__);\n });\n \n if (isBrowser){\n window.addEventListener(\"popstate\",function (popStateEvent){\n popStateEvent.stopImmediatePropagation();\n popStateEvent.stopPropagation();\n ClassFactory(\"Component\").route();\n });\n }\n \n Package(\"com.qcobjects.controllers\", [\n class Controller extends ClassFactory(\"InheritClass\") {\n component = null;\n dependencies = [];\n constructor ({\n component,\n dependencies\n }){\n super ({component, dependencies});\n this.component = component;\n this.dependencies = dependencies;\n if (typeof this.component === \"undefined\" || this.component === \"null\"){\n throw Error (`${__getType__(this)} must be called with a component`);\n }\n }\n \n routingSelectedAttr(attrName) {\n return this.component.routingSelected.map(function (r) {\n return r[attrName];\n }).filter(function (v) {\n return v;\n }).pop();\n }\n \n isTouchable() {\n return (\"ontouchstart\" in window) ||\n (navigator.MaxTouchPoints > 0) ||\n (navigator.msMaxTouchPoints > 0);\n }\n \n onpress(subelementSelector, handler) {\n try {\n if (this.isTouchable()) {\n this.component.body.subelements(subelementSelector)[0].addEventListener(\"touchstart\", handler, {\n passive: true\n });\n } else {\n this.component.body.subelements(subelementSelector)[0].addEventListener(\"click\", handler, {\n passive: true\n });\n }\n } catch (e) {\n logger.debug(\"No button to assign press event\");\n }\n }\n \n createRoutingController() {\n var controller = this;\n var component = controller.component;\n var controllerName = controller.routingSelectedAttr(\"controllerclass\");\n if (typeof controllerName !== \"undefined\") {\n var _Controller = ClassFactory(controllerName);\n if (typeof _Controller !== \"undefined\") {\n component.routingController = New(_Controller, {\n component: component\n }); // Initializes the main controller for the component\n if (Object.hasOwnProperty.call(component.routingController, \"done\") && typeof component.routingController.done === \"function\") {\n component.routingController.done.call(component.routingController);\n }\n }\n }\n }\n \n done(){} \n }\n ]);\n \n Package(\"com.qcobjects.views\",[\n class View extends ClassFactory(\"InheritClass\") {\n constructor ({component = undefined, dependencies = []}){\n super(...arguments);\n if (typeof this.component === \"undefined\" || this.component === \"null\"){\n throw Error (`${__getType__(this)} must be called with a component`);\n }\n \n }\n }\n ]);\n \n Package(\"com.qcobjects.api\", [\n class Service extends ClassFactory(\"InheritClass\") {\n kind= \"rest\";\n /* it can be rest, mockup, local */\n domain= _domain_;\n basePath= _basePath_;\n url= \"\";\n method= \"GET\";\n data= {};\n reload= false;\n cached= false;\n \n constructor () {\n super(...arguments);\n }\n \n set(name, value) {\n this[name] = value;\n }\n \n get(name) {\n return this[name];\n }\n \n }\n \n ]);\n \n Package(\"com.qcobjects.api.services\", [\n class JSONService extends ClassFactory(\"Service\") {\n method= \"GET\";\n cached= false;\n headers= {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n JSONresponse= null;\n done(result) {\n logger.debug(\"***** RECEIVED RESPONSE:\");\n logger.debug(result.service.template);\n this.JSONresponse = JSON.parse(result.service.template);\n }\n \n constructor (){\n super(...arguments);\n }\n \n }\n ]);\n \n Package(\"com.qcobjects.api.config\", [\n class ConfigService extends ClassFactory(\"JSONService\"){\n method= \"GET\";\n cached= false;\n configFileName= \"config.json\";\n headers= {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n JSONresponse= null;\n done(result) {\n logger.debug(\"***** CONFIG LOADED:\");\n logger.debug(result.service.template);\n this.JSONresponse = JSON.parse(result.service.template);\n if (Object.hasOwnProperty.call(this.JSONresponse, \"__encoded__\")) {\n this.JSONresponse = JSON.parse(ClassFactory(\"_Crypt\").decrypt(this.JSONresponse.__encoded__, _secretKey));\n }\n for (var k in this.JSONresponse) {\n _top.CONFIG.set(k, this.JSONresponse[k]);\n }\n this.configLoaded.call(this);\n }\n fail(result) {\n this.configLoaded.call(this);\n }\n \n constructor (){\n super(...arguments);\n this.set(\"url\", this.get(\"basePath\") + this.get(\"configFileName\"));\n }\n }\n ]);\n \n Package(\"com.qcobjects.valueObjects\", [\n class VO extends ClassFactory(\"InheritClass\") {\n constructor (){\n super(...arguments);\n }\n }\n ]);\n \n /**\n * Returns a standarized uri for a component\n * @example\n * templateURI = ComponentURI({'COMPONENTS_BASE_PATH':'','COMPONENT_NAME':'','TPLEXTENSION':'','TPL_SOURCE':''})\n * @author: Jean Machuca \n * @param params an object with the params to build the uri path\n */\n var ComponentURI = function (params) {\n var templateURI = \"\";\n if (params[\"TPL_SOURCE\"] === \"default\") {\n templateURI = \"{{COMPONENTS_BASE_PATH}}{{COMPONENT_NAME}}.{{TPLEXTENSION}}\";\n for (var k in params) {\n var param = params[k];\n templateURI = templateURI.replace(\"{{\" + k + \"}}\", params[k]);\n }\n }\n return templateURI;\n };\n \n /**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param component a Component object\n */\n var componentLoader = function (component, _async) {\n var __promise__;\n var _componentLoaderInBrowser = function (component, _async) {\n __promise__ = new Promise(function (resolve, reject) {\n var _promise = component.__promise__;\n var container = (Object.hasOwnProperty.call(component, \"container\") && typeof component.container !== \"undefined\" && component.container !== null) ? (component.container) : (component.body);\n if (container !== null) {\n var _feedComponent_ = function (component) {\n component.feedComponent();\n var standardResponse = {\n \"request\": xhr,\n \"component\": component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n \n var _componentLoaded = function () {\n var successStatus = (is_file) ? (0) : (200);\n if (xhr.status === successStatus) {\n var response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_.call(this, component);\n } else {\n var standardResponse = {\n \"request\": xhr,\n \"component\": component\n };\n reject.call(_promise, standardResponse);\n \n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_.call(this, component);\n } else {\n var is_file = (component.url.startsWith(\"file:\")) ? (true) : (false);\n var xhr = new XMLHttpRequest();\n if (!is_file) {\n try {\n logger.debug(\"Calling the url of component in async mode.\");\n xhr.open(component.method, component.url, true);\n } catch (e) {\n logger.debug(\"Last try has failed... The component cannot be loaded.\");\n }\n } else {\n if (\"fetch\" in _top) {\n logger.debug(\"I can use fetch...\");\n logger.debug(\"It is a file to be loaded, so I will try to use fetch\");\n var _p = fetch(component.url).then(response => {\n logger.debug(\"I got a response from fetch, so I'll feed the component\");\n response.text().then(text => {\n component.template = text;\n _feedComponent_.call(this, component);\n });\n });\n }\n }\n if (!is_phonegap && !is_file) {\n xhr.setRequestHeader(\"Content-Type\", \"text/html\");\n }\n if (!is_file) {\n xhr.onload = _componentLoaded;\n }\n var _directLoad = function (is_file) {\n is_file = (typeof is_file === \"undefined\" || !is_file) ? (false) : (true);\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n if (is_file) {\n if (!(\"fetch\" in _top)) {\n logger.debug(\"I have to try to load the file using xhr... \");\n xhr.send(null);\n if (xhr.status === XMLHttpRequest.DONE) {\n _componentLoaded.call(this);\n }\n }\n } else {\n logger.debug(\"Trying to send the data to the component... \");\n xhr.send(_DataStringify(component.data));\n }\n };\n \n if (component.cached && (!is_file)) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load(cacheController) {\n _directLoad.call(this, is_file);\n },\n alternate(cacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n } else {\n _directLoad.call(this, is_file);\n }\n return;\n }\n });\n global.lastCache = cache;\n } else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad.call(this, is_file);\n }\n \n }\n } else {\n logger.debug(\"CONTAINER DOESNT EXIST\");\n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then (function (){\n var _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n var _ret_;\n if (typeof component.fail === \"function\") {\n _ret_ = component.fail.call(component, standardResponse);\n }\n return Promise.reject(_ret_);\n }).catch(function (e) {\n logger.debug(\"Something wrong loading the component\");\n });\n return __promise__;\n };\n var _componentLoaderInNode = function (component, _async) {\n __promise__ = new Promise(function (resolve, reject) {\n var _promise = __promise__;\n var _feedComponent_ = function (component) {\n component.feedComponent();\n var standardResponse = {\n \"request\": null,\n \"component\": component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n \n var _componentLoaded = function (err, responseText) {\n if (!err) {\n var response = responseText.toString();\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_.call(this, component);\n } else {\n var standardResponse = {\n \"request\": null,\n \"component\": component\n };\n reject.call(_promise, standardResponse);\n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_.call(this, component);\n } else {\n logger.debug(\"Loading the component as a local file in server...\");\n var _directLoad = function (is_file) {\n const fs = _require_(\"fs\");\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n fs.readFile(component.url, _componentLoaded);\n };\n \n if (component.cached) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load(cacheController) {\n _directLoad.call(this);\n },\n alternate(cacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n } else {\n _directLoad.call(this);\n }\n return;\n }\n });\n global.lastCache = cache;\n } else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad.call(this);\n }\n \n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then (function (){\n var _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n var _ret_;\n if (typeof component.fail === \"function\") {\n _ret_ = component.fail.call(component, standardResponse);\n }\n return Promise.reject(_ret_);\n }).catch(function (e) {\n logger.debug(\"Something wrong loading the component\");\n });\n return __promise__;\n };\n \n var _ret_;\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_componentLoaderInBrowser, arguments);\n } else {\n _ret_ = _componentLoaderInBrowser(component, _async);\n }\n } else {\n _ret_ = _componentLoaderInNode(component, _async);\n }\n return _ret_;\n };\n \n /**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param service a Service object\n */\n var serviceLoader = function (service, _async) {\n var _serviceLoaderInBrowser = function (service, _async) {\n var _promise = new Promise(\n function (resolve, reject) {\n \n logger.debug(\"LOADING SERVICE DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n var xhr = new XMLHttpRequest();\n xhr.withCredentials = service.withCredentials;\n var xhrasync = true; // always async because xhr sync is deprecated\n xhr.open(service.method, service.url, xhrasync);\n for (var header in service.headers) {\n try {\n if (typeof service.headers[header] !== \"function\") {\n xhr.setRequestHeader(header, service.headers[header]);\n }\n } catch (e) {\n logger.debug(\"Something went wrong when assign the header \" + header);\n }\n }\n xhr.onload = function () {\n if (xhr.status === 200) {\n var response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING SERVICE {{NAME}}\".replace(\"{{NAME}}\", service.name));\n service.template = response;\n if (service.cached && (typeof cache !== \"undefined\")) {\n cache.save(service.name, service.template);\n }\n if (typeof service.done === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n \"service\": service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n } else {\n if (typeof service.fail === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n \"service\": service\n };\n service.fail.call(service, standardResponse);\n reject.call(_promise, standardResponse);\n }\n }\n };\n \n var _directLoad = function () {\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n try {\n xhr.send(_DataStringify(service.data));\n } catch (e) {\n logger.debug(\"SOMETHING WRONG WITH REQUEST \");\n reject.call(_promise, {\n request: xhr,\n service: service\n });\n }\n };\n \n if (service.cached) {\n var cache = new ComplexStorageCache({\n index: service.data,\n load(cacheController) {\n _directLoad.call(this);\n },\n alternate(cacheController) {\n if (service.method === \"GET\") {\n service.template = cacheController.cache.getCached(service.name);\n if (typeof service.done === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n \"service\": service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n } else {\n _directLoad.call(this);\n }\n return;\n }\n });\n global.lastCache = cache;\n } else {\n _directLoad.call(this);\n }\n \n return xhr;\n }\n );\n return _promise;\n };\n \n var _serviceLoaderInNode = function (service, _async) {\n var _promise = new Promise(\n function (resolve, reject) {\n if (typeof URL === \"undefined\") {\n global.URL = _require_(\"url\").URL;\n let URL = global.URL;\n }\n var serviceURL = new URL(service.url);\n var req;\n service.useHTTP2 = Object.hasOwnProperty.call(service, \"useHTTP2\") && service.useHTTP2;\n \n \n var captureEvents = function (req) {\n logger.debug(\"LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n var dataXML;\n var standardResponse = {\n \"http2Client\": client,\n \"request\": req,\n \"service\": service,\n \"responseHeaders\": null\n };\n \n if (typeof service.data === \"object\" && service.data !== null) {\n if (service.useHTTP2) {\n try {\n logger.debug(\"Sending data...\");\n let buffer = new Buffer(_DataStringify(service.data));\n req.write(buffer);\n } catch (e) {\n logger.debug(\"It was not possible to send any data\");\n }\n }\n }\n \n dataXML = \"\";\n req.on(\"response\", (responseHeaders, flags) => {\n logger.debug(\"receiving response...\");\n standardResponse.responseHeaders = responseHeaders;\n /*\n for (const name in responseHeaders) {\n logger.debug(`${name}: ${responseHeaders[name]}`);\n }\n */\n dataXML = \"\";\n });\n req.on(\"data\", (chunk) => {\n logger.debug(\"receiving data...\");\n // do something with the data\n dataXML += \"\" + chunk.toString();\n service.template = dataXML;\n });\n if (service.useHTTP2) {\n req.resume();\n }\n req.on(\"end\", () => {\n logger.debug(\"ending call...\");\n service.template = dataXML;\n if (Object.hasOwnProperty.call(service, \"useHTTP2\") && service.useHTTP2) {\n client.destroy();\n } else {\n req.destroy();\n }\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n });\n if (service.useHTTP2) {\n req.end();\n }\n \n };\n \n try {\n var requestOptions;\n if (service.useHTTP2) {\n logger.debug(\"using http2\");\n var http2 = _require_(\"http2\");\n var client = http2.connect(serviceURL.origin);\n requestOptions = Object.assign({\n \":method\": service.method,\n \":path\": serviceURL.pathname\n }, service.options);\n requestOptions = Object.assign(requestOptions, service.headers);\n req = client.request(requestOptions);\n req.setEncoding(\"utf8\");\n captureEvents(req);\n } else {\n if (serviceURL.protocol === \"http:\") {\n var http = _require_(\"http\");\n var request = http.request;\n requestOptions = Object.assign({\n \"url\": service.url,\n headers: service.headers\n }, service.options);\n var req = request(service.url);\n captureEvents(req);\n } else if (serviceURL.protocol === \"https:\") {\n var https = _require_(\"https\");\n requestOptions = Object.assign({\n hostname: serviceURL.hostname,\n port: serviceURL.port,\n path: serviceURL.pathname,\n method: service.method,\n headers: service.headers\n }, service.options);\n var _req_ = https.request(requestOptions, function (req) {\n captureEvents(req);\n });\n _req_.end();\n } else {\n var e = \"Protocol not supported: \" + serviceURL.protocol;\n logger.debug(e);\n throw new Error(e);\n }\n }\n \n \n } catch (e) {\n logger.debug(e);\n service.fail.call(service, e);\n reject.call(_promise, e);\n \n }\n }).catch(function (e) {\n console.log(e);\n logger.debug(\"Something happened when trying to call the service: \" + service.name);\n service.fail.call(service, e);\n });\n return _promise;\n \n };\n \n var _serviceLoaderMockup = function (service, _async) {\n var _promise = new Promise(\n function (resolve, reject) {\n logger.debug(`Calling mockup service ${service.name} ...`);\n var standardResponse = {\n \"request\": null,\n \"service\": service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.mockup === \"function\") {\n service.mockup.call(service, standardResponse);\n } else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n var _serviceLoaderLocal = function (service, _async) {\n var _promise = new Promise(\n function (resolve, reject) {\n logger.debug(`Calling local service ${service.name} ...`);\n var standardResponse = {\n \"request\": null,\n \"service\": service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.local === \"function\") {\n service.local.call(service, standardResponse);\n } else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n \n var _ret_;\n switch (service.kind) {\n case \"rest\":\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_serviceLoaderInBrowser, arguments);\n } else {\n _ret_ = _serviceLoaderInBrowser(service, _async);\n }\n } else {\n _ret_ = _serviceLoaderInNode(service, _async);\n }\n break;\n case \"mockup\":\n _ret_ = _serviceLoaderMockup(service, _async);\n break;\n case \"local\":\n _ret_ = _serviceLoaderLocal(service, _async);\n break;\n default:\n logger.debug(`The value of the kind property of the service ${service.name} is not valid`);\n break;\n }\n return _ret_;\n };\n Export(serviceLoader);\n Export(componentLoader);\n Export(ComponentURI);\n Export(ObjectName);\n Export(_DataStringify);\n Export(isQCObjects_Class);\n Export(isQCObjects_Object);\n Export(NamespaceRef);\n \n \n if (isBrowser) {\n \n Element.prototype.buildComponents = function (rebuildObjects = false) {\n var tagFilter = _tag_filter_;\n var d = this;\n var elements = d.subelements(tagFilter);\n return _buildComponentsFromElements_(elements, null);\n };\n \n HTMLDocument.prototype.buildComponents = Element.prototype.buildComponents;\n HTMLElement.prototype.buildComponents = Element.prototype.buildComponents;\n var _ComponentWidget_ = class extends HTMLElement {\n constructor() {\n super(...arguments);\n const componentWidget = this;\n const componentName = componentWidget.nodeName.toLowerCase();\n const componentBody = _DOMCreateElement(\"quick-component\");\n const __enabled__atributes__ = componentWidget.getAttributeNames();\n componentBody.setAttribute(\"name\", componentName);\n \n if (!componentWidget.hasAttribute(\"shadowed\")) {\n componentBody.setAttribute(\"shadowed\", \"true\");\n }\n __enabled__atributes__.map(function (attributeName) {\n if (componentWidget.hasAttribute(attributeName)) {\n componentBody.setAttribute(attributeName, componentWidget.getAttribute(attributeName));\n componentWidget.removeAttribute(attributeName);\n }\n });\n var data_attributenames = componentWidget.getAttributeNames().filter(function (a) {\n return a.startsWith(\"data-\");\n }).map(function (a) {\n return a.split(\"-\")[1];\n });\n data_attributenames.map(function (_attribute_name_) {\n componentBody.setAttribute(\"data-\" + _attribute_name_, componentWidget.getAttribute(\"data-\" + _attribute_name_));\n componentWidget.removeAttribute(\"data-\" + _attribute_name_);\n });\n [...componentWidget.children].map(function (element) {\n componentBody.appendChild(element.cloneNode(true));\n element.remove();\n });\n \n componentWidget.append(componentBody);\n }\n };\n Export(_ComponentWidget_);\n var RegisterWidget = function (widgetName) {\n customElements.define(widgetName, class extends _ComponentWidget_ {});\n };\n var RegisterWidgets = function () {\n var widgetList = [...arguments];\n widgetList.filter(function (widgetName) {\n return typeof widgetName === \"string\";\n }).map(function (widgetName) {\n RegisterWidget(widgetName);\n });\n };\n (_protected_code_)(RegisterWidget);\n (_protected_code_)(RegisterWidgets);\n Export(RegisterWidget);\n Export(RegisterWidgets);\n \n } else {\n // not yet implemented.\n }\n \n if (!isBrowser) {\n \n Package(\"com.qcobjects.api\", [\n class BackendMicroservice extends ClassFactory(\"InheritClass\") {\n \n constructor ({\n domain= _domain_,\n basePath= _basePath_,\n body = null,\n stream= null,\n request= null\n }){\n super(...arguments);\n logger.debug(\"Initializing BackendMicroservice...\");\n let microservice = this;\n if (typeof this.body === \"undefined\") {\n this.body = null;\n }\n if (typeof body !== \"undefined\"){\n this.body = body;\n }\n this.cors();\n microservice.stream = stream;\n stream.on(\"data\", (data) => {\n // data from POST, GET\n var requestMethod = request.method.toLowerCase();\n var supportedMethods = {\n \"post\": microservice.post,\n };\n if (Object.hasOwnProperty.call(supportedMethods, requestMethod)) {\n supportedMethods[requestMethod].call(microservice, data);\n }\n });\n \n // data from POST, GET\n var requestMethod = request.method.toLowerCase();\n var supportedMethods = {\n \"get\": microservice.get,\n \"head\": microservice.head,\n \"put\": microservice.put,\n \"delete\": microservice.delete,\n \"connect\": microservice.connect,\n \"options\": microservice.options,\n \"trace\": microservice.trace,\n \"patch\": microservice.patch\n };\n if (Object.hasOwnProperty.call(supportedMethods, requestMethod)) {\n supportedMethods[requestMethod].call(microservice);\n }\n \n \n }\n \n cors() {\n if (this.route.cors) {\n logger.debug(\"Validating CORS...\");\n let {\n allow_origins,\n allow_credentials,\n allow_methods,\n allow_headers\n } = this.route.cors;\n var microservice = this;\n if (typeof microservice.headers !== \"object\") {\n microservice.headers = {};\n }\n if (typeof microservice.route.responseHeaders !== \"object\") {\n microservice.route.responseHeaders = {};\n }\n if (typeof allow_origins !== \"undefined\") {\n logger.debug(\"CORS: allow_origins available. Validating origins...\");\n // an example of allow_origins is ['https://example.com','http://www.example.com']\n if (allow_origins === \"*\" || (typeof microservice.request.headers.origin === \"undefined\") || [...allow_origins].indexOf(microservice.request.headers.origin) !== -1) {\n // for compatibility with all browsers allways return a wildcard when the origin is allowed\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n } else {\n logger.debug(\"CORS: Origin is not allowed: \" + microservice.request.headers.origin);\n logger.debug(\"CORS: Forcing to finish the response...\");\n this.body = {};\n try {\n this.done();\n } catch (e) {\n logger.debug(`It was not possible to finish the call to the microservice: ${e}`);\n }\n }\n } else {\n logger.debug(\"CORS: no allow_origins available. Allowing all origins...\");\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n }\n if (typeof allow_credentials !== \"undefined\") {\n logger.debug(`CORS: allow_credentials present. Allowing ${allow_credentials}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = allow_credentials.toString();\n } else {\n logger.debug(\"CORS: No allow_credentials present. Allowing all credentials.\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = \"true\";\n }\n if (typeof allow_methods !== \"undefined\") {\n logger.debug(`CORS: allow_methods present. Allowing ${allow_methods}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = [...allow_methods].join(\",\");\n } else {\n logger.debug(\"CORS: No allow_methods present. Allowing only GET, OPTIONS and POST\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = \"GET, OPTIONS, POST\";\n }\n if (typeof allow_headers !== \"undefined\") {\n logger.debug(`CORS: allow_headers present. Allowing ${allow_headers}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = [...allow_headers].join(\",\");\n } else {\n logger.debug(`CORS: No allow_headers present. Allowing all headers...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = \"*\";\n }\n } else {\n logger.debug(\"No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors\");\n }\n }\n \n \n head(formData) {\n this.done();\n }\n \n get(formData) {\n logger.debug(`[BackendMicroservice.get] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n \n post(formData) {\n this.done();\n }\n \n put(formData) {\n this.done();\n }\n \n delete(formData) {\n this.done();\n }\n \n connect(formData) {\n this.done();\n }\n \n options(formData) {\n this.done();\n }\n \n trace(formData) {\n this.done();\n }\n \n patch(formData) {\n this.done();\n }\n \n finishWithBody(stream) {\n try {\n logger.debug(\"[BackendMicroservice.finishWithBody] Ending the stream...\");\n logger.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`);\n if (typeof this.body !== \"string\"){\n this.body = _DataStringify(this.body);\n }\n logger.debug(`[BackendMicroservice.finishWithBody] \\n body: ${this.body} `);\n stream.write(this.body);\n stream.end();\n logger.debug(`[BackendMicroservice.finishWithBody] Stream ended.`);\n } catch (e) {\n logger.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${e}`);\n }\n }\n \n done() {\n logger.debug(`[BackendMicroservice.done] Finalizing the response...`);\n var microservice = this;\n var stream = microservice.stream;\n try {\n logger.debug(`[BackendMicroservice.done] Sending response headers...`);\n if (microservice.route.responseHeaders){\n logger.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(microservice.route.responseHeaders)}`);\n stream.respond(microservice.route.responseHeaders);\n } else {\n throw Error(`[BackendMicroservice.done] No headers present.`);\n }\n } catch (e) {\n logger.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${e}`);\n }\n if (microservice.body !== null) {\n try {\n logger.debug(`[BackendMicroservice.done] A body of message is present. Finalizing the response...`);\n microservice.finishWithBody.call(microservice, stream);\n } catch (e) {\n logger.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${e}`);\n }\n } else {\n logger.debug(\"[BackendMicroservice.done] No body present. Ending stream...\");\n stream.end();\n }\n }\n \n \n }\n ]);\n \n \n }\n \n Class(\"SourceJS\", Object, {\n domain: _domain_,\n basePath: _basePath_,\n body: _DOMCreateElement(\"script\"),\n type: \"text/javascript\",\n containerTag: \"body\",\n url: \"\",\n data: {},\n async: false,\n external: false,\n set(name, value) {\n this[name] = value;\n },\n get(name) {\n return this[name];\n },\n status: false,\n done() {},\n fail() {},\n rebuild() {\n var context = this;\n try {\n document.getElementsByTagName(context.containerTag)[0].appendChild(\n (function (s, url, context) {\n s.type = context.type;\n s.src = url;\n s.crossOrigin = (Object.hasOwnProperty.call(context, \"crossOrigin\")) ? (context.crossOrigin) : (\"anonymous\");\n s.async = context.async;\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = function (e) {\n context.status = true;\n context.done.call(context, e);\n };\n s.onerror = function (e) {\n context.status = false;\n context.fail.call(context, e);\n };\n context.body = s;\n return s;\n }).call(this,\n _DOMCreateElement(\"script\"),\n (this.external) ? (this.url) : (this.basePath + this.url), context));\n } catch (e) {\n context.status = false;\n context.fail.call(context, e);\n }\n },\n Cast(o) {\n return _Cast(this, o);\n },\n _new_(properties) {\n this.__new__(properties);\n this.rebuild();\n }\n });\n Class(\"SourceCSS\", Object, {\n domain: _domain_,\n basePath: _basePath_,\n body: _DOMCreateElement(\"link\"),\n url: \"\",\n data: {},\n async: false,\n external: false,\n set(name, value) {\n this[name] = value;\n },\n get(name) {\n return this[name];\n },\n done() {},\n rebuild() {\n var context = this;\n if (isBrowser) {\n window.document.getElementsByTagName(\"head\")[0].appendChild(\n (function (s, url, context) {\n s.type = \"text/css\";\n s.rel = \"stylesheet\";\n s.href = url;\n s.crossOrigin = \"anonymous\";\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = context.done;\n context.body = s;\n return s;\n }).call(this,\n _DOMCreateElement(\"link\"),\n (this.external) ? (this.url) : (this.basePath + this.url), context));\n }\n },\n Cast(o) {\n return _Cast(this, o);\n },\n _new_(properties) {\n this.__new__(properties);\n this.rebuild();\n }\n });\n \n /**\n * Array math functions\n */\n var __to_number = function (value) {\n return (isNaN(value)) ? (new Number(0)) : (new Number(value));\n };\n Array.prototype.unique = function () {\n return this.filter(function (value, index, self) {\n return self.indexOf(value) === index;\n });\n };\n Array.unique = function (a) {\n return a.unique();\n };\n (_protected_code_)(Array.unique);\n (_protected_code_)(Array.prototype.unique);\n Array.prototype.table = function () {\n console.table(this);\n };\n Array.table = function (a) {\n return a.table();\n };\n (_protected_code_)(Array.table);\n (_protected_code_)(Array.prototype.table);\n Array.prototype.sum = function () {\n return this.reduce(function (prev, current) {\n return __to_number(prev) + __to_number(current);\n }, 0);\n };\n Array.sum = function (a) {\n return a.sum();\n };\n (_protected_code_)(Array.sum);\n (_protected_code_)(Array.prototype.sum);\n Array.prototype.avg = function () {\n return (this.length < 1) ? (0) : (this.reduce(function (prev, current) {\n return ((__to_number(prev) + __to_number(current)) / 2);\n }));\n };\n Array.avg = function (a) {\n return a.avg();\n };\n (_protected_code_)(Array.avg);\n (_protected_code_)(Array.prototype.avg);\n Array.prototype.min = function () {\n return this.reduce(function (prev, current) {\n return (__to_number(prev) <= __to_number(current)) ? (prev) : (current);\n }, Infinity);\n };\n Array.min = function (a) {\n return a.min();\n };\n (_protected_code_)(Array.min);\n (_protected_code_)(Array.prototype.min);\n Array.prototype.max = function () {\n return this.reduce(function (prev, current) {\n return (__to_number(prev) >= __to_number(current)) ? (prev) : (current);\n }, 0);\n };\n Array.max = function (a) {\n return a.max();\n };\n (_protected_code_)(Array.max);\n (_protected_code_)(Array.prototype.max);\n Array.prototype.sortBy = function (propName, sortAsc = true) {\n var sort_function = (sortAsc) ? (\n function (prev, current) {\n return current[propName] < prev[propName] ? 1 : -1;\n }\n ) : (\n function (prev, current) {\n return current[propName] > prev[propName] ? 1 : -1;\n }\n );\n return this.sort(sort_function);\n };\n Array.sortBy = function (a, propName, sortAsc = true) {\n return a.sortBy(propName, sortAsc);\n };\n (_protected_code_)(Array.sortBy);\n (_protected_code_)(Array.prototype.sortBy);\n \n Array.matrix = function (_length, _fillValue = 0) {\n var x_func = function (x) {\n return _fillValue;\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n (_protected_code_)(Array.matrix);\n \n Array.matrix2d = function (_length, _fillValue = 0) {\n var y_func = function (y) {\n return _fillValue;\n };\n var x_func = function (x) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n (_protected_code_)(Array.matrix2d);\n \n Array.matrix3d = function (_length, _fillValue = 0) {\n var y_func = function (y) {\n return Array.from({\n length: _length\n }, function () {\n return _fillValue;\n });\n };\n var x_func = function (x) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n (_protected_code_)(Array.matrix3d);\n \n _top.range = function (start, stop = 0, step = 1) {\n if (stop === 0 || typeof stop === \"undefined\") {\n stop = start;\n start = 0;\n }\n return Array.from({\n length: (stop - start) / step + 1\n }, function (_, i) {\n return start + (i * step);\n });\n };\n (_protected_code_)(_top.range);\n \n String.prototype.list = function () {\n var __instance = this;\n return _top.range(0, __instance.length - 1).map(function (i) {\n return __instance[i];\n });\n };\n (_protected_code_)(String.prototype.list);\n \n _top.getDocumentLayout = function () {\n var h = (w, h) => {\n return w > h ? \"landscape\" : null;\n };\n var v = (w, h) => {\n return h > w ? \"portrait\" : null;\n };\n var square = (w, h) => {\n return w === h ? \"square\" : null;\n };\n return [\n h(document.documentElement.clientWidth, document.documentElement.clientHeight),\n v(document.documentElement.clientWidth, document.documentElement.clientHeight),\n square(document.documentElement.clientWidth, document.documentElement.clientHeight)\n ].filter(e => e !== null).pop();\n };\n \n \n /**\n * End of array math functions\n */\n \n \n Class(\"ArrayList\", Array, []);\n ClassFactory(\"ArrayList\").matrix = Array.matrix;\n ClassFactory(\"ArrayList\").matrix2d = Array.matrix2d;\n ClassFactory(\"ArrayList\").matrix3d = Array.matrix3d;\n (_protected_code_)(ClassFactory(\"ArrayList\").matrix);\n (_protected_code_)(ClassFactory(\"ArrayList\").matrix2d);\n (_protected_code_)(ClassFactory(\"ArrayList\").matrix3d);\n \n Class(\"ArrayCollection\", Object, {\n source: New(ClassFactory(\"ArrayList\"), []),\n changed(prop, value) {\n logger.debug(\"VALUE CHANGED\");\n logger.debug(prop);\n logger.debug(value);\n },\n push(value) {\n var self = this;\n logger.debug(\"VALUE ADDED\");\n logger.debug(value);\n self.source.push(value);\n },\n pop(value) {\n var self = this;\n logger.debug(\"VALUE POPPED\");\n logger.debug(value);\n self.source.pop(value);\n },\n _new_(source) {\n var self = this;\n var _index = 0;\n self.source = New(ClassFactory(\"ArrayList\"), source);\n for (var _k in self.source) {\n if (!isNaN(_k)) {\n logger.debug(\"binding \" + _k.toString());\n (function (_pname) {\n Object.defineProperty(self, _pname, {\n set(value) {\n logger.debug(\"setting \" + _pname + \"=\" + value);\n self.source[_pname] = value;\n self.changed(_pname, value);\n },\n get() {\n return self.source[_pname];\n }\n });\n })(_k);\n _index++;\n }\n \n }\n self.source.length = _index;\n Object.defineProperty(self, \"length\", {\n get() {\n return self.source.length;\n }\n });\n }\n });\n \n Package(\"com.qcobjects.effects.base\", [\n class Effect extends ClassFactory(\"InheritClass\") {\n duration = 1000;\n \n constructor (){\n super(...arguments);\n }\n \n animate({\n timing,\n draw,\n duration\n }) {\n \n let start = performance.now();\n \n requestAnimationFrame(function animate(time) {\n // timeFraction goes from 0 to 1\n let timeFraction = (time - start) / duration;\n if (timeFraction > 1) timeFraction = 1;\n \n // calculate the current animation state\n let progress = timing(timeFraction);\n \n draw(Math.round(progress * 100)); // draw it\n \n if (timeFraction < 1) {\n requestAnimationFrame(animate);\n } else {\n // if this is an object with a done method\n if (typeof this !== \"undefined\" &&\n this !== null &&\n Object.hasOwnProperty.call(this, \"done\") &&\n (typeof this.done).toLowerCase() === \"function\") {\n this.done.call(this);\n }\n }\n \n });\n }\n \n }\n ]);\n \n Package(\"com.qcobjects.effects.transitions.base\", [\n \n class TransitionEffect extends ClassFactory(\"Effect\") {\n duration= 385;\n defaultParams= {\n alphaFrom: 0,\n alphaTo: 1,\n angleFrom: 180,\n angleTo: 0,\n radiusFrom: 0,\n radiusTo: 30,\n scaleFrom: 0,\n scaleTo: 1\n };\n fitToHeight= false;\n fitToWidth= false;\n effects= [];\n \n constructor (){\n super(...arguments);\n logger.info(\"DECLARING TransitionEffect \");\n this.component.defaultParams = this.defaultParams;\n }\n \n apply({\n alphaFrom,\n alphaTo,\n angleFrom,\n angleTo,\n radiusFrom,\n radiusTo,\n scaleFrom,\n scaleTo\n }) {\n var _transition_ = this;\n logger.info(\"EXECUTING TransitionEffect \");\n var componentRoot = (_transition_.component.shadowed)?(_transition_.component.shadowRoot.host):(_transition_.component.body);\n if (_transition_.fitToHeight) {\n componentRoot.height = (typeof componentRoot.offsetParent === \"object\" && componentRoot.offsetParent !== null)?(componentRoot.offsetParent.scrollHeight):(componentRoot.getBoundingClientRect().height);\n }\n if (_transition_.fitToWidth) {\n componentRoot.width = (typeof componentRoot.offsetParent === \"object\" && componentRoot.offsetParent !== null)?(componentRoot.offsetParent.scrollWidth):(componentRoot.getBoundingClientRect().width);\n }\n componentRoot.style.display = \"block\";\n _transition_.effects.map(function (effectClassName, eff) {\n var __effectClass__ = ClassFactory(effectClassName);\n var effectObj = new __effectClass__();\n var effectClassMethod = effectObj.apply;\n var args = [componentRoot].concat(Object.values({\n alphaFrom,\n alphaTo,\n angleFrom,\n angleTo,\n radiusFrom,\n radiusTo,\n scaleFrom,\n scaleTo\n }));\n effectClassMethod.apply(_transition_, args);\n });\n }\n \n }\n ]);\n \n Package(\"com.qcobjects.timing\", [\n class Timer extends ClassFactory(\"InheritClass\") {\n \n constructor (){\n super(...arguments);\n }\n \n duration= 1000;\n alive= true;\n thread({\n timing,\n intervalInterceptor,\n duration\n }) {\n var timer = this;\n \n let start = performance.now();\n \n requestAnimationFrame(function thread(time) {\n // timeFraction goes from 0 to 1\n let elapsed = (time - start);\n let timeFraction = elapsed / duration;\n if (timeFraction > 1) timeFraction = 1;\n \n // calculate the current progress state\n let progress = timing(timeFraction, elapsed);\n \n intervalInterceptor(Math.round(progress * 100)); // draw it\n \n if ((timeFraction < 1 || duration === -1) && timer.alive) {\n requestAnimationFrame(thread);\n }\n \n });\n }\n \n \n }\n ]);\n \n Package(\"com.qcobjects.tools.essentials\", [\n class Toggle extends ClassFactory(\"InheritClass\") {\n _toggle= false;\n _inverse= true;\n _positive= null;\n _negative= null;\n _dispatched= null;\n _args= {};\n \n constructor (){\n super(...arguments);\n this._new_(...arguments);\n }\n \n changeToggle() {\n this._toggle = (this._toggle) ? (false) : (true);\n }\n \n _new_({\n positive,\n negative,\n args\n }) {\n this._positive = positive;\n this._negative = negative;\n this._args = args;\n }\n \n fire() {\n var toggle = this;\n var _promise = new Promise(function (resolve, reject) {\n \n if (typeof toggle._positive === \"function\" && typeof toggle._negative === \"function\") {\n if (toggle._inverse) {\n toggle._dispatched = (toggle._toggle) ? (toggle._negative.bind(toggle)) : (toggle._positive.bind(toggle));\n } else {\n toggle._dispatched = (toggle._toggle) ? (toggle._positive.bind(toggle)) : (toggle._negative.bind(toggle));\n }\n toggle._dispatched.call(toggle, toggle._args);\n resolve.call(_promise, toggle);\n } else {\n logger.debug(\"Toggle functions are not declared\");\n reject.call(_promise, toggle);\n }\n }).then(function (toggle) {\n toggle.changeToggle();\n }).catch(function (e) {\n logger.debug(e.toString());\n });\n return _promise;\n }\n \n \n }\n \n ]);\n \n // Set Processors\n (function (_top) {\n \n let mapper = function (componentInstance,componentName, valueName) {\n /*\n * Mapper processor\n * @usage\n * $mapper(,)\n *\n * Where componentName is the name of the component (same value as in attribute tag name) without quotes\n * and valueName is the name of the variable that contains the value to map, it can be either a property of\n * the component instance, the data object or a global value\n */\n \n var self = this;\n if (typeof componentInstance === \"undefined\" || componentInstance === null){\n throw Error (`mapper.${componentName}.${valueName} does not have a component instance or it is null.`);\n }\n let globalValue = _top.global.get(valueName);\n let componentValue = componentInstance.get(valueName);\n let dataValue = componentInstance.data[valueName];\n let list = (typeof dataValue !== \"undefined\") ? (dataValue) : ((typeof componentValue !== \"undefined\") ? (componentValue) : (globalValue));\n let listItems = \"\";\n if (typeof list !== \"undefined\" && typeof list[\"map\"] !== \"undefined\") {\n listItems = list.map(function (element) {\n let dataItems = [...Object.keys(element)].map(k => ` data-${k}=\"${(typeof element[k] !== \"undefined\" && element[k] !== null)?(element[k].toString()):(\"\")}\"`).join(\"\");\n return ``;\n }).join(\"\");\n } else {\n logger.debug(`${componentName}.${valueName} does not have a map property`);\n }\n return listItems;\n };\n Processor.setProcessor(mapper);\n \n let layout = function (componentInstance, layoutname, cssfile) {\n /*\n * Layout processor\n * @usage\n * $layout(, )\n * Where layoutname can be \"portrait\" or \"landscape\" without quotes\n * cssfile is the uri for the css file to import\n */\n \n var layout_portrait = `\n /* CSS Document for Mobile Imports */\n @import url(\"${cssfile}\") (orientation:portrait);\n @import url(\"${cssfile}\") (max-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 9/16);\n @import url(\"${cssfile}\") (aspect-ratio: 10/16);\n @import url(\"${cssfile}\") (aspect-ratio: 5/8);\n @import url(\"${cssfile}\") (aspect-ratio: 3/4);\n @import url(\"${cssfile}\") (aspect-ratio: 2/3);\n `;\n var layout_landscape = `\n @import url(\"${cssfile}\") (orientation:landscape) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/9) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/10) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 8/5) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 4/3) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 3/2) and (min-width:460px);\n `;\n var layout_code = {\n \"landscape\": layout_landscape,\n \"portrait\": layout_portrait\n };\n \n return (Object.hasOwnProperty.call(layout_code, layoutname)) ? (layout_code[layoutname]) : (\"\");\n };\n \n Processor.setProcessor(layout);\n \n let component = function () {\n /*\n * component processor\n * @usage\n * $component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n let arg = [...arguments].slice(1).map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n let attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a]}`;\n }).join(\" \");\n return ``;\n };\n \n Processor.setProcessor(component);\n \n let quick_component = function () {\n /*\n * component processor\n * @usage\n * $quick_component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n let arg = [...arguments].slice(1).map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n let attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a]}`;\n }).join(\" \");\n return ``;\n };\n \n Processor.setProcessor(quick_component);\n \n \n let repeat = function (componentInstance, length, text) {\n /*\n * Repeat processor\n * @usage\n * $repeat(, )\n * Where length is the number of occurrences of text\n */\n return _top.range(length).map(\n function (index) {\n return text.replace(\"{{index}}\", index.toString());\n }\n ).join(\"\");\n };\n \n Processor.setProcessor(repeat);\n \n })(_top);\n \n \n /**\n * Load every component tag declared in the body\n **/\n Ready(function () {\n if (!_top.CONFIG.get(\"useSDK\")) {\n _top.__start__();\n }\n });\n \n /*\n Public variables and functions\n */\n Export(Export); /* exports the same Export function once */\n Export(Import);\n Export(Package);\n Export(Class);\n Export(New);\n Export(Tag);\n Export(Ready);\n Export(ready);\n Export(isBrowser);\n Export(_methods_);\n \n (function (_top){\n Package(\"com.qcobjects\", [\n class GlobalSettings extends ClassFactory(\"InheritClass\"){\n _GLOBAL= {};\n __definition = {};\n __classType = \"GlobalSettings\";\n \n constructor(){\n super(...arguments);\n this.set = GlobalSettings.set.bind(this);\n this.get = GlobalSettings.get.bind(this);\n this.__start__ = GlobalSettings.__start__.bind(this);\n }\n \n static set(name, value) {\n this._GLOBAL[name] = value;\n }\n \n static get(name, _default) {\n var _value;\n if (typeof this._GLOBAL[name] !== \"undefined\") {\n _value = this._GLOBAL[name];\n } else if (typeof _default !== \"undefined\") {\n _value = _default;\n }\n return _value;\n }\n \n static __start__() {\n var __load__serviceWorker = function () {\n var _promise;\n if (isBrowser) {\n _promise = new Promise(function (resolve, reject) {\n if ((\"serviceWorker\" in navigator) &&\n (typeof _top.CONFIG.get(\"serviceWorkerURI\") !== \"undefined\")) {\n _top.CONFIG.set(\"serviceWorkerScope\", _top.CONFIG.get(\"serviceWorkerScope\") ? (_top.CONFIG.get(\"serviceWorkerScope\")) : (\"/\"));\n navigator.serviceWorker.register(_top.CONFIG.get(\"serviceWorkerURI\"), {\n scope: _top.CONFIG.get(\"serviceWorkerScope\")\n })\n .then(function (registration) {\n logger.debug(\"Service Worker Registered\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error registering Service Worker\");\n reject.call(_promise, registration);\n });\n navigator.serviceWorker.ready.then(function (registration) {\n logger.debug(\"Service Worker Ready\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error loading Service Worker\");\n reject.call(_promise, registration);\n });\n }\n });\n }\n return _promise;\n };\n var _buildComponents = function () {\n return new Promise ((resolve, reject) => {\n if (isBrowser) {\n logger.debug(\"Starting to building components\");\n try {\n _top.componentsStack = document.buildComponents.call(document);\n }catch (e){\n throw Error (`Something went wrong trying to start components tree: ${e.message}`);\n }\n logger.debug(\"Initializing the service worker\");\n __load__serviceWorker.call(_top)\n .catch(function (e) {\n logger.debug(`error loading the service worker ${e}`);\n });\n }\n resolve();\n });\n };\n logger.debug(\"Starting to load the config settings...\");\n if (_top.CONFIG.get(\"useConfigService\", false)) {\n logger.debug(\"Loading settings using local configuration file...\");\n _top.global.configService = New(ClassFactory(\"ConfigService\"));\n _top.global.configService.configLoaded = _buildComponents;\n serviceLoader(_top.global.configService);\n } else {\n logger.debug(\"Starting to load the components...\");\n _buildComponents.call(this);\n }\n }\n \n }\n ]);\n Export(ClassFactory(\"GlobalSettings\"));\n global = New(ClassFactory(\"GlobalSettings\"));\n _top = _CastProps(global, _top);\n \n Object.defineProperty(_top, \"PackagesNameList\", {\n set(val) {\n logger.debug(\"PackagesNameList is readonly\");\n return;\n },\n get() {\n var _get_packages_names = function (_packages) {\n var _keys = [];\n for (var _k in _packages) {\n if (\n typeof _packages[_k] !== \"undefined\" &&\n typeof _packages[_k] !== \"function\" &&\n Object.hasOwnProperty.call(_packages[_k], \"length\") &&\n _packages[_k].length > 0\n ) {\n _keys.push(_k);\n _keys = _keys.concat(_get_packages_names(_packages[_k]));\n }\n }\n return _keys;\n };\n return _get_packages_names(_QC_PACKAGES);\n }\n });\n \n Object.defineProperty(_top, \"PackagesList\", {\n set(value) {\n logger.debug(\"PackagesList is readonly\");\n return;\n },\n get() {\n return _top.PackagesNameList.map(function (packagename) {\n let _classesList = Package(packagename);\n let _ret_;\n if (_classesList) {\n _ret_ = {\n packageName: packagename,\n classesList: _classesList.filter(function (_packageClass) {\n return isQCObjects_Class(_packageClass);\n })\n };\n }\n return _ret_;\n }).filter(function (_p) {\n return typeof _p !== \"undefined\";\n });\n }\n });\n \n Object.defineProperty(_top, \"ClassesList\", {\n set(value) {\n logger.debug(\"ClassesList is readonly\");\n return;\n },\n get() {\n var _classesList = [];\n _top.PackagesList.map(function (_package_element) {\n _classesList = _classesList.concat(_package_element.classesList.map(\n function (_class_element) {\n return {\n packageName: _package_element.packageName,\n className: _package_element.packageName + \".\" + _class_element.__definition.__classType,\n classFactory: _class_element\n };\n }\n ));\n return _package_element;\n });\n \n return _classesList;\n }\n });\n \n Object.defineProperty(_top, \"ClassesNameList\", {\n set(value) {\n logger.debug(\"ClassesNameList is readonly\");\n return;\n },\n get() {\n return _top.ClassesList.map(function (_class_element) {\n return _class_element.className;\n });\n }\n });\n \n if (isBrowser) {\n // use of GLOBAL word is deprecated in node.js\n // this is only for compatibility purpose with old versions of QCObjects in browsers\n Class(\"GLOBAL\", _QC_CLASSES[\"global\"]); // case insensitive for compatibility con old versions;\n Export(ClassFactory(\"GLOBAL\"));\n }\n Export(global);\n \n if (_top.CONFIG.get(\"useSDK\")) {\n (function (_top) {\n var remoteImportsPath = _top.CONFIG.get(\"remoteImportsPath\");\n var external = (!_top.CONFIG.get(\"useLocalSDK\")) ? (true) : (false);\n _top.CONFIG.set(\"remoteImportsPath\", _top.CONFIG.get(\"remoteSDKPath\"));\n \n var tryImportingSDK = false;\n var sdkName = \"QCObjects-SDK\";\n if (isBrowser) {\n tryImportingSDK = true;\n } else {\n var sdkPath = findPackageNodePath(\"qcobjects-sdk\");\n if (sdkPath !== null) {\n sdkName = \"qcobjects-sdk\";\n tryImportingSDK = true;\n } else {\n sdkName = \"node_modules/qcobjects-sdk/QCObjects-SDK\";\n tryImportingSDK = true;\n }\n }\n \n if (tryImportingSDK) {\n logger.info(\"Importing SDK... \" + sdkName);\n if (isNodeCommonJS && typeof require !== \"undefined\"){\n let sdk = require(\"qcobjects-sdk\");\n } else {\n Import(sdkName, function () {\n if (external) {\n logger.debug(\"QCObjects-SDK.js loaded from remote location\");\n } else {\n logger.debug(\"QCObjects-SDK.js loaded from local\");\n }\n _top.CONFIG.set(\"remoteImportsPath\", remoteImportsPath);\n }, external);\n }\n } else {\n logger.debug(\"SDK has not been imported as it is not available at the moment\");\n }\n })(_top);\n }\n })(_top);\n \n if (isBrowser) {\n asyncLoad(function () {\n Ready(function () {\n \n /*\n * scroll management custom events\n * usage: document.addEventListener('percentY90',function(e){console.log(e.detail.percentY)});\n * possible events: scrollpercent, defaultscroll, percentY0, percentY25, percentY50, percentY75, percentY90\n */\n \n (function (_top) {\n let lastKnownScrollPosition = 0;\n let ticking = false;\n let scrollHeight = Math.max(\n document.body.scrollHeight, document.documentElement.scrollHeight,\n document.body.offsetHeight, document.documentElement.offsetHeight,\n document.body.clientHeight, document.documentElement.clientHeight\n );\n \n let scrollWidth = Math.max(\n document.body.scrollWidth, document.documentElement.scrollWidth,\n document.body.offsetWidth, document.documentElement.offsetWidth,\n document.body.clientWidth, document.documentElement.clientWidth\n );\n \n function scrollDispatcher(event) {\n var percentY = Math.round(_top.scrollY * 100 / scrollHeight);\n var percentX = Math.round(_top.scrollX * 100 / scrollWidth);\n var scrollPercentEventEvent = new CustomEvent(\"scrollpercent\", {\n detail: {\n percentX: percentX,\n percentY: percentY\n }\n });\n event.target.dispatchEvent(scrollPercentEventEvent);\n var secondaryEventName = \"defaultscroll\";\n var __valid_scrolls__ = [0, 5, 10, 25, 50, 75, 90, 95, 100];\n __valid_scrolls__.filter(function (p) {\n return p === percentY;\n }).map(function (pY) {\n secondaryEventName = \"percentY\" + percentY.toString();\n var secondaryCustomEvent = new CustomEvent(secondaryEventName, {\n detail: {\n percentX: percentX,\n percentY: percentY\n }\n });\n event.target.dispatchEvent(secondaryCustomEvent);\n });\n \n }\n \n document.addEventListener(\"scroll\", function (event) {\n \n if (!ticking) {\n requestAnimationFrame(function () {\n scrollDispatcher(event);\n ticking = false;\n });\n \n ticking = true;\n }\n });\n \n })(_top);\n \n });\n }, null);\n }\n \n if (!isBrowser) {\n if (typeof _top.global !== \"undefined\" && Object.hasOwnProperty.call(_top.global, \"_fireAsyncLoad\")) {\n _top.global._fireAsyncLoad.call(this);\n }\n if (typeof _top.global !== \"undefined\" && Object.hasOwnProperty.call(_top.global, \"onload\")) {\n _top.global.onload.call(this);\n }\n }\n \n \n /* Freezing Object && Object.prototype to prevent prototype pollution risks */\n (function (isBrowser) {\n var __freeze__ = function () {\n Object.freeze(Object.prototype);\n Object.freeze(Object);\n };\n if (isBrowser && _top.CONFIG.get(\"secureObjects\", false)) {\n Ready(function () {\n __freeze__();\n });\n } else if (_top.CONFIG.get(\"secureObjects\", false)) {\n __freeze__();\n }\n })(isBrowser);\n }\n}).call(null, (typeof module === \"object\" && typeof module.exports === \"object\") ? (\n module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})\n) : ((typeof global === \"object\") ? (global) : (\n (typeof window === \"object\") ? (window) : ({})\n)));", "const QCObjects = require(\"./QCObjects.js\");\nmodule.exports = QCObjects;", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n(function (global) {\n \"use strict\";\n // eslint-disable-next-line camelcase\n class i18n_messages extends qcobjects_1.InheritClass {\n constructor({ messages = [] }) {\n super({\n messages\n });\n if (qcobjects_1.CONFIG.get(\"use_i18n\", false)) {\n qcobjects_1.CONFIG.set(\"lang\", \"en\");\n if (!global.get(\"i18n\")) {\n global.set(\"i18n\", {\n messages\n });\n }\n else {\n global.set(\"i18n\", {\n messages: global.get(\"i18n\").messages.concat(messages)\n });\n }\n }\n }\n _load_i18n_packages_() {\n // eslint-disable-next-line array-callback-return, camelcase\n return qcobjects_1.CONFIG.get(\"i18n_languages\", []).map((i18n_packagename) => {\n // eslint-disable-next-line camelcase\n (0, qcobjects_1.Import)(`org.quickcorp.i18n_messages.${i18n_packagename}`);\n });\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.i18n_messages\", [\n // eslint-disable-next-line camelcase\n i18n_messages\n ]);\n // eslint-disable-next-line new-cap\n (new i18n_messages({}))._load_i18n_packages_();\n})((typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({}))));\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.models\", [\n class Contact extends qcobjects_1.VO {\n }\n ]);\n})();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ModalMoveUp = exports.ModalMoveDown = exports.ModalFade = exports.WipeDown = exports.WipeUp = exports.WipeRight = exports.WipeLeft = exports.Resize = exports.Radius = exports.Rotate = exports.RotateZ = exports.RotateY = exports.RotateX = exports.MoveYInFromTop = exports.MoveYInFromBottom = exports.MoveXInFromLeft = exports.MoveXInFromRight = exports.Move = exports.Fade = void 0;\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\nconst _top = (typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({})));\n(function () {\n \"use strict\";\n class Fade extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, alphaFrom, alphaTo) {\n const da = alphaTo - alphaFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const alpha = alphaFrom + (progress * da / 100);\n qcobjects_1.logger.debug(\"alpha: \" + alpha.toString());\n element.style.opacity = alpha.toString();\n }\n });\n }\n }\n class Move extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, xfrom, yfrom, xto, yto) {\n const dx = xto - xfrom;\n const dy = yto - yfrom;\n element.style.transform = \"translate(\" + xfrom + \"px,\" + yfrom + \"px)\";\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const y = yfrom + (progress * dy / 100);\n const x = xfrom + (progress * dx / 100);\n qcobjects_1.logger.debug(\"x: \" + x.toString() + \" y:\" + y.toString());\n element.style.transform = \"translate(\" + x + \"px,\" + y + \"px)\";\n }\n });\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.effects.base\", [\n Fade,\n Move\n ]);\n class MoveXInFromRight extends Move {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element) {\n super.apply.call(this, element, element.width, 0, 0, 0);\n }\n }\n class MoveXInFromLeft extends Move {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element) {\n super.apply.call(this, element, -element.width, 0, 0, 0);\n }\n }\n class MoveYInFromBottom extends Move {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element) {\n super.apply.call(this, element, 0, element.height, 0, 0);\n }\n }\n class MoveYInFromTop extends Move {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element) {\n super.apply.call(this, element, 0, -element.height, 0, 0);\n }\n }\n class RotateX extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, angleFrom, angleTo) {\n const da = angleTo - angleFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const angle = Math.round(angleFrom + (progress * da / 100));\n qcobjects_1.logger.debug(\"angle: \" + angle.toString());\n element.style.transform = \"rotate3d(1,0,0,\" + angle.toString() + \"deg)\";\n }\n });\n }\n }\n class RotateY extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, angleFrom, angleTo) {\n const da = angleTo - angleFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const angle = Math.round(angleFrom + (progress * da / 100));\n qcobjects_1.logger.debug(\"angle: \" + angle.toString());\n element.style.transform = \"rotate3d(0,1,0,\" + angle.toString() + \"deg)\";\n }\n });\n }\n }\n class RotateZ extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, angleFrom, angleTo) {\n const da = angleTo - angleFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const angle = Math.round(angleFrom + (progress * da / 100));\n qcobjects_1.logger.debug(\"angle: \" + angle.toString());\n element.style.transform = \"rotate3d(0,0,1,\" + angle.toString() + \"deg)\";\n }\n });\n }\n }\n class Rotate extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, angleFrom, angleTo) {\n const da = angleTo - angleFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const angle = Math.round(angleFrom + (progress * da / 100));\n qcobjects_1.logger.debug(\"angle: \" + angle.toString());\n element.style.transform = \"rotate3d(1,1,1,\" + angle.toString() + \"deg)\";\n }\n });\n }\n }\n class Radius extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, radiusFrom, radiusTo) {\n const dr = radiusTo - radiusFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const radius = radiusFrom + (progress * dr / 100);\n qcobjects_1.logger.debug(\"radius: \" + radius.toString());\n element.style.borderRadius = radius.toString() + \"px\";\n }\n });\n }\n }\n class Resize extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, scaleFrom, scaleTo) {\n const ds = scaleTo - scaleFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const scale = scaleFrom + (progress * ds / 100);\n qcobjects_1.logger.debug(\"resize: \" + scale.toString());\n element.style.transformOrigin = \"center\";\n element.style.transform = \"scale(\" + scale + \",\" + scale + \")\";\n }\n });\n }\n }\n class WipeLeft extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, scaleFrom, scaleTo) {\n const ds = scaleTo - scaleFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const scale = scaleFrom + (progress * ds / 100);\n qcobjects_1.logger.debug(\"wipe: \" + scale.toString());\n element.style.transformOrigin = \"right\";\n element.style.transform = \"scaleX(\" + scale + \")\";\n }\n });\n }\n }\n class WipeRight extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, scaleFrom, scaleTo) {\n const ds = scaleTo - scaleFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const scale = scaleFrom + (progress * ds / 100);\n qcobjects_1.logger.debug(\"wipe: \" + scale.toString());\n element.style.transformOrigin = \"left\";\n element.style.transform = \"scaleX(\" + scale + \")\";\n }\n });\n }\n }\n class WipeUp extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, scaleFrom, scaleTo) {\n const ds = scaleTo - scaleFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const scale = scaleFrom + (progress * ds / 100);\n qcobjects_1.logger.debug(\"wipe: \" + scale.toString());\n element.style.transformOrigin = \"bottom\";\n element.style.transform = \"scaleY(\" + scale + \")\";\n }\n });\n }\n }\n class WipeDown extends qcobjects_1.Effect {\n constructor() {\n super(...arguments);\n this.duration = 1000;\n }\n apply(element, scaleFrom, scaleTo) {\n const ds = scaleTo - scaleFrom;\n this.animate({\n duration: this.duration,\n timing(timeFraction) {\n return timeFraction;\n },\n draw(progress) {\n qcobjects_1.logger.debug(\"animation progress: \" + progress.toString());\n const scale = scaleFrom + (progress * ds / 100);\n qcobjects_1.logger.debug(\"wipe: \" + scale.toString());\n element.style.transformOrigin = \"top\";\n element.style.transform = \"scaleY(\" + scale + \")\";\n }\n });\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.effects.extended\", [\n MoveXInFromRight,\n MoveXInFromLeft,\n MoveYInFromBottom,\n MoveYInFromTop,\n RotateX,\n RotateY,\n RotateZ,\n Rotate,\n Radius,\n Resize,\n WipeLeft,\n WipeRight,\n WipeUp,\n WipeDown\n ]);\n class ModalFade extends Fade {\n constructor() {\n super(...arguments);\n this.duration = 500;\n }\n }\n class ModalMoveDown extends Move {\n constructor() {\n super(...arguments);\n this.duration = 300;\n }\n }\n class ModalMoveUp extends Move {\n constructor() {\n super(...arguments);\n this.duration = 800;\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.modal.effects\", [\n ModalFade,\n ModalMoveDown,\n ModalMoveUp\n ]);\n})();\nconst Fade = _top.Fade;\nexports.Fade = Fade;\nconst Move = _top.Fade;\nexports.Move = Move;\nconst MoveXInFromRight = _top.MoveXInFromRight;\nexports.MoveXInFromRight = MoveXInFromRight;\nconst MoveXInFromLeft = _top.MoveXInFromLeft;\nexports.MoveXInFromLeft = MoveXInFromLeft;\nconst MoveYInFromBottom = _top.MoveYInFromBottom;\nexports.MoveYInFromBottom = MoveYInFromBottom;\nconst MoveYInFromTop = _top.MoveYInFromTop;\nexports.MoveYInFromTop = MoveYInFromTop;\nconst RotateX = _top.RotateX;\nexports.RotateX = RotateX;\nconst RotateY = _top.RotateY;\nexports.RotateY = RotateY;\nconst RotateZ = _top.RotateZ;\nexports.RotateZ = RotateZ;\nconst Rotate = _top.Rotate;\nexports.Rotate = Rotate;\nconst Radius = _top.Radius;\nexports.Radius = Radius;\nconst Resize = _top.Resize;\nexports.Resize = Resize;\nconst WipeLeft = _top.WipeLeft;\nexports.WipeLeft = WipeLeft;\nconst WipeRight = _top.WipeRight;\nexports.WipeRight = WipeRight;\nconst WipeUp = _top.WipeUp;\nexports.WipeUp = WipeUp;\nconst WipeDown = _top.WipeDown;\nexports.WipeDown = WipeDown;\nconst ModalFade = _top.ModalFade;\nexports.ModalFade = ModalFade;\nconst ModalMoveDown = _top.ModalMoveDown;\nexports.ModalMoveDown = ModalMoveDown;\nconst ModalMoveUp = _top.ModalMoveUp;\nexports.ModalMoveUp = ModalMoveUp;\n", "/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SwaggerUIComponent = exports.ModalEnclosureComponent = exports.ModalComponent = exports.EmailField = exports.TextField = exports.InputField = exports.ButtonField = exports.ShadowedComponent = exports.FormField = void 0;\nconst qcobjects_1 = require(\"qcobjects\");\nconst org_qcobjects_effects_1 = require(\"./org.qcobjects.effects\");\nconst _top = (typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({})));\n(function (global) {\n class FormField extends qcobjects_1.Component {\n constructor(o) {\n o.name = (typeof o.name !== \"undefined\") ? (o.name) : (\"form-field\");\n super(o);\n this.cached = false;\n this.reload = true;\n }\n createBindingEvents() {\n let _objList;\n if (typeof this.fieldType === \"undefined\" || this.fieldType == null) {\n _objList = this.body.subelements(\"*[data-field]\"); // every child with data-field set\n }\n else {\n _objList = this.body.subelements(this.fieldType + \"[data-field]\"); // every child with data-field set and tagname is equal to fieldType property\n }\n for (let _datak = 0; _datak < _objList.length; _datak++) {\n const _obj = _objList[_datak];\n _obj.addEventListener(\"change\", () => {\n qcobjects_1.logger.debug(\"Executing change event binding\");\n this.executeBindings();\n });\n _obj.addEventListener(\"blur\", () => {\n qcobjects_1.logger.debug(\"Executing change event binding\");\n this.executeBindings();\n });\n _obj.addEventListener(\"focus\", () => {\n qcobjects_1.logger.debug(\"Executing change event binding\");\n this.executeBindings();\n });\n _obj.addEventListener(\"keydown\", () => {\n qcobjects_1.logger.debug(\"Executing keydown event binding\");\n this.executeBindings();\n });\n }\n }\n executeBinding(_obj) {\n const _datamodel = _obj.getAttribute(\"data-field\");\n qcobjects_1.logger.debug(\"Binding \" + _datamodel + \" for \" + this.name);\n this.data[_datamodel] = _obj.value;\n }\n executeBindings() {\n let _objList;\n if (typeof this.fieldType === \"undefined\" || this.fieldType == null) {\n _objList = this.body.subelements(\"*[data-field]\"); // every child with data-field set\n }\n else {\n _objList = this.body.subelements(this.fieldType + \"[data-field]\"); // every child with data-field set and tagname is equal to fieldType property\n }\n for (let _datak = 0; _datak < _objList.length; _datak++) {\n const _obj = _objList[_datak];\n const _datamodel = _obj.getAttribute(\"data-field\");\n qcobjects_1.logger.debug(\"Binding \" + _datamodel + \" for \" + this.name);\n this.data[_datamodel] = _obj.value;\n }\n }\n done(standardResponse) {\n const _ret_ = super.done(standardResponse);\n this.executeBindings();\n this.createBindingEvents();\n qcobjects_1.logger.debug(\"Field loaded: \" + this.fieldType + \"[name=\" + this.name + \"]\");\n return _ret_;\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.base.components\", [\n FormField\n ]);\n class ShadowedComponent extends qcobjects_1.Component {\n constructor(o) {\n o.body = (0, qcobjects_1._DOMCreateElement)(\"div\");\n super(o);\n this.container = null;\n this.shadowed = true;\n this.cached = false;\n this.controller = null;\n this.view = null;\n this.data = {};\n }\n }\n class ButtonField extends FormField {\n constructor(o) {\n o.fieldType = \"button\";\n super(o);\n }\n }\n class InputField extends FormField {\n constructor(o) {\n o.fieldType = \"input\";\n super(o);\n }\n }\n class TextField extends FormField {\n constructor(o) {\n o.fieldType = \"textarea\";\n super(o);\n }\n }\n class EmailField extends FormField {\n constructor(o) {\n o.fieldType = \"input\";\n super(o);\n }\n }\n class ModalEnclosureComponent extends qcobjects_1.Component {\n constructor(o) {\n o.body = (0, qcobjects_1._DOMCreateElement)(\"div\");\n super(o);\n this.name = \"modalenclosure\";\n this.tplsource = \"inline\";\n this.cached = false;\n this.basePath = qcobjects_1.CONFIG.get(\"modalBasePath\", qcobjects_1.CONFIG.get(\"remoteSDKPath\", \"\"));\n this.template = `\n\n\n
        \n\n\n
        \n×\n{{content}}\n
        \n\n
        \n`;\n this.data = {};\n }\n }\n class ModalComponent extends qcobjects_1.Component {\n constructor(o) {\n o.basePath = qcobjects_1.CONFIG.get(\"modalBasePath\", qcobjects_1.CONFIG.get(\"remoteSDKPath\", \"\"));\n super(o);\n this.name = \"modal\";\n this.cached = false;\n this.modalEnclosureComponentClass = \"ModalEnclosureComponent\";\n this.controller = null;\n this.view = null;\n this.tplsource = \"none\";\n this.closeOnClickOutside = false;\n this.data = {\n content: \"\",\n modalId: 0\n };\n this.submodal = null;\n this.data.modalId = this.__instanceID;\n const submodal = (0, qcobjects_1.New)((0, qcobjects_1.ClassFactory)(this.modalEnclosureComponentClass), {\n name: this.name,\n basePath: this.basePath,\n data: this.data\n });\n this.subcomponents.push(submodal);\n this.submodal = submodal;\n if (submodal.tplsource === \"none\") {\n this.body.innerHTML = submodal.parsedAssignmentText;\n }\n else {\n this.body.append(submodal.body);\n }\n }\n modal() {\n const modalId = this.data.modalId;\n (0, qcobjects_1.Tag)(\"#modalInstance_\" + modalId + \".modal\").map((modal) => {\n modal.style.display = \"block\";\n return (new org_qcobjects_effects_1.ModalFade({})).apply(modal, 0, 1);\n });\n (0, qcobjects_1.Tag)(\"#modalInstance_\" + modalId + \".modal .modal-content\").map((modalcontent) => {\n return (new org_qcobjects_effects_1.ModalMoveDown({})).apply(modalcontent, 0, -document.body.clientHeight, 0, 0);\n });\n (0, qcobjects_1.Tag)(\"#modalInstance_\" + modalId + \".modal .modal-content .close\").map((closebtn) => {\n return closebtn.addEventListener(\"click\", () => {\n this.close();\n }, false);\n });\n if (this.closeOnClickOutside) {\n window.addEventListener(\"click\", () => {\n this.close();\n }, false);\n }\n }\n close() {\n const modalId = this.data.modalId;\n (0, qcobjects_1.Tag)(\"#modalInstance_\" + modalId + \".modal\").map((modal) => {\n modal.style.display = \"block\";\n return (new org_qcobjects_effects_1.ModalFade({})).apply(modal, 1, 0);\n });\n (0, qcobjects_1.Tag)(\"#modalInstance_\" + modalId + \".modal .modal-content\").map(function (modalcontent) {\n return (new org_qcobjects_effects_1.ModalMoveUp({})).apply(modalcontent, 0, 0, 0, -document.body.clientHeight);\n });\n setTimeout(function () {\n (0, qcobjects_1.Tag)(\"#modalInstance_\" + modalId + \".modal\").map((modal) => {\n modal.style.display = \"none\";\n return true;\n });\n }, 900);\n }\n rebuild() {\n const _ret_ = super.rebuild();\n this.templateURI = (0, qcobjects_1.ComponentURI)({\n \"COMPONENTS_BASE_PATH\": qcobjects_1.CONFIG.get(\"componentsBasePath\", \"\"),\n \"COMPONENT_NAME\": \"modal\",\n \"TPLEXTENSION\": qcobjects_1.CONFIG.get(\"tplextension\", \"\"),\n \"TPL_SOURCE\": \"default\" // here is always default in order to get the right uri\n });\n return _ret_; // parent call\n }\n }\n class SwaggerUIComponent extends qcobjects_1.Component {\n constructor() {\n super(...arguments);\n this.cached = false;\n this.basePath = qcobjects_1.CONFIG.get(\"remoteSDKPath\", \"\");\n this.tplextension = \"tpl.html\";\n this.name = \"swagger-ui\";\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.form.components\", [\n ShadowedComponent,\n ButtonField,\n InputField,\n TextField,\n EmailField,\n ModalEnclosureComponent,\n ModalComponent,\n SwaggerUIComponent\n ]);\n global.FormField = FormField;\n global.ShadowedComponent = ShadowedComponent;\n global.ButtonField = ButtonField;\n global.InputField = InputField;\n global.TextField = TextField;\n global.EmailField = EmailField;\n global.ModalEnclosureComponent = ModalEnclosureComponent;\n global.ModalComponent = ModalComponent;\n global.SwaggerUIComponent = SwaggerUIComponent;\n})(_top);\nconst FormField = _top.FormField;\nexports.FormField = FormField;\nconst ShadowedComponent = _top.ShadowedComponent;\nexports.ShadowedComponent = ShadowedComponent;\nconst ButtonField = _top.ButtonField;\nexports.ButtonField = ButtonField;\nconst InputField = _top.InputField;\nexports.InputField = InputField;\nconst TextField = _top.TextField;\nexports.TextField = TextField;\nconst EmailField = _top.EmailField;\nexports.EmailField = EmailField;\nconst ModalEnclosureComponent = _top.ModalEnclosureComponent;\nexports.ModalEnclosureComponent = ModalEnclosureComponent;\nconst ModalComponent = _top.ModalComponent;\nexports.ModalComponent = ModalComponent;\nconst SwaggerUIComponent = _top.SwaggerUIComponent;\nexports.SwaggerUIComponent = SwaggerUIComponent;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GridItemComponent = exports.GridComponent = void 0;\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\nconst _top = (typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({})));\n(function (global) {\n \"use strict\";\n class GridItemComponent extends qcobjects_1.Component {\n constructor() {\n super(...arguments);\n this.name = \"grid-item\";\n this.shadowed = true;\n this.tplsource = \"inline\";\n this.template = `\n\n

        {{description}}

        \n`;\n this.cached = false;\n }\n }\n class GridComponent extends qcobjects_1.Component {\n constructor(o) {\n super(o);\n this.name = \"grid\";\n this.cached = false;\n this.view = null;\n this.shadowed = true;\n this.rows = 3;\n this.cols = 3;\n this.templateURI = \"\";\n this.data = {};\n this.tplsource = \"inline\";\n this.template = \"

        Loading...

        \";\n this.body.setAttribute(\"controllerClass\", \"DataGridController\");\n const subcomponentClass = (this.body.getAttribute(\"subcomponentClass\") !== null) ? (this.body.getAttribute(\"subcomponentClass\")) : (\"GridItemComponent\");\n this.body.setAttribute(\"subcomponentClass\", subcomponentClass);\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.components.grid\", [\n GridComponent,\n GridItemComponent\n ]);\n global.GridComponent = GridComponent;\n global.GridItemComponent = GridItemComponent;\n})(_top);\nconst GridComponent = _top.GridComponent;\nexports.GridComponent = GridComponent;\nconst GridItemComponent = _top.GridItemComponent;\nexports.GridItemComponent = GridItemComponent;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ListItemComponent = exports.ListComponent = void 0;\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\nconst _top = (typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({})));\n(function (global) {\n \"use strict\";\n class ListItemComponent extends qcobjects_1.Component {\n constructor(o) {\n o.name = \"list-item\";\n super(o);\n this.shadowed = false;\n this.tplsource = \"inline\";\n this.template = \"{{label}}\";\n this.cached = false;\n }\n }\n class ListComponent extends qcobjects_1.Component {\n constructor(o) {\n o.name = \"list\";\n super(o);\n this.shadowed = true;\n this.tplsource = \"inline\";\n this.template = \"

        Loading...

        \";\n this.body.setAttribute(\"controllerClass\", \"ListController\");\n this.body.setAttribute(\"subcomponentClass\", \"ListItemComponent\");\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.components.list\", [\n ListItemComponent,\n ListComponent\n ]);\n global.ListComponent = ListComponent;\n global.ListItemComponent = ListItemComponent;\n})(_top);\nconst ListComponent = _top.ListComponent;\nexports.ListComponent = ListComponent;\nconst ListItemComponent = _top.ListItemComponent;\nexports.ListItemComponent = ListItemComponent;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.components.slider\", [\n class SlideListComponent extends qcobjects_1.Component {\n constructor(o) {\n super(o);\n this.tplsource = \"inline\";\n this.template = \"

        Loading...

        \";\n this.name = \"slidelist\";\n this.body.setAttribute(\"controllerClass\", \"DataGridController\");\n const subcomponentClass = (this.body.getAttribute(\"subcomponentClass\") !== null) ? (this.body.getAttribute(\"subcomponentClass\")) : (\"GridItemComponent\");\n this.body.setAttribute(\"subcomponentClass\", subcomponentClass);\n }\n },\n class SlideItemComponent extends qcobjects_1.Component {\n constructor(o) {\n super(o);\n this.effectClass = \"Fade\";\n this.name = \"slider_item\";\n this.data.slideNumber = this.data.__dataIndex + 1;\n this.template = `\n
        \n
        {{slideNumber}} / {{__dataLength}}
        \n \"{{title}}\"/\n
        \n

        {{label}} {{category}}

        \n
        \n
        \n `;\n this.tplsource = \"inline\";\n }\n },\n class SliderComponent extends qcobjects_1.Component {\n constructor(o) {\n super(o);\n this.name = \"slider\";\n this.template = `\n \n \n
        \n \n \n \n \n
        \n
        \n \n
        \n
        \n \n `;\n this.tplsource = \"inline\";\n this.shadowed = true;\n this.data.SERVICE_CLASS = this.body.getAttribute(\"serviceClass\");\n this.data.sliderHandler = \"slider_\" + this.__instanceID.toString();\n this.body.setAttribute(\"controllerClass\", \"SliderController\");\n }\n }\n ]);\n})();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\nconst org_qcobjects_effects_1 = require(\"./org.qcobjects.effects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n(function () {\n \"use strict\";\n class NotificationComponent extends qcobjects_1.Component {\n constructor(o) {\n o.name = \"notification\";\n o.body = (0, qcobjects_1._DOMCreateElement)(\"div\");\n super(o);\n this.cached = false;\n this.tplsource = \"inline\";\n this.shadowed = false;\n this.template = `\n \n
        \n
        \n

        {{title}} {{message}}

        \n
        \n
        \n `;\n this.kinds = [\"danger\", \"success\", \"info\", \"warning\"];\n }\n display(element) {\n const _display_ = function (element) {\n element.style.display = \"block\";\n const appearEffect = (0, qcobjects_1.New)(org_qcobjects_effects_1.Move, {\n duration: 900,\n apply(element) {\n (0, qcobjects_1._super_)(\"Fade\", \"apply\").call(this, element, 0, 1);\n (0, qcobjects_1._super_)(\"Move\", \"apply\").call(this, element, 0, -document.body.clientHeight, 0, 0);\n }\n });\n const disappearEffect = (0, qcobjects_1.New)(org_qcobjects_effects_1.Move, {\n duration: 650,\n apply(element) {\n (0, qcobjects_1._super_)(\"Fade\", \"apply\").call(this, element, 1, 0);\n (0, qcobjects_1._super_)(\"Move\", \"apply\").call(this, element, 0, 0, 0, -document.body.clientHeight);\n }\n });\n appearEffect.apply(element);\n setTimeout(function () {\n disappearEffect.apply(element);\n }, 2000);\n };\n element.subelements(\"div.notification_background\").map(element => (0, qcobjects_1.New)(org_qcobjects_effects_1.Fade, { duration: 500 }).apply(element, 0, 1));\n element.subelements(\"div.notification\").map(element => _display_(element));\n setTimeout(function () {\n element.remove();\n }, 2200);\n }\n static success(message) {\n const c = (0, qcobjects_1.New)(NotificationComponent, {\n name: \"notification\",\n shadowed: true,\n body: (0, qcobjects_1._DOMCreateElement)(\"div\"),\n data: {\n kind: \"success\",\n title: \"Success!\",\n message: `${message}...`\n }\n });\n document.body.append(c);\n const _componentRoot = (c.shadowed) ? (c.shadowRoot.host) : (c.body);\n c.display(_componentRoot);\n }\n static danger(message) {\n const c = (0, qcobjects_1.New)(NotificationComponent, {\n name: \"notification\",\n shadowed: true,\n body: (0, qcobjects_1._DOMCreateElement)(\"div\"),\n data: {\n kind: \"danger\",\n title: \"Danger!\",\n message: `${message}...`\n }\n });\n document.body.append(c);\n const _componentRoot = (c.shadowed) ? (c.shadowRoot.host) : (c.body);\n c.display(_componentRoot);\n }\n static info(message) {\n const c = (0, qcobjects_1.New)(NotificationComponent, {\n name: \"notification\",\n shadowed: true,\n body: (0, qcobjects_1._DOMCreateElement)(\"div\"),\n data: {\n kind: \"info\",\n title: \"Info!\",\n message: `${message}...`\n }\n });\n document.body.append(c);\n const _componentRoot = (c.shadowed) ? (c.shadowRoot.host) : (c.body);\n c.display(_componentRoot);\n }\n static warning(message) {\n const c = (0, qcobjects_1.New)(NotificationComponent, {\n name: \"notification\",\n shadowed: true,\n body: (0, qcobjects_1._DOMCreateElement)(\"div\"),\n data: {\n kind: \"warning\",\n title: \"Warning!\",\n message: `${message}...`\n }\n });\n document.body.append(c);\n const _componentRoot = (c.shadowed) ? (c.shadowRoot.host) : (c.body);\n c.display(_componentRoot);\n }\n }\n (0, qcobjects_1.Package)(\"org.quickcorp.components.notifications\", [\n NotificationComponent\n ]);\n})();\n", "\"use strict\";\n/**\n * QCObjects SDK 2.4.0\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CubeSplashScreenComponent = exports.VideoSplashScreenComponent = exports.SplashScreenComponent = void 0;\nconst qcobjects_1 = require(\"qcobjects\");\nconst org_qcobjects_effects_1 = require(\"./org.qcobjects.effects\");\nconst _top = (typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({})));\n// eslint-disable-next-line camelcase\n(function __splash_screen__(global) {\n \"use strict\";\n class SplashScreenComponent extends qcobjects_1.Component {\n constructor(component) {\n component.name = (typeof component.name === \"undefined\") ? (\"splashscreen\") : (component.name);\n const isBrowser = typeof window !== \"undefined\" && typeof window.self !== \"undefined\" && window === window.self;\n const isStartURL = (location.hash === \"\"\n && location.pathname === \"/\" && location.search === \"\")\n || qcobjects_1.CONFIG.get(\"routingWay\", \"pathname\") === \"hash\" && qcobjects_1.CONFIG.get(\"start_url\", \"/\") === location.hash\n || qcobjects_1.CONFIG.get(\"routingWay\", \"pathname\") === \"pathname\" && qcobjects_1.CONFIG.get(\"start_url\", \"/\") === location.pathname\n || qcobjects_1.CONFIG.get(\"routingWay\", \"pathname\") === \"search\" && qcobjects_1.CONFIG.get(\"start_url\", \"/\") === location.search;\n const _enabled_ = isBrowser && isStartURL;\n if (_enabled_) {\n component.basePath = qcobjects_1.CONFIG.get(\"splashscreenBasePath\", qcobjects_1.CONFIG.get(\"remoteSDKPath\", \"\"));\n if (typeof component.data === \"undefined\") {\n component.data = {};\n }\n component.data.basePath = component.basePath;\n }\n else {\n if (typeof component !== \"undefined\" && typeof component.body !== \"undefined\") {\n component.body.style.display = \"none\";\n }\n }\n super(component);\n this.cached = false;\n this.shadowed = true;\n this._bgcolor = \"\";\n this._enabled_ = _enabled_;\n if (this._enabled_) {\n const displayEffectDuration = 1000;\n let duration = this.body.getAttribute(\"duration\");\n if (duration === null) {\n duration = displayEffectDuration;\n }\n else {\n duration = parseInt(duration.toString());\n }\n this._bgcolor = this.body.style.backgroundColor;\n const _helper_ = () => {\n setTimeout(() => {\n if (!_helper_.executed) {\n const _componentRoot = (this.shadowed) ? this.shadowRoot?.host : this.body;\n if (typeof global.componentsStack !== \"undefined\") {\n global.componentsStack.filter((c) => c.body.hasAttribute(\"splashscreen\")).map((mainComponent) => {\n qcobjects_1.logger.debug(`Splash Screen of Main Component: ${mainComponent.name}`);\n mainComponent.splashScreenComponent = this;\n const SplashScreenHandler = () => {\n if (!SplashScreenHandler.executed) {\n const component = mainComponent.splashScreenComponent;\n const mainElement = (mainComponent.shadowed) ? mainComponent.shadowRoot?.host : mainComponent.body;\n mainComponent._mainPosition = mainElement.style.position;\n if (typeof mainElement !== \"undefined\") {\n mainElement.style.position = \"fixed\";\n }\n mainComponent._mainOpacity = mainElement.style.opacity;\n _componentRoot.style.width = \"100%\";\n _componentRoot.style.height = \"100%\";\n document.body.style.backgroundColor = \"#111111\";\n mainElement.style.opacity = \"0\";\n setTimeout(function () {\n if (typeof _componentRoot !== \"undefined\") {\n document.body.style.backgroundColor = component?._bgcolor;\n _componentRoot.subelements(\"#slot-logo\").map((slotlogo) => {\n slotlogo.style.display = \"block\";\n slotlogo.style.transformOrigin = \"center\";\n return (new org_qcobjects_effects_1.Resize()).apply(slotlogo, 1, 0);\n });\n (new org_qcobjects_effects_1.Fade()).apply(_componentRoot, 1, 0);\n }\n }, (duration - displayEffectDuration));\n setTimeout(function () {\n (new org_qcobjects_effects_1.Fade()).apply(mainElement, 0, 1);\n mainElement.style.position = mainComponent._mainPosition;\n document.body.style.backgroundColor = component._bgcolor;\n if (_componentRoot.parentElement !== null) {\n _componentRoot.parentElement.remove();\n }\n }, duration);\n }\n SplashScreenHandler.executed = true;\n };\n return mainComponent.addComponentHelper(SplashScreenHandler.bind(mainComponent));\n });\n }\n _helper_.executed = true;\n }\n });\n };\n _helper_.executed = false;\n this.addComponentHelper(_helper_.bind(component));\n }\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.components.base\", [\n SplashScreenComponent\n ]);\n class VideoSplashScreenComponent extends SplashScreenComponent {\n constructor(o) {\n o.name = \"videosplashscreen\";\n super(o);\n this.cached = false;\n this.shadowed = true;\n this.tplsource = \"inline\";\n this.template = `\n \n
        \n
        \n \n \n
        \n
        \n\n `;\n }\n }\n class CubeSplashScreenComponent extends SplashScreenComponent {\n constructor(o) {\n o.name = \"cubesplashscreen\";\n super(o);\n this.cached = false;\n this.shadowed = true;\n this.tplsource = \"inline\";\n this.template = `\n \n\n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n
        \n\n `;\n }\n }\n (0, qcobjects_1.Package)(\"org.qcobjects.components.splashscreen\", [\n VideoSplashScreenComponent,\n CubeSplashScreenComponent\n ]);\n})(_top);\nconst SplashScreenComponent = _top.SplashScreenComponent;\nexports.SplashScreenComponent = SplashScreenComponent;\nconst VideoSplashScreenComponent = _top.VideoSplashScreenComponent;\nexports.VideoSplashScreenComponent = VideoSplashScreenComponent;\nconst CubeSplashScreenComponent = _top.CubeSplashScreenComponent;\nexports.CubeSplashScreenComponent = CubeSplashScreenComponent;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.controllers\", [\n class GenericController extends qcobjects_1.Controller {\n }\n ]);\n})();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.controllers.grid\", [\n class GridController extends qcobjects_1.Controller {\n constructor(controller) {\n super(controller);\n this.rows = this.component.body.getAttribute(\"rows\");\n this.rows = (this.rows !== null) ? (this.rows) : (this.component.rows);\n this.cols = this.component.body.getAttribute(\"cols\");\n this.cols = (this.cols !== null) ? (this.cols) : (this.component.cols);\n }\n cssGrid() {\n const component = this.component;\n const _componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n if (typeof this.rows !== \"undefined\" && typeof this.cols !== \"undefined\") {\n const s = (0, qcobjects_1._DOMCreateElement)(\"style\");\n const templateRows = \"auto \".repeat(this.rows);\n const templateCols = \"auto \".repeat(this.cols);\n const className = \"grid\" + this.__instanceID.toString();\n s.innerHTML = `.${className}{\n display: grid; \\\n grid-template-rows: ${templateRows}; \\\n grid-template-columns: ${templateCols}; \\\n margin:0 auto; \\\n }`;\n _componentRoot?.append(s);\n if (component.shadowed) {\n _componentRoot?.host.classList.add(className);\n }\n else {\n (_componentRoot.classList).add(className);\n }\n }\n }\n done() {\n this.cssGrid();\n qcobjects_1.logger.debug(\"GridComponent built\");\n }\n },\n class DataGridController extends qcobjects_1.Controller {\n constructor(controller) {\n super(controller);\n this._componentRoot = (controller.component.shadowed) ? (controller.component.shadowRoot) : (controller.component.body);\n this.rows = controller.component.body.getAttribute(\"rows\");\n this.rows = (controller.rows !== null) ? (controller.rows) : (controller.component.rows);\n this.cols = controller.component.body.getAttribute(\"cols\");\n this.cols = (controller.cols !== null) ? (controller.cols) : (controller.component.cols);\n qcobjects_1.logger.debug(\"DataGridController INIT\");\n }\n getPageIndex(page, totalPage, totalElements) {\n page = (page > 0) ? (page - 1) : (0);\n return [totalElements * page / totalPage, (totalElements * page / totalPage) + totalElements / totalPage];\n }\n addSubcomponents() {\n this.component.subcomponents = [];\n if (typeof this._componentRoot !== \"undefined\") {\n this._componentRoot.innerHTML = \"\";\n }\n this.cssGrid();\n qcobjects_1.logger.debug((0, qcobjects_1._DataStringify)(this.component.data));\n try {\n const subcomponentClass = this.component.body.getAttribute(\"subcomponentClass\");\n if (subcomponentClass != null) {\n let offset;\n let limit;\n let pagesNumber;\n let list = [...this.component.data];\n let paginateIn = this.component.body.getAttribute(\"paginate-in\");\n let page;\n paginateIn = (paginateIn !== null) ? (paginateIn) : (\"client\");\n if (paginateIn === \"client\") {\n page = this.component.body.getAttribute(\"page-number\");\n page = (isNaN(page) || page === null) ? (-1) : (page);\n if (page !== -1) {\n pagesNumber = this.component.body.getAttribute(\"total-pages\");\n pagesNumber = (isNaN(pagesNumber)) ? (1) : (pagesNumber);\n offset = this.getPageIndex(page, pagesNumber, list.length)[0];\n limit = this.getPageIndex(page, pagesNumber, list.length)[1];\n }\n else {\n offset = 0;\n limit = list.length;\n pagesNumber = 1;\n }\n list = list.slice(offset, limit);\n }\n else {\n offset = 0;\n limit = list.length;\n pagesNumber = 1;\n }\n list.map((record, dataIndex, list) => {\n const _ret_ = undefined;\n try {\n const _body = (0, qcobjects_1._DOMCreateElement)(\"component\");\n _body.setAttribute(\"name\", (0, qcobjects_1.ClassFactory)(subcomponentClass).name);\n _body.setAttribute(\"shadowed\", (0, qcobjects_1.ClassFactory)(subcomponentClass).shadowed);\n _body.setAttribute(\"cached\", (0, qcobjects_1.ClassFactory)(subcomponentClass).cached);\n record = Object.assign(record, {\n __dataIndex: dataIndex,\n __dataLength: list.length,\n __page: page,\n __totalPages: pagesNumber,\n __limit: limit,\n __offset: offset\n });\n const subcomponent = (0, qcobjects_1.New)((0, qcobjects_1.ClassFactory)(subcomponentClass), {\n name: \"item\",\n data: record,\n templateURI: (0, qcobjects_1.ComponentURI)({\n \"COMPONENTS_BASE_PATH\": qcobjects_1.CONFIG.get(\"componentsBasePath\", \"\"),\n \"COMPONENT_NAME\": (0, qcobjects_1.ClassFactory)(subcomponentClass).name,\n \"TPLEXTENSION\": qcobjects_1.CONFIG.get(\"tplextension\", \"\"),\n \"TPL_SOURCE\": (0, qcobjects_1.ClassFactory)(subcomponentClass).tplsource\n }),\n body: _body,\n template: (0, qcobjects_1.ClassFactory)(subcomponentClass).template\n });\n subcomponent.done = this.component.done.bind(subcomponent);\n try {\n if (subcomponent) {\n subcomponent.data.__dataIndex = dataIndex;\n if (Object.hasOwnProperty.call(this.component.data, \"length\")) {\n subcomponent.data.__dataLength = this.component.data.length;\n }\n qcobjects_1.logger.debug(\"adding subcomponent to body\");\n this._componentRoot?.append(subcomponent.body);\n try {\n this.component.subcomponents.push(subcomponent);\n }\n catch (e) {\n qcobjects_1.logger.debug(\"ERROR LOADING SUBCOMPONENT IN DATAGRID\");\n }\n }\n else {\n qcobjects_1.logger.debug(\"ERROR LOADING SUBCOMPONENT IN DATAGRID\");\n }\n }\n catch (e) {\n qcobjects_1.logger.debug(\"ERROR LOADING SUBCOMPONENT IN DATAGRID\");\n }\n }\n catch (e) {\n qcobjects_1.logger.debug(\"ERROR LOADING SUBCOMPONENT IN DATAGRID\");\n }\n return _ret_;\n });\n }\n else {\n qcobjects_1.logger.debug(\"NO SUBCOMPONENT CLASS IN COMPONENT\");\n }\n }\n catch (e) {\n qcobjects_1.logger.debug(\"No data for component\");\n }\n }\n cssGrid() {\n const component = this.component;\n const _componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n if (typeof this.rows !== \"undefined\" && typeof this.cols !== \"undefined\") {\n const s = (0, qcobjects_1._DOMCreateElement)(\"style\");\n const templateRows = \"auto \".repeat(this.rows);\n const templateCols = \"auto \".repeat(this.cols);\n const className = \"grid\" + this.__instanceID.toString();\n s.innerHTML = `.${className}{\n display: grid; \\\n grid-template-rows: ${templateRows}; \\\n grid-template-columns: ${templateCols}; \\\n margin:0 auto; \\\n }`;\n if (component.shadowed) {\n component.body.append(s);\n _componentRoot.host.classList.add(className);\n }\n else {\n _componentRoot?.append(s);\n _componentRoot.classList.add(className);\n }\n }\n }\n done() {\n const componentInstance = this.component;\n qcobjects_1.logger.debug(\"DataGridController DONE\");\n const serviceClass = this.component.body.getAttribute(\"serviceClass\");\n if (serviceClass != null) {\n let offset;\n let limit;\n let paginateIn = componentInstance.body.getAttribute(\"paginate-in\");\n paginateIn = (paginateIn !== null) ? (paginateIn) : (\"client\");\n if (paginateIn === \"server\") {\n let page = componentInstance.body.getAttribute(\"page-number\");\n page = (isNaN(page) || page === null) ? (-1) : (page);\n let pagesNumber;\n if (page !== -1) {\n const serverDataCount = (this.component.body.getAttribute(\"server-data-count\") !== null) ? this.component.body.getAttribute(\"server-data-count\") : (1);\n pagesNumber = this.component.body.getAttribute(\"total-pages\");\n pagesNumber = (isNaN(pagesNumber)) ? (1) : (pagesNumber);\n offset = this.getPageIndex(page, pagesNumber, serverDataCount)[0];\n limit = this.getPageIndex(page, pagesNumber, serverDataCount)[1];\n // send params in jsonrpc 2.0 style\n componentInstance.serviceData = (typeof componentInstance.serviceData !== \"undefined\") ? (componentInstance.serviceData) : ({});\n componentInstance.serviceData.params = (typeof componentInstance.serviceData.params !== \"undefined\") ? (componentInstance.serviceData.params) : ({});\n componentInstance.serviceData.params.offset = offset;\n componentInstance.serviceData.params.limit = limit;\n }\n }\n (0, qcobjects_1.serviceLoader)((0, qcobjects_1.New)((0, qcobjects_1.ClassFactory)(serviceClass), {\n data: componentInstance.serviceData\n }), false).then((successfulResponse) => {\n // This will show the service response as a plain text\n qcobjects_1.logger.debug(\"DONE SERVICE COMPONENT\");\n successfulResponse.service.JSONresponse = JSON.parse(successfulResponse.service.template);\n if (typeof successfulResponse.service.JSONresponse.result !== \"undefined\") {\n qcobjects_1.logger.debug((0, qcobjects_1._DataStringify)(successfulResponse.service.JSONresponse.result));\n componentInstance.data = successfulResponse.service.JSONresponse.result;\n }\n else {\n componentInstance.data = successfulResponse.service.JSONresponse;\n }\n this.addSubcomponents();\n }, (failedResponse) => {\n qcobjects_1.logger.debug(failedResponse);\n }).catch((e) => {\n qcobjects_1.logger.debug(\"Something went wrong when calling the service from: \" + serviceClass);\n qcobjects_1.logger.debug(e.message);\n });\n }\n }\n }\n ]);\n})();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.controllers.list\", [\n class ListController extends qcobjects_1.Controller {\n constructor({ component, dependencies = [], valueField = undefined, labelField = undefined }) {\n super({ component, dependencies, valueField, labelField });\n this.component = component;\n this._componentRoot = (this.component.shadowed) ? (this.component.shadowRoot) : (this.component.body);\n this.labelField = this.component.body.getAttribute(\"label-field\");\n this.valueField = this.component.body.getAttribute(\"value-field\");\n this.rows = this.component.body.getAttribute(\"rows\");\n this.rows = (this.rows !== null) ? (this.rows) : (this.component.rows);\n this.cols = 1;\n qcobjects_1.logger.debug(\"ListController INIT\");\n }\n getPageIndex(page, totalPage, totalElements) {\n page = (page > 0) ? (page - 1) : (0);\n return [totalElements * page / totalPage, (totalElements * page / totalPage) + totalElements / totalPage];\n }\n addSubcomponents() {\n this.component.subcomponents = [];\n const layout = this.component.body.getAttribute(\"layout\");\n const basePath = qcobjects_1.CONFIG.get(\"listBasePath\", qcobjects_1.CONFIG.get(\"remoteSDKPath\", \"\"));\n let cssLayout = \"\";\n this.labelField = this.component.body.getAttribute(\"label-field\");\n this.valueField = this.component.body.getAttribute(\"value-field\");\n if (layout === \"horizontal\") {\n cssLayout = `@import url(\"${basePath}css/components/horizontal-list.css\");`;\n }\n else {\n cssLayout = `@import url(\"${basePath}css/components/list.css\");`;\n }\n if (typeof this._componentRoot !== \"undefined\") {\n this._componentRoot.innerHTML = `
          `;\n }\n qcobjects_1.logger.debug((0, qcobjects_1._DataStringify)(this.component.data));\n try {\n const subcomponentClass = this.component.body.getAttribute(\"subcomponentClass\");\n if (subcomponentClass != null) {\n let offset;\n let limit;\n let pagesNumber;\n let list = [...this.component.data];\n let paginateIn = this.component.body.getAttribute(\"paginate-in\");\n paginateIn = (paginateIn !== null) ? (paginateIn) : (\"client\");\n let page;\n if (paginateIn === \"client\") {\n page = this.component.body.getAttribute(\"page-number\");\n page = (isNaN(page) || page === null) ? (-1) : (page);\n if (page !== -1) {\n pagesNumber = this.component.body.getAttribute(\"total-pages\");\n pagesNumber = (isNaN(pagesNumber)) ? (1) : (pagesNumber);\n offset = this.getPageIndex(page, pagesNumber, list.length)[0];\n limit = this.getPageIndex(page, pagesNumber, list.length)[1];\n }\n else {\n offset = 0;\n limit = list.length;\n pagesNumber = 1;\n }\n list = list.slice(offset, limit);\n }\n else {\n offset = 0;\n limit = list.length;\n pagesNumber = 1;\n }\n list.map((record, dataIndex) => {\n const _ret_ = undefined;\n try {\n const _body = (0, qcobjects_1._DOMCreateElement)(\"li\");\n record.label = record[this.labelField];\n record.value = record[this.valueField];\n const subcomponent = (0, qcobjects_1.New)((0, qcobjects_1.ClassFactory)(subcomponentClass), {\n name: \"list-item\",\n data: {\n label: record[this.labelField],\n value: record[this.valueField],\n __dataIndex: dataIndex,\n __page: page,\n __totalPages: pagesNumber,\n __limit: limit,\n __offset: offset\n },\n templateURI: (0, qcobjects_1.ComponentURI)({\n \"COMPONENTS_BASE_PATH\": qcobjects_1.CONFIG.get(\"componentsBasePath\", \"\"),\n \"COMPONENT_NAME\": (0, qcobjects_1.ClassFactory)(subcomponentClass).name,\n \"TPLEXTENSION\": qcobjects_1.CONFIG.get(\"tplextension\", \"\"),\n \"TPL_SOURCE\": (0, qcobjects_1.ClassFactory)(subcomponentClass).tplsource\n }),\n body: _body,\n template: (0, qcobjects_1.ClassFactory)(subcomponentClass).template\n });\n subcomponent.done = this.component.done.bind(subcomponent);\n try {\n if (subcomponent) {\n subcomponent.data.__dataIndex = dataIndex;\n if (Object.hasOwnProperty.call(this.component.data, \"length\")) {\n subcomponent.data.__dataLength = this.component.data.length;\n }\n qcobjects_1.logger.debug(\"adding subcomponent to body\");\n this._componentRoot.subelements(\"ul\").map(ul => ul.append(subcomponent));\n try {\n this.component.subcomponents.push(subcomponent);\n }\n catch (e) {\n qcobjects_1.logger.debug(\"ERROR LOADING SUBCOMPONENT IN DATAGRID\");\n }\n }\n else {\n qcobjects_1.logger.debug(\"ERROR LOADING SUBCOMPONENT IN DATAGRID\");\n }\n }\n catch (e) {\n qcobjects_1.logger.debug(\"ERROR LOADING SUBCOMPONENT IN DATAGRID\");\n }\n }\n catch (e) {\n qcobjects_1.logger.debug(\"ERROR LOADING SUBCOMPONENT IN DATAGRID\");\n }\n return _ret_;\n });\n }\n else {\n qcobjects_1.logger.debug(\"NO SUBCOMPONENT CLASS IN COMPONENT\");\n }\n }\n catch (e) {\n qcobjects_1.logger.debug(\"No data for component\");\n }\n }\n cssGrid() {\n const component = this.component;\n const _componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n if (typeof this.rows !== \"undefined\" && typeof this.cols !== \"undefined\") {\n const s = (0, qcobjects_1._DOMCreateElement)(\"style\");\n const templateRows = \"auto \".repeat(this.rows);\n const templateCols = \"auto \".repeat(this.cols);\n const className = \"grid\" + this.__instanceID.toString();\n s.innerHTML = `.${className}{\n display: grid; \\\n grid-template-rows: ${templateRows}; \\\n grid-template-columns: ${templateCols}; \\\n margin:0 auto; \\\n }`;\n _componentRoot.append(s);\n _componentRoot.classList.add(className);\n }\n }\n done() {\n this.cssGrid();\n const componentInstance = this.component;\n qcobjects_1.logger.debug(\"ListController DONE\");\n const serviceClass = this.component.body.getAttribute(\"serviceClass\");\n if (serviceClass != null) {\n let offset;\n let limit;\n let paginateIn = componentInstance.body.getAttribute(\"paginate-in\");\n paginateIn = (paginateIn !== null) ? (paginateIn) : (\"client\");\n if (paginateIn === \"server\") {\n let page = componentInstance.body.getAttribute(\"page-number\");\n page = (isNaN(page) || page === null) ? (-1) : (page);\n let pagesNumber;\n if (page !== -1) {\n const serverDataCount = (this.component.body.getAttribute(\"server-data-count\") !== null) ? (this.component.body.getAttribute(\"server-data-count\")) : (1);\n pagesNumber = this.component.body.getAttribute(\"total-pages\");\n pagesNumber = (isNaN(pagesNumber)) ? (1) : (pagesNumber);\n offset = this.getPageIndex(page, pagesNumber, serverDataCount)[0];\n limit = this.getPageIndex(page, pagesNumber, serverDataCount)[1];\n // send params in jsonrpc 2.0 style\n componentInstance.serviceData = (typeof componentInstance.serviceData !== \"undefined\") ? (componentInstance.serviceData) : ({});\n componentInstance.serviceData.params = (typeof componentInstance.serviceData.params !== \"undefined\") ? (componentInstance.serviceData.params) : ({});\n componentInstance.serviceData.params.offset = offset;\n componentInstance.serviceData.params.limit = limit;\n }\n }\n (0, qcobjects_1.serviceLoader)((0, qcobjects_1.New)((0, qcobjects_1.ClassFactory)(serviceClass), {\n data: componentInstance.serviceData\n }), false).then((successfulResponse) => {\n // This will show the service response as a plain text\n qcobjects_1.logger.debug(\"DONE SERVICE COMPONENT\");\n successfulResponse.service.JSONresponse = JSON.parse(successfulResponse.service.template);\n if (typeof successfulResponse.service.JSONresponse.result !== \"undefined\") {\n qcobjects_1.logger.debug((0, qcobjects_1._DataStringify)(successfulResponse.service.JSONresponse.result));\n componentInstance.data = successfulResponse.service.JSONresponse.result;\n }\n else {\n componentInstance.data = successfulResponse.service.JSONresponse;\n }\n this.addSubcomponents();\n }, (failedResponse) => {\n qcobjects_1.logger.debug(failedResponse);\n }).catch((e) => {\n qcobjects_1.logger.debug(\"Something went wrong when calling the service from: \" + serviceClass);\n qcobjects_1.logger.debug(e.message);\n });\n }\n }\n }\n ]);\n})();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n(function (global) {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.controllers.slider\", [\n class SliderController extends qcobjects_1.Controller {\n constructor({ component, dependencies = [], duration = 7100, slideIndex = 0, interval = null, sliderHandlerName = null }) {\n super({ component, dependencies, duration, slideIndex, interval, sliderHandlerName });\n this.slideIndex = 0;\n this.duration = 7100;\n this.interval = null;\n this.sliderHandlerName = \"\";\n this.component = component;\n this._componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n this.sliderHandlerName = \"slider_\" + this.component.__instanceID.toString();\n global.set(this.sliderHandlerName, this);\n }\n stop() {\n if (this.interval != null) {\n clearInterval(this.interval);\n }\n }\n plusSlidesAndStop(n) {\n this.stop();\n this.plusSlides(n);\n }\n plusSlides(n) {\n this.showSlides(this.slideIndex += n);\n }\n currentSlide(n) {\n this.stop();\n this.showSlides(this.slideIndex = n);\n }\n automate() {\n this.interval = setInterval(() => {\n this.plusSlides(1);\n }, this.duration);\n }\n showSlides(n) {\n const slides = this._componentRoot?.subelements(\".qcoSlides\");\n const dots = this._componentRoot?.subelements(\".qcoSlider__dots--dot\");\n if (n > (slides.length - 1)) {\n this.slideIndex = 0;\n }\n if (n < 0) {\n this.slideIndex = 0;\n }\n slides.filter((slide, index) => { return index !== this.slideIndex; }).map((slide) => {\n return ((0, qcobjects_1.New)((0, qcobjects_1.ClassFactory)(\"Fade\"), {})).apply(slide, 1, 0);\n });\n dots.filter((dot, index) => { return index !== this.slideIndex; }).map((dot) => {\n return dot.classList.remove(\"active\");\n });\n try {\n dots[this.slideIndex].classList.add(\"active\");\n }\n catch (e) {\n qcobjects_1.logger.debug(`Something went wrong when trying to activate a slide: ${this.slideIndex} - ${e.message}`);\n }\n setTimeout(() => {\n slides.filter((slide, index) => { return index !== this.slideIndex; }).map((slide) => {\n slide.style.display = \"none\";\n return slide.style.display;\n });\n try {\n slides[this.slideIndex].style.display = \"block\";\n ((0, qcobjects_1.New)((0, qcobjects_1.ClassFactory)(\"Fade\"), {})).apply(slides[this.slideIndex], 0, 1);\n }\n catch (e) {\n qcobjects_1.logger.debug(`Something went wrong when trying to show a slide: ${this.slideIndex} - ${e.message}`);\n }\n }, 700);\n }\n fillDots() {\n const slides = this._componentRoot?.subelements(\".qcoSlides\");\n slides.map((slide, index) => {\n const dotHTML = document.createElement(\"span\");\n const dotContent = ``;\n dotHTML.innerHTML = dotContent;\n return this._componentRoot?.subelements(\".qcoSlider__dots\")[0].append(dotHTML);\n });\n }\n done() {\n const slides = this._componentRoot?.subelements(\".qcoSlides\");\n slides.filter((slide, index) => { return index !== this.slideIndex; }).map((slide) => {\n slide.style.display = \"none\";\n return slide.style.display;\n });\n setTimeout(() => {\n this.fillDots();\n this.slideIndex = 0;\n this.showSlides(this.slideIndex);\n this.automate();\n }, 3000);\n }\n }\n ]);\n})((typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({}))));\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\nconst org_qcobjects_components_1 = require(\"./org.qcobjects.components\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.controllers.form\", [\n class FormValidations extends qcobjects_1.Controller {\n getDefault() {\n return function (fieldName, dataValue, element) {\n const _regex = {\n name: \"^[a-zA-Z]+(([',. -][a-zA-Z ])?[a-zA-Z]*)*$\",\n email: \"^([A-Za-z0-9]+)@([A-Za-z0-9]+).([A-Za-z0-9]+)$\"\n };\n const _pattern_ = (element.getAttribute(\"pattern\") || _regex[fieldName]);\n const pattern = new RegExp(_pattern_);\n return pattern.test(dataValue);\n };\n }\n },\n class FormController extends qcobjects_1.Controller {\n hasValidation(element) {\n const fieldName = element.getAttribute(\"data-field\");\n let _hasValidation = false;\n if (typeof this.validations !== \"undefined\"\n && Object.hasOwnProperty.call(this.validations, fieldName)) {\n _hasValidation = true;\n }\n return _hasValidation;\n }\n isInvalid(element) {\n let _isInvalid = false;\n const fieldName = element.getAttribute(\"data-field\");\n const dataValue = this.component.data[fieldName];\n const _execValidation = (fieldName, dataValue, element) => {\n return (typeof this.validations !== \"undefined\"\n && Object.hasOwnProperty.call(this.validations, fieldName)\n && this.validations[fieldName].call(null, fieldName, dataValue, element));\n };\n if (typeof this.validations !== \"undefined\" && (!_execValidation(fieldName, dataValue, element))) {\n _isInvalid = true;\n }\n return _isInvalid;\n }\n isValid(element) {\n return !this.isInvalid(element);\n }\n save() {\n if (this.serviceClass !== \"\") {\n location.href = this.formSettings.loadingRouting;\n (0, qcobjects_1.serviceLoader)((0, qcobjects_1.New)((0, qcobjects_1.ClassFactory)(this.serviceClass), {\n data: this.component.data\n }), false).then((successfulResponse) => {\n // This will show the service response as a plain text\n console.log(\"DONE SERVICE COMPONENT\");\n try {\n console.log(successfulResponse.service.JSONresponse);\n }\n catch (e) {\n // no json\n }\n location.href = this.formSettings.nextRouting;\n }, (failedResponse) => {\n qcobjects_1.logger.debug(failedResponse);\n location.href = this.formSettings.backRouting;\n });\n }\n else {\n qcobjects_1.logger.debug(\"No service name declared on serviceClass property\");\n }\n }\n formSaveTouchHandler() {\n qcobjects_1.logger.debug(\"Saving data...\");\n const _componentRoot_ = (this.component.shadowed) ? ((this.component?.shadowRoot).host) : (this.component.body);\n this.component.executeBindings();\n if (this.formValidatorModal != null) {\n const componentElementFields = _componentRoot_.subelements(\"*[data-field]\");\n const fieldsToValidate = componentElementFields.filter(f => this.hasValidation(f));\n const _labelledby = function (parentElement, element) {\n const _arialabelledby = (parentElement, element) => {\n return (element.getAttribute(\"aria-labelledby\") !== null) ? ((element.getAttribute(\"aria-labelledby\") || \"\").split(\" \").map(e => parentElement.subelements(`#${e}`).map(_e => _e.innerHTML)).join(\" \")) : (null);\n };\n return (_arialabelledby(parentElement, element)\n || element.getAttribute(\"aria-label\")\n || element.getAttribute(\"placeholder\")\n || element.getAttribute(\"name\")\n || element.getAttribute(\"data-field\"));\n };\n const _ariatitle = function (element) {\n return (element.getAttribute(\"title\") || element.getAttribute(\"aria-title\") || \"\");\n };\n const invalidFields = fieldsToValidate.filter(f => this.isInvalid(f));\n if (invalidFields.length > 0) {\n const validationMessage = `\n
          \n Please verify the following incorrect fields:\n
            \n
            \n ${invalidFields.map(element => \"
          • \" + _labelledby(_componentRoot_, element) + \"
            \" + _ariatitle(element) + \"
          • \").join(\"\")}\n
            \n
          \n
          \n`;\n this.formValidatorModal.body.subelements(\".validationMessage\")[0].innerHTML = validationMessage;\n this.formValidatorModal.modal();\n }\n else {\n this.save();\n }\n }\n else {\n qcobjects_1.logger.debug(\"Unable to find the modal validator...\");\n qcobjects_1.logger.debug(\"Saving data...\");\n this.save();\n }\n }\n constructor(o) {\n super(o);\n this.validations = [];\n this.serviceClass = \"\";\n this.formSettings = {\n backRouting: \"#\",\n loadingRouting: \"#loading\",\n nextRouting: \"#signupsuccessful\"\n };\n this.component = o.component;\n this.component = this.component.Cast(org_qcobjects_components_1.FormField);\n }\n done() {\n qcobjects_1.logger.debugEnabled = true;\n try {\n this.component.createBindingEvents();\n const modalBody = (0, qcobjects_1._DOMCreateElement)(\"div\");\n modalBody.className = \"modal_body\";\n this.formValidatorModal = (0, qcobjects_1.New)(org_qcobjects_components_1.ModalComponent, {\n body: modalBody,\n subcomponents: [],\n data: {\n content: \"
          \"\n }\n });\n (0, qcobjects_1.Tag)(\".modal_body\").map(e => document.body.removeChild(e));\n document.body.append(this.formValidatorModal);\n }\n catch (e) {\n qcobjects_1.logger.debug(\"Unable to create the modal\");\n }\n this.onpress(\".submit\", () => {\n this.formSaveTouchHandler();\n });\n }\n }\n ]);\n})();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.controllers.swagger\", [\n class SwaggerUIController extends qcobjects_1.Controller {\n startSwaggerUI() {\n // Begin Swagger UI call region\n if (typeof SwaggerUIBundle !== \"undefined\") {\n /* eslint-disable no-undef */\n const ui = SwaggerUIBundle({\n url: qcobjects_1.CONFIG.get(\"swagger-ui-url\", \"https://petstore.swagger.io/v2/swagger.json\"),\n dom_id: \"#\" + qcobjects_1.CONFIG.get(\"swagger-ui-dom_id\", \"swagger-ui\"),\n deepLinking: true,\n presets: [\n SwaggerUIBundle.presets.apis,\n SwaggerUIStandalonePreset\n ],\n plugins: [\n SwaggerUIBundle.plugins.DownloadUrl\n ],\n layout: \"StandaloneLayout\"\n });\n // End Swagger UI call region\n window.ui = ui;\n }\n }\n done() {\n this.component.body.innerHTML = \"
          \";\n const swaggerUIPackagePath = qcobjects_1.CONFIG.get(\"swagger-ui-package-path\", \"node_modules/swagger-ui-dist/\");\n this.dependencies?.push((0, qcobjects_1.New)(qcobjects_1.SourceJS, {\n url: swaggerUIPackagePath + \"swagger-ui-standalone-preset.js\",\n external: qcobjects_1.CONFIG.get(\"swagger-ui-external\", false)\n }));\n this.dependencies?.push((0, qcobjects_1.New)(qcobjects_1.SourceCSS, {\n url: swaggerUIPackagePath + \"swagger-ui.css\",\n external: qcobjects_1.CONFIG.get(\"swagger-ui-external\", false)\n }));\n this.dependencies?.push((0, qcobjects_1.New)(qcobjects_1.SourceJS, {\n url: swaggerUIPackagePath + \"swagger-ui-bundle.js\",\n external: qcobjects_1.CONFIG.get(\"swagger-ui-external\", false),\n done: () => {\n this.startSwaggerUI();\n }\n }));\n }\n }\n ]);\n})();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.modal.controllers\", [\n class ModalController extends qcobjects_1.Controller {\n done() {\n const component = this.component;\n component.body.innerHTML = component.body.innerHTML.replace(\"/{{content}}/g\", component.submodal.template);\n }\n }\n ]);\n})();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.views\", [\n class GridView extends qcobjects_1.View {\n }\n ]);\n})();\n", "/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\n(function () {\n (0, qcobjects_1.Package)(\"org.qcobjects.tools.canvas\", [\n class CanvasTool extends qcobjects_1.InheritClass {\n drawImageFilled(img, canvas, zoom = 1, px = 0, py = 0) {\n // get the scale\n let scale = Math.max(canvas.width / img.width, canvas.height / img.height);\n scale = scale * zoom;\n // get the top left position of the image\n const x = (canvas.width / 2) - (img.width / 2) * scale;\n const y = (canvas.height / 2) - (img.height / 2) * scale;\n const ctx = canvas.getContext(\"2d\");\n ctx?.drawImage(img, (px + x), (py + y), img.width * scale, img.height * scale);\n }\n getImageResized(img, width, height, resizedImage, zoom = 1, px = 0, py = 0) {\n const canvas = document.createElement(\"canvas\");\n canvas.width = width;\n canvas.height = height;\n canvas.style.width = width.toString();\n canvas.style.height = height.toString();\n this.drawImageFilled(img, canvas, zoom, px, py);\n resizedImage.src = canvas.toDataURL(\"image/png\");\n return canvas;\n }\n }\n ]);\n})();\n", "/* eslint-disable array-callback-return */\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n*/\n\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\nconst org_qcobjects_effects_1 = require(\"./org.qcobjects.effects\");\n(function () {\n (0, qcobjects_1.Package)(\"org.qcobjects.tools.layouts\", [\n class BasicLayout extends qcobjects_1.InheritClass {\n constructor({ component = null, dependencies = [] }) {\n super({ component, dependencies });\n this.dependencies = [];\n }\n load() {\n this.dependencies.push((0, qcobjects_1.New)(qcobjects_1.SourceCSS, {\n external: !(qcobjects_1.CONFIG.get(\"useLocalSDK\", false)),\n url: (qcobjects_1.CONFIG.get(\"useLocalSDK\", false)) ? (\"css/basic-layout.css\") : (qcobjects_1.CONFIG.get(\"remoteSDKPath\", false) + \"css/basic-layout.css\")\n }));\n }\n coloredBorder() {\n /*\n * A helper function to visualize the layout borders\n * Usage: BasicLayout.coloredBorder()\n */\n setTimeout(function () {\n (0, qcobjects_1.Tag)(\"nav\").map((element) => { element.style.border = \"20px solid #3333\"; });\n (0, qcobjects_1.Tag)(\"nav\").map((element) => { element.style.backgroundColor = \"#129999\"; });\n (0, qcobjects_1.Tag)(\"component>footer\").map((element) => { element.style.background = \"#876\"; });\n (0, qcobjects_1.Tag)(\"component>div\").map((element) => { element.style.border = \"3px dashed #fff\"; });\n (0, qcobjects_1.Tag)(\"component>section\").map((element) => { element.style.border = \"3px solid #000\"; });\n (0, qcobjects_1.Tag)(\"component>section\").map((element) => { element.style.backgroundColor = \"#fffaaa\"; });\n (0, qcobjects_1.Tag)(\"component>article\").map((element) => { element.style.border = \"3px dotted #000\"; });\n (0, qcobjects_1.Tag)(\"component>header\").map((element) => { element.style.background = \"#789\"; });\n (0, qcobjects_1.Tag)(\"component>footer\").map((element) => { element.style.background = \"#876\"; });\n (0, qcobjects_1.Tag)(\"component>article:nth-child(1)\").map((element) => { element.style.border = \"1px solid #444\"; });\n (0, qcobjects_1.Tag)(\"component>article:nth-child(1)\").map((element) => { element.style.backgroundColor = \"#555aaa\"; });\n (0, qcobjects_1.Tag)(\"component>article:nth-child(2)\").map((element) => { element.style.backgroundColor = \"#aaa333\"; });\n (0, qcobjects_1.Tag)(\"component>article:nth-child(3)\").map((element) => { element.style.backgroundColor = \"#54da82\"; });\n (0, qcobjects_1.Tag)(\"*\").map((element) => { element.style.color = \"#fff\"; });\n (0, qcobjects_1.Tag)(\"component>article\").map((element) => org_qcobjects_effects_1.Fade.apply(element, 0, 1));\n (0, qcobjects_1.Tag)(\"component>footer\").map((element) => org_qcobjects_effects_1.Fade.apply(element, 0, 1));\n (0, qcobjects_1.Tag)(\"component>header\").map((element) => org_qcobjects_effects_1.Fade.apply(element, 0, 1));\n (0, qcobjects_1.Tag)(\"nav\").map((element) => { element.style.display = \"block\"; element.style.width = element.offsetParent?.scrollWidth.toString() || element.clientWidth.toString(); org_qcobjects_effects_1.MoveXInFromLeft.apply(element); });\n (0, qcobjects_1.Tag)(\"component>article\").map((element) => { element.style.display = \"block\"; element.style.height = element.offsetParent?.scrollHeight.toString() || element.clientHeight.toString(); org_qcobjects_effects_1.MoveYInFromBottom.apply(element); });\n (0, qcobjects_1.Tag)(\"component>article:nth-child(2)\").map((element) => { element.style.display = \"block\"; element.style.width = element.offsetParent?.scrollWidth.toString() || element.clientWidth.toString(); org_qcobjects_effects_1.MoveXInFromRight.apply(element); });\n }, 300);\n }\n }\n ]);\n})();\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SessionUserToken = void 0;\nconst qcobjects_1 = require(\"qcobjects\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\nconst _top = (typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({})));\n(function (global) {\n \"use strict\";\n class SessionUserToken extends qcobjects_1.InheritClass {\n constructor(o) {\n super(o);\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n const __instance__ = this;\n this.__cache__ = new qcobjects_1.ComplexStorageCache({\n index: __instance__.__instanceID.toString(),\n load() {\n let __token__;\n if (typeof navigator !== \"undefined\" && typeof origin !== \"undefined\") {\n __token__ = qcobjects_1._Crypt.encrypt(`${navigator.userAgent}|${o.username}|${(+(new Date())).toString()}`, origin);\n }\n else {\n __token__ = qcobjects_1._Crypt.encrypt(`${o.username}|${(+(new Date())).toString()}`, qcobjects_1.CONFIG.get(\"domain\", \"localhost\"));\n }\n SessionUserToken.user = {\n priority: __instance__.__instanceID.toString(),\n token: __token__\n };\n return SessionUserToken.user;\n },\n alternate(cacheController) {\n SessionUserToken.user = cacheController?.cache.getCached(__instance__.__instanceID.toString()); // setting dataObject with the cached value \n }\n });\n }\n static generateIndex(s) {\n return (typeof Buffer !== \"undefined\") ? (Buffer.from(s, \"ascii\").toString(\"base64\")) : (btoa(s));\n }\n getGlobalUser(...args) {\n const username = [args].join(\"|\");\n const __index__ = \"userToken_\" + SessionUserToken.generateIndex(username);\n if (typeof global.get(__index__) === \"undefined\" || global.get(__index__) === null) {\n global.set(__index__, (0, qcobjects_1.New)(SessionUserToken, {\n username\n }));\n }\n SessionUserToken.user = global.get(__index__).user;\n return global.get(__index__).user;\n }\n getGlobalUserToken(...args) {\n return this.getGlobalUser(args).token;\n }\n getGlobalUserId(...args) {\n return this.getGlobalUser(args).id;\n }\n getGlobalUserPriority(...args) {\n return this.getGlobalUser(args).priority;\n }\n getLoginCredentialsToken(username, password) {\n return qcobjects_1._Crypt.encrypt(`${username}${password}`, this.getGlobalUserToken(username));\n }\n closeGlobalSession(...args) {\n this.getGlobalUser(args);\n const username = [args].join(\"|\");\n const __index__ = \"userToken_\" + SessionUserToken.generateIndex(username);\n if (typeof global.get(__index__) !== \"undefined\") {\n global.get(__index__).__cache__.clear();\n global.set(__index__, null);\n SessionUserToken.user = {};\n }\n }\n }\n SessionUserToken.user = {};\n (0, qcobjects_1.Package)(\"org.qcobjects.cloud.auth.session.usertoken\", [\n SessionUserToken\n ]);\n})(_top);\nconst SessionUserToken = _top.SessionUserToken;\nexports.SessionUserToken = SessionUserToken;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\nconst org_qcobjects_cloud_auth_session_usertoken_1 = require(\"./org.qcobjects.cloud.auth.session.usertoken\");\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n(function () {\n \"use strict\";\n (0, qcobjects_1.Package)(\"org.qcobjects.cloud.auth.session.data\", [\n class SessionData extends qcobjects_1.InheritClass {\n constructor() {\n super(...arguments);\n this.__session_container__ = null;\n }\n /**\n * Sets the session container\n *\n * @param {*} sessionContainer1, sessionContainer2, ...\n *\n */\n setSessionContainer() {\n // eslint-disable-next-line prefer-rest-params\n this.__session_container__ = [...arguments];\n }\n /**\n * Gets the session container\n *\n * @return {*} sessionContainer\n */\n getSessionContainer() {\n if (typeof this.__session_container__ === \"undefined\" || this.__session_container__ === null) {\n throw new Error(\"You need to set a session container first: sessionData.setSessionContainer(...arguments)\");\n }\n return this.__session_container__;\n }\n /**\n * Gets the session data\n *\n * @return {*} sessionData\n */\n getSessionData(...args) {\n // eslint-disable-next-line prefer-rest-params\n const s = sessionStorage.getItem(`${this.index(args)}`);\n let sessionData;\n if (s !== null) {\n sessionData = JSON.parse(s);\n }\n if (typeof sessionData === \"undefined\" || sessionData === null) {\n sessionData = {};\n }\n return sessionData;\n }\n /**\n * Returns an index of the session\n *\n * @param {string} valueForIndex\n * @return {string} index\n * @example sessionInstance.index(\"me@email.com\", \"myusername\")\n *\n */\n index(...args) {\n if (typeof org_qcobjects_cloud_auth_session_usertoken_1.SessionUserToken === \"undefined\") {\n throw new Error(\"You need to import SessionUserToken first: Import (\\\"org.qcobjects.cloud.auth.session.usertoken\\\")\");\n }\n return `session_${btoa(org_qcobjects_cloud_auth_session_usertoken_1.SessionUserToken.getGlobalUserToken(args))}`;\n }\n /**\n * Saves the session instance\n *\n */\n save(...args) {\n const s = (0, qcobjects_1._DataStringify)(this.sessionData);\n sessionStorage.setItem(`${this.index(args)}`, s);\n }\n /**\n *\n * Gets the session value\n *\n * @param {*} name\n * @param {*} defaultValue\n * @return {*}\n */\n get(name, defaultValue) {\n const sessionData = this.getSessionData(this.getSessionContainer());\n return (typeof sessionData[name] !== \"undefined\") ? (sessionData[name]) : (defaultValue);\n }\n /**\n *\n * Sets the session value\n *\n * @param {*} name\n * @param {*} value\n */\n set(name, value) {\n const sessionContainer = this.getSessionContainer();\n const sessionData = this.getSessionData(sessionContainer);\n this.sessionData = sessionData;\n this.sessionData[name] = value;\n this.save(sessionContainer);\n }\n }\n ]);\n})();\n", "\"use strict\";\n/* eslint-disable @typescript-eslint/no-empty-function */\n/**\n * QCObjects SDK 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst qcobjects_1 = require(\"qcobjects\");\nconst _top = (typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : {})) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : ({})));\n// eslint-disable-next-line camelcase\n(function __qcobjects_sdk__(_top) {\n \"use strict\";\n if (typeof Object.defineProperty !== \"undefined\" && typeof _top !== \"undefined\") {\n try {\n Object.defineProperty(_top, \"__qcobjects_sdk__\", {\n enumerable: true,\n configurable: false,\n writable: false,\n // eslint-disable-next-line camelcase\n value: __qcobjects_sdk__,\n });\n }\n catch (e) {\n if (typeof _top.__qcobjects_sdk__ !== \"undefined\") {\n _top.__qcobjects_sdk__.__loaded__ = true;\n }\n }\n }\n if (typeof _top.__qcobjects_sdk__.__loaded__ === \"undefined\") {\n _top.__qcobjects_sdk__.__loaded__ = true;\n if (typeof _top === \"undefined\") {\n throw Error(\"Top context empty: It should either global, module or window\");\n }\n const __start__ = qcobjects_1.GlobalSettings.__start__.bind(_top);\n let _imports_ = [];\n // non-browsers environment // esbuild compatible\n _imports_ = [\n new Promise((resolve) => {\n require(\"./js/org.qcobjects.i18n_messages\");\n require(\"./js/org.qcobjects.models\");\n require(\"./js/org.qcobjects.components\");\n require(\"./js/org.qcobjects.components.grid\");\n require(\"./js/org.qcobjects.components.list\");\n require(\"./js/org.qcobjects.components.slider\");\n require(\"./js/org.qcobjects.components.notifications\");\n require(\"./js/org.qcobjects.components.splashscreen\");\n require(\"./js/org.qcobjects.controllers\");\n require(\"./js/org.qcobjects.controllers.grid\");\n require(\"./js/org.qcobjects.controllers.list\");\n require(\"./js/org.qcobjects.controllers.slider\");\n require(\"./js/org.qcobjects.controllers.form\");\n require(\"./js/org.qcobjects.controllers.swagger\");\n require(\"./js/org.qcobjects.effects\");\n require(\"./js/org.qcobjects.modal.controllers\");\n require(\"./js/org.qcobjects.views\");\n require(\"./js/org.qcobjects.tools.canvas\");\n require(\"./js/org.qcobjects.tools.layouts\");\n require(\"./js/org.qcobjects.cloud.auth.session.usertoken\");\n require(\"./js/org.qcobjects.cloud.auth.session.data\");\n resolve();\n })\n ];\n _top._sdk_ = Promise.all(_imports_).then(() => {\n qcobjects_1.CONFIG.set(\"useSDK\", true);\n __start__();\n });\n }\n})(_top);\nexports.default = _top;\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst sdk = require(\"./QCObjects-SDK\");\nmodule.exports = sdk;\n", "\"use strict\";\n/**\n * QCObjects 2.4\n * ________________\n *\n * Author: Jean Machuca \n *\n * Cross Browser Javascript Framework for MVC Patterns\n * QuickCorp/QCObjects is licensed under the\n * GNU Lesser General Public License v3.0\n * [LICENSE] (https://github.com/QuickCorp/QCObjects/blob/master/LICENSE.txt)\n *\n * Permissions of this copyleft license are conditioned on making available\n * complete source code of licensed works and modifications under the same\n * license or the GNU GPLv3. Copyright and license notices must be preserved.\n * Contributors provide an express grant of patent rights. However, a larger\n * work using the licensed work through interfaces provided by the licensed\n * work may be distributed under different terms and without source code for\n * the larger work.\n *\n * Copyright (C) 2015 Jean Machuca,\n *\n * Everyone is permitted to copy and distribute verbatim copies of this\n * license document, but changing it is not allowed.\n */\n/*eslint no-unused-vars: \"off\"*/\n/*eslint no-redeclare: \"off\"*/\n/*eslint no-empty: \"off\"*/\n/*eslint strict: \"off\"*/\n/*eslint no-mixed-operators: \"off\"*/\n(function __qcobjects__(_top) {\n \"use strict\";\n if (typeof Object.defineProperty !== \"undefined\" && typeof _top !== \"undefined\") {\n try {\n Object.defineProperty(_top, \"__qcobjects__\", {\n enumerable: true,\n configurable: false,\n writable: false,\n value: __qcobjects__,\n });\n }\n catch (e) {\n if (typeof _top.__qcobjects__ !== \"undefined\") {\n _top.__qcobjects__.loaded = true;\n }\n }\n }\n if (typeof _top.__qcobjects__.loaded === \"undefined\") {\n _top.__qcobjects__.loaded = true;\n var global = _top;\n _top.global = global;\n var isDeno = (typeof window !== \"undefined\" && \"Deno\" in window);\n var isBrowser = (typeof window !== \"undefined\" && typeof window.self !== \"undefined\" && window === window.self) && !isDeno;\n var isNodeCommonJS = (typeof module !== \"undefined\") ? (true) : (false);\n var deno_require = function () { };\n var _require_ = function () {\n return (isDeno) ? (deno_require(...arguments)) : (require(...arguments));\n };\n var _protected_code_ = function (_) {\n var __oldtoString = (typeof _.prototype !== \"undefined\") ? (_.prototype.toString) : (function () {\n return \"\";\n });\n if (typeof _.prototype !== \"undefined\") {\n _.prototype.toString = function () {\n var _protected_symbols = [\n \"__qcobjects__\",\n \"__qcobjects_sdk__\",\n \"__loaded__\",\n \"ComplexStorageCache\",\n \"css\",\n \"append\",\n \"attachIn\",\n \"debug\",\n \"info\",\n \"warn\",\n \"QC_Append\",\n \"set\",\n \"get\",\n \"done\",\n \"componentDone\",\n \"_new_\",\n \"__new__\",\n \"Class\",\n \"ClassFactory\",\n \"New\",\n \"Export\",\n \"Package\",\n \"Import\",\n \"subelements\",\n \"componentLoader\",\n \"buildComponents\",\n \"Controller\",\n \"View\",\n \"VO\",\n \"Service\",\n \"serviceLoader\",\n \"JSONService\",\n \"ConfigService\",\n \"SourceJS\",\n \"SourceCSS\",\n \"ArrayList\",\n \"ArrayCollection\",\n \"Effect\",\n \"Timer\",\n \"sum\",\n \"avg\",\n \"table\",\n \"max\",\n \"min\",\n \"range\",\n \"matrix\",\n \"matrix2d\",\n \"matrix3d\",\n \"unique\",\n \"uniqueId\",\n \"shortCode\",\n \"NamespaceRef\"\n ];\n var _ret_;\n if (_protected_symbols.includes(this.name)) {\n _ret_ = this.name + \"{ [QCObjects native code] }\";\n }\n else {\n _ret_ = __oldtoString.call(this);\n }\n return _ret_;\n };\n }\n };\n (_protected_code_)(Function);\n var _methods_ = function (_) {\n var _m = [];\n for (var i in _) {\n if ((typeof _[i]).toLowerCase() === \"function\") {\n _m.push(_[i]);\n }\n }\n return _m;\n };\n String.prototype.__mAll__ = function (regex) {\n // This is an alternative to old browsers that dont support String.prototype.matchAll\n // https://github.com/tc39/proposal-string-matchall\n var matches = [];\n this.replace(regex, function () {\n var match = Array.prototype.slice.call(arguments, 0, -2);\n match.input = arguments[arguments.length - 1];\n match.index = arguments[arguments.length - 2];\n matches.push(match);\n });\n return matches;\n };\n if (typeof String.prototype.matchAll === \"undefined\") {\n String.prototype.matchAll = String.prototype.__mAll__;\n }\n var _DOMCreateElement = function (elementName) {\n var _ret_;\n if (isBrowser) {\n _ret_ = document.createElement(elementName);\n }\n else {\n _ret_ = {};\n }\n return _ret_;\n };\n if (!isBrowser) {\n const fs = _require_(\"fs\");\n }\n var _DataStringify = function (data) {\n var getCircularReplacer = function () {\n var seen = new WeakSet();\n var _level = 0;\n return function (key, value) {\n if (typeof value === \"object\" && value !== null) {\n if (seen.has(value)) {\n _level += 1;\n return (_level <= 3) ? (_LegacyCopy(value)) : (null);\n }\n seen.add(value);\n }\n return value;\n };\n };\n return JSON.stringify(data, getCircularReplacer());\n };\n if (isBrowser) {\n var _subelements = function subelements(selector) {\n return [...this.querySelectorAll(selector)];\n };\n Element.prototype.subelements = _subelements;\n HTMLDocument.prototype.subelements = _subelements;\n HTMLElement.prototype.subelements = _subelements;\n if (typeof ShadowRoot !== \"undefined\") {\n ShadowRoot.prototype.subelements = _subelements;\n }\n }\n if (isBrowser) {\n try {\n _top = (typeof window.top !== \"undefined\") ? (window.top) : (window);\n _top[\"_allowed_\"] = true;\n }\n catch (e) {\n try {\n _top = document;\n _top[\"_allowed_\"] = true;\n }\n catch (e2) {\n try {\n _top = global;\n _top[\"_allowed_\"] = true;\n }\n catch (e3) {\n _top = {};\n _top[\"_allowed_\"] = true;\n }\n }\n }\n }\n else if (typeof global !== \"undefined\") {\n _top = global;\n }\n var _domain_, _basePath_;\n var _tag_filter_ = \"quick-component:not([loaded]),component:not([loaded])\";\n _basePath_ = (function () {\n var _basePath = \"\";\n if (isBrowser) {\n var baseURI = _top.document.baseURI.split(\"?\")[0].split(\"/\");\n baseURI.pop();\n _basePath = baseURI.join(\"/\") + \"/\";\n }\n else {\n var process;\n try {\n process = _require_(\"process\");\n }\n catch (e) {\n // not a process module\n }\n if (typeof process !== \"undefined\") {\n _basePath = `${process.cwd()}/`;\n }\n else {\n _basePath = \"\";\n }\n }\n return _basePath;\n })();\n if (isBrowser) {\n /**\n * Polyfilling Promise\n */\n if (!(\"Promise\" in _top)) {\n _top.Promise = function (_f) {\n var _p = {\n then() { },\n catch() { },\n _then(response) {\n this.then.call(_p, response);\n },\n _catch(response) {\n this.catch.call(_p, response);\n }\n };\n _f.call(_p, _p._then, _p._catch);\n return _p;\n };\n }\n if (typeof _top.console === \"undefined\") {\n _top.console = function () { };\n _top.console.prototype.log = function (message) { };\n }\n _domain_ = (function () {\n return (typeof document !== \"undefined\" && document.domain !== \"\") ? (document.domain) : (\"localhost\");\n })();\n var _secretKey = (function () {\n var __secretKey = _top[(![] + [])[((+!+[]) + (+!+[]))] + (typeof ![])[(+!+[])] + (typeof [])[((+!+[]) + (+!+[])) * ((+!+[]) + (+!+[]))] + (![] + [])[(+!+[])] + (!![] + [])[(+[])] + ([] + [] + [][[]])[(+[+!+[] + [+[]]]) / ((+!+[]) + (+!+[]))] + (typeof ![])[(+!+[])] + ([] + [] + [][[]])[(+!+[])]][\"h\" + (typeof ![])[(+!+[])] + (![] + [])[(+!+[] + ((+!+[]) + (+!+[])))] + (!![] + [])[(+[])]].toLowerCase();\n return __secretKey;\n })();\n var is_phonegap = (function () {\n return (typeof cordova !== \"undefined\") ? (true) : (false);\n })();\n }\n else {\n // This is only for code integrity purpose using non-browser implementations\n // like using node.js\n var _secretKey = \"secret\";\n _domain_ = \"localhost\";\n }\n _top._asyncLoad = [];\n var asyncLoad = function (callback, args) {\n var asyncCallback = {\n \"func\": callback,\n \"args\": args,\n \"dispatch\"() {\n this.func.apply(null, this.args);\n }\n };\n _top._asyncLoad.push(asyncCallback);\n return asyncCallback;\n };\n if (isBrowser) {\n var _fireAsyncLoad = function () {\n if (document.readyState === \"complete\") {\n _top._asyncLoad.map(function (fc) {\n fc.dispatch.call(fc);\n });\n }\n };\n document.onreadystatechange = _fireAsyncLoad;\n }\n else if (typeof _top.global !== \"undefined\") {\n _top.global._fireAsyncLoad = function () {\n _top._asyncLoad.map(function (fc) {\n fc.dispatch.call(fc);\n });\n };\n }\n _top.asyncLoad = asyncLoad;\n var Logger = function () {\n return {\n debugEnabled: true,\n infoEnabled: true,\n warnEnabled: true,\n debug(message) {\n if (this.debugEnabled) {\n console.log(\"\\x1b[35m%s\\x1b[0m\", `[DEBUG][${performance.now().toLocaleString()}] ${message}`);\n }\n },\n info(message) {\n var color;\n if (this.infoEnabled) {\n if (isBrowser) {\n color = \"\\x1b[103m%s\\x1b[0m\";\n }\n else {\n color = \"\\x1b[33m%s\\x1b[0m\";\n }\n console.info(color, `[INFO][${performance.now().toLocaleString()}] ${message}`);\n }\n },\n warn(message) {\n if (this.warnEnabled) {\n console.warn(\"\\x1b[31m%s\\x1b[0m\", `[WARN][${performance.now().toLocaleString()}] ${message}`);\n }\n }\n };\n };\n var logger = new Logger();\n logger.debugEnabled = false;\n logger.infoEnabled = true;\n _top.logger = logger;\n var Base64 = {\n _keyStr: \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\",\n encode(e) {\n var t = \"\";\n var n, r, i, s, o, u, a;\n var f = 0;\n e = Base64._utf8_encode(e);\n while (f < e.length) {\n n = e.charCodeAt(f++);\n r = e.charCodeAt(f++);\n i = e.charCodeAt(f++);\n s = n >> 2;\n o = (n & 3) << 4 | r >> 4;\n u = (r & 15) << 2 | i >> 6;\n a = i & 63;\n if (isNaN(r)) {\n u = a = 64;\n }\n else if (isNaN(i)) {\n a = 64;\n }\n t = t + this._keyStr.charAt(s) + this._keyStr.charAt(o) + this._keyStr.charAt(u) + this._keyStr.charAt(a);\n }\n return t;\n },\n decode(e) {\n var t = \"\";\n var n, r, i;\n var s, o, u, a;\n var f = 0;\n e = e.replace(/[^A-Za-z0-9+/=]/g, \"\");\n while (f < e.length) {\n s = this._keyStr.indexOf(e.charAt(f++));\n o = this._keyStr.indexOf(e.charAt(f++));\n u = this._keyStr.indexOf(e.charAt(f++));\n a = this._keyStr.indexOf(e.charAt(f++));\n n = s << 2 | o >> 4;\n r = (o & 15) << 4 | u >> 2;\n i = (u & 3) << 6 | a;\n t = t + String.fromCharCode(n);\n if (u !== 64) {\n t = t + String.fromCharCode(r);\n }\n if (a !== 64) {\n t = t + String.fromCharCode(i);\n }\n }\n t = Base64._utf8_decode(t);\n return t;\n },\n _utf8_encode(e) {\n e = e.replace(/rn/g, \"n\");\n var t = \"\";\n for (var n = 0; n < e.length; n++) {\n var r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n }\n else if (r > 127 && r < 2048) {\n t += String.fromCharCode(r >> 6 | 192);\n t += String.fromCharCode(r & 63 | 128);\n }\n else {\n t += String.fromCharCode(r >> 12 | 224);\n t += String.fromCharCode(r >> 6 & 63 | 128);\n t += String.fromCharCode(r & 63 | 128);\n }\n }\n return t;\n },\n _utf8_decode(e) {\n var t = \"\";\n var n = 0;\n var r = 0;\n var c1 = 0;\n var c2 = 0;\n var c3;\n while (n < e.length) {\n r = e.charCodeAt(n);\n if (r < 128) {\n t += String.fromCharCode(r);\n n++;\n }\n else if (r > 191 && r < 224) {\n c2 = e.charCodeAt(n + 1);\n t += String.fromCharCode((r & 31) << 6 | c2 & 63);\n n += 2;\n }\n else {\n c2 = e.charCodeAt(n + 1);\n c3 = e.charCodeAt(n + 2);\n t += String.fromCharCode((r & 15) << 12 | (c2 & 63) << 6 | c3 & 63);\n n += 3;\n }\n }\n return t;\n }\n };\n var waitUntil = function (func, exp) {\n var _waitUntil = function (func, exp) {\n var maxWaitCycles = 2000;\n var _w = 0;\n var _t = setInterval(function () {\n if (exp.call()) {\n clearInterval(_t);\n func.call();\n logger.debug(\"Ejecuting \" + func.name + \" after wait\");\n }\n else {\n if (_w < maxWaitCycles) {\n _w += 1;\n logger.debug(\"WAIT UNTIL \" + func.name + \" is true, \" + _w.toString() + \" cycles\");\n }\n else {\n logger.debug(\"Max execution time for \" + func.name + \" expression until true\");\n clearInterval(_t);\n }\n }\n }, 1);\n };\n setTimeout(function () {\n _waitUntil(func, exp);\n }, 1);\n };\n if (typeof localStorage === \"undefined\") {\n /* Polyfill for localStorage */\n var localStorage = {\n getItem(name) {\n return (Object.hasOwnProperty.call(this, name)) ? (this[name]) : (null);\n },\n setItem(name, value) {\n this[name] = value;\n },\n removeItem(name) {\n delete this[name];\n }\n };\n /* end Polyfill for localStorage */\n }\n var ComplexStorageCache = function (params) {\n var object, load, alternate;\n object = params.index;\n if (typeof object !== \"undefined\") {\n load = params.load;\n alternate = params.alternate;\n var cachedObjectID = this.getID(object);\n var cachedResponse = localStorage.getItem(cachedObjectID);\n if (this.isEmpty(cachedResponse)) {\n var cachedNewResponse = load.call(null, {\n \"cachedObjectID\": cachedObjectID,\n \"cachedResponse\": cachedResponse,\n \"cache\": this\n });\n this.save(object, cachedNewResponse);\n logger.debug(\"RESPONSE OF {{cachedObjectID}} CACHED\".replace(\"{{cachedObjectID}}\", cachedObjectID));\n }\n else {\n var alternateResponse = alternate.call(null, {\n \"cachedObjectID\": cachedObjectID,\n \"cachedResponse\": cachedResponse,\n \"cache\": this\n });\n logger.debug(\"RESPONSE OF {{cachedObjectID}} IS ALREADY CACHED \".replace(\"{{cachedObjectID}}\", cachedObjectID));\n }\n }\n else {\n throw new Error(\"ComplexStorageCache: index is undefined\");\n }\n return this;\n };\n ComplexStorageCache.prototype.getItem = function (cachedObjectID) {\n var retrievedObject = localStorage.getItem(cachedObjectID);\n if (!this.isEmpty(retrievedObject)) {\n return JSON.parse(retrievedObject);\n }\n else {\n return null;\n }\n };\n ComplexStorageCache.prototype.setItem = function (cachedObjectID, value) {\n localStorage.setItem(cachedObjectID, _DataStringify(value));\n };\n ComplexStorageCache.prototype.isEmpty = function (object) {\n var r = false;\n switch (true) {\n case (typeof object === \"undefined\"):\n case (typeof object === \"string\" && object === \"\"):\n case (typeof object === \"string\" && object === \"undefined\"):\n case (typeof object === \"number\" && object === 0):\n case (object === null):\n r = true;\n break;\n default:\n r = false;\n }\n return r;\n };\n ComplexStorageCache.prototype.getID = function (object) {\n var cachedObjectID;\n if (typeof object !== \"undefined\") {\n cachedObjectID = \"cachedObject_\" + Base64.encode(_DataStringify(object).replace(/\\{|\\}|,/g, \"_\"));\n }\n return cachedObjectID;\n };\n ComplexStorageCache.prototype.save = function (object, cachedNewResponse) {\n var cachedObjectID = this.getID(object);\n logger.debug(\"CACHING THE RESPONSE OF {{cachedObjectID}} \".replace(\"{{cachedObjectID}}\", cachedObjectID));\n this.setItem(cachedObjectID, cachedNewResponse);\n };\n ComplexStorageCache.prototype.getCached = function (object) {\n var cachedObjectID = this.getID(object);\n return this.getItem(cachedObjectID);\n };\n ComplexStorageCache.prototype.clear = function () {\n Object.keys(localStorage).filter(function (k) {\n return k.startsWith(\"cachedObject_\");\n }).map(function (c) {\n localStorage.removeItem(c);\n });\n };\n /**\n * Detecting passive events feature\n *\n * https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md#feature-detection\n **/\n // Test via a getter in the options object to see if the passive property is accessed\n if (isBrowser) {\n var supportsPassive = false;\n try {\n var opts = Object.defineProperty({}, \"passive\", {\n get() {\n supportsPassive = true;\n return supportsPassive;\n }\n });\n window.addEventListener(\"testPassive\", null, opts);\n window.removeEventListener(\"testPassive\", null, opts);\n }\n catch (e) { }\n var captureFalse = function () {\n return (supportsPassive) ? ({\n passive: true\n }) : (false);\n };\n // Use our detect's results. passive applied if supported, capture will be false either way.\n //elem.addEventListener('touchstart', fn, captureFalse);\n }\n /**\n * Basic Type of all elements\n */\n if (isBrowser) {\n Element.prototype.find = function (tag) {\n var _oo = [];\n var _tags = document.subelements(tag);\n _tags.map(function (_tt, _t) {\n if ((typeof _tags[_t] !== \"undefined\") && _tags[_t].parentNode.tagName === this.parentNode.tagName) {\n _oo.push(_Cast(_tt, (new Object())));\n }\n });\n return _oo;\n };\n }\n /**\n * Primary instance ID of all objects\n */\n var __instanceID;\n // Adaptation of Production steps of ECMA-262, Edition 5, 15.2.3.5\n // Reference: http://es5.github.io/#x15.2.3.5\n var _Object_Create = (function () {\n // make a safe reference to Object.prototype.hasOwnProperty\n var hasOwn = Object.prototype.hasOwnProperty;\n return function (O) {\n // 1. If Type(O) is not Object or Null throw a TypeError exception.\n if (typeof O !== \"object\") {\n throw TypeError(\"Object prototype may only be an Object or null. The type is \" + typeof (O));\n }\n // 2. Let obj be the result of creating a new object as if by the\n //\t\texpression new Object() where Object is the standard built-in\n //\t\tconstructor with that name\n // 3. Set the [[Prototype]] internal property of obj to O.\n var QCObjects = function () { };\n QCObjects.prototype = O;\n var obj = new QCObjects();\n // Let's not keep a stray reference to O...\n // 4. If the argument Properties is present and not undefined, add\n //\t\town properties to obj as if by calling the standard built-in\n //\t\tfunction Object.defineProperties with arguments obj and\n //\t\tProperties.\n if (arguments.length > 1) {\n // Object.defineProperties does ToObject on its first argument.\n var Properties = Object(arguments[1]);\n for (var prop in Properties) {\n if (hasOwn.call(Properties, prop)) {\n obj[prop] = Properties[prop];\n }\n }\n }\n // 5. Return obj\n return obj;\n };\n })();\n // Object.assign Polyfilling\n // Reference: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign#Polyfill\n if (typeof Object.assign !== \"function\") {\n // Must be writable: true, enumerable: false, configurable: true\n Object.defineProperty(Object, \"assign\", {\n value: function assign(target, varArgs) {\n \"use strict\";\n if (target === null) { // TypeError if undefined or null\n throw new TypeError(\"Cannot convert undefined or null to object\");\n }\n var to = Object(target);\n for (var index = 1; index < arguments.length; index++) {\n var nextSource = arguments[index];\n if (nextSource !== null) { // Skip over if undefined or null\n for (var nextKey in nextSource) {\n // Avoid bugs when hasOwnProperty is shadowed\n if (Object.prototype.hasOwnProperty.call(nextSource, nextKey)) {\n to[nextKey] = nextSource[nextKey];\n }\n }\n }\n }\n return to;\n },\n writable: true,\n configurable: true\n });\n }\n var __is_raw_class__ = function (o_c) {\n return (typeof o_c === \"function\" && o_c.toString().startsWith(\"class\")) ? (true) : (false);\n };\n var _LegacyCopy = function (obj) {\n var _value_;\n switch (true) {\n case typeof obj === \"string\":\n _value_ = obj;\n break;\n case typeof obj === \"number\":\n _value_ = obj;\n break;\n case typeof obj === \"object\":\n _value_ = Object.assign({}, obj);\n break;\n case typeof obj === \"function\":\n _value_ = obj.bind({});\n break;\n case __is_raw_class__(obj):\n _value_ = class extends obj {\n };\n break;\n default:\n break;\n }\n return _value_;\n };\n var _QC_CLASSES = {};\n var _QC_PACKAGES = {};\n var _QC_PACKAGES_IMPORTED = [];\n var _QC_READY_LISTENERS = [];\n /**\n * Returns the object or function name\n *\n * @param Object or function\n */\n var ObjectName = function (o) {\n var ret = \"\";\n if (typeof o === \"function\" && Object.hasOwnProperty.call(o, \"name\") && o.name !== \"\") {\n ret = o.name;\n }\n else if (typeof o !== \"undefined\" && typeof o.constructor === \"function\" && o.constructor.name !== \"\") {\n ret = o.constructor.name;\n }\n else if (typeof o !== \"undefined\" && typeof o.constructor === \"object\") {\n ret = o.constructor.toString().replace(/\\[(.*?)\\]/g, \"$1\").split(\" \").slice(1).join(\"\");\n }\n return ret;\n };\n /**\n * Casts an object to another object class type\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\n var _Cast = function (obj_source, obj_dest) {\n for (var v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\") {\n try {\n obj_dest[v] = obj_source[v];\n }\n catch (e) {\n }\n }\n }\n return obj_dest;\n };\n /**\n * Casts an object to another object class type. Only properties\n *\n * @param {Object} obj_source\n * @param {Object} obj_dest\n */\n var _CastProps = function (obj_source, obj_dest) {\n for (var v in obj_source) {\n if (typeof obj_source[v] !== \"undefined\" && typeof obj_source[v] !== \"function\") {\n try {\n obj_dest[v] = obj_source[v];\n }\n catch (e) {\n // DO NOTHING\n }\n }\n else if (typeof obj_source[v] === \"function\") {\n try {\n obj_dest[v] = obj_source[v].bind(obj_dest);\n }\n catch (e) {\n logger.warn(e);\n }\n }\n }\n return obj_dest;\n };\n /**\n * Internal use to determine the forbidden names for classes\n * Reserved words\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n */\n var __is__forbidden_name__ = function () {\n return ([\"__proto__\", \"prototype\", \"Object\", \"Map\", \"defineProperty\", \"indexOf\", \"toString\", \"__instanceID\"].indexOf(arguments[0]) !== -1) ? (true) : (false);\n };\n /**\n * Determine the type of the Object for any QCObjects Object\n *\n * @param {Object} object\n */\n var __getType__ = function __getType__(o_c) {\n var _ret_ = \"\";\n switch (true) {\n case __is_raw_class__(o_c) && !!o_c.name:\n _ret_ = o_c.name;\n break;\n case typeof o_c === \"object\" &&\n (!!o_c.constructor &&\n !!o_c.constructor.name)\n && o_c.constructor.name !== \"\":\n _ret_ = o_c.constructor.name;\n break;\n case (!!o_c && !!o_c.__classType) && o_c.__classType !== \"\":\n _ret_ = o_c.__classType;\n break;\n case (!!o_c && !!o_c.__definition) && (!!o_c.__definition.__classType) && o_c.__definition.__classType !== \"\":\n _ret_ = o_c.__definition.__classType;\n break;\n case typeof o_c === \"function\" && !!o_c.name:\n _ret_ = o_c.name;\n break;\n default:\n _ret_ = ObjectName(o_c);\n break;\n }\n return _ret_;\n };\n /**\n * Returns if a class or object is from a determinated type\n * @param {Object} object\n * @param {String} typeName\n */\n var is_a = function is_a(obj, typeName) {\n return (typeof obj !== \"undefined\" && obj !== null &&\n (((isQCObjects_Class(obj) || isQCObjects_Object(obj)) && (obj.hierarchy().includes(typeName))) ||\n __getType__(obj) === typeName ||\n ObjectName(obj) === typeName ||\n typeof obj === typeName)) ? (true) : (false);\n };\n var __make_global__ = function (f) {\n if (typeof f !== \"undefined\") {\n if (isBrowser) {\n try {\n _top[f.name] = f;\n window[f.name] = f;\n }\n catch (e) { }\n }\n else if (typeof global !== \"undefined\") {\n if (!Object.hasOwnProperty.call(global, f.name)) {\n global[f.name] = f;\n }\n }\n }\n };\n var __register_class__ = function (_class_, __namespace) {\n var name = _class_.name || __getType__(_class_);\n if (typeof _class_.__definition === \"undefined\") {\n _class_.__definition = {};\n }\n _class_.__definition.__classType = name;\n if (typeof __namespace !== \"undefined\") {\n _class_.__definition.__namespace = __namespace;\n }\n _QC_CLASSES[name] = _class_;\n _top[name] = _QC_CLASSES[name];\n return _top[name];\n };\n var RegisterClass = function (_class_, __namespace) {\n return __register_class__(_class_, __namespace);\n };\n __make_global__(RegisterClass);\n /**\n * Creates new object class of another object\n *\n * @param {String} name\n * @param {Object} type\n * @param {Object} definition\n */\n var Class = function () {\n var _types_ = {};\n var name, type, definition;\n switch (arguments.length) {\n case 0:\n return class {\n };\n case 1:\n name = arguments[0];\n type = class {\n };\n definition = {};\n break;\n case 2:\n name = arguments[0];\n type = class {\n };\n definition = arguments[1];\n break;\n case 3:\n name = arguments[0];\n type = arguments[1];\n definition = arguments[2];\n break;\n default:\n break;\n }\n if (typeof type !== \"function\") {\n throw new Error(\"Class type must be a function or class\");\n }\n if (__is__forbidden_name__.call(this, name)) {\n throw new Error(`${name} is not an allowed word in the name of a class`);\n }\n if (typeof type[\"__definition\"] !== \"undefined\") {\n definition[\"__definition\"] = Object.assign(_LegacyCopy(type.__definition), type);\n }\n _types_[type.name] = type;\n if (typeof definition === \"undefined\" || definition === null) {\n definition = {};\n }\n else {\n definition = _LegacyCopy(definition);\n }\n /* hack to prevent duplicate __instanceID */\n if (typeof definition[\"__instanceID\"] !== \"undefined\") {\n delete definition[\"__instanceID\"];\n }\n _QC_CLASSES[name] = class extends _types_[type.name] {\n __classType = name;\n __definition = {\n ...definition\n };\n static hierarchy(__class__) {\n var __classType = function (o_c) {\n return (Object.hasOwnProperty.call(o_c, \"__classType\")) ? (o_c.__classType) : (__getType__.call(__class__, o_c));\n };\n var __hierarchy__proto__ = (c) => {\n return (typeof c !== \"undefined\" && typeof c.__proto__ !== \"undefined\" && c.__proto__ !== null) ? (((__classType(c) !== \"\") ? ([__classType(c)]) : ([])).concat(__hierarchy__proto__(c.__proto__))) : ([]);\n };\n if (typeof __class__ === \"undefined\" || __class__ === null) {\n __class__ = this;\n }\n var __hierarchy = [];\n __hierarchy.push(__classType(__class__));\n __hierarchy = __hierarchy.concat(__hierarchy__proto__(__class__.__proto__));\n return __hierarchy;\n }\n static getParentClass() {\n return Object.getPrototypeOf(this.prototype.constructor);\n }\n constructor() {\n var _o_;\n if (arguments.length > 0) {\n _o_ = {\n ...arguments[0]\n };\n }\n else {\n _o_ = {};\n }\n super(_o_);\n let self = this;\n __instanceID = (typeof __instanceID === \"undefined\" || __instanceID === null) ? (0) : (__instanceID + 1);\n if (!self.__instanceID) {\n Object.defineProperty(self, \"__instanceID\", {\n value: __instanceID,\n writable: false\n });\n }\n if (typeof self.__definition !== \"undefined\") {\n Object.keys(self.__definition).filter(function (k) {\n return isNaN(k) && ![\"name\", \"__instanceID\", \"__classType\", \"__definition\"].includes(k);\n }).forEach(function (key) {\n if (typeof self.__definition[key] === \"function\") {\n self[key] = self.__definition[key].bind(self);\n }\n else {\n self[key] = self.__definition[key];\n }\n });\n }\n _methods_(_QC_CLASSES[self.__classType]).map(function (m) {\n self[m.name] = m.bind(self);\n });\n _methods_(self.__definition).map(function (m) {\n self[m.name] = m.bind(self);\n });\n if (!!self[\"body\"]) {\n if (typeof self.__definition === \"undefined\" || (!Object.hasOwnProperty.call(self.__definition, \"body\")) || typeof self.__definition.body === \"undefined\") {\n try {\n if (isBrowser) {\n self[\"body\"] = _DOMCreateElement(self.__definition.__classType);\n }\n else {\n self[\"body\"] = {};\n }\n }\n catch (e) {\n self[\"body\"] = {};\n }\n }\n else if (Object.hasOwnProperty.call(self.__definition, \"body\")) {\n self[\"body\"] = self.__definition.body;\n }\n }\n try {\n if (typeof self.__new__ === \"function\") {\n self.__new__.call(self, _o_);\n }\n else if (typeof super.__new__ === \"function\") {\n self.__new__ = super.__new__.bind(self);\n self.__new__.call(self, _o_);\n }\n if (typeof self === \"object\" && Object.hasOwnProperty.call(self, \"_new_\") && typeof self._new_.isCalled === \"undefined\") {\n try {\n self._new_.call(self, _o_);\n self._new_.isCalled = true;\n }\n catch (e) {\n logger.warn(`${self.__classType}._new_() failed with error: ${e}`);\n }\n }\n }\n catch (e) {\n logger.warn(e);\n }\n }\n __new__(_o_) {\n _CastProps(_o_, this);\n }\n _new_() { }\n getClass() {\n return Object.getPrototypeOf(this.constructor);\n }\n css(_css) {\n if (typeof this[\"body\"] !== \"undefined\" && this[\"body\"][\"style\"] !== \"undefined\") {\n logger.debug(\"body style\");\n this[\"body\"][\"style\"] = _Cast(_css, this[\"body\"][\"style\"]);\n }\n return this[\"body\"][\"style\"];\n }\n hierarchy() {\n var __instance__ = this;\n return this.getClass().hierarchy(__instance__);\n }\n append(child) {\n logger.debug(\"append: start\");\n if (is_a(child, \"Component\")) {\n logger.debug(\"append: child is a Component\");\n logger.debug(`appending the body of ${child.name}`);\n }\n var child = (arguments.length > 0) ? (arguments[0]) : (this[\"body\"]);\n if (typeof this[\"body\"] !== \"undefined\") {\n logger.debug(\"append element\");\n if (arguments.lenght > 0) {\n logger.debug(\"append to element\");\n this[\"body\"].append(child);\n if (typeof this[\"childs\"] === \"undefined\") {\n this[\"childs\"] = [];\n }\n this[\"childs\"].push(child);\n }\n else {\n if (isBrowser) {\n logger.debug(\"append to body\");\n document.body.append(child);\n }\n }\n }\n }\n attachIn(tag) {\n if (isBrowser) {\n var tags = document.subelements(tag);\n for (var i = 0, j = tags.length; i < j; i++) {\n tags[i].append(this);\n }\n }\n else {\n throw new Error(\"attachIn not yet implemented for non browser platforms\");\n }\n }\n };\n // remove the keys from definition that exist in the prototype\n _QC_CLASSES[name] = _CastProps(definition, _QC_CLASSES[name]);\n _QC_CLASSES[name][\"__definition\"] = definition;\n _QC_CLASSES[name][\"__definition\"][\"__classType\"] = name;\n _QC_CLASSES[name][\"__definition\"][\"__new__\"] = function __new__(_o_) {\n _CastProps(_o_, this);\n };\n _top[name] = _QC_CLASSES[name];\n return _top[name];\n };\n Class.prototype.toString = function () {\n return \"Class(name, type, definition) { [QCObjects native code] }\";\n };\n /**\n * Returns the QCObjects Class Factory of a given ClassName\n *\n * @param {String} name\n */\n var ClassFactory = function (className) {\n var _classFactory;\n if (className !== null && className.indexOf(\".\") > -1) {\n var packageName = className.split(\".\").slice(0, className.split(\".\").length - 1).join(\".\");\n var _className = className.split(\".\").slice(-1).join(\"\");\n var _package = Package(packageName);\n var packageClasses = (typeof _package !== \"undefined\") ? (_package.filter(classFactory => {\n return isQCObjects_Class(classFactory) &&\n (classFactory.__definition.__classType === _className || (typeof classFactory === \"function\" && !!classFactory.name));\n }).reverse()) : ([]);\n if (packageClasses.length > 0) {\n _classFactory = packageClasses[0];\n }\n else {\n throw Error(`Class ${className} not found.`);\n }\n }\n else if (className !== null && Object.hasOwnProperty.call(_QC_CLASSES, className)) {\n _classFactory = _QC_CLASSES[className];\n }\n return _classFactory;\n };\n if (isBrowser) {\n Element.prototype.append = function QC_Append(child) {\n if (isQCObjects_Object(child) || typeof child.body !== \"undefined\") {\n this.appendChild(child.body);\n }\n else {\n this.appendChild(child);\n }\n };\n /**\n * A replacement for direct using of innerHTML\n * use: [element].render('content') where 'content' is the string corresponding\n * to the DOM to insert in the element\n **/\n Element.prototype.render = function QC_Render(content) {\n var _self = this;\n var _appendVDOM = function (_self, content) {\n if (typeof document.implementation.createHTMLDocument !== \"undefined\") {\n var doc = document.implementation.createHTMLDocument(\"\");\n doc.innerHTML = content;\n doc.body.subelements(\"*\").map(function (element) {\n return _self.append(element);\n });\n }\n };\n if (typeof this.innerHTML !== \"undefined\") {\n try {\n this.innerHTML += content;\n }\n catch (e) {\n _appendVDOM(_self, content);\n }\n }\n else {\n _appendVDOM(_self, content);\n }\n };\n }\n /**\n * Returns a method from a superior QCObjects Class\n * It is useful for Class Inheritance in the _new_ and __new__ method constructors\n * @example _super_('MySuperClass','MySuperMethod').call(this,params) #where this is the current instance and params are method parameters\n *\n * @param {String} className\n * @param {String} classMethodName\n * @param {Object} params\n */\n var _super_ = function (className, classMethodName, params) {\n return ClassFactory(className)[classMethodName];\n };\n _super_.prototype.toString = function () {\n return \"_super_(className,classMethodName,params) { [QCObjects native code] }\";\n };\n /**\n * Creates an object from a Class definition\n *\n * @param {QC_Object} o\n * @param {Object} args\n */\n var New = function (__class__, args) {\n args = (arguments.length > 1) ? (args) : ({});\n return (typeof __class__ === \"undefined\") ? (new Object()) : (new __class__(args));\n };\n New.prototype.toString = function () {\n return \"New(QCObjectsClassName, args) { [QCObjects native code] }\";\n };\n var Export = function (f) {\n return __make_global__(f);\n };\n Export.prototype.toString = function () {\n return \"Export(function or symbol) { [QCObjects native code] }\";\n };\n if (!isBrowser) {\n var findPackageNodePath = function (packagename) {\n const fs = _require_(\"fs\");\n var sdkPath = null;\n try {\n var sdkPaths = [\n `${_top.CONFIG.get(\"projectPath\")}${_top.CONFIG.get(\"relativeImportPath\")}`,\n `${_top.CONFIG.get(\"basePath\")}${_top.CONFIG.get(\"relativeImportPath\")}`,\n `${_top.CONFIG.get(\"projectPath\")}`,\n `${_top.CONFIG.get(\"basePath\")}`,\n `${_top.CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}${_top.CONFIG.get(\"relativeImportPath\")}`,\n `${process.cwd()}/node_modules/` + packagename,\n `${process.cwd()}/node_modules`,\n `${process.cwd()}`,\n \"node_modules\",\n \"./\",\n \"\"\n ].concat(module.paths);\n sdkPaths = sdkPaths.filter(p => {\n return fs.existsSync(p + \"/\" + packagename);\n });\n if (sdkPaths.length > 0) {\n sdkPath = sdkPaths[0];\n logger.info(packagename + \" is Installed.\");\n }\n else {\n // logger.debug(packagename + ' is not in a standard path.');\n }\n }\n catch (e) {\n // do nothing\n console.log(e);\n }\n return sdkPath;\n };\n Export(findPackageNodePath);\n }\n Class(\"_Crypt\", Object, {\n last_string: \"\",\n last_key: \"\",\n construct: false,\n _new_(o) {\n var string = o[\"string\"];\n var key = (o.hasOwnProperty.call(o, \"key\")) ? (o[\"key\"]) : (null);\n this.__new__(o);\n key = (key === null) ? (this.__instanceID) : (key);\n this.last_key = key;\n this.last_string = string;\n this.construct = true;\n },\n _encrypt() {\n var string = this.string;\n var key = this.key;\n var result = \"\";\n var char;\n var keychar;\n for (var i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) + keychar.charCodeAt(0));\n result += char;\n }\n this.last_string = Base64.encode(result);\n return this.last_string;\n },\n _decrypt() {\n var string = this.string;\n var key = this.key;\n var result = \"\";\n var char;\n var keychar;\n string = Base64.decode(string);\n for (var i = 0; i < string.length; i++) {\n char = string.substr(i, 1);\n keychar = key.substr((i % key.length) - 1, 1);\n char = String.fromCharCode(char.charCodeAt(0) - keychar.charCodeAt(0));\n result += char;\n }\n this.last_string = result;\n return this.last_string;\n },\n encrypt(string, key) {\n var crypt = New(ClassFactory(\"_Crypt\"), {\n string: string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._encrypt();\n },\n decrypt(string, key) {\n var crypt = New(ClassFactory(\"_Crypt\"), {\n string: string,\n key: (key !== \"\") ? (key) : (\"12345678ABC\")\n });\n return crypt._decrypt();\n }\n });\n var _CryptObject = function (o) {\n return ClassFactory(\"_Crypt\").encrypt(_DataStringify(o), _secretKey);\n };\n var _DecryptObject = function (s) {\n return (s === \"\") ? ({}) : (JSON.parse(ClassFactory(\"_Crypt\").decrypt(s, _secretKey)));\n };\n var shortCode = function () {\n var length = 1000;\n var code1 = ClassFactory(\"_Crypt\").encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date()).getTime().toString());\n var code2 = ClassFactory(\"_Crypt\").encrypt((Math.random() * length).toString().replace(\".\", \"\"), (new Date((new Date()).getTime() - 1000 * 1000)).getTime().toString());\n var shortCode = code2.list().map((o1, index) => {\n return code1.list()[index] === o1 ? null : o1;\n }).filter(c => c !== null).join(\"\");\n return shortCode;\n };\n var uniqueId = shortCode;\n Class(\"InheritClass\", class {\n }, {});\n class Processor extends ClassFactory(\"InheritClass\") {\n component = null;\n __definition = {};\n __classType = \"Processor\";\n static processors = {\n \"config\"(component, arg) {\n return _top.CONFIG.get(arg, \"\");\n },\n \"ENV\"(component, arg) {\n return (typeof process !== \"undefined\") ? (process.env[arg]) : (\"\");\n },\n \"global\"(component, arg) {\n return (typeof global !== \"undefined\") ? (global[arg]) : (\"\");\n }\n };\n static setProcessor(_proc_) {\n if (typeof _proc_ === \"function\" && _proc_.name !== \"\") {\n this.processors[_proc_.name] = _proc_;\n }\n }\n constructor() {\n super(...arguments);\n this.processors = Processor.processors;\n this.process = Processor.process.bind(this);\n this.processObject = Processor.processObject.bind(this);\n this.setProcessor = Processor.setProcessor.bind(this);\n this.execute = Processor.execute.bind(this);\n }\n static execute(component, processorName, args) {\n var processorHandler = (typeof component !== \"undefined\" && component !== null) ? (component.processorHandler) : (this);\n return processorHandler.processors[processorName].bind(processorHandler).apply(processorHandler, [component, ...args.split(\",\")]);\n }\n static process(template, component = null) {\n var processorHandler = (component !== null) ? (component.processorHandler) : (New(Processor, { component: null }));\n if (typeof template === \"string\") {\n Object.keys(processorHandler.processors).map(function (funcName) {\n [...template.matchAll(new RegExp(\"\\\\$\" + funcName + \"\\\\((.*)\\\\).*\", \"g\"))].map(function (procesorMatch) {\n var match0 = `$${funcName}(${procesorMatch[1]})`;\n template = template.replace(match0, processorHandler.execute.bind(processorHandler).call(processorHandler, component, funcName, procesorMatch[1]));\n });\n });\n }\n return template;\n }\n static processObject(obj, component = null) {\n var __instance__ = (component === null) ? (this) : (component.processorHandler);\n if (typeof __instance__ === \"undefined\") {\n __instance__ = new Processor({ component: component });\n }\n if (typeof obj === \"object\") {\n Object.keys(obj).map(function (_k) {\n if (typeof obj[_k] === \"object\" && !obj[_k].hasOwnProperty.call(obj[_k], \"call\")) {\n obj[_k] = __instance__.processObject.bind(__instance__)(obj[_k], component);\n }\n else if (typeof obj[_k] === \"string\") {\n obj[_k] = __instance__.process.bind(__instance__)(obj[_k], component);\n }\n });\n }\n else if (typeof obj === \"string\") {\n obj = __instance__.process.bind(__instance__)(obj, component);\n }\n return obj;\n }\n }\n Processor.__definition = {};\n Processor.__classType = \"Processor\";\n RegisterClass(Processor, \"com.qcobjects\");\n __make_global__(Processor);\n class ConfigSettings {\n static _instance = null;\n static _CONFIG_ENC = null;\n static get instance() {\n if (this._instance === null) {\n var _config_settings = new ConfigSettings();\n _config_settings._CONFIG = {\n \"relativeImportPath\": \"\",\n \"remoteImportsPath\": \"\",\n \"remoteSDKPath\": \"https://sdk.qcobjects.dev/\",\n \"asynchronousImportsLoad\": false,\n \"removePackageScriptAfterLoading\": true,\n \"componentsBasePath\": \"\",\n \"delayForReady\": 0,\n \"preserveComponentBodyTag\": false,\n \"useConfigService\": false,\n \"routingWay\": \"hash\",\n \"useSDK\": true,\n \"useLocalSDK\": false,\n \"basePath\": _basePath_\n };\n _config_settings._CONFIG_ENC = null;\n this._instance = _config_settings;\n }\n return this._instance;\n }\n static set instance(value) {\n this._instance = value;\n }\n }\n _QC_CLASSES[\"ConfigSettings\"] = ConfigSettings;\n Class(\"CONFIG\", Object, {\n get _CONFIG_ENC() {\n return ClassFactory(\"ConfigSettings\").instance._CONFIG_ENC;\n },\n get _CONFIG() {\n return ClassFactory(\"ConfigSettings\").instance._CONFIG;\n },\n set(name, value) {\n logger.debug(`CONFIG.set ${name}: ${value}`);\n // hack to force update basePath from CONFIG\n if (name === \"basePath\") {\n _basePath_ = value;\n }\n var _conf;\n try {\n _conf = (function (config) {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = ClassFactory(\"_Crypt\").encrypt(_DataStringify({}), _secretKey);\n }\n var _protectedEnc = config._CONFIG_ENC.valueOf();\n var _protectedConf = config._CONFIG.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n })(ClassFactory(\"ConfigSettings\").instance);\n }\n catch (e) {\n _conf = {};\n console.error(e);\n logger.debug(\"failed to encrypt config\");\n }\n _conf[name] = value;\n ClassFactory(\"ConfigSettings\").instance._CONFIG_ENC = _CryptObject(_conf);\n if (Object.hasOwnProperty.call(ClassFactory(\"ConfigSettings\").instance, \"_CONFIG\") && Object.hasOwnProperty.call(ClassFactory(\"ConfigSettings\").instance._CONFIG, name)) {\n ClassFactory(\"ConfigSettings\").instance._CONFIG[name] = value;\n }\n },\n get(name, _default) {\n var _value;\n try {\n var _conf = (function (config) {\n if (config._CONFIG_ENC === null) {\n config._CONFIG_ENC = ClassFactory(\"_Crypt\").encrypt(_DataStringify({}), _secretKey);\n }\n var _protectedEnc = config._CONFIG_ENC.valueOf();\n var _protectedConf = config._CONFIG.valueOf();\n return _CastProps(_protectedConf, _DecryptObject(_protectedEnc));\n })(ClassFactory(\"ConfigSettings\").instance);\n if (typeof _conf[name] !== \"undefined\") {\n _value = _conf[name];\n }\n else if (typeof _default !== \"undefined\") {\n _value = _default;\n }\n }\n catch (e) {\n console.error(e);\n logger.debug(\"Something wrong when trying to get CONFIG values\");\n logger.debug(\"No config value for: \" + name);\n _value = _default;\n }\n return Processor.processObject.call(Processor, _value);\n }\n });\n Export(waitUntil);\n Export(_super_);\n Export(ComplexStorageCache);\n Export(ClassFactory);\n Export(_DOMCreateElement);\n Export(shortCode);\n Export(__getType__);\n Export(is_a);\n var isQCObjects_Object = function (_) {\n return (typeof _ === \"object\" &&\n Object.hasOwnProperty.call(_, \"__classType\") &&\n (!!_.__instanceID) &&\n Object.hasOwnProperty.call(_, \"__definition\") &&\n typeof _.__definition !== \"undefined\") ? (true) : (false);\n };\n var isQCObjects_Class = function (_) {\n return (typeof _ === \"function\" &&\n (!_.__instanceID) &&\n (!!_.__definition) &&\n typeof _.__definition !== \"undefined\" &&\n !!_.__definition.__classType) ? (true) : (false);\n };\n /**\n * Defines a package for Class classification\n *\n * @param {Object} namespace\n * @param {Object} classes\n */\n var Package = function (namespace, classes) {\n if (_QC_PACKAGES.hasOwnProperty.call(_QC_PACKAGES, namespace) &&\n typeof _QC_PACKAGES[namespace] !== \"undefined\" &&\n _QC_PACKAGES[namespace].hasOwnProperty.call(_QC_PACKAGES[namespace], \"length\") &&\n _QC_PACKAGES[namespace].length > 0 &&\n typeof classes !== \"undefined\" &&\n classes.hasOwnProperty.call(classes, \"length\") &&\n classes.length > 0) {\n classes.filter(function (_c1) {\n return isQCObjects_Class(_c1);\n }).map(function (_class_) {\n _class_.__definition.__namespace = namespace;\n _class_.__namespace = namespace;\n });\n _QC_PACKAGES[namespace] = _QC_PACKAGES[namespace].concat(classes);\n }\n else if (typeof classes !== \"undefined\") {\n if (typeof classes === \"object\" && classes.hasOwnProperty.call(classes, \"length\")) {\n classes.filter(function (_c1) {\n return isQCObjects_Class(_c1);\n }).map(function (_class_) {\n _class_.__definition.__namespace = namespace;\n _class_.__namespace = namespace;\n });\n }\n else if (isQCObjects_Class(classes)) {\n classes.__definition.__namespace = namespace;\n classes.__namespace = namespace;\n }\n _QC_PACKAGES[namespace] = classes;\n }\n if (Object.hasOwnProperty.call(_QC_PACKAGES, namespace)) {\n _QC_PACKAGES[namespace].map(function (_class_) {\n __register_class__(_class_, namespace);\n });\n }\n return (Object.hasOwnProperty.call(_QC_PACKAGES, namespace)) ? (_QC_PACKAGES[namespace]) : (undefined);\n };\n Package.prototype.toString = function () {\n return \"Package(namespace, classes) { [QCObjects native code] }\";\n };\n Package(\"com.qcobjects\", [Processor]);\n /**\n * Declare Namespace\n *\n * @param {String} packageName\n * @param {Object} package\n */\n var NamespaceRef = function (namespace) {\n let packageInstance = Package(namespace);\n let classes = packageInstance.filter(c => isQCObjects_Class(c)).map(c => {\n return {\n [c.__definition.__classType]: c\n };\n }).reduce((a, b) => Object.assign(a, b));\n return namespace.split(\".\").map(c => {\n return {\n [c]: classes\n };\n }).reverse().reduce((a, b) => {\n b[Object.keys(b)] = a;\n return b;\n });\n };\n /**\n * Imports a script with the package nomenclature\n *\n * @param {Object} packagename\n * @param {Object} ready\n * @param {Boolean} external\n */\n var Import = function () {\n var packagename;\n var ready = function () { };\n var external = false;\n if (arguments.length < 1) {\n return;\n }\n else if (arguments.length === 1) {\n packagename = arguments[0];\n }\n else if (arguments.length === 2) {\n packagename = arguments[0];\n ready = arguments[1];\n }\n else if (arguments.length > 2) {\n packagename = arguments[0];\n ready = arguments[1];\n external = arguments[2];\n logger.debug(\"[Import] Setting external=\" + external.toString() + \" resource to import: \" + packagename);\n }\n if (external) {\n logger.debug(\"[Import] Registering external resource to import: \" + packagename);\n }\n else {\n logger.debug(\"[Import] Registering local resource to import: \" + packagename);\n }\n var _promise_import_;\n if (isBrowser) {\n _promise_import_ = new Promise(function (resolve, reject) {\n var allPackagesImported = function () {\n var ret = false;\n var cp = 0;\n for (var p in _QC_PACKAGES) {\n cp++;\n }\n if (cp < _QC_PACKAGES_IMPORTED.length) {\n ret = false;\n }\n else {\n ret = true;\n }\n return ret;\n };\n var readyImported = function (e) {\n _QC_PACKAGES_IMPORTED.push(ready);\n if (allPackagesImported()) {\n _QC_PACKAGES_IMPORTED.map(function (_imported_) {\n _QC_READY_LISTENERS.push(_imported_);\n });\n }\n if (isBrowser && _top.CONFIG.get(\"removePackageScriptAfterLoading\")) {\n e.target.remove();\n }\n resolve.call(_promise_import_, {\n \"_imported_\": e.target,\n \"_package_name_\": packagename\n });\n };\n if (!_QC_PACKAGES.hasOwnProperty.call(_QC_PACKAGES, packagename)) {\n var s1 = _DOMCreateElement(\"script\");\n s1.type = _top.CONFIG.get(\"sourceType\", \"text/javascript\");\n s1.async = (_top.CONFIG.get(\"asynchronousImportsLoad\")) ? (true) : (false);\n s1.onreadystatechange = function () {\n if (s1.readyState === \"complete\") {\n readyImported.call();\n }\n };\n s1.onload = readyImported;\n s1.onerror = function (e) {\n reject.call(_promise_import_, {\n \"_imported_\": s1,\n \"_package_name_\": packagename\n });\n };\n s1.src = (external) ? (_top.CONFIG.get(\"remoteImportsPath\") + packagename + \".js\") : (_basePath_ + _top.CONFIG.get(\"relativeImportPath\") + packagename + \".js\");\n document.getElementsByTagName(\"head\")[0].appendChild(s1);\n }\n });\n _promise_import_.catch(function () {\n logger.debug(\"Import: Error loading a package \");\n });\n }\n else {\n // support to be used in a nodejs environment\n _promise_import_ = new Promise(function (resolve, reject) {\n try {\n var standardNodePath = findPackageNodePath(packagename);\n var packageAbsoluteName = \"\";\n if (standardNodePath !== null) {\n packageAbsoluteName = standardNodePath + \"/\" + packagename;\n }\n else {\n var jsNodePath = findPackageNodePath(packagename + \".js\");\n if (jsNodePath !== null) {\n packageAbsoluteName = jsNodePath + \"/\" + packagename + \".js\";\n }\n else {\n packageAbsoluteName = _basePath_ + _top.CONFIG.get(\"relativeImportPath\") + packagename;\n }\n }\n try {\n resolve.call(_promise_import_, {\n \"_imported_\": _require_(`${packageAbsoluteName}`),\n \"_package_name_\": packagename\n });\n }\n catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n }\n catch (e) {\n reject.call(_promise_import_, {\n \"_imported_\": null,\n \"_package_name_\": packagename,\n \"error\": e\n });\n }\n }).catch(function (e) {\n // something wrong importing a package\n logger.debug(\"Something happened when importing \" + packagename);\n console.warn(e);\n });\n }\n _promise_import_.catch(function (e) {\n logger.warn(_DataStringify(e));\n });\n return _promise_import_;\n };\n Import.prototype.toString = function () {\n return \"Import(packagename,ready,external) { [QCObjects native code] }\";\n };\n if (isBrowser) {\n /**\n * Adds a Cast functionality to every Element of DOM\n */\n Element.prototype.Cast = function QC_Object(_o) {\n _o.__definition.body = this;\n var _o = New(_o);\n return _o;\n };\n }\n Class(\"TagElements\", Array, {\n show() {\n this.map(function (element) {\n return element.style.opacity = 1;\n });\n },\n hide() {\n this.map(function (element) {\n return element.style.opacity = 0;\n });\n },\n effect() {\n var effectArguments = [...arguments].slice(1);\n var effectClass = arguments[0];\n if ((typeof effectClass).toLowerCase() === \"string\") {\n effectClass = ClassFactory(effectClass);\n }\n this.map(function (element) {\n return effectClass.apply.apply(effectClass, [element].concat(effectArguments));\n });\n },\n findElements(elementName) {\n var _o = New(ClassFactory(\"TagElements\"));\n if (isBrowser) {\n for (var _k in this) {\n if (typeof _k === \"number\" && typeof this[_k] !== \"function\" && this[_k].hasOwnProperty.call(this[_k], \"subelements\")) {\n _o.push(this[_k].subelements(elementName));\n }\n }\n }\n else {\n // not yet implemented.\n }\n return _o;\n }\n });\n /**\n * Gets the element of DOM found by tag name\n *\n * @param {Object} tagname\n * @param {Object} innerHTML\n */\n var Tag = function (tagname, innerHTML) {\n var _o = New(ClassFactory(\"TagElements\"));\n if (isBrowser) {\n var o = document.subelements(tagname);\n var addedKeys = [];\n for (var _i = 0; _i < o.length; _i++) {\n if (typeof innerHTML !== \"undefined\" && o[_i].hasOwnProperty.call(o[_i], \"innerHTML\")) {\n o[_i].innerHTML = innerHTML;\n }\n if (addedKeys.indexOf(_i) < 0) {\n _o.push(o[_i]);\n addedKeys.push(_i);\n }\n }\n }\n else {\n // not yet implemented.\n }\n return _o;\n };\n /**\n * Defines a Custom Ready listener\n */\n function Ready(e) {\n if (isBrowser) {\n _QC_READY_LISTENERS.push(e.bind(window));\n }\n else if (typeof global !== \"undefined\") {\n _QC_READY_LISTENERS.push(e.bind(global));\n }\n }\n var ready = Ready; // case insensitive ready option\n /**\n * Default Ready event function for window. Executes all micro ready events of Import calls\n *\n * @param {Object} e\n */\n var _Ready = function (e) {\n var _execReady = function () {\n _QC_READY_LISTENERS.map(function (_ready_listener_, _r) {\n if (typeof _ready_listener_ === \"function\") {\n _ready_listener_.call();\n delete _QC_READY_LISTENERS[_r];\n }\n });\n };\n if (_top.CONFIG.get(\"delayForReady\") > 0) {\n if (isBrowser) {\n setTimeout(_execReady.bind(window), _top.CONFIG.get(\"delayForReady\"));\n }\n else if (typeof global !== \"undefined\") {\n setTimeout(_execReady.bind(global), _top.CONFIG.get(\"delayForReady\"));\n }\n }\n else {\n _execReady.call(_top);\n }\n };\n if (isBrowser) {\n window.onload = _Ready;\n if (is_phonegap) {\n document.addEventListener(\"deviceready\", _Ready, captureFalse);\n }\n }\n else {\n global.onload = _Ready;\n }\n /**\n * Dynamic Data Objects Class\n * Usage:\n * Class('TestDDO',{\n * data: {},\n * _new_ (){\n * this.ddo = New(DDO,{\n * instance:this,\n * name:'data',\n * value:{},\n * fget (value){\n * logger.debug('returned value '+ value );\n * }\n * })\n * }\n * });\n *\n */\n class DDO extends ClassFactory(\"InheritClass\") {\n constructor({ instance, name, fget, fset, value }) {\n super({\n instance,\n name,\n fget,\n fset,\n value\n });\n this._new_({\n instance,\n name,\n fget,\n fset,\n value\n });\n }\n _new_({ instance, name, fget, fset, value }) {\n var ddoInstance = this;\n var name = (typeof name === \"undefined\") ? (ObjectName(ddoInstance)) : (name);\n Object.defineProperty(instance, name, {\n set(val) {\n let _value = val;\n logger.debug(\"value changed \" + name);\n var ret;\n if (typeof fset !== \"undefined\" && typeof fset === \"function\") {\n ret = fset(_value);\n }\n else {\n ret = _value;\n }\n instance[\"_\" + name] = ret;\n return;\n },\n get() {\n let _value = instance[\"_\" + name];\n logger.debug(\"returning value \" + name);\n var is_ddo = function (v) {\n if (typeof v === \"object\" && Object.hasOwnProperty.call(v, \"value\")) {\n return v.value;\n }\n return v;\n };\n var ret;\n if (typeof fget !== \"undefined\" && typeof fget === \"function\") {\n ret = fget(is_ddo(_value));\n }\n else {\n ret = is_ddo(_value);\n }\n return ret;\n }\n });\n }\n }\n Export(DDO);\n class DefaultTemplateHandler {\n template = \"\";\n __definition = {};\n constructor({ component, template }) {\n this.component = component;\n this.template = template;\n }\n assign(data) {\n var templateInstance = this;\n if (typeof templateInstance.component === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component is undefined\");\n }\n if (typeof templateInstance.component.processorHandler === \"undefined\") {\n throw new Error(\"DefaultTemplateHandler.assign: component.processorHandler is undefined\");\n }\n var processorHandler = templateInstance.component.processorHandler;\n processorHandler.component = templateInstance.component;\n var parsedAssignmentText = (typeof templateInstance.template !== \"undefined\") ? (templateInstance.template) : (\"\");\n if (typeof data === \"object\") {\n [...Object.keys(data)].map(function (k) {\n var _value = data[k];\n if (typeof _value === \"string\" || typeof _value === \"number\" || (!isNaN(_value))) {\n try {\n _value = Processor.processObject.bind(processorHandler).call(processorHandler, _value, templateInstance.component);\n parsedAssignmentText = parsedAssignmentText.replace((new RegExp(`{{${k}}}`, \"g\")), _value);\n }\n catch (e) {\n logger.warn(`${templateInstance.component.name} could not parse processors.`);\n throw Error(`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);\n }\n }\n });\n }\n else {\n logger.debug(`${templateInstance.component.name}.data is not an object`);\n }\n try {\n parsedAssignmentText = Processor.processObject.call(processorHandler, parsedAssignmentText, templateInstance.component);\n }\n catch (e) {\n logger.warn(`${templateInstance.component.name} could not parse processors.`);\n throw Error(`${templateInstance.component.name} could not parse processors. Reason: ${e.message}`);\n }\n return parsedAssignmentText;\n }\n }\n DefaultTemplateHandler.__definition = {};\n RegisterClass(DefaultTemplateHandler, \"com.qcobjects\");\n var __routing_params__ = function (routing, routingPath) {\n let standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\"); //allowing {param}\n return {\n ...[...routingPath.matchAll((new RegExp(standardRoutingPath, \"g\")))][0][\"groups\"]\n };\n };\n var __valid_routings__ = function (routings, routingPath) {\n return routings.filter(function (routing) {\n var standardRoutingPath = routing.path.replace(/{(.*?)}/g, \"(?<$1>.*)\");\n return (new RegExp(standardRoutingPath, \"g\")).test(routingPath);\n }).reverse();\n };\n var __valid_routing_way__ = function (validRoutingWays, routingWay) {\n return validRoutingWays.includes(routingWay);\n };\n var _buildComponentFromElement_ = function (element, __parent__) {\n var __shadowed_not_set = (element.getAttribute(\"shadowed\") === null) ? (true) : (false);\n var __tplsource_attr_not_set = (element.getAttribute(\"template-source\") === null) ? (true) : (false);\n var shadowed = (element.getAttribute(\"shadowed\") === \"true\") ? (true) : (false);\n var __cached_not_set = (element.getAttribute(\"cached\") === null) ? (true) : (false);\n var cached = (element.getAttribute(\"cached\") === \"true\") ? (true) : (false);\n var tplextension = (typeof _top.CONFIG.get(\"tplextension\") !== \"undefined\") ? (_top.CONFIG.get(\"tplextension\")) : (\"html\");\n tplextension = (element.getAttribute(\"tplextension\") !== null) ? (element.getAttribute(\"tplextension\")) : (tplextension);\n var _componentName = element.getAttribute(\"name\");\n var _componentClassName = (element.getAttribute(\"componentClass\") !== null) ? (element.getAttribute(\"componentClass\")) : (\"Component\");\n let __componentClassName = (_top.CONFIG.get(\"preserveComponentBodyTag\")) ? ((_componentName !== null) ? (\"com.qcobjects.components.\" + _componentName + \".ComponentBody\") : (\"com.qcobjects.components.ComponentBody\")) : (_componentClassName);\n _componentName = (_componentName !== null) ? (_componentName) : ((ClassFactory(__componentClassName) &&\n typeof ClassFactory(__componentClassName).name !== \"undefined\") ? (ClassFactory(__componentClassName).name) : (\"\"));\n var __classDefinition = ClassFactory(__componentClassName);\n var __tplsource_prop_set = (__componentClassName !== \"Component\" && ((typeof __classDefinition !== \"undefined\" && typeof __classDefinition.tplsource === \"string\") && __classDefinition.tplsource !== \"\")) ? (true) : (false);\n var tplsource = (__tplsource_attr_not_set && __tplsource_prop_set) ? (__classDefinition.tplsource) : ((__tplsource_attr_not_set) ? (\"default\") : (element.getAttribute(\"template-source\")));\n logger.debug(`template source for ${_componentName} is ${tplsource} `);\n logger.debug(`type for ${_componentName} is ${__getType__(__classDefinition)} `);\n var componentURI;\n componentURI = ComponentURI({\n \"COMPONENTS_BASE_PATH\": _top.CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": _componentName,\n \"TPLEXTENSION\": tplextension,\n \"TPL_SOURCE\": tplsource\n });\n if (_top.CONFIG.get(\"preserveComponentBodyTag\")) {\n Package((_componentName !== \"\") ? (\"com.qcobjects.components.\" + _componentName + \"\") : (\"com.qcobjects.components\"), [\n Class(\"ComponentBody\", ClassFactory(\"Component\"), {\n name: _componentName,\n tplsource: tplsource,\n tplextension: tplextension,\n reload: true\n })\n ]);\n }\n var __create_component_instance_ = function () {\n var __shadowed = (__shadowed_not_set) ? ((__classDefinition && __classDefinition.shadowed) || ClassFactory(\"Component\").shadowed) : (shadowed);\n var __definition = {\n __parent__: __parent__,\n name: _componentName,\n cached: (__cached_not_set) ? (ClassFactory(\"Component\").cached) : (cached),\n shadowed: __shadowed,\n tplextension: tplextension,\n body: (_top.CONFIG.get(\"preserveComponentBodyTag\")) ? (_DOMCreateElement(\"componentBody\")) : (element),\n templateURI: componentURI,\n tplsource: tplsource\n };\n if (typeof _componentName === \"undefined\" || _componentName === \"\" || _componentName === null) {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete __definition.name;\n }\n if (componentURI === \"\") {\n /* this allows to use the original property defined\n in the component definition if it is not present in the tag */\n delete __definition.templateURI;\n }\n var newComponent = New(__classDefinition, __definition);\n if (_top.CONFIG.get(\"preserveComponentBodyTag\")) {\n element.append(newComponent);\n }\n return newComponent;\n };\n var newComponent = __create_component_instance_.call(this);\n return newComponent;\n };\n var _buildComponentsFromElements_ = function (elements, __parent__) {\n var componentsBuiltWith = [];\n if (isBrowser) {\n componentsBuiltWith = elements.map(function (element) {\n return _buildComponentFromElement_(element, __parent__);\n });\n }\n else {\n logger.debug(\"[_buildComponentsFromElements_] not implemented for Non-Browser environments\");\n }\n return componentsBuiltWith;\n };\n Package(\"com.qcobjects\", [\n class Component extends ClassFactory(\"InheritClass\") {\n validRoutingWays = [\"pathname\", \"hash\", \"search\"];\n basePath = _basePath_;\n domain = _domain_;\n templateHandler = \"DefaultTemplateHandler\";\n processorHandler = null;\n routingWay = null;\n routingNodes = [];\n routings = [];\n routingPath = \"\";\n routingPaths = [];\n _componentHelpers = [];\n subcomponents = [];\n splashScreenComponent = undefined;\n controller = undefined;\n view = undefined;\n effect = undefined;\n method = \"GET\";\n cached = true;\n __promise__ = null;\n __namespace = undefined;\n constructor({ __parent__, templateURI = \"\", template, tplsource = \"default\", tplextension, url = \"\", name = \"\", method = \"GET\", data = {}, reload = false, shadowed = false, cached = true, _body = _DOMCreateElement(\"div\"), __promise__ = null, __shadowRoot, body, shadowRoot, splashScreenComponent, controller, view }) {\n if (arguments.length < 1) {\n throw Error(`No arguments in component. You must at least give one argument.`);\n }\n super({\n __parent__,\n templateURI,\n template,\n tplextension,\n tplsource,\n url,\n name,\n method,\n data,\n reload,\n shadowed,\n cached,\n _body,\n __promise__,\n __shadowRoot,\n body,\n shadowRoot,\n splashScreenComponent,\n controller,\n view\n });\n var self = this;\n if (typeof self.name === \"undefined\") {\n logger.warn(\"A name is not defined for \" + __getType__(self));\n }\n self.routingWay = _top.CONFIG.get(\"routingWay\");\n self.processorHandler = New(Processor, {\n component: self\n });\n /* assign body data attributes to data */\n self.data = (typeof self.data === \"undefined\" || self.data === null) ? ({}) : (self.data);\n self.data = Object.assign(self.data, self.dataAttributes);\n self.createServiceInstance()\n .then(function (serviceResponse) {\n if (typeof self.__new__ === \"function\") {\n self.__new__.call(self, self);\n }\n self._generateRoutingPaths(self.body)\n .then(function () {\n self._reroute_()\n .then(function () {\n return self.rebuild()\n .then(function () {\n logger.info(`Component._new_ The component ${self.name} was built successfully!`);\n }).catch(function (standardResponse) {\n logger.warn(`Component._new_ Something went wrong building the component ${self.name}`);\n console.error(standardResponse);\n });\n });\n });\n });\n }\n set body(value) {\n var self = this;\n self._body = value;\n }\n get body() {\n var self = this;\n return self._body;\n }\n set cacheIndex(value) {\n // readonly\n logger.debug(\"[cacheIndex] This property is readonly\");\n }\n get cacheIndex() {\n var self = this;\n var __routing_path__ = _DataStringify(self.routingPath);\n return Base64.encode(self.name + __routing_path__);\n }\n set parsedAssignmentText(value) {\n // readonly\n logger.debug(\"[parsedAssignmentText] This property is readonly\");\n }\n get parsedAssignmentText() {\n var self = this;\n self._parsedAssignmentText = self.parseTemplate(self.template);\n if (typeof self._parsedAssignmentText === \"undefined\") {\n throw Error(`[Component][${this.name}][parsedAssignmentText] Could not generate content!`);\n }\n return self._parsedAssignmentText;\n }\n set shadowRoot(value) {\n var self = this;\n if (typeof self.__shadowRoot == \"undefined\") {\n self.__shadowRoot = value;\n }\n else {\n logger.debug(\"[shadowRoot] This property can only be assigned once!\");\n }\n }\n get shadowRoot() {\n var self = this;\n return self.__shadowRoot;\n }\n set routingSelected(value) {\n logger.debug(\"[routingSelected] This is a read-only property of the component\");\n }\n get routingSelected() {\n var self = this;\n return __valid_routings__(self.routings, self.routingPath);\n }\n set routingParams(value) {\n logger.debug(\"[routingParams] This is a read-only property of the component\");\n }\n get routingParams() {\n var component = this;\n return [{}].concat(component.routingSelected.map(function (routing) {\n return __routing_params__(routing, component.routingPath);\n })).reduce(function (accumulator, colData, index) {\n return Object.assign(accumulator, colData);\n });\n }\n createServiceInstance() {\n var component = this;\n var body = component.body;\n var data = this.data;\n var __serviceClass;\n var __classDefinition = component.getClass().__definition;\n var _serviceClassName = (isBrowser && body.getAttribute(\"serviceClass\") !== null) ? (body.getAttribute(\"serviceClass\")) : (null);\n return new Promise(function (resolve, reject) {\n /* __enable_service_class__ = true by default */\n var __enable_service_class__ = ((Object.hasOwnProperty.call(body, \"enableServiceClass\") && body.enableServiceClass) ||\n (!Object.hasOwnProperty.call(body, \"enableServiceClass\"))) ? (true) : (false);\n var _response_to_data_ = (isBrowser && body.getAttribute(\"response-to\") !== null && body.getAttribute(\"response-to\") === \"data\") ? (true) : (false);\n var _response_to_template_ = (isBrowser && body.getAttribute(\"response-to\") !== null && body.getAttribute(\"response-to\") === \"template\") ? (true) : (false);\n if (__enable_service_class__ && _serviceClassName !== null) {\n __serviceClass = ClassFactory(_serviceClassName);\n }\n if (!_response_to_data_ && __classDefinition && Object.hasOwnProperty.call(__classDefinition, \"responseTo\")) {\n _response_to_data_ = (__classDefinition.responseTo === \"data\") ? (true) : (false);\n }\n else if (!_response_to_data_ && Object.hasOwnProperty.call(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_data_ = (ClassFactory(\"Component\").responseTo === \"data\") ? (true) : (false);\n }\n if (!_response_to_template_ && __classDefinition && Object.hasOwnProperty.call(__classDefinition, \"responseTo\")) {\n _response_to_template_ = (__classDefinition.responseTo === \"template\") ? (true) : (false);\n }\n else if (!_response_to_template_ && Object.hasOwnProperty.call(ClassFactory(\"Component\"), \"responseTo\")) {\n _response_to_template_ = (ClassFactory(\"Component\").responseTo === \"template\") ? (true) : (false);\n }\n if (typeof __serviceClass !== \"undefined\" &&\n (typeof __enable_service_class__ !== \"undefined\" &&\n __enable_service_class__ === true) &&\n (_response_to_data_ || _response_to_template_)) {\n logger.info(\"Loading service \" + _serviceClassName);\n var serviceInstance = New(__serviceClass, {\n data: data\n });\n serviceLoader(serviceInstance).then(function ({ request, service }) {\n var serviceResponse;\n if (typeof service.JSONresponse !== \"undefined\" && service.JSONresponse !== null) {\n serviceResponse = service.JSONresponse;\n }\n else {\n serviceResponse = service.template;\n }\n if (_response_to_data_) {\n if (typeof data === \"object\" && typeof serviceResponse === \"object\") {\n data = Object.assign(data, serviceResponse);\n }\n else {\n data = serviceResponse;\n }\n component.data = data;\n }\n component.serviceInstance = serviceInstance;\n component.serviceData = data;\n if (_response_to_template_) {\n component.template = serviceResponse;\n }\n resolve(serviceResponse);\n }, function (rejectedResponse) {\n logger.debug(`Service loading rejected for ${_serviceClassName} in ${component.name}`);\n reject(rejectedResponse);\n }).catch(function (e) {\n logger.debug(\"Something went wroing while trying to load the service \" + _serviceClassName);\n throw Error(`Error loading ${_serviceClassName} for ${component.name}. Detail: ${e}`);\n });\n }\n else {\n resolve(null);\n }\n });\n }\n _bindroute_() {\n var _component_ = this;\n if (!_component_._bindroute_.loaded) {\n if (isBrowser) {\n _component_.hostElements(\"a\").map(function (a) {\n a.oldclick = a.onclick;\n a.onclick = function (e) {\n var _ret_ = true;\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n var routingWay = _top.CONFIG.get(\"routingWay\");\n var routingPath = e.target[routingWay];\n if (_top.global.get(\"routingPaths\").includes(routingPath) &&\n e.target[routingWay] !== document.location[routingWay] &&\n e.target.href !== document.location.href) {\n logger.debug(\"A ROUTING WAS FOUND: \" + routingPath);\n window.history.pushState({\n href: e.target.href\n }, e.target.href, e.target.href);\n ClassFactory(\"Component\").route();\n _ret_ = false;\n }\n else {\n logger.debug(\"NO ROUTING FOUND FOR: \" + routingPath);\n }\n if (typeof e.target.oldclick !== \"undefined\" && typeof e.target.oldclick === \"function\") {\n e.target.oldclick.call(e.target, e);\n }\n return _ret_;\n };\n return null;\n });\n }\n else {\n // not yet implemented.\n }\n this._bindroute_.loaded = true;\n }\n else {\n logger.debug(`Routes already bound to popstate events for ${_component_.name}`);\n }\n }\n done(standardResponse) {\n var _ret_;\n if (typeof standardResponse !== \"undefined\") {\n var { request, component } = standardResponse;\n _ret_ = Promise.resolve({ request, component });\n }\n return _ret_;\n }\n createControllerInstance() {\n var _Controller;\n if (isBrowser) {\n if (typeof this.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n var controllerName = this.body.getAttribute(\"controllerClass\");\n if (!controllerName) {\n controllerName = \"Controller\";\n }\n _Controller = ClassFactory(controllerName);\n if (typeof _Controller !== \"undefined\") {\n this.controller = New(_Controller, {\n component: this\n });\n }\n }\n return new Promise((resolve, reject) => {\n if (isBrowser) {\n if (typeof _Controller !== \"undefined\" && typeof this.controller !== \"undefined\") {\n if (typeof this.controller.done === \"function\") {\n try {\n this.controller.done.call(this.controller);\n }\n catch (e) {\n throw Error(e);\n }\n }\n else {\n logger.debug(`${controllerName} does not have a done() method.`);\n reject(`${controllerName} does not have a done() method.`);\n }\n if (typeof this.controller.createRoutingController === \"function\") {\n this.controller.createRoutingController.call(this.controller);\n }\n else {\n logger.debug(`${controllerName} does not have a createRoutingController() method.`);\n }\n }\n }\n resolve({ component: this, controller: this.controller });\n });\n }\n createEffectInstance() {\n var _component_ = this;\n return new Promise(function (resolve, reject) {\n if (isBrowser) {\n var effectClassName = _component_.body.getAttribute(\"effectClass\");\n var applyEffectTo = _component_.body.getAttribute(\"apply-effect-to\");\n applyEffectTo = (applyEffectTo !== null) ? (applyEffectTo) : (\"load\");\n if (effectClassName !== null && applyEffectTo === \"observe\") {\n _component_.applyObserveTransitionEffect(effectClassName);\n }\n else if (effectClassName !== null && applyEffectTo === \"load\") {\n _component_.applyTransitionEffect(effectClassName);\n }\n }\n resolve({ component: _component_, effect: _component_.effect });\n });\n }\n createViewInstance() {\n var _component_ = this;\n return new Promise(function (resolve, reject) {\n var viewName = (isBrowser) ? (_component_.body.getAttribute(\"viewClass\")) : (null);\n if (viewName !== null) {\n var _View = ClassFactory(viewName);\n if (typeof _View !== \"undefined\") {\n _component_.view = New(_View, {\n component: _component_\n }); // Initializes the main view for the component\n if (Object.hasOwnProperty.call(_component_.view, \"done\") && typeof _component_.view.done === \"function\") {\n _component_.view.done.call(_component_.view);\n }\n }\n }\n resolve({ component: _component_, view: _component_.view });\n });\n }\n __done__() {\n var _component_ = this;\n var componentDone = function () {\n if (typeof _component_ === \"undefined\") {\n throw new Error(\"componentDone() has lost its context\");\n }\n if (typeof _component_.body === \"undefined\") {\n throw new Error(\"The component has no body\");\n }\n _component_.createViewInstance();\n _component_.createControllerInstance();\n _component_.createEffectInstance();\n logger.debug(`Trying to run component helpers for ${_component_.name}...`);\n try {\n _component_.runComponentHelpers();\n logger.debug(`Component helpers for ${_component_.name} executed.`);\n }\n catch (e) {\n logger.debug(`Component helpers for ${_component_.name} could not be executed.`);\n throw Error(e);\n }\n _component_.subcomponents = _component_.__buildSubComponents__();\n _component_._bindroute_();\n if (isBrowser) {\n _component_.body.setAttribute(\"loaded\", true);\n }\n };\n return new Promise(function (resolve, reject) {\n try {\n resolve(componentDone.call(_component_));\n }\n catch (e) {\n reject(e);\n }\n });\n }\n hostElements(tagFilter) {\n var _component_ = this;\n var elementList = [];\n if (isBrowser) {\n elementList = (_component_.shadowed && (typeof _component_.shadowRoot !== \"undefined\")) ? (_component_.shadowRoot.subelements(tagFilter)) : (_component_.body.subelements(tagFilter));\n }\n return elementList;\n }\n get subtags() {\n var _component_ = this;\n var tagFilter = _tag_filter_;\n return _component_.hostElements(tagFilter);\n }\n get bodyAttributes() {\n var _component_ = this;\n var c = _component_.body;\n return (isBrowser) ? ([...c.getAttributeNames()].map(a => { return { [a]: c.getAttribute(a) }; }).reduce((accumulator, colData, index) => { return Object.assign(accumulator, colData); })) : ({});\n }\n get dataAttributes() {\n var _component_ = this;\n var c = _component_.body;\n return (isBrowser) ? ([{}].concat([...c.getAttributeNames()].filter(n => n.startsWith(\"data-\")).map(a => { return { [a.split(\"-\")[1]]: c.getAttribute(a) }; })).reduce((accumulator, colData, index) => { return Object.assign(accumulator, colData); })) : ({});\n }\n __buildSubComponents__(rebuildObjects = false) {\n var _component_ = this;\n var elementList = _component_.subtags;\n if (!rebuildObjects) {\n elementList = elementList.filter(t => t.getAttribute(\"loaded\") !== \"true\");\n }\n if ((typeof _component_ !== \"undefined\") || _component_.subcomponents.length < 1) {\n _component_.subcomponents = _buildComponentsFromElements_(elementList, _component_);\n }\n return _component_.subcomponents;\n }\n fail(standardResponse) {\n var _ret_;\n if (typeof standardResponse !== \"undefined\") {\n var { error, component } = standardResponse;\n _ret_ = Promise.resolve({ error, component });\n }\n return _ret_;\n }\n set(name, value) {\n this[name] = value;\n }\n get(name) {\n return this[name];\n }\n feedComponent() {\n var _component_ = this;\n logger.debug(`[Component][${this.name}][feedComponent] start feeding component...`);\n var _feedComponent_InBrowser = function (_component_) {\n if (typeof _component_.container === \"undefined\" && typeof _component_.body === \"undefined\") {\n logger.warn(\"COMPONENT {{NAME}} has an undefined container and body\".replace(\"{{NAME}}\", _component_.name));\n return;\n }\n var container = (typeof _component_.container === \"undefined\" || _component_.container === null) ? (_component_.body) : (_component_.container);\n var parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n if (_component_.shadowed) {\n logger.debug(\"COMPONENT {{NAME}} is shadowed\".replace(\"{{NAME}}\", _component_.name));\n logger.debug(\"Preparing slots for Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n var tmp_shadowContainer = _DOMCreateElement(\"div\");\n container.subelements(\"[slot]\").map(function (c) {\n if (c.parentElement === container) {\n tmp_shadowContainer.appendChild(c);\n }\n });\n logger.debug(\"Creating shadowedContainer for COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n var shadowContainer = _DOMCreateElement(\"div\");\n shadowContainer.classList.add(\"shadowHost\");\n try {\n _component_.shadowRoot = shadowContainer.attachShadow({\n mode: \"open\"\n });\n }\n catch (e) {\n try {\n logger.debug(\"Shadowed COMPONENT {{NAME}} is repeated\".replace(\"{{NAME}}\", _component_.name));\n _component_.shadowRoot = shadowContainer.shadowRoot;\n }\n catch (e) {\n logger.warn(\"Shadowed COMPONENT {{NAME}} is not allowed on this browser\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n if (typeof _component_.shadowRoot !== \"undefined\" && _component_.shadowRoot !== null) {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR Shadowed COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n shadowContainer.shadowRoot.innerHTML = _component_.innerHTML;\n }\n else {\n tmp_shadowContainer.innerHTML = _component_.parseTemplate(tmp_shadowContainer.innerHTML);\n logger.debug(\"ADDING Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n shadowContainer.shadowRoot.innerHTML += _component_.innerHTML;\n }\n logger.debug(\"ADDING Slots to Shadowed COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n shadowContainer.innerHTML += tmp_shadowContainer.innerHTML;\n logger.debug(\"APPENDING Shadowed COMPONENT {{NAME}} to Container \".replace(\"{{NAME}}\", _component_.name));\n var qs = container.querySelector(\".shadowHost\");\n if (!(typeof qs !== \"undefined\" && qs !== null)) {\n container.appendChild(shadowContainer);\n }\n else {\n logger.debug(\"Shadowed Container for COMPONENT {{NAME}} is already present in the tree \".replace(\"{{NAME}}\", _component_.name));\n _component_.shadowRoot.innerHTML = shadowContainer.shadowRoot.innerHTML;\n }\n }\n else {\n logger.warn(\"Shadowed COMPONENT {{NAME}} is bad configured\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n else {\n if (_component_.reload) {\n logger.debug(\"FORCED RELOADING OF CONTAINER FOR COMPONENT {{NAME}}\".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML = _component_.innerHTML;\n }\n else if (container && _component_) {\n logger.debug(\"ADDING COMPONENT {{NAME}} \".replace(\"{{NAME}}\", _component_.name));\n container.innerHTML += _component_.innerHTML;\n }\n else {\n logger.warn(\"COMPONENT {{NAME}} is not added to the DOM\".replace(\"{{NAME}}\", _component_.name));\n }\n }\n };\n var _feedComponent_InNode = function (_component_) {\n var parsedAssignmentText = _component_.parsedAssignmentText;\n _component_.innerHTML = parsedAssignmentText;\n };\n var _ret_;\n if (!is_a(_component_, \"Component\")) {\n logger.warn(\"Trying to feed a non component object\");\n return;\n }\n if (isBrowser) {\n _ret_ = _feedComponent_InBrowser(_component_);\n }\n else {\n _ret_ = _feedComponent_InNode(_component_);\n }\n return _ret_;\n }\n rebuild() {\n var _component = this;\n var _promise = new Promise(function (resolve, reject) {\n if (typeof _component === \"undefined\" || _component === null) {\n reject(\"Component is undefined\");\n }\n if (isQCObjects_Object(_component) && is_a(_component, \"Component\")) {\n switch (true) {\n case (_component.get(\"tplsource\") === \"none\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=none, so no template load was done\");\n var standardResponse = {\n request: null,\n component: _component\n };\n _component.__done__().then(function () {\n if (typeof _component.done === \"function\") {\n _component.done.call(_component, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n }, function () {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"inline\"):\n logger.debug(\"Component \" + _component.name + \" has specified template-source=inline, so it is assumed that template is already declared\");\n (async function (_component) {\n _component.feedComponent.bind(_component)();\n })(_component);\n var standardResponse = {\n request: null,\n component: _component\n };\n _component.__done__().then(function () {\n if (typeof _component.done === \"function\") {\n _component.done.call(_component, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n }, function () {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"default\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"basePath\") + _component.get(\"templateURI\"));\n componentLoader(_component, false).then(function (standardResponse) {\n resolve.call(_promise, standardResponse);\n }, function (standardResponse) {\n reject.call(_promise, standardResponse);\n });\n break;\n case (_component.get(\"tplsource\") === \"external\" &&\n _component.get(\"templateURI\") !== \"\"):\n _component.set(\"url\", _component.get(\"templateURI\"));\n componentLoader(_component, false).then(function (standardResponse) {\n resolve.call(_promise, standardResponse);\n }, function (standardResponse) {\n reject.call(_promise, standardResponse);\n });\n break;\n case _component.get(\"tplsource\") === \"default\" && _component.get(\"templateURI\", \"\") === \"\":\n logger.debug(`Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n reject.call(_promise, `Component ${_component.name} template-source is ${_component.get(\"tplsource\")} and no templateURI is present`);\n break;\n default:\n logger.debug(\"Component \" + _component.name + \" will not be rebuilt because no templateURI is present\");\n reject.call(_promise, {\n request: null,\n component: _component\n });\n break;\n }\n }\n });\n return _promise;\n }\n Cast(oClass) {\n /* Cast method for components has been deprecated. Don't use this method, it is available only for compatibility purposes */\n let o = _methods_(oClass).map(m => m.name.replace(/bound /g, \"\")).map(m => {\n return {\n [m]: oClass[m].bind(this)\n };\n }).reduce((c, p) => Object.assign(c, p), {});\n return _Cast(this, o);\n }\n static route() {\n var componentClass = this; /* is can be class or object*/\n var _route_promise_;\n var isValidInstance = (isQCObjects_Object(componentClass) && is_a(componentClass, \"Component\")) ? (true) : (false);\n var __route__ = function (componentList) {\n var _componentNames_ = [];\n var _promises_ = componentList.filter(function (rc) {\n return typeof rc !== \"undefined\";\n }).map(function (rc) {\n if (typeof rc.name !== \"undefined\") {\n _componentNames_.push(rc.name);\n }\n else {\n throw new Error(__getType__(rc) + \" does not have a name\");\n }\n return new Promise(function (resolve, reject) {\n var _promise_;\n if (typeof rc !== \"undefined\" && !!rc._reroute_) {\n _promise_ = rc._reroute_()\n .then(function () {\n rc.reload = true;\n return rc.rebuild();\n })\n .then(function (_rc_) {\n if (Object.hasOwnProperty.call(rc, \"subcomponents\") &&\n typeof rc.subcomponents !== \"undefined\" &&\n rc.subcomponents.length > 0) {\n logger.debug(\"LOOKING FOR ROUTINGS IN SUBCOMPONENTS FOR: \" + rc.name);\n return __route__.call(rc, rc.subcomponents);\n }\n else {\n logger.debug(\"No subcomponents to look for routings in: \" + rc.name);\n if (rc.subtags.length > 0) {\n rc.subcomponents = rc.__buildSubComponents__(true);\n }\n resolve(rc);\n }\n });\n }\n else if (typeof rc !== \"undefined\") {\n reject(\"Component \" + rc.name + \" is not an instance of Component\");\n }\n return _promise_;\n });\n });\n return Promise.all(_promises_)\n .then(function () {\n logger.debug(\"ROUTING COMPLETED FOR \" + _componentNames_.join(\", \"));\n }).catch(function (err) {\n logger.warn(\"ROUTING FAILED FOR \" + _componentNames_.join(\", \") + \": \" + err);\n });\n };\n if (isValidInstance || !!_top.componentsStack) {\n if (isValidInstance) {\n logger.debug(\"loading routings for instance \" + componentClass.name);\n }\n _route_promise_ = __route__.call(componentClass, (isValidInstance) ? (componentClass.subcomponents) : (_top.componentsStack));\n }\n else {\n logger.debug(\"An undetermined result expected if load routings. So will not be loaded this time.\");\n throw Error(`There is no valid instance and no components stack available to apply rountings`);\n }\n return _route_promise_;\n }\n fullscreen() {\n if (isBrowser) {\n var elem = this.body;\n if (elem.requestFullscreen) {\n elem.requestFullscreen();\n }\n else if (elem.mozRequestFullScreen) {\n /* Firefox */\n elem.mozRequestFullScreen();\n }\n else if (elem.webkitRequestFullscreen) {\n /* Chrome, Safari & Opera */\n elem.webkitRequestFullscreen();\n }\n else if (elem.msRequestFullscreen) {\n /* IE/Edge */\n elem.msRequestFullscreen();\n }\n }\n else {\n // not yet implemented.\n }\n }\n closefullscreen() {\n if (isBrowser) {\n if (document.exitFullscreen) {\n document.exitFullscreen();\n }\n else if (document.mozCancelFullScreen) {\n document.mozCancelFullScreen();\n }\n else if (document.webkitExitFullscreen) {\n document.webkitExitFullscreen();\n }\n else if (document.msExitFullscreen) {\n document.msExitFullscreen();\n }\n }\n else {\n // noy yet implemented.\n }\n }\n _generateRoutingPaths(componentBody) {\n var component = this;\n return new Promise(function (resolve, reject) {\n if (isBrowser) {\n if (__valid_routing_way__(component.validRoutingWays, component.routingWay)) {\n if (typeof componentBody !== \"undefined\") {\n component.innerHTML = componentBody.innerHTML;\n component.routingNodes = componentBody.subelements(\"routing\");\n component.routings = [];\n component.routingNodes.map(function (routingNode, r) {\n var attributeNames = routingNode.getAttributeNames();\n var routing = {};\n attributeNames.map(function (attributeName, a) {\n routing[attributeNames[a]] = routingNode.getAttribute(attributeNames[a]);\n });\n component.routings.push(routing);\n if (!component.routingPaths) {\n component.routingPaths = [];\n }\n if (!component.routingPaths.includes(routing.path)) {\n component.routingPaths.push(routing.path);\n }\n if (!_top.global.get(\"routingPaths\")) {\n _top.global.set(\"routingPaths\", []);\n }\n if (!_top.global.get(\"routingPaths\").includes(routing.path)) {\n _top.global.get(\"routingPaths\").push(routing.path);\n }\n });\n }\n }\n }\n else {\n // not yet implemented.\n }\n resolve();\n });\n }\n parseTemplate(template) {\n var _self = this;\n var _parsedAssignmentText;\n var value = template;\n if (Object.hasOwnProperty.call(_self, \"templateHandler\")) {\n var templateHandlerName = _self.templateHandler;\n logger.debug(`[Component][${this.name}][parseTemplate] Attempting to use ${templateHandlerName} ...`);\n var templateHandlerClass = ClassFactory(templateHandlerName);\n var templateInstance = New(templateHandlerClass, {\n component: _self,\n template: value\n });\n templateInstance.component = _self;\n var selfData = _self.data;\n if (Object.hasOwnProperty.call(_self, \"assignRoutingParams\") && _self.assignRoutingParams) {\n try {\n selfData = Object.assign(selfData, _self.routingParams);\n }\n catch (e) {\n logger.debug(\"[parseTemplate] it was not possible to assign the routing params to the template\");\n }\n }\n _parsedAssignmentText = templateInstance.assign(selfData);\n }\n else {\n logger.debug(`[Component][${this.name}][parseTemplate] No value for templateHandler. Using raw content...`);\n _parsedAssignmentText = value;\n }\n return _parsedAssignmentText;\n }\n _reroute_() {\n /* This method set the selected routing and makes the switch to the templateURI */\n var rc = this;\n return new Promise(function (resolve, reject) {\n if (isBrowser) {\n if (__valid_routing_way__(rc.validRoutingWays, rc.routingWay)) {\n rc.routingPath = document.location[rc.routingWay];\n rc.routingSelected.map(function (routing, r) {\n var componentURI = ComponentURI({\n \"COMPONENTS_BASE_PATH\": _top.CONFIG.get(\"componentsBasePath\"),\n \"COMPONENT_NAME\": routing.name.toString(),\n \"TPLEXTENSION\": (Object.hasOwnProperty.call(routing, \"tplextension\")) ? (routing.tplextension) : (rc.tplextension),\n \"TPL_SOURCE\": \"default\" /* here is always default in order to get the right uri */\n });\n rc.templateURI = componentURI;\n });\n if (rc.routingSelected.length > 0) {\n rc.template = \"\";\n rc.body.innerHTML = \"\";\n }\n }\n }\n resolve(rc);\n });\n }\n lazyLoadImages() {\n if (isBrowser) {\n var component = this;\n var _componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n var _imgLazyLoaded = [..._componentRoot.subelements(\"img[lazy-src]\")];\n var _lazyLoadImages = function (image) {\n image.setAttribute(\"src\", image.getAttribute(\"lazy-src\"));\n image.onload = () => {\n image.removeAttribute(\"lazy-src\");\n };\n };\n if (\"IntersectionObserver\" in window) {\n var observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _lazyLoadImages(item.target);\n observer.unobserve(item.target);\n }\n });\n });\n _imgLazyLoaded.map(function (img) {\n return observer.observe(img);\n });\n }\n else {\n _imgLazyLoaded.map(_lazyLoadImages);\n }\n }\n else {\n // not yet implemented\n }\n return null;\n }\n applyTransitionEffect(effectClassName) {\n var _Effect = ClassFactory(effectClassName);\n if (typeof _Effect === \"undefined\") {\n throw Error(`${effectClassName} not found.`);\n }\n if (typeof _Effect !== \"undefined\" && is_a(_Effect, \"TransitionEffect\")) {\n this.effect = New(_Effect, {\n component: this\n });\n this.effect.apply(this.effect.defaultParams);\n }\n else {\n logger.debug(`${effectClassName} is ${__getType__(_Effect)} but is not a TransitionEffect`);\n }\n }\n applyObserveTransitionEffect(effectClassName) {\n if (isBrowser) {\n var component = this;\n var _componentRoot = (component.shadowed) ? (component.shadowRoot.host) : (component.body);\n var _applyEffect_ = function (element) {\n component.applyTransitionEffect(effectClassName);\n };\n if (\"IntersectionObserver\" in window) {\n var observer = new IntersectionObserver((items, observer) => {\n items.forEach((item) => {\n if (item.isIntersecting) {\n _applyEffect_(item.target);\n observer.unobserve(item.target);\n }\n });\n });\n observer.observe(_componentRoot);\n }\n else {\n _applyEffect_(_componentRoot);\n }\n }\n else {\n // not yet implemented\n }\n return null;\n }\n scrollIntoHash() {\n if (isBrowser) {\n var component = this;\n if (document.location.hash !== \"\") {\n var _componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n _componentRoot.subelements(document.location.hash).map(function (element) {\n if (typeof element.scrollIntoView === \"function\") {\n element.scrollIntoView(_top.CONFIG.get(\"scrollIntoHash\", {\n behavior: \"auto\",\n block: \"top\",\n inline: \"top\"\n }));\n }\n });\n }\n }\n else {\n // not yet implemented\n }\n }\n i18n_translate() {\n if (isBrowser) {\n if (_top.CONFIG.get(\"use_i18n\")) {\n var component = this;\n var _componentRoot = (component.shadowed) ? (component.shadowRoot) : (component.body);\n var lang1 = _top.CONFIG.get(\"lang\", \"en\");\n var lang2 = navigator.language.slice(0, 2);\n var i18n = _top.global.get(\"i18n\");\n if ((lang1 !== lang2) && (typeof i18n === \"object\" && Object.hasOwnProperty.call(i18n, \"messages\"))) {\n var callback_i18n = function () {\n var component = this;\n return new Promise(function (resolve, reject) {\n var messages = i18n.messages.filter(function (message) {\n return Object.hasOwnProperty.call(message, lang1) && Object.hasOwnProperty.call(message, lang2);\n });\n _componentRoot.subelements(\"ul,li,h1,h2,h3,a,b,p,input,textarea,summary,details,option,component\")\n .map(function (element) {\n messages.map(function (message) {\n var _innerHTML = element.innerHTML;\n _innerHTML = _innerHTML.replace(new RegExp(`${message[lang1]}`, \"g\"), message[lang2]);\n element.innerHTML = _innerHTML;\n return null;\n });\n return element;\n });\n resolve();\n });\n };\n callback_i18n.call(component).then(function () {\n logger.debug(\"i18n loaded for component: \" + component.name);\n });\n }\n }\n }\n else {\n // not yet implemented\n }\n }\n addComponentHelper(componentHelper) {\n var component = this;\n component._componentHelpers.push(componentHelper);\n }\n runComponentHelpers() {\n if (isBrowser) {\n var component = this;\n var __component_helpers__ = [];\n /*\n * BEGIN use i18n translation\n */\n __component_helpers__.push(component.i18n_translate.bind(component));\n /*\n * END use i18n translation\n */\n /*\n * BEGIN component scrollIntoHash\n */\n __component_helpers__.push(component.scrollIntoHash.bind(component));\n /*\n * END component scrollIntoHash\n */\n /*\n * BEGIN component images lazy-load\n */\n __component_helpers__.push(component.lazyLoadImages.bind(component));\n /*\n * END component images lazy-load\n */\n __component_helpers__ = __component_helpers__.concat(component._componentHelpers);\n __component_helpers__.map(function (_component_helper_) {\n logger.debug(`Executing ${_component_helper_.name} as component helper for ${component.name}...`);\n _component_helper_();\n });\n }\n else {\n // not yet implemented\n }\n }\n }\n ]);\n (_methods_)(ClassFactory(\"Component\")).map(function (__c__) {\n (_protected_code_)(__c__);\n });\n if (isBrowser) {\n window.addEventListener(\"popstate\", function (popStateEvent) {\n popStateEvent.stopImmediatePropagation();\n popStateEvent.stopPropagation();\n ClassFactory(\"Component\").route();\n });\n }\n Package(\"com.qcobjects.controllers\", [\n class Controller extends ClassFactory(\"InheritClass\") {\n component = null;\n dependencies = [];\n constructor({ component, dependencies }) {\n super({ component, dependencies });\n this.component = component;\n this.dependencies = dependencies;\n if (typeof this.component === \"undefined\" || this.component === \"null\") {\n throw Error(`${__getType__(this)} must be called with a component`);\n }\n }\n routingSelectedAttr(attrName) {\n return this.component.routingSelected.map(function (r) {\n return r[attrName];\n }).filter(function (v) {\n return v;\n }).pop();\n }\n isTouchable() {\n return (\"ontouchstart\" in window) ||\n (navigator.MaxTouchPoints > 0) ||\n (navigator.msMaxTouchPoints > 0);\n }\n onpress(subelementSelector, handler) {\n try {\n if (this.isTouchable()) {\n this.component.body.subelements(subelementSelector)[0].addEventListener(\"touchstart\", handler, {\n passive: true\n });\n }\n else {\n this.component.body.subelements(subelementSelector)[0].addEventListener(\"click\", handler, {\n passive: true\n });\n }\n }\n catch (e) {\n logger.debug(\"No button to assign press event\");\n }\n }\n createRoutingController() {\n var controller = this;\n var component = controller.component;\n var controllerName = controller.routingSelectedAttr(\"controllerclass\");\n if (typeof controllerName !== \"undefined\") {\n var _Controller = ClassFactory(controllerName);\n if (typeof _Controller !== \"undefined\") {\n component.routingController = New(_Controller, {\n component: component\n }); // Initializes the main controller for the component\n if (Object.hasOwnProperty.call(component.routingController, \"done\") && typeof component.routingController.done === \"function\") {\n component.routingController.done.call(component.routingController);\n }\n }\n }\n }\n done() { }\n }\n ]);\n Package(\"com.qcobjects.views\", [\n class View extends ClassFactory(\"InheritClass\") {\n constructor({ component = undefined, dependencies = [] }) {\n super(...arguments);\n if (typeof this.component === \"undefined\" || this.component === \"null\") {\n throw Error(`${__getType__(this)} must be called with a component`);\n }\n }\n }\n ]);\n Package(\"com.qcobjects.api\", [\n class Service extends ClassFactory(\"InheritClass\") {\n kind = \"rest\";\n /* it can be rest, mockup, local */\n domain = _domain_;\n basePath = _basePath_;\n url = \"\";\n method = \"GET\";\n data = {};\n reload = false;\n cached = false;\n constructor() {\n super(...arguments);\n }\n set(name, value) {\n this[name] = value;\n }\n get(name) {\n return this[name];\n }\n }\n ]);\n Package(\"com.qcobjects.api.services\", [\n class JSONService extends ClassFactory(\"Service\") {\n method = \"GET\";\n cached = false;\n headers = {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n JSONresponse = null;\n done(result) {\n logger.debug(\"***** RECEIVED RESPONSE:\");\n logger.debug(result.service.template);\n this.JSONresponse = JSON.parse(result.service.template);\n }\n constructor() {\n super(...arguments);\n }\n }\n ]);\n Package(\"com.qcobjects.api.config\", [\n class ConfigService extends ClassFactory(\"JSONService\") {\n method = \"GET\";\n cached = false;\n configFileName = \"config.json\";\n headers = {\n \"Content-Type\": \"application/json\",\n \"charset\": \"utf-8\"\n };\n JSONresponse = null;\n done(result) {\n logger.debug(\"***** CONFIG LOADED:\");\n logger.debug(result.service.template);\n this.JSONresponse = JSON.parse(result.service.template);\n if (Object.hasOwnProperty.call(this.JSONresponse, \"__encoded__\")) {\n this.JSONresponse = JSON.parse(ClassFactory(\"_Crypt\").decrypt(this.JSONresponse.__encoded__, _secretKey));\n }\n for (var k in this.JSONresponse) {\n _top.CONFIG.set(k, this.JSONresponse[k]);\n }\n this.configLoaded.call(this);\n }\n fail(result) {\n this.configLoaded.call(this);\n }\n constructor() {\n super(...arguments);\n this.set(\"url\", this.get(\"basePath\") + this.get(\"configFileName\"));\n }\n }\n ]);\n Package(\"com.qcobjects.valueObjects\", [\n class VO extends ClassFactory(\"InheritClass\") {\n constructor() {\n super(...arguments);\n }\n }\n ]);\n /**\n * Returns a standarized uri for a component\n * @example\n * templateURI = ComponentURI({'COMPONENTS_BASE_PATH':'','COMPONENT_NAME':'','TPLEXTENSION':'','TPL_SOURCE':''})\n * @author: Jean Machuca \n * @param params an object with the params to build the uri path\n */\n var ComponentURI = ({ TPL_SOURCE, COMPONENTS_BASE_PATH, COMPONENT_NAME, TPLEXTENSION }) => {\n const templateURI = (TPL_SOURCE === \"default\") ? (`${COMPONENTS_BASE_PATH}${COMPONENT_NAME}.${TPLEXTENSION}`) : (\"\");\n return templateURI;\n };\n /**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param component a Component object\n */\n var componentLoader = function (component, _async) {\n var __promise__;\n var _componentLoaderInBrowser = function (component, _async) {\n __promise__ = new Promise(function (resolve, reject) {\n var _promise = component.__promise__;\n var container = (Object.hasOwnProperty.call(component, \"container\") && typeof component.container !== \"undefined\" && component.container !== null) ? (component.container) : (component.body);\n if (container !== null) {\n var _feedComponent_ = function (component) {\n component.feedComponent();\n var standardResponse = {\n \"request\": xhr,\n \"component\": component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n var _componentLoaded = function () {\n var successStatus = (is_file) ? (0) : (200);\n if (xhr.status === successStatus) {\n var response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_.call(this, component);\n }\n else {\n var standardResponse = {\n \"request\": xhr,\n \"component\": component\n };\n reject.call(_promise, standardResponse);\n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_.call(this, component);\n }\n else {\n var is_file = (component.url.startsWith(\"file:\")) ? (true) : (false);\n var xhr = new XMLHttpRequest();\n if (!is_file) {\n try {\n logger.debug(\"Calling the url of component in async mode.\");\n xhr.open(component.method, component.url, true);\n }\n catch (e) {\n logger.debug(\"Last try has failed... The component cannot be loaded.\");\n }\n }\n else {\n if (\"fetch\" in _top) {\n logger.debug(\"I can use fetch...\");\n logger.debug(\"It is a file to be loaded, so I will try to use fetch\");\n var _p = fetch(component.url).then(response => {\n logger.debug(\"I got a response from fetch, so I'll feed the component\");\n response.text().then(text => {\n component.template = text;\n _feedComponent_.call(this, component);\n });\n });\n }\n }\n if (!is_phonegap && !is_file) {\n xhr.setRequestHeader(\"Content-Type\", \"text/html\");\n }\n if (!is_file) {\n xhr.onload = _componentLoaded;\n }\n var _directLoad = function (is_file) {\n is_file = (typeof is_file === \"undefined\" || !is_file) ? (false) : (true);\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n if (is_file) {\n if (!(\"fetch\" in _top)) {\n logger.debug(\"I have to try to load the file using xhr... \");\n xhr.send(null);\n if (xhr.status === XMLHttpRequest.DONE) {\n _componentLoaded.call(this);\n }\n }\n }\n else {\n logger.debug(\"Trying to send the data to the component... \");\n xhr.send(_DataStringify(component.data));\n }\n };\n if (component.cached && (!is_file)) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load(cacheController) {\n _directLoad.call(this, is_file);\n },\n alternate(cacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n }\n else {\n _directLoad.call(this, is_file);\n }\n return;\n }\n });\n global.lastCache = cache;\n }\n else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad.call(this, is_file);\n }\n }\n }\n else {\n logger.debug(\"CONTAINER DOESNT EXIST\");\n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then(function () {\n var _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n var _ret_;\n if (typeof component.fail === \"function\") {\n _ret_ = component.fail.call(component, standardResponse);\n }\n return Promise.reject(_ret_);\n }).catch(function (e) {\n logger.debug(\"Something wrong loading the component\");\n });\n return __promise__;\n };\n var _componentLoaderInNode = function (component, _async) {\n __promise__ = new Promise(function (resolve, reject) {\n var _promise = __promise__;\n var _feedComponent_ = function (component) {\n component.feedComponent();\n var standardResponse = {\n \"request\": null,\n \"component\": component\n };\n resolve.call(_promise, standardResponse);\n };\n logger.debug(\"LOADING COMPONENT DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(component.data)).replace(\"{{URL}}\", component.url));\n var _componentLoaded = function (err, responseText) {\n if (!err) {\n var response = responseText.toString();\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING COMPONENT {{NAME}}\".replace(\"{{NAME}}\", component.name));\n component.template = response;\n if (component.cached && (typeof cache !== \"undefined\")) {\n cache.save(component.name, component.template);\n }\n _feedComponent_.call(this, component);\n }\n else {\n var standardResponse = {\n \"request\": null,\n \"component\": component\n };\n reject.call(_promise, standardResponse);\n }\n };\n if (typeof component.template === \"string\" && component.template !== \"\") {\n // component already has a template it does not need to be reloaded\n _feedComponent_.call(this, component);\n }\n else {\n logger.debug(\"Loading the component as a local file in server...\");\n var _directLoad = function (is_file) {\n const fs = _require_(\"fs\");\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n fs.readFile(component.url, _componentLoaded);\n };\n if (component.cached) {\n logger.debug(\"USING CACHE FOR COMPONENT: \" + component.name);\n var cache = new ComplexStorageCache({\n index: component.cacheIndex,\n load(cacheController) {\n _directLoad.call(this);\n },\n alternate(cacheController) {\n if (component.method === \"GET\") {\n component.template = cacheController.cache.getCached(component.cacheIndex);\n _feedComponent_.call(this, component);\n }\n else {\n _directLoad.call(this);\n }\n return;\n }\n });\n global.lastCache = cache;\n }\n else {\n logger.debug(\"NOT USING CACHE FOR COMPONENT: \" + component.name);\n _directLoad.call(this);\n }\n }\n });\n __promise__.then(function (standardResponse) {\n return component.__done__().then(function () {\n var _ret_;\n if (typeof component.done === \"function\") {\n _ret_ = component.done.call(component, standardResponse);\n }\n return Promise.resolve(_ret_);\n });\n }, function (standardResponse) {\n var _ret_;\n if (typeof component.fail === \"function\") {\n _ret_ = component.fail.call(component, standardResponse);\n }\n return Promise.reject(_ret_);\n }).catch(function (e) {\n logger.debug(`Something wrong loading the component: ${e}`);\n });\n return __promise__;\n };\n var _ret_;\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_componentLoaderInBrowser, arguments);\n }\n else {\n _ret_ = _componentLoaderInBrowser(component, _async);\n }\n }\n else {\n _ret_ = _componentLoaderInNode(component, _async);\n }\n return _ret_;\n };\n /**\n * Loads a simple component from a template\n *\n * @author: Jean Machuca \n * @param service a Service object\n */\n var serviceLoader = function (service, _async) {\n var _serviceLoaderInBrowser = function (service, _async) {\n var _promise = new Promise(function (resolve, reject) {\n logger.debug(\"LOADING SERVICE DATA {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n var xhr = new XMLHttpRequest();\n xhr.withCredentials = service.withCredentials;\n var xhrasync = true; // always async because xhr sync is deprecated\n xhr.open(service.method, service.url, xhrasync);\n for (var header in service.headers) {\n try {\n if (typeof service.headers[header] !== \"function\") {\n xhr.setRequestHeader(header, service.headers[header]);\n }\n }\n catch (e) {\n logger.debug(\"Something went wrong when assign the header \" + header);\n }\n }\n xhr.onload = function () {\n if (xhr.status === 200) {\n var response = xhr.responseText;\n logger.debug(\"Data received {{DATA}}\".replace(\"{{DATA}}\", _DataStringify(response)));\n logger.debug(\"CREATING SERVICE {{NAME}}\".replace(\"{{NAME}}\", service.name));\n service.template = response;\n if (service.cached && (typeof cache !== \"undefined\")) {\n cache.save(service.name, service.template);\n }\n if (typeof service.done === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n \"service\": service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n }\n else {\n if (typeof service.fail === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n \"service\": service\n };\n service.fail.call(service, standardResponse);\n reject.call(_promise, standardResponse);\n }\n }\n };\n var _directLoad = function () {\n logger.debug(\"SENDING THE NORMAL REQUEST \");\n try {\n xhr.send(_DataStringify(service.data));\n }\n catch (e) {\n logger.debug(\"SOMETHING WRONG WITH REQUEST \");\n reject.call(_promise, {\n request: xhr,\n service: service\n });\n }\n };\n if (service.cached) {\n var cache = new ComplexStorageCache({\n index: service.data,\n load(cacheController) {\n _directLoad.call(this);\n },\n alternate(cacheController) {\n if (service.method === \"GET\") {\n service.template = cacheController.cache.getCached(service.name);\n if (typeof service.done === \"function\") {\n var standardResponse = {\n \"request\": xhr,\n \"service\": service\n };\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n }\n }\n else {\n _directLoad.call(this);\n }\n return;\n }\n });\n global.lastCache = cache;\n }\n else {\n _directLoad.call(this);\n }\n return xhr;\n });\n return _promise;\n };\n var _serviceLoaderInNode = function (service, _async) {\n var _promise = new Promise(function (resolve, reject) {\n if (typeof URL === \"undefined\") {\n global.URL = _require_(\"url\").URL;\n let URL = global.URL;\n }\n var serviceURL = new URL(service.url);\n var req;\n service.useHTTP2 = Object.hasOwnProperty.call(service, \"useHTTP2\") && service.useHTTP2;\n var captureEvents = function (req) {\n logger.debug(\"LOADING SERVICE DATA (non-browser) {{DATA}} FROM {{URL}}\".replace(\"{{DATA}}\", _DataStringify(service.data)).replace(\"{{URL}}\", service.url));\n var dataXML;\n var standardResponse = {\n \"http2Client\": client,\n \"request\": req,\n \"service\": service,\n \"responseHeaders\": null\n };\n if (typeof service.data === \"object\" && service.data !== null) {\n if (service.useHTTP2) {\n try {\n logger.debug(\"Sending data...\");\n let buffer = new Buffer(_DataStringify(service.data));\n req.write(buffer);\n }\n catch (e) {\n logger.debug(\"It was not possible to send any data\");\n }\n }\n }\n dataXML = \"\";\n req.on(\"response\", (responseHeaders, flags) => {\n logger.debug(\"receiving response...\");\n standardResponse.responseHeaders = responseHeaders;\n /*\n for (const name in responseHeaders) {\n logger.debug(`${name}: ${responseHeaders[name]}`);\n }\n */\n dataXML = \"\";\n });\n req.on(\"data\", (chunk) => {\n logger.debug(\"receiving data...\");\n // do something with the data\n dataXML += \"\" + chunk.toString();\n service.template = dataXML;\n });\n if (service.useHTTP2) {\n req.resume();\n }\n req.on(\"end\", () => {\n logger.debug(\"ending call...\");\n service.template = dataXML;\n if (Object.hasOwnProperty.call(service, \"useHTTP2\") && service.useHTTP2) {\n client.destroy();\n }\n else {\n req.destroy();\n }\n service.done.call(service, standardResponse);\n resolve.call(_promise, standardResponse);\n });\n if (service.useHTTP2) {\n req.end();\n }\n };\n try {\n var requestOptions;\n if (service.useHTTP2) {\n logger.debug(\"using http2\");\n var http2 = _require_(\"http2\");\n var client = http2.connect(serviceURL.origin);\n requestOptions = Object.assign({\n \":method\": service.method,\n \":path\": serviceURL.pathname\n }, service.options);\n requestOptions = Object.assign(requestOptions, service.headers);\n req = client.request(requestOptions);\n req.setEncoding(\"utf8\");\n captureEvents(req);\n }\n else {\n if (serviceURL.protocol === \"http:\") {\n var http = _require_(\"http\");\n var request = http.request;\n requestOptions = Object.assign({\n \"url\": service.url,\n headers: service.headers\n }, service.options);\n var req = request(service.url);\n captureEvents(req);\n }\n else if (serviceURL.protocol === \"https:\") {\n var https = _require_(\"https\");\n requestOptions = Object.assign({\n hostname: serviceURL.hostname,\n port: serviceURL.port,\n path: serviceURL.pathname,\n method: service.method,\n headers: service.headers\n }, service.options);\n var _req_ = https.request(requestOptions, function (req) {\n captureEvents(req);\n });\n _req_.end();\n }\n else {\n var e = \"Protocol not supported: \" + serviceURL.protocol;\n logger.debug(e);\n throw new Error(e);\n }\n }\n }\n catch (e) {\n logger.debug(e);\n service.fail.call(service, e);\n reject.call(_promise, e);\n }\n }).catch(function (e) {\n console.log(e);\n logger.debug(\"Something happened when trying to call the service: \" + service.name);\n service.fail.call(service, e);\n });\n return _promise;\n };\n var _serviceLoaderMockup = function (service, _async) {\n var _promise = new Promise(function (resolve, reject) {\n logger.debug(`Calling mockup service ${service.name} ...`);\n var standardResponse = {\n \"request\": null,\n \"service\": service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.mockup === \"function\") {\n service.mockup.call(service, standardResponse);\n }\n else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n var _serviceLoaderLocal = function (service, _async) {\n var _promise = new Promise(function (resolve, reject) {\n logger.debug(`Calling local service ${service.name} ...`);\n var standardResponse = {\n \"request\": null,\n \"service\": service,\n \"responseHeaders\": service.responseHeaders\n };\n if (typeof service.local === \"function\") {\n service.local.call(service, standardResponse);\n }\n else {\n service.done.call(service, standardResponse);\n }\n resolve.call(_promise, standardResponse);\n });\n return _promise;\n };\n var _ret_;\n switch (service.kind) {\n case \"rest\":\n if (isBrowser) {\n if (typeof _async !== \"undefined\" && _async) {\n _ret_ = asyncLoad(_serviceLoaderInBrowser, arguments);\n }\n else {\n _ret_ = _serviceLoaderInBrowser(service, _async);\n }\n }\n else {\n _ret_ = _serviceLoaderInNode(service, _async);\n }\n break;\n case \"mockup\":\n _ret_ = _serviceLoaderMockup(service, _async);\n break;\n case \"local\":\n _ret_ = _serviceLoaderLocal(service, _async);\n break;\n default:\n logger.debug(`The value of the kind property of the service ${service.name} is not valid`);\n break;\n }\n return _ret_;\n };\n Export(serviceLoader);\n Export(componentLoader);\n Export(ComponentURI);\n Export(ObjectName);\n Export(_DataStringify);\n Export(isQCObjects_Class);\n Export(isQCObjects_Object);\n Export(NamespaceRef);\n if (isBrowser) {\n Element.prototype.buildComponents = function (rebuildObjects = false) {\n var tagFilter = _tag_filter_;\n var d = this;\n var elements = d.subelements(tagFilter);\n return _buildComponentsFromElements_(elements, null);\n };\n HTMLDocument.prototype.buildComponents = Element.prototype.buildComponents;\n HTMLElement.prototype.buildComponents = Element.prototype.buildComponents;\n var _ComponentWidget_ = class extends HTMLElement {\n constructor() {\n super(...arguments);\n const componentWidget = this;\n const componentName = componentWidget.nodeName.toLowerCase();\n const componentBody = _DOMCreateElement(\"quick-component\");\n const __enabled__atributes__ = componentWidget.getAttributeNames();\n componentBody.setAttribute(\"name\", componentName);\n if (!componentWidget.hasAttribute(\"shadowed\")) {\n componentBody.setAttribute(\"shadowed\", \"true\");\n }\n __enabled__atributes__.map(function (attributeName) {\n if (componentWidget.hasAttribute(attributeName)) {\n componentBody.setAttribute(attributeName, componentWidget.getAttribute(attributeName));\n componentWidget.removeAttribute(attributeName);\n }\n });\n var data_attributenames = componentWidget.getAttributeNames().filter(function (a) {\n return a.startsWith(\"data-\");\n }).map(function (a) {\n return a.split(\"-\")[1];\n });\n data_attributenames.map(function (_attribute_name_) {\n componentBody.setAttribute(\"data-\" + _attribute_name_, componentWidget.getAttribute(\"data-\" + _attribute_name_));\n componentWidget.removeAttribute(\"data-\" + _attribute_name_);\n });\n [...componentWidget.children].map(function (element) {\n componentBody.appendChild(element.cloneNode(true));\n element.remove();\n });\n componentWidget.append(componentBody);\n }\n };\n Export(_ComponentWidget_);\n var RegisterWidget = function (widgetName) {\n customElements.define(widgetName, class extends _ComponentWidget_ {\n });\n };\n var RegisterWidgets = function () {\n var widgetList = [...arguments];\n widgetList.filter(function (widgetName) {\n return typeof widgetName === \"string\";\n }).map(function (widgetName) {\n RegisterWidget(widgetName);\n });\n };\n (_protected_code_)(RegisterWidget);\n (_protected_code_)(RegisterWidgets);\n Export(RegisterWidget);\n Export(RegisterWidgets);\n }\n else {\n // not yet implemented.\n }\n if (!isBrowser) {\n Package(\"com.qcobjects.api\", [\n class BackendMicroservice extends ClassFactory(\"InheritClass\") {\n constructor({ domain = _domain_, basePath = _basePath_, body = null, stream = null, request = null }) {\n super(...arguments);\n logger.debug(\"Initializing BackendMicroservice...\");\n let microservice = this;\n if (typeof this.body === \"undefined\") {\n this.body = null;\n }\n if (typeof body !== \"undefined\") {\n this.body = body;\n }\n this.cors();\n microservice.stream = stream;\n stream.on(\"data\", (data) => {\n // data from POST, GET\n var requestMethod = request.method.toLowerCase();\n var supportedMethods = {\n \"post\": microservice.post,\n };\n if (Object.hasOwnProperty.call(supportedMethods, requestMethod)) {\n supportedMethods[requestMethod].call(microservice, data);\n }\n });\n // data from POST, GET\n var requestMethod = request.method.toLowerCase();\n var supportedMethods = {\n \"get\": microservice.get,\n \"head\": microservice.head,\n \"put\": microservice.put,\n \"delete\": microservice.delete,\n \"connect\": microservice.connect,\n \"options\": microservice.options,\n \"trace\": microservice.trace,\n \"patch\": microservice.patch\n };\n if (Object.hasOwnProperty.call(supportedMethods, requestMethod)) {\n supportedMethods[requestMethod].call(microservice);\n }\n }\n cors() {\n if (this.route.cors) {\n logger.debug(\"Validating CORS...\");\n let { allow_origins, allow_credentials, allow_methods, allow_headers } = this.route.cors;\n var microservice = this;\n if (typeof microservice.headers !== \"object\") {\n microservice.headers = {};\n }\n if (typeof microservice.route.responseHeaders !== \"object\") {\n microservice.route.responseHeaders = {};\n }\n if (typeof allow_origins !== \"undefined\") {\n logger.debug(\"CORS: allow_origins available. Validating origins...\");\n // an example of allow_origins is ['https://example.com','http://www.example.com']\n if (allow_origins === \"*\" || (typeof microservice.request.headers.origin === \"undefined\") || [...allow_origins].indexOf(microservice.request.headers.origin) !== -1) {\n // for compatibility with all browsers allways return a wildcard when the origin is allowed\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n }\n else {\n logger.debug(\"CORS: Origin is not allowed: \" + microservice.request.headers.origin);\n logger.debug(\"CORS: Forcing to finish the response...\");\n this.body = {};\n try {\n this.done();\n }\n catch (e) {\n logger.debug(`It was not possible to finish the call to the microservice: ${e}`);\n }\n }\n }\n else {\n logger.debug(\"CORS: no allow_origins available. Allowing all origins...\");\n logger.debug(\"CORS: Adding header Access-Control-Allow-Origin=*\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Origin\"] = \"*\";\n }\n if (typeof allow_credentials !== \"undefined\") {\n logger.debug(`CORS: allow_credentials present. Allowing ${allow_credentials}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = allow_credentials.toString();\n }\n else {\n logger.debug(\"CORS: No allow_credentials present. Allowing all credentials.\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Credentials\"] = \"true\";\n }\n if (typeof allow_methods !== \"undefined\") {\n logger.debug(`CORS: allow_methods present. Allowing ${allow_methods}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = [...allow_methods].join(\",\");\n }\n else {\n logger.debug(\"CORS: No allow_methods present. Allowing only GET, OPTIONS and POST\");\n microservice.route.responseHeaders[\"Access-Control-Allow-Methods\"] = \"GET, OPTIONS, POST\";\n }\n if (typeof allow_headers !== \"undefined\") {\n logger.debug(`CORS: allow_headers present. Allowing ${allow_headers}...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = [...allow_headers].join(\",\");\n }\n else {\n logger.debug(`CORS: No allow_headers present. Allowing all headers...`);\n microservice.route.responseHeaders[\"Access-Control-Allow-Headers\"] = \"*\";\n }\n }\n else {\n logger.debug(\"No CORS validation available. You can specify cors in CONFIG.backend.routes[].cors\");\n }\n }\n head(formData) {\n this.done();\n }\n get(formData) {\n logger.debug(`[BackendMicroservice.get] Data received: ${_DataStringify(formData)}`);\n this.done();\n }\n post(formData) {\n this.done();\n }\n put(formData) {\n this.done();\n }\n delete(formData) {\n this.done();\n }\n connect(formData) {\n this.done();\n }\n options(formData) {\n this.done();\n }\n trace(formData) {\n this.done();\n }\n patch(formData) {\n this.done();\n }\n finishWithBody(stream) {\n try {\n logger.debug(\"[BackendMicroservice.finishWithBody] Ending the stream...\");\n logger.debug(`[BackendMicroservice.finishWithBody] type of body is: ${typeof this.body}`);\n if (typeof this.body !== \"string\") {\n this.body = _DataStringify(this.body);\n }\n logger.debug(`[BackendMicroservice.finishWithBody] \\n body: ${this.body} `);\n stream.write(this.body);\n stream.end();\n logger.debug(`[BackendMicroservice.finishWithBody] Stream ended.`);\n }\n catch (e) {\n logger.debug(`[BackendMicroservice.finishWithBody] Something went wrong ending the stream: ${e}`);\n }\n }\n done() {\n logger.debug(`[BackendMicroservice.done] Finalizing the response...`);\n var microservice = this;\n var stream = microservice.stream;\n try {\n logger.debug(`[BackendMicroservice.done] Sending response headers...`);\n if (microservice.route.responseHeaders) {\n logger.debug(`[BackendMicroservice.done] Response headers present: ${Object.keys(microservice.route.responseHeaders)}`);\n stream.respond(microservice.route.responseHeaders);\n }\n else {\n throw Error(`[BackendMicroservice.done] No headers present.`);\n }\n }\n catch (e) {\n logger.debug(`[BackendMicroservice.done] Something went wrong sending response headers: ${e}`);\n }\n if (microservice.body !== null) {\n try {\n logger.debug(`[BackendMicroservice.done] A body of message is present. Finalizing the response...`);\n microservice.finishWithBody.call(microservice, stream);\n }\n catch (e) {\n logger.debug(`[BackendMicroservice.done] Something went wrong finalizing the response: ${e}`);\n }\n }\n else {\n logger.debug(\"[BackendMicroservice.done] No body present. Ending stream...\");\n stream.end();\n }\n }\n }\n ]);\n }\n Class(\"SourceJS\", Object, {\n domain: _domain_,\n basePath: _basePath_,\n body: _DOMCreateElement(\"script\"),\n type: \"text/javascript\",\n containerTag: \"body\",\n url: \"\",\n data: {},\n async: false,\n external: false,\n set(name, value) {\n this[name] = value;\n },\n get(name) {\n return this[name];\n },\n status: false,\n done() { },\n fail() { },\n rebuild() {\n var context = this;\n try {\n document.getElementsByTagName(context.containerTag)[0].appendChild((function (s, url, context) {\n s.type = context.type;\n s.src = url;\n s.crossOrigin = (Object.hasOwnProperty.call(context, \"crossOrigin\")) ? (context.crossOrigin) : (\"anonymous\");\n s.async = context.async;\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = function (e) {\n context.status = true;\n context.done.call(context, e);\n };\n s.onerror = function (e) {\n context.status = false;\n context.fail.call(context, e);\n };\n context.body = s;\n return s;\n }).call(this, _DOMCreateElement(\"script\"), (this.external) ? (this.url) : (this.basePath + this.url), context));\n }\n catch (e) {\n context.status = false;\n context.fail.call(context, e);\n }\n },\n Cast(o) {\n return _Cast(this, o);\n },\n _new_(properties) {\n this.__new__(properties);\n this.rebuild();\n }\n });\n Class(\"SourceCSS\", Object, {\n domain: _domain_,\n basePath: _basePath_,\n body: _DOMCreateElement(\"link\"),\n url: \"\",\n data: {},\n async: false,\n external: false,\n set(name, value) {\n this[name] = value;\n },\n get(name) {\n return this[name];\n },\n done() { },\n rebuild() {\n var context = this;\n if (isBrowser) {\n window.document.getElementsByTagName(\"head\")[0].appendChild((function (s, url, context) {\n s.type = \"text/css\";\n s.rel = \"stylesheet\";\n s.href = url;\n s.crossOrigin = \"anonymous\";\n s.onreadystatechange = function () {\n if (this.readyState === \"complete\") {\n context.done.call(context);\n }\n };\n s.onload = context.done;\n context.body = s;\n return s;\n }).call(this, _DOMCreateElement(\"link\"), (this.external) ? (this.url) : (this.basePath + this.url), context));\n }\n },\n Cast(o) {\n return _Cast(this, o);\n },\n _new_(properties) {\n this.__new__(properties);\n this.rebuild();\n }\n });\n /**\n * Array math functions\n */\n var __to_number = function (value) {\n return (isNaN(value)) ? (new Number(0)) : (new Number(value));\n };\n Array.prototype.unique = function () {\n return this.filter(function (value, index, self) {\n return self.indexOf(value) === index;\n });\n };\n Array.unique = function (a) {\n return a.unique();\n };\n (_protected_code_)(Array.unique);\n (_protected_code_)(Array.prototype.unique);\n Array.prototype.table = function () {\n console.table(this);\n };\n Array.table = function (a) {\n return a.table();\n };\n (_protected_code_)(Array.table);\n (_protected_code_)(Array.prototype.table);\n Array.prototype.sum = function () {\n return this.reduce(function (prev, current) {\n return __to_number(prev) + __to_number(current);\n }, 0);\n };\n Array.sum = function (a) {\n return a.sum();\n };\n (_protected_code_)(Array.sum);\n (_protected_code_)(Array.prototype.sum);\n Array.prototype.avg = function () {\n return (this.length < 1) ? (0) : (this.reduce(function (prev, current) {\n return ((__to_number(prev) + __to_number(current)) / 2);\n }));\n };\n Array.avg = function (a) {\n return a.avg();\n };\n (_protected_code_)(Array.avg);\n (_protected_code_)(Array.prototype.avg);\n Array.prototype.min = function () {\n return this.reduce(function (prev, current) {\n return (__to_number(prev) <= __to_number(current)) ? (prev) : (current);\n }, Infinity);\n };\n Array.min = function (a) {\n return a.min();\n };\n (_protected_code_)(Array.min);\n (_protected_code_)(Array.prototype.min);\n Array.prototype.max = function () {\n return this.reduce(function (prev, current) {\n return (__to_number(prev) >= __to_number(current)) ? (prev) : (current);\n }, 0);\n };\n Array.max = function (a) {\n return a.max();\n };\n (_protected_code_)(Array.max);\n (_protected_code_)(Array.prototype.max);\n Array.prototype.sortBy = function (propName, sortAsc = true) {\n var sort_function = (sortAsc) ? (function (prev, current) {\n return current[propName] < prev[propName] ? 1 : -1;\n }) : (function (prev, current) {\n return current[propName] > prev[propName] ? 1 : -1;\n });\n return this.sort(sort_function);\n };\n Array.sortBy = function (a, propName, sortAsc = true) {\n return a.sortBy(propName, sortAsc);\n };\n (_protected_code_)(Array.sortBy);\n (_protected_code_)(Array.prototype.sortBy);\n Array.matrix = function (_length, _fillValue = 0) {\n var x_func = function (x) {\n return _fillValue;\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n (_protected_code_)(Array.matrix);\n Array.matrix2d = function (_length, _fillValue = 0) {\n var y_func = function (y) {\n return _fillValue;\n };\n var x_func = function (x) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n (_protected_code_)(Array.matrix2d);\n Array.matrix3d = function (_length, _fillValue = 0) {\n var y_func = function (y) {\n return Array.from({\n length: _length\n }, function () {\n return _fillValue;\n });\n };\n var x_func = function (x) {\n return Array.from({\n length: _length\n }, y_func);\n };\n return Array.from({\n length: _length\n }, x_func);\n };\n (_protected_code_)(Array.matrix3d);\n _top.range = function (start, stop = 0, step = 1) {\n if (stop === 0 || typeof stop === \"undefined\") {\n stop = start;\n start = 0;\n }\n return Array.from({\n length: (stop - start) / step + 1\n }, function (_, i) {\n return start + (i * step);\n });\n };\n (_protected_code_)(_top.range);\n String.prototype.list = function () {\n var __instance = this;\n return _top.range(0, __instance.length - 1).map(function (i) {\n return __instance[i];\n });\n };\n (_protected_code_)(String.prototype.list);\n _top.getDocumentLayout = function () {\n var h = (w, h) => {\n return w > h ? \"landscape\" : null;\n };\n var v = (w, h) => {\n return h > w ? \"portrait\" : null;\n };\n var square = (w, h) => {\n return w === h ? \"square\" : null;\n };\n return [\n h(document.documentElement.clientWidth, document.documentElement.clientHeight),\n v(document.documentElement.clientWidth, document.documentElement.clientHeight),\n square(document.documentElement.clientWidth, document.documentElement.clientHeight)\n ].filter(e => e !== null).pop();\n };\n /**\n * End of array math functions\n */\n Class(\"ArrayList\", Array, []);\n ClassFactory(\"ArrayList\").matrix = Array.matrix;\n ClassFactory(\"ArrayList\").matrix2d = Array.matrix2d;\n ClassFactory(\"ArrayList\").matrix3d = Array.matrix3d;\n (_protected_code_)(ClassFactory(\"ArrayList\").matrix);\n (_protected_code_)(ClassFactory(\"ArrayList\").matrix2d);\n (_protected_code_)(ClassFactory(\"ArrayList\").matrix3d);\n Class(\"ArrayCollection\", Object, {\n source: New(ClassFactory(\"ArrayList\"), []),\n changed(prop, value) {\n logger.debug(\"VALUE CHANGED\");\n logger.debug(prop);\n logger.debug(value);\n },\n push(value) {\n var self = this;\n logger.debug(\"VALUE ADDED\");\n logger.debug(value);\n self.source.push(value);\n },\n pop(value) {\n var self = this;\n logger.debug(\"VALUE POPPED\");\n logger.debug(value);\n self.source.pop(value);\n },\n _new_(source) {\n var self = this;\n var _index = 0;\n self.source = New(ClassFactory(\"ArrayList\"), source);\n for (var _k in self.source) {\n if (!isNaN(_k)) {\n logger.debug(\"binding \" + _k.toString());\n (function (_pname) {\n Object.defineProperty(self, _pname, {\n set(value) {\n logger.debug(\"setting \" + _pname + \"=\" + value);\n self.source[_pname] = value;\n self.changed(_pname, value);\n },\n get() {\n return self.source[_pname];\n }\n });\n })(_k);\n _index++;\n }\n }\n self.source.length = _index;\n Object.defineProperty(self, \"length\", {\n get() {\n return self.source.length;\n }\n });\n }\n });\n Package(\"com.qcobjects.effects.base\", [\n class Effect extends ClassFactory(\"InheritClass\") {\n duration = 1000;\n constructor() {\n super(...arguments);\n }\n animate({ timing, draw, duration }) {\n let start = performance.now();\n requestAnimationFrame(function animate(time) {\n // timeFraction goes from 0 to 1\n let timeFraction = (time - start) / duration;\n if (timeFraction > 1)\n timeFraction = 1;\n // calculate the current animation state\n let progress = timing(timeFraction);\n draw(Math.round(progress * 100)); // draw it\n if (timeFraction < 1) {\n requestAnimationFrame(animate);\n }\n else {\n // if this is an object with a done method\n if (typeof this !== \"undefined\" &&\n this !== null &&\n Object.hasOwnProperty.call(this, \"done\") &&\n (typeof this.done).toLowerCase() === \"function\") {\n this.done.call(this);\n }\n }\n });\n }\n }\n ]);\n Package(\"com.qcobjects.effects.transitions.base\", [\n class TransitionEffect extends ClassFactory(\"Effect\") {\n duration = 385;\n defaultParams = {\n alphaFrom: 0,\n alphaTo: 1,\n angleFrom: 180,\n angleTo: 0,\n radiusFrom: 0,\n radiusTo: 30,\n scaleFrom: 0,\n scaleTo: 1\n };\n fitToHeight = false;\n fitToWidth = false;\n effects = [];\n constructor() {\n super(...arguments);\n logger.info(\"DECLARING TransitionEffect \");\n this.component.defaultParams = this.defaultParams;\n }\n apply({ alphaFrom, alphaTo, angleFrom, angleTo, radiusFrom, radiusTo, scaleFrom, scaleTo }) {\n var _transition_ = this;\n logger.info(\"EXECUTING TransitionEffect \");\n var componentRoot = (_transition_.component.shadowed) ? (_transition_.component.shadowRoot.host) : (_transition_.component.body);\n if (_transition_.fitToHeight) {\n componentRoot.height = (typeof componentRoot.offsetParent === \"object\" && componentRoot.offsetParent !== null) ? (componentRoot.offsetParent.scrollHeight) : (componentRoot.getBoundingClientRect().height);\n }\n if (_transition_.fitToWidth) {\n componentRoot.width = (typeof componentRoot.offsetParent === \"object\" && componentRoot.offsetParent !== null) ? (componentRoot.offsetParent.scrollWidth) : (componentRoot.getBoundingClientRect().width);\n }\n componentRoot.style.display = \"block\";\n _transition_.effects.map(function (effectClassName, eff) {\n var __effectClass__ = ClassFactory(effectClassName);\n var effectObj = new __effectClass__({});\n var effectClassMethod = effectObj.apply;\n var args = [componentRoot].concat(Object.values({\n alphaFrom,\n alphaTo,\n angleFrom,\n angleTo,\n radiusFrom,\n radiusTo,\n scaleFrom,\n scaleTo\n }));\n effectClassMethod.apply(_transition_, args);\n });\n }\n }\n ]);\n Package(\"com.qcobjects.timing\", [\n class Timer extends ClassFactory(\"InheritClass\") {\n constructor() {\n super(...arguments);\n }\n duration = 1000;\n alive = true;\n thread({ timing, intervalInterceptor, duration }) {\n var timer = this;\n let start = performance.now();\n requestAnimationFrame(function thread(time) {\n // timeFraction goes from 0 to 1\n let elapsed = (time - start);\n let timeFraction = elapsed / duration;\n if (timeFraction > 1)\n timeFraction = 1;\n // calculate the current progress state\n let progress = timing(timeFraction, elapsed);\n intervalInterceptor(Math.round(progress * 100)); // draw it\n if ((timeFraction < 1 || duration === -1) && timer.alive) {\n requestAnimationFrame(thread);\n }\n });\n }\n }\n ]);\n Package(\"com.qcobjects.tools.essentials\", [\n class Toggle extends ClassFactory(\"InheritClass\") {\n _toggle = false;\n _inverse = true;\n _positive = null;\n _negative = null;\n _dispatched = null;\n _args = {};\n constructor() {\n super(...arguments);\n this._new_(...arguments);\n }\n changeToggle() {\n this._toggle = (this._toggle) ? (false) : (true);\n }\n _new_({ positive, negative, args }) {\n this._positive = positive;\n this._negative = negative;\n this._args = args;\n }\n fire() {\n var toggle = this;\n var _promise = new Promise(function (resolve, reject) {\n if (typeof toggle._positive === \"function\" && typeof toggle._negative === \"function\") {\n if (toggle._inverse) {\n toggle._dispatched = (toggle._toggle) ? (toggle._negative.bind(toggle)) : (toggle._positive.bind(toggle));\n }\n else {\n toggle._dispatched = (toggle._toggle) ? (toggle._positive.bind(toggle)) : (toggle._negative.bind(toggle));\n }\n toggle._dispatched.call(toggle, toggle._args);\n resolve.call(_promise, toggle);\n }\n else {\n logger.debug(\"Toggle functions are not declared\");\n reject.call(_promise, toggle);\n }\n }).then(function (toggle) {\n toggle.changeToggle();\n }).catch(function (e) {\n logger.debug(e.toString());\n });\n return _promise;\n }\n }\n ]);\n // Set Processors\n (function (_top) {\n let mapper = function (componentInstance, componentName, valueName) {\n /*\n * Mapper processor\n * @usage\n * $mapper(,)\n *\n * Where componentName is the name of the component (same value as in attribute tag name) without quotes\n * and valueName is the name of the variable that contains the value to map, it can be either a property of\n * the component instance, the data object or a global value\n */\n var self = this;\n if (typeof componentInstance === \"undefined\" || componentInstance === null) {\n throw Error(`mapper.${componentName}.${valueName} does not have a component instance or it is null.`);\n }\n let globalValue = _top.global.get(valueName);\n let componentValue = componentInstance.get(valueName);\n let dataValue = componentInstance.data[valueName];\n let list = (typeof dataValue !== \"undefined\") ? (dataValue) : ((typeof componentValue !== \"undefined\") ? (componentValue) : (globalValue));\n let listItems = \"\";\n if (typeof list !== \"undefined\" && typeof list[\"map\"] !== \"undefined\") {\n listItems = list.map(function (element) {\n let dataItems = [...Object.keys(element)].map(k => ` data-${k}=\"${(typeof element[k] !== \"undefined\" && element[k] !== null) ? (element[k].toString()) : (\"\")}\"`).join(\"\");\n return ``;\n }).join(\"\");\n }\n else {\n logger.debug(`${componentName}.${valueName} does not have a map property`);\n }\n return listItems;\n };\n Processor.setProcessor(mapper);\n let layout = function (componentInstance, layoutname, cssfile) {\n /*\n * Layout processor\n * @usage\n * $layout(, )\n * Where layoutname can be \"portrait\" or \"landscape\" without quotes\n * cssfile is the uri for the css file to import\n */\n var layout_portrait = `\n /* CSS Document for Mobile Imports */\n @import url(\"${cssfile}\") (orientation:portrait);\n @import url(\"${cssfile}\") (max-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 9/16);\n @import url(\"${cssfile}\") (aspect-ratio: 10/16);\n @import url(\"${cssfile}\") (aspect-ratio: 5/8);\n @import url(\"${cssfile}\") (aspect-ratio: 3/4);\n @import url(\"${cssfile}\") (aspect-ratio: 2/3);\n `;\n var layout_landscape = `\n @import url(\"${cssfile}\") (orientation:landscape) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/9) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 16/10) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 8/5) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 4/3) and (min-width:460px);\n @import url(\"${cssfile}\") (aspect-ratio: 3/2) and (min-width:460px);\n `;\n var layout_code = {\n \"landscape\": layout_landscape,\n \"portrait\": layout_portrait\n };\n return (Object.hasOwnProperty.call(layout_code, layoutname)) ? (layout_code[layoutname]) : (\"\");\n };\n Processor.setProcessor(layout);\n let component = function () {\n /*\n * component processor\n * @usage\n * $component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n let arg = [...arguments].slice(1).map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n let attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a]}`;\n }).join(\" \");\n return ``;\n };\n Processor.setProcessor(component);\n let quick_component = function () {\n /*\n * component processor\n * @usage\n * $quick_component(name=, componentClass=, ...)\n * Returns a component tag declaration like:\n * ...>\n */\n let arg = [...arguments].slice(1).map(function (a) {\n return {\n [a.split(\"=\")[0]]: a.split(\"=\")[1]\n };\n }).reduce(function (k1, k2) {\n return Object.assign(k1, k2);\n });\n let attrs = [...Object.keys(arg)].map(function (a) {\n return `${a}=${arg[a]}`;\n }).join(\" \");\n return ``;\n };\n Processor.setProcessor(quick_component);\n let repeat = function (componentInstance, length, text) {\n /*\n * Repeat processor\n * @usage\n * $repeat(, )\n * Where length is the number of occurrences of text\n */\n return _top.range(length).map(function (index) {\n return text.replace(\"{{index}}\", index.toString());\n }).join(\"\");\n };\n Processor.setProcessor(repeat);\n })(_top);\n /**\n * Load every component tag declared in the body\n **/\n Ready(function () {\n if (!_top.CONFIG.get(\"useSDK\")) {\n _top.__start__();\n }\n });\n /*\n Public variables and functions\n */\n Export(Export); /* exports the same Export function once */\n Export(Import);\n Export(Package);\n Export(Class);\n Export(New);\n Export(Tag);\n Export(Ready);\n Export(ready);\n Export(isBrowser);\n Export(_methods_);\n (function (_top) {\n Package(\"com.qcobjects\", [\n class GlobalSettings extends ClassFactory(\"InheritClass\") {\n _GLOBAL = {};\n __definition = {};\n __classType = \"GlobalSettings\";\n constructor() {\n super(...arguments);\n this.set = GlobalSettings.set.bind(this);\n this.get = GlobalSettings.get.bind(this);\n this.__start__ = GlobalSettings.__start__.bind(this);\n }\n static set(name, value) {\n this._GLOBAL[name] = value;\n }\n static get(name, _default) {\n var _value;\n if (typeof this._GLOBAL[name] !== \"undefined\") {\n _value = this._GLOBAL[name];\n }\n else if (typeof _default !== \"undefined\") {\n _value = _default;\n }\n return _value;\n }\n static __start__() {\n var __load__serviceWorker = function () {\n var _promise;\n if (isBrowser) {\n _promise = new Promise(function (resolve, reject) {\n if ((\"serviceWorker\" in navigator) &&\n (typeof _top.CONFIG.get(\"serviceWorkerURI\") !== \"undefined\")) {\n _top.CONFIG.set(\"serviceWorkerScope\", _top.CONFIG.get(\"serviceWorkerScope\") ? (_top.CONFIG.get(\"serviceWorkerScope\")) : (\"/\"));\n navigator.serviceWorker.register(_top.CONFIG.get(\"serviceWorkerURI\"), {\n scope: _top.CONFIG.get(\"serviceWorkerScope\")\n })\n .then(function (registration) {\n logger.debug(\"Service Worker Registered\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error registering Service Worker\");\n reject.call(_promise, registration);\n });\n navigator.serviceWorker.ready.then(function (registration) {\n logger.debug(\"Service Worker Ready\");\n resolve.call(_promise, registration);\n }, function (registration) {\n logger.debug(\"Error loading Service Worker\");\n reject.call(_promise, registration);\n });\n }\n });\n }\n return _promise;\n };\n var _buildComponents = function () {\n return new Promise((resolve, reject) => {\n if (isBrowser) {\n logger.debug(\"Starting to building components\");\n try {\n _top.componentsStack = document.buildComponents.call(document);\n }\n catch (e) {\n throw Error(`Something went wrong trying to start components tree: ${e.message}`);\n }\n logger.debug(\"Initializing the service worker\");\n __load__serviceWorker.call(_top)\n .catch(function (e) {\n logger.debug(`error loading the service worker ${e}`);\n });\n }\n resolve();\n });\n };\n logger.debug(\"Starting to load the config settings...\");\n if (_top.CONFIG.get(\"useConfigService\", false)) {\n logger.debug(\"Loading settings using local configuration file...\");\n _top.global.configService = New(ClassFactory(\"ConfigService\"));\n _top.global.configService.configLoaded = _buildComponents;\n serviceLoader(_top.global.configService);\n }\n else {\n logger.debug(\"Starting to load the components...\");\n _buildComponents.call(this);\n }\n }\n }\n ]);\n Export(ClassFactory(\"GlobalSettings\"));\n global = New(ClassFactory(\"GlobalSettings\"));\n _top = _CastProps(global, _top);\n Object.defineProperty(_top, \"PackagesNameList\", {\n set(val) {\n logger.debug(\"PackagesNameList is readonly\");\n return;\n },\n get() {\n var _get_packages_names = function (_packages) {\n var _keys = [];\n for (var _k in _packages) {\n if (typeof _packages[_k] !== \"undefined\" &&\n typeof _packages[_k] !== \"function\" &&\n Object.hasOwnProperty.call(_packages[_k], \"length\") &&\n _packages[_k].length > 0) {\n _keys.push(_k);\n _keys = _keys.concat(_get_packages_names(_packages[_k]));\n }\n }\n return _keys;\n };\n return _get_packages_names(_QC_PACKAGES);\n }\n });\n Object.defineProperty(_top, \"PackagesList\", {\n set(value) {\n logger.debug(\"PackagesList is readonly\");\n return;\n },\n get() {\n return _top.PackagesNameList.map(function (packagename) {\n let _classesList = Package(packagename);\n let _ret_;\n if (_classesList) {\n _ret_ = {\n packageName: packagename,\n classesList: _classesList.filter(function (_packageClass) {\n return isQCObjects_Class(_packageClass);\n })\n };\n }\n return _ret_;\n }).filter(function (_p) {\n return typeof _p !== \"undefined\";\n });\n }\n });\n Object.defineProperty(_top, \"ClassesList\", {\n set(value) {\n logger.debug(\"ClassesList is readonly\");\n return;\n },\n get() {\n var _classesList = [];\n _top.PackagesList.map(function (_package_element) {\n _classesList = _classesList.concat(_package_element.classesList.map(function (_class_element) {\n return {\n packageName: _package_element.packageName,\n className: _package_element.packageName + \".\" + _class_element.__definition.__classType,\n classFactory: _class_element\n };\n }));\n return _package_element;\n });\n return _classesList;\n }\n });\n Object.defineProperty(_top, \"ClassesNameList\", {\n set(value) {\n logger.debug(\"ClassesNameList is readonly\");\n return;\n },\n get() {\n return _top.ClassesList.map(function (_class_element) {\n return _class_element.className;\n });\n }\n });\n if (isBrowser) {\n // use of GLOBAL word is deprecated in node.js\n // this is only for compatibility purpose with old versions of QCObjects in browsers\n Class(\"GLOBAL\", _QC_CLASSES[\"global\"]); // case insensitive for compatibility con old versions;\n Export(ClassFactory(\"GLOBAL\"));\n }\n Export(global);\n if (_top.CONFIG.get(\"useSDK\")) {\n (function (_top) {\n var remoteImportsPath = _top.CONFIG.get(\"remoteImportsPath\");\n var external = (!_top.CONFIG.get(\"useLocalSDK\")) ? (true) : (false);\n _top.CONFIG.set(\"remoteImportsPath\", _top.CONFIG.get(\"remoteSDKPath\"));\n var tryImportingSDK = false;\n var sdkName = \"QCObjects-SDK\";\n if (isBrowser) {\n tryImportingSDK = true;\n }\n else {\n var sdkPath = findPackageNodePath(\"qcobjects-sdk\");\n if (sdkPath !== null) {\n sdkName = \"qcobjects-sdk\";\n tryImportingSDK = true;\n }\n else {\n sdkName = \"node_modules/qcobjects-sdk/QCObjects-SDK\";\n tryImportingSDK = true;\n }\n }\n if (tryImportingSDK) {\n logger.info(\"Importing SDK... \" + sdkName);\n if (isNodeCommonJS && typeof require !== \"undefined\") {\n let sdk = require(\"qcobjects-sdk\");\n }\n else {\n Import(sdkName, function () {\n if (external) {\n logger.debug(\"QCObjects-SDK.js loaded from remote location\");\n }\n else {\n logger.debug(\"QCObjects-SDK.js loaded from local\");\n }\n _top.CONFIG.set(\"remoteImportsPath\", remoteImportsPath);\n }, external);\n }\n }\n else {\n logger.debug(\"SDK has not been imported as it is not available at the moment\");\n }\n })(_top);\n }\n })(_top);\n if (isBrowser) {\n asyncLoad(function () {\n Ready(function () {\n /*\n * scroll management custom events\n * usage: document.addEventListener('percentY90',function(e){console.log(e.detail.percentY)});\n * possible events: scrollpercent, defaultscroll, percentY0, percentY25, percentY50, percentY75, percentY90\n */\n (function (_top) {\n let lastKnownScrollPosition = 0;\n let ticking = false;\n let scrollHeight = Math.max(document.body.scrollHeight, document.documentElement.scrollHeight, document.body.offsetHeight, document.documentElement.offsetHeight, document.body.clientHeight, document.documentElement.clientHeight);\n let scrollWidth = Math.max(document.body.scrollWidth, document.documentElement.scrollWidth, document.body.offsetWidth, document.documentElement.offsetWidth, document.body.clientWidth, document.documentElement.clientWidth);\n function scrollDispatcher(event) {\n var percentY = Math.round(_top.scrollY * 100 / scrollHeight);\n var percentX = Math.round(_top.scrollX * 100 / scrollWidth);\n var scrollPercentEventEvent = new CustomEvent(\"scrollpercent\", {\n detail: {\n percentX: percentX,\n percentY: percentY\n }\n });\n event.target.dispatchEvent(scrollPercentEventEvent);\n var secondaryEventName = \"defaultscroll\";\n var __valid_scrolls__ = [0, 5, 10, 25, 50, 75, 90, 95, 100];\n __valid_scrolls__.filter(function (p) {\n return p === percentY;\n }).map(function (pY) {\n secondaryEventName = \"percentY\" + percentY.toString();\n var secondaryCustomEvent = new CustomEvent(secondaryEventName, {\n detail: {\n percentX: percentX,\n percentY: percentY\n }\n });\n event.target.dispatchEvent(secondaryCustomEvent);\n });\n }\n document.addEventListener(\"scroll\", function (event) {\n if (!ticking) {\n requestAnimationFrame(function () {\n scrollDispatcher(event);\n ticking = false;\n });\n ticking = true;\n }\n });\n })(_top);\n });\n }, null);\n }\n if (!isBrowser) {\n if (typeof _top.global !== \"undefined\" && Object.hasOwnProperty.call(_top.global, \"_fireAsyncLoad\")) {\n _top.global._fireAsyncLoad.call(this);\n }\n if (typeof _top.global !== \"undefined\" && Object.hasOwnProperty.call(_top.global, \"onload\")) {\n _top.global.onload.call(this);\n }\n }\n /* Freezing Object && Object.prototype to prevent prototype pollution risks */\n (function (isBrowser) {\n var __freeze__ = function () {\n Object.freeze(Object.prototype);\n Object.freeze(Object);\n };\n if (isBrowser && _top.CONFIG.get(\"secureObjects\", false)) {\n Ready(function () {\n __freeze__();\n });\n }\n else if (_top.CONFIG.get(\"secureObjects\", false)) {\n __freeze__();\n }\n })(isBrowser);\n }\n}).call(null, (typeof module === \"object\" && typeof module.exports === \"object\") ? (module.exports = (typeof globalThis !== \"undefined\"\n ? globalThis\n : typeof self !== \"undefined\"\n ? self\n : typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : object)) : ((typeof global === \"object\") ? (global) : ((typeof window === \"object\") ? (window) : (object))));\n"], + "mappings": "slCAAAA,GAAAC,EAAA,CAAAC,EAAAC,IAAA,CAwBCC,EAAAA,EAAA,SAASC,EAAmBC,EAAM,CACjC,aACA,GAAI,OAAO,OAAO,eAAmB,KAAe,OAAOA,EAAS,IAClE,GAAI,CACF,OAAO,eAAeA,EAAK,oBAAqB,CAC9C,WAAY,GACZ,aAAc,GACd,SAAU,GACV,MAAOD,CACT,CAAC,CACH,MAAA,CACM,OAAOC,EAAK,kBAAsB,MACpCA,EAAK,kBAAkB,WAAa,GAExC,CAGF,GAAI,OAAOA,EAAK,kBAAkB,WAAe,IAAY,CAE3D,GADAA,EAAK,kBAAkB,WAAa,GAChC,OAAOA,EAAS,IAClB,MAAM,MAAM,8DAA8D,EAE5E,IAAIC,EAASD,EACbA,EAAK,OAASC,EACd,IAAIC,EAAY,OAAO,OAAW,KAAe,OAAO,OAAO,KAAS,KAAe,SAAW,OAAO,KACrGC,EAAkB,OAAON,EAAW,IACpCO,EAAoB,OAAO,IAAI,mBAAmB,EAClDC,EAAqB,OAAO,IAAI,oBAAoB,EACpDC,EAAa,CAAA,OAAO,IAAI,aAAa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5CJ,IACD,sBAAsB,UAAY,CAC9BG,EAAiBC,CAAK,EACtBJ,EAAU,EACd,CAAC,EACDA,EAAU,GAElB,CAAC,CACL,GAAG3gB,CAAI,CACX,CAAC,CACL,EAAG,IAAI,EAENG,IACG,OAAOH,EAAK,OAAW,KAAe,OAAO,eAAe,KAAKA,EAAK,OAAQ,gBAAgB,GAC9FA,EAAK,OAAO,eAAe,KAAK,IAAI,EAEpC,OAAOA,EAAK,OAAW,KAAe,OAAO,eAAe,KAAKA,EAAK,OAAQ,QAAQ,GACtFA,EAAK,OAAO,OAAO,KAAK,IAAI,GAInC,SAAUG,EAAW,CAClB,IAAIohB,EAAazhB,EAAA,UAAY,CACzB,OAAO,OAAO,OAAO,SAAS,EAC9B,OAAO,OAAO,MAAM,CACxB,EAHiB,cAIbK,GAAaH,EAAK,OAAO,IAAI,gBAAiB,EAAK,EACnDC,GAAM,UAAY,CACdshB,EAAW,CACf,CAAC,EAEIvhB,EAAK,OAAO,IAAI,gBAAiB,EAAK,GAC3CuhB,EAAW,CAEnB,EAAGphB,CAAS,EAEpB,EA7tJC,iBA6tJE,KAAK,KAAO,OAAON,IAAW,UAAY,OAAOA,GAAO,SAAY,SAAaA,GAAO,QAAW,OAAO,WAAe,IACtH,WACA,OAAO,KAAS,IACZ,KACA,OAAO,OAAW,IACd,OACA,OAAO,OAAW,IACd,OACA,OAAa,OAAO,QAAW,SAAa,OAAY,OAAO,QAAW,SAAa,OAAW,MAAS", + "names": ["require_QCObjects_SDK", "__commonJSMin", "exports", "module", "__name", "__qcobjects_sdk__", "_top", "global", "isBrowser", "isNodeCommonJS", "remoteImportsPath", "relativeImportPath", "external", "elementName", "_ret_", "_imports_", "_relative_path_", "__start__", "require_src", "sdk", "zt", "require_QCObjects", "__qcobjects__", "Ready", "e", "_QC_READY_LISTENERS", "isDeno", "deno_require", "_require_", "__require", "_protected_code_", "_", "__oldtoString", "_protected_symbols", "_methods_", "_m", "i", "regex", "matches", "match", "_DOMCreateElement", "fs", "_DataStringify", "data", "getCircularReplacer", "seen", "_level", "key", "value", "_LegacyCopy", "_subelements", "selector", "_domain_", "_basePath_", "_tag_filter_", "_basePath", "baseURI", "process", "_f", "_p", "response", "message", "_secretKey", "__secretKey", "is_phonegap", "asyncLoad", "callback", "args", "asyncCallback", "_fireAsyncLoad", "fc", "Logger", "color", "logger", "Base64", "t", "n", "r", "s", "o", "u", "a", "f", "c1", "c2", "c3", "waitUntil", "func", "exp", "_waitUntil", "maxWaitCycles", "_w", "_t", "localStorage", "name", "ComplexStorageCache", "params", "object", "load", "alternate", "cachedObjectID", "cachedResponse", "cachedNewResponse", "alternateResponse", "retrievedObject", "k", "c", "supportsPassive", "opts", "captureFalse", "tag", "_oo", "_tags", "_tt", "_Cast", "__instanceID", "_Object_Create", "hasOwn", "O", "QCObjects", "obj", "Properties", "prop", "target", "varArgs", "to", "index", "nextSource", "nextKey", "__is_raw_class__", "o_c", "_value_", "_QC_CLASSES", "_QC_PACKAGES", "_QC_PACKAGES_IMPORTED", "ObjectName", "ret", "obj_source", "obj_dest", "v", "_CastProps", "__is__forbidden_name__", "__getType__", "is_a", "typeName", "isQCObjects_Class", "isQCObjects_Object", "__make_global__", "__register_class__", "_class_", "__namespace", "RegisterClass", "Class", "_types_", "type", "definition", "_o_", "__publicField", "self", "m", "__class__", "__classType", "__hierarchy__proto__", "__hierarchy", "_css", "__instance__", "child", "tags", "j", "ClassFactory", "className", "_classFactory", "packageName", "_className", "_package", "Package", "packageClasses", "classFactory", "content", "_self", "_appendVDOM", "doc", "element", "_super_", "classMethodName", "New", "Export", "findPackageNodePath", "packagename", "sdkPath", "sdkPaths", "p", "string", "result", "char", "keychar", "crypt", "_CryptObject", "_DecryptObject", "shortCode", "length", "code1", "code2", "o1", "uniqueId", "_Processor", "_proc_", "component", "processorName", "processorHandler", "template", "funcName", "procesorMatch", "match0", "_k", "Processor", "arg", "_ConfigSettings", "_config_settings", "ConfigSettings", "_conf", "config", "_protectedEnc", "_protectedConf", "_default", "_value", "namespace", "classes", "_c1", "NamespaceRef", "b", "Import", "ready", "_promise_import_", "resolve", "reject", "allPackagesImported", "cp", "readyImported", "_imported_", "s1", "standardNodePath", "packageAbsoluteName", "jsNodePath", "_o", "effectArguments", "effectClass", "Tag", "tagname", "innerHTML", "addedKeys", "_i", "_Ready", "_execReady", "_ready_listener_", "_r", "DDO", "instance", "fget", "fset", "ddoInstance", "val", "is_ddo", "DefaultTemplateHandler", "templateInstance", "parsedAssignmentText", "__routing_params__", "routing", "routingPath", "standardRoutingPath", "__valid_routings__", "routings", "__valid_routing_way__", "validRoutingWays", "routingWay", "_buildComponentFromElement_", "__parent__", "__shadowed_not_set", "__tplsource_attr_not_set", "shadowed", "__cached_not_set", "cached", "tplextension", "_componentName", "_componentClassName", "__componentClassName", "__classDefinition", "__tplsource_prop_set", "tplsource", "componentURI", "ComponentURI", "__create_component_instance_", "__shadowed", "__definition", "newComponent", "_buildComponentsFromElements_", "elements", "componentsBuiltWith", "templateURI", "url", "method", "reload", "_body", "__promise__", "__shadowRoot", "body", "shadowRoot", "splashScreenComponent", "controller", "view", "serviceResponse", "standardResponse", "__routing_path__", "accumulator", "colData", "__serviceClass", "_serviceClassName", "__enable_service_class__", "_response_to_data_", "_response_to_template_", "serviceInstance", "serviceLoader", "request", "service", "rejectedResponse", "_component_", "_Controller", "controllerName", "effectClassName", "applyEffectTo", "viewName", "_View", "componentDone", "tagFilter", "elementList", "rebuildObjects", "error", "_feedComponent_InBrowser", "container", "tmp_shadowContainer", "shadowContainer", "qs", "_feedComponent_InNode", "_component", "_promise", "componentLoader", "oClass", "componentClass", "_route_promise_", "isValidInstance", "__route__", "componentList", "_componentNames_", "_promises_", "rc", "_promise_", "_rc_", "err", "elem", "componentBody", "routingNode", "attributeNames", "attributeName", "_parsedAssignmentText", "templateHandlerName", "templateHandlerClass", "selfData", "_componentRoot", "_imgLazyLoaded", "_lazyLoadImages", "image", "observer", "items", "item", "img", "_Effect", "_applyEffect_", "lang1", "lang2", "i18n", "callback_i18n", "messages", "_innerHTML", "componentHelper", "__component_helpers__", "_component_helper_", "__c__", "popStateEvent", "dependencies", "attrName", "subelementSelector", "handler", "param", "_async", "_componentLoaderInBrowser", "_feedComponent_", "xhr", "_componentLoaded", "successStatus", "is_file", "cache", "text", "_directLoad", "cacheController", "_componentLoaderInNode", "responseText", "_serviceLoaderInBrowser", "xhrasync", "header", "_serviceLoaderInNode", "URL", "serviceURL", "req", "captureEvents", "dataXML", "client", "buffer", "responseHeaders", "flags", "chunk", "requestOptions", "http2", "http", "https", "_req_", "_serviceLoaderMockup", "_serviceLoaderLocal", "d", "_ComponentWidget_", "componentWidget", "componentName", "__enabled__atributes__", "data_attributenames", "_attribute_name_", "RegisterWidget", "widgetName", "RegisterWidgets", "widgetList", "domain", "basePath", "stream", "microservice", "requestMethod", "supportedMethods", "allow_origins", "allow_credentials", "allow_methods", "allow_headers", "formData", "context", "properties", "__to_number", "prev", "current", "propName", "sortAsc", "sort_function", "_length", "_fillValue", "x_func", "x", "y_func", "y", "start", "stop", "step", "__instance", "h", "w", "square", "source", "_index", "_pname", "timing", "draw", "duration", "animate", "time", "timeFraction", "progress", "alphaFrom", "alphaTo", "angleFrom", "angleTo", "radiusFrom", "radiusTo", "scaleFrom", "scaleTo", "_transition_", "componentRoot", "eff", "__effectClass__", "effectObj", "effectClassMethod", "intervalInterceptor", "timer", "thread", "elapsed", "positive", "negative", "toggle", "mapper", "componentInstance", "valueName", "globalValue", "componentValue", "dataValue", "list", "listItems", "dataItems", "layout", "layoutname", "cssfile", "layout_portrait", "layout_landscape", "layout_code", "k1", "k2", "quick_component", "repeat", "GlobalSettings", "__load__serviceWorker", "registration", "_buildComponents", "_get_packages_names", "_packages", "_keys", "_classesList", "_packageClass", "_package_element", "_class_element", "tryImportingSDK", "sdkName", "Xt", "lastKnownScrollPosition", "ticking", "scrollHeight", "scrollWidth", "scrollDispatcher", "event", "percentY", "percentX", "scrollPercentEventEvent", "secondaryEventName", "__valid_scrolls__", "pY", "secondaryCustomEvent", "__freeze__", "Zt", "require_org_qcobjects_i18n_messages", "qcobjects_1", "J", "i18n_messages", "i18n_packagename", "require_org_qcobjects_models", "require_org_qcobjects_effects", "Fade", "da", "alpha", "Move", "xfrom", "yfrom", "xto", "yto", "dx", "dy", "MoveXInFromRight", "MoveXInFromLeft", "MoveYInFromBottom", "MoveYInFromTop", "RotateX", "angle", "RotateY", "RotateZ", "Rotate", "Radius", "dr", "radius", "Resize", "ds", "scale", "WipeLeft", "WipeRight", "WipeUp", "WipeDown", "ModalFade", "ModalMoveDown", "ModalMoveUp", "require_org_qcobjects_components", "org_qcobjects_effects_1", "Re", "FormField", "_objList", "_datak", "_obj", "_datamodel", "ShadowedComponent", "ButtonField", "InputField", "TextField", "EmailField", "ModalEnclosureComponent", "ModalComponent", "submodal", "modalId", "modal", "modalcontent", "closebtn", "SwaggerUIComponent", "require_org_qcobjects_components_grid", "GridItemComponent", "GridComponent", "subcomponentClass", "require_org_qcobjects_components_list", "ListItemComponent", "ListComponent", "require_org_qcobjects_components_slider", "require_org_qcobjects_components_notifications", "NotificationComponent", "_display_", "appearEffect", "disappearEffect", "require_org_qcobjects_components_splashscreen", "SplashScreenComponent", "isStartURL", "_enabled_", "_helper_", "mainComponent", "SplashScreenHandler", "mainElement", "slotlogo", "VideoSplashScreenComponent", "CubeSplashScreenComponent", "require_org_qcobjects_controllers", "require_org_qcobjects_controllers_grid", "templateRows", "templateCols", "page", "totalPage", "totalElements", "offset", "limit", "pagesNumber", "paginateIn", "record", "dataIndex", "subcomponent", "serviceClass", "serverDataCount", "successfulResponse", "failedResponse", "require_org_qcobjects_controllers_list", "valueField", "labelField", "cssLayout", "ul", "require_org_qcobjects_controllers_slider", "slideIndex", "interval", "sliderHandlerName", "slides", "dots", "slide", "dot", "dotHTML", "dotContent", "require_org_qcobjects_controllers_form", "org_qcobjects_components_1", "Ct", "fieldName", "_regex", "_pattern_", "_hasValidation", "_isInvalid", "_execValidation", "_componentRoot_", "fieldsToValidate", "_labelledby", "parentElement", "_e", "_ariatitle", "invalidFields", "validationMessage", "modalBody", "require_org_qcobjects_controllers_swagger", "ui", "swaggerUIPackagePath", "require_org_qcobjects_modal_controllers", "require_org_qcobjects_views", "require_org_qcobjects_tools_canvas", "canvas", "zoom", "px", "py", "width", "height", "resizedImage", "require_org_qcobjects_tools_layouts", "require_org_qcobjects_cloud_auth_session_usertoken", "SessionUserToken", "__token__", "username", "__index__", "password", "require_org_qcobjects_cloud_auth_session_data", "org_qcobjects_cloud_auth_session_usertoken_1", "Et", "sessionData", "defaultValue", "sessionContainer", "Jt", "en", "tn", "nn", "rn", "an", "dn", "un", "pn", "mn", "bn", "wn", "_n", "Nn", "Tn", "En", "Mn", "Ln", "require_public", "__commonJSMin", "exports", "module", "sdk", "require_QCObjects", "__commonJSMin", "exports", "module", "__name", "__qcobjects__", "_top", "Ready", "e", "isBrowser", "_QC_READY_LISTENERS", "global", "isDeno", "isNodeCommonJS", "deno_require", "_require_", "__require", "_protected_code_", "_", "__oldtoString", "_protected_symbols", "_ret_", "_methods_", "_m", "i", "regex", "matches", "match", "_DOMCreateElement", "elementName", "fs", "_DataStringify", "data", "getCircularReplacer", "seen", "_level", "key", "value", "_LegacyCopy", "_subelements", "selector", "_domain_", "_basePath_", "_tag_filter_", "_basePath", "baseURI", "process", "_f", "_p", "response", "message", "_secretKey", "__secretKey", "is_phonegap", "asyncLoad", "callback", "args", "asyncCallback", "_fireAsyncLoad", "fc", "Logger", "color", "logger", "Base64", "t", "n", "r", "s", "o", "u", "a", "f", "c1", "c2", "c3", "waitUntil", "func", "exp", "_waitUntil", "maxWaitCycles", "_w", "_t", "localStorage", "name", "ComplexStorageCache", "params", "object", "load", "alternate", "cachedObjectID", "cachedResponse", "cachedNewResponse", "alternateResponse", "retrievedObject", "k", "c", "supportsPassive", "opts", "captureFalse", "tag", "_oo", "_tags", "_tt", "_Cast", "__instanceID", "_Object_Create", "hasOwn", "O", "QCObjects", "obj", "Properties", "prop", "target", "varArgs", "to", "index", "nextSource", "nextKey", "__is_raw_class__", "o_c", "_value_", "_QC_CLASSES", "_QC_PACKAGES", "_QC_PACKAGES_IMPORTED", "ObjectName", "ret", "obj_source", "obj_dest", "v", "_CastProps", "__is__forbidden_name__", "__getType__", "is_a", "typeName", "isQCObjects_Class", "isQCObjects_Object", "__make_global__", "__register_class__", "_class_", "__namespace", "RegisterClass", "Class", "_types_", "type", "definition", "_o_", "__publicField", "self", "m", "__class__", "__classType", "__hierarchy__proto__", "__hierarchy", "_css", "__instance__", "child", "tags", "j", "ClassFactory", "className", "_classFactory", "packageName", "_className", "_package", "Package", "packageClasses", "classFactory", "content", "_self", "_appendVDOM", "doc", "element", "_super_", "classMethodName", "New", "Export", "findPackageNodePath", "packagename", "sdkPath", "sdkPaths", "p", "string", "result", "char", "keychar", "crypt", "_CryptObject", "_DecryptObject", "shortCode", "length", "code1", "code2", "o1", "uniqueId", "_Processor", "_proc_", "component", "processorName", "processorHandler", "template", "funcName", "procesorMatch", "match0", "_k", "Processor", "arg", "_ConfigSettings", "_config_settings", "ConfigSettings", "_conf", "config", "_protectedEnc", "_protectedConf", "_default", "_value", "namespace", "classes", "_c1", "NamespaceRef", "b", "Import", "ready", "external", "_promise_import_", "resolve", "reject", "allPackagesImported", "cp", "readyImported", "_imported_", "s1", "standardNodePath", "packageAbsoluteName", "jsNodePath", "_o", "effectArguments", "effectClass", "Tag", "tagname", "innerHTML", "addedKeys", "_i", "_Ready", "_execReady", "_ready_listener_", "_r", "DDO", "instance", "fget", "fset", "ddoInstance", "val", "is_ddo", "DefaultTemplateHandler", "templateInstance", "parsedAssignmentText", "__routing_params__", "routing", "routingPath", "standardRoutingPath", "__valid_routings__", "routings", "__valid_routing_way__", "validRoutingWays", "routingWay", "_buildComponentFromElement_", "__parent__", "__shadowed_not_set", "__tplsource_attr_not_set", "shadowed", "__cached_not_set", "cached", "tplextension", "_componentName", "_componentClassName", "__componentClassName", "__classDefinition", "__tplsource_prop_set", "tplsource", "componentURI", "ComponentURI", "__create_component_instance_", "__shadowed", "__definition", "newComponent", "_buildComponentsFromElements_", "elements", "componentsBuiltWith", "templateURI", "url", "method", "reload", "_body", "__promise__", "__shadowRoot", "body", "shadowRoot", "splashScreenComponent", "controller", "view", "serviceResponse", "standardResponse", "__routing_path__", "accumulator", "colData", "__serviceClass", "_serviceClassName", "__enable_service_class__", "_response_to_data_", "_response_to_template_", "serviceInstance", "serviceLoader", "request", "service", "rejectedResponse", "_component_", "_Controller", "controllerName", "effectClassName", "applyEffectTo", "viewName", "_View", "componentDone", "tagFilter", "elementList", "rebuildObjects", "error", "_feedComponent_InBrowser", "container", "tmp_shadowContainer", "shadowContainer", "qs", "_feedComponent_InNode", "_component", "_promise", "componentLoader", "oClass", "componentClass", "_route_promise_", "isValidInstance", "__route__", "componentList", "_componentNames_", "_promises_", "rc", "_promise_", "_rc_", "err", "elem", "componentBody", "routingNode", "attributeNames", "attributeName", "_parsedAssignmentText", "templateHandlerName", "templateHandlerClass", "selfData", "_componentRoot", "_imgLazyLoaded", "_lazyLoadImages", "image", "observer", "items", "item", "img", "_Effect", "_applyEffect_", "lang1", "lang2", "i18n", "callback_i18n", "messages", "_innerHTML", "componentHelper", "__component_helpers__", "_component_helper_", "__c__", "popStateEvent", "dependencies", "attrName", "subelementSelector", "handler", "TPL_SOURCE", "COMPONENTS_BASE_PATH", "COMPONENT_NAME", "TPLEXTENSION", "_async", "_componentLoaderInBrowser", "_feedComponent_", "xhr", "_componentLoaded", "successStatus", "is_file", "cache", "text", "_directLoad", "cacheController", "_componentLoaderInNode", "responseText", "_serviceLoaderInBrowser", "xhrasync", "header", "_serviceLoaderInNode", "URL", "serviceURL", "req", "captureEvents", "dataXML", "client", "buffer", "responseHeaders", "flags", "chunk", "requestOptions", "http2", "http", "https", "_req_", "_serviceLoaderMockup", "_serviceLoaderLocal", "d", "_ComponentWidget_", "componentWidget", "componentName", "__enabled__atributes__", "data_attributenames", "_attribute_name_", "RegisterWidget", "widgetName", "RegisterWidgets", "widgetList", "domain", "basePath", "stream", "microservice", "requestMethod", "supportedMethods", "allow_origins", "allow_credentials", "allow_methods", "allow_headers", "formData", "context", "properties", "__to_number", "prev", "current", "propName", "sortAsc", "sort_function", "_length", "_fillValue", "x_func", "x", "y_func", "y", "start", "stop", "step", "__instance", "h", "w", "square", "source", "_index", "_pname", "timing", "draw", "duration", "animate", "time", "timeFraction", "progress", "alphaFrom", "alphaTo", "angleFrom", "angleTo", "radiusFrom", "radiusTo", "scaleFrom", "scaleTo", "_transition_", "componentRoot", "eff", "__effectClass__", "effectObj", "effectClassMethod", "intervalInterceptor", "timer", "thread", "elapsed", "positive", "negative", "toggle", "mapper", "componentInstance", "valueName", "globalValue", "componentValue", "dataValue", "list", "listItems", "dataItems", "layout", "layoutname", "cssfile", "layout_portrait", "layout_landscape", "layout_code", "k1", "k2", "quick_component", "repeat", "GlobalSettings", "__load__serviceWorker", "registration", "_buildComponents", "_get_packages_names", "_packages", "_keys", "_classesList", "_packageClass", "_package_element", "_class_element", "remoteImportsPath", "tryImportingSDK", "sdkName", "sdk", "lastKnownScrollPosition", "ticking", "scrollHeight", "scrollWidth", "scrollDispatcher", "event", "percentY", "percentX", "scrollPercentEventEvent", "secondaryEventName", "__valid_scrolls__", "pY", "secondaryCustomEvent", "__freeze__"] +} diff --git a/browser/index.js b/browser/index.js index 15766185..eb30e76e 100644 --- a/browser/index.js +++ b/browser/index.js @@ -1,2 +1,2 @@ -import{a as u,b as r}from"./chunks/chunk-O2PFFZVJ.js";var l=u(e=>{var _=e&&e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=_(r());e.default=i.default});export default l(); +import{a as u,b as r}from"./chunks/chunk-ZYLXOA35.js";var l=u(e=>{var _=e&&e.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var i=_(r());e.default=i.default});export default l(); //# sourceMappingURL=index.js.map diff --git a/build/QCObjects.js b/build/QCObjects.js index 172525f2..ec213240 100644 --- a/build/QCObjects.js +++ b/build/QCObjects.js @@ -4865,4 +4865,4 @@ ? window : typeof global !== "undefined" ? global - : {})) : ((typeof global === "object") ? (global) : ((typeof window === "object") ? (window) : ({})))); + : object)) : ((typeof global === "object") ? (global) : ((typeof window === "object") ? (window) : (object)))); diff --git a/src/QCObjects.js b/src/QCObjects.js index 1cee2b35..d53b77e5 100644 --- a/src/QCObjects.js +++ b/src/QCObjects.js @@ -5231,6 +5231,7 @@ } })(isBrowser); } + }).call(null, (typeof module === "object" && typeof module.exports === "object") ? ( module.exports = (typeof globalThis !== "undefined" ? globalThis @@ -5240,7 +5241,7 @@ ? window : typeof global !== "undefined" ? global - : {}) + : object) ) : ((typeof global === "object") ? (global) : ( - (typeof window === "object") ? (window) : ({}) + (typeof window === "object") ? (window) : (object) ))); \ No newline at end of file diff --git a/src/index.d.ts b/src/index.d.ts index 6d9a11d8..af4b909a 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -1,5 +1,5 @@ declare module "QCObjects" { - const _exports: {}; + const _exports: any; export = _exports; } declare module "index" {