profoundjs 7.20.4 → 7.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/auto-testing/static/test-runs/index.html +46 -0
  2. package/auto-testing/static/test-runs/script.js +477 -0
  3. package/auto-testing/static/test-runs/style.css +237 -0
  4. package/htdocs/profoundui/proddata/css/markdown.css +23 -0
  5. package/htdocs/profoundui/proddata/css/plogic.css +4976 -0
  6. package/htdocs/profoundui/proddata/fonts/gudea-v10-latin-700.eot +0 -0
  7. package/htdocs/profoundui/proddata/fonts/gudea-v10-latin-700.svg +276 -0
  8. package/htdocs/profoundui/proddata/fonts/gudea-v10-latin-700.ttf +0 -0
  9. package/htdocs/profoundui/proddata/fonts/gudea-v10-latin-700.woff +0 -0
  10. package/htdocs/profoundui/proddata/fonts/gudea-v10-latin-700.woff2 +0 -0
  11. package/htdocs/profoundui/proddata/fonts/gudea-v10-latin-italic.eot +0 -0
  12. package/htdocs/profoundui/proddata/fonts/gudea-v10-latin-italic.svg +301 -0
  13. package/htdocs/profoundui/proddata/fonts/gudea-v10-latin-italic.ttf +0 -0
  14. package/htdocs/profoundui/proddata/fonts/gudea-v10-latin-italic.woff +0 -0
  15. package/htdocs/profoundui/proddata/fonts/gudea-v10-latin-italic.woff2 +0 -0
  16. package/htdocs/profoundui/proddata/fonts/gudea-v10-latin-regular.eot +0 -0
  17. package/htdocs/profoundui/proddata/fonts/gudea-v10-latin-regular.svg +281 -0
  18. package/htdocs/profoundui/proddata/fonts/gudea-v10-latin-regular.ttf +0 -0
  19. package/htdocs/profoundui/proddata/fonts/gudea-v10-latin-regular.woff +0 -0
  20. package/htdocs/profoundui/proddata/fonts/gudea-v10-latin-regular.woff2 +0 -0
  21. package/htdocs/profoundui/proddata/fonts/material_icons.woff2 +0 -0
  22. package/htdocs/profoundui/proddata/js/atrium.js +188 -186
  23. package/htdocs/profoundui/proddata/js/designer.js +3242 -3237
  24. package/htdocs/profoundui/proddata/js/genie.js +2169 -2168
  25. package/htdocs/profoundui/proddata/js/plogic.grids.js +326 -0
  26. package/htdocs/profoundui/proddata/js/runtime.js +1133 -1133
  27. package/htdocs/profoundui/proddata/js/signon.js +101 -99
  28. package/htdocs/profoundui/userdata/html/atrium_login.html +4 -1
  29. package/package.json +3 -1
  30. package/profound.jse +1 -1
  31. package/setup/completeInstall.js +7 -0
  32. package/setup/config.js +4 -1
  33. package/setup/modules/environment/README.md +17 -0
  34. package/setup/modules/environment/atenvcmds.json +1283 -0
  35. package/setup/modules/environment/atenvir.json +1643 -0
  36. package/setup/modules/environment/atuserenvirdefaults.json +1789 -0
  37. package/setup/modules/puiscreens.json +283 -0
  38. package/setup/pjsdist.savf +0 -0
  39. package/setup/setup.js +10 -0
@@ -1,105 +1,107 @@
1
- function x(c){this.onready=this.onfail=this.onsuccess=this.cacheBuster=this.suppressAlert=this.password=this.user=this.async=this.url=this.reqData=this.postData=this.method=null;this.headers={};this.params=null;this.sendAsBinary=true;var b=this.overrideMimeType=null,a=null,d=null,e=null,g=typeof pui!="undefined"&&typeof pui.alert!="undefined"?pui.alert:alert,f=this;if(x.defaultHeaders)this.headers=x.defaultHeaders;if(typeof c=="object")for(var i in c){if(typeof this[i]!="undefined")this[i]=c[i]}else this.url=
2
- c;if(window.XMLHttpRequest)b=new XMLHttpRequest;else if(window.ActiveXObject)b=new ActiveXObject("Microsoft.XMLHTTP");else{g("Ajax request error: Unsupported browser.");return}this.send=this.send=function(){function h(){if(b.readyState==4){a=b.status===0?w?"Request aborted.":"Request failed. Check the browser console for more details.":b.status+" - "+b.statusText;f.onready!=null&&f.onready(f);if(b.status==200){d=true;f.onsuccess!=null&&f.onsuccess(f)}else{d=false;f.suppressAlert!=true&&g(a);f.onfail!=
3
- null&&f.onfail(f)}e=false}}var k,l=null,m=null,q=null;if(f.method==null)l="GET";else if(typeof f.method!="string"&&(f.method.toUpperCase()!="GET"||f.method.toUpperCase()!="POST"||f.method.toUpperCase()!="PUT"||f.method.toUpperCase()!="DELETE")){g('Invalid value for property: "method".');return}else l=f.method.toUpperCase();if(l=="POST"||l=="PUT"||l=="DELETE"){if(f.reqData!=null)q=f.reqData;else if(f.postData!=null)q=f.postData;if(q!=null){if(typeof q!="string"){g('Invalid value for property: "postData".');
1
+ function w(b){this.onready=this.onfail=this.onsuccess=this.cacheBuster=this.suppressAlert=this.password=this.user=this.async=this.url=this.reqData=this.postData=this.method=null;this.headers={};this.params=null;this.sendAsBinary=true;var c=this.overrideMimeType=null,a=null,d=null,e=null,g=typeof pui!="undefined"&&typeof pui.alert!="undefined"?pui.alert:alert,f=this;if(w.defaultHeaders)this.headers=w.defaultHeaders;if(typeof b=="object")for(var i in b){if(typeof this[i]!="undefined")this[i]=b[i]}else this.url=
2
+ b;if(window.XMLHttpRequest)c=new XMLHttpRequest;else if(window.ActiveXObject)c=new ActiveXObject("Microsoft.XMLHTTP");else{g("Ajax request error: Unsupported browser.");return}this.send=this.send=function(){function h(){if(c.readyState==4){a=c.status===0?x?"Request aborted.":"Request failed. Check the browser console for more details.":c.status+" - "+c.statusText;f.onready!=null&&f.onready(f);if(c.status==200){d=true;f.onsuccess!=null&&f.onsuccess(f)}else{d=false;f.suppressAlert!=true&&g(a);f.onfail!=
3
+ null&&f.onfail(f)}e=false}}var j,l=null,m=null,q=null;if(f.method==null)l="GET";else if(typeof f.method!="string"&&(f.method.toUpperCase()!="GET"||f.method.toUpperCase()!="POST"||f.method.toUpperCase()!="PUT"||f.method.toUpperCase()!="DELETE")){g('Invalid value for property: "method".');return}else l=f.method.toUpperCase();if(l=="POST"||l=="PUT"||l=="DELETE"){if(f.reqData!=null)q=f.reqData;else if(f.postData!=null)q=f.postData;if(q!=null){if(typeof q!="string"){g('Invalid value for property: "postData".');
4
4
  return}}else q=""}if(f.async==null)m=true;else if(f.async!=true&&f.async!=false){g('Invalid value for property: "async".');return}else m=f.async;if(typeof f.url!="string")g('Invalid value for property: "url".');else{if(f.user!=null)if(typeof f.user!="string"){g('Invalid value for property: "user".');return}if(f.password!=null)if(typeof f.password!="string"){g('Invalid value for property: "password".');return}if(f.onsuccess!=null)if(typeof f.onsuccess!="function"){g('Invalid value for event: "onsuccess".');
5
- return}if(f.onfail!=null)if(typeof f.onfail!="function"){g('Invalid value for event: "onfail".');return}if(f.onready!=null)if(typeof f.onready!="function"){g('Invalid value for event: "onready".');return}var o=true;if(q!=null)for(k in f.headers)if(k.toUpperCase()=="CONTENT-TYPE")if(f.headers[k].toLowerCase().indexOf("www-form-urlencoded")==-1)o=false;var t=f.url,n=f.params;if(typeof n=="object"){var j="";for(k in n){var r=n[k],p=[];if(typeof r=="object"){if(r.length!=null&&r.length>0)p=r}else p.push(r);
6
- for(r=0;r<p.length;r++){if(j!="")j+="&";j+=encodeURIComponent(k)+"="+encodeURIComponent(p[r])}}if(j!="")if(o&&(l=="POST"||l=="PUT"||l=="DELETE")){if(q!=null&&q!="")q+="&";else q="";q+=j}else{o=t.split("?");if(o.length==2&&o[1]!="")t=o[0]+"?"+o[1]+"&"+j;else t+="?"+j}}if(l==="GET"&&(f.cacheBuster===null||f.cacheBuster===true))t=pui.addUrlCacheBuster(t);try{typeof f.user=="string"&&typeof f.password=="string"?b.open(l,t,m,f.user,f.password):b.open(l,t,m);t=false;var s=f.headers;for(k in s){b.setRequestHeader(k,
7
- s[k]);if(k.toUpperCase()=="CONTENT-TYPE")t=true}if(l=="POST"||l=="PUT"||l=="DELETE")t||b.setRequestHeader("Content-type","application/x-www-form-urlencoded");typeof f.overrideMimeType=="string"&&typeof b.overrideMimeType=="function"&&b.overrideMimeType(f.overrideMimeType)}catch(v){g(v);return}e=true;var w=false;if(m==true){b.onload=h;b.onerror=h;b.onabort=function(){w=true;h()}}if(f.sendAsBinary==true)try{b.sendAsBinary(q)}catch(E){b.send(q)}else b.send(q);m!=true&&h()}};this.ok=this.N=function(){return d!=
8
- null?d:false};this.getResponseText=this.d=function(){return b.responseText};this.getResponseXML=this.w=function(){return b.responseXML};this.getStatus=this.e=function(){return b.status};this.getStatusText=this.n=function(){return b.statusText};this.getStatusMessage=this.m=function(){return a};this.getAllResponseHeaders=this.getAllResponseHeaders=function(){if(d)try{return b.getAllResponseHeaders()}catch(h){g(h)}};this.getResponseHeader=this.getResponseHeader=function(h){if(d)try{return b.getResponseHeader(h)}catch(k){g(k)}};
9
- this.setRequestHeader=this.setRequestHeader=function(h,k){f.headers[h]=k};this.abort=this.abort=function(){if(e===true)try{b.abort()}catch(h){g(h)}}}
10
- function y(c,b){var a,d,e,g="";if(arguments.length==1&&typeof arguments[0]=="object"){a=arguments[0];a.async=null;a.onsuccess=null;if(typeof a.handler=="function"){d=true;e=a.handler}else d=false}else if(b!=null&&typeof b=="function"){d=true;e=b}else d=false;a=new x(arguments[0]);a.async=d;a.onsuccess=function(f){g+=f.d();d==true&&e(g)};a.send();if(d==false)return g}
11
- function B(c,b){var a,d,e,g=null,f=false;if(arguments.length==1&&typeof arguments[0]=="object"){a=arguments[0];a.async=null;a.onsuccess=null;if(a.saveResponse==true)f=true;if(typeof a.handler=="function"){d=true;e=a.handler}else d=false}else if(b!=null&&typeof b=="function"){d=true;e=b}else d=false;a=new x(arguments[0]);a.async=d;a.onsuccess=function(i){i=i.d();if(f&&typeof pui=="object")pui.savedJSON=i;try{g=eval("("+i+")")}catch(h){e(null,h);return}d==true&&e(g)};a.send();if(d==false)return g}
12
- if(typeof window.pui=="undefined")window.pui={};window.RPGspRequest=x;window.pui.Ajax=x;window.pui.AjaxRequest=x;window.ajax=y;
13
- window.ajaxXML=function(c,b){var a,d,e,g=null;if(arguments.length==1&&typeof arguments[0]=="object"){a=arguments[0];a.async=null;a.onsuccess=null;a.onfail=null;a.onsuccess=null;if(typeof a.handler=="function"){d=true;e=a.handler}else d=false}else if(b!=null&&typeof b=="function"){d=true;e=b}else d=false;a=new x(arguments[0]);a.async=d;a.onsuccess=function(f){g=f.w();d==true&&e(g)};a.send();if(d==false)return g};window.ajaxJSON=B;
14
- window.ajaxSubmit=function(c,b){var a,d="",e=typeof pui!="undefined"&&typeof pui.alert!="undefined"?pui.alert:alert;if(typeof c=="object")a=c;else{a=document.getElementById(c);if(a==null)a=document.forms[c]}var g;if(a!=null)g=a.tagName;if(a==null||g==null||g.toUpperCase()!="FORM"){e("Ajax request error: Invalid form object.");return""}if(c.action==""){e("Ajax request error: Invalid form action.");return""}for(e=0;e<a.elements.length;e++){g=a.elements[e];if(g.name!=null&&g.name!=""){var f=false;if(g.tagName==
15
- "INPUT"){var i=g.type;i=i.toLowerCase();if(i=="hidden")f=true;if(i=="password")f=true;if(i=="text")f=true;if(pui.oa(i))f=true;if(i=="")f=true;if(i=="checkbox"||i=="radio")if(g.checked)f=true}if(g.tagName=="TEXTAREA")f=true;if(g.tagName=="SELECT")f=true;if(f){if(d!="")d+="&";d+=g.name+"="+encodeURIComponent(g.value)}}}a=new x(a.action);a.method="POST";a.postData=d;var h="",k;if(b!=null&&typeof b=="function")k=true;else{k=false;a.async=false}a.onsuccess=function(l){h+=l.d();k==true&&b(h)};a.send();
16
- if(k==false)return h};function D(c,b){var a,d;a=c!=null&&typeof c=="object"?c:document.getElementById(c);if(a==null)return"";d="";if(a.tagName.toLowerCase()=="div"){d=a.firstChild;d=d!=null&&d.tagName!=null&&d.tagName=="A"?d.innerHTML:a.innerHTML}if(a.tagName=="INPUT"&&a.type=="checkbox"){if(a.indeterminate===true)return a.indeterminateValue;if(a.checked&&a.checkedValue!=null)return a.checkedValue;if(!a.checked&&a.uncheckedValue!=null)return a.uncheckedValue;return a.checked}if(a.tagName=="INPUT"&&a.type=="radio")return a.checked;
17
- if(a.tagName=="TEXTAREA")d=a.value;else if(a.tagName=="INPUT"){var e=a.j;if(b&&e!=null&&typeof e.value==="string")if(e.value.length>0)d=a.j.value;else{if(pui["force auto complete match"]==false)d=a.value}else d=a.value}else if(a.tagName=="SELECT"){d=a.selectedIndex;d=d>=0?a.options[d].value:a.pui&&a.pui.properties&&a.pui.properties.value?a.pui.properties.value:a.value}if(a.comboBoxWidget!=null)d=a.comboBoxWidget.getValue();if(a.h!=null)d=a.h.getValue();if(a.signaturePad!=null)d=a.signaturePad.getValue();
18
- if(a.A!=null)d=String(a.value);if(a.g!=null){d="";if(a.g.K&&a.g.O!=null)d=a.g.O;else if(!a.g.K&&a.g.M!=null)d=a.g.M}if(a.pui&&a.pui.widget&&typeof a.pui.widget.getPropertyValue==="function")d=a.pui.widget.getPropertyValue("value");for(d=d.replace(/&nbsp;/g," ");d.indexOf(String.fromCharCode(160))!=-1;)d=d.replace(String.fromCharCode(160)," ");if(d==a.ha)d="";return d}function G(c){if(typeof c!=="string")return c;for(;c.charAt(0)==" ";)c=c.replace(c.charAt(0),"");return c}
19
- function I(c){if(typeof c!=="string")return c;return c.replace(/^\s*|\s*$/g,"")}pui.detachCalendar=function(c){if(typeof c=="string")c=document.getElementById(c);c!=null&&pui.sa(c)};
20
- function J(c,b,a){var d=false,e=location.href;e=e.split("?")[0];e=e.split("/");if(e.length>2&&e[e.length-2].toLowerCase()=="auth")d=true;e="/profoundui/";var g=["PUI0009101.PGM","PUI0009102.PGM","PUI0009103.PGM","PUI0009104.PGM","PUI0009107.PGM","PUI0009109.PGM","PUI0009110.PGM","PUI0009119.PGM"];if(typeof pui.widgetURLPrefix==="string"&&g.indexOf(c.toUpperCase())!=-1){e=pui.widgetURLPrefix;if(e.substr(e.length-1)!="/")e+="/"}if(d==true||a==true)e+="auth/";e+=c;if(b!=null&&b==true)e+="/"+PSID;if(pui.serverURL!=
21
- null)e=pui.serverURL+e;return e}pui.getProgramURL=J;pui.ja=function(c){return pui.v(c).x};pui.ka=function(c){return pui.v(c).y};
22
- pui.v=function(c){c=c||window.event;var b={x:0,y:0};if(c!=null&&c.touches!=null&&c.touches.length==1){b.x=c.touches[0].pageX;b.y=c.touches[0].pageY}else if(c!=null){if(c.pageX)b.x=c.pageX;else if(c.clientX)b.x=c.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);if(c.pageY)b.y=c.pageY;else if(c.clientY)b.y=c.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)}return b};
23
- function K(){var c={},b="";b=location.search.substring(1,location.search.length);if(b.length==0)return c;b=b.replace(/\+/g," ");b=b.split("&");for(var a=0;a<b.length;a++){var d=b[a].split("="),e=decodeURIComponent(d[0]),g="";if(d.length==2)g=decodeURIComponent(d[1]);c[e]=g}return c}if(typeof applyDesignProperty!="undefined")window.aa=applyDesignProperty;
24
- pui.r={u:function(c){for(var b="",a=0;a<c.length;a++){var d=c.codePointAt(a);d>65535&&a++;if(d<128)b+=String.fromCharCode(d);else{if(d<2048)b+=String.fromCharCode(d>>6|192);else{if(d<65536)b+=String.fromCharCode(d>>12|224);else{b+=String.fromCharCode(d>>18|240);b+=String.fromCharCode(d>>12&63|128)}b+=String.fromCharCode(d>>6&63|128)}b+=String.fromCharCode(d&63|128)}}return b},t:function(c){for(var b="",a=0,d=0,e=0,g=0,f=0;a<c.length;){d=c.charCodeAt(a);if(d<128){b+=String.fromCharCode(d);a++}else if(d<
25
- 224){e=c.charCodeAt(a+1);b+=String.fromCharCode((d&31)<<6|e&63);a+=2}else if(d<240){e=c.charCodeAt(a+1);g=c.charCodeAt(a+2);b+=String.fromCharCode((d&15)<<12|(e&63)<<6|g&63);a+=3}else{e=c.charCodeAt(a+1);g=c.charCodeAt(a+2);f=c.charCodeAt(a+3);b+=String.fromCodePoint((d&7)<<18|(e&63)<<12|(g&63)<<6|f&63);a+=4}}return b}};
26
- pui.W={c:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u:function(c){var b="",a,d,e,g,f,i,h=0;for(c=pui.r.u(c);h<c.length;){a=c.charCodeAt(h++);d=c.charCodeAt(h++);e=c.charCodeAt(h++);g=a>>2;a=(a&3)<<4|d>>4;f=(d&15)<<2|e>>6;i=e&63;if(isNaN(d))f=i=64;else if(isNaN(e))i=64;b=b+this.c.charAt(g)+this.c.charAt(a)+this.c.charAt(f)+this.c.charAt(i)}return b},t:function(c){var b="",a,d,e,g,f,i=0;for(c=c.replace(/[^A-Za-z0-9+/=]/g,"");i<c.length;){a=this.c.indexOf(c.charAt(i++));d=this.c.indexOf(c.charAt(i++));
27
- g=this.c.indexOf(c.charAt(i++));f=this.c.indexOf(c.charAt(i++));a=a<<2|d>>4;d=(d&15)<<4|g>>2;e=(g&3)<<6|f;b+=String.fromCharCode(a);if(g!=64)b+=String.fromCharCode(d);if(f!=64)b+=String.fromCharCode(e)}return b=pui.r.t(b)}};
28
- pui.downloadJSON=function(){if(pui.recordTest)pui.saveRecording();else if(pui.savedJSON==null)pui.alert("JSON is not available.");else{var c=pui.savedJSON;if(typeof JSON==="object"&&typeof JSON.parse==="function"&&typeof JSON.stringify==="function")try{c=JSON.stringify(JSON.parse(pui.savedJSON),null," ")}catch(b){}pui.F("text/plain","json.txt",c)}};
29
- pui.saveRecording=function(c){for(var b=null,a=0;a<pui.b.payloads.length;a++){if(!b&&pui.b.responses[a].appJob)b=pui.b.responses[a].appJob.user;pui.b.payloads[a].response=pui.b.responses[a]}var d=K().testid;(a=d)||(a=prompt("Enter recording name"));if(a)if(pui.pjsServer)if(pui.b.payloads.length===0)pui.alert("No recording to save.");else{b={id:d,appuser:b,payloads:pui.b.payloads};a={"Content-Type":"application/json"};if(sessionStorage["atrium-token"])a.Authorization="Basic "+sessionStorage["atrium-token"];
30
- fetch("/auto-testing/save-recording",{method:"POST",headers:a,body:JSON.stringify(b)}).then(function(g){if(g.ok){window.parent&&window.parent.Atrium&&window.parent.Atrium.api&&typeof window.parent.Atrium.api.reloadNavParent==="function"&&window.parent.Atrium.api.reloadNavParent("test-"+d);pui.b={payloads:[],responses:[]};typeof c==="function"?c():pui.alert("Recording saved.")}else pui.alert("Failed to save recording.")})["catch"](function(g){pui.alert("Error: Unable to save recording.");console.error("Fetch error:",
31
- g)})}else{b=JSON.stringify({user:b,payloads:pui.b.payloads});var e=a;e.endsWith(".json")||(e+=".json");if(pui["recording path"]){a=[];a.push({name:"path",value:pui["recording path"]+e});a.push({name:"text",value:"1"});a.push({name:"replace",value:"Y"});a.push({name:"json",value:b,fileName:e});b=new pui.X;b.Y(a);a=J("PUI0001109.pgm");a=a.replace("/auth","");b.send(a,function(g){var f,i={};if(g.e()!=200)f=g.m();if(!f){i=eval("("+g.d()+")");i.success||(f=i.errorText)}if(f)pui.alert(f);else{pui.alert("Recording saved.");
32
- pui.b={payloads:[],responses:[]}}})}else pui.F("text/plain",e,b)}};
33
- pui.keepAlive=function(){var c;if(!(context=="genie"&&pui.f.i==true)){if(context=="dspf")c=pui.f==null?J("PUI0001200.pgm"):J("PUI0002110.pgm");else if(context=="genie")c=window.DOCUMENT_URI;else return false;if(pui.psid!=null&&pui.psid!="")c+="/"+pui.psid;if(pui.overrideSubmitUrl!=null&&typeof pui.overrideSubmitUrl=="function")try{c=pui.overrideSubmitUrl(c)}catch(b){}if(context=="genie")pui.B(pui.f.i=true);if(context=="dspf")pui.q=false;pui.va();var a={keepalive:"1"};if(pui.isCloud)a.workspace_id=
34
- pui.cloud.ws.id;y({url:pui.Z(c),method:"post",params:a,sendAsBinary:false,suppressAlert:true,handler:function(){pui.I();if(context=="genie")pui.B(pui.f.i=false);if(context=="dspf")pui.q=true;for(var d=0;d<pui.o.length;d++)pui.o[d].unMask()},onfail:function(d){pui.onoffline==null&&!pui["suppress comm errors"]&&pui.alert(pui.la(d));pui.I();if(context=="genie")pui.B(pui.f.i=false);if(context=="dspf")pui.q=true;for(d=0;d<pui.o.length;d++)pui.o[d].unMask();pui.onoffline!=null&&pui.onoffline()}});return true}};
35
- pui.getWindowSize=function(){var c,b;if(document.body&&document.body.offsetWidth){c=document.body.offsetWidth;b=document.body.offsetHeight}if(document.compatMode=="CSS1Compat"&&document.documentElement&&document.documentElement.offsetWidth){c=document.documentElement.offsetWidth;b=document.documentElement.offsetHeight}if(window.innerWidth&&window.innerHeight){c=window.innerWidth;b=window.innerHeight}if(window.visualViewport&&window.visualViewport.width&&window.visualViewport.height){c=window.visualViewport.width;
36
- b=window.visualViewport.height}if(document.documentElement&&document.documentElement.clientWidth){c=document.documentElement.clientWidth;b=document.documentElement.clientHeight}if(c==null&&screen!=null)c=screen.width;if(b==null&&screen!=null)b=screen.height;if(c==null)c=800;if(b==null)b=600;return{width:c,height:b}};pui.openURL=function(c){window.open(c)};
37
- pui.normalizeURL=function(c,b){if(c==null||typeof c!="string")return"";if(b==true&&window.puiMobileClient==null)return c;if(c.substr(0,5).toLowerCase()=="http:"||c.substr(0,6).toLowerCase()=="https:"||c.substr(0,5).toLowerCase()=="data:")return c;return pui.serverURL!=null?pui.serverURL+c:window.cordova&&c.substr(0,1)=="/"?c.substr(1):c};
38
- pui.animate=function(c){var b,a,d=c.element;if(typeof d=="string")d=document.getElementById(d);if(d!=null){var e;b=c.effect;if(b=="fly in left"||b=="fly in right"||b=="fly out left"||b=="fly out right")e="left";else if(b=="fly in up"||b=="fly in down"||b=="fly out up"||b=="fly out down")e="top";else if(b=="fade in"||b=="fade out")e="opacity";else{e=c.properties;if(e==null){e=c.property;if(e==null)return}}if(typeof e=="string")e=[e];var g=c.duration;if(g==null)g="500ms";if(g.substr(g.length-1,1)!=
39
- "s")g+="s";var f=parseInt(g)*1E3;if(g.length>2&&g.substr(g.length-2,2)=="ms")f=parseInt(g);var i=c.type;if(i==null)i="ease";var h=c.from,k=c.to;switch(b){case "fly in right":h=-d.offsetWidth;h+="px";k="0px";break;case "fly in left":h=d.offsetWidth;h+="px";k="0px";break;case "fly out left":k=-d.offsetWidth;k+="px";h="0px";break;case "fly out right":k=d.offsetWidth;k+="px";h="0px";break;case "fly out down":k=d.offsetHeight;k+="px";h="0px";break;case "fly out up":k=-d.offsetHeight;k+="px";h="0px";break;
40
- case "fly in up":h=d.offsetHeight;h+="px";k="0px";break;case "fly in down":h=-d.offsetHeight;h+="px";k="0px";break;case "fade in":h="0";k="100";break;case "fade out":h="100";k="0";break}if(k!=null){var l="";for(b=0;b<e.length;b++){a=e[b];if(l!="")l+=", ";l+=a+" "+g+" "+i}var m=["transition","MozTransition","WebkitTransition","msTransition","OTransition"];if(h!=null){if(typeof h=="string"||typeof h=="number")h=[h];for(b=0;b<e.length;b++){a=e[b];d.style[a]=h[b]}}setTimeout(function(){for(var q=0;q<
41
- m.length;q++)d.style[m[q]]=l;setTimeout(function(){if(typeof k=="string"||typeof k=="number")k=[k];for(var o=0;o<e.length;o++)d.style[e[o]]=k[o];setTimeout(function(){for(var t=0;t<m.length;t++)d.style[m[t]]="";c.oncomplete!=null&&c.oncomplete()},f)},1)},1)}}};pui.getActiveElement=function(){return context=="genie"?lastActiveElement:pui.activeElement};pui.fieldExit=function(c){var b=pui.getActiveElement();if(b!=null){var a=false;if(c!=null)a=true;context=="genie"?fieldExit(b,a):pui.fa(b)}};
42
- pui.gotoNextElement=function(c){O(c,true)};pui.gotoPreviousElement=function(c){O(c,false)};
43
- function O(c,b){var a=b?1:-1,d=document.querySelectorAll("INPUT,SELECT,TEXTAREA"),e=d.length;if(!(e<2))for(var g=Array.prototype.indexOf.call(d,c),f=g+a,i;;){if(f===g)break;if(f===e)f=0;else if(f===-1)f=e-1;else{var h=i=d[f];if(i!=null&&i.comboBoxWidget!=null)h=i.comboBoxWidget.G();if(i!=null&&i.h!=null)h=i.h.G();if(h.readOnly||h.disabled||h.style.visibility==="hidden"||h.tabIndex==="-1"||!h.clientHeight||!h.clientWidth)f+=a;else{try{h.focus();if(document.activeElement!=h){f+=a;continue}setTimeout(function(){pui["highlight on focus"]&&
44
- typeof h.select=="function"&&h.select();pui.ua(null,h)},0)}catch(k){}break}}}}pui.showCalendar=function(c){var b=c;if(typeof c=="string")b=document.getElementById(c);if(b!=null)if(typeof b=="object"){var a=b.calimg;if(a!=null)if(a.click!=null&&typeof a.click=="function")a.click();else a.onclick!=null&&typeof a.onclick=="function"&&setTimeout(function(){a.onclick()},250)}};
45
- pui.getComputedStyle=function(c){var b=null;if(window.getComputedStyle)b=window.getComputedStyle(c);else if(c.currentStyle)b=c.currentStyle;return b};
46
- pui.upload=function(c,b){var a,d,e=c.dir,g=c.overwrite===true,f;if(typeof c.slimit=="number")f=c.slimit;var i;if(typeof c.flimit=="number")i=c.flimit;var h="";if(typeof c.altname=="string")h=c.altname;var k;if(typeof c.allowedTypes&&c.allowedTypes instanceof Array)k=c.allowedTypes;if(i==null)i=c.files.length;if(f==null||k==null){var l,m=[];for(a=0;a<c.files.length;a++){d=c.files[a];var q=typeof d.type!="undefined"&&d.type!=""?d.type:"application/octet-stream";pui.ba(m,q)==-1&&m.push(q);d=d.data&&
47
- d.data instanceof ArrayBuffer?d.data.byteLength:d.size;d=Math.ceil(d/1048576);if(l==null||d>l)l=d}if(f==null)f=l;if(k==null)k=m}l=J("PUI0009109.PGM");l+="?AUTH="+encodeURIComponent(pui.p?pui.p:pui.appJob.auth);if(c.mode!=="widget")l+="&mode=ajax";if(c.id)l+="&id="+encodeURIComponent(c.id);l+="&r="+Math.floor(Math.random()*1E9);if(pui.isCloud)l+="&workspace_id="+pui.cloud.ws.id;m=new FormData;m.append("dir",e);m.append("overwrite",g?"1":"0");m.append("flimit",i);m.append("slimit",f);m.append("altname",
48
- h);typeof c.generateNames=="string"&&m.append("generateNames",c.generateNames);for(a=0;a<k.length;a++)m.append("type",k[a]);for(a=0;a<c.files.length;a++){d=c.files[a];if(d.data&&d.data instanceof ArrayBuffer){var o;try{o=new Blob([d.data])}catch(t){e=new window.WebKitBlobBuilder;e.append(d.data);o=e.getBlob()}m.append("file",o)}else m.append("file",d);m.append("filename",d.name)}var n=new XMLHttpRequest;n.open("POST",l,true);n.onreadystatechange=function(){if(n.readyState==4){var j=true,r;if(n.status==
49
- 200){var p;try{p=eval("("+n.responseText+")")}catch(s){j=false;r="Server response missing or invalid."}if(p){j=p.success;if(!j)if(p.key){r=pui.getLanguageText("runtimeMsg","upload "+p.key);if(p.key=="file limit")r=r.replace("&1",i);if(p.key=="size limit")r=r.replace("&1",f)}else r=p.error}}else{j=false;r=n.status+" - "+n.statusText+".";if(n.status==0&&n.statusText=="")r="The FILE could not be found in the system."}typeof b=="function"&&b(j,r)}};if(typeof c.onabort=="function")n.onabort=c.onabort;
50
- if(typeof c.onprogress=="function"&&"upload"in n)n.upload.onprogress=c.onprogress;if(typeof c.onload=="function")n.onload=c.onload;n.send(m);return n};pui.getCookie=function(c){var b=document.cookie.split(";"),a="",d="",e="",g="";for(g=0;g<b.length;g++){a=b[g].split("=");d=a[0].replace(/^\s+|\s+$/g,"");if(d==c){if(a.length>1)e=unescape(a[1].replace(/^\s+|\s+$/g,""));return e}}return null};
51
- pui.setCookie=function(c,b,a,d,e,g,f){var i=new Date;i.setTime(i.getTime());if(a)a=a*1E3*60*60*24;i=new Date(i.getTime()+a);document.cookie=c+"="+escape(b)+(a?";expires="+i.toGMTString():"")+(d?";path="+d:"")+(e?";domain="+e:"")+(g?";secure":"")+(f?";SameSite="+f:"")};pui.deleteCookie=function(c,b,a,d,e){if(pui.getCookie(c))document.cookie=c+"="+(b?";path="+b:"")+(a?";domain="+a:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"+(d?";Secure":"")+(e?";SameSite="+e:"")};
52
- pui.refresh=function(c){if(c==null)c={};var b=c.url;c=c.skin;pui.setCookie("puiRefreshId",pui.psid,null,"/",null,null,"Strict");pui.skipConfirm=true;pui.shutdownOnClose=false;pui.confirmOnClose=false;if(c!=null){c="skin="+encodeURIComponent(c);b=window.location.href;var a=b.split("?");b=a[0];a=a[1];if(a==null)a="";a=a.split("&");for(var d=false,e=0;e<a.length;e++)if(a[e].length>=5&&a[e].substr(0,5).toLowerCase()=="skin="){a[e]=c;d=true}if(!d)if(a.length==1&&a[0]=="")a[0]=c;else a.push(c);a=a.join("&");
53
- b=b+"?"+a}if(b!=null)window.location.href=b;else window.location.reload()};
54
- pui.downloadURL=function(c){if(pui==null||pui.appJob==null||pui.appJob.auth==null||pui.appJob.auth=="")return pui.is_ie?"":"data:text/html,<!DOCTYPE html><html><body><p>To download, please connect to a Profound UI session.</p></body></html>";var b=c.inline===true;if(c.id==null)return"";var a=J("PUI0009110.PGM");a+="?id="+encodeURIComponent(c.id);if(c.contentType!=null)a+="&type="+encodeURIComponent(c.contentType);if(b)a+="&inline=1";a+="&usehttprc=0";a+="&AUTH="+encodeURIComponent(pui.p?pui.p:pui.appJob.auth);
55
- a+="&r="+Math.floor(Math.random()*1E9);return a};pui.download=function(c){var b=pui.downloadURL(c);c=c.inline===true;if(pui==null||pui.appJob==null||pui.appJob.auth==null||pui.appJob.auth=="")c=true;c?pui.openURL(b):pui.link(b)};
56
- pui.downloadFile=function(c){if(typeof c==="undefined"||c==null||typeof c.id!=="string"||c.id.length<1)pui.alert("Error downloading file. \n\n No file path given",null,"Error","Close");else{var b=pui.downloadURL(c),a=c.id,d=new XMLHttpRequest;d.responseType="blob";d.open("GET",b,true);d.send();var e=null,g=null,f=null,i=null;d.onprogress=function(h){var k=pui.extractFileNameFromContentDisposition(d.getResponseHeader("Content-Disposition"));if(!(a.split("/").pop()!=k&&k=="error.txt")){if(typeof d.onprogress.diaglogShown===
5
+ return}if(f.onfail!=null)if(typeof f.onfail!="function"){g('Invalid value for event: "onfail".');return}if(f.onready!=null)if(typeof f.onready!="function"){g('Invalid value for event: "onready".');return}var o=true;if(q!=null)for(j in f.headers)if(j.toUpperCase()=="CONTENT-TYPE")if(f.headers[j].toLowerCase().indexOf("www-form-urlencoded")==-1)o=false;var t=f.url,n=f.params;if(typeof n=="object"){var k="";for(j in n){var r=n[j],p=[];if(typeof r=="object"){if(r.length!=null&&r.length>0)p=r}else p.push(r);
6
+ for(r=0;r<p.length;r++){if(k!="")k+="&";k+=encodeURIComponent(j)+"="+encodeURIComponent(p[r])}}if(k!="")if(o&&(l=="POST"||l=="PUT"||l=="DELETE")){if(q!=null&&q!="")q+="&";else q="";q+=k}else{o=t.split("?");if(o.length==2&&o[1]!="")t=o[0]+"?"+o[1]+"&"+k;else t+="?"+k}}if(l==="GET"&&(f.cacheBuster===null||f.cacheBuster===true))t=pui.addUrlCacheBuster(t);try{typeof f.user=="string"&&typeof f.password=="string"?c.open(l,t,m,f.user,f.password):c.open(l,t,m);t=false;var s=f.headers;for(j in s){c.setRequestHeader(j,
7
+ s[j]);if(j.toUpperCase()=="CONTENT-TYPE")t=true}if(l=="POST"||l=="PUT"||l=="DELETE")t||c.setRequestHeader("Content-type","application/x-www-form-urlencoded");typeof f.overrideMimeType=="string"&&typeof c.overrideMimeType=="function"&&c.overrideMimeType(f.overrideMimeType)}catch(v){g(v);return}e=true;var x=false;if(m==true){c.onload=h;c.onerror=h;c.onabort=function(){x=true;h()}}if(f.sendAsBinary==true)try{c.sendAsBinary(q)}catch(E){c.send(q)}else c.send(q);m!=true&&h()}};this.ok=this.N=function(){return d!=
8
+ null?d:false};this.getResponseText=this.d=function(){return c.responseText};this.getResponseXML=this.w=function(){return c.responseXML};this.getStatus=this.e=function(){return c.status};this.getStatusText=this.n=function(){return c.statusText};this.getStatusMessage=this.m=function(){return a};this.getAllResponseHeaders=this.getAllResponseHeaders=function(){if(d)try{return c.getAllResponseHeaders()}catch(h){g(h)}};this.getResponseHeader=this.getResponseHeader=function(h){if(d)try{return c.getResponseHeader(h)}catch(j){g(j)}};
9
+ this.setRequestHeader=this.setRequestHeader=function(h,j){f.headers[h]=j};this.abort=this.abort=function(){if(e===true)try{c.abort()}catch(h){g(h)}}}
10
+ function y(b,c){var a,d,e,g="";if(arguments.length==1&&typeof arguments[0]=="object"){a=arguments[0];a.async=null;a.onsuccess=null;if(typeof a.handler=="function"){d=true;e=a.handler}else d=false}else if(c!=null&&typeof c=="function"){d=true;e=c}else d=false;a=new w(arguments[0]);a.async=d;a.onsuccess=function(f){g+=f.d();d==true&&e(g)};a.send();if(d==false)return g}
11
+ function B(b,c){var a,d,e,g=null,f=false;if(arguments.length==1&&typeof arguments[0]=="object"){a=arguments[0];a.async=null;a.onsuccess=null;if(a.saveResponse==true)f=true;if(typeof a.handler=="function"){d=true;e=a.handler}else d=false}else if(c!=null&&typeof c=="function"){d=true;e=c}else d=false;a=new w(arguments[0]);a.async=d;a.onsuccess=function(i){i=i.d();if(f&&typeof pui=="object")pui.savedJSON=i;try{g=eval("("+i+")")}catch(h){e(null,h);return}d==true&&e(g)};a.send();if(d==false)return g}
12
+ if(typeof window.pui=="undefined")window.pui={};window.RPGspRequest=w;window.pui.Ajax=w;window.pui.AjaxRequest=w;window.ajax=y;
13
+ window.ajaxXML=function(b,c){var a,d,e,g=null;if(arguments.length==1&&typeof arguments[0]=="object"){a=arguments[0];a.async=null;a.onsuccess=null;a.onfail=null;a.onsuccess=null;if(typeof a.handler=="function"){d=true;e=a.handler}else d=false}else if(c!=null&&typeof c=="function"){d=true;e=c}else d=false;a=new w(arguments[0]);a.async=d;a.onsuccess=function(f){g=f.w();d==true&&e(g)};a.send();if(d==false)return g};window.ajaxJSON=B;
14
+ window.ajaxSubmit=function(b,c){var a,d="",e=typeof pui!="undefined"&&typeof pui.alert!="undefined"?pui.alert:alert;if(typeof b=="object")a=b;else{a=document.getElementById(b);if(a==null)a=document.forms[b]}var g;if(a!=null)g=a.tagName;if(a==null||g==null||g.toUpperCase()!="FORM"){e("Ajax request error: Invalid form object.");return""}if(b.action==""){e("Ajax request error: Invalid form action.");return""}for(e=0;e<a.elements.length;e++){g=a.elements[e];if(g.name!=null&&g.name!=""){var f=false;if(g.tagName==
15
+ "INPUT"){var i=g.type;i=i.toLowerCase();if(i=="hidden")f=true;if(i=="password")f=true;if(i=="text")f=true;if(pui.oa(i))f=true;if(i=="")f=true;if(i=="checkbox"||i=="radio")if(g.checked)f=true}if(g.tagName=="TEXTAREA")f=true;if(g.tagName=="SELECT")f=true;if(f){if(d!="")d+="&";d+=g.name+"="+encodeURIComponent(g.value)}}}a=new w(a.action);a.method="POST";a.postData=d;var h="",j;if(c!=null&&typeof c=="function")j=true;else{j=false;a.async=false}a.onsuccess=function(l){h+=l.d();j==true&&c(h)};a.send();
16
+ if(j==false)return h};function D(b,c){var a,d;a=b!=null&&typeof b=="object"?b:document.getElementById(b);if(a==null)return"";d="";if(a.tagName.toLowerCase()=="div"){d=a.firstChild;d=d!=null&&d.tagName!=null&&d.tagName=="A"?d.innerHTML:a.innerHTML}if(a.tagName=="INPUT"&&a.type=="checkbox"){if(a.indeterminate===true)return a.indeterminateValue;if(a.checked&&a.checkedValue!=null)return a.checkedValue;if(!a.checked&&a.uncheckedValue!=null)return a.uncheckedValue;return a.checked}if(a.tagName=="INPUT"&&a.type=="radio")return a.checked;
17
+ if(a.tagName=="TEXTAREA")d=a.value;else if(a.tagName=="INPUT"){var e=a.j;if(c&&e!=null&&typeof e.value==="string")if(e.value.length>0)d=a.j.value;else{if(pui["force auto complete match"]==false)d=a.value}else d=a.value}else if(a.tagName=="SELECT"){d=a.selectedIndex;d=d>=0?a.options[d].value:a.pui&&a.pui.properties&&a.pui.properties.value?a.pui.properties.value:a.value}if(a.comboBoxWidget!=null)d=a.comboBoxWidget.getValue();if(a.h!=null)d=a.h.getValue();if(a.signaturePad!=null)d=a.signaturePad.getValue();
18
+ if(a.A!=null)d=String(a.value);if(a.g!=null){d="";if(a.g.K&&a.g.O!=null)d=a.g.O;else if(!a.g.K&&a.g.M!=null)d=a.g.M}if(a.pui&&a.pui.widget&&typeof a.pui.widget.getPropertyValue==="function")d=a.pui.widget.getPropertyValue("value");for(d=d.replace(/&nbsp;/g," ");d.indexOf(String.fromCharCode(160))!=-1;)d=d.replace(String.fromCharCode(160)," ");if(d==a.ha)d="";return d}function G(b){if(typeof b!=="string")return b;for(;b.charAt(0)==" ";)b=b.replace(b.charAt(0),"");return b}
19
+ function I(b){if(typeof b!=="string")return b;return b.replace(/^\s*|\s*$/g,"")}pui.detachCalendar=function(b){if(typeof b=="string")b=document.getElementById(b);b!=null&&pui.ta(b)};
20
+ function J(b,c,a){var d=false,e=location.href;e=e.split("?")[0];e=e.split("/");if(e.length>2&&e[e.length-2].toLowerCase()=="auth")d=true;e="/profoundui/";var g=["PUI0009101.PGM","PUI0009102.PGM","PUI0009103.PGM","PUI0009104.PGM","PUI0009107.PGM","PUI0009109.PGM","PUI0009110.PGM","PUI0009119.PGM"];if(typeof pui.widgetURLPrefix==="string"&&g.indexOf(b.toUpperCase())!=-1){e=pui.widgetURLPrefix;if(e.substr(e.length-1)!="/")e+="/"}if(d==true||a==true)e+="auth/";e+=b;if(c!=null&&c==true)e+="/"+PSID;if(pui.serverURL!=
21
+ null)e=pui.serverURL+e;return e}pui.getProgramURL=J;pui.ja=function(b){return pui.v(b).x};pui.ka=function(b){return pui.v(b).y};
22
+ pui.v=function(b){b=b||window.event;var c={x:0,y:0};if(b!=null&&b.touches!=null&&b.touches.length==1){c.x=b.touches[0].pageX;c.y=b.touches[0].pageY}else if(b!=null){if(b.pageX)c.x=b.pageX;else if(b.clientX)c.x=b.clientX+(document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft);if(b.pageY)c.y=b.pageY;else if(b.clientY)c.y=b.clientY+(document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop)}return c};
23
+ function K(){var b={},c="";c=location.search.substring(1,location.search.length);if(c.length==0)return b;c=c.replace(/\+/g," ");c=c.split("&");for(var a=0;a<c.length;a++){var d=c[a].split("="),e=decodeURIComponent(d[0]),g="";if(d.length==2)g=decodeURIComponent(d[1]);b[e]=g}return b}if(typeof applyDesignProperty!="undefined")window.aa=applyDesignProperty;
24
+ pui.r={u:function(b){for(var c="",a=0;a<b.length;a++){var d=b.codePointAt(a);d>65535&&a++;if(d<128)c+=String.fromCharCode(d);else{if(d<2048)c+=String.fromCharCode(d>>6|192);else{if(d<65536)c+=String.fromCharCode(d>>12|224);else{c+=String.fromCharCode(d>>18|240);c+=String.fromCharCode(d>>12&63|128)}c+=String.fromCharCode(d>>6&63|128)}c+=String.fromCharCode(d&63|128)}}return c},t:function(b){for(var c="",a=0,d=0,e=0,g=0,f=0;a<b.length;){d=b.charCodeAt(a);if(d<128){c+=String.fromCharCode(d);a++}else if(d<
25
+ 224){e=b.charCodeAt(a+1);c+=String.fromCharCode((d&31)<<6|e&63);a+=2}else if(d<240){e=b.charCodeAt(a+1);g=b.charCodeAt(a+2);c+=String.fromCharCode((d&15)<<12|(e&63)<<6|g&63);a+=3}else{e=b.charCodeAt(a+1);g=b.charCodeAt(a+2);f=b.charCodeAt(a+3);c+=String.fromCodePoint((d&7)<<18|(e&63)<<12|(g&63)<<6|f&63);a+=4}}return c}};
26
+ pui.W={c:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",u:function(b){var c="",a,d,e,g,f,i,h=0;for(b=pui.r.u(b);h<b.length;){a=b.charCodeAt(h++);d=b.charCodeAt(h++);e=b.charCodeAt(h++);g=a>>2;a=(a&3)<<4|d>>4;f=(d&15)<<2|e>>6;i=e&63;if(isNaN(d))f=i=64;else if(isNaN(e))i=64;c=c+this.c.charAt(g)+this.c.charAt(a)+this.c.charAt(f)+this.c.charAt(i)}return c},t:function(b){var c="",a,d,e,g,f,i=0;for(b=b.replace(/[^A-Za-z0-9+/=]/g,"");i<b.length;){a=this.c.indexOf(b.charAt(i++));d=this.c.indexOf(b.charAt(i++));
27
+ g=this.c.indexOf(b.charAt(i++));f=this.c.indexOf(b.charAt(i++));a=a<<2|d>>4;d=(d&15)<<4|g>>2;e=(g&3)<<6|f;c+=String.fromCharCode(a);if(g!=64)c+=String.fromCharCode(d);if(f!=64)c+=String.fromCharCode(e)}return c=pui.r.t(c)}};
28
+ pui.downloadJSON=function(){if(pui.recordTest)pui.saveRecording();else if(pui.savedJSON==null)pui.alert("JSON is not available.");else{var b=pui.savedJSON;if(typeof JSON==="object"&&typeof JSON.parse==="function"&&typeof JSON.stringify==="function")try{b=JSON.stringify(JSON.parse(pui.savedJSON),null," ")}catch(c){}pui.F("text/plain","json.txt",b)}};
29
+ pui.saveRecording=function(b){for(var c=null,a=0;a<pui.b.payloads.length;a++){if(!c&&pui.b.responses[a].appJob)c=pui.b.responses[a].appJob.user;pui.b.payloads[a].response=pui.b.responses[a]}var d=K().testid;(a=d)||(a=prompt("Enter recording name"));if(a)if(pui.pjsServer)if(pui.b.payloads.length===0)pui.alert("No recording to save.");else{c={id:d,appuser:c,payloads:pui.b.payloads};a={"Content-Type":"application/json"};if(sessionStorage["atrium-token"])a.Authorization="Basic "+sessionStorage["atrium-token"];
30
+ fetch("/auto-testing/save-recording",{method:"POST",headers:a,body:JSON.stringify(c)}).then(function(g){if(g.ok){window.parent&&window.parent.Atrium&&window.parent.Atrium.api&&typeof window.parent.Atrium.api.reloadNavParent==="function"&&window.parent.Atrium.api.reloadNavParent("test-"+d);pui.b={payloads:[],responses:[]};typeof b==="function"?b():pui.alert("Recording saved.")}else pui.alert("Failed to save recording.")})["catch"](function(g){pui.alert("Error: Unable to save recording.");console.error("Fetch error:",
31
+ g)})}else{c=JSON.stringify({user:c,payloads:pui.b.payloads});var e=a;e.endsWith(".json")||(e+=".json");if(pui["recording path"]){a=[];a.push({name:"path",value:pui["recording path"]+e});a.push({name:"text",value:"1"});a.push({name:"replace",value:"Y"});a.push({name:"json",value:c,fileName:e});c=new pui.X;c.Y(a);a=J("PUI0001109.pgm");a=a.replace("/auth","");c.send(a,function(g){var f,i={};if(g.e()!=200)f=g.m();if(!f){i=eval("("+g.d()+")");i.success||(f=i.errorText)}if(f)pui.alert(f);else{pui.alert("Recording saved.");
32
+ pui.b={payloads:[],responses:[]}}})}else pui.F("text/plain",e,c)}};
33
+ pui.keepAlive=function(){var b;if(!(context=="genie"&&pui.f.i==true)){if(context=="dspf")b=pui.f==null?J("PUI0001200.pgm"):J("PUI0002110.pgm");else if(context=="genie")b=window.DOCUMENT_URI;else return false;if(pui.psid!=null&&pui.psid!="")b+="/"+pui.psid;if(pui.overrideSubmitUrl!=null&&typeof pui.overrideSubmitUrl=="function")try{b=pui.overrideSubmitUrl(b)}catch(c){}if(context=="genie")pui.B(pui.f.i=true);if(context=="dspf")pui.q=false;pui.wa();var a={keepalive:"1"};if(pui.isCloud)a.workspace_id=
34
+ pui.cloud.ws.id;y({url:pui.Z(b),method:"post",params:a,sendAsBinary:false,suppressAlert:true,handler:function(){pui.I();if(context=="genie")pui.B(pui.f.i=false);if(context=="dspf")pui.q=true;for(var d=0;d<pui.o.length;d++)pui.o[d].unMask()},onfail:function(d){pui.onoffline==null&&!pui["suppress comm errors"]&&pui.alert(pui.la(d));pui.I();if(context=="genie")pui.B(pui.f.i=false);if(context=="dspf")pui.q=true;for(d=0;d<pui.o.length;d++)pui.o[d].unMask();pui.onoffline!=null&&pui.onoffline()}});return true}};
35
+ pui.getWindowSize=function(){var b,c;if(document.body&&document.body.offsetWidth){b=document.body.offsetWidth;c=document.body.offsetHeight}if(document.compatMode=="CSS1Compat"&&document.documentElement&&document.documentElement.offsetWidth){b=document.documentElement.offsetWidth;c=document.documentElement.offsetHeight}if(window.innerWidth&&window.innerHeight){b=window.innerWidth;c=window.innerHeight}if(window.visualViewport&&window.visualViewport.width&&window.visualViewport.height){b=window.visualViewport.width;
36
+ c=window.visualViewport.height}if(document.documentElement&&document.documentElement.clientWidth){b=document.documentElement.clientWidth;c=document.documentElement.clientHeight}if(b==null&&screen!=null)b=screen.width;if(c==null&&screen!=null)c=screen.height;if(b==null)b=800;if(c==null)c=600;return{width:b,height:c}};pui.openURL=function(b){window.open(b)};
37
+ pui.normalizeURL=function(b,c){if(b==null||typeof b!="string")return"";if(c==true&&window.puiMobileClient==null)return b;if(b.substr(0,5).toLowerCase()=="http:"||b.substr(0,6).toLowerCase()=="https:"||b.substr(0,5).toLowerCase()=="data:")return b;return pui.serverURL!=null?pui.serverURL+b:window.cordova&&b.substr(0,1)=="/"?b.substr(1):b};
38
+ pui.animate=function(b){var c,a,d=b.element;if(typeof d=="string")d=document.getElementById(d);if(d!=null){var e;c=b.effect;if(c=="fly in left"||c=="fly in right"||c=="fly out left"||c=="fly out right")e="left";else if(c=="fly in up"||c=="fly in down"||c=="fly out up"||c=="fly out down")e="top";else if(c=="fade in"||c=="fade out")e="opacity";else{e=b.properties;if(e==null){e=b.property;if(e==null)return}}if(typeof e=="string")e=[e];var g=b.duration;if(g==null)g="500ms";if(g.substr(g.length-1,1)!=
39
+ "s")g+="s";var f=parseInt(g)*1E3;if(g.length>2&&g.substr(g.length-2,2)=="ms")f=parseInt(g);var i=b.type;if(i==null)i="ease";var h=b.from,j=b.to;switch(c){case "fly in right":h=-d.offsetWidth;h+="px";j="0px";break;case "fly in left":h=d.offsetWidth;h+="px";j="0px";break;case "fly out left":j=-d.offsetWidth;j+="px";h="0px";break;case "fly out right":j=d.offsetWidth;j+="px";h="0px";break;case "fly out down":j=d.offsetHeight;j+="px";h="0px";break;case "fly out up":j=-d.offsetHeight;j+="px";h="0px";break;
40
+ case "fly in up":h=d.offsetHeight;h+="px";j="0px";break;case "fly in down":h=-d.offsetHeight;h+="px";j="0px";break;case "fade in":h="0";j="100";break;case "fade out":h="100";j="0";break}if(j!=null){var l="";for(c=0;c<e.length;c++){a=e[c];if(l!="")l+=", ";l+=a+" "+g+" "+i}var m=["transition","MozTransition","WebkitTransition","msTransition","OTransition"];if(h!=null){if(typeof h=="string"||typeof h=="number")h=[h];for(c=0;c<e.length;c++){a=e[c];d.style[a]=h[c]}}setTimeout(function(){for(var q=0;q<
41
+ m.length;q++)d.style[m[q]]=l;setTimeout(function(){if(typeof j=="string"||typeof j=="number")j=[j];for(var o=0;o<e.length;o++)d.style[e[o]]=j[o];setTimeout(function(){for(var t=0;t<m.length;t++)d.style[m[t]]="";b.oncomplete!=null&&b.oncomplete()},f)},1)},1)}}};pui.getActiveElement=function(){return context=="genie"?lastActiveElement:pui.activeElement};pui.fieldExit=function(b){var c=pui.getActiveElement();if(c!=null){var a=false;if(b!=null)a=true;context=="genie"?fieldExit(c,a):pui.fa(c)}};
42
+ pui.gotoNextElement=function(b){O(b,true)};pui.gotoPreviousElement=function(b){O(b,false)};
43
+ function O(b,c){var a=c?1:-1,d=document.querySelectorAll("INPUT,SELECT,TEXTAREA"),e=d.length;if(!(e<2))for(var g=Array.prototype.indexOf.call(d,b),f=g+a,i;;){if(f===g)break;if(f===e)f=0;else if(f===-1)f=e-1;else{var h=i=d[f];if(i!=null&&i.comboBoxWidget!=null)h=i.comboBoxWidget.G();if(i!=null&&i.h!=null)h=i.h.G();if(h.readOnly||h.disabled||h.style.visibility==="hidden"||h.tabIndex==="-1"||!h.clientHeight||!h.clientWidth)f+=a;else{try{h.focus();if(document.activeElement!=h){f+=a;continue}setTimeout(function(){pui["highlight on focus"]&&
44
+ typeof h.select=="function"&&h.select();pui.va(null,h)},0)}catch(j){}break}}}}pui.showCalendar=function(b){var c=b;if(typeof b=="string")c=document.getElementById(b);if(c!=null)if(typeof c=="object"){var a=c.calimg;if(a!=null)if(a.click!=null&&typeof a.click=="function")a.click();else a.onclick!=null&&typeof a.onclick=="function"&&setTimeout(function(){a.onclick()},250)}};
45
+ pui.getComputedStyle=function(b){var c=null;if(window.getComputedStyle)c=window.getComputedStyle(b);else if(b.currentStyle)c=b.currentStyle;return c};
46
+ pui.upload=function(b,c){var a,d,e=b.dir,g=b.overwrite===true,f;if(typeof b.slimit=="number")f=b.slimit;var i;if(typeof b.flimit=="number")i=b.flimit;var h="";if(typeof b.altname=="string")h=b.altname;var j;if(typeof b.allowedTypes&&b.allowedTypes instanceof Array)j=b.allowedTypes;if(i==null)i=b.files.length;if(f==null||j==null){var l,m=[];for(a=0;a<b.files.length;a++){d=b.files[a];var q=typeof d.type!="undefined"&&d.type!=""?d.type:"application/octet-stream";pui.ba(m,q)==-1&&m.push(q);d=d.data&&
47
+ d.data instanceof ArrayBuffer?d.data.byteLength:d.size;d=Math.ceil(d/1048576);if(l==null||d>l)l=d}if(f==null)f=l;if(j==null)j=m}l=J("PUI0009109.PGM");l+="?AUTH="+encodeURIComponent(pui.p?pui.p:pui.appJob.auth);if(b.mode!=="widget")l+="&mode=ajax";if(b.id)l+="&id="+encodeURIComponent(b.id);l+="&r="+Math.floor(Math.random()*1E9);if(pui.isCloud)l+="&workspace_id="+pui.cloud.ws.id;m=new FormData;m.append("dir",e);m.append("overwrite",g?"1":"0");m.append("flimit",i);m.append("slimit",f);m.append("altname",
48
+ h);typeof b.generateNames=="string"&&m.append("generateNames",b.generateNames);for(a=0;a<j.length;a++)m.append("type",j[a]);for(a=0;a<b.files.length;a++){d=b.files[a];if(d.data&&d.data instanceof ArrayBuffer){var o;try{o=new Blob([d.data])}catch(t){e=new window.WebKitBlobBuilder;e.append(d.data);o=e.getBlob()}m.append("file",o)}else m.append("file",d);m.append("filename",d.name)}var n=new XMLHttpRequest;n.open("POST",l,true);n.onreadystatechange=function(){if(n.readyState==4){var k=true,r;if(n.status==
49
+ 200){var p;try{p=eval("("+n.responseText+")")}catch(s){k=false;r="Server response missing or invalid."}if(p){k=p.success;if(!k)if(p.key){r=pui.getLanguageText("runtimeMsg","upload "+p.key);if(p.key=="file limit")r=r.replace("&1",i);if(p.key=="size limit")r=r.replace("&1",f)}else r=p.error}}else{k=false;r=n.status+" - "+n.statusText+".";if(n.status==0&&n.statusText=="")r="The FILE could not be found in the system."}typeof c=="function"&&c(k,r)}};if(typeof b.onabort=="function")n.onabort=b.onabort;
50
+ if(typeof b.onprogress=="function"&&"upload"in n)n.upload.onprogress=b.onprogress;if(typeof b.onload=="function")n.onload=b.onload;n.send(m);return n};pui.getCookie=function(b){var c=document.cookie.split(";"),a="",d="",e="",g="";for(g=0;g<c.length;g++){a=c[g].split("=");d=a[0].replace(/^\s+|\s+$/g,"");if(d==b){if(a.length>1)e=unescape(a[1].replace(/^\s+|\s+$/g,""));return e}}return null};
51
+ pui.setCookie=function(b,c,a,d,e,g,f){var i=new Date;i.setTime(i.getTime());if(a)a=a*1E3*60*60*24;i=new Date(i.getTime()+a);document.cookie=b+"="+escape(c)+(a?";expires="+i.toGMTString():"")+(d?";path="+d:"")+(e?";domain="+e:"")+(g?";secure":"")+(f?";SameSite="+f:"")};pui.deleteCookie=function(b,c,a,d,e){if(pui.getCookie(b))document.cookie=b+"="+(c?";path="+c:"")+(a?";domain="+a:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"+(d?";Secure":"")+(e?";SameSite="+e:"")};
52
+ pui.refresh=function(b){if(b==null)b={};var c=b.url;b=b.skin;pui.setCookie("puiRefreshId",pui.psid,null,"/",null,null,"Strict");pui.skipConfirm=true;pui.shutdownOnClose=false;pui.confirmOnClose=false;if(b!=null){b="skin="+encodeURIComponent(b);c=window.location.href;var a=c.split("?");c=a[0];a=a[1];if(a==null)a="";a=a.split("&");for(var d=false,e=0;e<a.length;e++)if(a[e].length>=5&&a[e].substr(0,5).toLowerCase()=="skin="){a[e]=b;d=true}if(!d)if(a.length==1&&a[0]=="")a[0]=b;else a.push(b);a=a.join("&");
53
+ c=c+"?"+a}if(c!=null)window.location.href=c;else window.location.reload()};
54
+ pui.downloadURL=function(b){if(pui==null||pui.appJob==null||pui.appJob.auth==null||pui.appJob.auth=="")return pui.is_ie?"":"data:text/html,<!DOCTYPE html><html><body><p>To download, please connect to a Profound UI session.</p></body></html>";var c=b.inline===true;if(b.id==null)return"";var a=J("PUI0009110.PGM");a+="?id="+encodeURIComponent(b.id);if(b.contentType!=null)a+="&type="+encodeURIComponent(b.contentType);if(c)a+="&inline=1";a+="&usehttprc=0";a+="&AUTH="+encodeURIComponent(pui.p?pui.p:pui.appJob.auth);
55
+ a+="&r="+Math.floor(Math.random()*1E9);return a};pui.download=function(b){var c=pui.downloadURL(b);b=b.inline===true;if(pui==null||pui.appJob==null||pui.appJob.auth==null||pui.appJob.auth=="")b=true;b?pui.openURL(c):pui.link(c)};
56
+ pui.downloadFile=function(b){if(typeof b==="undefined"||b==null||typeof b.id!=="string"||b.id.length<1)pui.alert("Error downloading file. \n\n No file path given",null,"Error","Close");else{var c=pui.downloadURL(b),a=b.id,d=new XMLHttpRequest;d.responseType="blob";d.open("GET",c,true);d.send();var e=null,g=null,f=null,i=null;d.onprogress=function(h){var j=pui.extractFileNameFromContentDisposition(d.getResponseHeader("Content-Disposition"));if(!(a.split("/").pop()!=j&&j=="error.txt")){if(typeof d.onprogress.diaglogShown===
57
57
  "undefined"){d.onprogress.diaglogShown=true;e=document.createElement("dialog");document.body.appendChild(e);g=document.createElement("p");e.appendChild(g);f=document.createElement("button");f.innerHTML="OK";f.onclick=function(){e.close();e.remove()};i=document.createElement("button");i.innerHTML="Cancel";i.id="cancelButton";i.onclick=function(){d.abort();e.close();e.remove()};e.appendChild(i);g.innerHTML="Downloading file: "+a+"<br> Starting download...";e.showModal();d.onprogress.lastTime=Date.now()}if(Date.now()>
58
58
  d.onprogress.lastTime+2E3){g.innerHTML="Downloading file: "+a+"<br>"+h.type+" "+(h.loaded/1048576).toFixed(4)+" mb loaded";d.onprogress.lastTime=Date.now()}}};d.onloadend=function(){if(e!=null){e.querySelector("button[id='cancelButton']").remove();e.appendChild(f);g.innerHTML="File "+a+" downloaded successfully."}};d.onreadystatechange=function(){if(d.readyState==4&&d.status==200){var h=pui.extractFileNameFromContentDisposition(d.getResponseHeader("Content-Disposition"));if(a.split("/").pop()!=h&&
59
- h=="error.txt"){var k=new FileReader;k.onload=function(){pui.alert("Error downloading file: "+a+"\n\n"+k.result,null,"Error","Close");console.log(k.result)};k.readAsText(d.response)}else{var l=null;if(typeof c.contentType==="string"&&c.contentType.length>0)l=c.contentType;else{l=d.getResponseHeader("Content-Type").split(";")[0];if(typeof l==="string"&&l=="application/octet-stream"){var m=h.split(".").pop();if(typeof m==="string")switch(m.toLowerCase()){case "pdf":l="application/pdf";break;case "txt":l=
59
+ h=="error.txt"){var j=new FileReader;j.onload=function(){pui.alert("Error downloading file: "+a+"\n\n"+j.result,null,"Error","Close");console.log(j.result)};j.readAsText(d.response)}else{var l=null;if(typeof b.contentType==="string"&&b.contentType.length>0)l=b.contentType;else{l=d.getResponseHeader("Content-Type").split(";")[0];if(typeof l==="string"&&l=="application/octet-stream"){var m=h.split(".").pop();if(typeof m==="string")switch(m.toLowerCase()){case "pdf":l="application/pdf";break;case "txt":l=
60
60
  "text/plain";break;case "csv":l="text/csv";break;case "json":l="application/json";break;case "xml":l="application/xml";break;case "html":l="text/html";break;case "htm":l="text/html";break;case "jpg":l="image/jpeg";break;case "jpeg":l="image/jpeg";break;case "png":l="image/png";break;case "gif":l="image/gif";break}}}m=["application/pdf","text/plain","text/csv","application/json","application/xml","text/html","image/jpeg","image/png","image/gif"];var q=new File([d.response],h,{type:l});q=URL.createObjectURL(q);
61
- var o=document.createElement("a");if(typeof c.inline==="boolean"&&c.inline&&m.includes(l))o.target="_blank";else o.download=h;o.name=h;o.href=q;document.body.appendChild(o);o.dispatchEvent(new MouseEvent("click",{bubbles:true,cancelable:true,view:window}));document.body.removeChild(o)}}}}};pui.extractFileNameFromContentDisposition=function(c){c=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(c);if(c!=null&&c[1])return c[1].replace(/['"]/g,"");return null};
61
+ var o=document.createElement("a");if(typeof b.inline==="boolean"&&b.inline&&m.includes(l))o.target="_blank";else o.download=h;o.name=h;o.href=q;document.body.appendChild(o);o.dispatchEvent(new MouseEvent("click",{bubbles:true,cancelable:true,view:window}));document.body.removeChild(o)}}}}};pui.extractFileNameFromContentDisposition=function(b){b=/filename[^;=\n]*=((['"]).*?\2|[^;\n]*)/.exec(b);if(b!=null&&b[1])return b[1].replace(/['"]/g,"");return null};
62
62
  pui.focusOnContainer=function(){window.parent!=window&&pui.V(window.parent)&&window.parent.noderun||setTimeout(function(){if(pui.a==null){pui.a=document.createElement("input");pui.a.type=pui.is_touch?"button":"text";pui.a.readOnly=true;pui.a.style.position="absolute";pui.a.style.left="-999px";pui.a.style.top="-999px";pui.a.style.width="10px";pui.a.style.borderStyle="none";pui.a.style.backgroundColor="transparent";pui.runtimeContainer&&pui.runtimeContainer.appendChild(pui.a)}pui.J=true;pui.a.focus();
63
- setTimeout(function(){pui.J=false},0)},1)};pui.addCSS=function(c){var b=document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css";if(pui.is_old_ie)a.styleSheet.cssText=c;else a.innerHTML=c;b.appendChild(a)};
64
- pui.loadCSS=function(c){if(pui.H(c)!=null)return false;var b=document.getElementsByTagName("head")[0],a=document.createElement("link");a.setAttribute("rel","stylesheet");a.setAttribute("type","text/css");a.setAttribute("media","screen");a.setAttribute("href",pui.normalizeURL(c));b.appendChild(a);return true};
65
- pui.removeCSS=function(c){var b=document.getElementsByTagName("head")[0],a=pui.H(c);if(a==null){a=b.getElementsByTagName("style");for(var d=0;d<a.length;d++){var e=a[d];if(e.innerHTML==c||e.styleSheet!=null&&e.styleSheet.cssText==c){b.removeChild(e);return true}}return false}else{b.removeChild(a);return true}};
66
- pui.loadJS=function(c){if(c==null)return null;var b,a,d,e;if(typeof c=="string")b=c;if(typeof c=="object"){b=c.path;a=c.callback;d=c.onerror;e=c.test;if(e!=null&&typeof e=="function"&&e()==true)return false}if(b==null)return null;if(pui.ma(pui.normalizeURL(b))!=null)return false;c=document.getElementsByTagName("head")[0];var g=false,f=document.createElement("script");f.type="text/javascript";f.onreadystatechange=function(){if(f.readyState=="complete"||f.readyState=="loaded")if(!(e!=null&&typeof e==
67
- "function"&&e()!=true)){!g&&a!=null&&a();g=true}};f.onload=function(){if(!(e!=null&&typeof e=="function"&&e()!=true)){!g&&a!=null&&a();g=true}};if(d)f.onerror=d;f.src=pui.normalizeURL(b);c.appendChild(f);return true};
68
- pui.endOfSession=function(c){pui.confirmOnClose=false;pui.shutdownOnClose=false;if(window.puiMobileClient!=null){window.location.href="index.html";c!=null&&pui.alert(c)}else{var b=K().gobackto;if(b!=null){document.body.innerHTML="";c!=null&&pui.alert(c);location.href=b}if(navigator.app!=null&&navigator.app.exitApp!=null){document.body.innerHTML="";c!=null?pui.alert(c,function(){navigator.app.exitApp()}):navigator.app.exitApp()}}};
69
- pui.addUrlCacheBuster=function(c,b){var a=Date.now();if(typeof b==="string"&&b.toLowerCase()!=="get")return c;return c=/[&?]r=[^&]+/.test(c)?c.replace(/([&?]r=)[^&]+/,function(d,e){return e+a}):c+(c.indexOf("?")==-1?"?":"&")+"r="+a};
70
- pui.alert=function(c,b,a,d){if(window.cordova&&window.device.platform=="iOS"&&b==null&&a==null&&d==null)window.alert(c);else if(window.navigator!=null&&window.navigator.notification!=null&&window.navigator.notification.alert!=null)if(b==null&&a==null&&d==null&&window.puiMobileClient!=null&&window.puiMobileClient.alert!=null)window.puiMobileClient.alert(c);else{if(b==null)b=function(){};if(a==null)a="Profound UI";if(d==null)d="OK";window.navigator.notification.alert(c,b,a,d)}else pui.pa&&window.parent&&
71
- window.parent!=window&&pui.V(window.parent)&&window.parent.noderun?console.log("Suppressed alert: "+c):alert(c)};pui.applyProperty=function(c,b,a){return window.applyProperty(c,b,a)};pui.get=function(c){return I(D(c,void 0))};
72
- pui.set=function(c,b){var a;a=typeof c=="object"?c:document.getElementById(c);if(a!=null){if(a.tagName=="DIV")if(a.A!=null)a.A.setValue(b);else if(a.comboBoxWidget!=null)a.comboBoxWidget.setValue(b);else if(a.h!=null)a.h.setValue(b);else if(a.button&&a.button.T)a.button.T.innerHTML=b;else if(a.pui&&a.pui.widget)applyProperty(a,"value",b);else a.innerHTML=b;else if(a.tagName=="INPUT"||a.tagName=="SELECT"||a.tagName=="TEXTAREA")if(a.tagName=="INPUT"&&a.type=="checkbox")a.checked=typeof b=="boolean"?
73
- b:a.checkedValue!=null&&b==a.checkedValue?true:false;else{context=="genie"&&b!=a.value&&pui.f.qa(a);a.value=b;if(a.j!=null)a.j.value=b}if(context=="dspf"||pui.U&&a.l==null){a.modified=true;pui.xa(a);var d=a.ya;if(a.id!=null&&a.id.indexOf(".")==-1&&a.D!=null)pui.ea[a.D]=true;if(d!=null){d.na();d.ga=true;pui.ta(a,d.ia())}}if(context=="genie"&&a.l!=null&&a.l.idx!=null)pui.response[a.l.idx]=a;pui.ca(a);if(a.pui&&a.pui.properties)a.pui.properties.value=b}};
74
- pui.getActiveContainer=function(){if(context=="genie"){for(var c=1,b=document.getElementById("window"+c);b;){var a=document.getElementById("window"+ ++c);if(a)b=a;else break}if(b)return b}else if(context=="dspf"&&pui.L)return pui.L;return pui.runtimeContainer};pui.getDisplayType=function(){return pui.U?"5250-handler":context=="dspf"?"rdf":"5250"};
75
- function P(c){function b(){if(!(l>=k.length)){o=k[l].command;t=k[l].wait;l+=1;if(typeof pui.onPCCommand=="function")try{var j=pui.onPCCommand(o,t);if(j==null||j==true){setTimeout(b,0);return}}catch(r){showFailureMessage(o)}q="?cmd="+encodeURIComponent(o)+"&wait="+(t?"1":"0");if(f==1||f==2)if(i){n.params.cmd=o;n.params.sign=1;n.params.hashalg=typeof pui["pccmd hash sign algorithm"]==="string"?pui["pccmd hash sign algorithm"].toUpperCase():"SHA-512";n.handler=e;B(n)}else a("");else if(f==3){n.params.cmd=
76
- o;n.handler=d;B(n)}else{if(l==0&&k.length>0){j=[];for(var p=0;p<k.length;p++)j.push("("+k[p].da+")");o=j.join(" && ")}try{h.runCommand(o)}catch(s){j='Unable to execute "'+o+'".\n\n';if(s!=null)j+=s.name+":\n\n"+s.message+".";alert(j)}}}}function a(j){if(f==2){var r=new Image;r.onload=b;r.onerror=function(){console.log("PC Command Listener image mode failure.");g(o)};r.src=m+q+"&type=image&rnd="+String(Math.random())+String((new Date).getTime())+j}else{j=new pui.Ajax(m+q+j);j.method="GET";j.async=
77
- t?false:true;j.suppressAlert=true;j.onfail=function(s){if(s.e()!=200){console.log("PC Command Listener comm. failure: "+s.m());g(o)}};j.onsuccess=function(s){try{var v=JSON.parse(s.d());if(!v.success&&typeof v.error==="string"){console.log("PC Command Listener failure.",v.error);g(o);return}}catch(w){}b()};try{j.send()}catch(p){console.log("PC Command Listener failure.",p);g(o)}}}function d(j,r){try{if(r)throw r;if(j==null)throw Error("Empty response from PCCMD crypt program.");if(j.error!=null||
78
- typeof j.error==="string"&&j.error.length>0)throw Error("PCCMD crypt error: "+String(j.error));if(typeof j.cmd!=="string"||j.cmd.length==0)throw Error("PCCMD crypt response was missing a command.");var p="puilaunch:"+encodeURIComponent(j.cmd),s=document.createElement("iframe");s.style.display="none";s.src=p;document.body.appendChild(s);setTimeout(function(){s!=null&&s.parentNode!=null&&document.body.removeChild(s);s=null;b()},5E3)}catch(v){console.log(v)}}function e(j,r){try{if(r)throw r;if(typeof j!==
79
- "object"||j===null)throw Error("Empty response");if(j.success!==true)throw typeof j.error==="string"&&j.error.length>0?j.error:"Unknown error";var p="";if(typeof j.sig==="string"&&j.sig.length>0)p="&sig="+encodeURIComponent(j.sig);a(p)}catch(s){console.log(s);g(o)}}function g(j){console.log("Command: "+j);j=pui.getLanguageText("runtimeMsg","pccommand error");pui["alert pccommand errors"]!==false?alert(j):console.log(j);console.log("Visit https://docs.profoundlogic.com/x/aQFK for more information on supporting STRPCCMD.")}
63
+ setTimeout(function(){pui.J=false},0)},1)};pui.addCSS=function(b){var c=document.getElementsByTagName("head")[0],a=document.createElement("style");a.type="text/css";if(pui.is_old_ie)a.styleSheet.cssText=b;else a.innerHTML=b;c.appendChild(a)};
64
+ pui.loadCSS=function(b){if(pui.H(b)!=null)return false;var c=document.getElementsByTagName("head")[0],a=document.createElement("link");a.setAttribute("rel","stylesheet");a.setAttribute("type","text/css");a.setAttribute("media","screen");a.setAttribute("href",pui.normalizeURL(b));c.appendChild(a);return true};
65
+ pui.removeCSS=function(b){var c=document.getElementsByTagName("head")[0],a=pui.H(b);if(a==null){a=c.getElementsByTagName("style");for(var d=0;d<a.length;d++){var e=a[d];if(e.innerHTML==b||e.styleSheet!=null&&e.styleSheet.cssText==b){c.removeChild(e);return true}}return false}else{c.removeChild(a);return true}};
66
+ pui.loadJS=function(b){if(b==null)return null;var c,a,d,e;if(typeof b=="string")c=b;if(typeof b=="object"){c=b.path;a=b.callback;d=b.onerror;e=b.test;if(e!=null&&typeof e=="function"&&e()==true)return false}if(c==null)return null;if(pui.ma(pui.normalizeURL(c))!=null)return false;b=document.getElementsByTagName("head")[0];var g=false,f=document.createElement("script");f.type="text/javascript";f.onreadystatechange=function(){if(f.readyState=="complete"||f.readyState=="loaded")if(!(e!=null&&typeof e==
67
+ "function"&&e()!=true)){!g&&a!=null&&a();g=true}};f.onload=function(){if(!(e!=null&&typeof e=="function"&&e()!=true)){!g&&a!=null&&a();g=true}};if(d)f.onerror=d;f.src=pui.normalizeURL(c);b.appendChild(f);return true};
68
+ pui.endOfSession=function(b){pui.confirmOnClose=false;pui.shutdownOnClose=false;if(window.puiMobileClient!=null){window.location.href="index.html";b!=null&&pui.alert(b)}else{var c=K().gobackto;if(c!=null){document.body.innerHTML="";b!=null&&pui.alert(b);location.href=c}if(navigator.app!=null&&navigator.app.exitApp!=null){document.body.innerHTML="";b!=null?pui.alert(b,function(){navigator.app.exitApp()}):navigator.app.exitApp()}}};
69
+ pui.addUrlCacheBuster=function(b,c){var a=Date.now();if(typeof c==="string"&&c.toLowerCase()!=="get")return b;return b=/[&?]r=[^&]+/.test(b)?b.replace(/([&?]r=)[^&]+/,function(d,e){return e+a}):b+(b.indexOf("?")==-1?"?":"&")+"r="+a};
70
+ pui.alert=function(b,c,a,d){if(window.cordova&&window.device.platform=="iOS"&&c==null&&a==null&&d==null)window.alert(b);else if(window.navigator!=null&&window.navigator.notification!=null&&window.navigator.notification.alert!=null)if(c==null&&a==null&&d==null&&window.puiMobileClient!=null&&window.puiMobileClient.alert!=null)window.puiMobileClient.alert(b);else{if(c==null)c=function(){};if(a==null)a="Profound UI";if(d==null)d="OK";window.navigator.notification.alert(b,c,a,d)}else pui.pa&&window.parent&&
71
+ window.parent!=window&&pui.V(window.parent)&&window.parent.noderun?console.log("Suppressed alert: "+b):alert(b)};pui.applyProperty=function(b,c,a){return window.applyProperty(b,c,a)};pui.get=function(b){return I(D(b,void 0))};
72
+ pui.set=function(b,c){var a;a=typeof b=="object"?b:document.getElementById(b);if(a!=null){if(a.tagName=="DIV")if(a.A!=null)a.A.setValue(c);else if(a.comboBoxWidget!=null)a.comboBoxWidget.setValue(c);else if(a.h!=null)a.h.setValue(c);else if(a.button&&a.button.T)a.button.T.innerHTML=c;else if(a.pui&&a.pui.widget)applyProperty(a,"value",c);else a.innerHTML=c;else if(a.tagName=="INPUT"||a.tagName=="SELECT"||a.tagName=="TEXTAREA")if(a.tagName=="INPUT"&&a.type=="checkbox")a.checked=typeof c=="boolean"?
73
+ c:a.checkedValue!=null&&c==a.checkedValue?true:false;else{context=="genie"&&c!=a.value&&pui.f.ra(a);a.value=c;if(a.j!=null)a.j.value=c}if(context=="dspf"||pui.U&&a.l==null){a.modified=true;pui.za(a);var d=a.Aa;if(a.id!=null&&a.id.indexOf(".")==-1&&a.D!=null)pui.ea[a.D]=true;if(d!=null){d.na();d.ga=true;pui.ua(a,d.ia())}}if(context=="genie"&&a.l!=null&&a.l.idx!=null)pui.response[a.l.idx]=a;pui.ca(a);if(a.pui&&a.pui.properties)a.pui.properties.value=c}};
74
+ pui.getActiveContainer=function(){if(context=="genie"){for(var b=1,c=document.getElementById("window"+b);c;){var a=document.getElementById("window"+ ++b);if(a)c=a;else break}if(c)return c}else if(context=="dspf"&&pui.L)return pui.L;return pui.runtimeContainer};pui.getDisplayType=function(){return pui.U?"5250-handler":context=="dspf"?"rdf":"5250"};
75
+ function P(b){function c(){if(!(l>=j.length)){o=j[l].command;t=j[l].wait;l+=1;if(typeof pui.onPCCommand=="function")try{var k=pui.onPCCommand(o,t);if(k==null||k==true){setTimeout(c,0);return}}catch(r){showFailureMessage(o)}q="?cmd="+encodeURIComponent(o)+"&wait="+(t?"1":"0");if(f==1||f==2)if(i){n.params.cmd=o;n.params.sign=1;n.params.hashalg=typeof pui["pccmd hash sign algorithm"]==="string"?pui["pccmd hash sign algorithm"].toUpperCase():"SHA-512";n.handler=e;B(n)}else a("");else if(f==3){n.params.cmd=
76
+ o;n.handler=d;B(n)}else{if(l==0&&j.length>0){k=[];for(var p=0;p<j.length;p++)k.push("("+j[p].da+")");o=k.join(" && ")}try{h.runCommand(o)}catch(s){k='Unable to execute "'+o+'".\n\n';if(s!=null)k+=s.name+":\n\n"+s.message+".";alert(k)}}}}function a(k){if(f==2){var r=new Image;r.onload=c;r.onerror=function(){console.log("PC Command Listener image mode failure.");g(o)};r.src=m+q+"&type=image&rnd="+String(Math.random())+String((new Date).getTime())+k}else{k=new pui.Ajax(m+q+k);k.method="GET";k.async=
77
+ t?false:true;k.suppressAlert=true;k.onfail=function(s){if(s.e()!=200){console.log("PC Command Listener comm. failure: "+s.m());g(o)}};k.onsuccess=function(s){try{var v=JSON.parse(s.d());if(!v.success&&typeof v.error==="string"){console.log("PC Command Listener failure.",v.error);g(o);return}}catch(x){}c()};try{k.send()}catch(p){console.log("PC Command Listener failure.",p);g(o)}}}function d(k,r){try{if(r)throw r;if(k==null)throw Error("Empty response from PCCMD crypt program.");if(k.error!=null||
78
+ typeof k.error==="string"&&k.error.length>0)throw Error("PCCMD crypt error: "+String(k.error));if(typeof k.cmd!=="string"||k.cmd.length==0)throw Error("PCCMD crypt response was missing a command.");var p="puilaunch:"+encodeURIComponent(k.cmd),s=document.createElement("iframe");s.style.display="none";s.src=p;document.body.appendChild(s);setTimeout(function(){s!=null&&s.parentNode!=null&&document.body.removeChild(s);s=null;c()},5E3)}catch(v){console.log(v)}}function e(k,r){try{if(r)throw r;if(typeof k!==
79
+ "object"||k===null)throw Error("Empty response");if(k.success!==true)throw typeof k.error==="string"&&k.error.length>0?k.error:"Unknown error";var p="";if(typeof k.sig==="string"&&k.sig.length>0)p="&sig="+encodeURIComponent(k.sig);a(p)}catch(s){console.log(s);g(o)}}function g(k){console.log("Command: "+k);k=pui.getLanguageText("runtimeMsg","pccommand error");pui["alert pccommand errors"]!==false?alert(k):console.log(k);console.log("Visit https://docs.profoundlogic.com/x/aQFK for more information on supporting STRPCCMD.")}
80
80
  var f=1,i=false;if(pui["use pc listener"])f=1;if(window.HTTPS!=null&&window.HTTPS=="ON"&&f==1)f=2;if(pui["pc listener mode"])f=parseInt(pui["pc listener mode"]);if(typeof pui["pc command mode"]=="string")switch(pui["pc command mode"]){case "applet":f=0;break;case "listener":case "listener_m1":f=1;break;case "listener_m1s":f=1;i=true;break;case "listener_m2":f=2;break;case "listener_m2s":f=2;i=true;break;case "launcher":f=3;break;default:f=1;console.log("Unsupported pc command mode:",pui["pc command mode"])}if(f==
81
- 0){var h=document.getElementById("PCCommandApplet");if(!h){pui.s=c;loadPCCommandApplet("runCommandCb");return}}var k=[],l=0;k=typeof c=="string"?[{command:c,wait:false}]:c;c=parseInt(pui["pc listener port"],10);if(isNaN(c))c="80";var m="http://localhost:"+c+"/",q="",o,t,n={url:J("PUI0009117.pgm"),method:"post",params:{auth:pui.appJob&&pui.appJob.auth?pui.appJob.auth:""},async:true};b()}window.runCommandCb=function(){P(pui.s);pui.s=null};pui.runPCCommand=P;
82
- pui.isServerBusy=function(){if(typeof context=="undefined")return false;if(context=="dspf"&&pui.q===false||context=="genie"&&pui.f.i===true)return true;for(var c=document.getElementsByTagName("iframe"),b=0;b<c.length;b++){var a=c[b].contentWindow;if(a!=null){var d=null;try{d=a.pui}catch(e){}if(d!=null)if(typeof d==="object")if(typeof d.isServerBusy==="function")if(d.isServerBusy())return true}}return false};
83
- pui.showLastError=function(){if(errors.length==0)alert("No errors have been reported.");else{var c=errors.length-1;alert("Operation: "+errors[c].ra+"\nId: "+errors[c].id+"\n\nMessage: "+errors[c].text+"\n"+errors[c].wa)}};
84
- pui.editCode=function(c,b){function a(u,z){var A=["","","","nn/n","nn/nn","nn/nn/n","nn/nn/nn","nnn/nn/nn","nn/nn/nnnn","nnn/nn/nnnn"];if(i.dateEdit==="*ymd"){A[8]="nnnn/nn/nn";A[9]="nnnnn/nn/nn"}A=A[v];u=String(u);u=u.replace(".","");u=u.replace(",","");u=u.replace("-","");u="0000000000"+u;u=u.substr(u.length-z);var L="/";if(i.dateEditSeparator!=null)L=i.dateEditSeparator;for(var H=false,M=0,N="",F=0;F<A.length;F++){var C=A.substr(F,1),Q=A.substr(F+1,1);if(C==="/"||Q==="/")H=true;if(C==="/")C=L;
85
- else{C=u.substr(M,1);M+=1;if(C==="0")H||(C=" ");else H=true}N+=C}return N}function d(u,z,A){for(u+="";u.length<z;)u+=A;return u}var e=null,g=0,f=null,i={},h=2;if(typeof arguments[h]==="number"){e=arguments[h];h++;if(typeof arguments[h]==="number"){g=arguments[h];h++}}if(typeof arguments[h]==="string"){f=arguments[h];h++}if(typeof arguments[h]==="object"){i=arguments[h];h++}var k=false;if(f==="*astfill"){k=true;f=null}var l=false,m=null,q=false,o=h=false;h=" ";if(pui.appJob&&typeof pui.appJob.decimalFormat===
86
- "string")h=pui.appJob.decimalFormat;var t=h==="I"||h==="J",n=h==="J";if(i.decimalEdit!=null){t=i.decimalEdit===","||i.decimalEdit==="0,";n=i.decimalEdit==="0."||i.decimalEdit==="0,"}if(b>="1"&&b<="4")m="999.00";if(b>="A"&&b<="D")m="999.00CR";if(b>="J"&&b<="M")m="999.00-";if(b>="N"&&b<="Q")m="-999.00";if(b=="1"||b=="A"||b=="J"||b=="N"||b=="2"||b=="B"||b=="K"||b=="O")q=true;h=b=="1"||b=="A"||b=="J"||b=="N"||b=="3"||b=="C"||b=="L"||b=="P"?true:false;if(b=="Z")m="999.00";if(b==="X"||b==="Z")o=true;if(b===
87
- "X")l=true;b>="5"&&b<="9"&&pui.alert("User-defined edit code not supported: "+b+".");b>="1"&&b<="9"||b>="A"&&b<="D"||b>="J"&&b<="Q"||b>="X"&&b<="Z"||pui.alert("Invalid edit code: "+b+".");var j=(c||0)+"",r=parseFloat(j,10)||0,p;p=j.replace(/\..*/,"");if(p==="-0")p="-";if((p==""||p=="-")&&n)p="0";var s;s=j;if(s.indexOf(".")==-1)s+=".";s=s.replace(/.*\./,"");var v=p.length;if(v<3)v=3;var w=s.length;if(typeof e==="number")v=e;if(typeof g==="number")w=g;if(b=="Y"){if(v<3||v>9)pui.alert("Length not valid for edit code Y.");
88
- return a(r,v)}e=".";if(t)e=",";if(o)e="";if(w>0){s=d(s,w,"0");if(p==="0"&&!n)p="";j=p+e+s}var E=" ";if(l)E="0";if(k)E="*";if(q){for(g=/(\d+)(\d{3})/;g.test(p);)p=p.replace(g,"$1"+(t?".":",")+"$2");j=p+(w>0?e+s:"")}t=r<0;j=j.replace(/-/g,"");if(m==="(999.00)"){if(t)j="("+j+")"}else if(m==="999.00-")j+=t?"-":" ";else if(m==="999.00CR")j+=t?"CR":" ";else if(m==="-999.00")if(t)j="-"+j;if(f)j=f=="EUR"?j+" EUR":f=="$"?j.substr(0,1)=="-"?"-"+f+j.substr(1):f+j:f+j;if(!h)if(r===0)j="";(function(){var u=v;
89
- u+=w&&!o?1:0;if(q)u+=parseInt((v-w-1)/3);if(m==="999.00CR")u+=2;if(m==="999.00-")u+=1;if(m==="-999.00")u+=1;if(typeof f==="string")u+=f.length;var z=j;for(z+="";z.length<u;)z=E+z;j=z})();return j};
90
- pui.editWord=function(c,b,a){function d(){if(n.length>0){var p=n.substr(n.length-1,1);n=n.substr(0,n.length-1);if(p=="0"&&n.length==0&&r)p=j?"*":" "}else{p="0";if(r)p=" ";if(j)p="*"}return p}var e,g;c=String(c);var f={};if(typeof a==="object")f=a;a="$";if(f.currencySymbol!=null)a=f.currencySymbol;var i=b.indexOf("0")+1,h=b.indexOf("*")+1;if(i==0||h!=0&&h<i)i=h;var k=-1;for(e=b.length-1;e>=0;e-=1)if(e+1==i||b.substr(e,1)==" "){k=e;break}h=b.substr(0,k+1);var l="",m="",q=false,o=false,t=b.substr(k+
91
- 1).indexOf("-")>=0||b.substr(k+1).indexOf("CR")>=0;for(e=k+1;e<b.length;e++){g=b.substr(e,1);if(b.substr(e,2)=="CR"){o=true;e++}else if(g=="-")o=true;else if(g!="&")if(!(g=="*"&&!o))if(g.toUpperCase()>="A"&&g.toUpperCase()<="Z"&&t&&!o)b=b.substr(0,e)+" "+b.substr(e+1);else{l=b.substring(k+1,e);m=b.substr(e);q=true;break}}q||(l=b.substr(k+1));g=".";e=" ";if(pui.appJob&&typeof pui.appJob.decimalFormat==="string")e=pui.appJob.decimalFormat;if(typeof f.decimalFormat==="string")e=f.decimalFormat;if(e===
92
- "I"||e==="J")g=",";e=0;g=h.split(g);if(g.length>1)e=g[1].replace(/[^ ]/g,"").length;var n;n=isNaN(Number(c))?"0":String(c);n=n.replace("-","");g=n.split(".");f=g[0];b="";k=null;if(g.length>1)b=g[1];if(k==null||isNaN(k))k=e;for(;b.length>k;)b=b.substr(0,b.length-1);for(;k>b.length;)b+="0";for(n=f+b;n.substr(0,1)=="0";)n=n.substr(1);f="";var j=k=false;var r=b=false;if(i==0)r=true;for(e=h.length-1;e>=0;e-=1){q=g=h.substr(e,1);if(g==" ")q=d();else if(g=="&")q=" ";else if(g=="0"&&e+1==i)q=d();else if(g==
93
- "*"){j=true;q=d()}else if(g==a){if(e+2==i){q=d();b=true}}else if(k){q=" ";if(j)q="*"}f=q+f;if(e<=i)r=true;if(r&&n.length==0)k=true}l=l.replace(/&/g," ");l=l.replace(/\*/g," ");if(c>=0){l=l.replace("CR"," ");l=l.replace("-"," ")}f=f+l+m;c=f.length-1;f=G(f);if(j&&f.substr(0,1)!="*")f="*"+f;if(b)f=a+f;a=0;if(f[f.length-1]==="-")a=1;for(;f.length<=c;)f=" "+f;return f};
94
- pui.getRadioGroupValue=function(c){if(typeof c!=="string")return null;if(typeof pui.z!=="object")return null;for(var b=null,a=pui.currentFormatNames,d=a.length-1;d>=0;d--){var e=a[d].toUpperCase()+"."+c.toUpperCase();if(typeof pui.z[e]!=="undefined"){b=pui.z[e];break}}if(b==null)return null;c=null;for(a=0;a<b.length;a++){d=b[a];if(d.checked&&d.radioValue!=null){c=d.radioValue;break}}return c};pui.S=function(){for(var c=document.getElementById("auth-form"),b=document.cookie.split("; "),a=false,d=0;d<b.length;d++){var e=b[d].split("=");if(unescape(e[0])=="pui-signon-"+c.action)if(unescape(e[1])=="1"){a=true;break}}if(typeof Storage!="undefined"){b=K();if(b.workstnid)sessionStorage["atrium-params-workstnid"]=b.workstnid;else try{delete sessionStorage["atrium-params-workstnid"]}catch(g){}if(b.suffixid)sessionStorage["atrium-params-suffixid"]=b.suffixid;else try{delete sessionStorage["atrium-params-suffixid"]}catch(f){}if(b.duplicateid)sessionStorage["atrium-params-duplicateid"]=
95
- b.duplicateid;else try{delete sessionStorage["atrium-params-duplicateid"]}catch(i){}}if(a)location.href=c.action;else{if(a=document.getElementById("auth-box"))a.style.display="";c.elements["auth-user"].focus()}};
96
- pui.R=function(){var c=document.getElementById("auth-form"),b=c.elements["auth-user"].value,a=c.elements["auth-password"].value,d=document.getElementById("auth-message");d.innerHTML="";if(I(b)==""){d.innerHTML=authMessages["user required"];c.elements["auth-user"].focus();return false}else if(I(a)==""){d.innerHTML=authMessages["password required"];c.elements["auth-password"].focus();return false}if(pui.pjsServer){var e=btoa(I(b)+":"+I(a));sessionStorage.setItem("atrium-token",e);return true}pui.k(function(){if(!Atrium.pjsServer){localStorage["pui-http-auth-invalid"]&&
97
- delete localStorage["pui-http-auth-invalid"];var g=new pui.Ajax("/profoundui/pui0005010.pgm");g.async=true;g.method="POST";pui.setReqAuth(g,b,a);g.suppressAlert=true;g.onready=function(f){if(f.e()==200){var i=eval("("+f.d()+")");f=i.days;var h=false;if(i.warn==true)if(f==0){i=authMessages["password expired"];pui.alert(i);h=true}else{i=authMessages["password pending expiration"];i=i.replace(/{DAYS}/g,f);h=confirm(i)}if(h){f="/profoundui/changepass";f+="?user="+encodeURIComponent(b);f+="&next="+encodeURIComponent(c.action);
98
- f+="&back="+encodeURIComponent(location.href);location.href=f}else{document.cookie=escape("pui-signon-"+c.action)+"=1; path=/";location.href=c.action}}else{d.innerHTML=authMessages["invalid credentials"];c.elements["auth-user"].focus()}};g.send()}});return false};
99
- pui.k=function(c){if(Atrium.pjsServer){sessionStorage.removeItem("atrium-token");c()}else{var b=new pui.Ajax("/profoundui/pui0005010.pgm");b.async=typeof c==="function"?true:false;b.method="POST";pui.setReqAuth(b,"PUI_SIGNOFF_USER","PUI_SIGNOFF_USER");b.suppressAlert=true;if(typeof c==="function")b.onready=function(){typeof c=="function"&&c()};b.send()}};window.pui.signOn=pui.R;window.pui.clearCredentials=pui.k;window.pui.signOnInit=pui.S;
100
- pui.Q=function(){var c=K(),b=document.getElementById("change-user"),a=document.getElementById("change-current"),d=b,e=document.getElementById("change-cancel");if(typeof c.user!="undefined"){b.value=c.user.toUpperCase();b.readOnly=true;b.className+=" read-only";d=a}if(typeof c.back=="undefined")e.style.display="none";document.getElementById("change-box").style.display="block";d.focus()};pui.P=function(){var c=K();if(typeof c.back!="undefined")location.href=c.back};
101
- pui.C=function(){var c=K(),b=document.getElementById("change-form"),a=b.elements["change-user"].value,d=b.elements["change-current"].value,e=b.elements["change-new"].value,g=b.elements["change-confirm"].value,f=document.getElementById("change-message");f.innerHTML="";if(I(a)==""){f.innerHTML=passMessages["user required"];b.elements["change-user"].focus();return false}else if(I(d)==""){f.innerHTML=passMessages["current required"];b.elements["change-current"].focus();return false}else if(I(e)==""){f.innerHTML=
102
- passMessages["new required"];b.elements["change-new"].focus();return false}else if(I(g)==""){f.innerHTML=passMessages["confirm required"];b.elements["change-confirm"].focus();return false}else if(e!=g){f.innerHTML=passMessages["must match"];b.elements["change-new"].focus();return false}g=new pui.Ajax("/profoundui/pui0005011.pgm");g.async=true;g.method="POST";g.params={};g.params.user=a;g.params.current=d;g.params["new"]=e;g.suppressAlert=true;g.onready=function(i){if(i.e()!=200){f.innerHTML="HTTP "+
103
- i.e()+" - "+i.n()+".";b.elements["change-user"].focus()}else{var h;try{h=eval("("+i.d()+")");if(typeof h.success!="boolean")throw Error("Invalid response format: 'success' is not a boolean.");if(!h.success&&typeof h.error!="string")throw Error("Invalid response format: 'error' is not a string.");}catch(k){h={};h.success=false;h.error="The server response is missing or invalid."}if(h.success==false){f.innerHTML=h.error;b.elements["change-user"].focus()}else{pui.alert(passMessages.success);pui.k(function(){if(!Atrium.pjsServer){var l=
104
- new pui.Ajax("/profoundui/pui0005010.pgm");l.async=true;l.method="POST";pui.setReqAuth(l,a,e);l.suppressAlert=true;l.onready=function(m){if(m.e()==200){if(typeof c.next!="undefined")location.href=c.next}else{pui.alert("HTTP "+m.e()+" - "+m.n()+".");b.elements["change-user"].focus()}};l.send()}})}}};g.send();return false};
105
- pui.setReqAuth=function(c,b,a){var d=navigator.userAgent.indexOf("Edge")!=-1,e=!d&&navigator.userAgent.indexOf("Chrome")!=-1;d=!d&&navigator.userAgent.indexOf("Safari")!=-1&&!e;var g=navigator.userAgent.indexOf("Firefox")!=-1;if(d||e||g){c.user=encodeURIComponent(b);c.password=encodeURIComponent(a)}else{c.user=b;c.password=a}};window.pui.passInit=pui.Q;window.pui.passCancel=pui.P;window.pui.changePass=pui.C;
81
+ 0){var h=document.getElementById("PCCommandApplet");if(!h){pui.s=b;loadPCCommandApplet("runCommandCb");return}}var j=[],l=0;j=typeof b=="string"?[{command:b,wait:false}]:b;b=parseInt(pui["pc listener port"],10);if(isNaN(b))b="80";var m="http://localhost:"+b+"/",q="",o,t,n={url:J("PUI0009117.pgm"),method:"post",params:{auth:pui.appJob&&pui.appJob.auth?pui.appJob.auth:""},async:true};c()}window.runCommandCb=function(){P(pui.s);pui.s=null};pui.runPCCommand=P;
82
+ pui.isServerBusy=function(){if(typeof context=="undefined")return false;if(context=="dspf"&&pui.q===false||context=="genie"&&pui.f.i===true)return true;for(var b=document.getElementsByTagName("iframe"),c=0;c<b.length;c++){var a=b[c].contentWindow;if(a!=null){var d=null;try{d=a.pui}catch(e){}if(d!=null)if(typeof d==="object")if(typeof d.isServerBusy==="function")if(d.isServerBusy())return true}}return false};
83
+ pui.showLastError=function(){if(errors.length==0)alert("No errors have been reported.");else{var b=errors.length-1;alert("Operation: "+errors[b].sa+"\nId: "+errors[b].id+"\n\nMessage: "+errors[b].text+"\n"+errors[b].ya)}};
84
+ pui.editCode=function(b,c){function a(u,z){var A=["","","","nn/n","nn/nn","nn/nn/n","nn/nn/nn","nnn/nn/nn","nn/nn/nnnn","nnn/nn/nnnn"];if(i.dateEdit==="*ymd"){A[8]="nnnn/nn/nn";A[9]="nnnnn/nn/nn"}A=A[v];u=String(u);u=u.replace(".","");u=u.replace(",","");u=u.replace("-","");u="0000000000"+u;u=u.substr(u.length-z);var L="/";if(i.dateEditSeparator!=null)L=i.dateEditSeparator;for(var H=false,M=0,N="",F=0;F<A.length;F++){var C=A.substr(F,1),Q=A.substr(F+1,1);if(C==="/"||Q==="/")H=true;if(C==="/")C=L;
85
+ else{C=u.substr(M,1);M+=1;if(C==="0")H||(C=" ");else H=true}N+=C}return N}function d(u,z,A){for(u+="";u.length<z;)u+=A;return u}var e=null,g=0,f=null,i={},h=2;if(typeof arguments[h]==="number"){e=arguments[h];h++;if(typeof arguments[h]==="number"){g=arguments[h];h++}}if(typeof arguments[h]==="string"){f=arguments[h];h++}if(typeof arguments[h]==="object"){i=arguments[h];h++}var j=false;if(f==="*astfill"){j=true;f=null}var l=false,m=null,q=false,o=h=false;h=" ";if(pui.appJob&&typeof pui.appJob.decimalFormat===
86
+ "string")h=pui.appJob.decimalFormat;var t=h==="I"||h==="J",n=h==="J";if(i.decimalEdit!=null){t=i.decimalEdit===","||i.decimalEdit==="0,";n=i.decimalEdit==="0."||i.decimalEdit==="0,"}if(c>="1"&&c<="4")m="999.00";if(c>="A"&&c<="D")m="999.00CR";if(c>="J"&&c<="M")m="999.00-";if(c>="N"&&c<="Q")m="-999.00";if(c=="1"||c=="A"||c=="J"||c=="N"||c=="2"||c=="B"||c=="K"||c=="O")q=true;h=c=="1"||c=="A"||c=="J"||c=="N"||c=="3"||c=="C"||c=="L"||c=="P"?true:false;if(c=="Z")m="999.00";if(c==="X"||c==="Z")o=true;if(c===
87
+ "X")l=true;c>="5"&&c<="9"&&pui.alert("User-defined edit code not supported: "+c+".");c>="1"&&c<="9"||c>="A"&&c<="D"||c>="J"&&c<="Q"||c>="X"&&c<="Z"||pui.alert("Invalid edit code: "+c+".");var k=(b||0)+"",r=parseFloat(k,10)||0,p;p=k.replace(/\..*/,"");if(p==="-0")p="-";if((p==""||p=="-")&&n)p="0";var s;s=k;if(s.indexOf(".")==-1)s+=".";s=s.replace(/.*\./,"");var v=p.length;if(v<3)v=3;var x=s.length;if(typeof e==="number")v=e;if(typeof g==="number")x=g;if(c=="Y"){if(v<3||v>9)pui.alert("Length not valid for edit code Y.");
88
+ return a(r,v)}e=".";if(t)e=",";if(o)e="";if(x>0){s=d(s,x,"0");if(p==="0"&&!n)p="";k=p+e+s}var E=" ";if(l)E="0";if(j)E="*";if(q){for(g=/(\d+)(\d{3})/;g.test(p);)p=p.replace(g,"$1"+(t?".":",")+"$2");k=p+(x>0?e+s:"")}t=r<0;k=k.replace(/-/g,"");if(m==="(999.00)"){if(t)k="("+k+")"}else if(m==="999.00-")k+=t?"-":" ";else if(m==="999.00CR")k+=t?"CR":" ";else if(m==="-999.00")if(t)k="-"+k;if(f)k=f=="EUR"?k+" EUR":f=="$"?k.substr(0,1)=="-"?"-"+f+k.substr(1):f+k:f+k;if(!h)if(r===0)k="";(function(){var u=v;
89
+ u+=x&&!o?1:0;if(q)u+=parseInt((v-x-1)/3);if(m==="999.00CR")u+=2;if(m==="999.00-")u+=1;if(m==="-999.00")u+=1;if(typeof f==="string")u+=f.length;var z=k;for(z+="";z.length<u;)z=E+z;k=z})();return k};
90
+ pui.editWord=function(b,c,a){function d(){if(n.length>0){var p=n.substr(n.length-1,1);n=n.substr(0,n.length-1);if(p=="0"&&n.length==0&&r)p=k?"*":" "}else{p="0";if(r)p=" ";if(k)p="*"}return p}var e,g;b=String(b);var f={};if(typeof a==="object")f=a;a="$";if(f.currencySymbol!=null)a=f.currencySymbol;var i=c.indexOf("0")+1,h=c.indexOf("*")+1;if(i==0||h!=0&&h<i)i=h;var j=-1;for(e=c.length-1;e>=0;e-=1)if(e+1==i||c.substr(e,1)==" "){j=e;break}h=c.substr(0,j+1);var l="",m="",q=false,o=false,t=c.substr(j+
91
+ 1).indexOf("-")>=0||c.substr(j+1).indexOf("CR")>=0;for(e=j+1;e<c.length;e++){g=c.substr(e,1);if(c.substr(e,2)=="CR"){o=true;e++}else if(g=="-")o=true;else if(g!="&")if(!(g=="*"&&!o))if(g.toUpperCase()>="A"&&g.toUpperCase()<="Z"&&t&&!o)c=c.substr(0,e)+" "+c.substr(e+1);else{l=c.substring(j+1,e);m=c.substr(e);q=true;break}}q||(l=c.substr(j+1));g=".";e=" ";if(pui.appJob&&typeof pui.appJob.decimalFormat==="string")e=pui.appJob.decimalFormat;if(typeof f.decimalFormat==="string")e=f.decimalFormat;if(e===
92
+ "I"||e==="J")g=",";e=0;g=h.split(g);if(g.length>1)e=g[1].replace(/[^ ]/g,"").length;var n;n=isNaN(Number(b))?"0":String(b);n=n.replace("-","");g=n.split(".");f=g[0];c="";j=null;if(g.length>1)c=g[1];if(j==null||isNaN(j))j=e;for(;c.length>j;)c=c.substr(0,c.length-1);for(;j>c.length;)c+="0";for(n=f+c;n.substr(0,1)=="0";)n=n.substr(1);f="";var k=j=false;var r=c=false;if(i==0)r=true;for(e=h.length-1;e>=0;e-=1){q=g=h.substr(e,1);if(g==" ")q=d();else if(g=="&")q=" ";else if(g=="0"&&e+1==i)q=d();else if(g==
93
+ "*"){k=true;q=d()}else if(g==a){if(e+2==i){q=d();c=true}}else if(j){q=" ";if(k)q="*"}f=q+f;if(e<=i)r=true;if(r&&n.length==0)j=true}l=l.replace(/&/g," ");l=l.replace(/\*/g," ");if(b>=0){l=l.replace("CR"," ");l=l.replace("-"," ")}f=f+l+m;b=f.length-1;f=G(f);if(k&&f.substr(0,1)!="*")f="*"+f;if(c)f=a+f;a=0;if(f[f.length-1]==="-")a=1;for(;f.length<=b;)f=" "+f;return f};
94
+ pui.getRadioGroupValue=function(b){if(typeof b!=="string")return null;if(typeof pui.z!=="object")return null;for(var c=null,a=pui.currentFormatNames,d=a.length-1;d>=0;d--){var e=a[d].toUpperCase()+"."+b.toUpperCase();if(typeof pui.z[e]!=="undefined"){c=pui.z[e];break}}if(c==null)return null;b=null;for(a=0;a<c.length;a++){d=c[a];if(d.checked&&d.radioValue!=null){b=d.radioValue;break}}return b};pui.S=function(){for(var b=document.getElementById("auth-form"),c=document.cookie.split("; "),a=false,d=0;d<c.length;d++){var e=c[d].split("=");if(unescape(e[0])=="pui-signon-"+b.action)if(unescape(e[1])=="1"){a=true;break}}if(typeof Storage!="undefined"){c=K();if(c.workstnid)sessionStorage["atrium-params-workstnid"]=c.workstnid;else try{delete sessionStorage["atrium-params-workstnid"]}catch(g){}if(c.suffixid)sessionStorage["atrium-params-suffixid"]=c.suffixid;else try{delete sessionStorage["atrium-params-suffixid"]}catch(f){}if(c.duplicateid)sessionStorage["atrium-params-duplicateid"]=
95
+ c.duplicateid;else try{delete sessionStorage["atrium-params-duplicateid"]}catch(i){}}if(a)location.href=b.action;else{if(a=document.getElementById("auth-box"))a.style.display="";b.elements["auth-user"].focus()}};
96
+ pui.R=function(){var b=document.getElementById("auth-form"),c=b.elements["auth-user"].value,a=b.elements["auth-password"].value,d=document.getElementById("auth-message"),e={"server unavailable":"The server could not be reached at {connectorURL}.<br>Please check your network connection and try again.","error authenticating":"An error occurred while authenticating the user."},g="";d.innerHTML="";if(I(c)==""){d.innerHTML=authMessages["user required"];b.elements["auth-user"].focus();return false}else if(I(a)==
97
+ ""){d.innerHTML=authMessages["password required"];b.elements["auth-password"].focus();return false}if(pui.pjsServer){var f="Basic "+btoa(I(c)+":"+I(a));fetch("/profoundui/atrium/authenticate",{method:"POST",headers:{Authorization:f}}).then(function(i){if(i.ok){document.cookie=escape("pui-signon-"+b.action)+"=1; path=/";sessionStorage.setItem("atrium-token",btoa(I(c)+":"+I(a)));location.href=b.action}else if(i.status===401){d.innerHTML=authMessages["invalid credentials"];b.elements["auth-user"].focus()}else if(i.status===
98
+ 503)i.qa().then(function(h){g=authMessages["server unavailable"]||e["server unavailable"];d.innerHTML=g.replace(/{connectorURL}/,h.xa);b.elements["auth-user"].focus()});else{g=authMessages["error authenticating"]||e["error authenticating"];d.innerHTML=g;b.elements["auth-user"].focus()}})["catch"](function(i){g=authMessages["error authenticating"]||e["error authenticating"];d.innerHTML=g;b.elements["auth-user"].focus();console.error("Error during Atrium authentication:",i)});return false}pui.k(function(){localStorage["pui-http-auth-invalid"]&&
99
+ delete localStorage["pui-http-auth-invalid"];var i=new pui.Ajax("/profoundui/pui0005010.pgm");i.async=true;i.method="POST";pui.setReqAuth(i,c,a);i.suppressAlert=true;i.onready=function(h){if(h.e()==200){var j=eval("("+h.d()+")");h=j.days;var l=false;if(j.warn==true)if(h==0){j=authMessages["password expired"];pui.alert(j);l=true}else{j=authMessages["password pending expiration"];j=j.replace(/{DAYS}/g,h);l=confirm(j)}if(l){h="/profoundui/changepass";h+="?user="+encodeURIComponent(c);h+="&next="+encodeURIComponent(b.action);
100
+ h+="&back="+encodeURIComponent(location.href);location.href=h}else{document.cookie=escape("pui-signon-"+b.action)+"=1; path=/";location.href=b.action}}else{d.innerHTML=authMessages["invalid credentials"];b.elements["auth-user"].focus()}};i.send()});return false};
101
+ pui.k=function(b){if(Atrium.pjsServer){sessionStorage.removeItem("atrium-token");b()}else{var c=new pui.Ajax("/profoundui/pui0005010.pgm");c.async=typeof b==="function"?true:false;c.method="POST";pui.setReqAuth(c,"PUI_SIGNOFF_USER","PUI_SIGNOFF_USER");c.suppressAlert=true;if(typeof b==="function")c.onready=function(){typeof b=="function"&&b()};c.send()}};window.pui.signOn=pui.R;window.pui.clearCredentials=pui.k;window.pui.signOnInit=pui.S;
102
+ pui.Q=function(){var b=K(),c=document.getElementById("change-user"),a=document.getElementById("change-current"),d=c,e=document.getElementById("change-cancel");if(typeof b.user!="undefined"){c.value=b.user.toUpperCase();c.readOnly=true;c.className+=" read-only";d=a}if(typeof b.back=="undefined")e.style.display="none";document.getElementById("change-box").style.display="block";d.focus()};pui.P=function(){var b=K();if(typeof b.back!="undefined")location.href=b.back};
103
+ pui.C=function(){if(!Atrium.pjsServer){var b=K(),c=document.getElementById("change-form"),a=c.elements["change-user"].value,d=c.elements["change-current"].value,e=c.elements["change-new"].value,g=c.elements["change-confirm"].value,f=document.getElementById("change-message");f.innerHTML="";if(I(a)==""){f.innerHTML=passMessages["user required"];c.elements["change-user"].focus();return false}else if(I(d)==""){f.innerHTML=passMessages["current required"];c.elements["change-current"].focus();return false}else if(I(e)==
104
+ ""){f.innerHTML=passMessages["new required"];c.elements["change-new"].focus();return false}else if(I(g)==""){f.innerHTML=passMessages["confirm required"];c.elements["change-confirm"].focus();return false}else if(e!=g){f.innerHTML=passMessages["must match"];c.elements["change-new"].focus();return false}g=new pui.Ajax("/profoundui/pui0005011.pgm");g.async=true;g.method="POST";g.params={};g.params.user=a;g.params.current=d;g.params["new"]=e;g.suppressAlert=true;g.onready=function(i){if(i.e()!=200){f.innerHTML=
105
+ "HTTP "+i.e()+" - "+i.n()+".";c.elements["change-user"].focus()}else{var h;try{h=eval("("+i.d()+")");if(typeof h.success!="boolean")throw Error("Invalid response format: 'success' is not a boolean.");if(!h.success&&typeof h.error!="string")throw Error("Invalid response format: 'error' is not a string.");}catch(j){h={};h.success=false;h.error="The server response is missing or invalid."}if(h.success==false){f.innerHTML=h.error;c.elements["change-user"].focus()}else{pui.alert(passMessages.success);
106
+ pui.k(function(){var l=new pui.Ajax("/profoundui/pui0005010.pgm");l.async=true;l.method="POST";pui.setReqAuth(l,a,e);l.suppressAlert=true;l.onready=function(m){if(m.e()==200){if(typeof b.next!="undefined")location.href=b.next}else{pui.alert("HTTP "+m.e()+" - "+m.n()+".");c.elements["change-user"].focus()}};l.send()})}}};g.send();return false}};
107
+ pui.setReqAuth=function(b,c,a){var d=navigator.userAgent.indexOf("Edge")!=-1,e=!d&&navigator.userAgent.indexOf("Chrome")!=-1;d=!d&&navigator.userAgent.indexOf("Safari")!=-1&&!e;var g=navigator.userAgent.indexOf("Firefox")!=-1;if(d||e||g){b.user=encodeURIComponent(c);b.password=encodeURIComponent(a)}else{b.user=c;b.password=a}};window.pui.passInit=pui.Q;window.pui.passCancel=pui.P;window.pui.changePass=pui.C;
@@ -16,7 +16,10 @@
16
16
  "password expired": "Your password is expired.",
17
17
  "password pending expiration": "Your password will expire in {DAYS} days.\n\n" +
18
18
  "Would you like to set a new password now?\n\n" +
19
- "Click \"OK\" to set a new password or \"Cancel\" to sign on without changing your password."
19
+ "Click \"OK\" to set a new password or \"Cancel\" to sign on without changing your password.",
20
+ "server unavailable": "The server could not be reached at {connectorURL}.<br>" +
21
+ "Please check your network connection and try again.",
22
+ "error authenticating": "An error occurred while authenticating the user."
20
23
 
21
24
  };
22
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "profoundjs",
3
- "version": "7.20.4",
3
+ "version": "7.21.0",
4
4
  "min-profoundui-version": "6.20.0",
5
5
  "description": "Profound.js Framework and Server",
6
6
  "keywords": [
@@ -106,6 +106,7 @@
106
106
  "node-sql-parser": "^4.6.6",
107
107
  "nodemailer": "^6.4.8",
108
108
  "openai": "~4.52.0",
109
+ "otplib": "^12.0.1",
109
110
  "p-iteration": "^1.1.8",
110
111
  "p-limit": "^3.1.0",
111
112
  "pdfmake": "^0.2.4",
@@ -116,6 +117,7 @@
116
117
  "profoundjs-swagger-ui": "^1.2.3",
117
118
  "progress": "^2.0.3",
118
119
  "prompts": "^2.3.2",
120
+ "qrcode": "^1.5.4",
119
121
  "randomatic": "^3.1.1",
120
122
  "rotating-file-stream": "^3.2.1",
121
123
  "semver": "^7.3.8",