From 62e664e9683724653ab1038e635a0fdbd05630c5 Mon Sep 17 00:00:00 2001 From: Richard Marsot Date: Tue, 10 Oct 2023 14:00:17 -0400 Subject: [PATCH] fix couple of issue with gov us --- docs/demos/frgov/pega-govfr.js | 2 +- docs/demos/ukgds/pega-govuk.js | 186 ++++++++++----------- docs/demos/uswds/pega-govus.js | 4 +- docs/pega-mashup-light-webcomponent.js | 2 +- docs/pega-mashup-light-webcomponentv2.js | 100 +++++------ docs/pega-mashup-webcomponent-all.js | 2 +- docs/pega-mashup-webcomponent-light-all.js | 2 +- packages/core/src/utils/form-utils.js | 8 +- packages/core/tests/integration.test.js | 4 +- packages/govus/src/layout.js | 4 +- 10 files changed, 159 insertions(+), 155 deletions(-) diff --git a/docs/demos/frgov/pega-govfr.js b/docs/demos/frgov/pega-govfr.js index bbd4e51..a6c8d60 100644 --- a/docs/demos/frgov/pega-govfr.js +++ b/docs/demos/frgov/pega-govfr.js @@ -37,7 +37,7 @@ var m;f[g]=!0,f.elementProperties=new Map,f.elementStyles=[],f.shadowRootOptions `,ct=()=>q` -`,dt=t=>`0${t}`.slice(-2),ht=t=>`0${t}`.slice(-4),ut=t=>{if(t.endsWith(" GMT")&&23===t.length)return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T${t.substring(9,11)}:${t.substring(11,13)}:${t.substring(13,19)}Z`);if(8===t.length){return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T00:00:00.000Z`)}if(10===t.length){return new Date(`${t.substring(6,10)}-${t.substring(0,2)}-${t.substring(3,5)}T00:00:00.000Z`)}return null},pt=t=>t&&"string"==typeof t?t.replace(/&|<|>|'|(|)|"/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",""":'"'}[t]||t))):"",gt=(t,e,a,s,i)=>{if("string"!=typeof e)return;if(s){const t=mt(s,e);if(t===i||`${t}`==`${i}`||null===t&&""===i)return;ft(s,e,i)}const n=e.lastIndexOf(".");if(-1===n)return void(t[e]=i);if(!a)return void ft(t,e,i);const r={};let o=e.substring(0,n);const l=o.lastIndexOf("(");if(-1===l)r[e.substring(n+1)]=i,a.push({instruction:"UPDATE",target:o,content:r});else{const t=o.lastIndexOf(")"),s=o.substring(l+1,t);o=o.substring(0,l),ft(r,e.substring(t+2),i),a.push({instruction:"UPDATE",target:o,listIndex:parseInt(s,10),content:r})}},ft=(t,e,a)=>{if("string"!=typeof e)return;const s=e.split(".");let i=t;for(const t in s){let e=s[t];const n=e.indexOf("(");if(-1===n)t{if("string"!=typeof e||""===e)return null;let a=e;0===e.indexOf(".")&&(a=e.substring(1));let s=t;const i=a.split(".");for(const t in i){const e=i[t],a=e.indexOf("(");if(-1===a){if(void 0===s[e])return null;s=s[e]}else{const t=e.substring(a+1,e.length-1),i=s[e.substring(0,a)];if(!(i&&Array.isArray(i)&&i.length>=t))return null;s=i[t-1]}}return s},$t=t=>{for(const e in t)"object"==typeof t[e]?$t(t[e]):"string"==typeof t[e]&&(t[e]="")},yt=(t,e)=>{for(const a in t)if("fieldID"===a)e.push(t.fieldID);else{const s=t[a];s.fieldID?e.push(s.fieldID):"object"==typeof s&&yt(s,e)}},bt=(t,e,a)=>{let s=mt(t,e);if(null===s&&(s=[],ft(t,e,s)),!Array.isArray(s))return null;if(a&&"string"==typeof a){const t={},i=a.split(",");for(const e in i)t[i[e]]="";return s.push(t),{instruction:"APPEND",target:e,content:t}}if(0===s.length)return null;const i={...s[0]};return $t(i),s.push(i),{instruction:"APPEND",target:e,content:i}},vt=(t,e)=>{let a,s=e;-1!==e.indexOf(").pyTemplate")&&(a=parseInt(s.substring(e.lastIndexOf("(")+1,e.lastIndexOf(")")),10),s=s.substring(0,e.lastIndexOf("(")));const i=mt(t,s);if(!Array.isArray(i))return null;if(1===i.length){for(const t in i[0])"pxObjClass"!==t&&(i[0][t]="");return null}return a?i.length{const a=t.getAttribute(`data-action-${e}`);return!(!a||"postValue"!==a&&0!==a.indexOf("refresh"))},Dt=(t,e)=>{const a=t.getAttribute(`data-action-${e}`);return a&&0===a.indexOf("refresh")?a.replace("refresh-",""):""};function wt(t,e,a){try{switch(e){case">":return parseInt(t,10)>parseInt(a,10);case"<":return parseInt(t,10)=":return parseInt(t,10)>=parseInt(a,10);case"<=":return parseInt(t,10)<=parseInt(a,10);case"==":return`${t}`==`${a}`;case"!=":return`${t}`!=`${a}`}}catch(t){}return!1}const It=(t,e,a)=>{const s=t.replace("@E ","").split("&&");for(const t in s){const i=s[t].trim().match(/[\w.]+|[><=!]+|'[^']+'/g);if(3===i.length){const t=""===a?e[i[0].substring(1)]:mt(e,a+i[0]);if(void 0!==t&&!wt(t,i[1],i[2].replace(/^'|'$/g,"")))return!1}}return!0},At=(t,e,a,s)=>{for(const i of t.elements)if("INPUT"===i.tagName||"TEXTAREA"===i.tagName||"SELECT"===i.tagName){const t=i.getAttribute("data-ref");if(null!==t&&"pyID"!==t)if("INPUT"===i.tagName){const n=i.getAttribute("type");if(i.classList.contains("input-date-day")||i.classList.contains("input-date-month")||i.classList.contains("input-date-year")){if(i.classList.contains("input-date-day")){const n=i.closest(".input-date").parentNode,r=n.querySelector(".input-date-month"),o=n.querySelector(".input-date-year");if(null!==r&&null!==o&&""!==i.value&&""!==r.value&&""!==o.value){const n=`${dt(r.value)}/${dt(i.value)}/${ht(o.value)}`;gt(e,t,a,s,n)}}}else if("checkbox"===n)gt(e,t,a,s,i.checked);else if("radio"===n)i.checked&>(e,t,a,s,i.value);else if("tel"===n){let n=i.value;"SELECT"===i.parentNode.firstElementChild.tagName&&"field-countrycode"===i.parentNode.firstElementChild.className&&(n=i.parentNode.firstElementChild.value+n),gt(e,t,a,s,n)}else if("date"===n){let n;i.valueAsDate&&(n=new Date(i.valueAsDate)),n&&n instanceof Date&&n.getTime()==n.getTime()||(n=new Date(i.value)),n&&n instanceof Date&&n.getTime()==n.getTime()?gt(e,t,a,s,`${n.getUTCFullYear()}-${dt(n.getUTCMonth()+1)}-${dt(n.getUTCDate())}`):gt(e,t,a,s,i.value)}else gt(e,t,a,s,i.value)}else gt(e,t,a,s,i.value)}if(t&&t.querySelectorAll){const n=t.querySelectorAll("[contenteditable]");for(let t=0;t'"]/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",'"':"""}[t]||t))):"")}}var i},xt=(t,e,a)=>{for(const s of t.elements)if("INPUT"===s.tagName||"TEXTAREA"===s.tagName||"SELECT"===s.tagName){const t=`.${s.getAttribute("data-ref")}`;if(null!==t&&"pyID"!==t)for(const i in e){if(e[i].Path===t){a.setInlineError(s,e[i].ValidationMessage);break}if(e[i].erroneousInputOutputFieldInPage===t){a.setInlineError(s,e[i].localizedValue);break}}}},kt=(t,e)=>{const a=e||[],s={};for(const[e,i]of Object.entries(t))if("string"==typeof i||"boolean"==typeof i)s[e]=i;else if("object"==typeof i)if(Array.isArray(i))for(const t in i){const s={instruction:"UPDATE",target:e,listIndex:parseInt(t,10)+1,content:i[t]};a.push(s)}else{const t={instruction:"UPDATE",target:e,content:i};a.push(t)}return{pageInstructions:a,pageupdate:s}},_t=(t,e,a,s,i)=>{if(null==s)return null;let n;const r=`${Math.random().toString(36).substr(2,9)}`,o=document.createElement("ul");o.setAttribute("id",`menu-overlay-${r}`),o.setAttribute("role","menu"),o.setAttribute("aria-labelledby",`menubutton-${r}`),o.setAttribute("tabindex","-1");const l=()=>{document.body.removeEventListener("click",d),document.body.removeEventListener("keydown",c),o&&(o.previousElementSibling&&(o.previousElementSibling.setAttribute("aria-expanded","false"),o.previousElementSibling.focus()),o.remove())},c=t=>{38===t.keyCode?(n=n.previousElementSibling,null===n&&(n=o.lastElementChild),n.focus()):40===t.keyCode?(n=n.nextElementSibling,null===n&&(n=o.firstElementChild),n.focus()):27===t.keyCode||9===t.keyCode?l():13===t.keyCode&&(s(t),l())},d=t=>{if(t){let e=t.target;if(t.path&&t.path.length>0?e=t.path[0]:t.originalTarget&&(e=t.originalTarget),e&&e.nextElementSibling===o)return;e.parentNode===o&&s(t),l()}},h=t=>{if("keydown"===t.type&&40!==t.keyCode)return;if(t.preventDefault(),t.stopPropagation(),"blur"===t.type)return void d(t);const e=t.currentTarget;"BUTTON"!==e.tagName?(s(t),l()):null===e.nextElementSibling?(e.parentNode.appendChild(o),e.setAttribute("aria-expanded","true"),tt(a(),o),n=e.nextElementSibling.firstElementChild,n.focus(),document.body.addEventListener("click",d),document.body.addEventListener("keydown",c)):l()};return q` +`,dt=t=>`0${t}`.slice(-2),ht=t=>`0${t}`.slice(-4),ut=t=>{if(t.endsWith(" GMT")&&23===t.length)return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T${t.substring(9,11)}:${t.substring(11,13)}:${t.substring(13,19)}Z`);if(8===t.length){return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T00:00:00.000Z`)}if(10===t.length&&2===t.indexOf("/")){return new Date(`${t.substring(6,10)}-${t.substring(0,2)}-${t.substring(3,5)}T00:00:00.000Z`)}if(10===t.length&&4===t.indexOf("-")){return new Date(`${t}T00:00:00.000Z`)}return null},pt=t=>t&&"string"==typeof t?t.replace(/&|<|>|'|(|)|"/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",""":'"'}[t]||t))):"",gt=(t,e,a,s,i)=>{if("string"!=typeof e)return;if(s){const t=mt(s,e);if(t===i||`${t}`==`${i}`||null===t&&""===i)return;ft(s,e,i)}const n=e.lastIndexOf(".");if(-1===n)return void(t[e]=i);if(!a)return void ft(t,e,i);const r={};let o=e.substring(0,n);const l=o.lastIndexOf("(");if(-1===l)r[e.substring(n+1)]=i,a.push({instruction:"UPDATE",target:o,content:r});else{const t=o.lastIndexOf(")"),s=o.substring(l+1,t);o=o.substring(0,l),ft(r,e.substring(t+2),i),a.push({instruction:"UPDATE",target:o,listIndex:parseInt(s,10),content:r})}},ft=(t,e,a)=>{if("string"!=typeof e)return;const s=e.split(".");let i=t;for(const t in s){let e=s[t];const n=e.indexOf("(");if(-1===n)t{if("string"!=typeof e||""===e)return null;let a=e;0===e.indexOf(".")&&(a=e.substring(1));let s=t;const i=a.split(".");for(const t in i){const e=i[t],a=e.indexOf("(");if(-1===a){if(void 0===s[e])return null;s=s[e]}else{const t=e.substring(a+1,e.length-1),i=s[e.substring(0,a)];if(!(i&&Array.isArray(i)&&i.length>=t))return null;s=i[t-1]}}return s},$t=t=>{for(const e in t)"object"==typeof t[e]?$t(t[e]):"string"==typeof t[e]&&(t[e]="")},yt=(t,e)=>{for(const a in t)if("fieldID"===a)e.push(t.fieldID);else{const s=t[a];s.fieldID?e.push(s.fieldID):"object"==typeof s&&yt(s,e)}},bt=(t,e,a)=>{let s=mt(t,e);if(null===s&&(s=[],ft(t,e,s)),!Array.isArray(s))return null;if(a&&"string"==typeof a){const t={},i=a.split(",");for(const e in i)t[i[e]]="";return s.push(t),{instruction:"APPEND",target:e,content:t}}if(0===s.length)return null;const i={...s[0]};return $t(i),s.push(i),{instruction:"APPEND",target:e,content:i}},vt=(t,e)=>{let a,s=e;-1!==e.indexOf(").pyTemplate")&&(a=parseInt(s.substring(e.lastIndexOf("(")+1,e.lastIndexOf(")")),10),s=s.substring(0,e.lastIndexOf("(")));const i=mt(t,s);if(!Array.isArray(i))return null;if(1===i.length){for(const t in i[0])"pxObjClass"!==t&&(i[0][t]="");return null}return a?i.length{const a=t.getAttribute(`data-action-${e}`);return!(!a||"postValue"!==a&&0!==a.indexOf("refresh"))},Dt=(t,e)=>{const a=t.getAttribute(`data-action-${e}`);return a&&0===a.indexOf("refresh")?a.replace("refresh-",""):""};function wt(t,e,a){try{switch(e){case">":return parseInt(t,10)>parseInt(a,10);case"<":return parseInt(t,10)=":return parseInt(t,10)>=parseInt(a,10);case"<=":return parseInt(t,10)<=parseInt(a,10);case"==":return`${t}`==`${a}`;case"!=":return`${t}`!=`${a}`}}catch(t){}return!1}const It=(t,e,a)=>{const s=t.replace("@E ","").split("&&");for(const t in s){const i=s[t].trim().match(/[\w.]+|[><=!]+|'[^']+'/g);if(3===i.length){const t=""===a?e[i[0].substring(1)]:mt(e,a+i[0]);if(void 0!==t&&!wt(t,i[1],i[2].replace(/^'|'$/g,"")))return!1}}return!0},At=(t,e,a,s)=>{for(const i of t.elements)if("INPUT"===i.tagName||"TEXTAREA"===i.tagName||"SELECT"===i.tagName){const t=i.getAttribute("data-ref");if(null!==t&&"pyID"!==t)if("INPUT"===i.tagName){const n=i.getAttribute("type");if(i.classList.contains("input-date-day")||i.classList.contains("input-date-month")||i.classList.contains("input-date-year")){if(i.classList.contains("input-date-day")){const n=i.closest(".input-date").parentNode,r=n.querySelector(".input-date-month"),o=n.querySelector(".input-date-year");if(null!==r&&null!==o&&""!==i.value&&""!==r.value&&""!==o.value){const n=`${dt(r.value)}/${dt(i.value)}/${ht(o.value)}`;gt(e,t,a,s,n)}}}else if("checkbox"===n)gt(e,t,a,s,i.checked);else if("radio"===n)i.checked&>(e,t,a,s,i.value);else if("tel"===n){let n=i.value;"SELECT"===i.parentNode.firstElementChild.tagName&&"field-countrycode"===i.parentNode.firstElementChild.className&&(n=i.parentNode.firstElementChild.value+n),gt(e,t,a,s,n)}else if("date"===n){let n;i.valueAsDate&&(n=new Date(i.valueAsDate)),n&&n instanceof Date&&n.getTime()==n.getTime()||(n=new Date(i.value)),n&&n instanceof Date&&n.getTime()==n.getTime()?gt(e,t,a,s,`${n.getUTCFullYear()}-${dt(n.getUTCMonth()+1)}-${dt(n.getUTCDate())}`):gt(e,t,a,s,i.value)}else gt(e,t,a,s,i.value)}else gt(e,t,a,s,i.value)}if(t&&t.querySelectorAll){const n=t.querySelectorAll("[contenteditable]");for(let t=0;t'"]/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",'"':"""}[t]||t))):"")}}var i},xt=(t,e,a)=>{for(const s of t.elements)if("INPUT"===s.tagName||"TEXTAREA"===s.tagName||"SELECT"===s.tagName){const t=`.${s.getAttribute("data-ref")}`;if(null!==t&&"pyID"!==t)for(const i in e){if(e[i].Path===t){a.setInlineError(s,e[i].ValidationMessage);break}if(e[i].erroneousInputOutputFieldInPage===t){a.setInlineError(s,e[i].localizedValue);break}}}},kt=(t,e)=>{const a=e||[],s={};for(const[e,i]of Object.entries(t))if("string"==typeof i||"boolean"==typeof i)s[e]=i;else if("object"==typeof i)if(Array.isArray(i))for(const t in i){const s={instruction:"UPDATE",target:e,listIndex:parseInt(t,10)+1,content:i[t]};a.push(s)}else{const t={instruction:"UPDATE",target:e,content:i};a.push(t)}return{pageInstructions:a,pageupdate:s}},_t=(t,e,a,s,i)=>{if(null==s)return null;let n;const r=`${Math.random().toString(36).substr(2,9)}`,o=document.createElement("ul");o.setAttribute("id",`menu-overlay-${r}`),o.setAttribute("role","menu"),o.setAttribute("aria-labelledby",`menubutton-${r}`),o.setAttribute("tabindex","-1");const l=()=>{document.body.removeEventListener("click",d),document.body.removeEventListener("keydown",c),o&&(o.previousElementSibling&&(o.previousElementSibling.setAttribute("aria-expanded","false"),o.previousElementSibling.focus()),o.remove())},c=t=>{38===t.keyCode?(n=n.previousElementSibling,null===n&&(n=o.lastElementChild),n.focus()):40===t.keyCode?(n=n.nextElementSibling,null===n&&(n=o.firstElementChild),n.focus()):27===t.keyCode||9===t.keyCode?l():13===t.keyCode&&(s(t),l())},d=t=>{if(t){let e=t.target;if(t.path&&t.path.length>0?e=t.path[0]:t.originalTarget&&(e=t.originalTarget),e&&e.nextElementSibling===o)return;e.parentNode===o&&s(t),l()}},h=t=>{if("keydown"===t.type&&40!==t.keyCode)return;if(t.preventDefault(),t.stopPropagation(),"blur"===t.type)return void d(t);const e=t.currentTarget;"BUTTON"!==e.tagName?(s(t),l()):null===e.nextElementSibling?(e.parentNode.appendChild(o),e.setAttribute("aria-expanded","true"),tt(a(),o),n=e.nextElementSibling.firstElementChild,n.focus(),document.body.addEventListener("click",d),document.body.addEventListener("keydown",c)):l()};return q`
- `},wt=(t,e,a,s,i)=>{let n=0;const o=t=>{if(void 0===t||"string"==typeof t&&""===t)return;if("URL"===e[n].category)return void window.open(t);let a=e[n].fileName;if(void 0===a&&(a=e[n].name),void 0===a&&(a=e[n].pyAttachName),!a)return;const s=window.document.createElement("a");if("Correspondence"===e[n].category){a=`${e[n].name}.html`;const i=`${e[n].name}${t}`,o=new Blob([i],{type:"text"});s.href=window.URL.createObjectURL(o)}else{const e=function(t){const e=window.atob(t),a=e.length,s=new Uint8Array(a);for(let t=0;t{t.stopPropagation();const a=t.target;n=a.getAttribute("data-id"),s.fetchData.call(s,"attachment",{id:e[n].ID,target:o})},l=a=>{a.preventDefault(),a.stopPropagation();const i=a.target.closest("button");n=i.getAttribute("data-id"),s.sendData.call(s,"deleteattachment",{id:e[n].ID,target:t})},c=o=>{o.stopPropagation();const r=o.target.closest("button");n=parseInt(r.getAttribute("data-id"),10),i.splice(n,1),et(wt(t,e,a,s,i),t)},d=t=>{t.stopPropagation(),t.preventDefault();const e=t.target;if(n=e.getAttribute("data-id"),"INPUT"===e.tagName){const t=e.getAttribute("data-prop-id");i[n][t]=e.value}else"SELECT"===e.tagName&&(i[n].category=e.value)},u=e=>{e.preventDefault();const a=e.target,s=e.relatedTarget,i=null===a?null:a.closest(".attach-files"),n=null===s?null:s.closest(".attach-files");if("dragenter"===e.type||"dragover"===e.type?null!=i&&i.classList.add("drop-file-hover"):"dragleave"!==e.type&&"drop"!==e.type||null===n&&null!==i&&i.classList.remove("drop-file-hover"),"drop"===e.type){const s=e.dataTransfer.files;t||(t=a.closest(".attach-files")),p(a,s)}},h=n=>{n&&(n.stopPropagation(),n.preventDefault());for(let n=0;n{const o=[];for(let t=0;t{e.stopPropagation();let a=e.target;if("BUTTON"===a.tagName)return a=e.target.parentNode.parentNode.firstElementChild,void a.click();t||(t=a.closest(".attach-files")),p(a,a.files)},f=i=>{i.stopPropagation();et(wt(t,e,a,s,[{type:"URL",category:"URL",name:"",url:"",editing:!0}]),t)},v=i=>{i.stopPropagation(),et(wt(t,e,a,s),t)},$=(t,e)=>{let a=new Date(e.createTime);return a=a.toLocaleDateString(void 0,{year:"numeric",month:"numeric",day:"numeric"}),O` + `},wt=(t,e,a,s,i)=>{let n=0;const o=t=>{if(void 0===t||"string"==typeof t&&""===t)return;if("URL"===e[n].category)return void window.open(t);let a=e[n].fileName;if(void 0===a&&(a=e[n].name),void 0===a&&(a=e[n].pyAttachName),!a)return;const s=window.document.createElement("a");if("Correspondence"===e[n].category){a=`${e[n].name}.html`;const i=`${e[n].name}${t}`,o=new Blob([i],{type:"text"});s.href=window.URL.createObjectURL(o)}else{const e=function(t){const e=window.atob(t),a=e.length,s=new Uint8Array(a);for(let t=0;t{t.stopPropagation();const a=t.target;n=a.getAttribute("data-id"),s.fetchData.call(s,"attachment",{id:e[n].ID,target:o})},l=a=>{a.preventDefault(),a.stopPropagation();const i=a.target.closest("button");n=i.getAttribute("data-id"),s.sendData.call(s,"deleteattachment",{id:e[n].ID,target:t})},c=o=>{o.stopPropagation();const r=o.target.closest("button");n=parseInt(r.getAttribute("data-id"),10),i.splice(n,1),et(wt(t,e,a,s,i),t)},d=t=>{t.stopPropagation(),t.preventDefault();const e=t.target;if(n=e.getAttribute("data-id"),"INPUT"===e.tagName){const t=e.getAttribute("data-prop-id");i[n][t]=e.value}else"SELECT"===e.tagName&&(i[n].category=e.value)},u=e=>{e.preventDefault();const a=e.target,s=e.relatedTarget,i=null===a?null:a.closest(".attach-files"),n=null===s?null:s.closest(".attach-files");if("dragenter"===e.type||"dragover"===e.type?null!=i&&i.classList.add("drop-file-hover"):"dragleave"!==e.type&&"drop"!==e.type||null===n&&null!==i&&i.classList.remove("drop-file-hover"),"drop"===e.type){const s=e.dataTransfer.files;t||(t=a.closest(".attach-files")),p(a,s)}},h=n=>{n&&(n.stopPropagation(),n.preventDefault());for(let n=0;n{const o=[];for(let t=0;t{e.stopPropagation();let a=e.target;if("BUTTON"===a.tagName)return a=e.target.parentNode.parentNode.firstElementChild,void a.click();t||(t=a.closest(".attach-files")),p(a,a.files)},f=i=>{i.stopPropagation();et(wt(t,e,a,s,[{type:"URL",category:"URL",name:"",url:"",editing:!0}]),t)},v=i=>{i.stopPropagation(),et(wt(t,e,a,s),t)},$=(t,e)=>{let a=new Date(e.createTime);return a=a.toLocaleDateString(void 0,{year:"numeric",month:"numeric",day:"numeric"}),U`
- ${e.loading?"":O` + ${e.loading?"":U` ${e.createdBy}${a}${i18n.t("Category:")} ${e.category}`} -
`},m=()=>O`
  • ${i18n.t("Download")}
  • -
  • ${i18n.t("Delete")}
  • `,y=i=>{let r=i.target;if(i.path&&i.path.length>0?r=i.path[0]:i.originalTarget&&(r=i.originalTarget),r){const i=r.getAttribute("data-value"),l=e[n].pzInsKey||e[n].ID;"Download"===i?s.fetchData.call(s,"attachment",{id:l,target:o}):"Delete"===i&&(s.sendData.call(s,"deleteattachment",{id:l,target:t}),et(wt(void 0,[],a,s,[]),t))}},b=t=>O`
    +
    `},m=()=>U`
  • ${i18n.t("Download")}
  • +
  • ${i18n.t("Delete")}
  • `,y=i=>{let r=i.target;if(i.path&&i.path.length>0?r=i.path[0]:i.originalTarget&&(r=i.originalTarget),r){const i=r.getAttribute("data-value"),l=e[n].pzInsKey||e[n].ID;"Download"===i?s.fetchData.call(s,"attachment",{id:l,target:o}):"Delete"===i&&(s.sendData.call(s,"deleteattachment",{id:l,target:t}),et(wt(void 0,[],a,s,[]),t))}},b=t=>U`
    ${ct()}${t.extension}
    ${t.pyAttachName||t.name} ${t.pyCategoryName||t.category} ${t.pxCreateOperator||t.createdBy}
    - ${kt(O` + ${kt(U` `,"Actions",m,y,"button-action")} -
    `,C=(t,e)=>e.loading?O`${$(t,e)}${ot()}`:e.editing?"URL"===e.type?O` + `,C=(t,e)=>e.loading?U`${$(t,e)}${ot()}`:e.editing?"URL"===e.type?U`
    @@ -63,55 +63,55 @@ var $;v[f]=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions
    -
    `:O` +
    `:U` - ${((t,e)=>O` + ${((t,e)=>U` `)(t,e.category)} ${e.name} ${Math.round(e.size/1e3)}Kb `:O`${$(t,e)} + aria-label=${i18n.t("Delete")}>${rt()}`:U`${$(t,e)} `,_=t=>{if(!a)return ot();const e=[];if(void 0!==t){const a=Object.entries(t);for(const t of a){let a=t[1].extension;void 0===a&&(a=t[1].type),a||(a=""),a.length>5&&(a=a.substring(0,5)),"URL"===t[1].type&&t[1].editing?e.push(O`
    + aria-label=${i18n.t("Delete")}>${rt()}`,_=t=>{if(!a)return ot();const e=[];if(void 0!==t){const a=Object.entries(t);for(const t of a){let a=t[1].extension;void 0===a&&(a=t[1].type),a||(a=""),a.length>5&&(a=a.substring(0,5)),"URL"===t[1].type&&t[1].editing?e.push(U`
    ${C(t[0],t[1])} -
    `):e.push(O`
    +
    `):e.push(U`
    ${ct()}${a} ${C(t[0],t[1])} -
    `)}}return e&&e.length>0?e:O`
    ${i18n.t("no attachments found")}
    `};if(!t){if(e&&e.length>0&&e[0].pyAttachName){n=0,e[0].extension="";const t=e[0].pyAttachName.split(".");return t.length>1&&(e[0].extension=t[t.length-1]),b(e[0])}return O`
    `)}}return e&&e.length>0?e:U`
    ${i18n.t("no attachments found")}
    `};if(!t){if(e&&e.length>0&&e[0].pyAttachName){n=0,e[0].extension="";const t=e[0].pyAttachName.split(".");return t.length>1&&(e[0].extension=t[t.length-1]),b(e[0])}return U`
    ${lt()}${i18n.t(" Drag and drop or ")}
    -
    `}if(t&&t.classList.contains("attach-files")){if(i&&i.length>0)return s.sendData.call(s,"uploadattachment",{actionid:i[0],target:t}),k=i[0],w=!0,O`
    +
    `}if(t&&t.classList.contains("attach-files")){if(i&&i.length>0)return s.sendData.call(s,"uploadattachment",{actionid:i[0],target:t}),k=i[0],w=!0,U`
    ${ct()}${k.extension} -
    ${k.displayName}${w?O` +
    ${k.displayName}${w?U` ${i18n.t("Uploading...")}`:""}
    -
    `;if(e&&e.length>0)return b(e[0])}var k,w;let A="Attachments";return void 0!==i&&i.length>0&&(A="URL"===i[0].type?"Attach a link":"Attach files"),O` +
    `;if(e&&e.length>0)return b(e[0])}var k,w;let A="Attachments";return void 0!==i&&i.length>0&&(A="URL"===i[0].type?"Attach a link":"Attach files"),U`

    ${i18n.t(A)}

    - ${void 0!==i&&i.length>0?O` + ${void 0!==i&&i.length>0?U`
    ${_(i)}
    -
    `:O` +
    `:U`
    @@ -130,19 +130,19 @@ var $;v[f]=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause - */const It=t=>null!=t?t:q,xt=(t,e)=>{if(t.helperText&&""!==t.helperText)return`${e}-info`},Et=t=>{if(t.placeholder&&""!==t.placeholder)return t.displayplaceholder},St=(t,e,a,s)=>void 0===e||""===e||-1!==e.indexOf("-table")?O` + */const It=t=>null!=t?t:q,xt=(t,e)=>{if(t.helperText&&""!==t.helperText)return`${e}-info`},Et=t=>{if(t.placeholder&&""!==t.placeholder)return t.displayplaceholder},St=(t,e,a,s)=>void 0===e||""===e||-1!==e.indexOf("-table")?U` ${s} - `:O` + `:U`
    - ${((t,e,a)=>{if(void 0===e)return null;const s=t.requiredstate?"icon-required":"";return"field-checkbox"===a?t.label&&""!==t.label?O`${t.displaylabel}`:null:O` - ${""!==t.label?O`
    - `,Tt=(t,e,a,s,i)=>{const n=((t,e,a,s,i)=>{if(!1===t.config.visibility)return null;let n=!1;if(t.config.displayvalue="",t.config.displaylabel=i18n.t(t.config.label),t.config.displayplaceholder=i18n.t(t.config.placeholder),t.config.displayhelperText=i18n.t(t.config.helperText),t.config.displaycaption=i18n.t(t.config.caption),t.config.value){let e=t.config.value.replace("@P .","").replace("@USER .","");if(t.config.reference=void 0===i||""===i?e:`${i}.${e}`,t.config.displayvalue=vt(s.casedata.content,t.config.reference),"string"==typeof t.config.datasource&&0===t.config.datasource.indexOf("@ASSOCIATED")){e=t.config.datasource.replace("@ASSOCIATED .",""),-1!==e.indexOf(".")&&(e=e.substring(e.lastIndexOf(".")+1));let a="";s.data.context_data?a=s.data.context_data.content:s.data.uiResources.context_data&&s.data.uiResources.context_data.caseInfo&&s.data.uiResources.context_data.caseInfo.content&&(a=s.data.uiResources.context_data.caseInfo.content);const n=""===i?a:vt(a,i);if(n&&(t.config.options=n.summary_of_associated_lists__[e]),void 0===t.config.options&&(a=s.data.uiResources.resources.fields[e],Array.isArray(a)&&1===a.length&&(a=a[0]),a&&a.datasource))if(a.datasource.records)t.config.options=a.datasource.records;else if(a.datasource.name&&s.data.data.shared[a.datasource.name]){const e=s.data.data.shared[a.datasource.name];if(Object.keys(e).length>0){const s=Object.keys(e)[0];if(e[s].pxResults){const i=a.datasource.propertyForValue.replace("@P .",""),n=a.datasource.propertyForDisplayText.replace("@P .","");t.config.options=[];for(const a in e[s].pxResults){const o=e[s].pxResults[a];t.config.options[a]={key:o[i],value:o[n]}}}}}}else if("object"==typeof t.config.datasource&&t.config.datasource.source&&0===t.config.datasource.source.indexOf("@DATASOURCE")){const e=t.config.datasource.source.replace("@DATASOURCE ","").replace(".pxResults","");if(s.data.data[e]&&s.data.data[e].pxResults)t.config.options=s.data.data[e].pxResults;else if(s.data.uiResources.context_data&&s.data.uiResources.context_data.caseInfo&&s.data.uiResources.context_data.caseInfo.content){const a=s.data.uiResources.context_data.caseInfo.content;if(a[i]&&a[i].summary_of_lists__[e]&&a[i].summary_of_lists__[e].pxResults){const n=a[i].summary_of_lists__[e].pxResults.replace(".pxResults","");if(s.data.data[n]&&s.data.data[n].pxResults){t.config.options=[];const e=t.config.datasource.fields.key.replace("@P .",""),a=t.config.datasource.fields.text.replace("@P .","");for(const i in s.data.data[n].pxResults){const o=s.data.data[n].pxResults[i];t.config.options[i]={key:o[e],value:o[a]}}}}}}if(t.config.options||(t.config.options=[]),t.config.displayvalue?"object"!=typeof t.config.displayvalue&&(t.config.displayvalue=`${t.config.displayvalue}`):t.config.displayvalue="",s.data.uiResources&&s.data.uiResources.resources&&s.data.uiResources.resources.fields&&s.data.uiResources.resources.fields[e]){let t=s.data.uiResources.resources.fields[e];Array.isArray(t)&&1===t.length&&(t=t[0]),(t.isDeclarativeTarget||t.isSpecial)&&(n=!0,s.isDeclarativeTarget=!0)}}"string"!=typeof t.config.visibility&&"string"!=typeof t.config.readOnly&&"string"!=typeof t.config.disabled&&"string"!=typeof t.config.required||(s.refreshOnChange=!0);const o=s.data.data.caseInfo.content;if("string"==typeof t.config.visibility&&"true"!==t.config.visibility){if(!Ct(t.config.visibility,o,i))return null}else if(!1===t.config.visibility||"false"===t.config.visibility)return null;return t.config.readonlystate=!1,"string"==typeof t.config.readOnly&&"false"!==t.config.readOnly?t.config.readonlystate=Ct(t.config.readOnly,o,i):(!0===t.config.readOnly||"true"===t.config.readOnly||n)&&(t.config.readonlystate=!0),t.config.requiredstate=!1,"string"==typeof t.config.required&&"false"!==t.config.required?t.config.requiredstate=Ct(t.config.required,o,i):!0!==t.config.required&&"true"!==t.config.required||(t.config.requiredstate=!0),t.config.disabledstate=!1,"string"==typeof t.config.disabled&&"false"!==t.config.disabled?t.config.disabledstate=Ct(t.config.disabled,o,i):!0!==t.config.disabled&&"true"!==t.config.disabled||(t.config.disabledstate=!0),t.config.disabledstate&&(t.config.requiredstate=!1,t.config.readonlystate=!1),"OK"})(t,0,0,s,i);if("OK"!==n)return n;if(!0===a||t.config.readonlystate)return St(t.config,e,"field-text",Rt(t.config,t.type,e));switch(t.type){case"TextContent":return Rt(t.config,t.type,e);case"Decimal":case"TextInput":return St(t.config,e,"field-textinput",Nt(t.config,e));case"Phone":return St(t.config,e,"field-phoneinput",Lt(t.config,e));case"Email":return St(t.config,e,"field-emailinput",Mt(t.config,e));case"Integer":return St(t.config,e,"field-numberinput",Pt(t.config,e));case"Percentage":return St(t.config,e,"field-percentage",Ut(t.config,e));case"Currency":return St(t.config,e,"field-currencyinput",Ot(t.config,e));case"RadioButtons":return St(t.config,e,"field-radiogroup",jt(t.config,e));case"TextArea":return St(t.config,e,"field-textarea",qt(t.config,e));case"Checkbox":return St(t.config,e,"field-checkbox",Ht(t.config,e));case"Dropdown":return St(t.config,e,"field-dropdown",zt(t.config,e));case"DateTime":return St(t.config,e,"field-datetime",Vt(t.config,e));case"Date":return St(t.config,e,"field-date",Bt(t.config,e));case"Time":return St(t.config,e,"field-time",Ft(t.config,e));case"AutoComplete":return St(t.config,e,"field-autocomplete",Wt(t.config,e));case"SemanticLink":return St(t.config,e,"field-semanticlink",Zt(t.config));case"Location":return St(t.config,e,"field-location",Kt(t.config,e));default:return null}},Rt=(t,e,a)=>{let s=t.displayvalue;if(""!==s){if("Phone"===e)return O`${s}`;if("Date"===e){const e={year:"numeric",month:"short",day:"numeric"};s=new Intl.DateTimeFormat([],e).format(new Date(t.displayvalue))}else if("DateTime"===e){s=ht(t.displayvalue);const e={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"};s=new Intl.DateTimeFormat([],e).format(new Date(t.displayvalue))}else if("Time"===e){const e={hour:"numeric",minute:"numeric"};s=new Intl.DateTimeFormat([],e).format(new Date(t.displayvalue))}}if("TextContent"===e){if("Paragraph"===t.displayAs)return O`

    ${i18n.t(t.content)}

    `;if("Heading 1"===t.displayAs)return O`

    ${i18n.t(t.content)}

    `;if("Heading 2"===t.displayAs)return O`

    ${i18n.t(t.content)}

    `;if("Heading 3"===t.displayAs)return O`

    ${i18n.t(t.content)}

    `;if("Heading 4"===t.displayAs)return O`

    ${i18n.t(t.content)}

    `}return O` + `,Tt=(t,e,a,s,i)=>{const n=((t,e,a,s,i)=>{if(!1===t.config.visibility)return null;let n=!1;if(t.config.displayvalue="",t.config.displaylabel=i18n.t(t.config.label),t.config.displayplaceholder=i18n.t(t.config.placeholder),t.config.displayhelperText=i18n.t(t.config.helperText),t.config.displaycaption=i18n.t(t.config.caption),t.config.value){let e=t.config.value.replace("@P .","").replace("@USER .","");if(t.config.reference=void 0===i||""===i?e:`${i}.${e}`,t.config.displayvalue=vt(s.casedata.content,t.config.reference),"string"==typeof t.config.datasource&&0===t.config.datasource.indexOf("@ASSOCIATED")){e=t.config.datasource.replace("@ASSOCIATED .",""),-1!==e.indexOf(".")&&(e=e.substring(e.lastIndexOf(".")+1));let a="";s.data.context_data?a=s.data.context_data.content:s.data.uiResources.context_data&&s.data.uiResources.context_data.caseInfo&&s.data.uiResources.context_data.caseInfo.content&&(a=s.data.uiResources.context_data.caseInfo.content);const n=""===i?a:vt(a,i);if(n&&(t.config.options=n.summary_of_associated_lists__[e]),void 0===t.config.options&&(a=s.data.uiResources.resources.fields[e],Array.isArray(a)&&1===a.length&&(a=a[0]),a&&a.datasource))if(a.datasource.records)t.config.options=a.datasource.records;else if(a.datasource.name&&s.data.data.shared[a.datasource.name]){const e=s.data.data.shared[a.datasource.name];if(Object.keys(e).length>0){const s=Object.keys(e)[0];if(e[s].pxResults){const i=a.datasource.propertyForValue.replace("@P .",""),n=a.datasource.propertyForDisplayText.replace("@P .","");t.config.options=[];for(const a in e[s].pxResults){const o=e[s].pxResults[a];t.config.options[a]={key:o[i],value:o[n]}}}}}}else if("object"==typeof t.config.datasource&&t.config.datasource.source&&0===t.config.datasource.source.indexOf("@DATASOURCE")){const e=t.config.datasource.source.replace("@DATASOURCE ","").replace(".pxResults","");if(s.data.data[e]&&s.data.data[e].pxResults)t.config.options=s.data.data[e].pxResults;else if(s.data.uiResources.context_data&&s.data.uiResources.context_data.caseInfo&&s.data.uiResources.context_data.caseInfo.content){const a=s.data.uiResources.context_data.caseInfo.content;if(a[i]&&a[i].summary_of_lists__[e]&&a[i].summary_of_lists__[e].pxResults){const n=a[i].summary_of_lists__[e].pxResults.replace(".pxResults","");if(s.data.data[n]&&s.data.data[n].pxResults){t.config.options=[];const e=t.config.datasource.fields.key.replace("@P .",""),a=t.config.datasource.fields.text.replace("@P .","");for(const i in s.data.data[n].pxResults){const o=s.data.data[n].pxResults[i];t.config.options[i]={key:o[e],value:o[a]}}}}}}if(t.config.options||(t.config.options=[]),t.config.displayvalue?"object"!=typeof t.config.displayvalue&&(t.config.displayvalue=`${t.config.displayvalue}`):t.config.displayvalue="",s.data.uiResources&&s.data.uiResources.resources&&s.data.uiResources.resources.fields&&s.data.uiResources.resources.fields[e]){let t=s.data.uiResources.resources.fields[e];Array.isArray(t)&&1===t.length&&(t=t[0]),(t.isDeclarativeTarget||t.isSpecial)&&(n=!0,s.isDeclarativeTarget=!0)}}"string"!=typeof t.config.visibility&&"string"!=typeof t.config.readOnly&&"string"!=typeof t.config.disabled&&"string"!=typeof t.config.required||(s.refreshOnChange=!0);const o=s.data.data.caseInfo.content;if("string"==typeof t.config.visibility&&"true"!==t.config.visibility){if(!Ct(t.config.visibility,o,i))return null}else if(!1===t.config.visibility||"false"===t.config.visibility)return null;return t.config.readonlystate=!1,"string"==typeof t.config.readOnly&&"false"!==t.config.readOnly?t.config.readonlystate=Ct(t.config.readOnly,o,i):(!0===t.config.readOnly||"true"===t.config.readOnly||n)&&(t.config.readonlystate=!0),t.config.requiredstate=!1,"string"==typeof t.config.required&&"false"!==t.config.required?t.config.requiredstate=Ct(t.config.required,o,i):!0!==t.config.required&&"true"!==t.config.required||(t.config.requiredstate=!0),t.config.disabledstate=!1,"string"==typeof t.config.disabled&&"false"!==t.config.disabled?t.config.disabledstate=Ct(t.config.disabled,o,i):!0!==t.config.disabled&&"true"!==t.config.disabled||(t.config.disabledstate=!0),t.config.disabledstate&&(t.config.requiredstate=!1,t.config.readonlystate=!1),"OK"})(t,0,0,s,i);if("OK"!==n)return n;if(!0===a||t.config.readonlystate)return St(t.config,e,"field-text",Rt(t.config,t.type,e));switch(t.type){case"TextContent":return Rt(t.config,t.type,e);case"Decimal":case"TextInput":return St(t.config,e,"field-textinput",Nt(t.config,e));case"Phone":return St(t.config,e,"field-phoneinput",Lt(t.config,e));case"Email":return St(t.config,e,"field-emailinput",Mt(t.config,e));case"Integer":return St(t.config,e,"field-numberinput",Ot(t.config,e));case"Percentage":return St(t.config,e,"field-percentage",Pt(t.config,e));case"Currency":return St(t.config,e,"field-currencyinput",Ut(t.config,e));case"RadioButtons":return St(t.config,e,"field-radiogroup",jt(t.config,e));case"TextArea":return St(t.config,e,"field-textarea",qt(t.config,e));case"Checkbox":return St(t.config,e,"field-checkbox",Ht(t.config,e));case"Dropdown":return St(t.config,e,"field-dropdown",zt(t.config,e));case"DateTime":return St(t.config,e,"field-datetime",Vt(t.config,e));case"Date":return St(t.config,e,"field-date",Bt(t.config,e));case"Time":return St(t.config,e,"field-time",Ft(t.config,e));case"AutoComplete":return St(t.config,e,"field-autocomplete",Wt(t.config,e));case"SemanticLink":return St(t.config,e,"field-semanticlink",Zt(t.config));case"Location":return St(t.config,e,"field-location",Kt(t.config,e));default:return null}},Rt=(t,e,a)=>{let s=t.displayvalue;if(""!==s){if("Phone"===e)return U`${s}`;if("Date"===e){const e={year:"numeric",month:"short",day:"numeric"};s=new Intl.DateTimeFormat([],e).format(new Date(t.displayvalue))}else if("DateTime"===e){s=ht(t.displayvalue);const e={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"};s=new Intl.DateTimeFormat([],e).format(new Date(t.displayvalue))}else if("Time"===e){const e={hour:"numeric",minute:"numeric"};s=new Intl.DateTimeFormat([],e).format(new Date(t.displayvalue))}}if("TextContent"===e){if("Paragraph"===t.displayAs)return U`

    ${i18n.t(t.content)}

    `;if("Heading 1"===t.displayAs)return U`

    ${i18n.t(t.content)}

    `;if("Heading 2"===t.displayAs)return U`

    ${i18n.t(t.content)}

    `;if("Heading 3"===t.displayAs)return U`

    ${i18n.t(t.content)}

    `;if("Heading 4"===t.displayAs)return U`

    ${i18n.t(t.content)}

    `}return U` ${pt(s)} - `},Nt=(t,e)=>O` + `},Nt=(t,e)=>U` -`,Lt=(t,e)=>{let a="";for(const e of t.options)0===t.displayvalue.indexOf(e.pyCallingCode)&&(a=e.pyCallingCode);return t.displayvalue=t.displayvalue.substring(a.length),O` +`,Lt=(t,e)=>{let a="";for(const e of t.options)0===t.displayvalue.indexOf(e.pyCallingCode)&&(a=e.pyCallingCode);return t.displayvalue=t.displayvalue.substring(a.length),U`
    -`},Pt=(t,e)=>O` +`},Ot=(t,e)=>U` -`,Ut=(t,e)=>O` +`,Pt=(t,e)=>U` -`,Ot=(t,e)=>O` +`,Ut=(t,e)=>U`
    $
    -`,Mt=(t,e)=>O` +`,Mt=(t,e)=>U` -`,qt=(t,e)=>O` +`,qt=(t,e)=>U` -`,Ht=(t,e)=>{const a=t.requiredstate?"icon-required":"";return O`
    +`,Ht=(t,e)=>{const a=t.requiredstate?"icon-required":"";return U`
    ${t.displaycaption}
    -`},jt=(t,e)=>{let a=[{value:"true"},{value:"false"}];return t.options&&(a=t.options),O`
    - ${a.map(((a,s)=>{const i=`rb-${e}-${s}`;return O` +`},jt=(t,e)=>{let a=[{value:"true"},{value:"false"}];return t.options&&(a=t.options),U`
    + ${a.map(((a,s)=>{const i=`rb-${e}-${s}`;return U`
    ${a.value}
    `}))} -
    `},zt=(t,e)=>O` placeholder="${It(Et(t))}" - ${t.options.map((e=>O``))} - `,Vt=(t,e)=>{let a=t.displayvalue;if(""!==a){const e=ht(a);e instanceof Date&&e.getTime()==e.getTime()?a=`${e.getUTCFullYear()}-${dt(e.getUTCMonth()+1)}-${dt(e.getUTCDate())}T${dt(e.getUTCHours())}:${dt(e.getUTCMinutes())}`:8===t.displayvalue.length?a=`${t.displayvalue.substring(0,4)}-${t.displayvalue.substring(4,6)}-${t.displayvalue.substring(6,8)}T00:00`:24===t.displayvalue.length&&(a=`${t.displayvalue.substring(0,4)}-${t.displayvalue.substring(5,7)}-${t.displayvalue.substring(8,10)}T${t.displayvalue.substring(11,13)}:${t.displayvalue.substring(14,16)}`)}return O` + ${t.options.map((e=>U``))} + `,Vt=(t,e)=>{let a=t.displayvalue;if(""!==a){const e=ht(a);e instanceof Date&&e.getTime()==e.getTime()?a=`${e.getUTCFullYear()}-${dt(e.getUTCMonth()+1)}-${dt(e.getUTCDate())}T${dt(e.getUTCHours())}:${dt(e.getUTCMinutes())}`:8===t.displayvalue.length?a=`${t.displayvalue.substring(0,4)}-${t.displayvalue.substring(4,6)}-${t.displayvalue.substring(6,8)}T00:00`:24===t.displayvalue.length&&(a=`${t.displayvalue.substring(0,4)}-${t.displayvalue.substring(5,7)}-${t.displayvalue.substring(8,10)}T${t.displayvalue.substring(11,13)}:${t.displayvalue.substring(14,16)}`)}return U` - `},Bt=(t,e)=>{let a=t.displayvalue,s="",i="",n="";if(""!==a){const e=ht(a);e instanceof Date&&e.getTime()==e.getTime()?(n=e.getUTCFullYear(),s=e.getUTCMonth()+1,i=e.getUTCDate()):8===t.displayvalue.length&&(n=t.displayvalue.substring(0,4),s=t.displayvalue.substring(4,6),i=t.displayvalue.substring(6,8)),a=e}return O` + `},Bt=(t,e)=>{let a=t.displayvalue,s="",i="",n="";if(""!==a){const e=ht(a);e instanceof Date&&e.getTime()==e.getTime()?(n=e.getUTCFullYear(),s=e.getUTCMonth()+1,i=e.getUTCDate()):8===t.displayvalue.length&&(n=t.displayvalue.substring(0,4),s=t.displayvalue.substring(4,6),i=t.displayvalue.substring(6,8)),a=e}return U`
    @@ -336,7 +336,7 @@ var $;v[f]=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions ?disabled="${t.disabledstate}" class="input-date-year govuk-input govuk-date-input__input govuk-input--width-4" value="${n}" id="${`${e}-year`}" name="${`${e}-year`}" type="text" pattern="[0-9]*" inputmode="numeric">
    -
    `},Ft=(t,e)=>{let a=t.displayvalue;if(""!==a){const e=ht(a);e instanceof Date&&e.getTime()==e.getTime()?a=`${dt(e.getUTCHours())}-${dt(e.getUTCMinutes())}-${dt(e.getUTCSeconds())}`:8===t.displayvalue.length&&(a=`${t.displayvalue.substring(9,10)}:${t.displayvalue.substring(10,11)}:${t.displayvalue.substring(11,12)}`)}return O` +
    `},Ft=(t,e)=>{let a=t.displayvalue;if(""!==a){const e=ht(a);e instanceof Date&&e.getTime()==e.getTime()?a=`${dt(e.getUTCHours())}-${dt(e.getUTCMinutes())}-${dt(e.getUTCSeconds())}`:8===t.displayvalue.length&&(a=`${t.displayvalue.substring(9,10)}:${t.displayvalue.substring(10,11)}:${t.displayvalue.substring(11,12)}`)}return U` - `},Wt=(t,e)=>t.options?O` + `},Wt=(t,e)=>t.options?U` - ${t.options.map((t=>O` + ${t.options.map((t=>U` `))} - `:null,Zt=()=>O` + `:null,Zt=()=>U` semantic link -`,Kt=(t,e)=>O`U``,Jt=()=>O` +/>`,Jt=()=>U` -`,Gt=(t,e)=>O` - ${t.map((t=>O` - ${i18n.t(t.config.label)}`))}${e?null:O``} -`,Xt=(t,e)=>{if(!e){const e=[];t.config.children[0].children.map(((t,a)=>(e[a]=t.config.value.replace("@P .",""),null)));const a=t.config.referenceList.replace("@P .","");return O` +`,Gt=(t,e)=>U` + ${t.map((t=>U` + ${i18n.t(t.config.label)}`))}${e?null:U``} +`,Xt=(t,e)=>{if(!e){const e=[];t.config.children[0].children.map(((t,a)=>(e[a]=t.config.value.replace("@P .",""),null)));const a=t.config.referenceList.replace("@P .","");return U`
    - `}return null},Yt=(t,e,a,s)=>{const i=t.config.referenceList.replace("@P .",""),n=t.config.children[0].children,o=vt(a.data.data.caseInfo.content,i);return o?O` - ${o.map(((t,o)=>O` + `}return null},Yt=(t,e,a,s)=>{const i=t.config.referenceList.replace("@P .",""),n=t.config.children[0].children,o=vt(a.data.data.caseInfo.content,i);return o?U` + ${o.map(((t,o)=>U` - ${n.map(((t,n)=>O` - ${Tt(t,e?void 0:`${s}-${o}-${n}`,e,a,`${i}(${o+1})`)}`))}${e?null:O``} `))} -`:null},Qt=(t,e,a,s,i)=>{if(void 0===t)return null;if(Array.isArray(t)&&1===t.length&&"View"===t[0].type&&(t=t[0]),!t.config||!t.config.template)return O`${t.map(((t,n)=>{const o=`${e}-${n}`;if("Region"===t.type)return Qt(t.children,`${e}-0`,!0,s,i);if("reference"===t.type&&"view"===t.config.type){let e="";if(t.config.context&&(e=t.config.context),t.config.inheritedProps&&1===t.config.inheritedProps.length&&"label"===t.config.inheritedProps[0].prop){const n=i18n.t(t.config.inheritedProps[0].value);let r=s.data.uiResources.resources.views[t.config.name];if(r){Array.isArray(r)&&1===r.length&&"View"===r[0].type&&(r=r[0]);const t="SimpleTable"===r.config.template||"ListView"===r.config.template?"field-table":"field-subview";return O`

    ${n}

    ${Qt(r,o,a,s,""===i?e.substring(1):i+e)}
    `}}return Qt(s.data.uiResources.resources.views[t.config.name],o,a,s,i&&""!==i?i+e:e.substring(1))}return Tt(t,o,a,s,i)}))}`;if("SimpleTable"===t.config.template)return((t,e,a,s)=>{const i=e||"Editable"!==t.config.renderMode;return O` +`:null},Qt=(t,e,a,s,i)=>{if(void 0===t)return null;if(Array.isArray(t)&&1===t.length&&"View"===t[0].type&&(t=t[0]),!t.config||!t.config.template)return U`${t.map(((t,n)=>{const o=`${e}-${n}`;if("Region"===t.type)return Qt(t.children,`${e}-0`,!0,s,i);if("reference"===t.type&&"view"===t.config.type){let e="";if(t.config.context&&(e=t.config.context),t.config.inheritedProps&&1===t.config.inheritedProps.length&&"label"===t.config.inheritedProps[0].prop){const n=i18n.t(t.config.inheritedProps[0].value);let r=s.data.uiResources.resources.views[t.config.name];if(r){Array.isArray(r)&&1===r.length&&"View"===r[0].type&&(r=r[0]);const t="SimpleTable"===r.config.template||"ListView"===r.config.template?"field-table":"field-subview";return U`

    ${n}

    ${Qt(r,o,a,s,""===i?e.substring(1):i+e)}
    `}}return Qt(s.data.uiResources.resources.views[t.config.name],o,a,s,i&&""!==i?i+e:e.substring(1))}return Tt(t,o,a,s,i)}))}`;if("SimpleTable"===t.config.template)return((t,e,a,s)=>{const i=e||"Editable"!==t.config.renderMode;return U` @@ -417,7 +417,7 @@ var $;v[f]=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions ${Yt(t,i,a,s)}
    ${t.config.name}
    - ${Xt(t,i)}`})(t,a,s,`${e}-table`);if("ListView"===t.config.template)return((t,e,a)=>(a.sendData("dataviews",{id:t.config.referenceList,content:{paging:{pageNumber:1,pageSize:41}}}),O` + ${Xt(t,i)}`})(t,a,s,`${e}-table`);if("ListView"===t.config.template)return((t,e,a)=>(a.sendData("dataviews",{id:t.config.referenceList,content:{paging:{pageNumber:1,pageSize:41}}}),U` @@ -427,28 +427,28 @@ var $;v[f]=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions ${Jt()} -
    ${t.config.name}
    `))(t,a,s);switch("DataReference"===t.config.template&&(s.isDeclarativeTarget=!0),"TwoColumn"===t.config.template&&1===t.children.length&&(t.config.template="OneColumn"),t.config.template){case"TwoColumn":return O` + `))(t,a,s);switch("DataReference"===t.config.template&&(s.isDeclarativeTarget=!0),"TwoColumn"===t.config.template&&1===t.children.length&&(t.config.template="OneColumn"),t.config.template){case"TwoColumn":return U`
    ${Qt(t.children[0].children,`${e}-0`,a,s,i)}
    ${Qt(t.children[1].children,`${e}-1`,a,s,i)}
    - `;case"DefaultForm":case"OneColumn":return O` + `;case"DefaultForm":case"OneColumn":return U`
    ${Qt(t.children[0].children,`${e}-0`,a,s,i)}
    - `;case"DataReference":return O` + `;case"DataReference":return U`
    ${Qt(t.children,`${e}-0`,a,s,i)}
    - `;case"Details":return O` + `;case"Details":return U`
    ${Qt(t.children[0].children,`${e}-0`,!0,s,i)}
    - `;default:return null}},te=(t,e,a,s)=>void 0===e.caseID&&a.content?O` + `;default:return null}},te=(t,e,a,s)=>void 0===e.caseID&&a.content?U`

    ${i18n.t(t)}

    - ${((t,e)=>t&&0!==t.length?O` + ${((t,e)=>t&&0!==t.length?U`

    ${i18n.t("Assignments")}

    @@ -463,7 +463,7 @@ var $;v[f]=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions - ${t.map((t=>O` + ${t.map((t=>U` ${t.name} ${t.urgency} @@ -474,45 +474,45 @@ var $;v[f]=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions `))} - `:null)(a.assignments,s)}`:""===t||void 0===e.caseID?"":O` + `:null)(a.assignments,s)}`:""===t||void 0===e.caseID?"":U`

    ${i18n.t(t)}

    -
    `,ee=(t,e,a,s,i)=>O` +
    `,ee=(t,e,a,s,i)=>U`
    ${Qt(t,e,!1,i,"")}
    - ${((t,e)=>O` + ${((t,e)=>U`
    - ${null!==t?O``:""} - ${null!==e?O``:""}
    `)(a,s)} -`,ae=(t,e,a,s)=>O` +`,ae=(t,e,a,s)=>U`
    ${Qt(t,e,!0,s)}
    - ${(t=>null===t?null:O` + ${(t=>null===t?null:U`
    - ${null!==t?O``:""}
    `)(a)} -`;class se extends Dt{displayContent(){if(this.bShowSave="false",""!==this.errorMsg)return t=this.errorMsg,"true"===this.bShowCancel&&this.resetError,O` +`;class se extends Dt{displayContent(){if(this.bShowSave="false",""!==this.errorMsg)return t=this.errorMsg,"true"===this.bShowCancel&&this.resetError,U` `;var t,e,a,s;if(("oauth2password"===this.authentication||"oauth2clientcredentials"===this.authentication)&&""===this.token)return this.sendData("authenticate",{}),null;if(this.casetypes||"createNewWork"!==this.action&&"workList"!==this.action?"createNewWork"===this.action&&""===this.caseID&&this.casetypes&&this.casetypes[this.casetype]?this.sendData("newwork",{id:this.casetype}):""===this.name&&("openAssignment"===this.action&&""===this.assignmentID&&(this.assignmentID=this.caseID),""!==this.assignmentID?this.fetchData("assignment",{id:this.assignmentID}):""!==this.caseID&&this.fetchData("view",{id:this.caseID,actionid:"pyReview"})):(this.fetchData("portal"),"createNewWork"===this.action?this.bShowNew=!0:"workList"===this.action&&(this.bShowCancel="true")),this.bShowConfirm){this.data.ID.split(" ")[1];return e=this.casedata.name,this.casepyStatusWork,"true"===this.bShowAttachments&&this.displayAttachments,O` +
    `;var t,e,a,s;if(("oauth2password"===this.authentication||"oauth2clientcredentials"===this.authentication)&&""===this.token)return this.sendData("authenticate",{}),null;if(this.casetypes||"createNewWork"!==this.action&&"workList"!==this.action?"createNewWork"===this.action&&""===this.caseID&&this.casetypes&&this.casetypes[this.casetype]?this.sendData("newwork",{id:this.casetype}):""===this.name&&("openAssignment"===this.action&&""===this.assignmentID&&(this.assignmentID=this.caseID),""!==this.assignmentID?this.fetchData("assignment",{id:this.assignmentID}):""!==this.caseID&&this.fetchData("view",{id:this.caseID,actionid:"pyReview"})):(this.fetchData("portal"),"createNewWork"===this.action?this.bShowNew=!0:"workList"===this.action&&(this.bShowCancel="true")),this.bShowConfirm){this.data.ID.split(" ")[1];return e=this.casedata.name,this.casepyStatusWork,"true"===this.bShowAttachments&&this.displayAttachments,U`

    ${i18n.t(e)}

    ${i18n.t("Thank you. Your information has been submitted.")}
    -
    `}return""!==this.caseID||""!==this.assignmentID||this.bShowNew?O` +
    `}return""!==this.caseID||""!==this.assignmentID||this.bShowNew?U` ${te(this.name,this.data,this.casedata,this.openCase)} - `:"workList"===this.action?(a=this.cases,s=this.openCase,O` + `:"workList"===this.action?(a=this.cases,s=this.openCase,U`

    ${i18n.t("My worklist")}

    - ${a.length>0?O` + ${a.length>0?U` @@ -523,7 +523,7 @@ var $;v[f]=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions - ${a.map((t=>O` + ${a.map((t=>U` @@ -536,30 +536,30 @@ var $;v[f]=!0,v.elementProperties=new Map,v.elementStyles=[],v.shadowRootOptions `))}
    ${i18n.t("My worklist")}
    ${i18n.t(t.name)} ${t.label}
    - `:O` + `:U`
    ${i18n.t("no assignments")}
    `} -
    `):null}renderMainLayout=(t,e)=>ee(t,e,"true"===this.bShowCancel?this.actionAreaCancel:null,"true"===this.bShowSave?this.actionAreaSave:null,this);renderReviewLayout=(t,e)=>ae(t,e,"true"===this.bShowCancel?this.actionAreaCancel:null,this);genPageValidationErrors=(t,e)=>((t,e)=>t.errorDetails?O``:null)(t,e);showDataList=t=>U` +${t.pxResults.map((t=>U` `))}`;genActionsList=(t,e)=>((t,e)=>{const a=[],s=Object.entries(e.actions);for(const e of s)e[1].name!==t&&a.push(O` + `))}`;genActionsList=(t,e)=>((t,e)=>{const a=[],s=Object.entries(e.actions);for(const e of s)e[1].name!==t&&a.push(U`
  • ${i18n.t(e[1].name)}
  • - `);return O` + `);return U` ${a} - `})(t,e);displayCasesTypes=()=>(t=>{const e=[],a=Object.entries(t);for(const t of a)e.push(O` + `})(t,e);displayCasesTypes=()=>(t=>{const e=[],a=Object.entries(t);for(const t of a)e.push(U`
  • ${i18n.t(t[1].name)}
  • - `);return O` + `);return U` ${e} - `})(this.casetypes);genLoadingIndicator=()=>Jt();validateForm=t=>{for(const e of t.elements)"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName&&"SELECT"!==e.tagName||(this.setInlineError(e,""),e.classList.remove("error-field"));return t.checkValidity()};setInlineError=(t,e)=>{let a=t.closest(".govuk-form-group");if(!a)return void t.classList.add("error-field");const s=t.getAttribute("data-ref");"govuk-date-input__item"===t.parentNode.parentNode.className&&(a=t.closest(".govuk-form-group").parentNode.parentNode.parentNode);const i=a.firstElementChild.nextElementSibling;if(null!==s&&"pyID"!==s&&""!==e)if(i&&"govuk-error-message"===i.className)i.lastElementChild.innerText=e;else{const t=document.createElement("span");t.className="govuk-error-message",t.innerHTML=`Error:${e}`,a.insertBefore(t,i),a.classList.add("govuk-form-group--error")}else i&&"govuk-error-message"===i.className&&a.removeChild(i),a.classList.remove("govuk-form-group--error")};reportFormValidity=t=>{for(const e of t.elements)"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName&&"SELECT"!==e.tagName||this.setInlineError(e,e.validationMessage)};clickHandler=t=>{let e=t.target;"path"===e.tagName&&(e=e.parentNode),"svg"===e.tagName&&(e=e.parentNode);const a=e.getAttribute("data-action-click");if(e.classList.contains("combobox")&&!e.classList.contains("loaded")&&this.getData(e.getAttribute("data-pageid"),e),mt(e,"click"))this.refreshAssignment(e,yt(e,"click")),t.preventDefault();else if("BUTTON"===e.tagName)if(t.preventDefault(),null!==e.getAttribute("data-submit")&&"save"!==e.getAttribute("data-submit"))this.submitForm(t,e.getAttribute("data-submit"));else if("addRow"===a||"deleteRow"===a){this.applyAction(e);const t=this.getRenderRoot().querySelector("#case-data");et(ee(this.data.uiResources.resources.views[this.casedata.content.pyViewName],"Obj","true"===this.bShowCancel?this.actionAreaCancel:null,"true"===this.bShowSave?this.actionAreaSave:null,this),t)}};changeHandler=t=>{let e=t.target;if(t.path&&t.path.length>0?e=t.path[0]:t.originalTarget&&(e=t.originalTarget),e.setCustomValidity(""),e.classList.remove("error-field"),mt(e,"change")||this.isDeclarativeTarget)this.refreshAssignment(e,yt(e,"change"));else if(this.refreshOnChange){const t=this.getRenderRoot().querySelector("#case-data");_t(t,this.content,this.pageInstructions,this.data.data.caseInfo.content),et(ee(this.data.uiResources.resources.views[this.casedata.content.pyViewName],"Obj","true"===this.bShowCancel?this.actionAreaCancel:null,"true"===this.bShowSave?this.actionAreaSave:null,this),t)}};keyupHandler=t=>{const e=t.target;"TEXTAREA"===e.tagName&&(e.style.cssText="height:auto; padding:0;",e.style.cssText=`height:${e.scrollHeight}px`)};focusHandler=t=>{const e=t.target;e.classList.contains("combobox")&&!e.classList.contains("loaded")?this.getData(e.getAttribute("data-pageid"),e):"INPUT"===e.tagName&&e.classList.contains("location")&&!e.classList.contains("pac-target-input")&&window.google&&window.google.maps&&window.google.maps.places&&new window.google.maps.places.Autocomplete(e)};async firstUpdated(){const t=this.getRenderRoot();t&&(t.addEventListener("click",this.clickHandler),t.addEventListener("focusin",this.focusHandler),t.addEventListener("change",this.changeHandler),t.addEventListener("keyup",this.keyupHandler))}}class ie extends se{createRenderRoot(){return this}getRenderRoot(){return this}render(){return O` + `})(this.casetypes);genLoadingIndicator=()=>Jt();validateForm=t=>{for(const e of t.elements)"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName&&"SELECT"!==e.tagName||(this.setInlineError(e,""),e.classList.remove("error-field"));return t.checkValidity()};setInlineError=(t,e)=>{let a=t.closest(".govuk-form-group");if(!a)return void t.classList.add("error-field");const s=t.getAttribute("data-ref");"govuk-date-input__item"===t.parentNode.parentNode.className&&(a=t.closest(".govuk-form-group").parentNode.parentNode.parentNode);const i=a.firstElementChild.nextElementSibling;if(null!==s&&"pyID"!==s&&""!==e)if(i&&"govuk-error-message"===i.className)i.lastElementChild.innerText=e;else{const t=document.createElement("span");t.className="govuk-error-message",t.innerHTML=`Error:${e}`,a.insertBefore(t,i),a.classList.add("govuk-form-group--error")}else i&&"govuk-error-message"===i.className&&a.removeChild(i),a.classList.remove("govuk-form-group--error")};reportFormValidity=t=>{for(const e of t.elements)"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName&&"SELECT"!==e.tagName||this.setInlineError(e,e.validationMessage)};clickHandler=t=>{let e=t.target;"path"===e.tagName&&(e=e.parentNode),"svg"===e.tagName&&(e=e.parentNode);const a=e.getAttribute("data-action-click");if(e.classList.contains("combobox")&&!e.classList.contains("loaded")&&this.getData(e.getAttribute("data-pageid"),e),mt(e,"click"))this.refreshAssignment(e,yt(e,"click")),t.preventDefault();else if("BUTTON"===e.tagName)if(t.preventDefault(),null!==e.getAttribute("data-submit")&&"save"!==e.getAttribute("data-submit"))this.submitForm(t,e.getAttribute("data-submit"));else if("addRow"===a||"deleteRow"===a){this.applyAction(e);const t=this.getRenderRoot().querySelector("#case-data");et(ee(this.data.uiResources.resources.views[this.casedata.content.pyViewName],"Obj","true"===this.bShowCancel?this.actionAreaCancel:null,"true"===this.bShowSave?this.actionAreaSave:null,this),t)}};changeHandler=t=>{let e=t.target;if(t.path&&t.path.length>0?e=t.path[0]:t.originalTarget&&(e=t.originalTarget),e.setCustomValidity(""),e.classList.remove("error-field"),mt(e,"change")||this.isDeclarativeTarget)this.refreshAssignment(e,yt(e,"change"));else if(this.refreshOnChange){const t=this.getRenderRoot().querySelector("#case-data");_t(t,this.content,this.pageInstructions,this.data.data.caseInfo.content),et(ee(this.data.uiResources.resources.views[this.casedata.content.pyViewName],"Obj","true"===this.bShowCancel?this.actionAreaCancel:null,"true"===this.bShowSave?this.actionAreaSave:null,this),t)}};keyupHandler=t=>{const e=t.target;"TEXTAREA"===e.tagName&&(e.style.cssText="height:auto; padding:0;",e.style.cssText=`height:${e.scrollHeight}px`)};focusHandler=t=>{const e=t.target;e.classList.contains("combobox")&&!e.classList.contains("loaded")?this.getData(e.getAttribute("data-pageid"),e):"INPUT"===e.tagName&&e.classList.contains("location")&&!e.classList.contains("pac-target-input")&&window.google&&window.google.maps&&window.google.maps.places&&new window.google.maps.places.Autocomplete(e)};async firstUpdated(){const t=this.getRenderRoot();t&&(t.addEventListener("click",this.clickHandler),t.addEventListener("focusin",this.focusHandler),t.addEventListener("change",this.changeHandler),t.addEventListener("keyup",this.keyupHandler))}}class ie extends se{createRenderRoot(){return this}getRenderRoot(){return this}render(){return U` ${this.displayContent()} `}}return customElements.define("pega-govuk",ie),t.PegaGovUK=ie,t}({}); diff --git a/docs/demos/uswds/pega-govus.js b/docs/demos/uswds/pega-govus.js index eb1dbdc..5298156 100644 --- a/docs/demos/uswds/pega-govus.js +++ b/docs/demos/uswds/pega-govus.js @@ -34,7 +34,7 @@ var m;$[f]=!0,$.elementProperties=new Map,$.elementStyles=[],$.shadowRootOptions `,ct=()=>O` -`,dt=t=>`0${t}`.slice(-2),ut=t=>`0${t}`.slice(-4),ht=t=>{if(t.endsWith(" GMT")&&23===t.length)return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T${t.substring(9,11)}:${t.substring(11,13)}:${t.substring(13,19)}Z`);if(8===t.length){return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T00:00:00.000Z`)}if(10===t.length){return new Date(`${t.substring(6,10)}-${t.substring(0,2)}-${t.substring(3,5)}T00:00:00.000Z`)}return null},pt=t=>t&&"string"==typeof t?t.replace(/&|<|>|'|(|)|"/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",""":'"'}[t]||t))):"",gt=(t,e,a,s,i)=>{if("string"!=typeof e)return;if(s){const t=$t(s,e);if(t===i||`${t}`==`${i}`||null===t&&""===i)return;ft(s,e,i)}const n=e.lastIndexOf(".");if(-1===n)return void(t[e]=i);if(!a)return void ft(t,e,i);const r={};let o=e.substring(0,n);const l=o.lastIndexOf("(");if(-1===l)r[e.substring(n+1)]=i,a.push({instruction:"UPDATE",target:o,content:r});else{const t=o.lastIndexOf(")"),s=o.substring(l+1,t);o=o.substring(0,l),ft(r,e.substring(t+2),i),a.push({instruction:"UPDATE",target:o,listIndex:parseInt(s,10),content:r})}},ft=(t,e,a)=>{if("string"!=typeof e)return;const s=e.split(".");let i=t;for(const t in s){let e=s[t];const n=e.indexOf("(");if(-1===n)t{if("string"!=typeof e||""===e)return null;let a=e;0===e.indexOf(".")&&(a=e.substring(1));let s=t;const i=a.split(".");for(const t in i){const e=i[t],a=e.indexOf("(");if(-1===a){if(void 0===s[e])return null;s=s[e]}else{const t=e.substring(a+1,e.length-1),i=s[e.substring(0,a)];if(!(i&&Array.isArray(i)&&i.length>=t))return null;s=i[t-1]}}return s},mt=t=>{for(const e in t)"object"==typeof t[e]?mt(t[e]):"string"==typeof t[e]&&(t[e]="")},yt=(t,e)=>{const a=t.getAttribute(`data-action-${e}`);return!(!a||"postValue"!==a&&0!==a.indexOf("refresh"))},vt=(t,e)=>{const a=t.getAttribute(`data-action-${e}`);return a&&0===a.indexOf("refresh")?a.replace("refresh-",""):""};function bt(t,e,a){try{switch(e){case">":return parseInt(t,10)>parseInt(a,10);case"<":return parseInt(t,10)=":return parseInt(t,10)>=parseInt(a,10);case"<=":return parseInt(t,10)<=parseInt(a,10);case"==":return`${t}`==`${a}`;case"!=":return`${t}`!=`${a}`}}catch(t){}return!1}const Ct=(t,e,a)=>{const s=t.replace("@E ","").split("&&");for(const t in s){const i=s[t].trim().match(/[\w.]+|[><=!]+|'[^']+'/g);if(3===i.length){const t=""===a?e[i[0].substring(1)]:$t(e,a+i[0]);if(void 0!==t&&!bt(t,i[1],i[2].replace(/^'|'$/g,"")))return!1}}return!0},wt=(t,e,a,s)=>{for(const i of t.elements)if("INPUT"===i.tagName||"TEXTAREA"===i.tagName||"SELECT"===i.tagName){const t=i.getAttribute("data-ref");if(null!==t&&"pyID"!==t)if("INPUT"===i.tagName){const n=i.getAttribute("type");if(i.classList.contains("input-date-day")||i.classList.contains("input-date-month")||i.classList.contains("input-date-year")){if(i.classList.contains("input-date-day")){const n=i.closest(".input-date").parentNode,r=n.querySelector(".input-date-month"),o=n.querySelector(".input-date-year");if(null!==r&&null!==o&&""!==i.value&&""!==r.value&&""!==o.value){const n=`${dt(r.value)}/${dt(i.value)}/${ut(o.value)}`;gt(e,t,a,s,n)}}}else if("checkbox"===n)gt(e,t,a,s,i.checked);else if("radio"===n)i.checked&>(e,t,a,s,i.value);else if("tel"===n){let n=i.value;"SELECT"===i.parentNode.firstElementChild.tagName&&"field-countrycode"===i.parentNode.firstElementChild.className&&(n=i.parentNode.firstElementChild.value+n),gt(e,t,a,s,n)}else if("date"===n){let n;i.valueAsDate&&(n=new Date(i.valueAsDate)),n&&n instanceof Date&&n.getTime()==n.getTime()||(n=new Date(i.value)),n&&n instanceof Date&&n.getTime()==n.getTime()?gt(e,t,a,s,`${n.getUTCFullYear()}-${dt(n.getUTCMonth()+1)}-${dt(n.getUTCDate())}`):gt(e,t,a,s,i.value)}else gt(e,t,a,s,i.value)}else gt(e,t,a,s,i.value)}if(t&&t.querySelectorAll){const n=t.querySelectorAll("[contenteditable]");for(let t=0;t'"]/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",'"':"""}[t]||t))):"")}}var i},_t=(t,e,a,s,i)=>{if(null==s)return null;let n;const r=`${Math.random().toString(36).substr(2,9)}`,o=document.createElement("ul");o.setAttribute("id",`menu-overlay-${r}`),o.setAttribute("role","menu"),o.setAttribute("aria-labelledby",`menubutton-${r}`),o.setAttribute("tabindex","-1");const l=()=>{document.body.removeEventListener("click",d),document.body.removeEventListener("keydown",c),o&&(o.previousElementSibling&&(o.previousElementSibling.setAttribute("aria-expanded","false"),o.previousElementSibling.focus()),o.remove())},c=t=>{38===t.keyCode?(n=n.previousElementSibling,null===n&&(n=o.lastElementChild),n.focus()):40===t.keyCode?(n=n.nextElementSibling,null===n&&(n=o.firstElementChild),n.focus()):27===t.keyCode||9===t.keyCode?l():13===t.keyCode&&(s(t),l())},d=t=>{if(t){let e=t.target;if(t.path&&t.path.length>0?e=t.path[0]:t.originalTarget&&(e=t.originalTarget),e&&e.nextElementSibling===o)return;e.parentNode===o&&s(t),l()}},u=t=>{if("keydown"===t.type&&40!==t.keyCode)return;if(t.preventDefault(),t.stopPropagation(),"blur"===t.type)return void d(t);const e=t.currentTarget;"BUTTON"!==e.tagName?(s(t),l()):null===e.nextElementSibling?(e.parentNode.appendChild(o),e.setAttribute("aria-expanded","true"),et(a(),o),n=e.nextElementSibling.firstElementChild,n.focus(),document.body.addEventListener("click",d),document.body.addEventListener("keydown",c)):l()};return O` +`,dt=t=>`0${t}`.slice(-2),ut=t=>`0${t}`.slice(-4),ht=t=>{if(t.endsWith(" GMT")&&23===t.length)return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T${t.substring(9,11)}:${t.substring(11,13)}:${t.substring(13,19)}Z`);if(8===t.length){return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T00:00:00.000Z`)}if(10===t.length&&2===t.indexOf("/")){return new Date(`${t.substring(6,10)}-${t.substring(0,2)}-${t.substring(3,5)}T00:00:00.000Z`)}if(10===t.length&&4===t.indexOf("-")){return new Date(`${t}T00:00:00.000Z`)}return null},pt=t=>t&&"string"==typeof t?t.replace(/&|<|>|'|(|)|"/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",""":'"'}[t]||t))):"",gt=(t,e,a,s,i)=>{if("string"!=typeof e)return;if(s){const t=$t(s,e);if(t===i||`${t}`==`${i}`||null===t&&""===i)return;ft(s,e,i)}const n=e.lastIndexOf(".");if(-1===n)return void(t[e]=i);if(!a)return void ft(t,e,i);const r={};let o=e.substring(0,n);const l=o.lastIndexOf("(");if(-1===l)r[e.substring(n+1)]=i,a.push({instruction:"UPDATE",target:o,content:r});else{const t=o.lastIndexOf(")"),s=o.substring(l+1,t);o=o.substring(0,l),ft(r,e.substring(t+2),i),a.push({instruction:"UPDATE",target:o,listIndex:parseInt(s,10),content:r})}},ft=(t,e,a)=>{if("string"!=typeof e)return;const s=e.split(".");let i=t;for(const t in s){let e=s[t];const n=e.indexOf("(");if(-1===n)t{if("string"!=typeof e||""===e)return null;let a=e;0===e.indexOf(".")&&(a=e.substring(1));let s=t;const i=a.split(".");for(const t in i){const e=i[t],a=e.indexOf("(");if(-1===a){if(void 0===s[e])return null;s=s[e]}else{const t=e.substring(a+1,e.length-1),i=s[e.substring(0,a)];if(!(i&&Array.isArray(i)&&i.length>=t))return null;s=i[t-1]}}return s},mt=t=>{for(const e in t)"object"==typeof t[e]?mt(t[e]):"string"==typeof t[e]&&(t[e]="")},yt=(t,e)=>{const a=t.getAttribute(`data-action-${e}`);return!(!a||"postValue"!==a&&0!==a.indexOf("refresh"))},vt=(t,e)=>{const a=t.getAttribute(`data-action-${e}`);return a&&0===a.indexOf("refresh")?a.replace("refresh-",""):""};function bt(t,e,a){try{switch(e){case">":return parseInt(t,10)>parseInt(a,10);case"<":return parseInt(t,10)=":return parseInt(t,10)>=parseInt(a,10);case"<=":return parseInt(t,10)<=parseInt(a,10);case"==":return`${t}`==`${a}`;case"!=":return`${t}`!=`${a}`}}catch(t){}return!1}const Ct=(t,e,a)=>{const s=t.replace("@E ","").split("&&");for(const t in s){const i=s[t].trim().match(/[\w.]+|[><=!]+|'[^']+'/g);if(3===i.length){const t=""===a?e[i[0].substring(1)]:$t(e,a+i[0]);if(void 0!==t&&!bt(t,i[1],i[2].replace(/^'|'$/g,"")))return!1}}return!0},wt=(t,e,a,s)=>{for(const i of t.elements)if("INPUT"===i.tagName||"TEXTAREA"===i.tagName||"SELECT"===i.tagName){const t=i.getAttribute("data-ref");if(null!==t&&"pyID"!==t)if("INPUT"===i.tagName){const n=i.getAttribute("type");if(i.classList.contains("input-date-day")||i.classList.contains("input-date-month")||i.classList.contains("input-date-year")){if(i.classList.contains("input-date-day")){const n=i.closest(".input-date").parentNode,r=n.querySelector(".input-date-month"),o=n.querySelector(".input-date-year");if(null!==r&&null!==o&&""!==i.value&&""!==r.value&&""!==o.value){const n=`${dt(r.value)}/${dt(i.value)}/${ut(o.value)}`;gt(e,t,a,s,n)}}}else if("checkbox"===n)gt(e,t,a,s,i.checked);else if("radio"===n)i.checked&>(e,t,a,s,i.value);else if("tel"===n){let n=i.value;"SELECT"===i.parentNode.firstElementChild.tagName&&"field-countrycode"===i.parentNode.firstElementChild.className&&(n=i.parentNode.firstElementChild.value+n),gt(e,t,a,s,n)}else if("date"===n){let n;i.valueAsDate&&(n=new Date(i.valueAsDate)),n&&n instanceof Date&&n.getTime()==n.getTime()||(n=new Date(i.value)),n&&n instanceof Date&&n.getTime()==n.getTime()?gt(e,t,a,s,`${n.getUTCFullYear()}-${dt(n.getUTCMonth()+1)}-${dt(n.getUTCDate())}`):gt(e,t,a,s,i.value)}else gt(e,t,a,s,i.value)}else gt(e,t,a,s,i.value)}if(t&&t.querySelectorAll){const n=t.querySelectorAll("[contenteditable]");for(let t=0;t'"]/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",'"':"""}[t]||t))):"")}}var i},_t=(t,e,a,s,i)=>{if(null==s)return null;let n;const r=`${Math.random().toString(36).substr(2,9)}`,o=document.createElement("ul");o.setAttribute("id",`menu-overlay-${r}`),o.setAttribute("role","menu"),o.setAttribute("aria-labelledby",`menubutton-${r}`),o.setAttribute("tabindex","-1");const l=()=>{document.body.removeEventListener("click",d),document.body.removeEventListener("keydown",c),o&&(o.previousElementSibling&&(o.previousElementSibling.setAttribute("aria-expanded","false"),o.previousElementSibling.focus()),o.remove())},c=t=>{38===t.keyCode?(n=n.previousElementSibling,null===n&&(n=o.lastElementChild),n.focus()):40===t.keyCode?(n=n.nextElementSibling,null===n&&(n=o.firstElementChild),n.focus()):27===t.keyCode||9===t.keyCode?l():13===t.keyCode&&(s(t),l())},d=t=>{if(t){let e=t.target;if(t.path&&t.path.length>0?e=t.path[0]:t.originalTarget&&(e=t.originalTarget),e&&e.nextElementSibling===o)return;e.parentNode===o&&s(t),l()}},u=t=>{if("keydown"===t.type&&40!==t.keyCode)return;if(t.preventDefault(),t.stopPropagation(),"blur"===t.type)return void d(t);const e=t.currentTarget;"BUTTON"!==e.tagName?(s(t),l()):null===e.nextElementSibling?(e.parentNode.appendChild(o),e.setAttribute("aria-expanded","true"),et(a(),o),n=e.nextElementSibling.firstElementChild,n.focus(),document.body.addEventListener("click",d),document.body.addEventListener("keydown",c)):l()};return O`
    -
    `},ut=t=>`0${t}`.slice(-2),pt=t=>`0${t}`.slice(-4),gt=t=>{if(t.endsWith(" GMT")&&23===t.length)return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T${t.substring(9,11)}:${t.substring(11,13)}:${t.substring(13,19)}Z`);if(8===t.length){return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T00:00:00.000Z`)}if(10===t.length){return new Date(`${t.substring(6,10)}-${t.substring(0,2)}-${t.substring(3,5)}T00:00:00.000Z`)}return null},mt=t=>t&&"string"==typeof t?t.replace(/&|<|>|'|(|)|"/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",""":'"'}[t]||t))):"",$t=(t,e,a,i,s)=>{if("string"!=typeof e)return;if(i){const t=vt(i,e);if(t===s||`${t}`==`${s}`||null===t&&""===s)return;ft(i,e,s)}const n=e.lastIndexOf(".");if(-1===n)return void(t[e]=s);if(!a)return void ft(t,e,s);const r={};let o=e.substring(0,n);const l=o.lastIndexOf("(");if(-1===l)r[e.substring(n+1)]=s,a.push({instruction:"UPDATE",target:o,content:r});else{const t=o.lastIndexOf(")"),i=o.substring(l+1,t);o=o.substring(0,l),ft(r,e.substring(t+2),s),a.push({instruction:"UPDATE",target:o,listIndex:parseInt(i,10),content:r})}},ft=(t,e,a)=>{if("string"!=typeof e)return;const i=e.split(".");let s=t;for(const t in i){let e=i[t];const n=e.indexOf("(");if(-1===n)t{if("string"!=typeof e||""===e)return null;let a=e;0===e.indexOf(".")&&(a=e.substring(1));let i=t;const s=a.split(".");for(const t in s){const e=s[t],a=e.indexOf("(");if(-1===a){if(void 0===i[e])return null;i=i[e]}else{const t=e.substring(a+1,e.length-1),s=i[e.substring(0,a)];if(!(s&&Array.isArray(s)&&s.length>=t))return null;i=s[t-1]}}return i},bt=t=>{for(const e in t)"object"==typeof t[e]?bt(t[e]):"string"==typeof t[e]&&(t[e]="")},yt=(t,e)=>{for(const a in t)if("fieldID"===a)e.push(t.fieldID);else{const i=t[a];i.fieldID?e.push(i.fieldID):"object"==typeof i&&yt(i,e)}},Ct=(t,e)=>{const a=t.getAttribute(`data-action-${e}`);return!(!a||"postValue"!==a&&0!==a.indexOf("refresh"))},wt=(t,e)=>{const a=t.getAttribute(`data-action-${e}`);return a&&0===a.indexOf("refresh")?a.replace("refresh-",""):""},At=(t,e,a,i)=>{for(const s of t.elements)if("INPUT"===s.tagName||"TEXTAREA"===s.tagName||"SELECT"===s.tagName){const t=s.getAttribute("data-ref");if(null!==t&&"pyID"!==t)if("INPUT"===s.tagName){const n=s.getAttribute("type");if(s.classList.contains("input-date-day")||s.classList.contains("input-date-month")||s.classList.contains("input-date-year")){if(s.classList.contains("input-date-day")){const n=s.closest(".input-date").parentNode,r=n.querySelector(".input-date-month"),o=n.querySelector(".input-date-year");if(null!==r&&null!==o&&""!==s.value&&""!==r.value&&""!==o.value){const n=`${ut(r.value)}/${ut(s.value)}/${pt(o.value)}`;$t(e,t,a,i,n)}}}else if("checkbox"===n)$t(e,t,a,i,s.checked);else if("radio"===n)s.checked&&$t(e,t,a,i,s.value);else if("tel"===n){let n=s.value;"SELECT"===s.parentNode.firstElementChild.tagName&&"field-countrycode"===s.parentNode.firstElementChild.className&&(n=s.parentNode.firstElementChild.value+n),$t(e,t,a,i,n)}else if("date"===n){let n;s.valueAsDate&&(n=new Date(s.valueAsDate)),n&&n instanceof Date&&n.getTime()==n.getTime()||(n=new Date(s.value)),n&&n instanceof Date&&n.getTime()==n.getTime()?$t(e,t,a,i,`${n.getUTCFullYear()}-${ut(n.getUTCMonth()+1)}-${ut(n.getUTCDate())}`):$t(e,t,a,i,s.value)}else $t(e,t,a,i,s.value)}else $t(e,t,a,i,s.value)}if(t&&t.querySelectorAll){const n=t.querySelectorAll("[contenteditable]");for(let t=0;t'"]/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",'"':"""}[t]||t))):"")}}var s},Dt=(t,e,a)=>{for(const i of t.elements)if("INPUT"===i.tagName||"TEXTAREA"===i.tagName||"SELECT"===i.tagName){const t=`.${i.getAttribute("data-ref")}`;if(null!==t&&"pyID"!==t)for(const s in e){if(e[s].Path===t){a.setInlineError(i,e[s].ValidationMessage);break}if(e[s].erroneousInputOutputFieldInPage===t){a.setInlineError(i,e[s].localizedValue);break}}}},kt=(t,e,a,i,s)=>{if(null==i)return null;let n;const r=`${Math.random().toString(36).substr(2,9)}`,o=document.createElement("ul");o.setAttribute("id",`menu-overlay-${r}`),o.setAttribute("role","menu"),o.setAttribute("aria-labelledby",`menubutton-${r}`),o.setAttribute("tabindex","-1");const l=()=>{document.body.removeEventListener("click",d),document.body.removeEventListener("keydown",c),o&&(o.previousElementSibling&&(o.previousElementSibling.setAttribute("aria-expanded","false"),o.previousElementSibling.focus()),o.remove())},c=t=>{38===t.keyCode?(n=n.previousElementSibling,null===n&&(n=o.lastElementChild),n.focus()):40===t.keyCode?(n=n.nextElementSibling,null===n&&(n=o.firstElementChild),n.focus()):27===t.keyCode||9===t.keyCode?l():13===t.keyCode&&(i(t),l())},d=t=>{if(t){let e=t.target;if(t.path&&t.path.length>0?e=t.path[0]:t.originalTarget&&(e=t.originalTarget),e&&e.nextElementSibling===o)return;e.parentNode===o&&i(t),l()}},h=t=>{if("keydown"===t.type&&40!==t.keyCode)return;if(t.preventDefault(),t.stopPropagation(),"blur"===t.type)return void d(t);const e=t.currentTarget;"BUTTON"!==e.tagName?(i(t),l()):null===e.nextElementSibling?(e.parentNode.appendChild(o),e.setAttribute("aria-expanded","true"),et(a(),o),n=e.nextElementSibling.firstElementChild,n.focus(),document.body.addEventListener("click",d),document.body.addEventListener("keydown",c)):l()};return P` + `},ut=t=>`0${t}`.slice(-2),pt=t=>`0${t}`.slice(-4),gt=t=>{if(t.endsWith(" GMT")&&23===t.length)return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T${t.substring(9,11)}:${t.substring(11,13)}:${t.substring(13,19)}Z`);if(8===t.length){return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T00:00:00.000Z`)}if(10===t.length&&2===t.indexOf("/")){return new Date(`${t.substring(6,10)}-${t.substring(0,2)}-${t.substring(3,5)}T00:00:00.000Z`)}if(10===t.length&&4===t.indexOf("-")){return new Date(`${t}T00:00:00.000Z`)}return null},mt=t=>t&&"string"==typeof t?t.replace(/&|<|>|'|(|)|"/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",""":'"'}[t]||t))):"",$t=(t,e,a,i,s)=>{if("string"!=typeof e)return;if(i){const t=vt(i,e);if(t===s||`${t}`==`${s}`||null===t&&""===s)return;ft(i,e,s)}const n=e.lastIndexOf(".");if(-1===n)return void(t[e]=s);if(!a)return void ft(t,e,s);const r={};let o=e.substring(0,n);const l=o.lastIndexOf("(");if(-1===l)r[e.substring(n+1)]=s,a.push({instruction:"UPDATE",target:o,content:r});else{const t=o.lastIndexOf(")"),i=o.substring(l+1,t);o=o.substring(0,l),ft(r,e.substring(t+2),s),a.push({instruction:"UPDATE",target:o,listIndex:parseInt(i,10),content:r})}},ft=(t,e,a)=>{if("string"!=typeof e)return;const i=e.split(".");let s=t;for(const t in i){let e=i[t];const n=e.indexOf("(");if(-1===n)t{if("string"!=typeof e||""===e)return null;let a=e;0===e.indexOf(".")&&(a=e.substring(1));let i=t;const s=a.split(".");for(const t in s){const e=s[t],a=e.indexOf("(");if(-1===a){if(void 0===i[e])return null;i=i[e]}else{const t=e.substring(a+1,e.length-1),s=i[e.substring(0,a)];if(!(s&&Array.isArray(s)&&s.length>=t))return null;i=s[t-1]}}return i},bt=t=>{for(const e in t)"object"==typeof t[e]?bt(t[e]):"string"==typeof t[e]&&(t[e]="")},yt=(t,e)=>{for(const a in t)if("fieldID"===a)e.push(t.fieldID);else{const i=t[a];i.fieldID?e.push(i.fieldID):"object"==typeof i&&yt(i,e)}},Ct=(t,e)=>{const a=t.getAttribute(`data-action-${e}`);return!(!a||"postValue"!==a&&0!==a.indexOf("refresh"))},wt=(t,e)=>{const a=t.getAttribute(`data-action-${e}`);return a&&0===a.indexOf("refresh")?a.replace("refresh-",""):""},At=(t,e,a,i)=>{for(const s of t.elements)if("INPUT"===s.tagName||"TEXTAREA"===s.tagName||"SELECT"===s.tagName){const t=s.getAttribute("data-ref");if(null!==t&&"pyID"!==t)if("INPUT"===s.tagName){const n=s.getAttribute("type");if(s.classList.contains("input-date-day")||s.classList.contains("input-date-month")||s.classList.contains("input-date-year")){if(s.classList.contains("input-date-day")){const n=s.closest(".input-date").parentNode,r=n.querySelector(".input-date-month"),o=n.querySelector(".input-date-year");if(null!==r&&null!==o&&""!==s.value&&""!==r.value&&""!==o.value){const n=`${ut(r.value)}/${ut(s.value)}/${pt(o.value)}`;$t(e,t,a,i,n)}}}else if("checkbox"===n)$t(e,t,a,i,s.checked);else if("radio"===n)s.checked&&$t(e,t,a,i,s.value);else if("tel"===n){let n=s.value;"SELECT"===s.parentNode.firstElementChild.tagName&&"field-countrycode"===s.parentNode.firstElementChild.className&&(n=s.parentNode.firstElementChild.value+n),$t(e,t,a,i,n)}else if("date"===n){let n;s.valueAsDate&&(n=new Date(s.valueAsDate)),n&&n instanceof Date&&n.getTime()==n.getTime()||(n=new Date(s.value)),n&&n instanceof Date&&n.getTime()==n.getTime()?$t(e,t,a,i,`${n.getUTCFullYear()}-${ut(n.getUTCMonth()+1)}-${ut(n.getUTCDate())}`):$t(e,t,a,i,s.value)}else $t(e,t,a,i,s.value)}else $t(e,t,a,i,s.value)}if(t&&t.querySelectorAll){const n=t.querySelectorAll("[contenteditable]");for(let t=0;t'"]/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",'"':"""}[t]||t))):"")}}var s},Dt=(t,e,a)=>{for(const i of t.elements)if("INPUT"===i.tagName||"TEXTAREA"===i.tagName||"SELECT"===i.tagName){const t=`.${i.getAttribute("data-ref")}`;if(null!==t&&"pyID"!==t)for(const s in e){if(e[s].Path===t){a.setInlineError(i,e[s].ValidationMessage);break}if(e[s].erroneousInputOutputFieldInPage===t){a.setInlineError(i,e[s].localizedValue);break}}}},kt=(t,e,a,i,s)=>{if(null==i)return null;let n;const r=`${Math.random().toString(36).substr(2,9)}`,o=document.createElement("ul");o.setAttribute("id",`menu-overlay-${r}`),o.setAttribute("role","menu"),o.setAttribute("aria-labelledby",`menubutton-${r}`),o.setAttribute("tabindex","-1");const l=()=>{document.body.removeEventListener("click",d),document.body.removeEventListener("keydown",c),o&&(o.previousElementSibling&&(o.previousElementSibling.setAttribute("aria-expanded","false"),o.previousElementSibling.focus()),o.remove())},c=t=>{38===t.keyCode?(n=n.previousElementSibling,null===n&&(n=o.lastElementChild),n.focus()):40===t.keyCode?(n=n.nextElementSibling,null===n&&(n=o.firstElementChild),n.focus()):27===t.keyCode||9===t.keyCode?l():13===t.keyCode&&(i(t),l())},d=t=>{if(t){let e=t.target;if(t.path&&t.path.length>0?e=t.path[0]:t.originalTarget&&(e=t.originalTarget),e&&e.nextElementSibling===o)return;e.parentNode===o&&i(t),l()}},h=t=>{if("keydown"===t.type&&40!==t.keyCode)return;if(t.preventDefault(),t.stopPropagation(),"blur"===t.type)return void d(t);const e=t.currentTarget;"BUTTON"!==e.tagName?(i(t),l()):null===e.nextElementSibling?(e.parentNode.appendChild(o),e.setAttribute("aria-expanded","true"),et(a(),o),n=e.nextElementSibling.firstElementChild,n.focus(),document.body.addEventListener("click",d),document.body.addEventListener("keydown",c)):l()};return P`
    -
    `},ut=t=>`0${t}`.slice(-2),pt=t=>`0${t}`.slice(-4),gt=t=>{if(t.endsWith(" GMT")&&23===t.length)return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T${t.substring(9,11)}:${t.substring(11,13)}:${t.substring(13,19)}Z`);if(8===t.length){return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T00:00:00.000Z`)}if(10===t.length){return new Date(`${t.substring(6,10)}-${t.substring(0,2)}-${t.substring(3,5)}T00:00:00.000Z`)}return null},ft=t=>t&&"string"==typeof t?t.replace(/&|<|>|'|(|)|"/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",""":'"'}[t]||t))):"",mt=(t,e,a,i,n)=>{if("string"!=typeof e)return;if(i){const t=vt(i,e);if(t===n||`${t}`==`${n}`||null===t&&""===n)return;bt(i,e,n)}const s=e.lastIndexOf(".");if(-1===s)return void(t[e]=n);if(!a)return void bt(t,e,n);const o={};let r=e.substring(0,s);const l=r.lastIndexOf("(");if(-1===l)o[e.substring(s+1)]=n,a.push({instruction:"UPDATE",target:r,content:o});else{const t=r.lastIndexOf(")"),i=r.substring(l+1,t);r=r.substring(0,l),bt(o,e.substring(t+2),n),a.push({instruction:"UPDATE",target:r,listIndex:parseInt(i,10),content:o})}},bt=(t,e,a)=>{if("string"!=typeof e)return;const i=e.split(".");let n=t;for(const t in i){let e=i[t];const s=e.indexOf("(");if(-1===s)t{if("string"!=typeof e||""===e)return null;let a=e;0===e.indexOf(".")&&(a=e.substring(1));let i=t;const n=a.split(".");for(const t in n){const e=n[t],a=e.indexOf("(");if(-1===a){if(void 0===i[e])return null;i=i[e]}else{const t=e.substring(a+1,e.length-1),n=i[e.substring(0,a)];if(!(n&&Array.isArray(n)&&n.length>=t))return null;i=n[t-1]}}return i},$t=t=>{for(const e in t)"object"==typeof t[e]?$t(t[e]):"string"==typeof t[e]&&(t[e]="")},yt=(t,e)=>{for(const a in t)if("fieldID"===a)e.push(t.fieldID);else{const i=t[a];i.fieldID?e.push(i.fieldID):"object"==typeof i&&yt(i,e)}},xt=(t,e,a)=>{let i=vt(t,e);if(null===i&&(i=[],bt(t,e,i)),!Array.isArray(i))return null;if(a&&"string"==typeof a){const t={},n=a.split(",");for(const e in n)t[n[e]]="";return i.push(t),{instruction:"APPEND",target:e,content:t}}if(0===i.length)return null;const n={...i[0]};return $t(n),i.push(n),{instruction:"APPEND",target:e,content:n}},wt=(t,e)=>{let a,i=e;-1!==e.indexOf(").pyTemplate")&&(a=parseInt(i.substring(e.lastIndexOf("(")+1,e.lastIndexOf(")")),10),i=i.substring(0,e.lastIndexOf("(")));const n=vt(t,i);if(!Array.isArray(n))return null;if(1===n.length){for(const t in n[0])"pxObjClass"!==t&&(n[0][t]="");return null}return a?n.length{const a=t.getAttribute(`data-action-${e}`);return!(!a||"postValue"!==a&&0!==a.indexOf("refresh"))},Dt=(t,e)=>{const a=t.getAttribute(`data-action-${e}`);return a&&0===a.indexOf("refresh")?a.replace("refresh-",""):""};function kt(t,e,a){try{switch(e){case">":return parseInt(t,10)>parseInt(a,10);case"<":return parseInt(t,10)=":return parseInt(t,10)>=parseInt(a,10);case"<=":return parseInt(t,10)<=parseInt(a,10);case"==":return`${t}`==`${a}`;case"!=":return`${t}`!=`${a}`}}catch(t){}return!1}const At=(t,e,a)=>{const i=t.replace("@E ","").split("&&");for(const t in i){const n=i[t].trim().match(/[\w.]+|[><=!]+|'[^']+'/g);if(3===n.length){const t=""===a?e[n[0].substring(1)]:vt(e,a+n[0]);if(void 0!==t&&!kt(t,n[1],n[2].replace(/^'|'$/g,"")))return!1}}return!0},It=(t,e,a,i)=>{for(const n of t.elements)if("INPUT"===n.tagName||"TEXTAREA"===n.tagName||"SELECT"===n.tagName){const t=n.getAttribute("data-ref");if(null!==t&&"pyID"!==t)if("INPUT"===n.tagName){const s=n.getAttribute("type");if(n.classList.contains("input-date-day")||n.classList.contains("input-date-month")||n.classList.contains("input-date-year")){if(n.classList.contains("input-date-day")){const s=n.closest(".input-date").parentNode,o=s.querySelector(".input-date-month"),r=s.querySelector(".input-date-year");if(null!==o&&null!==r&&""!==n.value&&""!==o.value&&""!==r.value){const s=`${ut(o.value)}/${ut(n.value)}/${pt(r.value)}`;mt(e,t,a,i,s)}}}else if("checkbox"===s)mt(e,t,a,i,n.checked);else if("radio"===s)n.checked&&mt(e,t,a,i,n.value);else if("tel"===s){let s=n.value;"SELECT"===n.parentNode.firstElementChild.tagName&&"field-countrycode"===n.parentNode.firstElementChild.className&&(s=n.parentNode.firstElementChild.value+s),mt(e,t,a,i,s)}else if("date"===s){let s;n.valueAsDate&&(s=new Date(n.valueAsDate)),s&&s instanceof Date&&s.getTime()==s.getTime()||(s=new Date(n.value)),s&&s instanceof Date&&s.getTime()==s.getTime()?mt(e,t,a,i,`${s.getUTCFullYear()}-${ut(s.getUTCMonth()+1)}-${ut(s.getUTCDate())}`):mt(e,t,a,i,n.value)}else mt(e,t,a,i,n.value)}else mt(e,t,a,i,n.value)}if(t&&t.querySelectorAll){const s=t.querySelectorAll("[contenteditable]");for(let t=0;t'"]/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",'"':"""}[t]||t))):"")}}var n},_t=(t,e,a)=>{for(const i of t.elements)if("INPUT"===i.tagName||"TEXTAREA"===i.tagName||"SELECT"===i.tagName){const t=`.${i.getAttribute("data-ref")}`;if(null!==t&&"pyID"!==t)for(const n in e){if(e[n].Path===t){a.setInlineError(i,e[n].ValidationMessage);break}if(e[n].erroneousInputOutputFieldInPage===t){a.setInlineError(i,e[n].localizedValue);break}}}},St=(t,e)=>{const a=e||[],i={};for(const[e,n]of Object.entries(t))if("string"==typeof n||"boolean"==typeof n)i[e]=n;else if("object"==typeof n)if(Array.isArray(n))for(const t in n){const i={instruction:"UPDATE",target:e,listIndex:parseInt(t,10)+1,content:n[t]};a.push(i)}else{const t={instruction:"UPDATE",target:e,content:n};a.push(t)}return{pageInstructions:a,pageupdate:i}};function Tt(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Et(t,e,a){t(null,{verifier:e,challenge:Tt(String.fromCharCode.apply(null,new Uint8Array(a)))})}const Lt=()=>new Promise(((t,e)=>{!function(t,e){let a=t;a||(a=43);const i=window.msCrypto||window.crypto,n=Tt(Array.prototype.map.call(i.getRandomValues(new Uint8Array(a)),(t=>String.fromCharCode(t))).join("")).substring(0,a),s=new Uint8Array(n.length);for(let t=0;t{Et(e,n,t.target.result)}):o.then((t=>{Et(e,n,t)})).catch(e)}(43,((a,{verifier:i,challenge:n})=>{a?e(new Error("error")):t({verifier:i,challenge:n})}))})),Rt=(t,e,a,i,n)=>{if(null==i)return null;let s;const o=`${Math.random().toString(36).substr(2,9)}`,r=document.createElement("ul");r.setAttribute("id",`menu-overlay-${o}`),r.setAttribute("role","menu"),r.setAttribute("aria-labelledby",`menubutton-${o}`),r.setAttribute("tabindex","-1");const l=()=>{document.body.removeEventListener("click",d),document.body.removeEventListener("keydown",c),r&&(r.previousElementSibling&&(r.previousElementSibling.setAttribute("aria-expanded","false"),r.previousElementSibling.focus()),r.remove())},c=t=>{38===t.keyCode?(s=s.previousElementSibling,null===s&&(s=r.lastElementChild),s.focus()):40===t.keyCode?(s=s.nextElementSibling,null===s&&(s=r.firstElementChild),s.focus()):27===t.keyCode||9===t.keyCode?l():13===t.keyCode&&(i(t),l())},d=t=>{if(t){let e=t.target;if(t.path&&t.path.length>0?e=t.path[0]:t.originalTarget&&(e=t.originalTarget),e&&e.nextElementSibling===r)return;e.parentNode===r&&i(t),l()}},h=t=>{if("keydown"===t.type&&40!==t.keyCode)return;if(t.preventDefault(),t.stopPropagation(),"blur"===t.type)return void d(t);const e=t.currentTarget;"BUTTON"!==e.tagName?(i(t),l()):null===e.nextElementSibling?(e.parentNode.appendChild(r),e.setAttribute("aria-expanded","true"),tt(a(),r),s=e.nextElementSibling.firstElementChild,s.focus(),document.body.addEventListener("click",d),document.body.addEventListener("keydown",c)):l()};return N` + `},ut=t=>`0${t}`.slice(-2),pt=t=>`0${t}`.slice(-4),gt=t=>{if(t.endsWith(" GMT")&&23===t.length)return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T${t.substring(9,11)}:${t.substring(11,13)}:${t.substring(13,19)}Z`);if(8===t.length){return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T00:00:00.000Z`)}if(10===t.length&&2===t.indexOf("/")){return new Date(`${t.substring(6,10)}-${t.substring(0,2)}-${t.substring(3,5)}T00:00:00.000Z`)}if(10===t.length&&4===t.indexOf("-")){return new Date(`${t}T00:00:00.000Z`)}return null},ft=t=>t&&"string"==typeof t?t.replace(/&|<|>|'|(|)|"/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",""":'"'}[t]||t))):"",mt=(t,e,a,i,n)=>{if("string"!=typeof e)return;if(i){const t=vt(i,e);if(t===n||`${t}`==`${n}`||null===t&&""===n)return;bt(i,e,n)}const s=e.lastIndexOf(".");if(-1===s)return void(t[e]=n);if(!a)return void bt(t,e,n);const o={};let r=e.substring(0,s);const l=r.lastIndexOf("(");if(-1===l)o[e.substring(s+1)]=n,a.push({instruction:"UPDATE",target:r,content:o});else{const t=r.lastIndexOf(")"),i=r.substring(l+1,t);r=r.substring(0,l),bt(o,e.substring(t+2),n),a.push({instruction:"UPDATE",target:r,listIndex:parseInt(i,10),content:o})}},bt=(t,e,a)=>{if("string"!=typeof e)return;const i=e.split(".");let n=t;for(const t in i){let e=i[t];const s=e.indexOf("(");if(-1===s)t{if("string"!=typeof e||""===e)return null;let a=e;0===e.indexOf(".")&&(a=e.substring(1));let i=t;const n=a.split(".");for(const t in n){const e=n[t],a=e.indexOf("(");if(-1===a){if(void 0===i[e])return null;i=i[e]}else{const t=e.substring(a+1,e.length-1),n=i[e.substring(0,a)];if(!(n&&Array.isArray(n)&&n.length>=t))return null;i=n[t-1]}}return i},$t=t=>{for(const e in t)"object"==typeof t[e]?$t(t[e]):"string"==typeof t[e]&&(t[e]="")},yt=(t,e)=>{for(const a in t)if("fieldID"===a)e.push(t.fieldID);else{const i=t[a];i.fieldID?e.push(i.fieldID):"object"==typeof i&&yt(i,e)}},xt=(t,e,a)=>{let i=vt(t,e);if(null===i&&(i=[],bt(t,e,i)),!Array.isArray(i))return null;if(a&&"string"==typeof a){const t={},n=a.split(",");for(const e in n)t[n[e]]="";return i.push(t),{instruction:"APPEND",target:e,content:t}}if(0===i.length)return null;const n={...i[0]};return $t(n),i.push(n),{instruction:"APPEND",target:e,content:n}},wt=(t,e)=>{let a,i=e;-1!==e.indexOf(").pyTemplate")&&(a=parseInt(i.substring(e.lastIndexOf("(")+1,e.lastIndexOf(")")),10),i=i.substring(0,e.lastIndexOf("(")));const n=vt(t,i);if(!Array.isArray(n))return null;if(1===n.length){for(const t in n[0])"pxObjClass"!==t&&(n[0][t]="");return null}return a?n.length{const a=t.getAttribute(`data-action-${e}`);return!(!a||"postValue"!==a&&0!==a.indexOf("refresh"))},Dt=(t,e)=>{const a=t.getAttribute(`data-action-${e}`);return a&&0===a.indexOf("refresh")?a.replace("refresh-",""):""};function kt(t,e,a){try{switch(e){case">":return parseInt(t,10)>parseInt(a,10);case"<":return parseInt(t,10)=":return parseInt(t,10)>=parseInt(a,10);case"<=":return parseInt(t,10)<=parseInt(a,10);case"==":return`${t}`==`${a}`;case"!=":return`${t}`!=`${a}`}}catch(t){}return!1}const At=(t,e,a)=>{const i=t.replace("@E ","").split("&&");for(const t in i){const n=i[t].trim().match(/[\w.]+|[><=!]+|'[^']+'/g);if(3===n.length){const t=""===a?e[n[0].substring(1)]:vt(e,a+n[0]);if(void 0!==t&&!kt(t,n[1],n[2].replace(/^'|'$/g,"")))return!1}}return!0},It=(t,e,a,i)=>{for(const n of t.elements)if("INPUT"===n.tagName||"TEXTAREA"===n.tagName||"SELECT"===n.tagName){const t=n.getAttribute("data-ref");if(null!==t&&"pyID"!==t)if("INPUT"===n.tagName){const s=n.getAttribute("type");if(n.classList.contains("input-date-day")||n.classList.contains("input-date-month")||n.classList.contains("input-date-year")){if(n.classList.contains("input-date-day")){const s=n.closest(".input-date").parentNode,o=s.querySelector(".input-date-month"),r=s.querySelector(".input-date-year");if(null!==o&&null!==r&&""!==n.value&&""!==o.value&&""!==r.value){const s=`${ut(o.value)}/${ut(n.value)}/${pt(r.value)}`;mt(e,t,a,i,s)}}}else if("checkbox"===s)mt(e,t,a,i,n.checked);else if("radio"===s)n.checked&&mt(e,t,a,i,n.value);else if("tel"===s){let s=n.value;"SELECT"===n.parentNode.firstElementChild.tagName&&"field-countrycode"===n.parentNode.firstElementChild.className&&(s=n.parentNode.firstElementChild.value+s),mt(e,t,a,i,s)}else if("date"===s){let s;n.valueAsDate&&(s=new Date(n.valueAsDate)),s&&s instanceof Date&&s.getTime()==s.getTime()||(s=new Date(n.value)),s&&s instanceof Date&&s.getTime()==s.getTime()?mt(e,t,a,i,`${s.getUTCFullYear()}-${ut(s.getUTCMonth()+1)}-${ut(s.getUTCDate())}`):mt(e,t,a,i,n.value)}else mt(e,t,a,i,n.value)}else mt(e,t,a,i,n.value)}if(t&&t.querySelectorAll){const s=t.querySelectorAll("[contenteditable]");for(let t=0;t'"]/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",'"':"""}[t]||t))):"")}}var n},_t=(t,e,a)=>{for(const i of t.elements)if("INPUT"===i.tagName||"TEXTAREA"===i.tagName||"SELECT"===i.tagName){const t=`.${i.getAttribute("data-ref")}`;if(null!==t&&"pyID"!==t)for(const n in e){if(e[n].Path===t){a.setInlineError(i,e[n].ValidationMessage);break}if(e[n].erroneousInputOutputFieldInPage===t){a.setInlineError(i,e[n].localizedValue);break}}}},St=(t,e)=>{const a=e||[],i={};for(const[e,n]of Object.entries(t))if("string"==typeof n||"boolean"==typeof n)i[e]=n;else if("object"==typeof n)if(Array.isArray(n))for(const t in n){const i={instruction:"UPDATE",target:e,listIndex:parseInt(t,10)+1,content:n[t]};a.push(i)}else{const t={instruction:"UPDATE",target:e,content:n};a.push(t)}return{pageInstructions:a,pageupdate:i}};function Tt(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Et(t,e,a){t(null,{verifier:e,challenge:Tt(String.fromCharCode.apply(null,new Uint8Array(a)))})}const Lt=()=>new Promise(((t,e)=>{!function(t,e){let a=t;a||(a=43);const i=window.msCrypto||window.crypto,n=Tt(Array.prototype.map.call(i.getRandomValues(new Uint8Array(a)),(t=>String.fromCharCode(t))).join("")).substring(0,a),s=new Uint8Array(n.length);for(let t=0;t{Et(e,n,t.target.result)}):o.then((t=>{Et(e,n,t)})).catch(e)}(43,((a,{verifier:i,challenge:n})=>{a?e(new Error("error")):t({verifier:i,challenge:n})}))})),Rt=(t,e,a,i,n)=>{if(null==i)return null;let s;const o=`${Math.random().toString(36).substr(2,9)}`,r=document.createElement("ul");r.setAttribute("id",`menu-overlay-${o}`),r.setAttribute("role","menu"),r.setAttribute("aria-labelledby",`menubutton-${o}`),r.setAttribute("tabindex","-1");const l=()=>{document.body.removeEventListener("click",d),document.body.removeEventListener("keydown",c),r&&(r.previousElementSibling&&(r.previousElementSibling.setAttribute("aria-expanded","false"),r.previousElementSibling.focus()),r.remove())},c=t=>{38===t.keyCode?(s=s.previousElementSibling,null===s&&(s=r.lastElementChild),s.focus()):40===t.keyCode?(s=s.nextElementSibling,null===s&&(s=r.firstElementChild),s.focus()):27===t.keyCode||9===t.keyCode?l():13===t.keyCode&&(i(t),l())},d=t=>{if(t){let e=t.target;if(t.path&&t.path.length>0?e=t.path[0]:t.originalTarget&&(e=t.originalTarget),e&&e.nextElementSibling===r)return;e.parentNode===r&&i(t),l()}},h=t=>{if("keydown"===t.type&&40!==t.keyCode)return;if(t.preventDefault(),t.stopPropagation(),"blur"===t.type)return void d(t);const e=t.currentTarget;"BUTTON"!==e.tagName?(i(t),l()):null===e.nextElementSibling?(e.parentNode.appendChild(r),e.setAttribute("aria-expanded","true"),tt(a(),r),s=e.nextElementSibling.firstElementChild,s.focus(),document.body.addEventListener("click",d),document.body.addEventListener("keydown",c)):l()};return N`
    -
    `},ut=t=>`0${t}`.slice(-2),pt=t=>`0${t}`.slice(-4),gt=t=>{if(t.endsWith(" GMT")&&23===t.length)return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T${t.substring(9,11)}:${t.substring(11,13)}:${t.substring(13,19)}Z`);if(8===t.length){return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T00:00:00.000Z`)}if(10===t.length){return new Date(`${t.substring(6,10)}-${t.substring(0,2)}-${t.substring(3,5)}T00:00:00.000Z`)}return null},ft=t=>t&&"string"==typeof t?t.replace(/&|<|>|'|(|)|"/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",""":'"'}[t]||t))):"",mt=(t,e,a,i,s)=>{if("string"!=typeof e)return;if(i){const t=vt(i,e);if(t===s||`${t}`==`${s}`||null===t&&""===s)return;$t(i,e,s)}const n=e.lastIndexOf(".");if(-1===n)return void(t[e]=s);if(!a)return void $t(t,e,s);const r={};let o=e.substring(0,n);const c=o.lastIndexOf("(");if(-1===c)r[e.substring(n+1)]=s,a.push({instruction:"UPDATE",target:o,content:r});else{const t=o.lastIndexOf(")"),i=o.substring(c+1,t);o=o.substring(0,c),$t(r,e.substring(t+2),s),a.push({instruction:"UPDATE",target:o,listIndex:parseInt(i,10),content:r})}},$t=(t,e,a)=>{if("string"!=typeof e)return;const i=e.split(".");let s=t;for(const t in i){let e=i[t];const n=e.indexOf("(");if(-1===n)t{if("string"!=typeof e||""===e)return null;let a=e;0===e.indexOf(".")&&(a=e.substring(1));let i=t;const s=a.split(".");for(const t in s){const e=s[t],a=e.indexOf("(");if(-1===a){if(void 0===i[e])return null;i=i[e]}else{const t=e.substring(a+1,e.length-1),s=i[e.substring(0,a)];if(!(s&&Array.isArray(s)&&s.length>=t))return null;i=s[t-1]}}return i},yt=t=>{for(const e in t)"object"==typeof t[e]?yt(t[e]):"string"==typeof t[e]&&(t[e]="")},bt=(t,e)=>{for(const a in t)if("fieldID"===a)e.push(t.fieldID);else{const i=t[a];i.fieldID?e.push(i.fieldID):"object"==typeof i&&bt(i,e)}},Ct=(t,e,a)=>{let i=vt(t,e);if(null===i&&(i=[],$t(t,e,i)),!Array.isArray(i))return null;if(a&&"string"==typeof a){const t={},s=a.split(",");for(const e in s)t[s[e]]="";return i.push(t),{instruction:"APPEND",target:e,content:t}}if(0===i.length)return null;const s={...i[0]};return yt(s),i.push(s),{instruction:"APPEND",target:e,content:s}},wt=(t,e)=>{let a,i=e;-1!==e.indexOf(").pyTemplate")&&(a=parseInt(i.substring(e.lastIndexOf("(")+1,e.lastIndexOf(")")),10),i=i.substring(0,e.lastIndexOf("(")));const s=vt(t,i);if(!Array.isArray(s))return null;if(1===s.length){for(const t in s[0])"pxObjClass"!==t&&(s[0][t]="");return null}return a?s.length{const a=t.getAttribute(`data-action-${e}`);return!(!a||"postValue"!==a&&0!==a.indexOf("refresh"))},At=(t,e)=>{const a=t.getAttribute(`data-action-${e}`);return a&&0===a.indexOf("refresh")?a.replace("refresh-",""):""};function It(t,e,a){try{switch(e){case">":return parseInt(t,10)>parseInt(a,10);case"<":return parseInt(t,10)=":return parseInt(t,10)>=parseInt(a,10);case"<=":return parseInt(t,10)<=parseInt(a,10);case"==":return`${t}`==`${a}`;case"!=":return`${t}`!=`${a}`}}catch(t){}return!1}const xt=(t,e,a)=>{const i=t.replace("@E ","").split("&&");for(const t in i){const s=i[t].trim().match(/[\w.]+|[><=!]+|'[^']+'/g);if(3===s.length){const t=""===a?e[s[0].substring(1)]:vt(e,a+s[0]);if(void 0!==t&&!It(t,s[1],s[2].replace(/^'|'$/g,"")))return!1}}return!0},kt=(t,e,a,i)=>{for(const s of t.elements)if("INPUT"===s.tagName||"TEXTAREA"===s.tagName||"SELECT"===s.tagName){const t=s.getAttribute("data-ref");if(null!==t&&"pyID"!==t)if("INPUT"===s.tagName){const n=s.getAttribute("type");if(s.classList.contains("input-date-day")||s.classList.contains("input-date-month")||s.classList.contains("input-date-year")){if(s.classList.contains("input-date-day")){const n=s.closest(".input-date").parentNode,r=n.querySelector(".input-date-month"),o=n.querySelector(".input-date-year");if(null!==r&&null!==o&&""!==s.value&&""!==r.value&&""!==o.value){const n=`${ut(r.value)}/${ut(s.value)}/${pt(o.value)}`;mt(e,t,a,i,n)}}}else if("checkbox"===n)mt(e,t,a,i,s.checked);else if("radio"===n)s.checked&&mt(e,t,a,i,s.value);else if("tel"===n){let n=s.value;"SELECT"===s.parentNode.firstElementChild.tagName&&"field-countrycode"===s.parentNode.firstElementChild.className&&(n=s.parentNode.firstElementChild.value+n),mt(e,t,a,i,n)}else if("date"===n){let n;s.valueAsDate&&(n=new Date(s.valueAsDate)),n&&n instanceof Date&&n.getTime()==n.getTime()||(n=new Date(s.value)),n&&n instanceof Date&&n.getTime()==n.getTime()?mt(e,t,a,i,`${n.getUTCFullYear()}-${ut(n.getUTCMonth()+1)}-${ut(n.getUTCDate())}`):mt(e,t,a,i,s.value)}else mt(e,t,a,i,s.value)}else mt(e,t,a,i,s.value)}if(t&&t.querySelectorAll){const n=t.querySelectorAll("[contenteditable]");for(let t=0;t'"]/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",'"':"""}[t]||t))):"")}}var s},_t=(t,e,a)=>{for(const i of t.elements)if("INPUT"===i.tagName||"TEXTAREA"===i.tagName||"SELECT"===i.tagName){const t=`.${i.getAttribute("data-ref")}`;if(null!==t&&"pyID"!==t)for(const s in e){if(e[s].Path===t){a.setInlineError(i,e[s].ValidationMessage);break}if(e[s].erroneousInputOutputFieldInPage===t){a.setInlineError(i,e[s].localizedValue);break}}}},St=(t,e)=>{const a=e||[],i={};for(const[e,s]of Object.entries(t))if("string"==typeof s||"boolean"==typeof s)i[e]=s;else if("object"==typeof s)if(Array.isArray(s))for(const t in s){const i={instruction:"UPDATE",target:e,listIndex:parseInt(t,10)+1,content:s[t]};a.push(i)}else{const t={instruction:"UPDATE",target:e,content:s};a.push(t)}return{pageInstructions:a,pageupdate:i}};function Tt(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Et(t,e,a){t(null,{verifier:e,challenge:Tt(String.fromCharCode.apply(null,new Uint8Array(a)))})}const Lt=()=>new Promise(((t,e)=>{!function(t,e){let a=t;a||(a=43);const i=window.msCrypto||window.crypto,s=Tt(Array.prototype.map.call(i.getRandomValues(new Uint8Array(a)),(t=>String.fromCharCode(t))).join("")).substring(0,a),n=new Uint8Array(s.length);for(let t=0;t{Et(e,s,t.target.result)}):r.then((t=>{Et(e,s,t)})).catch(e)}(43,((a,{verifier:i,challenge:s})=>{a?e(new Error("error")):t({verifier:i,challenge:s})}))})),Rt=(t,e,a,i,s)=>{if(null==i)return null;let n;const r=`${Math.random().toString(36).substr(2,9)}`,o=document.createElement("ul");o.setAttribute("id",`menu-overlay-${r}`),o.setAttribute("role","menu"),o.setAttribute("aria-labelledby",`menubutton-${r}`),o.setAttribute("tabindex","-1");const c=()=>{document.body.removeEventListener("click",d),document.body.removeEventListener("keydown",l),o&&(o.previousElementSibling&&(o.previousElementSibling.setAttribute("aria-expanded","false"),o.previousElementSibling.focus()),o.remove())},l=t=>{38===t.keyCode?(n=n.previousElementSibling,null===n&&(n=o.lastElementChild),n.focus()):40===t.keyCode?(n=n.nextElementSibling,null===n&&(n=o.firstElementChild),n.focus()):27===t.keyCode||9===t.keyCode?c():13===t.keyCode&&(i(t),c())},d=t=>{if(t){let e=t.target;if(t.path&&t.path.length>0?e=t.path[0]:t.originalTarget&&(e=t.originalTarget),e&&e.nextElementSibling===o)return;e.parentNode===o&&i(t),c()}},h=t=>{if("keydown"===t.type&&40!==t.keyCode)return;if(t.preventDefault(),t.stopPropagation(),"blur"===t.type)return void d(t);const e=t.currentTarget;"BUTTON"!==e.tagName?(i(t),c()):null===e.nextElementSibling?(e.parentNode.appendChild(o),e.setAttribute("aria-expanded","true"),tt(a(),o),n=e.nextElementSibling.firstElementChild,n.focus(),document.body.addEventListener("click",d),document.body.addEventListener("keydown",l)):c()};return U` + `},ut=t=>`0${t}`.slice(-2),pt=t=>`0${t}`.slice(-4),gt=t=>{if(t.endsWith(" GMT")&&23===t.length)return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T${t.substring(9,11)}:${t.substring(11,13)}:${t.substring(13,19)}Z`);if(8===t.length){return new Date(`${t.substring(0,4)}-${t.substring(4,6)}-${t.substring(6,8)}T00:00:00.000Z`)}if(10===t.length&&2===t.indexOf("/")){return new Date(`${t.substring(6,10)}-${t.substring(0,2)}-${t.substring(3,5)}T00:00:00.000Z`)}if(10===t.length&&4===t.indexOf("-")){return new Date(`${t}T00:00:00.000Z`)}return null},ft=t=>t&&"string"==typeof t?t.replace(/&|<|>|'|(|)|"/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",""":'"'}[t]||t))):"",mt=(t,e,a,i,s)=>{if("string"!=typeof e)return;if(i){const t=vt(i,e);if(t===s||`${t}`==`${s}`||null===t&&""===s)return;$t(i,e,s)}const n=e.lastIndexOf(".");if(-1===n)return void(t[e]=s);if(!a)return void $t(t,e,s);const r={};let o=e.substring(0,n);const c=o.lastIndexOf("(");if(-1===c)r[e.substring(n+1)]=s,a.push({instruction:"UPDATE",target:o,content:r});else{const t=o.lastIndexOf(")"),i=o.substring(c+1,t);o=o.substring(0,c),$t(r,e.substring(t+2),s),a.push({instruction:"UPDATE",target:o,listIndex:parseInt(i,10),content:r})}},$t=(t,e,a)=>{if("string"!=typeof e)return;const i=e.split(".");let s=t;for(const t in i){let e=i[t];const n=e.indexOf("(");if(-1===n)t{if("string"!=typeof e||""===e)return null;let a=e;0===e.indexOf(".")&&(a=e.substring(1));let i=t;const s=a.split(".");for(const t in s){const e=s[t],a=e.indexOf("(");if(-1===a){if(void 0===i[e])return null;i=i[e]}else{const t=e.substring(a+1,e.length-1),s=i[e.substring(0,a)];if(!(s&&Array.isArray(s)&&s.length>=t))return null;i=s[t-1]}}return i},yt=t=>{for(const e in t)"object"==typeof t[e]?yt(t[e]):"string"==typeof t[e]&&(t[e]="")},bt=(t,e)=>{for(const a in t)if("fieldID"===a)e.push(t.fieldID);else{const i=t[a];i.fieldID?e.push(i.fieldID):"object"==typeof i&&bt(i,e)}},Ct=(t,e,a)=>{let i=vt(t,e);if(null===i&&(i=[],$t(t,e,i)),!Array.isArray(i))return null;if(a&&"string"==typeof a){const t={},s=a.split(",");for(const e in s)t[s[e]]="";return i.push(t),{instruction:"APPEND",target:e,content:t}}if(0===i.length)return null;const s={...i[0]};return yt(s),i.push(s),{instruction:"APPEND",target:e,content:s}},wt=(t,e)=>{let a,i=e;-1!==e.indexOf(").pyTemplate")&&(a=parseInt(i.substring(e.lastIndexOf("(")+1,e.lastIndexOf(")")),10),i=i.substring(0,e.lastIndexOf("(")));const s=vt(t,i);if(!Array.isArray(s))return null;if(1===s.length){for(const t in s[0])"pxObjClass"!==t&&(s[0][t]="");return null}return a?s.length{const a=t.getAttribute(`data-action-${e}`);return!(!a||"postValue"!==a&&0!==a.indexOf("refresh"))},At=(t,e)=>{const a=t.getAttribute(`data-action-${e}`);return a&&0===a.indexOf("refresh")?a.replace("refresh-",""):""};function It(t,e,a){try{switch(e){case">":return parseInt(t,10)>parseInt(a,10);case"<":return parseInt(t,10)=":return parseInt(t,10)>=parseInt(a,10);case"<=":return parseInt(t,10)<=parseInt(a,10);case"==":return`${t}`==`${a}`;case"!=":return`${t}`!=`${a}`}}catch(t){}return!1}const xt=(t,e,a)=>{const i=t.replace("@E ","").split("&&");for(const t in i){const s=i[t].trim().match(/[\w.]+|[><=!]+|'[^']+'/g);if(3===s.length){const t=""===a?e[s[0].substring(1)]:vt(e,a+s[0]);if(void 0!==t&&!It(t,s[1],s[2].replace(/^'|'$/g,"")))return!1}}return!0},kt=(t,e,a,i)=>{for(const s of t.elements)if("INPUT"===s.tagName||"TEXTAREA"===s.tagName||"SELECT"===s.tagName){const t=s.getAttribute("data-ref");if(null!==t&&"pyID"!==t)if("INPUT"===s.tagName){const n=s.getAttribute("type");if(s.classList.contains("input-date-day")||s.classList.contains("input-date-month")||s.classList.contains("input-date-year")){if(s.classList.contains("input-date-day")){const n=s.closest(".input-date").parentNode,r=n.querySelector(".input-date-month"),o=n.querySelector(".input-date-year");if(null!==r&&null!==o&&""!==s.value&&""!==r.value&&""!==o.value){const n=`${ut(r.value)}/${ut(s.value)}/${pt(o.value)}`;mt(e,t,a,i,n)}}}else if("checkbox"===n)mt(e,t,a,i,s.checked);else if("radio"===n)s.checked&&mt(e,t,a,i,s.value);else if("tel"===n){let n=s.value;"SELECT"===s.parentNode.firstElementChild.tagName&&"field-countrycode"===s.parentNode.firstElementChild.className&&(n=s.parentNode.firstElementChild.value+n),mt(e,t,a,i,n)}else if("date"===n){let n;s.valueAsDate&&(n=new Date(s.valueAsDate)),n&&n instanceof Date&&n.getTime()==n.getTime()||(n=new Date(s.value)),n&&n instanceof Date&&n.getTime()==n.getTime()?mt(e,t,a,i,`${n.getUTCFullYear()}-${ut(n.getUTCMonth()+1)}-${ut(n.getUTCDate())}`):mt(e,t,a,i,s.value)}else mt(e,t,a,i,s.value)}else mt(e,t,a,i,s.value)}if(t&&t.querySelectorAll){const n=t.querySelectorAll("[contenteditable]");for(let t=0;t'"]/g,(t=>({"&":"&","<":"<",">":">","'":"'","(":"(",")":")",'"':"""}[t]||t))):"")}}var s},_t=(t,e,a)=>{for(const i of t.elements)if("INPUT"===i.tagName||"TEXTAREA"===i.tagName||"SELECT"===i.tagName){const t=`.${i.getAttribute("data-ref")}`;if(null!==t&&"pyID"!==t)for(const s in e){if(e[s].Path===t){a.setInlineError(i,e[s].ValidationMessage);break}if(e[s].erroneousInputOutputFieldInPage===t){a.setInlineError(i,e[s].localizedValue);break}}}},St=(t,e)=>{const a=e||[],i={};for(const[e,s]of Object.entries(t))if("string"==typeof s||"boolean"==typeof s)i[e]=s;else if("object"==typeof s)if(Array.isArray(s))for(const t in s){const i={instruction:"UPDATE",target:e,listIndex:parseInt(t,10)+1,content:s[t]};a.push(i)}else{const t={instruction:"UPDATE",target:e,content:s};a.push(t)}return{pageInstructions:a,pageupdate:i}};function Tt(t){return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function Et(t,e,a){t(null,{verifier:e,challenge:Tt(String.fromCharCode.apply(null,new Uint8Array(a)))})}const Lt=()=>new Promise(((t,e)=>{!function(t,e){let a=t;a||(a=43);const i=window.msCrypto||window.crypto,s=Tt(Array.prototype.map.call(i.getRandomValues(new Uint8Array(a)),(t=>String.fromCharCode(t))).join("")).substring(0,a),n=new Uint8Array(s.length);for(let t=0;t{Et(e,s,t.target.result)}):r.then((t=>{Et(e,s,t)})).catch(e)}(43,((a,{verifier:i,challenge:s})=>{a?e(new Error("error")):t({verifier:i,challenge:s})}))})),Rt=(t,e,a,i,s)=>{if(null==i)return null;let n;const r=`${Math.random().toString(36).substr(2,9)}`,o=document.createElement("ul");o.setAttribute("id",`menu-overlay-${r}`),o.setAttribute("role","menu"),o.setAttribute("aria-labelledby",`menubutton-${r}`),o.setAttribute("tabindex","-1");const c=()=>{document.body.removeEventListener("click",d),document.body.removeEventListener("keydown",l),o&&(o.previousElementSibling&&(o.previousElementSibling.setAttribute("aria-expanded","false"),o.previousElementSibling.focus()),o.remove())},l=t=>{38===t.keyCode?(n=n.previousElementSibling,null===n&&(n=o.lastElementChild),n.focus()):40===t.keyCode?(n=n.nextElementSibling,null===n&&(n=o.firstElementChild),n.focus()):27===t.keyCode||9===t.keyCode?c():13===t.keyCode&&(i(t),c())},d=t=>{if(t){let e=t.target;if(t.path&&t.path.length>0?e=t.path[0]:t.originalTarget&&(e=t.originalTarget),e&&e.nextElementSibling===o)return;e.parentNode===o&&i(t),c()}},h=t=>{if("keydown"===t.type&&40!==t.keyCode)return;if(t.preventDefault(),t.stopPropagation(),"blur"===t.type)return void d(t);const e=t.currentTarget;"BUTTON"!==e.tagName?(i(t),c()):null===e.nextElementSibling?(e.parentNode.appendChild(o),e.setAttribute("aria-expanded","true"),tt(a(),o),n=e.nextElementSibling.firstElementChild,n.focus(),document.body.addEventListener("click",d),document.body.addEventListener("keydown",l)):c()};return U`