mypgs 1.6.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -2
- package/assets/javascript/components/_accordion.js +2 -2
- package/assets/javascript/components/_modals.js +159 -136
- package/assets/javascript/components/_notifications.js +19 -9
- package/assets/javascript/components/_search.js +2 -2
- package/assets/javascript/components/_slides.js +66 -32
- package/assets/javascript/components/_stepTabs.js +4 -4
- package/assets/javascript/components/_steps.js +2 -2
- package/assets/javascript/components/_summary.js +2 -2
- package/assets/javascript/functions/_formValidate.js +97 -53
- package/assets/javascript/functions/_scrollY.js +10 -10
- package/assets/javascript/layout/_header.js +3 -0
- package/assets/scss/base/_html.scss +2 -2
- package/assets/scss/base/_variables.scss +2 -2
- package/assets/scss/components/_form.scss +2 -2
- package/assets/scss/components/_notification.scss +23 -30
- package/assets/scss/components/_search.scss +27 -21
- package/assets/scss/layout/_pageShell.scss +18 -15
- package/assets/scss/mixin/_mx-form.scss +7 -7
- package/{templates/html → demo}/demo.html +1 -1
- package/demo/demo.js +240 -0
- package/dist/css/index.css +86 -92
- package/dist/css/index.css.map +1 -1
- package/dist/css/index.min.css +1 -1
- package/dist/javascript/index.js +356 -255
- package/dist/javascript/index.js.map +1 -1
- package/dist/javascript/index.min.js +1 -1
- package/docs/componenti-e-markup.md +26 -27
- package/docs/components/accordion.md +61 -0
- package/docs/components/badges.md +67 -0
- package/docs/components/breadcumbs.md +43 -0
- package/docs/components/button.md +59 -0
- package/docs/components/card.md +50 -0
- package/docs/components/dropdown.md +135 -0
- package/docs/components/form.md +113 -0
- package/docs/components/logo.md +36 -0
- package/docs/components/menu.md +90 -0
- package/docs/components/modal.md +131 -0
- package/docs/components/notification.md +81 -0
- package/docs/components/search.md +117 -0
- package/docs/components/slides.md +85 -0
- package/docs/components/stepTabs.md +93 -0
- package/docs/components/steps.md +56 -0
- package/docs/components/summary.md +49 -0
- package/docs/components/table.md +42 -0
- package/docs/components/tooltip.md +53 -0
- package/docs/helper-javascript.md +68 -3
- package/docs/layout/body.md +41 -0
- package/docs/layout/flex.md +116 -0
- package/docs/layout/footer.md +71 -0
- package/docs/layout/grid.md +116 -0
- package/docs/layout/header.md +116 -0
- package/docs/layout/pageShell.md +94 -0
- package/docs/layout/section.md +69 -0
- package/docs/patterns/cookieConsent.md +89 -0
- package/package.json +2 -1
- package/scripts/generate-component-docs.js +557 -0
- package/templates/html/components/accordion.html +33 -4
- package/templates/html/components/badges.html +23 -0
- package/templates/html/components/breadcumbs.html +14 -0
- package/templates/html/components/button.html +22 -0
- package/templates/html/components/card.html +20 -0
- package/templates/html/components/dropdown.html +34 -0
- package/templates/html/components/form.html +82 -4
- package/templates/html/components/logo.html +21 -0
- package/templates/html/components/menu.html +33 -6
- package/templates/html/components/modal.html +44 -0
- package/templates/html/components/notification.html +68 -32
- package/templates/html/components/search.html +76 -0
- package/templates/html/components/slides.html +43 -0
- package/templates/html/components/stepTabs.html +47 -0
- package/templates/html/components/steps.html +24 -0
- package/templates/html/components/summary.html +27 -0
- package/templates/html/components/table.html +12 -0
- package/templates/html/components/tooltip.html +35 -0
- package/templates/html/layout/body.html +20 -5
- package/templates/html/layout/flex.html +20 -0
- package/templates/html/layout/footer.html +29 -1
- package/templates/html/layout/grid.html +20 -0
- package/templates/html/layout/header.html +41 -0
- package/templates/html/layout/pageShell.html +19 -0
- package/templates/html/layout/section.html +32 -10
- package/templates/html/patterns/cookieConsent.html +31 -0
- package/templates/react/components/form.jsx +3 -3
- package/templates/react/components/notification.jsx +4 -4
- package/templates/react/patterns/footer.jsx +1 -1
- package/templates/html/demo.js +0 -130
- /package/{templates/html → demo}/demo.css +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var e={795(){function e(e=!1,t){let n="true"===localStorage.getItem("screenIsDarkMode");e&&(n=!n,localStorage.setItem("screenIsDarkMode",n)),pgs(document.documentElement).state.toggle("darkmode",n),pgs(document.body).state.toggle("darkmode",n),function(e,t){e.forEach(e=>{const n=e.querySelector("i");n&&(n.classList.toggle("fa-moon",!t),n.classList.toggle("fa-sun",t))})}(t,n),document.dispatchEvent(new CustomEvent("pgs:svg:changeColor",{detail:{isDarkMode:n}}))}const t=pgs(document).querySelectorAll("toggleDarkmode");e(!1,t),t.forEach(n=>{n.addEventListener("click",()=>e(!0,t))})},359(){document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll('object[type="image/svg+xml"]').forEach(e=>{function t(t){if(!t)return;const n=t.querySelector("svg");if(!n)return;const o=window.getComputedStyle(e);n.setAttribute("preserveAspectRatio","cover"===o.objectFit?"xMidYMid slice":"xMidYMid meet")}function n(){const n=e.contentDocument;if(!n)return;if(!n.querySelector("svg"))return;if(t(n),e.__objectResizeObserver)return;let o=0;const r=new ResizeObserver(()=>{o||(o=requestAnimationFrame(()=>{o=0,t(n)}))});r.observe(e),e.__objectResizeObserver=r}e.contentDocument&&e.contentDocument.querySelector("svg")?n():e.addEventListener("load",n,{once:!0})}),document.body.classList.add("object-loaded")})},682(){const e=pgs(document).querySelector("header");!function(){if(!e)return;const t=pgs(e).querySelectorAll("header-element");t.length&&(t.forEach(t=>{let n,o=!1,r=0;const i=()=>{r||(r=requestAnimationFrame(()=>{r=0,function(r){let i,s=window.getComputedStyle(r),a=parseFloat(s.paddingLeft)+parseFloat(s.paddingRight),c=parseFloat(s.gap),l=parseInt(r.offsetWidth-a);if(o)i=n;else{let e=[];Array.from(r.children).filter(e=>!pgs(e).contains("header-element-onlyMobile")).forEach(t=>{pgs(t).contains("header-element-hamburger")||e.push(...t.children)}),c=Math.round(c*(e.length-1)),i=e.reduce((e,t)=>e+t.offsetWidth,0)-2+c}window.innerWidth<600?(pgs(e).state.add("mobileActive"),pgs(t).state.add("mobileActive")):l<i?(pgs(e).state.add("mobileActive"),pgs(r).state.add("mobileActive"),o=!0,n=i):(pgs(e).state.remove("mobileActive"),pgs(r).state.remove("mobileActive"))}(t)}))};new ResizeObserver(i).observe(t),i()}),window.addEventListener("resize",()=>{window.innerWidth>768&&(e.style.transform="translateY(0)")}))}();let t=0;function n(){t||(t=requestAnimationFrame(()=>{t=0,function(){if(!e)return;const t=window.getComputedStyle(document.documentElement).marginTop??0,n=e.offsetHeight+parseInt(t),o="true"===document.querySelector("header").getAttribute("data-header-scroll")?0:n;document.documentElement.style.setProperty("--heightOfHeader",`${n}px`),document.documentElement.style.setProperty("--heightOfHeaderScroll",`${o}px`)}()}))}e&&(new ResizeObserver(n).observe(e),document.fonts?.ready?.then(n)),n(),window.addEventListener("resize",n),window.addEventListener("scroll",n,{passive:!0});let o=window.scrollY;window.addEventListener("scroll",()=>{if(!e)return;let t=window.scrollY;window.innerHeight<=900&&(t>=80?t>o?(e.style.transform="translateY(-100%)",e.setAttribute("data-header-scroll",!0)):(e.style.transform="translateY(0px)",e.setAttribute("data-header-scroll",!1)):(e.style.transform="translateY(0)",e.setAttribute("data-header-scroll",!1))),o=t})},48(){const e="pgs_cookie_preferences_v1";function t(){window.dataLayer=window.dataLayer||[],window.gtag=window.gtag||function(){window.dataLayer.push(arguments)}}function n(e,t,n){if(!(e instanceof HTMLElement&&t))return;const o=(e.getAttribute("pgs")||"").split(/\s+/).filter(Boolean),r=n?[...new Set([...o,t])]:o.filter(e=>e!==t);r.length>0?e.setAttribute("pgs",r.join(" ")):e.removeAttribute("pgs")}function o(){const o=pgs(document).querySelector("cookieConsent");if(!o)return;const r=o.querySelector('[pgs~="cookieConsent-toggleAnalytics"]'),i=o.querySelector('[pgs~="cookieConsent-actionAccept"]'),s=o.querySelector('[pgs~="cookieConsent-actionReject"]'),a=document.querySelectorAll('[pgs~="cookieConsent-actionOpen"]'),c=(o.dataset.gaId||"").trim(),l=c.length>0;let u=null;function d(e){o.hidden=!e,o.setAttribute("aria-hidden",String(!e)),document.body.classList.toggle("cookieConsent-open",e),e?(u=document.activeElement,setTimeout(()=>{o.focus()},0)):u instanceof HTMLElement&&u.focus({preventScroll:!0})}function p(){d(!1)}function g(r){!function(t){try{localStorage.setItem(e,JSON.stringify({...t,updatedAt:(new Date).toISOString()}))}catch(e){console.warn("PGS cookie consent: impossibile salvare le preferenze",e)}}({analytics:r}),n(o,"cookieConsent-accepted",!!r),n(o,"cookieConsent-declined",!r),function({allowAnalytics:e,measurementId:n}){t(),e?(window.gtag("consent","update",{analytics_storage:"granted"}),function(e){if(!e||window.__PGS_gaLoaded)return;window.__PGS_gaLoaded=!0;const t=document.createElement("script");t.async=!0,t.src=`https://www.googletagmanager.com/gtag/js?id=${e}`,document.head.appendChild(t),window.gtag("js",new Date),window.gtag("config",e,{anonymize_ip:!0,allow_google_signals:!1})}(n)):window.gtag("consent","update",{analytics_storage:"denied"})}({allowAnalytics:!!r,measurementId:c})}!function({root:e,analyticsToggle:t,acceptAllButton:n,rejectButton:o,openButtons:r}){e.dataset.cookieComponent="consent",t?.setAttribute("data-cookie-toggle","analytics"),n?.setAttribute("data-cookie-action","accept"),o?.setAttribute("data-cookie-action","reject"),e.querySelector('[pgs~="cookieConsent-featureEssential"]')?.setAttribute("data-cookie-feature","essential"),e.querySelector('[pgs~="cookieConsent-featureAnalytics"]')?.setAttribute("data-cookie-feature","analytics"),r.forEach(e=>{e.setAttribute("data-cookie-action","open")})}({root:o,analyticsToggle:r,acceptAllButton:i,rejectButton:s,openButtons:a}),r&&(r.disabled=!l,l?n(o,"cookieConsent-gaUnavailable",!1):(r.checked=!1,n(o,"cookieConsent-gaUnavailable",!0))),t(),window.gtag("consent","default",{analytics_storage:"denied"}),i?.addEventListener("click",()=>{r&&l&&(r.checked=!0),g(!!l),p()}),s?.addEventListener("click",()=>{const e=!!r&&r.checked&&l;!e&&r&&(r.checked=!1),g(e),p()}),r?.addEventListener("change",e=>{!l&&e.target instanceof HTMLInputElement&&(e.target.checked=!1)}),o.addEventListener("keydown",e=>{if("Escape"===e.key)e.preventDefault(),p();else if("Tab"===e.key){const t=o.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');if(0===t.length)return;const n=t[0],r=t[t.length-1];e.shiftKey||document.activeElement!==r||(e.preventDefault(),n.focus()),e.shiftKey&&document.activeElement===n&&(e.preventDefault(),r.focus())}}),a.forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),d(!0)})});const f=function(){try{return function(e){try{return e?JSON.parse(e):null}catch(e){return console.warn("PGS cookie consent: impossibile leggere le preferenze",e),null}}(localStorage.getItem(e))}catch(e){return null}}();f&&"boolean"==typeof f.analytics?(r&&(r.checked=!!f.analytics&&l),g(f.analytics&&l),p()):d(!0)}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",o):o()}};const t={};function n(o){const r=t[o];if(void 0!==r)return r.exports;const i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}(()=>{"use strict";function e(e){const t="pgs";if(!e)throw new TypeError("pgs(root): root richiesto");const n="function"==typeof e.getAttribute&&"function"==typeof e.setAttribute;if("function"!=typeof e.querySelector||"function"!=typeof e.querySelectorAll)throw new TypeError("pgs(root): root deve supportare querySelector/querySelectorAll");function o(t){throw new TypeError(`pgs(${e.nodeName||"root"}).${t}(): disponibile solo su Element (non su Document)`)}function r(e){return Array.isArray(e)&&(e=e.join(",")),String(e).split(",").map(e=>e.trim()).filter(Boolean).map(e=>`[${t}~="${e}"]`).join(",")}function i(e,n=" "){return(e.getAttribute(t)||"").split(n).filter(Boolean)}function s(e,n,o=" "){e.setAttribute(t,n.join(o))}const a=function(){function a(){return a}return a.querySelector=function(t){return e.querySelector(r(t))},a.querySelectorAll=function(t){return e.querySelectorAll(r(t))},a.add=function(...t){if(!n)return o("add");const r=i(e);for(const e of t)r.includes(e)||r.push(e);return s(e,r),a},a.remove=function(...t){return n?(s(e,i(e).filter(e=>!t.includes(e))),a):o("remove")},a.toggle=function(t,r){if(!n)return o("toggle");const s=i(e).includes(t);return void 0!==r?(r&&!s&&a.add(t),!r&&s&&a.remove(t),!!r):s?(a.remove(t),!1):(a.add(t),!0)},a.contains=function(t){return n?i(e).includes(t):o("contains")},Object.defineProperty(a,"value",{get(){if(n)return e.getAttribute(t)},set(r){if(!n)return o("value");e.setAttribute(t,r)}}),a}();return a.state=function(t){if(!n)return;const o=(n=" ")=>(e.getAttribute(t)||"").split(n).filter(Boolean),r=(n,o=" ")=>e.setAttribute(t,n.join(o));function i(...e){return i.add(...e),i}return i.add=function(...e){const t=e.flat().map(e=>String(e).trim()).filter(Boolean),n=o();for(const e of t)n.includes(e)||n.push(e);return r(n),i},i.remove=function(...e){const t=e.flat().map(e=>String(e).trim()).filter(Boolean),n=o().filter(e=>!t.includes(e));return r(n),i},i.toggle=function(e,t){const n=String(e).trim();if(!n)return!1;const i=o(),s=i.includes(n);return void 0!==t?(t&&!s&&(i.push(n),r(i)),!t&&s&&r(i.filter(e=>e!==n)),!!t):s?(r(i.filter(e=>e!==n)),!1):(i.push(n),r(i),!0)},i.contains=function(e){const t=String(e).trim();return!!t&&o().includes(t)},Object.defineProperty(i,"value",{get:()=>e.getAttribute(t),set(n){e.setAttribute(t,n)}}),i}("pgs-state"),a.option=function(t){if(!n)return;const o=()=>(e.getAttribute(t)||"").match(/[^\s[\]]+(?:\[[^\]]*\])?/g)||[],r=n=>e.setAttribute(t,n.join(" ")),i=e=>String(e).trim().match(/^[^\s[\]]+/)?.[0]||"",s=e=>e.flat().flatMap(e=>String(e).match(/[^\s[\]]+(?:\[[^\]]*\])?/g)||[]).filter(Boolean);function a(){return a}return a.add=function(...e){const t=o();return s(e).forEach(e=>{t.includes(e)||t.push(e)}),r(t),a},a.remove=function(...e){const t=s(e).map(i).filter(Boolean);return r(o().filter(e=>!t.includes(i(e)))),a},a.toggle=function(e,t){const n=i(e);if(!n)return!1;const o=a.contains(n);return void 0!==t?(t&&!o&&a.add(e),!t&&o&&a.remove(n),!!t):o?(a.remove(n),!1):(a.add(e),!0)},a.contains=function(n){const o=e.getAttribute(t)||"",r=String(n).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(?:^|\\s)${r}(?:\\[[^\\]]*\\])?(?=\\s|$)`).test(o)},a.getValueBrackets=function(n){const o=e.getAttribute(t)||"",r=String(n).replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=o.match(new RegExp(`(?:^|\\s)${r}\\[([^\\]]*)\\]`));return i?i[1]:void 0},a.setValueBrackets=function(e,t=""){const n=i(e);if(!n)return a;const s=`${n}[${String(t).trim()}]`,c=o().filter(e=>i(e)!==n);return c.push(s),r(c),a},Object.defineProperty(a,"value",{get:()=>e.getAttribute(t),set(n){e.setAttribute(t,n)}}),a}("pgs-option"),a}const t={};function o(e,n){const o=String(e||"").trim().replace(/^pgs[_-\s]*/i,"").toLowerCase();if(!o)throw new TypeError("pgs.registerImport(...modules): ogni modulo deve avere name o PGS_name");t[o]={name:e,module:n}}e.registerImport=function(...t){return t.flat().forEach(e=>{!e||"object"!=typeof e||e.PGS_name||e.name?o(e?.PGS_name||e?.name,e):Object.entries(e).forEach(([e,t])=>o(e,t))}),e},e.registerModules=function(t={}){return Object.entries(t).forEach(([t,n])=>{const o=String(t||"").trim();if(o){if(Object.prototype.hasOwnProperty.call(e,o)&&e[o]!==n)throw new Error(`pgs.registerModules(): "${o}" e' gia' definito su pgs`);e[o]=n}}),e},e.import=function(...e){return e.flat().reduce((e,n)=>{const o=String(n||"").trim().replace(/^pgs[_-\s]*/i,"").toLowerCase(),r=t[o];if(!r)throw new Error(`pgs.import(): modulo "${n}" non registrato`);return e[r.name]=r.module,e},{})},globalThis.pgs??=e,n(795);const r={eventChangeColor:"pgs:svg:changeColor",watchedObjects:new WeakSet,watchedLotties:new WeakSet,_normalizeColor:(e="")=>e.replace(/\s/g,"").toLocaleLowerCase(),_getCurrentDarkmode:()=>pgs(document.documentElement).state.contains("darkmode"),searchColor(e="svg"){const t=getComputedStyle(document.documentElement),n=[];for(let o=0;o<20;o++){const r=t.getPropertyValue("--"+e+"-color-"+o).toLocaleLowerCase().split("&").map(e=>e.trim());r[0]&&r[1]&&n.push([r[0],r[1]])}return n},_changeColor(e,t,n){e&&e.querySelectorAll("[fill], [stroke]").forEach(e=>{for(const o of n){const n=r._normalizeColor(o[0]),i=r._normalizeColor(o[1]);["fill","stroke"].forEach(o=>{const s=r._normalizeColor(e.getAttribute(o)||"");s&&(e.style.transition="fill 0.5s ease, stroke 0.5s ease",t&&s===n&&e.setAttribute(o,i),t||s!==i||e.setAttribute(o,n))})}})},_getLottieSvg:e=>e.shadowRoot?.querySelector("svg")||null,init(){document.addEventListener(r.eventChangeColor,e=>{r.applyColorsSVG(e.detail?.isDarkMode??r._getCurrentDarkmode()),r.applyColorsLottie(e.detail?.isDarkMode??r._getCurrentDarkmode())}),document.addEventListener("DOMContentLoaded",()=>{r.applyColorsSVG(),r.applyColorsLottie()})},applyColorsSVG(e=r._getCurrentDarkmode()){const t=r.searchColor("svg");pgs(document).querySelector("svgChangeColor")&&document.querySelectorAll('object[type="image/svg+xml"]').forEach(n=>{r.watchedObjects.has(n)||(n.addEventListener("load",()=>r._changeColor(n.contentDocument,r._getCurrentDarkmode(),r.searchColor("svg"))),r.watchedObjects.add(n)),n.contentDocument&&r._changeColor(n.contentDocument,e,t)})},applyColorsLottie(e=r._getCurrentDarkmode()){const t=r.searchColor("svg");pgs(document).querySelector("lottieChangeColor")&&document.querySelectorAll("lottie-player").forEach(n=>{r.watchedLotties.has(n)||(n.addEventListener("load",()=>r._changeColor(r._getLottieSvg(n),r._getCurrentDarkmode(),r.searchColor("svg"))),r.watchedLotties.add(n)),n.shadowRoot&&r._changeColor(r._getLottieSvg(n),e,t)})}};r.init();const i={eventChangeColor:r.eventChangeColor,applyColorsSVG:e=>r.applyColorsSVG(e),applyColorsLottie:e=>r.applyColorsLottie(e)};n(359);const s=new WeakMap;let a=0;function c(e,t){return Array.from(e.children).find(e=>pgs(e).contains(t))}function l(e=document){pgs(e).querySelectorAll("accordion").forEach(e=>{if(s.has(e))return;const t=c(e,"accordion-button"),n=c(e,"accordion-content");if(!t||!n)return;const o=(a+=1,a),r=`acc-btn-${o}`,i=`acc-panel-${o}`,u=pgs(e).state.contains("open");function d(e,t,n){const o=(t?.textContent||"").trim().replace(/\s+/g," ");t.setAttribute("aria-label",`${e?"Chiudi":"Apri"} ${o||"sezione"}`),t.setAttribute("aria-expanded",String(e)),n.hidden=!e}function p(){const o=!pgs(e).state.contains("open");pgs(e).state.toggle("open",o),d(o,t,n),function(){for(const t of pgs(document).querySelectorAll("accordion")){if(t===e)continue;const n=pgs(t).querySelector("accordion-button"),o=pgs(t).querySelector("accordion-content");n&&o&&(pgs(t).state().remove("open"),d(!1,n,o))}}(),o&&setTimeout(()=>e.scrollIntoView({block:"nearest",inline:"nearest"}),100)}t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.id||t.setAttribute("id",r),n.id||n.setAttribute("id",i),t.setAttribute("aria-controls",n.id),n.setAttribute("role","region"),n.setAttribute("aria-labelledby",t.id),d(u,t,n),t.addEventListener("click",p),t.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),p())}),s.set(e,{element:e,button:t,content:n,open:function(){pgs(e).state.contains("open")||p()},close:function(){pgs(e).state.contains("open")&&p()},toggle:p,refresh:()=>(l(e.parentNode||document),s.get(e)),isOpen:()=>pgs(e).state.contains("open")})})}l();const u={init:l,api:function(e){return s.get(e)}},d=new WeakMap,p=new Set;let g=0;function f(e){return e instanceof Element&&pgs(e).contains("dropdown-content")}function m(e){const t=d.get(e);if(!t||!t.isOpen())return;const{trigger:n,content:o}=t,{side:r,align:i}=function(e){const t=(pgs(e).option.getValueBrackets("position")||"bottom center").trim().toLowerCase().split(/\s+/).filter(Boolean),n=t.find(e=>["top","right","bottom","left"].includes(e))||"bottom",o=t.find(e=>["top","right","bottom","left","center"].includes(e)&&e!==n)||"center";return{side:n,align:o}}(e),s=n.getBoundingClientRect(),a=o.getBoundingClientRect(),c=document.documentElement.clientWidth,l=Math.max(8,c-a.width-8);let u=s.left+(s.width-a.width)/2,p=s.bottom+8;var g,f;"top"!==r&&"bottom"!==r||(p="top"===r?s.top-a.height-8:s.bottom+8,"left"===i&&(u=s.left),"right"===i&&(u=s.right-a.width)),"left"!==r&&"right"!==r||(u="left"===r?s.left-a.width-8:s.right+8,p=s.top+(s.height-a.height)/2,"top"===i&&(p=s.top),"bottom"===i&&(p=s.bottom-a.height)),"left"===r&&u<8&&(u=s.right+8),"right"===r&&u+a.width>c-8&&(u=s.left-a.width-8),g=u,f=l,u=Math.min(Math.max(g,8),f),o.style.setProperty("--dropdown-left",`${Math.round(u)}px`),o.style.setProperty("--dropdown-top",`${Math.round(p)}px`)}function h(){p.forEach(m)}function b(e){const t=d.get(e);t&&t.isOpen()&&(pgs(e).state.remove("open"),t.trigger.setAttribute("aria-expanded","false"),p.delete(e))}function y(e){const t=d.get(e);t&&!t.isOpen()&&(p.forEach(t=>{t!==e&&b(t)}),pgs(e).state.add("open"),t.trigger.setAttribute("aria-expanded","true"),p.add(e),m(e))}function v(e){const t=d.get(e);t&&(t.isOpen()?b(e):y(e))}function A(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("dropdown")?[e]:[];return t.push(...pgs(e).querySelectorAll("dropdown")),t})(e).forEach(e=>{if(d.has(e))return;const t=(n=e,Array.from(n.children).find(f)||pgs(n).querySelector("dropdown-content"));var n;if(!t)return;const o=function(e,t){const n=Array.from(e.children).filter(e=>e!==t);return n.find(e=>pgs(e).contains("dropdown-button"))||n.find(e=>!f(e))||e}(e,t),r=(g+=1,g);o.id||(o.id=`dropdown-btn-${r}`),t.id||(t.id=`dropdown-panel-${r}`),o.matches("button")&&!o.hasAttribute("type")&&o.setAttribute("type","button"),o.setAttribute("aria-haspopup","true"),o.setAttribute("aria-controls",t.id),o.setAttribute("aria-expanded",String(pgs(e).state.contains("open"))),t.setAttribute("aria-labelledby",o.id);const i={element:e,trigger:o,content:t,open:()=>y(e),close:()=>b(e),toggle:()=>v(e),refresh:()=>(A(e.parentNode||document),m(e),d.get(e)),isOpen:()=>pgs(e).state.contains("open")};o.addEventListener("click",t=>{f(t.target)||(t.preventDefault(),t.stopPropagation(),v(e))}),t.addEventListener("click",e=>e.stopPropagation()),d.set(e,i),i.isOpen()&&p.add(e),m(e)})}document.addEventListener("click",e=>{var t;t=e.target,Array.from(p).some(e=>e.contains(t))||p.forEach(b)}),document.addEventListener("keydown",e=>{"Escape"===e.key&&p.forEach(b)}),window.addEventListener("resize",h),window.addEventListener("scroll",h,!0),A();const w={init:A,api:function(e){return d.get(e)}},S=new WeakMap;function E(e=document){pgs(e).querySelectorAll("menu").forEach(e=>{S.has(e)||(e.querySelectorAll("li").forEach(e=>{const t=e.querySelector("ul");if(t){const n=document.createElement("button");n.type="button",n.innerHTML="<span>⏷</span>",pgs(n).add("menu-buttonIcon"),e.querySelector("a").insertAdjacentElement("afterend",n),pgs(e).add("dropdown"),pgs(e).option.setValueBrackets("position","bottom right"),pgs(n).add("dropdown-button"),pgs(n).add("buttonNohover"),pgs(t).add("dropdown-content")}}),S.set(e,{element:e,type:"horizontal",refresh:()=>(E(e.parentNode||document),S.get(e))}),w.init(e))})}E();const k={init:E,api:function(e){return S.get(e)}},L=new WeakMap;function C(e="modal"){pgs(document).querySelectorAll(e).forEach(t=>{if(L.has(t))return;const n=pgs(t).querySelector("modal-button"),o=t.querySelector("dialog");if(!n||!o)return;const r='<button pgs="buttonClose modal-close" type="button" tabindex="0" aria-label="Chiudi"><i class="fa-solid fa-close"></i></button>',i=pgs(t)?.querySelector("modal-dialog-content-header"),s=pgs(t).option.contains("disableBackdropClose"),a=pgs(t).option.contains("history"),c=pgs(t).option.getValueBrackets("containerID"),l=pgs(t).option.getValueBrackets("containerPGS"),u=pgs(o).option.contains("topLevel");pgs(t).querySelector("modal-close")||(i?i.insertAdjacentHTML("beforeend",r):o.insertAdjacentHTML("beforeend",r));const d=pgs(t).querySelector("modal-close");function p(e=!0){n?.setAttribute("aria-expanded",e),o?.setAttribute("aria-expanded",e)}function g(e){e?.stopImmediatePropagation(),o.open?f(e):(o.open||document.querySelectorAll("dialog[open]").forEach(e=>e.close()),p(!0),u?o.showModal():o.show(),t.dispatchEvent(new CustomEvent("modal:open")),o.dispatchEvent(new CustomEvent("modal:open")))}function f(e){e?.stopImmediatePropagation(),p(!1),o.close(),t.dispatchEvent(new CustomEvent("modal:close")),o.dispatchEvent(new CustomEvent("modal:close"))}pgs(o).add("dialog modal-dialog"),n.setAttribute("role","button"),n.setAttribute("aria-label","apri modale"),u||(c?document.querySelector("#"+c)?.append(o):l?pgs(document).querySelector(l)?.append(o):document.body.append(o)),n.addEventListener("click",e=>g(e)),n.addEventListener("keypress",e=>!o.open&&("Enter"===e.key||" "===e.key)&&g(e)),o.addEventListener("close",()=>p(!1)),o.addEventListener("click",e=>{e.target!=o||s||f(e)}),d?.addEventListener("click",e=>f(e)),a&&n.id&&(setTimeout(function(){new URLSearchParams(window.location.search).get("modal")===n.id&&(document.getElementById(n.id)?.scrollIntoView({behavior:"smooth"}),g())},1),new MutationObserver(()=>{let e=o.hasAttribute("open");try{const t=new URL(window.location.href),o=new URLSearchParams(t.search);e?o.set("modal",n.id):o.delete("modal"),t.search=o.toString()?`?${o.toString()}`:"",window.history.pushState({modal:n.id,open:e},"",t)}catch(e){}}).observe(o,{attributes:!0,attributeFilter:["open"]}),window.addEventListener("popstate",()=>{try{const e=new URLSearchParams(window.location.search).get("modal")===n.id;e&&!o.open&&o.showModal(),!e&&o.open&&f()}catch(e){}})),L.set(t,{element:t,button:n,dialog:o,closeButton:d,open:function(e){o.open||g(e)},close:function(e){o.open&&f(e)},toggle:g,refresh:()=>(C(e),L.get(t)),isOpen:()=>o.open})})}C();const q={init:C,api:function(e){return L.get(e)}},x=new WeakMap,M=new Set;let O=0;const T={minLength:2,debounce:200,limit:8,submitOnSelect:!1,searchOnFocus:!0,source:null,onSelect:null};function _(e){if("string"==typeof e||"number"==typeof e){const t=String(e).trim();return t?{label:t,value:t,disabled:!1,data:e}:null}if(!e||"object"!=typeof e)return null;const t=String(e.label??e.value??"").trim();return t?{label:t,value:String(e.value??t),disabled:Boolean(e.disabled),data:Object.prototype.hasOwnProperty.call(e,"data")?e.data:e}:null}function D(e){const t=x.get(e);t&&(pgs(e).state.remove("open"),t.input.setAttribute("aria-expanded","false"),t.input.removeAttribute("aria-activedescendant"),t.list.setAttribute("aria-hidden","true"),t.setActiveIndex(-1),M.delete(e))}function I(e){const t=x.get(e);t&&0!==t.items().length&&(pgs(e).state.add("open"),t.input.setAttribute("aria-expanded","true"),t.list.setAttribute("aria-hidden","false"),M.add(e))}function j(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("search")?[e]:[];return t.push(...pgs(e).querySelectorAll("search")),t})(e).forEach(e=>{if(x.has(e))return;const t=e.querySelector('input[type="search"]'),n=(o=e,Array.from(o.children).find(e=>pgs(e).contains("search-suggestions")));var o;if(!t||!n)return;const r=(O+=1,O);t.id||(t.id=`search-input-${r}`),n.id||(n.id=`search-suggestions-${r}`),t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-controls",n.id),t.setAttribute("aria-expanded","false"),t.setAttribute("autocomplete","off"),n.setAttribute("role","listbox"),n.setAttribute("aria-labelledby",t.id),n.setAttribute("aria-hidden","true");let i={...T},s=[],a=-1,c=null,l=null,u=0;function d(n){pgs(e).state.toggle("loading",n),t.setAttribute("aria-busy",String(n))}function p(e){a=e;const o=Array.from(n.querySelectorAll('[pgs~="search-suggestions-item"]'));o.forEach((e,t)=>{const n=t===a;e.setAttribute("aria-selected",String(n)),pgs(e).state.toggle("selected",n)});const r=o[a];r?(t.setAttribute("aria-activedescendant",r.id),r.scrollIntoView({block:"nearest"})):t.removeAttribute("aria-activedescendant")}function g(e){if(!s.length)return;let t=a;for(let n=0;n<s.length;n+=1)if(t=(t+e+s.length)%s.length,!s[t].disabled)return void p(t)}function f(){s=[],a=-1,n.replaceChildren(),D(e)}function m(){null!==c&&window.clearTimeout(c),c=null,l&&l.abort(),l=null,u+=1,d(!1)}async function h(o=t.value){m(),f();const r=String(o??"").trim();if(r.length<i.minLength||!i.source)return[];const c=u;l=new AbortController;const p=l;d(!0);try{const o=await async function(n,o){if(Array.isArray(i.source)){const e=n.toLocaleLowerCase();return i.source.filter(t=>{const n=_(t);return n&&n.label.toLocaleLowerCase().includes(e)})}return"function"!=typeof i.source?[]:await i.source({query:n,signal:o,limit:i.limit,element:e,input:t})}(r,p.signal);return c!==u||p.signal.aborted?[]:function(t){s=Array.from(t||[]).map(_).filter(Boolean).slice(0,i.limit);const o=document.createDocumentFragment();return s.forEach((e,t)=>{const r=document.createElement("li");pgs(r).add("search-suggestions-item"),pgs(r).add("flexRow"),r.id=`${n.id}-option-${t}`,r.dataset.index=String(t),r.setAttribute("role","option"),r.setAttribute("aria-selected","false"),r.setAttribute("aria-disabled",String(e.disabled)),r.innerHTML='<i class="fa-solid fa-magnifying-glass"></i>'+e.label,o.append(r)}),a=-1,n.replaceChildren(o),pgs(e).state.remove("error"),s.length?I(e):D(e),s}(o)}catch(t){return"AbortError"===t?.name||c!==u||(f(),pgs(e).state.add("error"),e.dispatchEvent(new CustomEvent("pgs:search:error",{bubbles:!0,detail:{error:t,query:r}}))),[]}finally{l===p&&(l=null),c===u&&d(!1)}}function b(){m(),f(),pgs(e).state.remove("error"),t.value.trim().length<i.minLength||!i.source||(c=window.setTimeout(()=>{c=null,h(t.value)},i.debounce))}function y(n=a,o=i.submitOnSelect){const r=s[n];if(!r||r.disabled)return null;t.value=r.value,m(),f();const c={item:r,index:n,value:r.value,input:t,element:e};return e.dispatchEvent(new CustomEvent("pgs:search:select",{bubbles:!0,detail:c})),i.onSelect?.(c),t.focus(),o&&"function"==typeof e.requestSubmit&&e.requestSubmit(),r}function v(e={}){return i=function(e,t={}){const n={...e,...t};return n.minLength=Math.max(0,Number.parseInt(n.minLength,10)||0),n.debounce=Math.max(0,Number.parseInt(n.debounce,10)||0),n.limit=Math.max(1,Number.parseInt(n.limit,10)||T.limit),n.submitOnSelect=Boolean(n.submitOnSelect),n.searchOnFocus=Boolean(n.searchOnFocus),n.source="function"==typeof n.source||Array.isArray(n.source)?n.source:null,n.onSelect="function"==typeof n.onSelect?n.onSelect:null,n}(i,e),L}function A(){b()}function w(){s.length?I(e):i.searchOnFocus&&b()}function S(t){return"ArrowDown"===t.key?(pgs(e).state.contains("open")||b(),void(s.length&&(t.preventDefault(),g(1)))):"ArrowUp"===t.key&&s.length?(t.preventDefault(),void g(-1)):"Enter"===t.key&&a>=0?(t.preventDefault(),void y(a)):"Escape"===t.key?(t.preventDefault(),m(),void D(e)):void("Tab"===t.key&&D(e))}function E(e){const t=e.target.closest('[pgs~="search-suggestions-item"]');t&&n.contains(t)&&(e.preventDefault(),y(Number.parseInt(t.dataset.index,10)))}function k(){m(),D(e)}const L={element:e,input:t,list:n,configure:v,setSource:e=>v({source:e}),search:h,open:()=>I(e),close:()=>D(e),clear:f,cancel:m,select:y,refresh:()=>h(t.value),destroy:function(){m(),f(),t.removeEventListener("input",A),t.removeEventListener("focus",w),t.removeEventListener("keydown",S),n.removeEventListener("pointerdown",E),e.removeEventListener("submit",k),x.delete(e)},items:()=>[...s],isOpen:()=>pgs(e).state.contains("open"),isLoading:()=>pgs(e).state.contains("loading"),setActiveIndex:p};t.addEventListener("input",A),t.addEventListener("focus",w),t.addEventListener("keydown",S),n.addEventListener("pointerdown",E),e.addEventListener("submit",k),x.set(e,L)})}document.addEventListener("pointerdown",e=>{M.forEach(t=>{t.contains(e.target)||D(t)})}),j();const $={init:j,api:function(e){return x.get(e)}};function N(e,t){const n=(()=>{let e=0,t=0,n=0,o=!1;return{update:function(r){const i=performance.now(),s=i-e;let a=Math.abs(r.deltaY);return 1===r.deltaMode?a*=16:2===r.deltaMode&&(a*=r.currentTarget?.clientHeight||800),a<30&&s<35&&t++,n++,n>=6&&(o=t>=3,t=0,n=0),e=i,o},get value(){return o}}})();let o=e;o.addEventListener("wheel",e=>{const r=t;if(n.update(e))return;if(e.ctrlKey)return;if(Math.abs(e.deltaX)>Math.abs(e.deltaY))return;let i=e.deltaY;1===e.deltaMode?i*=16:2===e.deltaMode&&(i*=o.clientHeight);const s=o.scrollLeft<=0,a=o.scrollLeft+o.clientWidth>=o.scrollWidth-1;(i>0&&!a||i<0&&!s)&&(e.preventDefault(),o.scrollLeft+=i*r)},{passive:!1})}const B=new WeakMap;class P{constructor({selector:e,viewRatio:t=.97,optionIntersectionObserver:n={},scrollOptions:o={}}={}){this.selector=e,this.viewRatio=t,this.optionIntersectionObserver={threshold:Array.from({length:101},(e,t)=>t/100),rootMargin:"0px",...n},this.scrollOptions={behavior:"smooth",inline:"center",block:"nearest",container:"nearest",...o},this.container=this.selector?pgs(this.selector).querySelector("slides-container"):null}#e(){const e=this.selector;pgs(e).querySelector("slides-prec")||pgs(e).querySelector("slides-next")||(e.insertAdjacentHTML("afterbegin",'<button pgs="slides-prec buttonIcon" type="button" class="precButton" aria-label="slide precedente"> <span> <i class="fa-solid fa-arrow-left"></i></span></button>'),e.insertAdjacentHTML("beforeend",'<button pgs="slides-next buttonIcon" type="button" class="nextButton" aria-label="prossima slide"> <span> <i class="fa-solid fa-arrow-right"></i></span></button>')),pgs(e).querySelector("slides-dots")||(e.insertAdjacentHTML("beforeend",'<div pgs="slides-dots" class="slides-dots"></div>'),Array.from(this.container.children).forEach(()=>{pgs(e).querySelector("slides-dots").insertAdjacentHTML("beforeend",'<button type="button" class="slide-dot" aria-label="vai alla prossima slide"></button>')}))}#t(){const e=this.container.querySelectorAll(".view");let t;t=pgs(this.selector).option.contains("singleScroll")?e[e.length-1]:e[0];const n=t?.previousElementSibling;n?.scrollIntoView(this.scrollOptions),n?.focus({preventScroll:!0})}#n(){const e=this.container.querySelectorAll(".view");let t;t=pgs(this.selector).option.contains("singleScroll")?e[0]:e[e.length-1];const n=t?.nextElementSibling;console.log(t,n),n?.scrollIntoView(this.scrollOptions),n?.focus({preventScroll:!0})}#o(e){this.container.children[e].scrollIntoView(this.scrollOptions)}#r(e,t,n,o,r){e.forEach(e=>{const i=.9+.1*e.intersectionRatio,s=i>=.98;!pgs(e.target).option.contains("notScrollAnimation")&&e.target.firstElementChild&&e.target.firstElementChild.style.setProperty("--visible-percent",`${i}`),e.target.classList.toggle("view",s),e.target.classList.toggle("notView",!s);const a=e.target.parentNode.children,c=a[0].classList.contains("view"),l=a[a.length-1].classList.contains("view");o.disabled=l,n.disabled=c,o.setAttribute("aria-disabled",String(l)),n.setAttribute("aria-disabled",String(c));const u=Array.from(t.children).filter(e=>e.classList.contains("view"));r.forEach((e,n)=>{const o=u.some(e=>Array.from(t.children).indexOf(e)===n);e.classList.toggle("active",o),e.setAttribute("aria-current",o?"true":"false")})})}execute(){const e=this.selector;if(!this.container)return;this.#e();const t=pgs(e).querySelector("slides-prec"),n=pgs(e).querySelector("slides-next"),o=Array.from(pgs(e).querySelector("slides-dots").children);pgs(e).option.contains("notScrollWithMouse")||N(this.container,5),o.forEach((e,t)=>e.addEventListener("click",e=>this.#o(t))),t.addEventListener("click",e=>this.#t(),{passive:!0}),n.addEventListener("click",e=>this.#n(),{passive:!0});const r=new IntersectionObserver(e=>this.#r(e,this.container,t,n,o),{root:this.container,...this.optionIntersectionObserver});Array.from(this.container.children).forEach(e=>r.observe(e)),B.set(this.selector,{element:this.selector,container:this.container,previous:()=>this.#t(),next:()=>this.#n(),goTo:e=>this.#o(e),getCurrentIndexes:()=>Array.from(this.container.children).map((e,t)=>e.classList.contains("view")?t:-1).filter(e=>-1!==e),getCurrentElements:()=>Array.from(this.container.children).filter(e=>e.classList.contains("view")),getTotal:()=>this.container.children.length,isAtStart:()=>this.container.children[0]?.classList.contains("view")||!1,isAtEnd:()=>{const e=this.container.children,t=e[e.length-1];return t?.classList.contains("view")||!1},refresh:()=>(R(this.selector.parentNode||document),B.get(this.selector))})}}function R(e=document){pgs(e).querySelectorAll("slides").forEach(e=>{B.has(e)||new P({selector:e}).execute()})}R();const H={init:R,api:function(e){return B.get(e)}},z=new WeakMap;function V(e=document){pgs(e).querySelectorAll("steps").forEach(e=>{z.has(e)||(pgs(e).querySelectorAll("steps-step").forEach((e,t)=>{let n;if(pgs(e).querySelector("steps-step-circle")?n=pgs(e).querySelector("steps-step-circle"):(n=document.createElement("span"),pgs(n).add("steps-step-circle"),n.textContent=t+1,e.insertAdjacentElement("afterbegin",n)),!pgs(e).querySelector("steps-step-line")){const t=document.createElement("span");pgs(t).add("steps-step-line"),e.insertAdjacentElement("afterbegin",t)}}),z.set(e,{element:e,steps:()=>Array.from(pgs(e).querySelectorAll("steps-step")),getStep:t=>pgs(e).querySelectorAll("steps-step")[t],getTotal:()=>pgs(e).querySelectorAll("steps-step").length,refresh:()=>(z.delete(e),V(e.parentNode||document),z.get(e))}))})}V();const F={init:V,api:function(e){return z.get(e)}},W=new WeakMap;function G(e=document){pgs(e).querySelectorAll("stepTabs").forEach(e=>{if("true"===e.dataset.stepTabsInitialized)return;e.dataset.stepTabsInitialized="true";const t=pgs(e).querySelector("stepTabs-prev"),n=pgs(e).querySelector("stepTabs-next"),o=pgs(e).querySelector("stepTabs-restart"),r=pgs(e).querySelector("stepTabs-dots"),i=pgs(e).querySelector("stepTabs-container"),s=pgs(i).querySelectorAll("tab"),a=s.length,c=Array.from(s).filter(e=>pgs(e).state.contains("is-locked"));let l=0;t&&(t.disabled=!0);let u=!1;if(!i||0===a)return;const d=[];function p(e,t,n){e&&n!==pgs(e).state.contains(t)&&pgs(e).state.toggle(t,n)}function g(){const e=s[l];t&&(t.disabled=0===l),n&&(n.disabled=l===a-1||pgs(e).state.contains("is-locked"))}function f(t,n=!0){l=Math.min(Math.max(t,0),a-1);const o=s[l];u=!0,s.forEach((e,t)=>p(e,"is-active",t===l)),g(),d.forEach((e,t)=>{p(e,"is-active",t===l),p(e,"is-completed",t<l)}),u=!1,n&&!e.closest("dialog")&&(o?.focus(),e?.scrollIntoView({behavior:"smooth",block:"start"})),e.dispatchEvent(new CustomEvent("stepTabs:change",{detail:{current:l,total:a}}))}function m(){f(0),c.forEach(e=>pgs(e).state.add("is-locked"))}r&&(r.innerHTML="",s.forEach((e,t)=>{const n=pgs(e).option.getValueBrackets("tabIcon")||"fa-circle",o=document.createElement("button");o.type="button",pgs(o).add("stepTabs-dots-dot"),o.setAttribute("data-step",t),o.innerHTML=`<i class="fa-solid ${n}"></i>`,o.addEventListener("click",()=>{pgs(o).state.contains("is-completed")&&f(t,!0)}),r.appendChild(o),d.push(o)})),f(0,!1);const h=new MutationObserver(()=>{u||g()});s?.forEach(e=>h.observe(e,{attributes:!0,attributeFilter:["pgs-state"]})),t?.addEventListener("click",e=>f(l-1)),n?.addEventListener("click",e=>{g(),n.disabled||f(l+1)}),o?.addEventListener("click",e=>m(),{capture:!0}),W.set(e,{element:e,container:i,restart:m,goTo:f,next:()=>f(l+1),prev:()=>f(l-1),toggleLock:(e,t=!0)=>"number"==typeof e&&s[e]&&(pgs(s[e]).state.toggle("is-locked",t),f(l)),refresh:()=>(G(e.parentNode||document),W.get(e)),getCurrent:()=>l,getState:()=>({current:l,total:a})})})}G();const Y={init:G,api:function(e){return W.get(e)}},U=new WeakMap;let J=0;function K(e,t){return Array.from(e.children).find(e=>pgs(e).contains(t))}function X(e=document){pgs(e).querySelectorAll("summary").forEach(e=>{if(U.has(e))return;const t=K(e,"summary-content"),n=K(e,"summary-button");if(!t||!n)return;const o=(J+=1,J),r=t.id||`summary-content-${o}`;function i(){return pgs(e).state.contains("open")}function s(){return 3*function(e){const t=window.getComputedStyle(e),n=parseFloat(t.lineHeight);if(Number.isFinite(n))return n;const o=parseFloat(t.fontSize);return Number.isFinite(o)?1.2*o:0}(t)}function a(o){const r=t.scrollHeight>Math.ceil(s())+1;pgs(e).state.toggle("overflow",r),pgs(e).state.toggle("open",o&&r),n.hidden=!r,n.setAttribute("aria-hidden",String(!r)),n.setAttribute("aria-expanded",String(o&&r)),n.textContent=o&&r?"Mostra meno":"Mostra di più";const i=o&&r?t.scrollHeight:s();t.style.setProperty("--summary-content-max-height",`${i}px`)}function c(){const e=i();t.style.setProperty("--summary-content-max-height","none"),a(e)}function l(){a(!i())}t.id=r,n.type||="button",n.setAttribute("aria-controls",t.id),n.addEventListener("click",l),window.addEventListener("resize",c,{passive:!0}),c(),requestAnimationFrame(c),U.set(e,{element:e,content:t,button:n,open:()=>a(!0),close:()=>a(!1),toggle:l,refresh:c,isOpen:i})})}X();const Q={init:X,api:function(e){return U.get(e)}},Z={_escapeHtml:e=>String(e??""),_getDuration(e){const t=e.duration,n=Number.parseInt(t,10);return Number.isNaN(n)?5e3:n},_getApi:e=>"toast"===String(e.element||"notification").trim()?te.toast:te.alert,_getType(e,t){const n=String(e.type||"info").trim();return"function"==typeof t[n]?n:"info"},_getData(e){try{return JSON.parse(e.dataset.notification||"{}")}catch(e){return console.warn("PGS notification: dati non validi",e),{}}},_getContent(e,t){const n=this._escapeHtml(t),o=this._escapeHtml(e);return o?n?`\n <span pgs="notification-element-title">${o}</span>\n <br>\n <span pgs="notification-element-content">${n}</span>\n `:`<span pgs="notification-element-title">${o}</span>`:n},initNotification(e,t,n,o,r,i="replace",s=null){let a=pgs(document).querySelector(t);if(!a){const e=document.createElement("div");pgs(e).add(t),e.setAttribute("aria-live","polite"),e.setAttribute("aria-relevant","additions"),document.body.appendChild(e),a=e}const c=document.createElement(s?"a":"div");function l(){"stack"==i?c.style.translate="120%":c.style.opacity="0",setTimeout(()=>c.remove(),300)}"replace"==i&&(a.innerHTML=""),s&&(c.href=s),r>0&&c.style.setProperty("--notification-timeout",r+"ms"),pgs(c).state.add(e),pgs(c).add("notification-element"),c.setAttribute("role","error"==e?"alert":"status"),c.innerHTML=`${n} <p>${o}</p>`,a.appendChild(c),r>0&&setTimeout(()=>{l()},r);const u=document.createElement("button");u.type="button",u.ariaLabel="Rimuovi notifica",u.innerHTML='<i class="fa-solid fa-xmark"></i>',u.setAttribute("pgs","buttonClose"),c.insertAdjacentElement("afterbegin",u),u.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),l()})},deleteAll(e){let t=pgs(document).querySelector(e);t&&(t.innerHTML="")},trigger(e=document){pgs(e).querySelectorAll("notificationTrigger").forEach(e=>{if(!e||"true"===e.dataset.initialize)return;e.dataset.initialize="true";const t=this._getData(e),n=String(t.title||"").trim(),o=String(t.message||"").trim();if(!n&&!o)return void e.remove();const r=t.link||null,i=t.icon||void 0,s=this._getDuration(t),a=this._getApi(t),c=this._getType(t,a),l=this._getContent(n,o);a===te.toast?a[c](l,s,i):a[c](l,r,s,i),e.remove()})}};function ee(e=document){return Z.trigger(e)}const te={trigger:ee,alert:{error:(e="Errore",t=null,n=0,o='<i class="fa-solid fa-circle-xmark"></i>')=>Z.initNotification("error","notification",o,e,n,"stack",t),success:(e="Aggiornato",t=null,n=0,o='<i class="fa-solid fa-check"></i>')=>Z.initNotification("success","notification",o,e,n,"stack",t),info:(e="Aggiornamento",t=null,n=0,o='<i class="fa-solid fa-circle-info"></i>')=>Z.initNotification("info","notification",o,e,n,"stack",t),warning:(e="Attenzione",t=null,n=0,o='<i class="fa-solid fa-triangle-exclamation"></i>')=>Z.initNotification("warning","notification",o,e,n,"stack",t),deleteAll:()=>Z.deleteAll("notification")},toast:{error:(e="Errore",t=4e3,n='<i class="fa-solid fa-circle-xmark"></i>')=>Z.initNotification("error","toast",n,e,t),success:(e="Aggiornato",t=4e3,n='<i class="fa-solid fa-check"></i>')=>Z.initNotification("success","toast",n,e,t),info:(e="Aggiornamento",t=0,n='<i class="fa-solid fa-circle-info"></i>')=>Z.initNotification("info","toast",n,e,t),warning:(e="Attenzione",t=4e3,n='<i class="fa-solid fa-triangle-exclamation"></i>')=>Z.initNotification("warning","toast",n,e,t),deleteAll:()=>Z.deleteAll("toast")}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>ee()):ee(),e.registerModules({svg:i,accordion:u,dropdown:w,menu:k,modal:q,notification:te,search:$,slides:H,stepTabs:Y,steps:F,summary:Q,formValidate:class{constructor({form:e}={}){this.container=e,this._rules=[]}addError(e,t){e.setAttribute("data-form-field-status","error"),0==t&&e.scrollIntoView();let n=e.getAttribute("data-form-field-message");0==t&&n?te.toast.error(n):0==t&&te.toast.error("Compila tutti i campi!")}removeError(e){e.setAttribute("data-form-field-status","")}#i(e){e.forEach(e=>{e.addEventListener("click",t=>this.removeError(e))})}help={isRequired:e=>!!e&&((!0===e.required||"true"===e?.dataset?.required||"true"==e?.getAttribute("aria-required"))&&!e.hidden),isEmptyTextLike:e=>!String(e?.value??"").trim(),isEmptySelect:e=>!String(e?.value??"").trim(),getGroupName:e=>e?.name||e?.getAttribute?.("name")||""};#s(e){const t=[];for(const n of this._rules){const o=n(e);o&&(Array.isArray(o)?t.push(...o):t.push(o))}const n=Array.from(e.querySelectorAll("input")).filter(e=>!e.disabled&&"hidden"!==e.type&&"checkbox"!==e.type&&"radio"!==e.type&&"file"!==e.type&&!!this.help.isRequired(e)&&this.help.isEmptyTextLike(e)),o=Array.from(e.querySelectorAll("textarea")).filter(e=>!e.disabled&&!!this.help.isRequired(e)&&this.help.isEmptyTextLike(e)),r=Array.from(e.querySelectorAll("select")).filter(e=>!e.disabled&&!!this.help.isRequired(e)&&this.help.isEmptySelect(e)),i=Array.from(e.querySelectorAll('input[type="radio"]')).filter(e=>!e.disabled),s=new Map;for(const e of i){if(!this.help.isRequired(e))continue;const t=this.help.getGroupName(e);t&&(s.has(t)||s.set(t,[]),s.get(t).push(e))}const a=[];for(const[e,t]of s.entries())t.some(e=>e.checked)||a.push(t[0]);const c=Array.from(e.querySelectorAll('input[type="checkbox"]')).filter(e=>!e.disabled),l=[],u=new Map;for(const e of c){if(!this.help.isRequired(e))continue;const t=this.help.getGroupName(e);t?(u.has(t)||u.set(t,[]),u.get(t).push(e)):e.checked||l.push(e)}const d=[];for(const[e,t]of u.entries())t.some(e=>e.checked)||d.push(t[0]);return[n,o,r,a,l,d,Array.from(e.querySelectorAll('input[type="file"]')).filter(e=>!(e.disabled||!this.help.isRequired(e)||e.files&&e.files.length>0)),t].flat()}validate(){const e=this.#s(this.container),t=this.container.querySelectorAll("input, textarea, select");Array.from(t).filter(e=>!e.disabled);for(const n of t)e.includes(n)||this.removeError(n);return e.forEach((e,t)=>this.addError(e,t)),this.#i(t),e.length?(this.container.setAttribute("data-form-status","error"),!1):(this.container.setAttribute("data-form-status","success"),!0)}ifSuccess(e="Inviato con successo"){1==this.validate()&&te.toast.success(e)}addNewRule(e){if("function"!=typeof e)throw new Error("Rule must be a function");return this._rules.push(e),this}},scrollHorizontal:N}),n(682),n(48)})()})();
|
|
1
|
+
(()=>{var e={795(){function e(e=!1,t){let n="true"===localStorage.getItem("screenIsDarkMode");e&&(n=!n,localStorage.setItem("screenIsDarkMode",n)),pgs(document.documentElement).state.toggle("darkmode",n),pgs(document.body).state.toggle("darkmode",n),function(e,t){e.forEach(e=>{const n=e.querySelector("i");n&&(n.classList.toggle("fa-moon",!t),n.classList.toggle("fa-sun",t))})}(t,n),document.dispatchEvent(new CustomEvent("pgs:svg:changeColor",{detail:{isDarkMode:n}}))}const t=pgs(document).querySelectorAll("toggleDarkmode");e(!1,t),t.forEach(n=>{n.addEventListener("click",()=>e(!0,t))})},359(){document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll('object[type="image/svg+xml"]').forEach(e=>{function t(t){if(!t)return;const n=t.querySelector("svg");if(!n)return;const o=window.getComputedStyle(e);n.setAttribute("preserveAspectRatio","cover"===o.objectFit?"xMidYMid slice":"xMidYMid meet")}function n(){const n=e.contentDocument;if(!n)return;if(!n.querySelector("svg"))return;if(t(n),e.__objectResizeObserver)return;let o=0;const r=new ResizeObserver(()=>{o||(o=requestAnimationFrame(()=>{o=0,t(n)}))});r.observe(e),e.__objectResizeObserver=r}e.contentDocument&&e.contentDocument.querySelector("svg")?n():e.addEventListener("load",n,{once:!0})}),document.body.classList.add("object-loaded")})},682(){const e=pgs(document).querySelector("header");!function(){if(!e)return;const t=pgs(e).querySelectorAll("header-element");t.length||console.log('For the header to work correctly, insert "header-element" under "header"'),t.length&&(t.forEach(t=>{let n,o=!1,r=0;const i=()=>{r||(r=requestAnimationFrame(()=>{r=0,function(r){let i,s=window.getComputedStyle(r),a=parseFloat(s.paddingLeft)+parseFloat(s.paddingRight),c=parseFloat(s.gap),l=parseInt(r.offsetWidth-a);if(o)i=n;else{let e=[];Array.from(r.children).filter(e=>!pgs(e).contains("header-element-onlyMobile")).forEach(t=>{pgs(t).contains("header-element-hamburger")||e.push(...t.children)}),c=Math.round(c*(e.length-1)),i=e.reduce((e,t)=>e+t.offsetWidth,0)-2+c}window.innerWidth<600?(pgs(e).state.add("mobileActive"),pgs(t).state.add("mobileActive")):l<i?(pgs(e).state.add("mobileActive"),pgs(r).state.add("mobileActive"),o=!0,n=i):(pgs(e).state.remove("mobileActive"),pgs(r).state.remove("mobileActive"))}(t)}))};new ResizeObserver(i).observe(t),i()}),window.addEventListener("resize",()=>{window.innerWidth>768&&(e.style.transform="translateY(0)")}))}();let t=0;function n(){t||(t=requestAnimationFrame(()=>{t=0,function(){if(!e)return;const t=window.getComputedStyle(document.documentElement).marginTop??0,n=e.offsetHeight+parseInt(t),o="true"===document.querySelector("header").getAttribute("data-header-scroll")?0:n;document.documentElement.style.setProperty("--heightOfHeader",`${n}px`),document.documentElement.style.setProperty("--heightOfHeaderScroll",`${o}px`)}()}))}e&&(new ResizeObserver(n).observe(e),document.fonts?.ready?.then(n)),n(),window.addEventListener("resize",n),window.addEventListener("scroll",n,{passive:!0});let o=window.scrollY;window.addEventListener("scroll",()=>{if(!e)return;let t=window.scrollY;window.innerHeight<=900&&(t>=80?t>o?(e.style.transform="translateY(-100%)",e.setAttribute("data-header-scroll",!0)):(e.style.transform="translateY(0px)",e.setAttribute("data-header-scroll",!1)):(e.style.transform="translateY(0)",e.setAttribute("data-header-scroll",!1))),o=t})},48(){const e="pgs_cookie_preferences_v1";function t(){window.dataLayer=window.dataLayer||[],window.gtag=window.gtag||function(){window.dataLayer.push(arguments)}}function n(e,t,n){if(!(e instanceof HTMLElement&&t))return;const o=(e.getAttribute("pgs")||"").split(/\s+/).filter(Boolean),r=n?[...new Set([...o,t])]:o.filter(e=>e!==t);r.length>0?e.setAttribute("pgs",r.join(" ")):e.removeAttribute("pgs")}function o(){const o=pgs(document).querySelector("cookieConsent");if(!o)return;const r=o.querySelector('[pgs~="cookieConsent-toggleAnalytics"]'),i=o.querySelector('[pgs~="cookieConsent-actionAccept"]'),s=o.querySelector('[pgs~="cookieConsent-actionReject"]'),a=document.querySelectorAll('[pgs~="cookieConsent-actionOpen"]'),c=(o.dataset.gaId||"").trim(),l=c.length>0;let d=null;function u(e){o.hidden=!e,o.setAttribute("aria-hidden",String(!e)),document.body.classList.toggle("cookieConsent-open",e),e?(d=document.activeElement,setTimeout(()=>{o.focus()},0)):d instanceof HTMLElement&&d.focus({preventScroll:!0})}function p(){u(!1)}function g(r){!function(t){try{localStorage.setItem(e,JSON.stringify({...t,updatedAt:(new Date).toISOString()}))}catch(e){console.warn("PGS cookie consent: impossibile salvare le preferenze",e)}}({analytics:r}),n(o,"cookieConsent-accepted",!!r),n(o,"cookieConsent-declined",!r),function({allowAnalytics:e,measurementId:n}){t(),e?(window.gtag("consent","update",{analytics_storage:"granted"}),function(e){if(!e||window.__PGS_gaLoaded)return;window.__PGS_gaLoaded=!0;const t=document.createElement("script");t.async=!0,t.src=`https://www.googletagmanager.com/gtag/js?id=${e}`,document.head.appendChild(t),window.gtag("js",new Date),window.gtag("config",e,{anonymize_ip:!0,allow_google_signals:!1})}(n)):window.gtag("consent","update",{analytics_storage:"denied"})}({allowAnalytics:!!r,measurementId:c})}!function({root:e,analyticsToggle:t,acceptAllButton:n,rejectButton:o,openButtons:r}){e.dataset.cookieComponent="consent",t?.setAttribute("data-cookie-toggle","analytics"),n?.setAttribute("data-cookie-action","accept"),o?.setAttribute("data-cookie-action","reject"),e.querySelector('[pgs~="cookieConsent-featureEssential"]')?.setAttribute("data-cookie-feature","essential"),e.querySelector('[pgs~="cookieConsent-featureAnalytics"]')?.setAttribute("data-cookie-feature","analytics"),r.forEach(e=>{e.setAttribute("data-cookie-action","open")})}({root:o,analyticsToggle:r,acceptAllButton:i,rejectButton:s,openButtons:a}),r&&(r.disabled=!l,l?n(o,"cookieConsent-gaUnavailable",!1):(r.checked=!1,n(o,"cookieConsent-gaUnavailable",!0))),t(),window.gtag("consent","default",{analytics_storage:"denied"}),i?.addEventListener("click",()=>{r&&l&&(r.checked=!0),g(!!l),p()}),s?.addEventListener("click",()=>{const e=!!r&&r.checked&&l;!e&&r&&(r.checked=!1),g(e),p()}),r?.addEventListener("change",e=>{!l&&e.target instanceof HTMLInputElement&&(e.target.checked=!1)}),o.addEventListener("keydown",e=>{if("Escape"===e.key)e.preventDefault(),p();else if("Tab"===e.key){const t=o.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])');if(0===t.length)return;const n=t[0],r=t[t.length-1];e.shiftKey||document.activeElement!==r||(e.preventDefault(),n.focus()),e.shiftKey&&document.activeElement===n&&(e.preventDefault(),r.focus())}}),a.forEach(e=>{e.addEventListener("click",e=>{e.preventDefault(),u(!0)})});const f=function(){try{return function(e){try{return e?JSON.parse(e):null}catch(e){return console.warn("PGS cookie consent: impossibile leggere le preferenze",e),null}}(localStorage.getItem(e))}catch(e){return null}}();f&&"boolean"==typeof f.analytics?(r&&(r.checked=!!f.analytics&&l),g(f.analytics&&l),p()):u(!0)}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",o):o()}};const t={};function n(o){const r=t[o];if(void 0!==r)return r.exports;const i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}(()=>{"use strict";function e(e){const t="pgs";if(!e)throw new TypeError("pgs(root): root richiesto");const n="function"==typeof e.getAttribute&&"function"==typeof e.setAttribute;if("function"!=typeof e.querySelector||"function"!=typeof e.querySelectorAll)throw new TypeError("pgs(root): root deve supportare querySelector/querySelectorAll");function o(t){throw new TypeError(`pgs(${e.nodeName||"root"}).${t}(): disponibile solo su Element (non su Document)`)}function r(e){return Array.isArray(e)&&(e=e.join(",")),String(e).split(",").map(e=>e.trim()).filter(Boolean).map(e=>`[${t}~="${e}"]`).join(",")}function i(e,n=" "){return(e.getAttribute(t)||"").split(n).filter(Boolean)}function s(e,n,o=" "){e.setAttribute(t,n.join(o))}const a=function(){function a(){return a}return a.querySelector=function(t){return e.querySelector(r(t))},a.querySelectorAll=function(t){return e.querySelectorAll(r(t))},a.add=function(...t){if(!n)return o("add");const r=i(e);for(const e of t)r.includes(e)||r.push(e);return s(e,r),a},a.remove=function(...t){return n?(s(e,i(e).filter(e=>!t.includes(e))),a):o("remove")},a.toggle=function(t,r){if(!n)return o("toggle");const s=i(e).includes(t);return void 0!==r?(r&&!s&&a.add(t),!r&&s&&a.remove(t),!!r):s?(a.remove(t),!1):(a.add(t),!0)},a.contains=function(t){return n?i(e).includes(t):o("contains")},Object.defineProperty(a,"value",{get(){if(n)return e.getAttribute(t)},set(r){if(!n)return o("value");e.setAttribute(t,r)}}),a}();return a.state=function(t){if(!n)return;const o=(n=" ")=>(e.getAttribute(t)||"").split(n).filter(Boolean),r=(n,o=" ")=>e.setAttribute(t,n.join(o));function i(...e){return i.add(...e),i}return i.add=function(...e){const t=e.flat().map(e=>String(e).trim()).filter(Boolean),n=o();for(const e of t)n.includes(e)||n.push(e);return r(n),i},i.remove=function(...e){const t=e.flat().map(e=>String(e).trim()).filter(Boolean),n=o().filter(e=>!t.includes(e));return r(n),i},i.toggle=function(e,t){const n=String(e).trim();if(!n)return!1;const i=o(),s=i.includes(n);return void 0!==t?(t&&!s&&(i.push(n),r(i)),!t&&s&&r(i.filter(e=>e!==n)),!!t):s?(r(i.filter(e=>e!==n)),!1):(i.push(n),r(i),!0)},i.contains=function(e){const t=String(e).trim();return!!t&&o().includes(t)},Object.defineProperty(i,"value",{get:()=>e.getAttribute(t),set(n){e.setAttribute(t,n)}}),i}("pgs-state"),a.option=function(t){if(!n)return;const o=()=>(e.getAttribute(t)||"").match(/[^\s[\]]+(?:\[[^\]]*\])?/g)||[],r=n=>e.setAttribute(t,n.join(" ")),i=e=>String(e).trim().match(/^[^\s[\]]+/)?.[0]||"",s=e=>e.flat().flatMap(e=>String(e).match(/[^\s[\]]+(?:\[[^\]]*\])?/g)||[]).filter(Boolean);function a(){return a}return a.add=function(...e){const t=o();return s(e).forEach(e=>{t.includes(e)||t.push(e)}),r(t),a},a.remove=function(...e){const t=s(e).map(i).filter(Boolean);return r(o().filter(e=>!t.includes(i(e)))),a},a.toggle=function(e,t){const n=i(e);if(!n)return!1;const o=a.contains(n);return void 0!==t?(t&&!o&&a.add(e),!t&&o&&a.remove(n),!!t):o?(a.remove(n),!1):(a.add(e),!0)},a.contains=function(n){const o=e.getAttribute(t)||"",r=String(n).replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return new RegExp(`(?:^|\\s)${r}(?:\\[[^\\]]*\\])?(?=\\s|$)`).test(o)},a.getValueBrackets=function(n){const o=e.getAttribute(t)||"",r=String(n).replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=o.match(new RegExp(`(?:^|\\s)${r}\\[([^\\]]*)\\]`));return i?i[1]:void 0},a.setValueBrackets=function(e,t=""){const n=i(e);if(!n)return a;const s=`${n}[${String(t).trim()}]`,c=o().filter(e=>i(e)!==n);return c.push(s),r(c),a},Object.defineProperty(a,"value",{get:()=>e.getAttribute(t),set(n){e.setAttribute(t,n)}}),a}("pgs-option"),a}const t={};function o(e,n){const o=String(e||"").trim().replace(/^pgs[_-\s]*/i,"").toLowerCase();if(!o)throw new TypeError("pgs.registerImport(...modules): ogni modulo deve avere name o PGS_name");t[o]={name:e,module:n}}e.registerImport=function(...t){return t.flat().forEach(e=>{!e||"object"!=typeof e||e.PGS_name||e.name?o(e?.PGS_name||e?.name,e):Object.entries(e).forEach(([e,t])=>o(e,t))}),e},e.registerModules=function(t={}){return Object.entries(t).forEach(([t,n])=>{const o=String(t||"").trim();if(o){if(Object.prototype.hasOwnProperty.call(e,o)&&e[o]!==n)throw new Error(`pgs.registerModules(): "${o}" e' gia' definito su pgs`);e[o]=n}}),e},e.import=function(...e){return e.flat().reduce((e,n)=>{const o=String(n||"").trim().replace(/^pgs[_-\s]*/i,"").toLowerCase(),r=t[o];if(!r)throw new Error(`pgs.import(): modulo "${n}" non registrato`);return e[r.name]=r.module,e},{})},globalThis.pgs??=e,n(795);const r={eventChangeColor:"pgs:svg:changeColor",watchedObjects:new WeakSet,watchedLotties:new WeakSet,_normalizeColor:(e="")=>e.replace(/\s/g,"").toLocaleLowerCase(),_getCurrentDarkmode:()=>pgs(document.documentElement).state.contains("darkmode"),searchColor(e="svg"){const t=getComputedStyle(document.documentElement),n=[];for(let o=0;o<20;o++){const r=t.getPropertyValue("--"+e+"-color-"+o).toLocaleLowerCase().split("&").map(e=>e.trim());r[0]&&r[1]&&n.push([r[0],r[1]])}return n},_changeColor(e,t,n){e&&e.querySelectorAll("[fill], [stroke]").forEach(e=>{for(const o of n){const n=r._normalizeColor(o[0]),i=r._normalizeColor(o[1]);["fill","stroke"].forEach(o=>{const s=r._normalizeColor(e.getAttribute(o)||"");s&&(e.style.transition="fill 0.5s ease, stroke 0.5s ease",t&&s===n&&e.setAttribute(o,i),t||s!==i||e.setAttribute(o,n))})}})},_getLottieSvg:e=>e.shadowRoot?.querySelector("svg")||null,init(){document.addEventListener(r.eventChangeColor,e=>{r.applyColorsSVG(e.detail?.isDarkMode??r._getCurrentDarkmode()),r.applyColorsLottie(e.detail?.isDarkMode??r._getCurrentDarkmode())}),document.addEventListener("DOMContentLoaded",()=>{r.applyColorsSVG(),r.applyColorsLottie()})},applyColorsSVG(e=r._getCurrentDarkmode()){const t=r.searchColor("svg");pgs(document).querySelector("svgChangeColor")&&document.querySelectorAll('object[type="image/svg+xml"]').forEach(n=>{r.watchedObjects.has(n)||(n.addEventListener("load",()=>r._changeColor(n.contentDocument,r._getCurrentDarkmode(),r.searchColor("svg"))),r.watchedObjects.add(n)),n.contentDocument&&r._changeColor(n.contentDocument,e,t)})},applyColorsLottie(e=r._getCurrentDarkmode()){const t=r.searchColor("svg");pgs(document).querySelector("lottieChangeColor")&&document.querySelectorAll("lottie-player").forEach(n=>{r.watchedLotties.has(n)||(n.addEventListener("load",()=>r._changeColor(r._getLottieSvg(n),r._getCurrentDarkmode(),r.searchColor("svg"))),r.watchedLotties.add(n)),n.shadowRoot&&r._changeColor(r._getLottieSvg(n),e,t)})}};r.init();const i={eventChangeColor:r.eventChangeColor,applyColorsSVG:e=>r.applyColorsSVG(e),applyColorsLottie:e=>r.applyColorsLottie(e)};n(359);const s=new WeakMap;let a=0;function c(e,t){return Array.from(e.children).find(e=>pgs(e).contains(t))}function l(e=document){pgs(e).querySelectorAll("accordion").forEach(e=>{if(s.has(e))return;const t=c(e,"accordion-button"),n=c(e,"accordion-content");if(!t||!n)return;const o=(a+=1,a),r=`acc-btn-${o}`,i=`acc-panel-${o}`,d=pgs(e).state.contains("open");function u(e,t,n){const o=(t?.textContent||"").trim().replace(/\s+/g," ");t.setAttribute("aria-label",`${e?"Chiudi":"Apri"} ${o||"sezione"}`),t.setAttribute("aria-expanded",String(e)),n.hidden=!e}function p(){const o=!pgs(e).state.contains("open");pgs(e).state.toggle("open",o),u(o,t,n),function(){for(const t of pgs(document).querySelectorAll("accordion")){if(t===e)continue;const n=pgs(t).querySelector("accordion-button"),o=pgs(t).querySelector("accordion-content");n&&o&&(pgs(t).state().remove("open"),u(!1,n,o))}}(),o&&setTimeout(()=>e.scrollIntoView({block:"nearest",inline:"nearest"}),100)}t.setAttribute("role","button"),t.setAttribute("tabindex","0"),t.id||t.setAttribute("id",r),n.id||n.setAttribute("id",i),t.setAttribute("aria-controls",n.id),n.setAttribute("role","region"),n.setAttribute("aria-labelledby",t.id),u(d,t,n),t.addEventListener("click",p),t.addEventListener("keydown",e=>{"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),p())}),s.set(e,{element:e,button:t,content:n,open:function(){pgs(e).state.contains("open")||p()},close:function(){pgs(e).state.contains("open")&&p()},toggle:p,refresh:()=>(l(e.parentNode||document),s.get(e)),isOpen:()=>pgs(e).state.contains("open")})})}l();const d={init:l,api:function(e){return s.get(e)}},u=new WeakMap,p=new Set;let g=0;function f(e){return e instanceof Element&&pgs(e).contains("dropdown-content")}function m(e){const t=u.get(e);if(!t||!t.isOpen())return;const{trigger:n,content:o}=t,{side:r,align:i}=function(e){const t=(pgs(e).option.getValueBrackets("position")||"bottom center").trim().toLowerCase().split(/\s+/).filter(Boolean),n=t.find(e=>["top","right","bottom","left"].includes(e))||"bottom",o=t.find(e=>["top","right","bottom","left","center"].includes(e)&&e!==n)||"center";return{side:n,align:o}}(e),s=n.getBoundingClientRect(),a=o.getBoundingClientRect(),c=document.documentElement.clientWidth,l=Math.max(8,c-a.width-8);let d=s.left+(s.width-a.width)/2,p=s.bottom+8;var g,f;"top"!==r&&"bottom"!==r||(p="top"===r?s.top-a.height-8:s.bottom+8,"left"===i&&(d=s.left),"right"===i&&(d=s.right-a.width)),"left"!==r&&"right"!==r||(d="left"===r?s.left-a.width-8:s.right+8,p=s.top+(s.height-a.height)/2,"top"===i&&(p=s.top),"bottom"===i&&(p=s.bottom-a.height)),"left"===r&&d<8&&(d=s.right+8),"right"===r&&d+a.width>c-8&&(d=s.left-a.width-8),g=d,f=l,d=Math.min(Math.max(g,8),f),o.style.setProperty("--dropdown-left",`${Math.round(d)}px`),o.style.setProperty("--dropdown-top",`${Math.round(p)}px`)}function h(){p.forEach(m)}function b(e){const t=u.get(e);t&&t.isOpen()&&(pgs(e).state.remove("open"),t.trigger.setAttribute("aria-expanded","false"),p.delete(e))}function y(e){const t=u.get(e);t&&!t.isOpen()&&(p.forEach(t=>{t!==e&&b(t)}),pgs(e).state.add("open"),t.trigger.setAttribute("aria-expanded","true"),p.add(e),m(e))}function v(e){const t=u.get(e);t&&(t.isOpen()?b(e):y(e))}function w(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("dropdown")?[e]:[];return t.push(...pgs(e).querySelectorAll("dropdown")),t})(e).forEach(e=>{if(u.has(e))return;const t=(n=e,Array.from(n.children).find(f)||pgs(n).querySelector("dropdown-content"));var n;if(!t)return;const o=function(e,t){const n=Array.from(e.children).filter(e=>e!==t);return n.find(e=>pgs(e).contains("dropdown-button"))||n.find(e=>!f(e))||e}(e,t),r=(g+=1,g);o.id||(o.id=`dropdown-btn-${r}`),t.id||(t.id=`dropdown-panel-${r}`),o.matches("button")&&!o.hasAttribute("type")&&o.setAttribute("type","button"),o.setAttribute("aria-haspopup","true"),o.setAttribute("aria-controls",t.id),o.setAttribute("aria-expanded",String(pgs(e).state.contains("open"))),t.setAttribute("aria-labelledby",o.id);const i={element:e,trigger:o,content:t,open:()=>y(e),close:()=>b(e),toggle:()=>v(e),refresh:()=>(w(e.parentNode||document),m(e),u.get(e)),isOpen:()=>pgs(e).state.contains("open")};o.addEventListener("click",t=>{f(t.target)||(t.preventDefault(),t.stopPropagation(),v(e))}),t.addEventListener("click",e=>e.stopPropagation()),u.set(e,i),i.isOpen()&&p.add(e),m(e)})}document.addEventListener("click",e=>{var t;t=e.target,Array.from(p).some(e=>e.contains(t))||p.forEach(b)}),document.addEventListener("keydown",e=>{"Escape"===e.key&&p.forEach(b)}),window.addEventListener("resize",h),window.addEventListener("scroll",h,!0),w();const A={init:w,api:function(e){return u.get(e)}},S=new WeakMap;function E(e=document){pgs(e).querySelectorAll("menu").forEach(e=>{S.has(e)||(e.querySelectorAll("li").forEach(e=>{const t=e.querySelector("ul");if(t){const n=document.createElement("button");n.type="button",n.innerHTML="<span>⏷</span>",pgs(n).add("menu-buttonIcon"),e.querySelector("a").insertAdjacentElement("afterend",n),pgs(e).add("dropdown"),pgs(e).option.setValueBrackets("position","bottom right"),pgs(n).add("dropdown-button"),pgs(n).add("buttonNohover"),pgs(t).add("dropdown-content")}}),S.set(e,{element:e,type:"horizontal",refresh:()=>(E(e.parentNode||document),S.get(e))}),A.init(e))})}E();const k={init:E,api:function(e){return S.get(e)}},L=new WeakMap;function C(e,t=null){if(L.has(e))return;const n=pgs(e).querySelector("modal-button"),o=t||e.querySelector("dialog");if(!n||!o)return;const r=new AbortController,{signal:i}=r;let s=null,a=null;const c='<button pgs="buttonClose modal-close" type="button" tabindex="0" aria-label="Chiudi"><i class="fa-solid fa-close"></i></button>',l=pgs(o).querySelector("modal-dialog-content-header"),d=pgs(e).option.contains("disableBackdropClose"),u=pgs(e).option.contains("history"),p=pgs(e).option.getValueBrackets("containerID"),g=pgs(e).option.getValueBrackets("containerPGS"),f=pgs(o).option.contains("topLevel");pgs(o).querySelector("modal-close")||pgs(e).querySelector("modal-close")||(l?l.insertAdjacentHTML("beforeend",c):o.insertAdjacentHTML("beforeend",c));const m=pgs(o).querySelector("modal-close")||pgs(e).querySelector("modal-close");function h(e=!0){n?.setAttribute("aria-expanded",e),o?.setAttribute("aria-expanded",e)}function b(t){t?.stopImmediatePropagation(),o.open?y(t):(o.open||document.querySelectorAll("dialog[open]").forEach(e=>e.close()),h(!0),f?o.showModal():o.show(),e.dispatchEvent(new CustomEvent("modal:open")),o.dispatchEvent(new CustomEvent("modal:open")))}function y(t){t?.stopImmediatePropagation(),h(!1),o.close(),e.dispatchEvent(new CustomEvent("modal:close")),o.dispatchEvent(new CustomEvent("modal:close"))}pgs(o).add("dialog modal-dialog"),n.setAttribute("role","button"),n.setAttribute("aria-label","apri modale"),f&&!e.contains(o)?e.append(o):f||(p?document.querySelector("#"+p)?.append(o):g?pgs(document).querySelector(g)?.append(o):document.body.append(o)),n.addEventListener("click",e=>b(e),{signal:i}),n.addEventListener("keypress",e=>!o.open&&("Enter"===e.key||" "===e.key)&&b(e),{signal:i}),o.addEventListener("close",()=>h(!1),{signal:i}),o.addEventListener("click",e=>{e.target!=o||d||y(e)},{signal:i}),m?.addEventListener("click",e=>y(e),{signal:i}),u&&n.id&&(a=window.setTimeout(function(){new URLSearchParams(window.location.search).get("modal")===n.id&&(document.getElementById(n.id)?.scrollIntoView({behavior:"smooth"}),b())},1),s=new MutationObserver(()=>{let e=o.hasAttribute("open");try{const t=new URL(window.location.href),o=new URLSearchParams(t.search);e?o.set("modal",n.id):o.delete("modal"),t.search=o.toString()?`?${o.toString()}`:"",window.history.pushState({modal:n.id,open:e},"",t)}catch(e){}}),s.observe(o,{attributes:!0,attributeFilter:["open"]}),window.addEventListener("popstate",()=>{try{const e=new URLSearchParams(window.location.search).get("modal")===n.id;e&&!o.open&&o.showModal(),!e&&o.open&&y()}catch(e){}},{signal:i})),L.set(e,{element:e,button:n,dialog:o,closeButton:m,open:function(e){o.open||b(e)},close:function(e){o.open&&y(e)},toggle:b,refresh:()=>{const t=e.querySelector("dialog")||o;return r.abort(),s?.disconnect(),null!==a&&window.clearTimeout(a),L.delete(e),C(e,t),L.get(e)},isOpen:()=>o.open})}function q(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("modal")?[e]:[];return t.push(...pgs(e).querySelectorAll("modal")),t})(e).forEach(e=>C(e))}q();const x={init:q,api:function(e){return L.get(e)}},M=new WeakMap,T=new Set;let O=0;const _={minLength:2,debounce:200,limit:6,submitOnSelect:!1,searchOnFocus:!0,source:null,onSelect:null};function D(e){if("string"==typeof e||"number"==typeof e){const t=String(e).trim();return t?{label:t,value:t,disabled:!1,data:e}:null}if(!e||"object"!=typeof e)return null;const t=String(e.label??e.value??"").trim();return t?{label:t,value:String(e.value??t),disabled:Boolean(e.disabled),data:Object.prototype.hasOwnProperty.call(e,"data")?e.data:e}:null}function I(e){const t=M.get(e);t&&(pgs(e).state.remove("open"),t.input.setAttribute("aria-expanded","false"),t.input.removeAttribute("aria-activedescendant"),t.list.setAttribute("aria-hidden","true"),t.setActiveIndex(-1),T.delete(e))}function j(e){const t=M.get(e);t&&0!==t.items().length&&(pgs(e).state.add("open"),t.input.setAttribute("aria-expanded","true"),t.list.setAttribute("aria-hidden","false"),T.add(e))}function $(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("search")?[e]:[];return t.push(...pgs(e).querySelectorAll("search")),t})(e).forEach(e=>{if(M.has(e))return;const t=e.querySelector('input[type="search"]'),n=(o=e,Array.from(o.children).find(e=>pgs(e).contains("search-suggestions")));var o;if(!t||!n)return;const r=(O+=1,O);t.id||(t.id=`search-input-${r}`),n.id||(n.id=`search-suggestions-${r}`),t.setAttribute("role","combobox"),t.setAttribute("aria-autocomplete","list"),t.setAttribute("aria-haspopup","listbox"),t.setAttribute("aria-controls",n.id),t.setAttribute("aria-expanded","false"),t.setAttribute("autocomplete","off"),n.setAttribute("role","listbox"),n.setAttribute("aria-labelledby",t.id),n.setAttribute("aria-hidden","true");let i={..._},s=[],a=-1,c=null,l=null,d=0;function u(n){pgs(e).state.toggle("loading",n),t.setAttribute("aria-busy",String(n))}function p(e){a=e;const o=Array.from(n.querySelectorAll('[pgs~="search-suggestions-item"]'));o.forEach((e,t)=>{const n=t===a;e.setAttribute("aria-selected",String(n)),pgs(e).state.toggle("selected",n)});const r=o[a];r?(t.setAttribute("aria-activedescendant",r.id),r.scrollIntoView({block:"nearest"})):t.removeAttribute("aria-activedescendant")}function g(e){if(!s.length)return;let t=a;for(let n=0;n<s.length;n+=1)if(t=(t+e+s.length)%s.length,!s[t].disabled)return void p(t)}function f(){s=[],a=-1,n.replaceChildren(),I(e)}function m(){null!==c&&window.clearTimeout(c),c=null,l&&l.abort(),l=null,d+=1,u(!1)}async function h(o=t.value){m(),f();const r=String(o??"").trim();if(r.length<i.minLength||!i.source)return[];const c=d;l=new AbortController;const p=l;u(!0);try{const o=await async function(n,o){if(Array.isArray(i.source)){const e=n.toLocaleLowerCase();return i.source.filter(t=>{const n=D(t);return n&&n.label.toLocaleLowerCase().includes(e)})}return"function"!=typeof i.source?[]:await i.source({query:n,signal:o,limit:i.limit,element:e,input:t})}(r,p.signal);return c!==d||p.signal.aborted?[]:function(t){s=Array.from(t||[]).map(D).filter(Boolean).slice(0,i.limit);const o=document.createDocumentFragment();return s.forEach((e,t)=>{const r=document.createElement("li");pgs(r).add("search-suggestions-item"),pgs(r).add("flexRow"),r.id=`${n.id}-option-${t}`,r.dataset.index=String(t),r.setAttribute("role","option"),r.setAttribute("aria-selected","false"),r.setAttribute("aria-disabled",String(e.disabled)),r.innerHTML='<i class="fa-solid fa-magnifying-glass"></i>'+e.label,o.append(r)}),a=-1,n.replaceChildren(o),pgs(e).state.remove("error"),s.length?j(e):I(e),s}(o)}catch(t){return"AbortError"===t?.name||c!==d||(f(),pgs(e).state.add("error"),e.dispatchEvent(new CustomEvent("pgs:search:error",{bubbles:!0,detail:{error:t,query:r}}))),[]}finally{l===p&&(l=null),c===d&&u(!1)}}function b(){m(),f(),pgs(e).state.remove("error"),t.value.trim().length<i.minLength||!i.source||(c=window.setTimeout(()=>{c=null,h(t.value)},i.debounce))}function y(n=a,o=i.submitOnSelect){const r=s[n];if(!r||r.disabled)return null;t.value=r.value,m(),f();const c={item:r,index:n,value:r.value,input:t,element:e};return e.dispatchEvent(new CustomEvent("pgs:search:select",{bubbles:!0,detail:c})),i.onSelect?.(c),t.focus(),o&&"function"==typeof e.requestSubmit&&e.requestSubmit(),r}function v(e={}){return i=function(e,t={}){const n={...e,...t};return n.minLength=Math.max(0,Number.parseInt(n.minLength,10)||0),n.debounce=Math.max(0,Number.parseInt(n.debounce,10)||0),n.limit=Math.max(1,Number.parseInt(n.limit,10)||_.limit),n.submitOnSelect=Boolean(n.submitOnSelect),n.searchOnFocus=Boolean(n.searchOnFocus),n.source="function"==typeof n.source||Array.isArray(n.source)?n.source:null,n.onSelect="function"==typeof n.onSelect?n.onSelect:null,n}(i,e),L}function w(){b()}function A(){s.length?j(e):i.searchOnFocus&&b()}function S(t){return"ArrowDown"===t.key?(pgs(e).state.contains("open")||b(),void(s.length&&(t.preventDefault(),g(1)))):"ArrowUp"===t.key&&s.length?(t.preventDefault(),void g(-1)):"Enter"===t.key&&a>=0?(t.preventDefault(),void y(a)):"Escape"===t.key?(t.preventDefault(),m(),void I(e)):void("Tab"===t.key&&I(e))}function E(e){const t=e.target.closest('[pgs~="search-suggestions-item"]');t&&n.contains(t)&&(e.preventDefault(),y(Number.parseInt(t.dataset.index,10)))}function k(){m(),I(e)}const L={element:e,input:t,list:n,configure:v,setSource:e=>v({source:e}),search:h,open:()=>j(e),close:()=>I(e),clear:f,cancel:m,select:y,refresh:()=>h(t.value),destroy:function(){m(),f(),t.removeEventListener("input",w),t.removeEventListener("focus",A),t.removeEventListener("keydown",S),n.removeEventListener("pointerdown",E),e.removeEventListener("submit",k),M.delete(e)},items:()=>[...s],isOpen:()=>pgs(e).state.contains("open"),isLoading:()=>pgs(e).state.contains("loading"),setActiveIndex:p};t.addEventListener("input",w),t.addEventListener("focus",A),t.addEventListener("keydown",S),n.addEventListener("pointerdown",E),e.addEventListener("submit",k),M.set(e,L)})}document.addEventListener("pointerdown",e=>{T.forEach(t=>{t.contains(e.target)||I(t)})}),$();const N={init:$,api:function(e){return M.get(e)}};function B(e,t){const n=(()=>{let e=0,t=0,n=0,o=!1;return{update:function(r){const i=performance.now(),s=i-e;let a=Math.abs(r.deltaY);return 1===r.deltaMode?a*=16:2===r.deltaMode&&(a*=r.currentTarget?.clientHeight||800),a<30&&s<35&&t++,n++,n>=6&&(o=t>=3,t=0,n=0),e=i,o},get value(){return o}}})(),o=o=>{if(n.update(o))return;if(o.ctrlKey)return;if(Math.abs(o.deltaX)>Math.abs(o.deltaY))return;let r=o.deltaY;1===o.deltaMode?r*=16:2===o.deltaMode&&(r*=e.clientHeight);const i=e.scrollLeft<=0,s=e.scrollLeft+e.clientWidth>=e.scrollWidth-1;(r>0&&!s||r<0&&!i)&&(o.preventDefault(),e.scrollLeft+=r*t)};return e.addEventListener("wheel",o,{passive:!1}),()=>e.removeEventListener("wheel",o)}const P=new WeakMap;class R{constructor({element:e,viewRatio:t=.97,optionIntersectionObserver:n={},scrollOptions:o={}}={}){this.element=e,this.viewRatio=t,this.optionIntersectionObserver={threshold:Array.from({length:101},(e,t)=>t/100),rootMargin:"0px",...n},this.scrollOptions={behavior:"smooth",inline:"center",block:"nearest",container:"nearest",...o},this.container=this.element?pgs(this.element).querySelector("slides-container"):null}#e(){const e=this.element;pgs(e).querySelector("slides-prec")||e.insertAdjacentHTML("afterbegin",'<button pgs="slides-prec buttonIcon" type="button" class="precButton" aria-label="slide precedente"> <span> <i class="fa-solid fa-arrow-left"></i></span></button>'),pgs(e).querySelector("slides-next")||e.insertAdjacentHTML("beforeend",'<button pgs="slides-next buttonIcon" type="button" class="nextButton" aria-label="prossima slide"> <span> <i class="fa-solid fa-arrow-right"></i></span></button>'),pgs(e).querySelector("slides-dots")||e.insertAdjacentHTML("beforeend",'<div pgs="slides-dots" class="slides-dots"></div>');const t=pgs(e).querySelector("slides-dots");for(;t.children.length<this.container.children.length;)t.insertAdjacentHTML("beforeend",'<button type="button" class="slide-dot"></button>');for(;t.children.length>this.container.children.length;)t.lastElementChild.remove();Array.from(t.children).forEach((e,t)=>{e.setAttribute("aria-label",`vai alla slide ${t+1}`)})}#t(){const e=this.container.querySelectorAll(".view");let t;t=pgs(this.element).option.contains("singleScroll")?e[e.length-1]:e[0];const n=t?.previousElementSibling;n?.scrollIntoView(this.scrollOptions),n?.focus({preventScroll:!0})}#n(){const e=this.container.querySelectorAll(".view");let t;t=pgs(this.element).option.contains("singleScroll")?e[0]:e[e.length-1];const n=t?.nextElementSibling;n?.scrollIntoView(this.scrollOptions),n?.focus({preventScroll:!0})}#o(e){this.container.children[e]?.scrollIntoView(this.scrollOptions)}#r(e,t,n,o,r){e.forEach(e=>{const i=.9+.1*e.intersectionRatio,s=i>=.98;!pgs(e.target).option.contains("notScrollAnimation")&&e.target.firstElementChild&&e.target.firstElementChild.style.setProperty("--visible-percent",`${i}`),e.target.classList.toggle("view",s),e.target.classList.toggle("notView",!s);const a=e.target.parentNode.children,c=a[0].classList.contains("view"),l=a[a.length-1].classList.contains("view");o.disabled=l,n.disabled=c,o.setAttribute("aria-disabled",String(l)),n.setAttribute("aria-disabled",String(c));const d=Array.from(t.children).filter(e=>e.classList.contains("view"));r.forEach((e,n)=>{const o=d.some(e=>Array.from(t.children).indexOf(e)===n);e.classList.toggle("active",o),e.setAttribute("aria-current",o?"true":"false")})})}execute(){const e=this.element;if(!this.container)return;const t=new AbortController,{signal:n}=t;this.#e();const o=pgs(e).querySelector("slides-prec"),r=pgs(e).querySelector("slides-next"),i=Array.from(pgs(e).querySelector("slides-dots").children),s=pgs(e).option.contains("notScrollWithMouse")?null:B(this.container,5);i.forEach((e,t)=>e.addEventListener("click",()=>this.#o(t),{signal:n})),o.addEventListener("click",()=>this.#t(),{passive:!0,signal:n}),r.addEventListener("click",()=>this.#n(),{passive:!0,signal:n});const a=new IntersectionObserver(e=>this.#r(e,this.container,o,r,i),{root:this.container,...this.optionIntersectionObserver});let c;Array.from(this.container.children).forEach(e=>a.observe(e));const l=()=>{P.get(this.element)===c&&(t.abort(),a.disconnect(),s?.(),P.delete(this.element))};c={element:this.element,container:this.container,previous:()=>this.#t(),next:()=>this.#n(),goTo:e=>this.#o(e),getCurrentIndexes:()=>Array.from(this.container.children).map((e,t)=>e.classList.contains("view")?t:-1).filter(e=>-1!==e),getCurrentElements:()=>Array.from(this.container.children).filter(e=>e.classList.contains("view")),getTotal:()=>this.container.children.length,isAtStart:()=>this.container.children[0]?.classList.contains("view")||!1,isAtEnd:()=>{const e=this.container.children,t=e[e.length-1];return t?.classList.contains("view")||!1},refresh:()=>(P.get(this.element)!==c||(l(),new R({element:this.element,viewRatio:this.viewRatio,optionIntersectionObserver:this.optionIntersectionObserver,scrollOptions:this.scrollOptions}).execute()),P.get(this.element))},P.set(this.element,c)}}function V(e=document){(function(e){const t=e instanceof Element&&pgs(e).contains("slides")?[e]:[];return t.push(...pgs(e).querySelectorAll("slides")),t})(e).forEach(e=>{P.has(e)||new R({element:e}).execute()})}V();const H={init:V,api:function(e){return P.get(e)}},z=new WeakMap;function F(e=document){pgs(e).querySelectorAll("steps").forEach(e=>{z.has(e)||(pgs(e).querySelectorAll("steps-step").forEach((e,t)=>{let n;if(pgs(e).querySelector("steps-step-circle")?n=pgs(e).querySelector("steps-step-circle"):(n=document.createElement("span"),pgs(n).add("steps-step-circle"),n.textContent=t+1,e.insertAdjacentElement("afterbegin",n)),!pgs(e).querySelector("steps-step-line")){const t=document.createElement("span");pgs(t).add("steps-step-line"),e.insertAdjacentElement("afterbegin",t)}}),z.set(e,{element:e,steps:()=>Array.from(pgs(e).querySelectorAll("steps-step")),getStep:t=>pgs(e).querySelectorAll("steps-step")[t],getTotal:()=>pgs(e).querySelectorAll("steps-step").length,refresh:()=>(z.delete(e),F(e.parentNode||document),z.get(e))}))})}F();const W={init:F,api:function(e){return z.get(e)}},G=new WeakMap;function Y(e=document){pgs(e).querySelectorAll("stepTabs").forEach(e=>{if("true"===e.dataset.stepTabsInitialized)return;e.dataset.stepTabsInitialized="true";const t=pgs(e).querySelector("stepTabs-prev"),n=pgs(e).querySelector("stepTabs-next"),o=pgs(e).querySelector("stepTabs-restart"),r=pgs(e).querySelector("stepTabs-dots"),i=pgs(e).querySelector("stepTabs-container"),s=pgs(i).querySelectorAll("tab"),a=s.length,c=Array.from(s).filter(e=>pgs(e).state.contains("is-locked"));let l=0;t&&(t.disabled=!0);let d=!1;if(!i||0===a)return;const u=[];function p(e,t,n){e&&n!==pgs(e).state.contains(t)&&pgs(e).state.toggle(t,n)}function g(){const e=s[l];t&&(t.disabled=0===l),n&&(n.disabled=l===a-1||pgs(e).state.contains("is-locked"))}function f(t,n=!0){l=Math.min(Math.max(t,0),a-1);const o=s[l];d=!0,s.forEach((e,t)=>p(e,"is-active",t===l)),g(),u.forEach((e,t)=>{p(e,"is-active",t===l),p(e,"is-completed",t<l)}),d=!1,n&&!e.closest("dialog")&&(o?.focus(),e?.scrollIntoView({behavior:"smooth",block:"start"})),e.dispatchEvent(new CustomEvent("stepTabs:change",{detail:{current:l,total:a}}))}function m(){f(0),c.forEach(e=>pgs(e).state.add("is-locked"))}r&&(r.innerHTML="",s.forEach((e,t)=>{const n=pgs(e).option.getValueBrackets("tabIcon")||"fa-circle",o=document.createElement("button");o.type="button",pgs(o).add("stepTabs-dots-dot"),pgs(o).option.setValueBrackets("step",t),o.innerHTML=`<i class="fa-solid ${n}"></i>`,o.addEventListener("click",()=>{pgs(o).state.contains("is-completed")&&f(t,!0)}),r.appendChild(o),u.push(o)})),f(0,!1);const h=new MutationObserver(()=>{d||g()});s?.forEach(e=>h.observe(e,{attributes:!0,attributeFilter:["pgs-state"]})),t?.addEventListener("click",e=>f(l-1)),n?.addEventListener("click",e=>{g(),n.disabled||f(l+1)}),o?.addEventListener("click",e=>m(),{capture:!0}),G.set(e,{element:e,container:i,restart:m,goTo:f,next:()=>f(l+1),prev:()=>f(l-1),toggleLock:(e,t=!0)=>"number"==typeof e&&s[e]&&(pgs(s[e]).state.toggle("is-locked",t),f(l)),refresh:()=>(Y(e.parentNode||document),G.get(e)),getCurrent:()=>l,getState:()=>({current:l,total:a})})})}Y();const U={init:Y,api:function(e){return G.get(e)}},J=new WeakMap;let K=0;function X(e,t){return Array.from(e.children).find(e=>pgs(e).contains(t))}function Q(e=document){pgs(e).querySelectorAll("summary").forEach(e=>{if(J.has(e))return;const t=X(e,"summary-content"),n=X(e,"summary-button");if(!t||!n)return;const o=(K+=1,K),r=t.id||`summary-content-${o}`;function i(){return pgs(e).state.contains("open")}function s(){return 3*function(e){const t=window.getComputedStyle(e),n=parseFloat(t.lineHeight);if(Number.isFinite(n))return n;const o=parseFloat(t.fontSize);return Number.isFinite(o)?1.2*o:0}(t)}function a(o){const r=t.scrollHeight>Math.ceil(s())+1;pgs(e).state.toggle("overflow",r),pgs(e).state.toggle("open",o&&r),n.hidden=!r,n.setAttribute("aria-hidden",String(!r)),n.setAttribute("aria-expanded",String(o&&r)),n.textContent=o&&r?"Mostra meno":"Mostra di più";const i=o&&r?t.scrollHeight:s();t.style.setProperty("--summary-content-max-height",`${i}px`)}function c(){const e=i();t.style.setProperty("--summary-content-max-height","none"),a(e)}function l(){a(!i())}t.id=r,n.type||="button",n.setAttribute("aria-controls",t.id),n.addEventListener("click",l),window.addEventListener("resize",c,{passive:!0}),c(),requestAnimationFrame(c),J.set(e,{element:e,content:t,button:n,open:()=>a(!0),close:()=>a(!1),toggle:l,refresh:c,isOpen:i})})}Q();const Z={init:Q,api:function(e){return J.get(e)}},ee={_escapeHtml:e=>String(e??""),_getDuration(e){const t=e.duration,n=Number.parseInt(t,10);return Number.isNaN(n)?5e3:n},_getApi:e=>"toast"===String(e.element||"notification").trim()?ne.toast:ne.alert,_getType(e,t){const n=String(e.type||"info").trim();return"function"==typeof t[n]?n:"info"},_getData(e){const t=pgs(e).option.getValueBrackets("notification")||"{}";try{return JSON.parse(t)}catch(e){return console.warn("PGS notification: configurazione JSON non valida",e),{}}},_getContent(e,t){const n=this._escapeHtml(t),o=this._escapeHtml(e);return o?n?`\n <span pgs="notification-element-title">${o}</span>\n <br>\n <span pgs="notification-element-content">${n}</span>\n `:`<span pgs="notification-element-title">${o}</span>`:n},_getContainer:e=>Array.from(pgs(document).querySelectorAll("notification")).find(t=>{const n=pgs(t).option.contains("toast");return"toast"===e?n:!n}),initNotification(e,t,n,o,r,i="replace",s=null){let a=this._getContainer(t);if(!a){const e=document.createElement("div");pgs(e).add("notification"),"toast"===t&&pgs(e).option.add("toast"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-relevant","additions"),document.body.appendChild(e),a=e}const c=document.createElement(s?"a":"div");function l(){"stack"==i?c.style.translate="120%":c.style.opacity="0",setTimeout(()=>c.remove(),300)}"replace"==i&&(a.innerHTML=""),s&&(c.href=s),r>0&&c.style.setProperty("--notification-timeout",r+"ms"),pgs(c).state.add(e),pgs(c).add("notification-element"),c.setAttribute("role","error"==e?"alert":"status"),c.innerHTML=`${n} <p>${o}</p>`,a.appendChild(c),r>0&&setTimeout(()=>{l()},r);const d=document.createElement("button");d.type="button",d.ariaLabel="Rimuovi notifica",d.innerHTML='<i class="fa-solid fa-xmark"></i>',d.setAttribute("pgs","buttonClose"),c.insertAdjacentElement("afterbegin",d),d.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),l()})},deleteAll(e){let t=this._getContainer(e);t&&(t.innerHTML="")},trigger(e=document){pgs(e).querySelectorAll("notificationTrigger").forEach(e=>{if(!e||"true"===e.dataset.initialize)return;e.dataset.initialize="true";const t=this._getData(e),n=String(t.title||"").trim(),o=String(t.message||"").trim();if(!n&&!o)return void e.remove();const r=t.link||null,i=t.icon||void 0,s=this._getDuration(t),a=this._getApi(t),c=this._getType(t,a),l=this._getContent(n,o);a===ne.toast?a[c](l,s,i):a[c](l,r,s,i),e.remove()})}};function te(e=document){return ee.trigger(e)}const ne={trigger:te,alert:{error:(e="Errore",t=null,n=0,o='<i class="fa-solid fa-circle-xmark"></i>')=>ee.initNotification("error","notification",o,e,n,"stack",t),success:(e="Aggiornato",t=null,n=0,o='<i class="fa-solid fa-check"></i>')=>ee.initNotification("success","notification",o,e,n,"stack",t),info:(e="Aggiornamento",t=null,n=0,o='<i class="fa-solid fa-circle-info"></i>')=>ee.initNotification("info","notification",o,e,n,"stack",t),warning:(e="Attenzione",t=null,n=0,o='<i class="fa-solid fa-triangle-exclamation"></i>')=>ee.initNotification("warning","notification",o,e,n,"stack",t),deleteAll:()=>ee.deleteAll("notification")},toast:{error:(e="Errore",t=4e3,n='<i class="fa-solid fa-circle-xmark"></i>')=>ee.initNotification("error","toast",n,e,t),success:(e="Aggiornato",t=4e3,n='<i class="fa-solid fa-check"></i>')=>ee.initNotification("success","toast",n,e,t),info:(e="Aggiornamento",t=0,n='<i class="fa-solid fa-circle-info"></i>')=>ee.initNotification("info","toast",n,e,t),warning:(e="Attenzione",t=4e3,n='<i class="fa-solid fa-triangle-exclamation"></i>')=>ee.initNotification("warning","toast",n,e,t),deleteAll:()=>ee.deleteAll("toast")}};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>te()):te(),e.registerModules({svg:i,accordion:d,dropdown:A,menu:k,modal:x,notification:ne,search:N,slides:H,stepTabs:U,steps:W,summary:Z,formValidate:class{#i={};#s=!1;constructor(e,t={}){if(!t||"object"!=typeof t||Array.isArray(t))throw new TypeError("options must be an object");this.container=e,this._rules=[],this.message={fieldError:"Please complete this field.",fieldsError:"Please complete all required fields.",success:"Submitted successfully."},void 0!==t.message&&(this.message=t.message),this.container?.setAttribute("novalidate","")}get message(){return{...this.#i}}set message(e){if(!e||"object"!=typeof e||Array.isArray(e))throw new TypeError("message must be an object");this.#i={...this.#i,...e}}#a={isRequired:e=>!!e&&((!0===e.required||"true"===e?.dataset?.required||"true"==e?.getAttribute("aria-required"))&&!e.hidden),isEmptyTextLike:e=>!String(e?.value??"").trim(),isEmptySelect:e=>!String(e?.value??"").trim(),getGroupName:e=>e?.name||e?.getAttribute?.("name")||""};#c(e){const t=[];for(const n of this._rules){const o=n(e);o&&(Array.isArray(o)?t.push(...o):t.push(o))}const n=Array.from(e.querySelectorAll("input")).filter(e=>!e.disabled&&"hidden"!==e.type&&"checkbox"!==e.type&&"radio"!==e.type&&"file"!==e.type&&!!this.#a.isRequired(e)&&this.#a.isEmptyTextLike(e)),o=Array.from(e.querySelectorAll("textarea")).filter(e=>!e.disabled&&!!this.#a.isRequired(e)&&this.#a.isEmptyTextLike(e)),r=Array.from(e.querySelectorAll("select")).filter(e=>!e.disabled&&!!this.#a.isRequired(e)&&this.#a.isEmptySelect(e)),i=Array.from(e.querySelectorAll('input[type="radio"]')).filter(e=>!e.disabled),s=new Map;for(const e of i){if(!this.#a.isRequired(e))continue;const t=this.#a.getGroupName(e);t&&(s.has(t)||s.set(t,[]),s.get(t).push(e))}const a=[];for(const[e,t]of s.entries())t.some(e=>e.checked)||a.push(t[0]);const c=Array.from(e.querySelectorAll('input[type="checkbox"]')).filter(e=>!e.disabled),l=[],d=new Map;for(const e of c){if(!this.#a.isRequired(e))continue;const t=this.#a.getGroupName(e);t?(d.has(t)||d.set(t,[]),d.get(t).push(e)):e.checked||l.push(e)}const u=[];for(const[e,t]of d.entries())t.some(e=>e.checked)||u.push(t[0]);const p=Array.from(e.querySelectorAll('input[type="file"]')).filter(e=>!(e.disabled||!this.#a.isRequired(e)||e.files&&e.files.length>0));return[...new Set([n,o,r,a,l,u,p,t].flat())]}addFieldError(t,n=0,o=1){if(e(t).option.add("error"),0===n&&t.scrollIntoView(),0!==n)return;if(o>1)return void ne.toast.error(this.message.fieldsError);const r=e(t).option.getValueBrackets("message");ne.toast.error(r||this.message.fieldError)}removeFieldError(t){e(t).option.remove("error")}success(e=this.message.success){(this.#s||!0===this.validate())&&ne.toast.success(e)}validate(){const t=this.#c(this.container),n=this.container.querySelectorAll("input, textarea, select");Array.from(n).filter(e=>!e.disabled);for(const e of n)t.includes(e)||this.removeFieldError(e);return t.forEach((e,n)=>this.addFieldError(e,n,t.length)),n.forEach(e=>e.addEventListener("click",t=>this.removeFieldError(e))),t.length?(e(this.container).option.remove("success").add("error"),!1):(e(this.container).option.remove("error").add("success"),!0)}validator(e,t="submit"){if("function"!=typeof e)throw new TypeError("callback must be a function");if("string"!=typeof t||!t.trim())throw new TypeError("eventName must be a non-empty string");return this.container.addEventListener(t,t=>{if(t.preventDefault(),this.validate()){this.#s=!0;try{this.success(),e(t)}finally{this.#s=!1}}}),this}addNewRule(e){if("function"!=typeof e)throw new Error("Rule must be a function");return this._rules.push(e),this}},scrollHorizontal:B}),n(682),n(48)})()})();
|
|
@@ -6,39 +6,38 @@ I template completi sono in `templates/`. Usa quei file come sorgente di riferim
|
|
|
6
6
|
|
|
7
7
|
Componenti:
|
|
8
8
|
|
|
9
|
-
- `accordion`
|
|
10
|
-
- `badges`
|
|
11
|
-
- `breadcrumb`
|
|
12
|
-
- `button`
|
|
13
|
-
- `card`
|
|
14
|
-
- `dropdown`
|
|
15
|
-
- `form`
|
|
16
|
-
- `logo`
|
|
17
|
-
- `menu`
|
|
18
|
-
- `modal`
|
|
19
|
-
- `notification`
|
|
20
|
-
- `search` (`search-suggestions` opzionale)
|
|
21
|
-
- `slides`
|
|
22
|
-
- `steps`
|
|
23
|
-
- `stepTabs`
|
|
24
|
-
- `summary`
|
|
25
|
-
- `table`
|
|
26
|
-
- `tooltip`
|
|
9
|
+
- [`accordion`](components/accordion.md)
|
|
10
|
+
- [`badges`](components/badges.md)
|
|
11
|
+
- [`breadcrumb`](components/breadcumbs.md)
|
|
12
|
+
- [`button`](components/button.md)
|
|
13
|
+
- [`card`](components/card.md)
|
|
14
|
+
- [`dropdown`](components/dropdown.md)
|
|
15
|
+
- [`form`](components/form.md)
|
|
16
|
+
- [`logo`](components/logo.md)
|
|
17
|
+
- [`menu`](components/menu.md)
|
|
18
|
+
- [`modal`](components/modal.md)
|
|
19
|
+
- [`notification`](components/notification.md)
|
|
20
|
+
- [`search`](components/search.md) (`search-suggestions` opzionale)
|
|
21
|
+
- [`slides`](components/slides.md)
|
|
22
|
+
- [`steps`](components/steps.md)
|
|
23
|
+
- [`stepTabs`](components/stepTabs.md)
|
|
24
|
+
- [`summary`](components/summary.md)
|
|
25
|
+
- [`table`](components/table.md)
|
|
26
|
+
- [`tooltip`](components/tooltip.md)
|
|
27
27
|
|
|
28
28
|
Layout:
|
|
29
29
|
|
|
30
|
-
- `body`
|
|
31
|
-
- `
|
|
32
|
-
- `
|
|
33
|
-
- `
|
|
34
|
-
- `
|
|
35
|
-
- `
|
|
36
|
-
- `
|
|
37
|
-
- `grid`
|
|
30
|
+
- [`body`](layout/body.md)
|
|
31
|
+
- [`section`](layout/section.md)
|
|
32
|
+
- [`header`](layout/header.md)
|
|
33
|
+
- [`footer`](layout/footer.md)
|
|
34
|
+
- [`pageShell`](layout/pageShell.md)
|
|
35
|
+
- [`flex`](layout/flex.md)
|
|
36
|
+
- [`grid`](layout/grid.md)
|
|
38
37
|
|
|
39
38
|
Pattern:
|
|
40
39
|
|
|
41
|
-
- `cookieConsent`
|
|
40
|
+
- [`cookieConsent`](patterns/cookieConsent.md)
|
|
42
41
|
|
|
43
42
|
## Search con suggerimenti
|
|
44
43
|
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<!-- File generato automaticamente da templates/html/components/accordion.html. Modificare templates/html/components/accordion.html e rieseguire npm run docs:generate. -->
|
|
2
|
+
|
|
3
|
+
# Accordion
|
|
4
|
+
|
|
5
|
+
Componente interattivo che espande un pannello alla volta, sincronizzando visibilità, attributi ARIA e navigazione da tastiera.
|
|
6
|
+
|
|
7
|
+
## PGS
|
|
8
|
+
|
|
9
|
+
- `accordion`: identifica ogni elemento espandibile inizializzato dal modulo JavaScript.
|
|
10
|
+
- `accordion-button`: identifica il controllo che apre o chiude il pannello associato.
|
|
11
|
+
- `accordion-content`: identifica il pannello di contenuto gestito tramite l'attributo hidden.
|
|
12
|
+
|
|
13
|
+
## PGS States
|
|
14
|
+
|
|
15
|
+
- `open`: indica l'elemento accordion attualmente aperto e visibile.
|
|
16
|
+
|
|
17
|
+
## API JavaScript
|
|
18
|
+
|
|
19
|
+
- `pgs.accordion.init(root)`: inizializza gli accordion non ancora registrati dentro Document o Element indicato.
|
|
20
|
+
- `pgs.accordion.api(element)`: restituisce l'istanza associata a un root accordion inizializzato.
|
|
21
|
+
- `instance.open()`: apre il pannello e chiude gli altri accordion presenti nella pagina.
|
|
22
|
+
- `instance.close()`: chiude il pannello corrente.
|
|
23
|
+
- `instance.toggle()`: inverte lo stato aperto o chiuso del pannello.
|
|
24
|
+
- `instance.refresh()`: riesegue l'inizializzazione nel contenitore dell'accordion e restituisce l'istanza.
|
|
25
|
+
- `instance.isOpen()`: restituisce true quando lo stato open è attivo.
|
|
26
|
+
|
|
27
|
+
## Elementi correlati
|
|
28
|
+
|
|
29
|
+
- `flexColumnTexts`: applica la spaziatura testuale tra gli elementi della lista.
|
|
30
|
+
|
|
31
|
+
## Output
|
|
32
|
+
|
|
33
|
+
Lista HTML di elementi accordion accessibili con pulsante e pannello associato.
|
|
34
|
+
|
|
35
|
+
## Esempio
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<ul pgs="flexColumnTexts">
|
|
39
|
+
<li pgs="accordion">
|
|
40
|
+
<button pgs="accordion-button" type="button">
|
|
41
|
+
<i class="fa-solid fa-circle-question" aria-hidden="true"></i>
|
|
42
|
+
<span>Domanda frequente</span>
|
|
43
|
+
</button>
|
|
44
|
+
|
|
45
|
+
<div pgs="accordion-content" hidden>
|
|
46
|
+
<p>Risposta di esempio con contenuto testuale riutilizzabile.</p>
|
|
47
|
+
</div>
|
|
48
|
+
</li>
|
|
49
|
+
|
|
50
|
+
<li pgs="accordion">
|
|
51
|
+
<button pgs="accordion-button" type="button">
|
|
52
|
+
<i class="fa-solid fa-circle-info" aria-hidden="true"></i>
|
|
53
|
+
<span>Seconda sezione</span>
|
|
54
|
+
</button>
|
|
55
|
+
|
|
56
|
+
<div pgs="accordion-content" hidden>
|
|
57
|
+
<p>Altro contenuto del pannello accordion.</p>
|
|
58
|
+
</div>
|
|
59
|
+
</li>
|
|
60
|
+
</ul>
|
|
61
|
+
```
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
<!-- File generato automaticamente da templates/html/components/badges.html. Modificare templates/html/components/badges.html e rieseguire npm run docs:generate. -->
|
|
2
|
+
|
|
3
|
+
# Badge
|
|
4
|
+
|
|
5
|
+
Raccolta di indicatori compatti per mostrare categorie, priorità e stati visivi con varianti cromatiche coerenti.
|
|
6
|
+
|
|
7
|
+
## PGS
|
|
8
|
+
|
|
9
|
+
- `badge`: identifica la variante base del badge.
|
|
10
|
+
- `badgePrimary`: applica la variante con colore primario.
|
|
11
|
+
- `badgeStrong`: applica la variante ad alto contrasto.
|
|
12
|
+
- `badgeSuccess`: rappresenta un esito positivo.
|
|
13
|
+
- `badgeDot`: aggiunge un indicatore puntiforme al badge.
|
|
14
|
+
- `badgeWarning`: rappresenta un avviso.
|
|
15
|
+
- `badgeError`: rappresenta un errore.
|
|
16
|
+
- `badgeInfo`: rappresenta un'informazione.
|
|
17
|
+
- `badgeNeutral`: applica la variante neutra.
|
|
18
|
+
|
|
19
|
+
## Elementi correlati
|
|
20
|
+
|
|
21
|
+
- `flexRow`: dispone i badge orizzontalmente consentendo il ritorno a capo.
|
|
22
|
+
|
|
23
|
+
## Output
|
|
24
|
+
|
|
25
|
+
Esempi HTML delle varianti badge disponibili.
|
|
26
|
+
|
|
27
|
+
## Esempio
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<div pgs="flexRow">
|
|
31
|
+
<span pgs="badge">
|
|
32
|
+
Base
|
|
33
|
+
</span>
|
|
34
|
+
|
|
35
|
+
<span pgs="badgePrimary">
|
|
36
|
+
Primary
|
|
37
|
+
</span>
|
|
38
|
+
|
|
39
|
+
<span pgs="badgeStrong">
|
|
40
|
+
Strong
|
|
41
|
+
</span>
|
|
42
|
+
|
|
43
|
+
<span pgs="badgeSuccess badgeDot">
|
|
44
|
+
Attivo
|
|
45
|
+
</span>
|
|
46
|
+
|
|
47
|
+
<span pgs="badgeWarning">
|
|
48
|
+
<i class="fa-solid fa-triangle-exclamation" aria-hidden="true"></i>
|
|
49
|
+
Attenzione
|
|
50
|
+
</span>
|
|
51
|
+
|
|
52
|
+
<span pgs="badgeError">
|
|
53
|
+
<i class="fa-solid fa-xmark" aria-hidden="true"></i>
|
|
54
|
+
Errore
|
|
55
|
+
</span>
|
|
56
|
+
|
|
57
|
+
<span pgs="badgeInfo">
|
|
58
|
+
<i class="fa-solid fa-circle-info" aria-hidden="true"></i>
|
|
59
|
+
Info
|
|
60
|
+
</span>
|
|
61
|
+
|
|
62
|
+
<span pgs="badgeNeutral" href="#">
|
|
63
|
+
Neutrale
|
|
64
|
+
</span>
|
|
65
|
+
|
|
66
|
+
</div>
|
|
67
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<!-- File generato automaticamente da templates/html/components/breadcumbs.html. Modificare templates/html/components/breadcumbs.html e rieseguire npm run docs:generate. -->
|
|
2
|
+
|
|
3
|
+
# Breadcrumb
|
|
4
|
+
|
|
5
|
+
Navigazione gerarchica che mostra il percorso della pagina corrente con collegamenti, separatori e indicazione semantica dell'elemento attivo.
|
|
6
|
+
|
|
7
|
+
## PGS
|
|
8
|
+
|
|
9
|
+
- `breadcrumb`: identifica la lista principale del percorso di navigazione.
|
|
10
|
+
- `breadcrumb-item`: identifica ogni livello del percorso.
|
|
11
|
+
- `breadcrumb-item-separator`: identifica il separatore decorativo nascosto alle tecnologie assistive.
|
|
12
|
+
|
|
13
|
+
## Output
|
|
14
|
+
|
|
15
|
+
Struttura HTML semantica di una breadcrumb racchiusa in un elemento nav.
|
|
16
|
+
|
|
17
|
+
## Esempio
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<nav aria-label="Breadcrumb">
|
|
21
|
+
<ul pgs="breadcrumb">
|
|
22
|
+
<li pgs="breadcrumb-item">
|
|
23
|
+
<a href="/">Home</a>
|
|
24
|
+
<span pgs="breadcrumb-item-separator" aria-hidden="true">
|
|
25
|
+
>
|
|
26
|
+
</span>
|
|
27
|
+
</li>
|
|
28
|
+
|
|
29
|
+
<li pgs="breadcrumb-item">
|
|
30
|
+
<a href="/blog">Blog</a>
|
|
31
|
+
<span pgs="breadcrumb-item-separator" aria-hidden="true">
|
|
32
|
+
>
|
|
33
|
+
</span>
|
|
34
|
+
</li>
|
|
35
|
+
|
|
36
|
+
<li pgs="breadcrumb-item">
|
|
37
|
+
<span aria-current="page">
|
|
38
|
+
Articolo di prova
|
|
39
|
+
</span>
|
|
40
|
+
</li>
|
|
41
|
+
</ul>
|
|
42
|
+
</nav>
|
|
43
|
+
```
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
<!-- File generato automaticamente da templates/html/components/button.html. Modificare templates/html/components/button.html e rieseguire npm run docs:generate. -->
|
|
2
|
+
|
|
3
|
+
# Button
|
|
4
|
+
|
|
5
|
+
Varianti di pulsante e collegamento d'azione con dimensioni, enfasi e composizione icona-testo definite dal design system.
|
|
6
|
+
|
|
7
|
+
## PGS
|
|
8
|
+
|
|
9
|
+
- `button`: identifica il pulsante standard utilizzabile anche su elementi a.
|
|
10
|
+
- `buttonStrong`: applica la variante con maggiore enfasi visiva.
|
|
11
|
+
- `buttonIcon`: identifica un pulsante compatto composto principalmente da un'icona.
|
|
12
|
+
- `buttonMini`: applica la variante di dimensione minima.
|
|
13
|
+
- `buttonBig`: applica la variante di dimensione ampia.
|
|
14
|
+
|
|
15
|
+
## PGS Options
|
|
16
|
+
|
|
17
|
+
- `buttonReverse`: inverte l'ordine visivo di testo e icona sul pulsante a cui è applicata.
|
|
18
|
+
|
|
19
|
+
## Elementi correlati
|
|
20
|
+
|
|
21
|
+
- `flexRow`: dispone gli esempi di pulsante su una riga flessibile.
|
|
22
|
+
|
|
23
|
+
## Output
|
|
24
|
+
|
|
25
|
+
Raccolta HTML delle principali varianti di button.
|
|
26
|
+
|
|
27
|
+
## Esempio
|
|
28
|
+
|
|
29
|
+
```html
|
|
30
|
+
<div pgs="flexRow">
|
|
31
|
+
<a pgs="button" href="#">
|
|
32
|
+
<i class="fa-duotone fa-solid fa-store"></i>
|
|
33
|
+
About
|
|
34
|
+
</a>
|
|
35
|
+
|
|
36
|
+
<button pgs="button" type="button" pgs-option="buttonReverse">
|
|
37
|
+
Avanti
|
|
38
|
+
<i class="fa-solid fa-arrow-right" aria-hidden="true"></i>
|
|
39
|
+
</button>
|
|
40
|
+
|
|
41
|
+
<button pgs="buttonStrong" type="button">
|
|
42
|
+
<i class="fa-solid fa-check" aria-hidden="true"></i>
|
|
43
|
+
Submit
|
|
44
|
+
</button>
|
|
45
|
+
|
|
46
|
+
<button pgs="buttonIcon" type="button" aria-label="Impostazioni">
|
|
47
|
+
<i class="fa-solid fa-gear" aria-hidden="true"></i>
|
|
48
|
+
</button>
|
|
49
|
+
|
|
50
|
+
<button pgs="buttonMini" type="button" aria-label="Informazioni">
|
|
51
|
+
<i class="fa-solid fa-info" aria-hidden="true"></i>
|
|
52
|
+
</button>
|
|
53
|
+
|
|
54
|
+
<button pgs="buttonBig" type="button" aria-label="Bottone grande">
|
|
55
|
+
<i class="fa-solid fa-rocket" aria-hidden="true"></i>
|
|
56
|
+
Bottone grande
|
|
57
|
+
</button>
|
|
58
|
+
</div>
|
|
59
|
+
```
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<!-- File generato automaticamente da templates/html/components/card.html. Modificare templates/html/components/card.html e rieseguire npm run docs:generate. -->
|
|
2
|
+
|
|
3
|
+
# Card
|
|
4
|
+
|
|
5
|
+
Contenitore riutilizzabile per raggruppare immagine, titolo, testo e azioni in anteprime o raccolte responsive.
|
|
6
|
+
|
|
7
|
+
## PGS
|
|
8
|
+
|
|
9
|
+
- `card`: identifica il contenitore principale della scheda.
|
|
10
|
+
- `card-img`: identifica l'immagine principale della card.
|
|
11
|
+
|
|
12
|
+
## Elementi correlati
|
|
13
|
+
|
|
14
|
+
- `flex-2`: dispone le card in un layout responsive a due elementi.
|
|
15
|
+
- `flexColumn`: organizza verticalmente il contenuto della card o del relativo link.
|
|
16
|
+
- `imgCover`: adatta l'immagine riempiendo l'area disponibile.
|
|
17
|
+
- `flexColumnTexts`: applica la spaziatura verticale ai contenuti testuali.
|
|
18
|
+
- `button`: presenta il collegamento finale come pulsante standard.
|
|
19
|
+
|
|
20
|
+
## Output
|
|
21
|
+
|
|
22
|
+
Due strutture HTML di card, una con azione separata e una interamente cliccabile.
|
|
23
|
+
|
|
24
|
+
## Esempio
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<div pgs="flex-2">
|
|
28
|
+
|
|
29
|
+
<article pgs="card flexColumn">
|
|
30
|
+
<img pgs="card-img imgCover" src="https://placehold.co/800x500" alt="Immagine segnaposto">
|
|
31
|
+
|
|
32
|
+
<div pgs="flexColumnTexts">
|
|
33
|
+
<h3>Card riutilizzabile</h3>
|
|
34
|
+
<p>Contenuto descrittivo della card, adatto a liste, anteprime e griglie.</p>
|
|
35
|
+
<a pgs="button" href="#">Leggi di piu</a>
|
|
36
|
+
</div>
|
|
37
|
+
</article>
|
|
38
|
+
|
|
39
|
+
<article pgs="card">
|
|
40
|
+
<a pgs="flexColumn" href="">
|
|
41
|
+
<img pgs="card-img imgCover" src="https://placehold.co/800x500" alt="Immagine segnaposto">
|
|
42
|
+
|
|
43
|
+
<div pgs="flexColumnTexts">
|
|
44
|
+
<h3>Card riutilizzabile</h3>
|
|
45
|
+
<p>Contenuto descrittivo della card, adatto a liste, anteprime e griglie.</p>
|
|
46
|
+
</div>
|
|
47
|
+
</a>
|
|
48
|
+
</article>
|
|
49
|
+
</div>
|
|
50
|
+
```
|