profoundjs
Version:
Profound.js Framework and Server
115 lines • 2.96 MB
JavaScript
function qa(){return function(b){return b}}function va(){return function(){}}function wa(b){return function(){return this[b]}}function za(b){return function(){return b}}var Ea,Q="dspf",Ja="dspfDesigner0",Ma="dspfDesigner",Xa="OFF";var Ya=0,Za=-20,$a=[],cb=[],db={};Q=="genie"&&window.parent==window&&window.history.forward(1);var mb=typeof window.pui=="object"?pui.serverURL:null;window.pui={};if(mb)pui.serverURL=mb;var tb=navigator.userAgent.toLowerCase();pui.is_edge=tb.indexOf("edg/")!=-1;pui.is_ie=false;pui.is_opera=tb.indexOf("opera")!=-1||tb.indexOf("opr/")!=-1;pui.is_chrome=!pui.is_edge&&tb.indexOf("chrome")!=-1;pui.is_safari=!pui.is_edge&&!pui.is_chrome&&tb.indexOf("safari")!=-1;pui.is_firefox=tb.indexOf("firefox")!=-1;
pui.is_android=tb.indexOf("android")!=-1;pui.is_quirksmode=document.compatMode=="BackCompat";pui.is_ios=tb.indexOf("iphone")!=-1||tb.indexOf("ipad")!=-1||tb.indexOf("ipod")!=-1;var ub,vb,zb,Ab;ub=/trident\/([0-9]{1,}[.0-9]{0,})/;Ab=ub.exec(tb);if(Ab!=null)vb=parseFloat(Ab[1]);if(!pui.is_opera){ub=/msie ([0-9]{1,}[.0-9]{0,})/;Ab=ub.exec(tb);if(Ab!=null)zb=parseFloat(Ab[1])}if(vb||zb){pui.is_ie=true;pui.ie_mode=zb||vb+4;if(pui.ie_mode<11)pui.is_old_ie=true;pui.ie_version=vb?vb+4:zb}pui.secLevel=0;
pui.Ih=null;pui.fd=null;pui.Mc=null;pui.defaultDateFormat="MM/DD/YY";pui.is_touch="ontouchstart"in window;pui.touchDevice=pui.is_touch;pui.is_mouse_capable=false;pui.designer={};pui.designer["initial keywords"]=[];pui.designer.currentDisplay={};pui.ide={};pui.cloud={};pui.cloud.views={};pui.social={};pui.cnv={};pui.cnv.r={};pui.im={};pui.toolbox={};pui.toolbox.add=va();pui["field exit key"]=107;pui["field exit minus key"]=109;pui["no connection status"]=false;pui["client side timeout"]=true;
pui.aK={"*ISO":1,"*USA":2,"*EUR":3,"*JIS":4,"*MDY":5,"*DMY":6,"*YMD":7,"*JUL":8,"*JOB":10};pui.bK={"/":1,"-":2,".":3,",":4," ":5,"*BLANK":5,"*JOB":7};pui.cK={"*ISO":1,"*USA":2,"*EUR":3,"*JIS":4,"*HMS":9};pui.dK={".":3,",":4," ":5,"*BLANK":5,":":6,"*JOB":7};
pui.dR=["abstract","arguments","await","boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","eval","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","let","long","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try",
"typeof","var","void","volatile","while","with","yield"];pui.kb=false;pui.aZ=null;pui["function key pattern"]="^(F|CA|CF|CK|CMD)([0-9]{1,2})([=:-])(.*)$";pui["special key pattern"]="^(Enter|PageUp|PageDown|Rollup|RollDown|RollDn|PgUp|PgDn|Help|Print)([=-])(.*)$";pui.OI=0;pui["session timeout retries"]=0;pui.m5=0;pui.Wv=false;pui.RE="profoundjs.com";pui.aj="http://www.w3.org/2000/svg";pui.XH={};pui["text file name pattern"]=/.+\.(css|js|json|html|htm|xml|txt|csv|sh|md|sql|scn|lst|xml|conf|php|log|ts|less|scss|cpp|ejs|vue|ts|jsx)$/i;
pui["always allow field exit"]=false;pui.dup={};pui.dup["char"]="\u25cf";pui.dup.keyCode=45;pui.dup.shift=true;pui.dup.ctrl=false;pui.dup.alt=false;pui.wf={ka:{},Cb:{},plugins:{},addPlugin:function(b){var a=pui.wf.plugins,c=b.category;a[c]||(a[c]={});a[c][b.name]=b}};pui["add combo style properties to choice list"]=true;pui.viewdesigner=false;pui.nodedesigner=false;if(window.pui_cloud_designer)pui.nodedesigner=true;else if(location.pathname.match(/^\/ide/i))pui.nodedesigner=true;else{var Bb=location.pathname.match(/\/([^/]+)\/?$/i);if(Bb&&Bb[1].toLowerCase()==="viewdesigner")pui.viewdesigner=true;else if(Bb&&Bb[1].toLowerCase()==="nodedesigner")pui.nodedesigner=true}pui.ya=false;window.pui||(window.pui={});window.pui.baseVersion="6";window.pui.fixPackVersion="33.0";window.pui.version=window.pui.baseVersion+"."+window.pui.fixPackVersion;function Cb(b){if(b.touches!=null&&b.touches.length==1)return b.touches[0].target;b=b.target;if(b.nodeType==3)b=b.parentNode;return b}function Gb(b){b.preventDefault();b.stopPropagation()}pui.Ba=function(b){Gb(b);return false};function Hb(b){b.target.Ld==null&&Ib([8,9,13,16,17,18,19,20,27,33,34,35,36,37,38,39,40,45,46,48,49,50,51,52,53,54,55,56,57,91,93,96,97,98,99,100,101,102,103,104,105,112,123,144,145,112,113,114,115,116,117,118,119,120,121,122,123],b)}
function Pb(b){b.target.Ld==null&&Ib([8,9,13,16,17,18,19,20,27,32,33,34,35,36,37,38,39,40,45,46,48,49,50,51,52,53,54,55,56,57,91,93,96,97,98,99,100,101,102,103,104,105,110,112,123,144,145,188,190,112,113,114,115,116,117,118,119,120,121,122,123,189,109],b)}
function Sb(b){b.target.Ld==null&&Ib([8,9,13,16,17,18,19,20,27,33,34,35,36,37,38,39,40,45,46,48,49,50,51,52,53,54,55,56,57,91,93,96,97,98,99,100,101,102,103,104,105,109,112,123,144,145,112,113,114,115,116,117,118,119,120,121,122,123,189,pui["field exit key"],pui["field exit minus key"]],b)}function Vb(b){for(var a=Array(256),c=0;c<=255;c++)a[c]=c;Ib(a,b)}
function Wb(b){var a;if(typeof b=="string")b=Yb(b);if(b==null)return-1;if(b.tagName!="INPUT"||!pui.io(b))return-1;if(document.selection!=null){if(b==null)b=document.activeElement;a=document.selection.createRange()}var c=0;if(b!=null&&a!=null&&b.createTextRange!=null)try{var d=b.createTextRange();if(d){for(;a.compareEndPoints("StartToStart",d)>0;){d.moveStart("character",1);c++}return c}}catch(e){return-1}else if(b!=null)try{if(b.selectionStart!=null)return b.selectionStart}catch(f){}return-1}
function $b(){if(pui.ide&&pui.ide.designerId)return true;if(V==null)return false;if(V.designer==null)return false;return true}
function ac(b,a){var c,d="",e="",f,g=false;if(b.gc()!=200){c="HTTP "+b.gc();d=b.ss()+"."}else{g=b.Ib().indexOf("<?xml")!=-1;if(g==false)try{f=eval("("+b.Ib()+")");if(f.success!=true){c=f.errorId;d=f.errorText;e=f.errorText2}}catch(h){c="CPF9897";d="The server response is missing or invalid."}}if(c!=null){$a.push({NA:a,id:c,text:d,eC:e});return false}else return g==true?b.Ib():f.response}
pui.sE=function(b,a,c){function d(f,g){var h=bc(b.style[f]),l=h.lastIndexOf(")");if(l!=-1){h=h.substr(0,l);h+=g+"px)";c.style[f]=h}}var e=true;if(c==null){e=false;c=document.createElement("div");c.style.position="absolute";c.style.borderStyle="none";c.style.backgroundColor="transparent"}c.innerHTML='<label title="'+b.title+'" for="'+b.id+'">'+a+"</label>";c.className="label-for";a=bc(b.className.split(" ")[0]);a!=""&&pui.Da(c,"label-for-"+a);c.style.zIndex=b.currentStyle?b.currentStyle.zIndex:window.getComputedStyle?
document.defaultView.getComputedStyle(b,null).getPropertyValue("z-index"):20;if(b.style.top!="")c.style.top=b.style.top;else if(b.style.bottom!="")c.style.bottom=b.style.bottom;c.style.zIndex=b.style.zIndex;c.style.visibility=b.style.visibility;c.style.filter=b.style.filter;c.style.opacity=b.style.opacity;c.style.color=b.style.color;c.style.fontFamily=b.style.fontFamily;c.style.fontSize=b.style.fontSize;c.style.fontStyle=b.style.fontStyle;c.style.fontWeight=b.style.fontWeight;c.style.backgroundColor=
b.style.backgroundColor;if(!e){c.style.cursor=b.style.cursor?b.style.cursor:"pointer";c.aH=true;b.wk!=null&&b.parentNode.removeChild(b.wk);b.wk=c;b.hf=[];b.hf.push(c);b.parentNode!=null&&b.parentNode.appendChild(c)}a=b.offsetWidth;if(a<20)a=20;if(b.style.left!="")if(b.style.left.indexOf("calc")!=-1)d("left"," + "+a);else{e=pui.bO(b.style.left);c.style.left=e[1]=="px"?e[0]+a+"px":"calc("+b.style.left+" + "+a+"px)"}else if(b.style.right!=""){c.style.left="";a=c.getBoundingClientRect().width;if(a<10)a=
10;if(b.style.right.indexOf("calc")!=-1)d("right"," - "+a);else{e=pui.bO(b.style.right);c.style.right=e[1]=="px"?e[0]-a+"px":"calc("+b.style.right+" - "+a+"px)"}}if(b.style.top==""&&b.style.bottom!="")c.style.top=""};
Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(b,a){if(this==null)throw TypeError('"this" is null or not defined');var c=Object(this),d=c.length>>>0;if(typeof b!=="function")throw TypeError("predicate must be a function");for(var e=0;e<d;){var f=c[e];if(b.call(a,f,e,c))return f;e++}},configurable:true});
Array.prototype.findIndex||Object.defineProperty(Array.prototype,"findIndex",{value:function(b,a){if(this==null)throw new TypeError('"this" is null or not defined');var c=Object(this),d=c.length>>>0;if(typeof b!=="function")throw new TypeError("predicate must be a function");for(var e=0;e<d;){if(b.call(a,c[e],e,c))return e;e++}return-1},configurable:true,writable:true});
Array.prototype.includes||Object.defineProperty(Array.prototype,"includes",{value:function(b,a){if(this==null)throw new TypeError('"this" is null or not defined');var c=Object(this),d=c.length>>>0;if(d===0)return false;var e=a|0;for(e=Math.max(e>=0?e:d-Math.abs(e),0);e<d;){if(c[e]===b||typeof c[e]==="number"&&typeof b==="number"&&isNaN(c[e])&&isNaN(b))return true;e++}return false},configurable:true});
if(location.origin===undefined){pui.kJ=location.protocol+"//"+location.hostname+(location.port?":"+location.port:"");try{Object.defineProperty(location,"origin",{value:pui.kJ,enumerable:true})}catch(cc){location.origin=pui.kJ}delete pui.kJ}if(!Object.entries)Object.entries=function(b){for(var a=Object.keys(b),c=a.length,d=Array(c);c--;)d[c]=[a[c],b[a[c]]];return d};
String.prototype.includes||Object.defineProperty(String.prototype,"includes",{value:function(b,a){if(b instanceof RegExp)throw TypeError("first argument must not be a RegExp");if(a===undefined)a=0;return this.indexOf(b,a)!==-1}});String.prototype.startsWith||Object.defineProperty(String.prototype,"startsWith",{value:function(b,a){var c=a>0?a|0:0;return this.substring(c,c+b.length)===b}});
pui.yg=function(b,a){var c=b[a];if(c==null){var d=a.split(" "),e=Number(d[d.length-1]);if(!isNaN(e)&&e>0){d.pop();d=d.join(" ");d=b[d];if(d!=null){c={};for(var f in d){e=d[f];if(f=="name")c.name=a;else if(typeof e=="object"&&e.length!=null){c[f]=[];for(var g=0;g<e.length;g++)c[f].push(e[g])}else c[f]=d[f]}}}}return c};pui.od=function(b,a){for(var c=0;c<b.length;c++)if(b[c]==a)return c;return-1};pui.V4=function(b,a){for(var c=0;c<b.length;c++)a(b[c])};
pui.pe=function(b,a){if(a==null)a=0;var c=parseInt(b,10);if(isNaN(c))c=a;return c};
pui.hm=function(){var b={9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"Caps Lock",27:"Esc",33:"Page Up",34:"Page Down",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",45:"Insert",3:"Enter",63234:"Left",63235:"Right",63232:"Up",63233:"Down",63276:"Page Up",63277:"Page Down",63272:"Delete",63273:"Home",63275:"End"};return function(a,c){var d=a.key||String.fromCharCode(a.charCode||a.keyCode);a.ctrlKey||d&&d.length>1||!d&&!a.key&&b[a.keyCode]||c.test(d)||Gb(a)}}();
function Ib(b,a){if(Q=="genie"&&pui.V.C5(a)!="")return true;if(Q=="dspf"){var c;a:{c=a.keyCode;for(var d=0;d<b.length;d++)if(b[d]==c)if(!(a.mo&&Event.Px)){c=true;break a}a.preventDefault();a.stopPropagation();c=false}return c}var e,f;c=a.keyCode;d=a.target;var g=pui.io(d);if(pui.V.nj){if(pui.V.config.s5){if(a.mo)e=a.mo&&Event.Px;if(!a.mo)e=a.shiftKey;e?keyAhead.record("shift"+c):keyAhead.record(c)}Gb(a);return false}lastActiveElement=d;if(c==9){if(a.mo)e=a.mo&&Event.Px;if(!a.mo)e=a.shiftKey;if(e=
e?goPrev(d,0,true):goNext(d,true)){Gb(a);return false}}else if(c==35&&g){if(d.value!=ec(d.value))d.value=ec(d.value)}else if(c==37)if(g){f=Wb(d);if(f==0){goPrev(d);Gb(a);return false}}else{if(d.tagName!="TEXTAREA"){goPrev(d);Gb(a);return false}}else if(c==38&&d.tagName!="SELECT"&&d.tagName!="TEXTAREA"){if(d.Ld==null||d.Ld.kq()==false)if(!pui.V.config.Qr){goUp(d);Gb(a);return false}}else if(c==39)if(g){maxLength=Number(d.getAttribute("maxLength"));f=Wb(d);e=d.value.length;if(f>=e){goNext(d);Gb(a);
return false}}else{if(d.tagName!="TEXTAREA"){goNext(d);Gb(a);return false}}else if(c==40&&d.tagName!="SELECT"&&d.tagName!="TEXTAREA"){if(d.Ld==null||d.Ld.kq()==false)if(!pui.V.config.Qr){goDown(d);Gb(a);return false}}else if(c==45&&pui.is_ie&&g&&Q=="genie"&&a.shiftKey!=true&&a.ctrlKey!=true){e=d.selectionEnd;f=d.value.substring(0,e);f+=ec(d.value.substring(e));d.value=f;d.setSelectionRange(e,e)}if(g&&pui.H_(a)){pui.eJ(d);if(c==pui["field exit minus key"]&&fc(d,true)){Gb(a);return false}g=d.getAttribute("num");
if(c==pui["field exit minus key"]&&fc(d,true)&&!pui["disable field exit on alphanumeric"]){Gb(a);return false}else if(pui["disable field exit on alphanumeric"]&&(g==null||g=="000"||g=="010"))return false;fc(d);Gb(a);return false}if(a.ctrlKey==true&&(c==67||c==86))return true;for(d=0;d<b.length;d++)if(b[d]==c)if(!(a.mo&&Event.Px))return true;Gb(a);return false}
function fc(b,a){if(b.readOnly==true)return false;var c,d=false,e=b.getAttribute("signedNumeric"),f=b.getAttribute("num");f=f==="011"||f==="101"||f==="111";var g=false;if(a&&(e==null||e!="Y")&&!f)return false;c=b.gF;if(pui.is_touch&&!pui.is_mouse_capable)c=Wb(b);if(c==null)return false;if(c<0)return false;if(c>=0){g=b.value!==b.value.substr(0,c);b.value=b.value.substr(0,c);c=b.getAttribute("blankFill");if(e!=null&&e=="Y"||f)c="Y";if(c!=null&&c=="Y"){d=true;fill=" "}c=
b.getAttribute("zeroFill");if(c!=null&&c=="Y"){d=true;fill="00000000000000000000000000000000000000000000000000000000000000000000000000000000"}c=b.getAttribute("maxLength");if(d&&c!=null){d=fill+gc(b.value);d=d.substr(d.length-c);if(e!=null&&e=="Y"||a&&f)if(d.substr(d.length-1)!="-"){d+=a?"-":" ";d=d.substr(1)}b.value=d}}g&&typeof b.onchange==="function"&&b.onchange();b.getAttribute("autoenter")==="Y"?hc("enter"):goNext(b);return true}
pui.LL=function(b){if(!(pui.is_touch&&!pui.is_mouse_capable||pui.bc))if(pui.Zv==null)if(pui.confirmOnClose&&!pui.skipConfirm)if(!(Q=="genie"&&pui.P5())){for(var a=window;a!=null&&a!=a.parent;){a=a.parent;if(pui.Fp(a))return;try{if(typeof a.pui!="undefined")return}catch(c){}}if(pui.V!=null||!pui.designer.li||Q=="dspf"&&pui.designer.li&&typeof pui.ide.isDirty==="function"&&pui.ide.isDirty()){a=pui.ya?pui.closeMessage:pui.getLanguageText("runtimeMsg","closeMessage");if(Q=="genie"&&pui.V.config.closeMessage!=
null&&pui.V.config.closeMessage!="")a=pui.V.config.closeMessage;return b.returnValue=a}}};
pui.unload=function(){var b=false;if(pui.V!==null&&pui.hardshutdownOnClose)b=true;if((pui.shutdownOnClose||b)&&pui.Zv==null){pui.halted=true;window.puihalted=true;pui["keep frames"]||pui.$O();var a;a=pui.V==null?jc("PUI0001200.pgm"):jc("PUI0002110.pgm");if(pui.psid!=null&&pui.psid!="")a+="/"+pui.psid;if(pui.overrideSubmitUrl!=null&&typeof pui.overrideSubmitUrl=="function")try{a=pui.overrideSubmitUrl(a)}catch(c){}if(navigator!=null&&typeof navigator.sendBeacon=="function"&&typeof window.Blob=="function"){b=
new Blob([(b?"hardshutdown=1":"shutdown=1")+(pui.isCloud?"&workspace_id="+pui.cloud.ws.id:"")],{type:"application/x-www-form-urlencoded"});navigator.sendBeacon(pui.pn(a),b)}else{b=b?{hardshutdown:"1"}:{shutdown:"1"};if(pui.isCloud)b.workspace_id=pui.cloud.ws.id;kc({url:pui.pn(a),method:"post",suppressAlert:true,params:b})}pui.shutdownOnClose=false}};
pui.eE=function(){if(window.addEventListener){window.addEventListener("beforeunload",pui.LL,false);if(!pui.designer.li||pui.V!=null)window.addEventListener("unload",pui.unload,false)}else if(window.attachEvent){window.attachEvent("onbeforeunload",pui.LL);if(!pui.designer.li||pui.V!=null)window.attachEvent("onunload",pui.unload)}};
pui.Xg=function(b,a,c){var d=document.createElement("form");d.action=jc("PUI0009106.pgm");if(pui.pjsServer)d.action="/profoundui/PUI0009106.pgm";d.action+="?contentType="+b+"&fileName="+a;if(pui.isCloud)d.action+="&workspace_id="+pui.cloud.ws.id;d.method="post";b=lc("input","data");b.type="hidden";b.value=c;d.appendChild(b);document.body.appendChild(d);pui.skipConfirm=true;d.submit();setTimeout(function(){d.parentNode.removeChild(d);pui.skipConfirm=false},0)};
pui.Da=function(b,a){var c=b.className;if(c==null)c="";c=c.split(" ");for(var d=[],e=0;e<c.length;e++){if(c[e]==a)return;c[e]!=""&&d.push(c[e])}d.push(a);b.className=d.join(" ")};pui.Ta=function(b,a){b.className=pui.iI(b.className,a)};pui.iI=function(b,a,c){if(b==null)return"";if(b=="")return"";if(c==null||c=="")c=" ";b=b.split(c);c=[];for(var d=0;d<b.length;d++)b[d]!=""&&b[d]!=a&&c.push(b[d]);return c.join(" ")};
pui.R2=function(b,a){if(!(b.readOnly||b.disabled))if(!(a==null||a==null)){var c=b;if(c.comboBoxWidget!=null)c=c.comboBoxWidget.getBox();if(c.A!=null)c=c.A.getBox();c.emptyText=a;pui.yl(c);mc(c,"focus",function(d){d=Cb(d);if(d.value==d.emptyText){d.value="";pui.Ta(d,"empty-text")}});mc(c,"blur",function(d){pui.yl(Cb(d))})}};
pui.yl=function(b){if(!(b.readOnly||b.disabled))if(!(b.emptyText==null||b.emptyText==null)){if(b.value=="")b.value=b.emptyText;b.value==b.emptyText?pui.Da(b,"empty-text"):pui.Ta(b,"empty-text")}};
pui.HW=function(){function b(){if(d)Atrium.resetInactivityTimeout();else pui["client side timeout"]==true&&pui.ee.Xq.reset();pui.onuseractivity!=null&&pui.onuseractivity()}if(!pui.M0){try{var a=Atrium.getSettings()}catch(c){}var d=a&&a.ACTIMEOUT==="1";if(!(!d&&pui.onuseractivity==null&&pui["client side timeout"]!=true)){mc(document.body,"keydown",b);mc(document.body,"mousemove",b);mc(document.body,"click",b);mc(document.body,"touchstart",b);mc(document.body,"touchmove",b);pui.M0=true}}};pui.uc={};
pui.uc.cP=(new Date).getTime();pui.uc.kx=false;pui.uc.timeout=600;pui.uc.JO=null;pui.uc.sc=function(){if(pui.uc.kx)pui.uc.reset();else{var b=pui["keep alive interval"];try{var a=Atrium.getSettings()}catch(c){}if(a&&a.ACTIMEOUT==="1")b=pui.timeout-10;if(b!=null){pui.uc.timeout=b;pui.uc.start()}}};pui.uc.start=function(){if(!pui.uc.kx){var b=pui.uc.timeout*1E3;b/=4;if(b>3E3)b=3E3;pui.uc.JO=setInterval(pui.uc.check,b);pui.uc.reset();pui.uc.kx=true}};
pui.uc.stop=function(){if(pui.uc.kx){clearInterval(pui.uc.JO);pui.uc.kx=false}};pui.uc.reset=function(){pui.uc.cP=(new Date).getTime()};pui.uc.check=function(){if((new Date).getTime()-pui.uc.cP>=pui.uc.timeout*1E3){pui.keepAlive();pui.uc.reset()}};pui.nf=function(b){if(b.which!=null)if(b.which>1)return true;if(b.button!=null)if(b.button>1)return true;return false};
pui.$c=function(b,a){var c=0,d=0,e=-1;for(a=a===true&&Q=="dspf"&&V!=null&&V.designer!=null&&V.designer.container!=null&&V.designer.container.parentNode!=null&&V.designer.container.parentNode.parentNode!=null&&V.designer.container.parentNode.parentNode.contains(b);b!=null;){var f=true,g=b.offsetLeft,h=b.offsetTop;if(a)if(b.WG){g=Math.round((b.offsetLeft+b.clientLeft)*V.Fb);h=Math.round((b.offsetTop+b.clientTop)*V.Fb);e=1;f=false}else if(e==0){g-=Math.round(b.scrollLeft*V.Fb);h-=Math.round(b.scrollTop*
V.Fb);a=f=false}else{e--;g=Math.round((b.offsetLeft+b.clientLeft-b.scrollLeft)*V.Fb);h=Math.round((b.offsetTop+b.clientTop-b.scrollTop)*V.Fb);f=false;if(b==V.designer.container)e=0}c+=g;d+=h;if(b.tagName!=="BODY"&&f){c-=b.scrollLeft;d-=b.scrollTop}if(b.className=="scroller"){f=b.style.transform;if(f==null)f=b.style.webkitTransform;if(f!=null&&typeof f=="string"&&f.substr(0,10)=="translate("){f=f.substr(10);f=f.split(")")[0];g=f.split(",");f=g[0];g=g[1];if(f!=null&&g!=null){f=parseInt(bc(f));g=parseInt(bc(g));
if(!isNaN(f)&&!isNaN(g)){c+=f;d+=g}}}}b=b.parentNode&&b.parentNode.tagName!="TD"&&(a||b.parentNode.className=="puiresp"&&(b.parentNode.scrollTop>0||b.parentNode.scrollLeft>0))?b.parentNode:b.offsetParent}return[c,d]};pui.jc=va();pui.jc.prototype.Ic=function(){if(this!=null&&this!=window&&this!=document)for(var b=Object.getOwnPropertyNames(this),a=0,c=b.length;a<c;a++)try{delete this[b[a]]}catch(d){console.log(d)}};pui.jc.prototype.o2=za(false);
pui.kr=function(){this.Er=function(a){if(typeof a.length=="undefined")a=Array(a);for(var c,d=0;d<a.length;d++){c={};for(var e in a[d])c[e.toUpperCase()]=a[d][e];b.push(c)}};this.send=function(a,c){var d="",e,f,g;g=false;for(var h;!g;){e="ProfoundUIMIMEBoundary"+Math.ceil(1E9*Math.random());h=false;for(var l=0;l<b.length;l++){f=b[l].VALUE;if(f.indexOf(e)!=-1){h=true;break}}h||(g=true)}g=e;for(h=0;h<b.length;h++){e=b[h];if(!(typeof e.NAME!="string"||typeof e.VALUE!="string")){d+="--"+g+"\r\n";d+='Content-Disposition: form-data; name="'+
e.NAME+'"';if(typeof e.FILENAME=="string"){f="application/octet-stream";if(typeof e.CONTENTTYPE=="string")f=e.CONTENTTYPE;d+='; filename="'+e.FILENAME+'"\r\n';d+="Content-Type: "+f}if(e.TRANSFERENCODING!=null)d+="\r\nContent-Transfer-Encoding: "+e.TRANSFERENCODING;d+="\r\n\r\n";d+=e.VALUE;d+="\r\n"}}d+="--"+g+"--";e=new pui.Ajax(a);e.suppressAlert=true;e.async=true;e.method="POST";e.sendAsBinary=false;e.setRequestHeader("Content-Type","multipart/form-data; boundary="+g);e.postData=d;e.onready=c;e.send()};
var b=[]};pui.fJ=function(b){pui.eJ(Cb(b))};pui.eJ=function(b){b.gF=Wb(b)};pui.os=function(b,a){for(var c=[],d=0,e="",f="",g=0,h=false,l=0;l<b.length;l++){if(a===true&&d==6){f=f.substr(0,f.length-6);break}e=b.charAt(l);if(h){if(e=="'")h=false}else{if(e=="("){g+=1;d=0}else if(e==")"){g-=1;d=0}else if(e=="'"){h=true;d=0}else if(g==0)if(e.toLowerCase()==" from ".charAt(d))d++;else d=0;if(g<1)g=0}if(e==","&&g==0&&!h){c.push(bc(f));f="";d=0}else f+=e}c.push(bc(f));return c};
pui.C3={"remote system name":null,"database file":null,"database fields":null,"selection criteria":null,"order by":null,"custom sql":null,"name field":null,"value field":null,"summary option":null,"choices database file":null,"choice options field":null,"choice values field":null,"choices selection criteria":null,"parameter value":null,"choices parameter value":null,"case sensitive":null,"blob table":null,"blob column":null,"blob selection criteria":null};
pui.S_=function(b){return typeof pui.C3[b]!="undefined"};pui.Fi=function(b){var a=Q+".",c=b.id;if(b.parentNode!=null&&b.parentNode.A!=null)c=b.parentNode.id;if(Q=="genie"&&b.parentNode!=pui.runtimeContainer)if(c.lastIndexOf("_W")!=-1)c=c.substr(0,c.lastIndexOf("_W")+2);a+=typeof b.parentNode.parentNode.grid=="undefined"||b.DG?c:c.substr(0,c.lastIndexOf(".")+1)+"*";return a};
pui.qj=function(b,a,c){function d(){var k=pui.$N(),s=pui.aO(),u=encodeURIComponent(k.jv);h+=l+"datfmt="+encodeURIComponent(u);c!=null&&c.append("datfmt",u);u=encodeURIComponent(k.Sw);h+="&datsep="+u;c!=null&&c.append("datsep",u);u=encodeURIComponent(s.jv);h+="&timfmt="+u;c!=null&&c.append("timfmt",u);u=encodeURIComponent(s.Sw);h+="&timsep="+u;c!=null&&c.append("timsep",u);return h}var e=b["field type"]=="textbox",f=1,g="",h="",l="";g=/^(choices |blob )?(parameter value)( \d+)?/;var i="",q=1,r;for(var v in b){var o=
g.exec(v);if(o){if(r==null)r=(o[1]?o[1]:"")+o[2];if(o[3]!=null)q=Math.max(q,parseInt(o[3],10))}}if(r==null)return d();do{g=oc(b[r+i]);if(g!=""){v=f;if(e)v+=1;i=encodeURIComponent(g);h+=l+"p"+v+"="+i;c!=null&&c.append("p"+v,i);if(a!=null)a["p"+v]=g;l="&"}f++;i=" "+f}while(f<=q);return d()};pui.Lb=function(b){if(b==null)return false;if(typeof b!="string")return false;if(b=="")return false;if(b.substr(b.length-1,1)=="%")return true;return false};
pui.Gv=function(b){if(b==null)return false;if(typeof b!="string")return false;var a=Number(b);if(isNaN(a))return false;if(String(a)===b)return true;return false};pui.TN=function(b,a){if(b=="top"||b=="left"||b=="height"||b=="width")if(pui.Gv(a))return a+"px";return a};pui.bO=function(b){var a="",c="";if(typeof b=="string"){var d=/^([0-9.,-]+)(cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)$/i.exec(b);if(d!=null){b=Number(d[1]);if(isNaN(b))b=0;c=b;a=d[2]}else c=b}return[c,a]};
pui.dO=function(){var b=0;if(typeof window.pageYOffset=="number")b=window.pageYOffset;else if(document.body&&document.body.scrollTop)b=document.body.scrollTop;else if(document.documentElement&&document.documentElement.scrollTop)b=document.documentElement.scrollTop;return b};pui.qv=function(b){var a=pui.getLanguageText("runtimeMsg","no connection message");if(pui["no connection status"]==true)a+="\n"+b.Xl();if(pui.isCloud)if(b=b.Ib())a+="\n\nError details:\n"+b;return a};
pui.$N=function(){var b=null,a=null;if(typeof pui["sql date format"]=="string")b=pui.aK[pui["sql date format"].toUpperCase()];if(b==null)b=pui.aK["*ISO"];if(typeof pui["sql date separator"]=="string")a=pui.bK[pui["sql date separator"].toUpperCase()];if(a==null)a=pui.bK["/"];return{jv:b,Sw:a}};
pui.aO=function(){var b=null,a=null;if(typeof pui["sql time format"]=="string")b=pui.cK[pui["sql time format"].toUpperCase()];if(b==null)b=pui.cK["*ISO"];if(typeof pui["sql time separator"]=="string")a=pui.dK[pui["sql time separator"].toUpperCase()];if(a==null)a=pui.dK[":"];return{jv:b,Sw:a}};pui.JN=function(){var b=location.href.split("://"),a="",c="";if(b.length>1){a=b[0]+"://";b.splice(0,1);c=b.join("://")}else c=location.href;return c=a+c.split("/")[0]};
pui.Ez=function(b){var a=document.getElementsByTagName("head")[0];if(a==null)return null;var c=pui.JN();a=a.getElementsByTagName("link");for(var d=0;d<a.length;d++){var e=a[d];if(e.href==b)return e;if(e.href==c+b)return e}return null};pui.tG=function(b){var a=document.getElementsByTagName("head")[0];if(a==null)return null;var c=pui.JN();a=a.getElementsByTagName("script");for(var d=0;d<a.length;d++){var e=a[d];if(e.src==b)return e;if(e.src==c+b)return e}return null};
pui.Hb=function(b){if(typeof b!="string")return b instanceof Array?b:[];if(b=="")return[];var a;if(b.substr(0,1)=="["&&b.substr(b.length-1,1)=="]")try{definedPhrases=["Image","String","Object","Array","Number","Boolean","Date","Function","RegExp","Error"];phrase=b.substring(1,b.length-1);a=definedPhrases.includes(phrase)?Array(b):eval(b)}catch(c){}if(a==null)a=b.split(",");return a};
pui.cA=function(b){switch(b){case "number":case "date":case "datetime":case "time":case "email":case "url":case "month":case "tel":case "color":case "datetime-local":case "search":case "week":return true;default:return false}};pui.io=function(b){if(b.tagName=="INPUT")if(b.type==null||b.type==""||b.type=="text"||pui.cA(b.type)||b.type=="password")return true;return false};
pui.H_=function(b){var a=b.keyCode,c=pui["field exit key"],d=pui["field exit minus key"];return(a==c||a==d)&&(!b.shiftKey||c==16)&&(!b.ctrlKey||c==17)?true:false};pui.qO=function(b){b=b.parentNode;return b!=null&&(!pui.is_old_ie||b.nodeName!="#document-fragment")};pui.wn=function(b){if(!$b()&&(!pui.Wv||pui.pb||pui.appJob.auth)&&typeof b=="string"&&b.search("AUTH=")==-1){b+=b.search(/\?/)==-1?"?":"&";b+="AUTH="+encodeURIComponent(pui.pb?pui.pb:pui.appJob.auth)}return b};pui.validateEmail=function(b){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(b)};
pui.g=function(b){return b!=null&&typeof b=="object"&&typeof b.fieldName=="string"};pui.Ya=function(b){return b!=null&&typeof b=="object"&&typeof b.translations=="object"&&b.translations!=null&&typeof b.translations.length=="number"};pui.yb=function(b){return b!=null&&typeof b=="object"&&typeof b.routine=="string"};pui.jq=function(b){return b!=null&&typeof b=="object"&&b.join==true};
pui.Q3=function(b,a,c){function d(h){f=setTimeout(function(){f=null;a(h)},c)}function e(){clearTimeout(f);f=null}if(b&&b.addEventListener)if(typeof a=="function"){if(typeof c!="number")c=475;var f;try{b.addEventListener("touchstart",d,false);b.addEventListener("touchend",e,false)}catch(g){}}};pui.uz=function(b){b.checked?b.setAttribute("checked","checked"):b.removeAttribute("checked")};
pui.Pt=function(b){b=""+b;b=b.replace(/&/g,"&");b=b.replace(/</g,"<");b=b.replace(/>/g,">");b=b.replace(/"/g,""");b=b.replace(/\u001a/g,"□");return b=b.replace(/\u000c/g,"□")};pui.Fp=function(b){var a=false;try{a=typeof b.Atrium!="undefined"&&typeof b.Atrium.api!="undefined"}catch(c){}return a};pui.Nt=function(b){var a=false;try{if(b.location.host!=null)a=true}catch(c){}return a};
pui.Wd=function(){try{return localStorage!=null&&typeof window.localStorage!="undefined"?true:false}catch(b){return false}};pui.eH=function(){try{return sessionStorage!=null&&typeof window.sessionStorage!="undefined"?true:false}catch(b){return false}};
pui.Xv=function(b){if(b.substr(0,1)=="#")b=b.toUpperCase();if(b.substr(0,4)=="rgb("&&b.substr(b.length-1,1)==")"){b=b.substr(4,b.length-5);b=b.replace(/ /g,"");var a=b.split(",");b="#";for(var c=0;c<a.length;c++){var d=Number(a[c]).toString(16).toUpperCase();if(d.length==1)d="0"+d;b+=d}}return b};pui.pH=function(b,a){var c;if(b.stack){c=b.toString();var d=b.stack.split("\n");if(d.length>=1)c+=c.indexOf(bc(d[0]))!=0||d.length<2?" "+bc(d[0]):" "+bc(d[1])}else{if(typeof a=="string")c=a;c+=" "+b.toString()}console.log(c)};
pui.YA=function(b){if(pui.is_chrome&&pui.io(b)){var a=b.value;b.value="";b.value=a}};
pui.Qz=function(b,a){if(!(b===undefined||!b))if(!(b.tagName=="SPAN"&&b.className=="pui-highlight")){if(b.hasChildNodes())for(var c=0;c<b.childNodes.length;c++)pui.Qz(b.childNodes[c],a);if(b.nodeType==3){var d=b.nodeValue;if(d!=null&&typeof d=="string"){for(c=d.toLowerCase();c.indexOf(String.fromCharCode(160))!=-1;)c=c.replace(String.fromCharCode(160)," ");c=c.indexOf(a.toLowerCase());if(c>=0){var e=d.substr(c,a.length);d=document.createElement("span");d.appendChild(document.createTextNode(e));d.className=
"pui-highlight";c=b.splitText(c);c.nodeValue=c.nodeValue.substring(a.length);b.parentNode.insertBefore(d,c)}}}}};pui.hY=function(b){b=b.getElementsByTagName("span");for(var a;b.length&&(a=b[0]);){var c=a.parentNode;c.replaceChild(a.firstChild,a);c.normalize()}};
pui.H3=function(){if(!pui.is_mouse_capable)if(pui.Wd()&&localStorage["pui-is-mouse-capable"]=="true")pui.is_android||pui.is_ios||(pui.is_mouse_capable=true);else{var b=document.documentElement;if(b!=null){var a=function(){d=false},c=function(){if(d){if(pui.is_android||pui.is_ios){tc(b,"mousedown",a);tc(b,"mousemove",c);return}pui.is_mouse_capable=true;pui.Wd()&&localStorage.setItem("pui-is-mouse-capable","true");tc(b,"mousedown",a);tc(b,"mousemove",c)}d=true},d=false;mc(b,"mousedown",a);mc(b,"mousemove",
c)}}};pui.$O=function(){if(pui.is_chrome)for(var b=document.getElementsByTagName("iframe"),a=0;a<b.length;a++){var c=b[a],d=null;try{d=c.contentWindow.pui;c.contentWindow.puihalted=true}catch(e){}if(d!=null&&typeof d.unload==="function"){d.halted=true;d.unload()}else c.src=""}};
pui.haltFrames=function(){for(var b=document.getElementsByTagName("iframe"),a=0;a<b.length;a++){var c=b[a];if(c!=null){var d=null;try{d=c.contentWindow.pui;c.contentWindow.puihalted=true}catch(e){}if(d!=null&&typeof d==="object"){d.halted=true;typeof d.haltFrames==="function"&&d.haltFrames()}c.parentNode!=null&&c.parentNode.removeChild(c);c.src=""}}};
pui.breakMessagesInit=function(){if(!($b()||pui["brkmsg enable"]!==true))if(!(!pui.Wd()||typeof JSON!=="object"))if(!(typeof pui.appJob!=="object"||pui.appJob.user==null||pui.appJob.user.length<=0||pui.appJob.user==="QTMHHTP1")){pui["brkmsg poll interval"]=Number(pui["brkmsg poll interval"]);if(isNaN(pui["brkmsg poll interval"]))pui["brkmsg poll interval"]=30;else if(pui["brkmsg poll interval"]<1)pui["brkmsg poll interval"]=1;pui["brkmsg max errors"]=Number(pui["brkmsg max errors"]);if(isNaN(pui["brkmsg max errors"]))pui["brkmsg max errors"]=
3;pui["brkmsg max messages"]=Number(pui["brkmsg max messages"]);if(isNaN(pui["brkmsg max messages"]))pui["brkmsg max messages"]=10;pui["brkmsg user timeout"]=Number(pui["brkmsg user timeout"]);if(isNaN(pui["brkmsg user timeout"]))pui["brkmsg user timeout"]=300;else if(pui["brkmsg user timeout"]<=pui["brkmsg poll interval"])pui["brkmsg user timeout"]=pui["brkmsg poll interval"]+10;pui.Iy=0;pui.PL();var b;try{b=JSON.parse(localStorage.getItem("brkmsgMessages_"+pui.appJob.user))}catch(a){localStorage.setItem("brkmsgMessages_"+
pui.appJob.user,"[]")}if(window.parent==window||!pui.Fp(window.parent)){var c=document.createElement("div");c.id="pui-break-messages";c.style.zIndex=pui.Zi++;pui.runtimeContainer.appendChild(c);if(pui.Wd()){tc(window,"storage",pui.qE);mc(window,"storage",pui.qE);b&&pui.Iu(b)}}else{tc(window.parent,"storage",window.parent.Atrium.api.breakMessagesOnStorage);mc(window.parent,"storage",window.parent.Atrium.api.breakMessagesOnStorage);b&&window.parent.Atrium.api.breakMessagesShow(b,pui.appJob.user)}pui.TW()}};
pui.PL=function(){if(!pui||!pui.appJob||pui.appJob.auth.length<=0||pui.appJob.user.length<=0)return false;var b=localStorage.getItem("brkmsgActivePoller_"+pui.appJob.user),a=Number(localStorage.getItem("brkmsgLastPoll_"+pui.appJob.user));if(isNaN(a))a=0;var c=Date.now();a=c-a;var d=pui["brkmsg poll interval"]*1E3+1E4;if(b===null||a>=d&&b!==pui.appJob.auth){b=pui.appJob.auth;localStorage.setItem("brkmsgActivePoller_"+pui.appJob.user,b);localStorage.setItem("brkmsgLastPoll_"+pui.appJob.user,c)}var e;
c=false;try{e=JSON.parse(localStorage.getItem("brkmsgUserIds"))}catch(f){c=true}if(e==null||typeof e.pop!=="function"){e=[];c=true}d=[];if(pui.od(e,pui.appJob.user)<0){d.push(pui.appJob.user);c=true}for(var g=0;g<e.length;g++)if(e[g]!==pui.appJob.user){a=Number(localStorage.getItem("brkmsgLastPoll_"+e[g]));if(isNaN(a))a=0;if(Date.now()-a>=pui["brkmsg user timeout"]*1E3){localStorage.removeItem("brkmsgLastPoll_"+e[g]);localStorage.removeItem("brkmsgActivePoller_"+e[g]);localStorage.removeItem("brkmsgMessages_"+
e[g]);c=true}else d.push(e[g])}c&&localStorage.setItem("brkmsgUserIds",JSON.stringify(d));return b===pui.appJob.auth};
pui.TW=function(){if(!($b()||pui["brkmsg enable"]!==true)){typeof pui.pE==="number"&&clearInterval(pui.pE);pui.pE=setInterval(function(){if(typeof pui.appJob!=="object"||pui.appJob.user.length<=0||pui.appJob.user==="QTMHHTP1"||pui["brkmsg enable"]!==true)pui.rE();else{if(pui.PL()){xc({url:jc("PUI0009116.PGM"),method:"post",async:true,suppressAlert:true,params:{AUTH:pui.appJob.auth},onfail:function(){pui.Iy++;if(pui.Iy>=pui["brkmsg max errors"]){pui.rE();console.log("Stopped break-message polling; too many errors.")}},
handler:function(c){if(c==null||typeof c!=="object"||c.error){pui.Iy++;pui.Iy>=pui["brkmsg max errors"]&&pui.rE()}else if(c.success&&c.messages!=null&&typeof c.messages.pop==="function"&&c.messages.length>0){var d;try{d=JSON.parse(localStorage.getItem("brkmsgMessages_"+pui.appJob.user))}catch(e){console.log(e)}if(d==null||typeof d.pop!=="function")d=[];d=d.concat(c.messages);if(pui["brkmsg max messages"]>0&&d.length>pui["brkmsg max messages"])d=d.slice(d.length-pui["brkmsg max messages"],d.length);
if(window!=window.parent&&pui.Fp(window.parent))typeof window.parent.Atrium["brkmsg handler"]!=="function"&&window.parent.Atrium.api.breakMessagesShow(d,pui.appJob.user);else pui.Iu(d);localStorage.setItem("brkmsgMessages_"+pui.appJob.user,JSON.stringify(d))}}});localStorage.setItem("brkmsgLastPoll_"+pui.appJob.user,Date.now())}if(pui.Wd()&&typeof window.addEventListener==="undefined"&&typeof JSON==="object")try{var b=JSON.parse(localStorage.getItem("brkmsgMessages_"+pui.appJob.user));window!=window.parent&&
pui.Fp(window.parent)?window.parent.Atrium.api.breakMessagesShow(b,pui.appJob.user):pui.Iu(b)}catch(a){console.log(a)}}},pui["brkmsg poll interval"]*1E3)}};pui.rE=function(){clearInterval(pui.pE);tc(window,"storage",pui.qE)};
pui.oE=function(b){if(!(typeof pui.appJob!=="object"||pui.appJob.user.length<=0||pui.appJob.user==="QTMHHTP1")){Gb(b);if(!(b.keyCode&&b.keyCode!=13)){b=Cb(b).msgIdx;var a;try{a=JSON.parse(localStorage.getItem("brkmsgMessages_"+pui.appJob.user));if(a!==null&&typeof a.splice==="function"){if(!b&&b!=0)b=a.length-1;a.splice(b,1)}else a=[]}catch(c){console.log(c);a=[]}localStorage.setItem("brkmsgMessages_"+pui.appJob.user,JSON.stringify(a));pui.Iu(a)}}};
pui.Iu=function(b){if(typeof pui["brkmsg handler"]=="function")return pui["brkmsg handler"](b);pui.OL=false;if(!(b==null||typeof b.pop!=="function")){var a=document.getElementById("pui-break-messages");if(a){a.innerHTML="";if(b.length==0)pui.unmaskScreen();else{pui.maskScreen();pui.OL=true;pui.Zi+=2;a.style.zIndex=pui.Zi;for(var c=10,d=10,e=0;e<b.length;e++){var f=b[e];f.to=pui.appJob.user;var g=document.createElement("div");g.style.top=c+"px";g.style.left=d+"px";g.className="msg-wrap";var h=document.createElement("div");
h.className="msg-titlewrap";g.appendChild(h);var l=document.createElement("div");l.className="title";h.appendChild(l);var i=document.createElement("button");i.className="closeImg";i.msgIdx=e;h.appendChild(i);mc(i,"click",pui.oE);mc(i,"keydown",pui.oE);h=document.createElement("div");h.className="msg-body";if(typeof pui.breakMessageFormat==="function"){var q={title:"",body:""};pui.breakMessageFormat(f,q);l.innerHTML=q.title;h.innerHTML=q.body}else try{l.innerHTML=f.date+" "+f.time+"<br>"+f.jobNum+
"/"+f.jobUserName+"/"+f.jobName;h.innerHTML=f.to+":<br>"+f.msg}catch(r){console.log(r)}g.appendChild(h);a.appendChild(g);c+=1;d+=10}i.focus()}}}};pui.qE=function(b){if(typeof pui.appJob!=="object"||pui.appJob.user.length<=0||pui.appJob.user==="QTMHHTP1")return false;if(b.key!=="brkmsgMessages_"+pui.appJob.user)return false;try{var a=JSON.parse(b.newValue);pui.Iu(a)}catch(c){console.log(c)}return false};
pui.Ht=function(b){if(pui["submit log"]){console.log("=".repeat(80));console.log((new Date).toString()+": submit flag = "+b);console.log("-".repeat(80));try{throw Error();}catch(a){b=a.stack.split("\n");b[0].indexOf("Error")==0&&b.shift();b.shift();for(var c=0;c<b.length;c++)b[c]!=""&&console.log(b[c].replace(/^\s*at\s/,""))}}};if(typeof String.prototype.repeat!="function")String.prototype.repeat=function(b){for(var a="",c=0;c<b;c++)a+=this;return a};
pui.wait=function(b,a,c,d){var e=0,f=setInterval(function(){e+=b;if(c()===true){clearInterval(f);d(true)}else if(e>=a){clearInterval(f);d(false)}},b)};
pui.mL=function(b,a,c,d){if(b!=null){var e=b["field type"]||b.field_type;if(e!=null){if(e=="layout"&&b.template=="css panel")e="css panel";if(pui.widgets[e]!=null&&pui.widgets[e].dependencies!=null&&pui.widgets[e].dependencies.length>0){var f=["/fusionchartsxt/js/pui-fusioncharts.js"],g=document.getElementsByTagName("script"),h=document.getElementsByTagName("link");e=pui.widgets[e].dependencies;if($b()&&e.length>0)e=e.filter(function(k){if(f.indexOf(k)!==-1)return false;return true});var l="",i=document.URL.match(/^(https?:\/\/[^/]+)\//i);
if(i!=null&&i.length==2)l=i[1];for(i=0;i<e.length;i++){var q=e[i],r=false;if(typeof e[i]=="object"&&e[i]!=null&&typeof e[i].condition=="function"){if(e[i].condition(b,c,d)){q=e[i].script;r=true}}else if(typeof e[i]=="string")r=true;if(r){q=pui.normalizeURL(q);r=pui.normalizeURL(l+q);for(var v=false,o=0;o<g.length;o++)if(g[o].type.toLowerCase()=="text/javascript"&&(g[o].src==r||g[o].src==q)){v=true;break}if(h&&!v)for(o=0;o<h.length;o++)if(h[o].type.toLowerCase()=="text/css"&&(h[o].href==r||h[o].href==
q)){v=true;break}!v&&pui.od(a,q)<0&&a.push(q)}}}}}};
pui.Os=function(b,a){function c(){if(pui.nF.length<=0){pui.nF=null;e()}else{var o=pui.nF.shift();if(o!=null&&o.length>0){var k=document.getElementsByTagName("head")[0],s,u=o.substr(-4,4).toLowerCase();if(u===".css"){s=document.createElement("link");s.setAttribute("type","text/css");s.setAttribute("rel","stylesheet")}else{s=document.createElement("script");s.setAttribute("type","text/javascript")}s.onload=c;s.onerror=d;u===".css"?s.setAttribute("href",o):s.setAttribute("src",o);k.appendChild(s)}else c()}}
function d(o){if(o!=null&&o.target!=null)console.log("Failed to load widget dependency file ",o.target.src||o.target.href);c()}function e(){if(pui.Mp instanceof Array&&pui.Mp.length>0){var o=pui.Mp.shift(),k=new pui.Ajax({url:o.url,method:"get",suppressAlert:true,async:true,onsuccess:g,onfail:f});k.dC=o.dC;k.send()}else{pui.Mp!==undefined&&delete pui.Mp;a()}}function f(o){console.log("Failed to load custom layout template:",o.dC);e()}function g(o){pui.layout.templates[o.dC]=o.Ib();e()}var h,l=[];
if(b!=null)if(b.items!=null&&b.items.length>0)for(h=0;h<b.items.length;h++)pui.mL(b.items[h],l,null,b.designer);else if(b.layers!=null&&b.layers.length>0)for(var i=0;i<b.layers.length;i++){var q=b.layers[i];if(q!=null&&q.formats!=null&&q.formats.length>0)for(var r=0;r<q.formats.length;r++){var v=q.formats[r];if(v!=null&&v.metaData!=null&&v.metaData.items!=null&&v.metaData.items.length>0)for(h=0;h<v.metaData.items.length;h++)pui.mL(v.metaData.items[h],l,v.data,false)}}pui.nF=l;c()};
pui.b0=function(b,a){function c(d){d.length===0&&a();d.forEach(function(e){function f(){var l=d.indexOf(e);l>=0&&d.splice(l,1);d.length==0&&a()}var g=false,h=e.split("?")[0];if(h.substr(-3).toLowerCase()==".js")g=pui.loadJS({path:e,callback:f,onerror:function(){console.log("Failed to load "+e);f()}});else h.substr(-4).toLowerCase()==".css"&&pui.loadCSS(e);if(!g||g==false)setTimeout(f,0)})}b?xc({url:jc("PUI0009120.pgm?r="+Date.now()),method:"GET",suppressAlert:true,sendAsBinary:false,handler:function(d){d&&
d.status==="success"?c(d.data.files):a()},onfail:function(){a()}}):a()};pui.round=function(b,a){var c=Math.pow(10,a);return Math.round(b*c)/c};
pui.nz=function(b){var a;if(b.indexOf("<%")<0)return b;if(typeof window.ejs!=="object"||typeof window.ejs.render!=="function"){console.error("EJS templating library not loaded.");return b}if(pui.yF==null){var c={},d={};a=false;var e=pui.layers;if(e==null)e=[];e=e[e.length-1];if(e==null)e={formats:[]};e=e.formats;for(var f=0;f<e.length;f++){var g=e[f];for(var h in g.data){var l=g.data[h];if(h.substring(0,3).toUpperCase()==="*IN"){a=h.substr(3);isNaN(Number(a))||(a=Number(a));d[a]=l;a=true}else{c[h.toLowerCase()]=
l;c[h.toUpperCase()]=l;c[h]=l}}if(g.subfiles)for(var i in g.subfiles){l=g.subfiles[i].data;for(var q=g.subfiles[i]["field names"],r=[],v=0;v<l.length;v++){for(var o=l[v],k={},s=0;s<q.length;s++){var u=q[s];if(u.substring(0,3).toUpperCase()==="*IN"){a=u.substr(3);isNaN(Number(a))||(a=Number(a));d[a]=o[s];a=true}else{k[u.toLowerCase()]=o[s];k[u.toUpperCase()]=o[s];k[u]=o[s]}}r.push(k)}c[i.toLowerCase()]=r;c[i.toUpperCase()]=r;c[i]=r}}if(a)c.u5=d;pui.yF=c}try{b=window.ejs.render(b,pui.yF)}catch(w){console.error(w)}return b};
pui.DR=function(b,a){if(pui.zF)setTimeout(function(){pui.DR(b,a)},100);else if(pui.AY){pui.Wb(b);b.innerHTML=pui.nz(a)}else{pui.zF=true;pui.Wb(b);pui.loadJS({path:pui.normalizeURL("/ejs/ejs.min.js"),callback:function(){pui.Wb(b);b.innerHTML=pui.nz(a);pui.AY=true;pui.zF=false},onerror:function(){pui.zF=false}})}};pui.Nj=Object.create(pui.jc.prototype,{fl:{value:'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'},pr:{value:"http://schemas.openxmlformats.org"},IC:{value:"application/vnd.openxmlformats"}});
Object.defineProperties(pui.Nj,{Ut:{value:pui.Nj.IC+"-officedocument.spreadsheetml"},Vx:{value:pui.Nj.pr+"/spreadsheetml/2006/main"},Ux:{value:pui.Nj.pr+"/package/2006/relationships"},dl:{value:pui.Nj.pr+"/officeDocument/2006/relationships"}});
pui.tC=function(b){this.rC=b;this.rC.ar=this;this.Jh=this.xi=null;this.WB={};this.D3=0;this.Sr=[{Yv:0,kv:0,hv:0,Gu:0,zx:0},{Yv:2,kv:0,hv:0,Gu:0,zx:0,bE:1}];this.dM=1;this.oX={Yv:0,kv:1,hv:0,Gu:0,zx:1};this.DE=-1;this.pX={Yv:0,kv:0,hv:0,Gu:0,zx:0,zL:1,alignment:{QS:1}};this.EE=-1;this.HA={};this.IA=0};pui.tC.prototype=Object.create(pui.Nj);
function Bc(b,a,c){var d=b.WB[a];if(d==null){d=b.WB[a]={value:b.D3++,isString:true};if(c){a=d;if(b.DE<0)b.DE=b.Sr.push(b.oX)-1;a.Gh=b.DE}else if(/[\n\r]/.test(a)){a=d;if(b.EE<0)b.EE=b.Sr.push(b.pX)-1;a.Gh=b.EE}}return d}
function Cc(b,a,c){var d;if(typeof a!=="string")a="";if(typeof c!=="string")c="";var e=b.HA[c+a];if(e!=null)d=e.Gh;else{var f=-1;switch(a){case "m-d-y":f=14;break;case "j-M-y":f=15;break;case "j-M":f=16;break;case "M-y":f=17;break;case "g:i A":f=18;break;case "g:i:s A":f=19;break;case "g:i:s":f=19;break;case "G:i":f=20;break;case "G:i:s":f=21;break;case "m/d/y G:i":f=22;break;case "i:s":f=45;break;case "isu":f=47;break}if(f>=0)d=Dc(b,f);else{e="";if(c==="he_IL")e+="[$-101040D]";switch(a){case "R:i:s":e=
"hh:mm:ss";break;case "R.i.s":e="hh\\.mm\\.ss";break;case "g:i:s":e="h:mm:ss am/pm";break;case "h:i:s":e="hh:mm:ss am/pm";break;case "R":e="ddd\\,\\ dd\\ mmm\\ yyyy\\ hh:mm:ss";break;case "Y-m-d-H.i.s.uu":e="yyyy\\-mm\\-dd\\-hh\\.mm\\.ss.0";break;default:d=0;for(f=a.length;d<f;d++){var g=a.charAt(d);switch(g){case "d":e+="dd";break;case "D":e+="ddd";break;case "j":e+="d";break;case "l":e+="dddd";break;case "S":e+="\\S";break;case "z":e+="\\z";break;case "F":e+="mmmm";break;case "m":e+="mm";break;
case "M":e+="mmm";break;case "n":e+="m";break;case "Y":e+="yyyy";break;case "y":e+="yy";break;case "g":e+="h";break;case "h":e+="hh";break;case "G":e+="h";break;case "H":e+="hh";break;case "i":e+="mm";break;case "s":e+="ss";break;case "u":e+=".0";break;case "a":e+="am/pm";break;case "A":e+="AM/PM";break;case '"':e+=""";break;case " ":e+="\\ ";break;case "-":e+="\\-";break;case ".":e+="\\.";break;case ",":e+="\\,";break;case "/":e+="/";break;case ":":e+=":";break;default:e+="\\"+g;break}}break}f=
164+b.IA;b.IA++;d=Dc(b,f);e={id:f,Gh:d,code:e};b.HA[c+a]=e}}return d}function Dc(b,a){return b.Sr.push({Yv:a,kv:0,hv:0,Gu:0,zx:0,bE:1})-1}function Ec(b,a){b.fileName=a||"sheet";if(typeof JSZip=="function")b.TK();else{var c=b.Yx.bind(b);pui.loadJS({path:"/jszip/jszip.min.js",callback:b.TK.bind(b),onerror:function(){console.log("Failed to load /jszip/jszip.min.js");c()}})}}Ea=pui.tC.prototype;
Ea.TK=function(){if(typeof saveAs=="function"||pui.tG(pui.normalizeURL("/jszip/FileSaver.min.js"))!=null)this.SK();else{var b=this.Yx.bind(this);pui.loadJS({path:"/jszip/FileSaver.min.js",callback:this.SK.bind(this),onerror:function(){console.log("Failed to load /jszip/FileSaver.min.js");b()}})}};
Ea.SK=function(){if(this.xi){var b=this.xi,a=this.CK.bind(this),c=this.Jh;if(b.rc.length<1)a();else{b.sF=0;b.Jh=c;c=b.LU.bind(b);b.lX=a;for(a=0;a<b.rc.length;a++){b.rc[a].Xo=new XMLHttpRequest;b.rc[a].Xo.open("GET",b.rc[a].uri,true);b.rc[a].Xo.responseType="blob";b.rc[a].Xo.onload=c;b.rc[a].Xo.send()}}}else this.CK()};
Ea.CK=function(){var b,a;this.Jh&&typeof this.Jh.MB=="function"&&this.Jh.MB(pui.getLanguageText("runtimeMsg","compressing"));var c=pui.Nj.fl+'<Types xmlns="'+pui.Nj.pr+'/package/2006/content-types"><Default Extension="rels" ContentType="'+pui.Nj.IC+'-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/>';if(this.xi){b=this.xi.hN;for(a in b)c+='<Default Extension="'+a+'" ContentType="'+b[a]+'"/>'}c+='<Override PartName="/xl/workbook.xml" ContentType="'+this.Ut+'.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="'+
this.Ut+'.worksheet+xml"/><Override PartName="/xl/styles.xml" ContentType="'+this.Ut+'.styles+xml"/><Override PartName="/xl/sharedStrings.xml" ContentType="'+this.Ut+'.sharedStrings+xml"/>';if(this.xi!=null)c+='<Override PartName="/xl/drawings/drawing1.xml" ContentType="'+this.IC+'-officedocument.drawing+xml"/>';c+="</Types>";var d=this.fl+'<Relationships xmlns="'+this.Ux+'"><Relationship Id="rId1" Type="'+this.dl+'/officeDocument" Target="xl/workbook.xml"/></Relationships>',e='<?xml version="1.0" encoding="UTF-8" standalone="yes"?><workbook xmlns="'+
this.Vx+'" xmlns:r="'+this.dl+'"><sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets></workbook>',f=this.fl+'<Relationships xmlns="'+this.Ux+'"><Relationship Id="rId3" Type="'+this.dl+'/styles" Target="styles.xml"/><Relationship Id="rId1" Type="'+this.dl+'/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId4" Type="'+this.dl+'/sharedStrings" Target="sharedStrings.xml"/></Relationships>',g=this.fl+'<styleSheet xmlns="'+this.Vx+'">';if(this.IA>0){g+='<numFmts count="'+this.IA+
'">';for(var h in this.HA){b=this.HA[h];if(b.id>0)g+='<numFmt numFmtId="'+b.id+'" formatCode="'+b.code+'"/>'}g+="</numFmts>"}g+='<fonts count="2"><font><sz val="11"/><color theme="1"/><name val="Calibri"/><family val="2"/><scheme val="minor"/></font><font><u/><sz val="11"/><color rgb="0563C1"/><name val="Calibri"/><family val="2"/><scheme val="minor"/></font></fonts><fills count="1"><fill><patternFill patternType="none"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="2"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/><xf numFmtId="0" fontId="1" fillId="0" borderId="0"/></cellStyleXfs>';
g+='<cellXfs count="'+this.Sr.length+'">';b=0;for(a=this.Sr.length;b<a;b++){h=this.Sr[b];g+="<xf";var l=h.Yv||0;g+=' numFmtId="'+l+'"';l=h.kv||0;g+=' fontId="'+l+'"';l=h.hv||0;g+=' fillId="'+l+'"';l=h.Gu||0;g+=' borderId="'+l+'"';l=h.zx||0;g+=' xfId="'+l+'"';if(h.bE)g+=' applyNumberFormat="'+h.bE+'"';if(h.zL)g+=' applyAlignment="'+h.zL+'"';g+=h.alignment&&h.alignment.QS?'><alignment wrapText="'+h.alignment.QS+'"/></xf>':"/>"}g+='</cellXfs><dxfs count="0"/></styleSheet>';h=new JSZip;h.file("[Content_Types].xml",
c);h.file("_rels/.rels",d);h.file("xl/workbook.xml",e);h.file("xl/styles.xml",g);h.file("xl/sharedStrings.xml",Fc(this));h.file("xl/_rels/workbook.xml.rels",f);h.file("xl/worksheets/sheet1.xml",Hc(this.rC));c=this.rC.rc;if(this.xi){c.push({type:"drawing",target:"../drawings/drawing1.xml"});b=this.xi;a=b.anchors;d=b.fl+'<xdr:wsDr xmlns:xdr="'+b.pr+'/drawingml/2006/spreadsheetDrawing" xmlns:a="'+b.pr+'/drawingml/2006/main">';for(e=0;e<a.length;e++)d+='<xdr:twoCellAnchor editAs="oneCell"><xdr:from><xdr:col>'+
a[e].col+"</xdr:col><xdr:colOff>"+Math.round(a[e].left*9525)+"</xdr:colOff><xdr:row>"+a[e].row+"</xdr:row><xdr:rowOff>"+Math.round(a[e].top*9525)+"</xdr:rowOff></xdr:from><xdr:to><xdr:col>"+a[e].col+"</xdr:col><xdr:colOff>"+Math.round((a[e].width+a[e].left)*9525)+"</xdr:colOff><xdr:row>"+a[e].row+"</xdr:row><xdr:rowOff>"+Math.round((a[e].height+a[e].top)*9525)+'</xdr:rowOff></xdr:to><xdr:pic><xdr:nvPicPr><xdr:cNvPr id="'+(e+1)+'" name="Picture '+(e+1)+'"/><xdr:cNvPicPr><a:picLocks noChangeAspect="1" noChangeArrowheads="1"/></xdr:cNvPicPr></xdr:nvPicPr><xdr:blipFill><a:blip xmlns:r="'+
b.dl+'" r:embed="rId'+(a[e].rel+1)+'"></a:blip><a:srcRect/><a:stretch><a:fillRect/></a:stretch></xdr:blipFill><xdr:spPr bwMode="auto"><a:xfrm></a:xfrm><a:prstGeom prst="rect"><a:avLst/></a:prstGeom><a:noFill/></xdr:spPr></xdr:pic><xdr:clientData/></xdr:twoCellAnchor>';d+="</xdr:wsDr>";h.file("xl/drawings/drawing1.xml",d);b=this.xi;a=b.fl+'<Relationships xmlns="'+b.Ux+'">';for(d=0;d<b.rc.length;d++)a+='<Relationship Id="rId'+(d+1)+'" Type="'+b.dl+'/image" Target=".