@pure-ds/core 0.6.9 → 0.6.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/custom-elements.json +865 -35
  2. package/dist/types/pds.d.ts +31 -0
  3. package/dist/types/public/assets/js/pds-manager.d.ts +100 -2
  4. package/dist/types/public/assets/js/pds-manager.d.ts.map +1 -1
  5. package/dist/types/public/assets/js/pds.d.ts.map +1 -1
  6. package/dist/types/public/assets/pds/components/pds-form.d.ts.map +1 -1
  7. package/dist/types/public/assets/pds/components/pds-live-converter.d.ts +8 -0
  8. package/dist/types/public/assets/pds/components/pds-live-converter.d.ts.map +1 -0
  9. package/dist/types/public/assets/pds/components/pds-live-edit.d.ts +1 -195
  10. package/dist/types/public/assets/pds/components/pds-live-edit.d.ts.map +1 -1
  11. package/dist/types/public/assets/pds/components/pds-live-importer.d.ts +2 -0
  12. package/dist/types/public/assets/pds/components/pds-live-importer.d.ts.map +1 -0
  13. package/dist/types/public/assets/pds/components/pds-live-template-canvas.d.ts +2 -0
  14. package/dist/types/public/assets/pds/components/pds-live-template-canvas.d.ts.map +1 -0
  15. package/dist/types/public/assets/pds/components/pds-omnibox.d.ts +0 -2
  16. package/dist/types/public/assets/pds/components/pds-omnibox.d.ts.map +1 -1
  17. package/dist/types/public/assets/pds/components/pds-scrollrow.d.ts +20 -0
  18. package/dist/types/public/assets/pds/components/pds-scrollrow.d.ts.map +1 -1
  19. package/dist/types/public/assets/pds/components/pds-toaster.d.ts +1 -1
  20. package/dist/types/public/assets/pds/components/pds-toaster.d.ts.map +1 -1
  21. package/dist/types/public/assets/pds/components/pds-treeview.d.ts +37 -0
  22. package/dist/types/public/assets/pds/components/pds-treeview.d.ts.map +1 -0
  23. package/dist/types/src/js/common/toast.d.ts +8 -0
  24. package/dist/types/src/js/common/toast.d.ts.map +1 -1
  25. package/dist/types/src/js/pds-core/pds-config.d.ts +1306 -13
  26. package/dist/types/src/js/pds-core/pds-config.d.ts.map +1 -1
  27. package/dist/types/src/js/pds-core/pds-enhancers-meta.d.ts.map +1 -1
  28. package/dist/types/src/js/pds-core/pds-enhancers.d.ts.map +1 -1
  29. package/dist/types/src/js/pds-core/pds-generator.d.ts.map +1 -1
  30. package/dist/types/src/js/pds-core/pds-live.d.ts +2 -1
  31. package/dist/types/src/js/pds-core/pds-live.d.ts.map +1 -1
  32. package/dist/types/src/js/pds-core/pds-ontology.d.ts.map +1 -1
  33. package/dist/types/src/js/pds-core/pds-start-helpers.d.ts +1 -4
  34. package/dist/types/src/js/pds-core/pds-start-helpers.d.ts.map +1 -1
  35. package/dist/types/src/js/pds-live-manager/conversion-service.d.ts +66 -0
  36. package/dist/types/src/js/pds-live-manager/conversion-service.d.ts.map +1 -0
  37. package/dist/types/src/js/pds-live-manager/import-contract.d.ts +15 -0
  38. package/dist/types/src/js/pds-live-manager/import-contract.d.ts.map +1 -0
  39. package/dist/types/src/js/pds-live-manager/import-history-service.d.ts +32 -0
  40. package/dist/types/src/js/pds-live-manager/import-history-service.d.ts.map +1 -0
  41. package/dist/types/src/js/pds-live-manager/import-service.d.ts +21 -0
  42. package/dist/types/src/js/pds-live-manager/import-service.d.ts.map +1 -0
  43. package/dist/types/src/js/pds-live-manager/template-service.d.ts +17 -0
  44. package/dist/types/src/js/pds-live-manager/template-service.d.ts.map +1 -0
  45. package/dist/types/src/js/pds-manager.d.ts +4 -0
  46. package/dist/types/src/js/pds.d.ts.map +1 -1
  47. package/package.json +7 -3
  48. package/packages/pds-cli/README.md +51 -0
  49. package/packages/pds-cli/bin/pds-import.js +176 -0
  50. package/packages/pds-cli/bin/pds-static.js +31 -1
  51. package/packages/pds-cli/bin/postinstall.mjs +17 -8
  52. package/public/assets/js/app.js +23 -147
  53. package/public/assets/js/pds-manager.js +481 -248
  54. package/public/assets/js/pds.js +16 -16
  55. package/public/assets/pds/components/pds-form.js +124 -27
  56. package/public/assets/pds/components/pds-live-converter.js +47 -0
  57. package/public/assets/pds/components/pds-live-edit.js +1626 -211
  58. package/public/assets/pds/components/pds-live-importer.js +772 -0
  59. package/public/assets/pds/components/pds-live-template-canvas.js +171 -0
  60. package/public/assets/pds/components/pds-omnibox.js +146 -20
  61. package/public/assets/pds/components/pds-scrollrow.js +56 -1
  62. package/public/assets/pds/components/pds-toaster.js +50 -5
  63. package/public/assets/pds/components/pds-treeview.js +972 -0
  64. package/public/assets/pds/custom-elements.json +865 -35
  65. package/public/assets/pds/pds-css-complete.json +7 -7
  66. package/public/assets/pds/pds.css-data.json +5 -35
  67. package/public/assets/pds/templates/commerce-scroll-explorer.html +115 -0
  68. package/public/assets/pds/templates/content-brand-showcase.html +110 -0
  69. package/public/assets/pds/templates/feedback-ops-dashboard.html +91 -0
  70. package/public/assets/pds/templates/release-readiness-radar.html +69 -0
  71. package/public/assets/pds/templates/support-command-center.html +92 -0
  72. package/public/assets/pds/templates/templates.json +53 -0
  73. package/public/assets/pds/templates/workspace-settings-lab.html +131 -0
  74. package/public/assets/pds/vscode-custom-data.json +54 -4
  75. package/readme.md +34 -0
  76. package/src/js/pds-core/pds-config.js +831 -40
  77. package/src/js/pds-core/pds-enhancers-meta.js +11 -0
  78. package/src/js/pds-core/pds-enhancers.js +259 -5
  79. package/src/js/pds-core/pds-generator.js +353 -52
  80. package/src/js/pds-core/pds-live.js +630 -15
  81. package/src/js/pds-core/pds-ontology.js +6 -0
  82. package/src/js/pds-core/pds-start-helpers.js +14 -6
  83. package/src/js/pds-live-manager/conversion-service.js +3136 -0
  84. package/src/js/pds-live-manager/import-contract.js +57 -0
  85. package/src/js/pds-live-manager/import-history-service.js +145 -0
  86. package/src/js/pds-live-manager/import-service.js +255 -0
  87. package/src/js/pds-live-manager/tailwind-conversion-rules.json +383 -0
  88. package/src/js/pds-live-manager/template-service.js +170 -0
  89. package/src/js/pds.d.ts +31 -0
  90. package/src/js/pds.js +71 -60
@@ -1,166 +1,42 @@
1
- var Ke=Object.defineProperty;var Ze=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ee=(e,t)=>{for(var s in t)Ke(e,s,{get:t[s],enumerable:!0})};var $e={};Ee($e,{AutoDefiner:()=>ue});async function bt(...e){let t={};e.length&&typeof e[e.length-1]=="object"&&(t=e.pop()||{});let s=e,{baseURL:n,mapper:r=l=>`${l}.js`,onError:i=(l,u)=>console.error(`[defineWebComponents] ${l}:`,u)}=t,o=n?new URL(n,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),d=l=>l.toLowerCase().replace(/(^|-)([a-z])/g,(u,a,h)=>h.toUpperCase()),p=async l=>{try{if(customElements.get(l))return{tag:l,status:"already-defined"};let u=r(l),h=await import(u instanceof URL?u.href:new URL(u,o).href),f=h?.default??h?.[d(l)];if(!f){if(customElements.get(l))return{tag:l,status:"self-defined"};throw new Error(`No export found for ${l}. Expected default export or named export "${d(l)}".`)}return customElements.get(l)?{tag:l,status:"race-already-defined"}:(customElements.define(l,f),{tag:l,status:"defined"})}catch(u){throw i(l,u),u}};return Promise.all(s.map(p))}var ue,Fe=Ze(()=>{ue=class{constructor(t={}){let{baseURL:s,mapper:n,onError:r,predicate:i=()=>!0,attributeModule:o="data-module",root:d=document,scanExisting:p=!0,debounceMs:l=16,observeShadows:u=!0,enhancers:a=[],patchAttachShadow:h=!0}=t,f=new Set,w=new Set,k=new Set,m=new Map,x=new WeakMap,P=new WeakMap,A=0,T=!1,C=null,_=y=>{if(!y||!a.length)return;let g=P.get(y);g||(g=new Set,P.set(y,g));for(let b of a)if(!(!b.selector||!b.run)&&!g.has(b.selector))try{y.matches&&y.matches(b.selector)&&(b.run(y),g.add(b.selector))}catch(L){console.warn(`[AutoDefiner] Error applying enhancer for selector "${b.selector}":`,L)}},z=(y,g)=>{if(!T&&!(!y||!y.includes("-"))&&!customElements.get(y)&&!w.has(y)&&!k.has(y)){if(g&&g.getAttribute){let b=g.getAttribute(o);b&&!m.has(y)&&m.set(y,b)}f.add(y),q()}},q=()=>{A||(A=setTimeout(B,l))},R=y=>{if(y){if(y.nodeType===1){let g=y,b=g.tagName?.toLowerCase();b&&b.includes("-")&&!customElements.get(b)&&i(b,g)&&z(b,g),_(g),u&&g.shadowRoot&&D(g.shadowRoot)}y.querySelectorAll&&y.querySelectorAll("*").forEach(g=>{let b=g.tagName?.toLowerCase();b&&b.includes("-")&&!customElements.get(b)&&i(b,g)&&z(b,g),_(g),u&&g.shadowRoot&&D(g.shadowRoot)})}},D=y=>{if(!y||x.has(y))return;R(y);let g=new MutationObserver(b=>{for(let L of b)L.addedNodes?.forEach($=>{R($)}),L.type==="attributes"&&L.target&&R(L.target)});g.observe(y,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[o,...a.map(b=>b.selector).filter(b=>b.startsWith("data-"))]}),x.set(y,g)};async function B(){if(clearTimeout(A),A=0,!f.size)return;let y=Array.from(f);f.clear(),y.forEach(g=>w.add(g));try{let g=b=>m.get(b)??(n?n(b):`${b}.js`);await bt(...y,{baseURL:s,mapper:g,onError:(b,L)=>{k.add(b),r?.(b,L)}})}catch{}finally{y.forEach(g=>w.delete(g))}}let v=d===document?document.documentElement:d,U=new MutationObserver(y=>{for(let g of y)g.addedNodes?.forEach(b=>{R(b)}),g.type==="attributes"&&g.target&&R(g.target)});if(U.observe(v,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[o,...a.map(y=>y.selector).filter(y=>y.startsWith("data-"))]}),u&&h&&Element.prototype.attachShadow){let y=Element.prototype.attachShadow;Element.prototype.attachShadow=function(b){let L=y.call(this,b);if(b&&b.mode==="open"){D(L);let $=this.tagName?.toLowerCase();$&&$.includes("-")&&!customElements.get($)&&z($,this)}return L},C=()=>Element.prototype.attachShadow=y}return p&&R(v),{stop(){T=!0,U.disconnect(),C&&C(),A&&(clearTimeout(A),A=0),x.forEach(y=>y.disconnect())},flush:B}}static async define(...t){let s={};t.length&&typeof t[t.length-1]=="object"&&(s=t.pop()||{});let n=t,{baseURL:r,mapper:i=u=>`${u}.js`,onError:o=(u,a)=>console.error(`[defineWebComponents] ${u}:`,a)}=s,d=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),p=u=>u.toLowerCase().replace(/(^|-)([a-z])/g,(a,h,f)=>f.toUpperCase()),l=async u=>{try{if(customElements.get(u))return{tag:u,status:"already-defined"};let a=i(u),f=await import(a instanceof URL?a.href:new URL(a,d).href),w=f?.default??f?.[p(u)];if(!w){if(customElements.get(u))return{tag:u,status:"self-defined"};throw new Error(`No export found for ${u}. Expected default export or named export "${p(u)}".`)}return customElements.get(u)?{tag:u,status:"race-already-defined"}:(customElements.define(u,w),{tag:u,status:"defined"})}catch(a){throw o(u,a),a}};return Promise.all(n.map(l))}}});function Ae(e){return new DOMParser().parseFromString(e,"text/html").body.childNodes}function Le(e,t=100){let s;return function(...r){let i=()=>{clearTimeout(s),e(...r)};clearTimeout(s),s=setTimeout(i,t)}}function G(e){setTimeout(e,0)}function Re(e){try{if(typeof e!="string"||e.indexOf(`
2
- `)!==-1||e.indexOf(" ")!==-1||e.startsWith("#/"))return!1;let t=new URL(e,window.location.origin);return t.protocol==="http:"||t.protocol==="https:"}catch{return!1}}function Ce(e,t,s){let n=window.screen.width/2-t/2,r=window.screen.height/2-s/2;return window.open(e,"",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=${t}, height=${s}, top=${r}, left=${n}`)}var X={result:"ac-suggestion",item:"ac-itm"},V=class e extends EventTarget{constructor(t,s,n){super(),this.settings={emptyResultsText:"",...n},this.container=t,this.input=s,this.input.setAttribute("autocomplete","off"),this.categories=n.categories||{},this.caches=new Map,G(this.attach.bind(this))}static connect(t,s){let n=t.target;if(!n._autoComplete){if(!s?.categories)throw Error("Missing autocomplete settings");n._autoComplete=new e(n.parentNode,n,s),t.type==="focus"&&setTimeout(()=>{n._autoComplete.focusHandler(t)},100)}return n._autoComplete}on(t,s){return this.input.addEventListener(t,s),this}attach(){this.resultsDiv=document.createElement("div"),this.resultsDiv.title="",this.resultsDiv.classList.add(X.result),this.container.offsetWidth>100&&(this.resultsDiv.style.width=this.container.offsetWidth),this.resultsDiv.addEventListener("mousedown",this.resultClick.bind(this)),this.container.classList.add("ac-container"),this.input.classList.add("ac-input");let t=getComputedStyle(this.input);this.container.style.setProperty("--ac-bg-default",t.backgroundColor),this.container.style.setProperty("--ac-color-default",t.color);let s=getComputedStyle(this.input).accentColor;s!=="auto"&&this.container.style.setProperty("--ac-accent-color",s),(this.container?.shadowRoot??this.container).appendChild(this.resultsDiv),this.controller().clear("attach"),this.on("input",Le(this.inputHandler.bind(this),this.settings.throttleInputMs??300)).on("focus",this.focusHandler.bind(this)).on("focusout",this.blurHandler.bind(this)).on("keyup",this.keyUpHandler.bind(this)).on("keydown",this.keyDownHandler.bind(this))}controller(){let t=this.internalController();return typeof this.settings.controller=="function"&&(t=this.settings.controller(this)??t),t}internalController(){return{show:this.show.bind(this),hide:this.hide.bind(this),clear:this.clear.bind(this),empty:()=>{}}}moveResult(t){this.controller().show();let s=this.acItems.length;this.rowIndex=this.rowIndex+t,this.rowIndex<=0?this.rowIndex=0:this.rowIndex>s-1&&(this.rowIndex=0);for(let r of this.acItems)r.classList.remove("selected");let n=this.getSelectedDiv();n?(n.classList.add("selected"),n.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})):this.focusHandler({target:this.input})}getSelectedDiv(){return this.resultsDiv.querySelector(`div:nth-child(${this.rowIndex+1})`)}selectResult(t){if(t=t||this.getSelectedDiv(),t){let s=parseInt(t.getAttribute("data-index"));this.resultClicked=!0;let n=this.results[s],r=this.categories[n.category]??{};r.action=r.action??this.setText.bind(this),r.newTab&&(this.tabWindow=Ce("about:blank"));let i={...n,search:this.input.value};t.classList.add("ac-active"),setTimeout(()=>{this.controller().hide("result-selected"),i.action?i.action(i):(r.action(i),r.newTab&&(i.url?this.tabWindow.location.href=i.url:this.tabWindow.close()));var o=new Event("change",{bubbles:!0});this.input.dispatchEvent(o),this.controller().clear("result-selected");let d=new Event("result-selected");d.detail=i,this.input.dispatchEvent(d)},0)}}setText(t){this.container.autoCompleteInput||(this.container.value=t.text),this.controller().hide("settext")}resultClick(t){this.selectResult(t.target.closest(`.${X.item}`))}blurHandler(){setTimeout(()=>{this.resultClicked||this.controller().clear("blurred"),this.resultClicked=!1},100)}clear(){this.settings.debug||this.resultsDiv&&(this.resultsDiv.innerHTML="",this.controller().hide("clear"),this.cacheTmr&&clearTimeout(this.cacheTmr),this.cacheTmr=setTimeout(()=>{this.caches.clear()},60*1e3*5))}show(){if(!this.resultsDiv.classList.contains("ac-active")){let t=this.getViewBounds();this.resultsDiv.style.position="absolute",t.rect.width>100&&(this.resultsDiv.style.width=`${t.rect.width}px`),this.settings.direction=this.settings.direction??t.suggestedDirection,this.resultsDiv.setAttribute("data-direction",this.settings.direction),this.settings.direction==="up"?(this.resultsDiv.style.top="unset",this.resultsDiv.style.bottom=`${t.rect.height+20}px`,this.rowIndex=this.acItems.length):(this.resultsDiv.style.bottom="unset",this.resultsDiv.style.top=`${t.rect.height}px`,this.rowIndex=-1),this.resultsDiv.style.maxWidth="unset",this.resultsDiv.classList.toggle("ac-active",!0)}}getViewBounds(){let t=this.input.getBoundingClientRect();return{rect:t,suggestedDirection:t.top+t.height+500>window.innerHeight?"up":"down"}}hide(){this.resultsDiv.classList.toggle("ac-active",!1)}empty(){this.resultsDiv.innerHTML=`<div class="ac-empty">${this.settings.emptyResultsText}</div>`,this.controller().show()}inputHandler(t){this.cacheTmr&&clearTimeout(this.cacheTmr);let s={search:t.target.value,categories:this.categories};this.container.classList.add("search-running"),this.getItems(s,t).then(n=>{this.controller().clear("new-results"),this.resultsHandler(n,s),this.container.classList.remove("search-running")})}keyDownHandler(t){switch(t.key){case"Enter":t.stopPropagation(),t.preventDefault();break;case"ArrowDown":G(this.moveResult(1));break;case"ArrowUp":G(this.moveResult(-1));break}}keyUpHandler(t){switch(t.key){case"Escape":this.controller().hide("escape");break;case"Enter":this.getSelectedDiv()&&(this.container.preventEnter=!0,t.stopPropagation(),t.preventDefault(),this.selectResult(),setTimeout(()=>{this.container.preventEnter=!1},10));break;default:break}}focusHandler(t){this.controller().clear("focus");let s=t.target.value;this.suggest(s,t)}suggest(t,s){this.input.focus();let n={suggest:!0,search:t||"",categories:this.categories};this.getItems(n,s).then(r=>{this.input.dispatchEvent(new CustomEvent("show-results",{detail:{results:r}})),this.resultsHandler(r,n)})}sort(t,s){return t.sort((n,r)=>{let i=s.categories[n.category],o=s.categories[r.category],d=typeof i.sortIndex=="function"?i.sortIndex(s):i.sortIndex??0;return(typeof o.sortIndex=="function"?o.sortIndex(s):o.sortIndex??0)>d?1:-1})}resultsHandler(t,s){this.results=t,this.rowIndex=-1;let n=0,r=(i,o)=>`
3
- <div title="${o.tooltip||""}" data-index="${n}" class="${`${X.item} cat-${o.category} ${o.class??""}`.trim()}">
4
- ${this.handleImageOrIcon(o)}
5
- <span class="text">${this.formatResultItem(o,s,i)}</span>
6
- ${this.settings.hideCategory?"":`<span class="category">${o.category||""}</span>`}
7
- </div>`;t.forEach(i=>{let o=s.categories[i.category]||{};i.element?this.resultsDiv.appendChild(i.element):(i=typeof i=="string"?{text:i}:i,this.resultsDiv.appendChild(Ae(r(o,i))[0])),n++}),t.length?(this.acItems=this.resultsDiv.querySelectorAll(".ac-itm"),this.controller().show()):s.search.length&&this.controller().empty()}handleImageOrIcon(t){return t.image?`<img src="${t.image}"/>`:typeof this.settings.iconHandler=="function"?this.settings.iconHandler(t):`<svg-icon icon="${t.icon}"></svg-icon>`}formatResultItem(t,s,n){let r=typeof t=="string"?{text:t}:t,i=r.text;return s.search&&(i=i.replace("%search%",s.search),r.description=r.description?.replace("%search%",s.search)),i=this.highlight(i,s.search),r.description&&(i=`<div>${i}</div><small>${r.description}</small>`),n.format&&(i=n.format({item:r,result:i,options:s})),i}highlight(t,s){var n=new RegExp("("+s+")","gi");return t.replace(n,'<span class="txt-hl">$1</span>')}async getItems(t,s){this.aborter&&this.aborter.abort();let n=this.caches.get(t.search);if(n)return n;let r=this.settings.map,i=p=>(typeof p=="string"&&(p={text:p}),p),o=p=>r?p.map(l=>({text:l[r]})):p.map(l=>i(l)),d=p=>(this.settings.max&&this.settings.max>0&&(p.length=this.settings.max),p);return this.aborter=new AbortController,this.aborterSignal=this.aborter.signal,new Promise(p=>{let l=u=>{u=this.sort(u,t),this.settings.cache!==!1&&this.caches.set(t.search,u),p(u)};if(Re(this.items)){if(this.settings.minlength>0&&(!t.search||t.search.length<this.settings.minlength)){l([]);return}let u=this.formatSearch(this.items,t);fetch(u).then(a=>{if(a.status===200){a.json().then(h=>{h=o(h),l(d(h.filter(f=>this.isMatch(t,f))))});return}throw Error(`HTTP error ${a.status} - ${u}`)})}else if(Array.isArray(this.items)){let u=!0;this.items=this.items.map(a=>typeof a=="string"?{text:a}:(u=!1,a)),u&&this.container.classList.add("simple"),l(d(o(this.items)))}else if(typeof this.items=="function")t.control=this.container,Promise.resolve(this.items(t,s)).then(a=>{a=a.map(h=>i(h)),a=o(a),l(a)});else return l(Promise.resolve(this.items.apply(this,t)))})}async items(t){let s=[];t.results=[],t.signal=this.aborterSignal;for(var n in t.categories){let r=t.categories[n];if(r.trigger=r.trigger??(()=>!0),t.results=s,r.trigger(t)){let i=[];try{i=await r.getItems(t)}catch(o){console.warn(`Error loading items for omniBox category '${n}'.`,o)}s=s.concat(i.map(o=>(o.category=n,o)))}}return s}formatSearch(t,s){return t.indexOf("%search%")?t.replace("%search%",s.search||""):t+"?"+this.createQueryParam(s)}createQueryParam(t){let s=t.suggest?"&suggest=true":"";return`q=${t.text}${s}`}isMatch(t,s){return s.text?.indexOf("%search%")>=0?!0:t.search?s.text?.toLowerCase().indexOf(t.search.toLowerCase())>=0:t.suggest}static textFilter(t,s){return function(n){if(!t.search)return!0;if(n.hidden)return!1;let i=(s?n[s]:n).match(new RegExp(t.search,"gi"));if(i)return i;if(n.config?.tags)return n.config.tags.some(o=>o.match(new RegExp(t.search,"gi")))}}};var ee=class{constructor(){this._mode="static",this._staticPaths={tokens:"/assets/pds/styles/pds-tokens.css.js",primitives:"/assets/pds/styles/pds-primitives.css.js",components:"/assets/pds/styles/pds-components.css.js",utilities:"/assets/pds/styles/pds-utilities.css.js",styles:"/assets/pds/styles/pds-styles.css.js"}}setLiveMode(){this._mode="live"}setStaticMode(t={}){this._mode="static",this._staticPaths={...this._staticPaths,...t}}async getStylesheet(t){if(this._mode==="live")return null;try{return(await import(this._staticPaths[t]))[t]}catch(s){console.error(`[PDS Registry] Failed to load static ${t}:`,s),console.error(`[PDS Registry] Looking for: ${this._staticPaths[t]}`),console.error("[PDS Registry] Make sure you've run 'npm run pds:build' and configured PDS.start() with the correct static.root path");let n=new CSSStyleSheet;return n.replaceSync("/* Failed to load "+t+" */"),n}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},F=new ee;async function Me(e,t=[],s=null){try{let n=s?.primitivesStylesheet?s.primitivesStylesheet:await F.getStylesheet("primitives");e.adoptedStyleSheets=[n,...t]}catch(n){let r=e.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${r}> failed to adopt primitives:`,n),e.adoptedStyleSheets=t}}async function Te(e,t=["primitives"],s=[],n=null){try{let i=(await Promise.all(t.map(async o=>{if(n)switch(o){case"tokens":return n.tokensStylesheet;case"primitives":return n.primitivesStylesheet;case"components":return n.componentsStylesheet;case"utilities":return n.utilitiesStylesheet;default:break}return F.getStylesheet(o)}))).filter(o=>o!==null);e.adoptedStyleSheets=[...i,...s]}catch(r){let i=e.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${i}> failed to adopt layers:`,r),e.adoptedStyleSheets=s}}function De(e){let t=new CSSStyleSheet;return t.replaceSync(e),t}var c={FontWeights:{light:300,normal:400,medium:500,semibold:600,bold:700},LineHeights:{tight:1.25,normal:1.5,relaxed:1.75},BorderWidths:{hairline:.5,thin:1,medium:2,thick:3},RadiusSizes:{none:0,small:4,medium:8,large:16,xlarge:24,xxlarge:32},ShadowDepths:{none:"none",light:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",medium:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",deep:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",extreme:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},TransitionSpeeds:{fast:150,normal:250,slow:350},AnimationEasings:{linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out",bounce:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},TouchTargetSizes:{compact:36,standard:44,comfortable:48,spacious:56},LinkStyles:{inline:"inline",block:"block",button:"button"},FocusStyles:{ring:"ring",outline:"outline",border:"border",glow:"glow"},TabSizes:{compact:2,standard:4,wide:8},SelectIcons:{chevron:"chevron",arrow:"arrow",caret:"caret",none:"none"},IconSizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64,"3xl":96}};var Q={mode:"live",liveEdit:!0,preset:"default",autoDefine:{predefine:["pds-icon","pds-drawer","pds-toaster"]},log(e,t,...s){console[e](t,...s)}};var ne={};Ee(ne,{deepMerge:()=>Ie,fragmentFromTemplateLike:()=>te,isObject:()=>K,parseHTML:()=>se});function K(e){return e&&typeof e=="object"&&!Array.isArray(e)}function Ie(e,t){let s={...e};return K(e)&&K(t)&&Object.keys(t).forEach(n=>{K(t[n])?n in e?s[n]=Ie(e[n],t[n]):Object.assign(s,{[n]:t[n]}):Object.assign(s,{[n]:t[n]})}),s}function te(e){let t=Array.isArray(e?.strings)?e.strings:[],s=Array.isArray(e?.values)?e.values:[],n=new Set,r=[],i=/(\s)(\.[\w-]+)=\s*$/;for(let a=0;a<t.length;a+=1){let h=t[a]??"",f=h.match(i);if(f&&a<s.length){let k=f[2].slice(1),m=`pds-val-${a}`;h=h.replace(i,`$1data-pds-prop="${k}:${m}"`),n.add(a)}r.push(h),a<s.length&&!n.has(a)&&r.push(`<!--pds-val-${a}-->`)}let o=document.createElement("template");o.innerHTML=r.join("");let d=(a,h)=>{let f=a.parentNode;if(!f)return;if(h==null){f.removeChild(a);return}let w=k=>{if(k!=null){if(k instanceof Node){f.insertBefore(k,a);return}if(Array.isArray(k)){k.forEach(m=>w(m));return}f.insertBefore(document.createTextNode(String(k)),a)}};w(h),f.removeChild(a)},p=document.createTreeWalker(o.content,NodeFilter.SHOW_COMMENT),l=[];for(;p.nextNode();){let a=p.currentNode;a?.nodeValue?.startsWith("pds-val-")&&l.push(a)}return l.forEach(a=>{let h=Number(a.nodeValue.replace("pds-val-",""));d(a,s[h])}),o.content.querySelectorAll("*").forEach(a=>{let h=a.getAttribute("data-pds-prop");if(!h)return;let[f,w]=h.split(":"),k=Number(String(w).replace("pds-val-",""));f&&Number.isInteger(k)&&(a[f]=s[k]),a.removeAttribute("data-pds-prop")}),o.content}function se(e){return new DOMParser().parseFromString(e,"text/html").body.childNodes}function re(e,t){if(t==null)return;if(typeof t=="object"&&Array.isArray(t.strings)&&Array.isArray(t.values)){e.appendChild(te(t));return}if(t instanceof Node){e.appendChild(t);return}if(Array.isArray(t)){t.forEach(n=>re(e,n));return}let s=typeof t=="string"?t:String(t);e.appendChild(document.createTextNode(s))}function Je(){let e=navigator.userAgent,t=/Safari/i.test(e),s=/(Chrome|Chromium|CriOS|FxiOS|EdgiOS|OPiOS|Opera)/i.test(e);return t&&!s}function Ye(e){if(window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let t=window.matchMedia?.("(max-width: 639px)").matches,s=e.classList.contains("dialog-no-scale-animation")?"pds-dialog-fade-enter":t?"pds-dialog-enter-mobile":"pds-dialog-enter";e.style.animation="none",e.offsetWidth,e.style.animation=`${s} var(--transition-normal) ease`,e.addEventListener("animationend",()=>{e.style.animation=""},{once:!0})}async function We(e,t={}){return t={...{title:"Confirm",type:"confirm",buttons:{ok:{name:"OK",primary:!0},cancel:{name:"Cancel",cancel:!0}}},...t},new Promise(n=>{let r=document.createElement("dialog");Je()&&r.classList.add("dialog-no-scale-animation"),Q.options?.liquidGlassEffects&&r.classList.add("liquid-glass"),t.size&&r.classList.add(`dialog-${t.size}`),t.type&&r.classList.add(`dialog-${t.type}`),t.class&&(Array.isArray(t.class)?r.classList.add(...t.class):r.classList.add(t.class)),t.maxHeight&&r.style.setProperty("--dialog-max-height",t.maxHeight);let i=Object.entries(t.buttons).map(([d,p])=>{let l=p.primary?"btn-primary btn-sm":"btn-outline btn-sm";return`<button type="${p.cancel?"button":"submit"}" class="${l}" value="${d}">${p.name}</button>`});if(t.useForm){let d=document.createElement("div");re(d,e);let p=d.querySelector("form");if(p){r.innerHTML=`
1
+ var qe=Object.defineProperty;var Fe=(t,e)=>()=>(t&&(e=t(t=0)),e);var me=(t,e)=>{for(var n in e)qe(t,n,{get:e[n],enumerable:!0})};var De={};me(De,{AutoDefiner:()=>oe});async function at(...t){let e={};t.length&&typeof t[t.length-1]=="object"&&(e=t.pop()||{});let n=t,{baseURL:s,mapper:r=d=>`${d}.js`,onError:o=(d,a)=>console.error(`[defineWebComponents] ${d}:`,a)}=e,i=s?new URL(s,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),c=d=>d.toLowerCase().replace(/(^|-)([a-z])/g,(a,l,h)=>h.toUpperCase()),u=async d=>{try{if(customElements.get(d))return{tag:d,status:"already-defined"};let a=r(d),h=await import(a instanceof URL?a.href:new URL(a,i).href),y=h?.default??h?.[c(d)];if(!y){if(customElements.get(d))return{tag:d,status:"self-defined"};throw new Error(`No export found for ${d}. Expected default export or named export "${c(d)}".`)}return customElements.get(d)?{tag:d,status:"race-already-defined"}:(customElements.define(d,y),{tag:d,status:"defined"})}catch(a){throw o(d,a),a}};return Promise.all(n.map(u))}var oe,Te=Fe(()=>{oe=class{constructor(e={}){let{baseURL:n,mapper:s,onError:r,predicate:o=()=>!0,attributeModule:i="data-module",root:c=document,scanExisting:u=!0,debounceMs:d=16,observeShadows:a=!0,enhancers:l=[],patchAttachShadow:h=!0}=e,y=new Set,A=new Set,x=new Set,w=new Map,L=new WeakMap,P=new WeakMap,E=0,R=!1,_=null,b=p=>{if(!p||!l.length)return;let m=P.get(p);m||(m=new Set,P.set(p,m));for(let f of l)if(!(!f.selector||!f.run)&&!m.has(f.selector))try{p.matches&&p.matches(f.selector)&&(f.run(p),m.add(f.selector))}catch(T){console.warn(`[AutoDefiner] Error applying enhancer for selector "${f.selector}":`,T)}},S=(p,m)=>{if(!R&&!(!p||!p.includes("-"))&&!customElements.get(p)&&!A.has(p)&&!x.has(p)){if(m&&m.getAttribute){let f=m.getAttribute(i);f&&!w.has(p)&&w.set(p,f)}y.add(p),C()}},C=()=>{E||(E=setTimeout(M,d))},v=p=>{if(p){if(p.nodeType===1){let m=p,f=m.tagName?.toLowerCase();f&&f.includes("-")&&!customElements.get(f)&&o(f,m)&&S(f,m),b(m),a&&m.shadowRoot&&k(m.shadowRoot)}p.querySelectorAll&&p.querySelectorAll("*").forEach(m=>{let f=m.tagName?.toLowerCase();f&&f.includes("-")&&!customElements.get(f)&&o(f,m)&&S(f,m),b(m),a&&m.shadowRoot&&k(m.shadowRoot)})}},k=p=>{if(!p||L.has(p))return;v(p);let m=new MutationObserver(f=>{for(let T of f)T.addedNodes?.forEach(I=>{v(I)}),T.type==="attributes"&&T.target&&v(T.target)});m.observe(p,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...l.map(f=>f.selector).filter(f=>f.startsWith("data-"))]}),L.set(p,m)};async function M(){if(clearTimeout(E),E=0,!y.size)return;let p=Array.from(y);y.clear(),p.forEach(m=>A.add(m));try{let m=f=>w.get(f)??(s?s(f):`${f}.js`);await at(...p,{baseURL:n,mapper:m,onError:(f,T)=>{x.add(f),r?.(f,T)}})}catch{}finally{p.forEach(m=>A.delete(m))}}let D=c===document?document.documentElement:c,H=new MutationObserver(p=>{for(let m of p)m.addedNodes?.forEach(f=>{v(f)}),m.type==="attributes"&&m.target&&v(m.target)});if(H.observe(D,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[i,...l.map(p=>p.selector).filter(p=>p.startsWith("data-"))]}),a&&h&&Element.prototype.attachShadow){let p=Element.prototype.attachShadow;Element.prototype.attachShadow=function(f){let T=p.call(this,f);if(f&&f.mode==="open"){k(T);let I=this.tagName?.toLowerCase();I&&I.includes("-")&&!customElements.get(I)&&S(I,this)}return T},_=()=>Element.prototype.attachShadow=p}return u&&v(D),{stop(){R=!0,H.disconnect(),_&&_(),E&&(clearTimeout(E),E=0),L.forEach(p=>p.disconnect())},flush:M}}static async define(...e){let n={};e.length&&typeof e[e.length-1]=="object"&&(n=e.pop()||{});let s=e,{baseURL:r,mapper:o=a=>`${a}.js`,onError:i=(a,l)=>console.error(`[defineWebComponents] ${a}:`,l)}=n,c=r?new URL(r,typeof location<"u"?location.href:import.meta.url):new URL("./",import.meta.url),u=a=>a.toLowerCase().replace(/(^|-)([a-z])/g,(l,h,y)=>y.toUpperCase()),d=async a=>{try{if(customElements.get(a))return{tag:a,status:"already-defined"};let l=o(a),y=await import(l instanceof URL?l.href:new URL(l,c).href),A=y?.default??y?.[u(a)];if(!A){if(customElements.get(a))return{tag:a,status:"self-defined"};throw new Error(`No export found for ${a}. Expected default export or named export "${u(a)}".`)}return customElements.get(a)?{tag:a,status:"race-already-defined"}:(customElements.define(a,A),{tag:a,status:"defined"})}catch(l){throw i(a,l),l}};return Promise.all(s.map(d))}}});function ge(t){return new DOMParser().parseFromString(t,"text/html").body.childNodes}function ye(t,e=100){let n;return function(...r){let o=()=>{clearTimeout(n),t(...r)};clearTimeout(n),n=setTimeout(o,e)}}function z(t){setTimeout(t,0)}function be(t){try{if(typeof t!="string"||t.indexOf(`
2
+ `)!==-1||t.indexOf(" ")!==-1||t.startsWith("#/"))return!1;let e=new URL(t,window.location.origin);return e.protocol==="http:"||e.protocol==="https:"}catch{return!1}}function we(t,e,n){let s=window.screen.width/2-e/2,r=window.screen.height/2-n/2;return window.open(t,"",`toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=${e}, height=${n}, top=${r}, left=${s}`)}var J={result:"ac-suggestion",item:"ac-itm"},B=class t extends EventTarget{constructor(e,n,s){super(),this.settings={emptyResultsText:"",...s},this.container=e,this.input=n,this.input.setAttribute("autocomplete","off"),this.categories=s.categories||{},this.caches=new Map,z(this.attach.bind(this))}static connect(e,n){let s=e.target;if(!s._autoComplete){if(!n?.categories)throw Error("Missing autocomplete settings");s._autoComplete=new t(s.parentNode,s,n),e.type==="focus"&&setTimeout(()=>{s._autoComplete.focusHandler(e)},100)}return s._autoComplete}on(e,n){return this.input.addEventListener(e,n),this}attach(){this.resultsDiv=document.createElement("div"),this.resultsDiv.title="",this.resultsDiv.classList.add(J.result),this.container.offsetWidth>100&&(this.resultsDiv.style.width=this.container.offsetWidth),this.resultsDiv.addEventListener("mousedown",this.resultClick.bind(this)),this.container.classList.add("ac-container"),this.input.classList.add("ac-input");let e=getComputedStyle(this.input);this.container.style.setProperty("--ac-bg-default",e.backgroundColor),this.container.style.setProperty("--ac-color-default",e.color);let n=getComputedStyle(this.input).accentColor;n!=="auto"&&this.container.style.setProperty("--ac-accent-color",n),(this.container?.shadowRoot??this.container).appendChild(this.resultsDiv),this.controller().clear("attach"),this.on("input",ye(this.inputHandler.bind(this),this.settings.throttleInputMs??300)).on("focus",this.focusHandler.bind(this)).on("focusout",this.blurHandler.bind(this)).on("keyup",this.keyUpHandler.bind(this)).on("keydown",this.keyDownHandler.bind(this))}controller(){let e=this.internalController();return typeof this.settings.controller=="function"&&(e=this.settings.controller(this)??e),e}internalController(){return{show:this.show.bind(this),hide:this.hide.bind(this),clear:this.clear.bind(this),empty:()=>{}}}moveResult(e){this.controller().show();let n=this.acItems.length;this.rowIndex=this.rowIndex+e,this.rowIndex<=0?this.rowIndex=0:this.rowIndex>n-1&&(this.rowIndex=0);for(let r of this.acItems)r.classList.remove("selected");let s=this.getSelectedDiv();s?(s.classList.add("selected"),s.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})):this.focusHandler({target:this.input})}getSelectedDiv(){return this.resultsDiv.querySelector(`div:nth-child(${this.rowIndex+1})`)}selectResult(e){if(e=e||this.getSelectedDiv(),e){let n=parseInt(e.getAttribute("data-index"));this.resultClicked=!0;let s=this.results[n],r=this.categories[s.category]??{};r.action=r.action??this.setText.bind(this),r.newTab&&(this.tabWindow=we("about:blank"));let o={...s,search:this.input.value};e.classList.add("ac-active"),setTimeout(()=>{this.controller().hide("result-selected"),o.action?o.action(o):(r.action(o),r.newTab&&(o.url?this.tabWindow.location.href=o.url:this.tabWindow.close()));var i=new Event("change",{bubbles:!0});this.input.dispatchEvent(i),this.controller().clear("result-selected");let c=new Event("result-selected");c.detail=o,this.input.dispatchEvent(c)},0)}}setText(e){let n=!1;this.input?(this.input.value=e.text,n=!0):this.container?.autoCompleteInput?(this.container.autoCompleteInput.value=e.text,n=!0):"value"in this.container&&(this.container.value=e.text,n=!0),n&&this.input&&this.input.dispatchEvent(new Event("input",{bubbles:!0})),this.controller().hide("settext")}resultClick(e){this.selectResult(e.target.closest(`.${J.item}`))}blurHandler(){setTimeout(()=>{this.resultClicked||this.controller().clear("blurred"),this.resultClicked=!1},100)}clear(){this.settings.debug||this.resultsDiv&&(this.resultsDiv.innerHTML="",this.controller().hide("clear"),this.cacheTmr&&clearTimeout(this.cacheTmr),this.cacheTmr=setTimeout(()=>{this.caches.clear()},60*1e3*5))}show(){if(!this.resultsDiv.classList.contains("ac-active")){let e=this.getViewBounds();this.resultsDiv.style.position="absolute",e.rect.width>100&&(this.resultsDiv.style.width=`${e.rect.width}px`),this.settings.direction=this.settings.direction??e.suggestedDirection,this.resultsDiv.setAttribute("data-direction",this.settings.direction),this.settings.direction==="up"?(this.resultsDiv.style.top="unset",this.resultsDiv.style.bottom=`${e.rect.height+20}px`,this.rowIndex=this.acItems.length):(this.resultsDiv.style.bottom="unset",this.resultsDiv.style.top=`${e.rect.height}px`,this.rowIndex=-1),this.resultsDiv.style.maxWidth="unset",this.resultsDiv.classList.toggle("ac-active",!0)}}getViewBounds(){let e=this.input.getBoundingClientRect();return{rect:e,suggestedDirection:e.top+e.height+500>window.innerHeight?"up":"down"}}hide(){this.resultsDiv.classList.toggle("ac-active",!1)}empty(){this.resultsDiv.innerHTML=`<div class="ac-empty">${this.settings.emptyResultsText}</div>`,this.controller().show()}inputHandler(e){this.cacheTmr&&clearTimeout(this.cacheTmr);let n={search:e.target.value,categories:this.categories};this.container.classList.add("search-running"),this.getItems(n,e).then(s=>{this.controller().clear("new-results"),this.resultsHandler(s,n),this.container.classList.remove("search-running")})}keyDownHandler(e){switch(e.key){case"Enter":e.stopPropagation(),e.preventDefault();break;case"ArrowDown":z(this.moveResult(1));break;case"ArrowUp":z(this.moveResult(-1));break}}keyUpHandler(e){switch(e.key){case"Escape":this.controller().hide("escape");break;case"Enter":this.getSelectedDiv()&&(this.container.preventEnter=!0,e.stopPropagation(),e.preventDefault(),this.selectResult(),setTimeout(()=>{this.container.preventEnter=!1},10));break;default:break}}focusHandler(e){this.controller().clear("focus");let n=e.target.value;this.suggest(n,e)}suggest(e,n){this.input.focus();let s={suggest:!0,search:e||"",categories:this.categories};this.getItems(s,n).then(r=>{this.input.dispatchEvent(new CustomEvent("show-results",{detail:{results:r}})),this.resultsHandler(r,s)})}sort(e,n){return e.sort((s,r)=>{let o=n.categories[s.category],i=n.categories[r.category],c=typeof o.sortIndex=="function"?o.sortIndex(n):o.sortIndex??0;return(typeof i.sortIndex=="function"?i.sortIndex(n):i.sortIndex??0)>c?1:-1})}resultsHandler(e,n){this.results=e,this.rowIndex=-1;let s=0,r=(o,i)=>`
3
+ <div title="${i.tooltip||""}" data-index="${s}" class="${`${J.item} cat-${i.category} ${i.class??""}`.trim()}"${i.style?` style="${i.style}"`:""}>
4
+ ${this.handleImageOrIcon(i)}
5
+ <span class="text">${this.formatResultItem(i,n,o)}</span>
6
+ ${this.settings.hideCategory?"":`<span class="category">${i.category||""}</span>`}
7
+ </div>`;e.forEach(o=>{let i=n.categories[o.category]||{};o.element?this.resultsDiv.appendChild(o.element):(o=typeof o=="string"?{text:o}:o,this.resultsDiv.appendChild(ge(r(i,o))[0])),s++}),e.length?(this.acItems=this.resultsDiv.querySelectorAll(".ac-itm"),this.controller().show()):n.search.length&&this.controller().empty()}handleImageOrIcon(e){return e.image?`<img src="${e.image}"/>`:typeof this.settings.iconHandler=="function"?this.settings.iconHandler(e):`<svg-icon icon="${e.icon}"></svg-icon>`}formatResultItem(e,n,s){let r=typeof e=="string"?{text:e}:e,o=r.text;return n.search&&(o=o.replace("%search%",n.search),r.description=r.description?.replace("%search%",n.search)),o=this.highlight(o,n.search),r.description&&(o=`<div>${o}</div><small>${r.description}</small>`),s.format&&(o=s.format({item:r,result:o,options:n})),o}highlight(e,n){var s=new RegExp("("+n+")","gi");return e.replace(s,'<span class="txt-hl">$1</span>')}async getItems(e,n){this.aborter&&this.aborter.abort();let s=this.caches.get(e.search);if(s)return s;let r=this.settings.map,o=u=>(typeof u=="string"&&(u={text:u}),u),i=u=>r?u.map(d=>({text:d[r]})):u.map(d=>o(d)),c=u=>(this.settings.max&&this.settings.max>0&&(u.length=this.settings.max),u);return this.aborter=new AbortController,this.aborterSignal=this.aborter.signal,new Promise(u=>{let d=a=>{a=this.sort(a,e),this.settings.cache!==!1&&this.caches.set(e.search,a),u(a)};if(be(this.items)){if(this.settings.minlength>0&&(!e.search||e.search.length<this.settings.minlength)){d([]);return}let a=this.formatSearch(this.items,e);fetch(a).then(l=>{if(l.status===200){l.json().then(h=>{h=i(h),d(c(h.filter(y=>this.isMatch(e,y))))});return}throw Error(`HTTP error ${l.status} - ${a}`)})}else if(Array.isArray(this.items)){let a=!0;this.items=this.items.map(l=>typeof l=="string"?{text:l}:(a=!1,l)),a&&this.container.classList.add("simple"),d(c(i(this.items)))}else if(typeof this.items=="function")e.control=this.container,Promise.resolve(this.items(e,n)).then(l=>{l=l.map(h=>o(h)),l=i(l),d(l)});else return d(Promise.resolve(this.items.apply(this,e)))})}async items(e){let n=[];e.results=[],e.signal=this.aborterSignal;for(var s in e.categories){let r=e.categories[s];if(r.trigger=r.trigger??(()=>!0),e.results=n,r.trigger(e)){let o=[];try{o=await r.getItems(e)}catch(i){console.warn(`Error loading items for omniBox category '${s}'.`,i)}n=n.concat(o.map(i=>(i.category=s,i)))}}return n}formatSearch(e,n){return e.indexOf("%search%")?e.replace("%search%",n.search||""):e+"?"+this.createQueryParam(n)}createQueryParam(e){let n=e.suggest?"&suggest=true":"";return`q=${e.text}${n}`}isMatch(e,n){return n.text?.indexOf("%search%")>=0?!0:e.search?n.text?.toLowerCase().indexOf(e.search.toLowerCase())>=0:e.suggest}static textFilter(e,n){return function(s){if(!e.search)return!0;if(s.hidden)return!1;let o=(n?s[n]:s).match(new RegExp(e.search,"gi"));if(o)return o;if(s.config?.tags)return s.config.tags.some(i=>i.match(new RegExp(e.search,"gi")))}}};var X=class{constructor(){this._mode="static",this._staticPaths={tokens:"/assets/pds/styles/pds-tokens.css.js",primitives:"/assets/pds/styles/pds-primitives.css.js",components:"/assets/pds/styles/pds-components.css.js",utilities:"/assets/pds/styles/pds-utilities.css.js",styles:"/assets/pds/styles/pds-styles.css.js"}}setLiveMode(){this._mode="live"}setStaticMode(e={}){this._mode="static",this._staticPaths={...this._staticPaths,...e}}async getStylesheet(e){if(this._mode==="live")return null;try{return(await import(this._staticPaths[e]))[e]}catch(n){console.error(`[PDS Registry] Failed to load static ${e}:`,n),console.error(`[PDS Registry] Looking for: ${this._staticPaths[e]}`),console.error("[PDS Registry] Make sure you've run 'npm run pds:build' and configured PDS.start() with the correct static.root path");let s=new CSSStyleSheet;return s.replaceSync("/* Failed to load "+e+" */"),s}}get mode(){return this._mode}get isLive(){return this._mode==="live"}},U=new X;async function ve(t,e=[],n=null){try{let s=n?.primitivesStylesheet?n.primitivesStylesheet:await U.getStylesheet("primitives");t.adoptedStyleSheets=[s,...e]}catch(s){let r=t.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${r}> failed to adopt primitives:`,s),t.adoptedStyleSheets=e}}async function xe(t,e=["primitives"],n=[],s=null){try{let o=(await Promise.all(e.map(async i=>{if(s)switch(i){case"tokens":return s.tokensStylesheet;case"primitives":return s.primitivesStylesheet;case"components":return s.componentsStylesheet;case"utilities":return s.utilitiesStylesheet;default:break}return U.getStylesheet(i)}))).filter(i=>i!==null);t.adoptedStyleSheets=[...o,...n]}catch(r){let o=t.host?.tagName?.toLowerCase()||"unknown";console.error(`[PDS Adopter] <${o}> failed to adopt layers:`,r),t.adoptedStyleSheets=n}}function Ee(t){let e=new CSSStyleSheet;return e.replaceSync(t),e}var Se={FontWeights:{light:300,normal:400,medium:500,semibold:600,bold:700},LineHeights:{tight:1.25,normal:1.5,relaxed:1.75},BorderWidths:{hairline:.5,thin:1,medium:2,thick:3},RadiusSizes:{none:0,small:4,medium:8,large:16,xlarge:24,xxlarge:32},ShadowDepths:{none:"none",light:"0 1px 2px 0 rgba(0, 0, 0, 0.05)",medium:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",deep:"0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",extreme:"0 25px 50px -12px rgba(0, 0, 0, 0.25)"},TransitionSpeeds:{fast:150,normal:250,slow:350},AnimationEasings:{linear:"linear",ease:"ease","ease-in":"ease-in","ease-out":"ease-out","ease-in-out":"ease-in-out",bounce:"cubic-bezier(0.68, -0.55, 0.265, 1.55)"},TouchTargetSizes:{compact:36,standard:44,comfortable:48,spacious:56},LinkStyles:{inline:"inline",block:"block",button:"button"},FocusStyles:{ring:"ring",outline:"outline",border:"border",glow:"glow"},TabSizes:{compact:2,standard:4,wide:8},SelectIcons:{chevron:"chevron",arrow:"arrow",caret:"caret",none:"none"},IconSizes:{xs:16,sm:20,md:24,lg:32,xl:48,"2xl":64,"3xl":96}};var V={mode:"live",liveEdit:!0,preset:"default",autoDefine:{predefine:["pds-icon","pds-drawer","pds-toaster","pds-form"]},log(t,e,...n){console[t](e,...n)}};var te={};me(te,{deepMerge:()=>Ae,fragmentFromTemplateLike:()=>Y,isObject:()=>G,parseHTML:()=>ee});function G(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Ae(t,e){let n={...t};return G(t)&&G(e)&&Object.keys(e).forEach(s=>{G(e[s])?s in t?n[s]=Ae(t[s],e[s]):Object.assign(n,{[s]:e[s]}):Object.assign(n,{[s]:e[s]})}),n}function Y(t){let e=Array.isArray(t?.strings)?t.strings:[],n=Array.isArray(t?.values)?t.values:[],s=new Set,r=[],o=/(\s)(\.[\w-]+)=\s*$/;for(let l=0;l<e.length;l+=1){let h=e[l]??"",y=h.match(o);if(y&&l<n.length){let x=y[2].slice(1),w=`pds-val-${l}`;h=h.replace(o,`$1data-pds-prop="${x}:${w}"`),s.add(l)}r.push(h),l<n.length&&!s.has(l)&&r.push(`<!--pds-val-${l}-->`)}let i=document.createElement("template");i.innerHTML=r.join("");let c=(l,h)=>{let y=l.parentNode;if(!y)return;if(h==null){y.removeChild(l);return}let A=x=>{if(x!=null){if(x instanceof Node){y.insertBefore(x,l);return}if(Array.isArray(x)){x.forEach(w=>A(w));return}y.insertBefore(document.createTextNode(String(x)),l)}};A(h),y.removeChild(l)},u=document.createTreeWalker(i.content,NodeFilter.SHOW_COMMENT),d=[];for(;u.nextNode();){let l=u.currentNode;l?.nodeValue?.startsWith("pds-val-")&&d.push(l)}return d.forEach(l=>{let h=Number(l.nodeValue.replace("pds-val-",""));c(l,n[h])}),i.content.querySelectorAll("*").forEach(l=>{let h=l.getAttribute("data-pds-prop");if(!h)return;let[y,A]=h.split(":"),x=Number(String(A).replace("pds-val-",""));y&&Number.isInteger(x)&&(l[y]=n[x]),l.removeAttribute("data-pds-prop")}),i.content}function ee(t){return new DOMParser().parseFromString(t,"text/html").body.childNodes}function ne(t,e){if(e==null)return;if(typeof e=="object"&&Array.isArray(e.strings)&&Array.isArray(e.values)){t.appendChild(Y(e));return}if(e instanceof Node){t.appendChild(e);return}if(Array.isArray(e)){e.forEach(s=>ne(t,s));return}let n=typeof e=="string"?e:String(e);t.appendChild(document.createTextNode(n))}function He(){let t=navigator.userAgent,e=/Safari/i.test(t),n=/(Chrome|Chromium|CriOS|FxiOS|EdgiOS|OPiOS|Opera)/i.test(t);return e&&!n}function We(t){if(window.matchMedia?.("(prefers-reduced-motion: reduce)").matches)return;let e=window.matchMedia?.("(max-width: 639px)").matches,n=t.classList.contains("dialog-no-scale-animation")?"pds-dialog-fade-enter":e?"pds-dialog-enter-mobile":"pds-dialog-enter";t.style.animation="none",t.offsetWidth,t.style.animation=`${n} var(--transition-normal) ease`,t.addEventListener("animationend",()=>{t.style.animation=""},{once:!0})}async function Le(t,e={}){return e={...{title:"Confirm",type:"confirm",buttons:{ok:{name:"OK",primary:!0},cancel:{name:"Cancel",cancel:!0}}},...e},new Promise(s=>{let r=document.createElement("dialog");He()&&r.classList.add("dialog-no-scale-animation"),V.options?.liquidGlassEffects&&r.classList.add("liquid-glass"),e.size&&r.classList.add(`dialog-${e.size}`),e.type&&r.classList.add(`dialog-${e.type}`),e.class&&(Array.isArray(e.class)?r.classList.add(...e.class):r.classList.add(e.class)),e.maxHeight&&r.style.setProperty("--dialog-max-height",e.maxHeight);let o=Object.entries(e.buttons).map(([c,u])=>{let d=u.primary?"btn-primary btn-sm":"btn-outline btn-sm";return`<button type="${u.cancel?"button":"submit"}" class="${d}" value="${c}">${u.name}</button>`});if(e.useForm){let c=document.createElement("div");ne(c,t);let u=c.querySelector("form");if(u){r.innerHTML=`
8
8
  <header>
9
- <h2>${t.title}</h2>
9
+ <h2>${e.title}</h2>
10
10
  </header>
11
- `;let l=document.createElement("article");for(l.className="dialog-body";p.firstChild;)l.appendChild(p.firstChild);p.appendChild(l);let u=document.createElement("footer");u.innerHTML=i.join(""),p.appendChild(u),r.appendChild(p)}else r.innerHTML=`
11
+ `;let d=document.createElement("article");for(d.className="dialog-body";u.firstChild;)d.appendChild(u.firstChild);u.appendChild(d);let a=document.createElement("footer");a.innerHTML=o.join(""),u.appendChild(a),r.appendChild(u)}else r.innerHTML=`
12
12
  <header>
13
- <h2>${t.title}</h2>
13
+ <h2>${e.title}</h2>
14
14
  </header>
15
15
  <article id="msg-container"></article>
16
16
  <footer>
17
- ${i.join("")}
17
+ ${o.join("")}
18
18
  </footer>
19
- `,r.querySelector("#msg-container").appendChild(d)}else{r.innerHTML=`
19
+ `,r.querySelector("#msg-container").appendChild(c)}else{r.innerHTML=`
20
20
  <form method="dialog">
21
21
  <header>
22
- <h2>${t.title}</h2>
22
+ <h2>${e.title}</h2>
23
23
  </header>
24
24
 
25
25
  <article id="msg-container"></article>
26
26
 
27
27
  <footer>
28
- ${i.join("")}
28
+ ${o.join("")}
29
29
  </footer>
30
30
  </form>
31
- `;let d=r.querySelector("#msg-container");re(d,e)}r.addEventListener("click",d=>{d.target.closest('button[value="cancel"]')&&(r.close(),n(!1))});let o=()=>{let d=r.querySelector("form");d?d.addEventListener("submit",p=>{p.preventDefault();let l;t.useForm&&p.submitter.value==="ok"?(console.log("Found form:",d),console.log("Form elements:",d?Array.from(d.elements):"no form"),l=new FormData(d),console.log("FormData entries:",Array.from(l.entries()))):l=p.submitter.value==="ok",r.close(),n(l)}):requestAnimationFrame(o)};o(),r.addEventListener("close",()=>{setTimeout(()=>r.remove(),200)}),document.body.appendChild(r),typeof t.rendered=="function"&&t.rendered(r),r.showModal(),requestAnimationFrame(()=>Ye(r))})}async function Xe(){let e=document.querySelector("pds-toaster");return e||(e=document.createElement("pds-toaster"),document.body.appendChild(e),await customElements.whenDefined("pds-toaster")),e}async function M(e,t={}){return(await Xe()).toast(e,t)}M.success=async function(e,t={}){return M(e,{...t,type:"success"})};M.error=async function(e,t={}){return M(e,{...t,type:"error"})};M.warning=async function(e,t={}){return M(e,{...t,type:"warning"})};M.info=async function(e,t={}){return M(e,{...t,type:"information"})};var et=[{selector:".accordion"},{selector:"nav[data-dropdown]"},{selector:"label[data-toggle]"},{selector:'input[type="range"]'},{selector:"form[data-required]"},{selector:"fieldset[role=group][data-open]"},{selector:"[data-clip]"},{selector:"button, a[class*='btn-']"}];function tt(e){e.dataset.enhancedAccordion||(e.dataset.enhancedAccordion="true",e.addEventListener("toggle",t=>{t.target.open&&t.target.parentElement===e&&e.querySelectorAll(":scope > details[open]").forEach(s=>{s!==t.target&&(s.open=!1)})},!0))}function st(e){if(e.dataset.enhancedDropdown)return;e.dataset.enhancedDropdown="true";let t=e.lastElementChild;if(!t)return;let s=e.querySelector("[data-dropdown-toggle]")||e.querySelector("button");s&&!s.hasAttribute("type")&&s.setAttribute("type","button"),t.id||(t.id=`dropdown-${Math.random().toString(36).slice(2,9)}`),t.tagName?.toLowerCase()==="menu"&&!t.hasAttribute("role")&&t.setAttribute("role","menu"),t.hasAttribute("aria-hidden")||t.setAttribute("aria-hidden","true"),s&&(s.setAttribute("aria-haspopup","true"),s.setAttribute("aria-controls",t.id),s.setAttribute("aria-expanded","false"));let r=()=>{let a=t.getAttribute("style");t.style.visibility="hidden",t.style.display="inline-block",t.style.pointerEvents="none";let h=t.getBoundingClientRect(),f=Math.max(t.offsetWidth||0,t.scrollWidth||0,h.width||0,1),w=Math.max(t.offsetHeight||0,t.scrollHeight||0,h.height||0,1);return a===null?t.removeAttribute("style"):t.setAttribute("style",a),{width:f,height:w}},i=()=>{let a=(e.getAttribute("data-direction")||e.getAttribute("data-dropdown-direction")||e.getAttribute("data-mode")||"auto").toLowerCase();if(a==="up"||a==="down")return a;let h=(s||e).getBoundingClientRect(),{height:f}=r(),w=Math.max(0,window.innerHeight-h.bottom),k=Math.max(0,h.top),m=w>=f,x=k>=f;return m&&!x?"down":x&&!m?"up":m&&x?"down":k>w?"up":"down"},o=()=>{let a=(e.getAttribute("data-align")||e.getAttribute("data-dropdown-align")||"auto").toLowerCase();if(a==="left"||a==="right"||a==="start"||a==="end")return a==="start"?"left":a==="end"?"right":a;let h=(s||e).getBoundingClientRect(),{width:f}=r(),w=Math.max(0,window.innerWidth-h.left),k=Math.max(0,h.right),m=w>=f,x=k>=f;return m&&!x?"left":x&&!m?"right":m&&x?"left":k>w?"right":"left"},d=null,p=()=>{e.dataset.dropdownDirection=i(),e.dataset.dropdownAlign=o(),t.setAttribute("aria-hidden","false"),s?.setAttribute("aria-expanded","true"),d||(d=a=>{(a.composedPath?a.composedPath():[a.target]).some(w=>w===e)||l()},setTimeout(()=>{document.addEventListener("click",d)},0))},l=()=>{t.setAttribute("aria-hidden","true"),s?.setAttribute("aria-expanded","false"),d&&(document.removeEventListener("click",d),d=null)},u=()=>{t.getAttribute("aria-hidden")==="false"?l():p()};s?.addEventListener("click",a=>{a.preventDefault(),a.stopPropagation(),u()}),e.addEventListener("keydown",a=>{a.key==="Escape"&&(l(),s?.focus())}),e.addEventListener("focusout",a=>{a.relatedTarget&&((a.composedPath?a.composedPath():[a.relatedTarget]).some(w=>w===e)||l())})}function nt(e){if(e.dataset.enhancedToggle)return;e.dataset.enhancedToggle="true";let t=e.querySelector('input[type="checkbox"]');if(!t)return;e.hasAttribute("tabindex")||e.setAttribute("tabindex","0"),e.setAttribute("role","switch"),e.setAttribute("aria-checked",t.checked?"true":"false");let s=document.createElement("span");s.className="toggle-switch",s.setAttribute("role","presentation"),s.setAttribute("aria-hidden","true");let n=document.createElement("span");n.className="toggle-knob",s.appendChild(n),e.insertBefore(s,t.nextSibling);let r=()=>{e.setAttribute("aria-checked",t.checked?"true":"false")},i=()=>{t.disabled||(t.checked=!t.checked,r(),t.dispatchEvent(new Event("change",{bubbles:!0})))};e.addEventListener("click",o=>{o.preventDefault(),i()}),e.addEventListener("keydown",o=>{(o.key===" "||o.key==="Enter")&&(o.preventDefault(),i())}),t.addEventListener("change",r)}function rt(e){if(e.dataset.enhancedRange)return;let t=e.closest("label"),s=t?.classList.contains("range-output"),n=e.id||`range-${Math.random().toString(36).substring(2,11)}`,r=`${n}-output`;if(e.id=n,s){let i=t.querySelector("span");if(i&&!i.classList.contains("range-output-wrapper")){let o=document.createElement("span");o.className="range-output-wrapper",o.style.display="flex",o.style.justifyContent="space-between",o.style.alignItems="center";let d=document.createElement("span");d.textContent=i.textContent,o.appendChild(d);let p=document.createElement("output");p.id=r,p.setAttribute("for",n),p.style.color="var(--surface-text-secondary, var(--color-text-secondary))",p.style.fontSize="0.875rem",p.textContent=e.value,o.appendChild(p),i.textContent="",i.appendChild(o);let l=()=>{p.textContent=e.value};e.addEventListener("input",l)}}else{let i=e.closest(".range-container");i||(i=document.createElement("div"),i.className="range-container",e.parentNode?.insertBefore(i,e),i.appendChild(e)),i.style.position="relative";let o=document.createElement("output");o.id=r,o.setAttribute("for",n),o.className="range-bubble",o.setAttribute("aria-live","polite"),i.appendChild(o);let d=()=>{let u=parseFloat(e.min)||0,a=parseFloat(e.max)||100,h=parseFloat(e.value),f=(h-u)/(a-u);o.style.left=`calc(${f*100}% )`,o.textContent=String(h)},p=()=>o.classList.add("visible"),l=()=>o.classList.remove("visible");e.addEventListener("input",d),e.addEventListener("pointerdown",p),e.addEventListener("pointerup",l),e.addEventListener("pointerleave",l),e.addEventListener("focus",p),e.addEventListener("blur",l),d()}e.dataset.enhancedRange="1"}function it(e){if(e.dataset.enhancedRequired)return;e.dataset.enhancedRequired="true";let t=s=>{let n;if(s.closest("[role$=group]")?n=s.closest("[role$=group]").querySelector("legend"):n=s.closest("label"),!n||n.querySelector(".required-asterisk"))return;let r=document.createElement("span");r.classList.add("required-asterisk"),r.textContent="*",r.style.marginLeft="4px";let i=n.querySelector("span, [data-label]");if(i)i.appendChild(r);else{let d=n.querySelector("input, select, textarea");d?n.insertBefore(r,d):n.appendChild(r)}let o=s.closest("form");if(o&&!o.querySelector(".required-legend")){let d=document.createElement("small");d.classList.add("required-legend"),d.textContent="* Required fields",o.insertBefore(d,o.querySelector(".form-actions")||o.lastElementChild)}};e.querySelectorAll("[required]").forEach(s=>{t(s)})}function ot(e){if(e.dataset.enhancedOpenGroup)return;e.dataset.enhancedOpenGroup="true",e.classList.add("flex","flex-wrap","buttons");let t=document.createElement("input");t.type="text",t.placeholder="Add item...",t.classList.add("input-text","input-sm"),t.style.width="auto";let s=e.querySelector('input[type="radio"], input[type="checkbox"]');e.appendChild(t),t.addEventListener("keydown",n=>{if(n.key==="Enter"||n.key==="Tab"){let r=t.value.trim();if(r){n.preventDefault();let i=s.type==="radio"?"radio":"checkbox",o=`open-group-${Math.random().toString(36).substring(2,11)}`,d=document.createElement("label"),p=document.createElement("span");p.setAttribute("data-label",""),p.textContent=r;let l=document.createElement("input");l.type=i,l.name=s.name||e.getAttribute("data-name")||"open-group",l.value=r,l.id=o,d.appendChild(p),d.appendChild(l),e.insertBefore(d,t),t.value=""}}else if(n.key==="Backspace"&&t.value===""){n.preventDefault();let r=e.querySelectorAll("label");r.length>0&&r[r.length-1].remove()}})}function at(e){if(e.dataset.enhancedClip)return;e.dataset.enhancedClip="true",e.hasAttribute("tabindex")||e.setAttribute("tabindex","0"),e.hasAttribute("role")||e.setAttribute("role","button");let t=()=>{let n=e.getAttribute("data-clip-open")==="true";e.setAttribute("aria-expanded",n?"true":"false")},s=()=>{let n=e.getAttribute("data-clip-open")==="true";e.setAttribute("data-clip-open",n?"false":"true"),t()};e.addEventListener("click",n=>{n.defaultPrevented||s()}),e.addEventListener("keydown",n=>{(n.key===" "||n.key==="Enter")&&(n.preventDefault(),s())}),t()}function ct(e){if(e.dataset.enhancedBtnWorking)return;e.dataset.enhancedBtnWorking="true";let t=null,s=!1;new MutationObserver(r=>{r.forEach(i=>{if(i.attributeName==="class"){let o=e.classList.contains("btn-working"),d=e.querySelector("pds-icon");if(o)if(d)t||(t=d.getAttribute("icon")),d.setAttribute("icon","circle-notch");else{let p=document.createElement("pds-icon");p.setAttribute("icon","circle-notch"),p.setAttribute("size","sm"),e.insertBefore(p,e.firstChild),s=!0}else i.oldValue?.includes("btn-working")&&d&&(s?(d.remove(),s=!1):t&&(d.setAttribute("icon",t),t=null))}})}).observe(e,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var lt=new Map([[".accordion",tt],["nav[data-dropdown]",st],["label[data-toggle]",nt],['input[type="range"]',rt],["form[data-required]",it],["fieldset[role=group][data-open]",ot],["[data-clip]",at],["button, a[class*='btn-']",ct]]),ie=et.map(e=>({...e,run:lt.get(e.selector)||(()=>{})}));var ze="pds",dt=/^([a-z][a-z0-9+\-.]*:)?\/\//i,Pe=/^[a-z]:/i;function H(e=""){return e.endsWith("/")?e:`${e}/`}function ut(e="",t=ze){let s=e.replace(/\/+$/,"");return new RegExp(`(?:^|/)${t}$`,"i").test(s)?s:`${s}/${t}`}function pt(e){return e.replace(/^\.\/+/,"")}function ht(e){return Pe.test(e)?e.replace(Pe,"").replace(/^\/+/,""):e}function ft(e){return e.startsWith("public/")?e.substring(7):e}function oe(e,t={}){let s=t.segment||ze,n=t.defaultRoot||`/assets/${s}/`,r=e?.public&&e.public?.root||e?.static&&e.static?.root||null;if(!r||typeof r!="string")return H(n);let i=r.trim();return i?(i=i.replace(/\\/g,"/"),i=ut(i,s),i=H(i),dt.test(i)?i:(i=pt(i),i=ht(i),i.startsWith("/")||(i=ft(i),i.startsWith("/")||(i=`/${i}`),i=i.replace(/\/+/g,(o,d)=>d===0?o:"/")),H(i))):H(n)}var j="any",le={type:"object",allowUnknown:!1,properties:{id:{type:"string"},name:{type:"string"},tags:{type:"array",items:{type:"string"}},description:{type:"string"},options:{type:"object",allowUnknown:!0},form:{type:"object",allowUnknown:!0},colors:{type:"object",allowUnknown:!1,properties:{primary:{type:"string",relations:{tokens:["--color-primary-*","--color-primary-fill","--color-primary-text","--background-mesh-*"]}},secondary:{type:"string",relations:{tokens:["--color-secondary-*","--color-gray-*","--background-mesh-*"]}},accent:{type:"string",relations:{tokens:["--color-accent-*","--background-mesh-*"]}},background:{type:"string",relations:{tokens:["--color-surface-*","--color-surface-translucent-*","--surface-*-bg","--surface-*-text","--surface-*-text-secondary","--surface-*-text-muted","--surface-*-icon","--surface-*-icon-subtle","--surface-*-shadow","--surface-*-border"]}},success:{type:["string","null"],relations:{tokens:["--color-success-*"]}},warning:{type:["string","null"],relations:{tokens:["--color-warning-*"]}},danger:{type:["string","null"],relations:{tokens:["--color-danger-*"]}},info:{type:["string","null"],relations:{tokens:["--color-info-*"]}},gradientStops:{type:"number"},elevationOpacity:{type:"number",relations:{tokens:["--surface-*-shadow"]}},darkMode:{type:"object",allowUnknown:!0,properties:{background:{type:"string",relations:{theme:"dark",tokens:["--color-surface-*","--color-surface-translucent-*","--surface-*-bg","--surface-*-text","--surface-*-text-secondary","--surface-*-text-muted","--surface-*-icon","--surface-*-icon-subtle","--surface-*-shadow","--surface-*-border"]}},primary:{type:"string",relations:{theme:"dark",tokens:["--color-primary-*","--color-primary-fill","--color-primary-text"]}},secondary:{type:"string",relations:{theme:"dark",tokens:["--color-secondary-*","--color-gray-*"]}},accent:{type:"string",relations:{theme:"dark",tokens:["--color-accent-*"]}}}}}},typography:{type:"object",allowUnknown:!1,properties:{fontFamilyHeadings:{type:"string",relations:{tokens:["--font-family-headings"]}},fontFamilyBody:{type:"string",relations:{tokens:["--font-family-body"]}},fontFamilyMono:{type:"string",relations:{tokens:["--font-family-mono"]}},baseFontSize:{type:"number",relations:{tokens:["--font-size-*"]}},fontScale:{type:"number",relations:{tokens:["--font-size-*"]}},fontWeightLight:{type:["string","number"],relations:{tokens:["--font-weight-light"]}},fontWeightNormal:{type:["string","number"],relations:{tokens:["--font-weight-normal"]}},fontWeightMedium:{type:["string","number"],relations:{tokens:["--font-weight-medium"]}},fontWeightSemibold:{type:["string","number"],relations:{tokens:["--font-weight-semibold"]}},fontWeightBold:{type:["string","number"],relations:{tokens:["--font-weight-bold"]}},lineHeightTight:{type:["string","number"],relations:{tokens:["--font-line-height-tight"]}},lineHeightNormal:{type:["string","number"],relations:{tokens:["--font-line-height-normal"]}},lineHeightRelaxed:{type:["string","number"],relations:{tokens:["--font-line-height-relaxed"]}},letterSpacingTight:{type:"number"},letterSpacingNormal:{type:"number"},letterSpacingWide:{type:"number"}}},spatialRhythm:{type:"object",allowUnknown:!1,properties:{baseUnit:{type:"number",relations:{tokens:["--spacing-*"]}},scaleRatio:{type:"number"},maxSpacingSteps:{type:"number",relations:{tokens:["--spacing-*"]}},containerMaxWidth:{type:["number","string"]},containerPadding:{type:"number"},inputPadding:{type:"number",relations:{rules:[{selectors:["input","textarea","select"],properties:["padding"]}]}},buttonPadding:{type:"number",relations:{rules:[{selectors:["button",".btn"],properties:["padding"]}]}},sectionSpacing:{type:"number",relations:{rules:[{selectors:["section"],properties:["margin","padding"]}]}}}},shape:{type:"object",allowUnknown:!1,properties:{radiusSize:{type:["string","number"],relations:{tokens:["--radius-*"]}},customRadius:{type:["string","number","null"]},borderWidth:{type:["string","number"],relations:{tokens:["--border-width-*"]}}}},behavior:{type:"object",allowUnknown:!1,properties:{transitionSpeed:{type:["string","number"],relations:{tokens:["--transition-*"]}},animationEasing:{type:"string"},customTransitionSpeed:{type:["number","null"]},customEasing:{type:["string","null"]},focusRingWidth:{type:"number",relations:{rules:[{selectors:[":focus-visible"],properties:["outline-width","box-shadow"]}]}},focusRingOpacity:{type:"number",relations:{rules:[{selectors:[":focus-visible"],properties:["box-shadow","outline-color"]}]}},hoverOpacity:{type:"number"}}},layout:{type:"object",allowUnknown:!1,properties:{maxWidth:{type:["number","string"],relations:{tokens:["--layout-max-width","--layout-max-width-*"]}},maxWidths:{type:"object",allowUnknown:!1,properties:{sm:{type:["number","string"],relations:{tokens:["--layout-max-width-sm"]}},md:{type:["number","string"],relations:{tokens:["--layout-max-width-md"]}},lg:{type:["number","string"],relations:{tokens:["--layout-max-width-lg"]}},xl:{type:["number","string"],relations:{tokens:["--layout-max-width-xl"]}}}},containerPadding:{type:["number","string"],relations:{tokens:["--layout-container-padding"]}},breakpoints:{type:"object",allowUnknown:!1,properties:{sm:{type:"number"},md:{type:"number"},lg:{type:"number"},xl:{type:"number"}}},gridColumns:{type:"number"},gridGutter:{type:"number"},densityCompact:{type:"number"},densityNormal:{type:"number"},densityComfortable:{type:"number"},buttonMinHeight:{type:"number"},inputMinHeight:{type:"number"},baseShadowOpacity:{type:"number",relations:{tokens:["--shadow-*"]}},darkMode:{type:"object",allowUnknown:!0,properties:{baseShadowOpacity:{type:"number",relations:{theme:"dark",tokens:["--shadow-*"]}}}},utilities:{type:"object",allowUnknown:!0},gridSystem:{type:"object",allowUnknown:!0},containerMaxWidth:{type:["number","string"]}}},layers:{type:"object",allowUnknown:!1,properties:{baseShadowOpacity:{type:"number",relations:{tokens:["--shadow-*"]}},shadowBlurMultiplier:{type:"number",relations:{tokens:["--shadow-*"]}},shadowOffsetMultiplier:{type:"number",relations:{tokens:["--shadow-*"]}},shadowDepth:{type:"string"},blurLight:{type:"number"},blurMedium:{type:"number"},blurHeavy:{type:"number"},baseZIndex:{type:"number",relations:{tokens:["--z-*"]}},zIndexStep:{type:"number",relations:{tokens:["--z-*"]}},zIndexBase:{type:"number"},zIndexDropdown:{type:"number"},zIndexSticky:{type:"number"},zIndexFixed:{type:"number"},zIndexModal:{type:"number"},zIndexPopover:{type:"number"},zIndexTooltip:{type:"number"},zIndexNotification:{type:"number"},darkMode:{type:"object",allowUnknown:!0,properties:{baseShadowOpacity:{type:"number",relations:{theme:"dark",tokens:["--shadow-*"]}}}}}},advanced:{type:"object",allowUnknown:!0},a11y:{type:"object",allowUnknown:!0},icons:{type:"object",allowUnknown:!1,properties:{set:{type:"string"},weight:{type:"string"},defaultSize:{type:"number",relations:{tokens:["--icon-size"]}},sizes:{type:"object",allowUnknown:!0},spritePath:{type:"string"},externalPath:{type:"string"},include:{type:"object",allowUnknown:!0}}},components:{type:"object",allowUnknown:!0},gap:{type:"number"},debug:{type:"boolean"}}},mt={type:"object",allowUnknown:!0,properties:{mode:{type:"string"},preset:{type:"string"},design:le,enhancers:{type:["object","array"]},applyGlobalStyles:{type:"boolean"},manageTheme:{type:"boolean"},themeStorageKey:{type:"string"},preloadStyles:{type:"boolean"},criticalLayers:{type:"array",items:{type:"string"}},autoDefine:{type:"object",allowUnknown:!1,properties:{predefine:{type:"array",items:{type:"string"}},mapper:{type:j},enhancers:{type:["object","array"]},scanExisting:{type:"boolean"},observeShadows:{type:"boolean"},patchAttachShadow:{type:"boolean"},debounceMs:{type:"number"},onError:{type:j},baseURL:{type:"string"}}},managerURL:{type:"string"},manager:{type:j},liveEdit:{type:"boolean"},log:{type:j}}};function ae(e){return e===null?"null":Array.isArray(e)?"array":typeof e}function yt(e,t){if(t===j)return!0;let s=ae(e);return Array.isArray(t)?t.includes(s):s===t}function Z(e,t,s,n){if(!t)return;let r=t.type||j;if(!yt(e,r)){n.push({path:s,expected:r,actual:ae(e),message:`Expected ${r} but got ${ae(e)}`});return}if(r==="array"&&t.items&&Array.isArray(e)&&e.forEach((i,o)=>{Z(i,t.items,`${s}[${o}]`,n)}),r==="object"&&e&&typeof e=="object"){let i=t.properties||{};for(let[o,d]of Object.entries(e)){if(!Object.prototype.hasOwnProperty.call(i,o)){t.allowUnknown||n.push({path:`${s}.${o}`,expected:"known property",actual:"unknown",message:`Unknown property "${o}"`});continue}Z(d,i[o],`${s}.${o}`,n)}}}function ce(e,t="",s={}){if(!e||typeof e!="object")return s;if(e.relations&&t&&(s[t]=e.relations),e.type==="object"&&e.properties&&Object.entries(e.properties).forEach(([n,r])=>{let i=t?`${t}.${n}`:n;ce(r,i,s)}),e.type==="array"&&e.items){let n=`${t}[]`;ce(e.items,n,s)}return s}var qt=ce(le,"");function de(e,{log:t,context:s="PDS config"}={}){if(!e||typeof e!="object")return[];let n=[];return Z(e,le,"design",n),n.length&&typeof t=="function"&&n.forEach(r=>{t("warn",`[${s}] ${r.message} at ${r.path}`)}),n}function Ue(e,{log:t,context:s="PDS config"}={}){if(!e||typeof e!="object")return[];let n=[];return Z(e,mt,"config",n),n.length&&typeof t=="function"&&n.forEach(r=>{t("warn",`[${s}] ${r.message} at ${r.path}`)}),n}var gt={"ocean-breeze":{id:"ocean-breeze",name:"Ocean Breeze",tags:["playful"],description:"Fresh and calming ocean-inspired palette with professional undertones",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#0891b2",secondary:"#64748b",accent:"#06b6d4",background:"#f0f9ff",darkMode:{background:"#0c1821",secondary:"#94a3b8",primary:"#0891b2"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyBody:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif'},spatialRhythm:{baseUnit:6,scaleRatio:1.2},shape:{radiusSize:c.RadiusSizes.xxlarge}},"midnight-steel":{id:"midnight-steel",name:"Midnight Steel",description:"Bold industrial aesthetic with sharp contrasts and urban edge",colors:{primary:"#3b82f6",secondary:"#52525b",accent:"#f59e0b",background:"#fafaf9",darkMode:{background:"#18181b",secondary:"#71717a",primary:"#3b82f6"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'IBM Plex Sans', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:c.RadiusSizes.small,borderWidth:c.BorderWidths.thin}},"neural-glow":{id:"neural-glow",name:"Neural Glow",description:"AI-inspired with vibrant purple-blue gradients and futuristic vibes",colors:{primary:"#8b5cf6",secondary:"#6366f1",accent:"#ec4899",background:"#faf5ff",darkMode:{background:"#0f0a1a",secondary:"#818cf8",primary:"#8b5cf6"}},typography:{baseFontSize:16,fontScale:1.618,fontFamilyHeadings:"'Space Grotesk', system-ui, sans-serif",fontFamilyBody:"'Space Grotesk', system-ui, sans-serif"},spatialRhythm:{baseUnit:4,scaleRatio:1.5},shape:{radiusSize:c.RadiusSizes.xlarge,borderWidth:c.BorderWidths.medium},behavior:{transitionSpeed:c.TransitionSpeeds.fast}},"paper-and-ink":{id:"paper-and-ink",name:"Paper & Ink",tags:["app","featured"],themes:["light"],description:"Ultra-minimal design with focus on typography and whitespace",colors:{primary:"#171717",secondary:"#737373",accent:"#525252",background:"#ffffff",darkMode:{background:"#0a0a0a",secondary:"#a3a3a3",primary:"#737373"}},typography:{baseFontSize:18,fontScale:1.333,fontFamilyHeadings:"'Helvetica Neue', 'Arial', sans-serif",fontFamilyBody:"'Georgia', 'Times New Roman', serif",fontWeightNormal:400,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.2},shape:{radiusSize:c.RadiusSizes.none,borderWidth:c.BorderWidths.thin}},"sunset-paradise":{id:"sunset-paradise",name:"Sunset Paradise",description:"Warm tropical colors evoking golden hour by the beach",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#ea580c",secondary:"#d4a373",accent:"#fb923c",background:"#fffbeb",darkMode:{background:"#1a0f0a",secondary:"#c9a482",primary:"#f97316"}},typography:{baseFontSize:16,fontScale:1.5,fontFamilyHeadings:"'Quicksand', 'Comfortaa', sans-serif",fontFamilyBody:"'Quicksand', 'Comfortaa', sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.5},shape:{radiusSize:c.RadiusSizes.xxlarge,borderWidth:c.BorderWidths.medium}},"retro-wave":{id:"retro-wave",name:"Retro Wave",description:"Nostalgic 80s-inspired palette with neon undertones",colors:{primary:"#c026d3",secondary:"#a78bfa",accent:"#22d3ee",background:"#fef3ff",darkMode:{background:"#1a0a1f",secondary:"#c4b5fd",primary:"#d946ef"}},typography:{baseFontSize:15,fontScale:1.5,fontFamilyHeadings:"'Orbitron', 'Impact', monospace",fontFamilyBody:"'Courier New', 'Courier', monospace",fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:c.RadiusSizes.none,borderWidth:c.BorderWidths.thick},behavior:{transitionSpeed:c.TransitionSpeeds.instant}},"forest-canopy":{id:"forest-canopy",name:"Forest Canopy",description:"Natural earth tones with organic, calming green hues",colors:{primary:"#059669",secondary:"#78716c",accent:"#84cc16",background:"#f0fdf4",darkMode:{background:"#0a1410",secondary:"#a8a29e",primary:"#10b981"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Merriweather Sans', 'Arial', sans-serif",fontFamilyBody:"'Merriweather', 'Georgia', serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:c.RadiusSizes.medium,borderWidth:c.BorderWidths.thin}},"ruby-elegance":{id:"ruby-elegance",name:"Ruby Elegance",description:"Sophisticated palette with rich ruby reds and warm accents",colors:{primary:"#dc2626",secondary:"#9ca3af",accent:"#be123c",background:"#fef2f2",darkMode:{background:"#1b0808",secondary:"#d1d5db",primary:"#ef4444"}},typography:{baseFontSize:17,fontScale:1.5,fontFamilyHeadings:"'Playfair Display', 'Georgia', serif",fontFamilyBody:"'Crimson Text', 'Garamond', serif",fontWeightNormal:400,fontWeightSemibold:600},spatialRhythm:{baseUnit:4,scaleRatio:1.333},shape:{radiusSize:c.RadiusSizes.small,borderWidth:c.BorderWidths.thin}},"desert-dawn":{id:"desert-dawn",name:"Desert Dawn",description:"Sun-baked neutrals with grounded terracotta and cool oasis accents",colors:{primary:"#b45309",secondary:"#a8a29e",accent:"#0ea5a8",background:"#fcf6ef",darkMode:{background:"#12100e",secondary:"#d1d5db",primary:"#f59e0b"}},typography:{baseFontSize:16,fontScale:1.414,fontFamilyHeadings:"'Source Sans Pro', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Source Serif Pro', Georgia, serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.3},shape:{radiusSize:c.RadiusSizes.medium,borderWidth:c.BorderWidths.medium}},"contrast-pro":{id:"contrast-pro",name:"Contrast Pro",description:"Accessibility-first, high-contrast UI with assertive clarity",colors:{primary:"#1f2937",secondary:"#111827",accent:"#eab308",background:"#ffffff",darkMode:{background:"#0b0f14",secondary:"#9ca3af",primary:"#9ca3af"}},typography:{baseFontSize:17,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightBold:700},spatialRhythm:{baseUnit:3,scaleRatio:1.2},shape:{radiusSize:c.RadiusSizes.small,borderWidth:c.BorderWidths.thick},behavior:{transitionSpeed:c.TransitionSpeeds.fast,focusRingWidth:4}},"pastel-play":{id:"pastel-play",name:"Pastel Play",themes:["light"],description:"Playful pastels with soft surfaces and friendly rounded shapes",colors:{primary:"#db2777",secondary:"#a78bfa",accent:"#34d399",background:"#fff7fa",darkMode:{background:"#1a1016",secondary:"#c4b5fd",primary:"#ec4899"}},typography:{baseFontSize:16,fontScale:1.333,fontFamilyHeadings:"'Nunito', system-ui, -apple-system, sans-serif",fontFamilyBody:"'Nunito', system-ui, -apple-system, sans-serif",lineHeightRelaxed:c.LineHeights.relaxed},spatialRhythm:{baseUnit:6,scaleRatio:1.4},shape:{radiusSize:c.RadiusSizes.xxlarge,borderWidth:c.BorderWidths.thin},behavior:{transitionSpeed:c.TransitionSpeeds.slow,animationEasing:c.AnimationEasings["ease-out"]}},"brutalist-tech":{id:"brutalist-tech",name:"Brutalist Tech",description:"Stark grayscale with engineered accents and unapologetically bold structure",colors:{primary:"#111111",secondary:"#4b5563",accent:"#06b6d4",background:"#f8fafc",darkMode:{background:"#0c0c0c",secondary:"#9ca3af",primary:"#06b6d4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace",fontFamilyBody:"'Inter', system-ui, -apple-system, sans-serif",letterSpacingTight:-.02},spatialRhythm:{baseUnit:4,scaleRatio:1.25},shape:{radiusSize:c.RadiusSizes.none,borderWidth:c.BorderWidths.thick},behavior:{transitionSpeed:c.TransitionSpeeds.instant}},"zen-garden":{id:"zen-garden",name:"Zen Garden",description:"Soft botanicals with contemplative spacing and balanced motion",colors:{primary:"#3f6212",secondary:"#6b7280",accent:"#7c3aed",background:"#f7fbef",darkMode:{background:"#0d130a",secondary:"#a3a3a3",primary:"#84cc16"}},typography:{baseFontSize:17,fontScale:1.414,fontFamilyHeadings:"'Merriweather', Georgia, serif",fontFamilyBody:"'Noto Sans', system-ui, -apple-system, sans-serif"},spatialRhythm:{baseUnit:6,scaleRatio:1.35},shape:{radiusSize:c.RadiusSizes.large,borderWidth:c.BorderWidths.medium},behavior:{transitionSpeed:c.TransitionSpeeds.normal,animationEasing:c.AnimationEasings.ease}},"fitness-pro":{id:"fitness-pro",name:"Fitness Pro",tags:["app","featured"],description:"Health and fitness tracking aesthetic with data-driven dark surfaces and vibrant accent rings",options:{liquidGlassEffects:!0,backgroundMesh:2},colors:{primary:"#e91e63",secondary:"#78909c",accent:"#ab47bc",background:"#fafafa",darkMode:{background:"#1a1d21",secondary:"#78909c",primary:"#0a4ca4"}},typography:{baseFontSize:15,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:c.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerPadding:1.25,sectionSpacing:2.5},shape:{radiusSize:c.RadiusSizes.large,borderWidth:c.BorderWidths.thin},layers:{shadowDepth:"medium",blurMedium:12},behavior:{transitionSpeed:c.TransitionSpeeds.fast,animationEasing:c.AnimationEasings["ease-out"],focusRingWidth:2}},"travel-market":{id:"travel-market",name:"Travel Market",description:"Hospitality marketplace design with clean cards, subtle shadows, and trust-building neutrals",options:{liquidGlassEffects:!0,backgroundMesh:3},colors:{primary:"#d93251",secondary:"#717171",accent:"#144990",background:"#ffffff",darkMode:{background:"#222222",secondary:"#b0b0b0",primary:"#ff5a7a"}},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Circular', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightRelaxed:c.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1440,containerPadding:1.5,sectionSpacing:3},shape:{radiusSize:c.RadiusSizes.medium,borderWidth:c.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:8},behavior:{transitionSpeed:c.TransitionSpeeds.normal,animationEasing:c.AnimationEasings["ease-in-out"],hoverOpacity:.9}},"mobility-app":{id:"mobility-app",name:"Mobility App",tags:["app","featured"],description:"On-demand service platform with bold typography, map-ready colors, and action-driven UI",options:{liquidGlassEffects:!0,backgroundMesh:0},colors:{primary:"#000000",secondary:"#545454",accent:"#06c167",background:"#f6f6f6",darkMode:{background:"#0f0f0f",secondary:"#8a8a8a",primary:"#06c167"}},typography:{baseFontSize:16,fontScale:1.3,fontFamilyHeadings:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'UberMove', system-ui, -apple-system, 'Segoe UI', sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,buttonPadding:1.25,inputPadding:1},shape:{radiusSize:c.RadiusSizes.small,borderWidth:c.BorderWidths.medium},behavior:{transitionSpeed:c.TransitionSpeeds.fast,animationEasing:c.AnimationEasings["ease-out"],focusRingWidth:3},a11y:{minTouchTarget:c.TouchTargetSizes.comfortable,focusStyle:c.FocusStyles.ring}},"fintech-secure":{id:"fintech-secure",name:"Fintech Secure",description:"Financial services app UI with trust-building blues, precise spacing, and security-first design",options:{liquidGlassEffects:!1,backgroundMesh:0},colors:{primary:"#0a2540",secondary:"#425466",accent:"#00d4ff",background:"#f7fafc",darkMode:{background:"#0a1929",secondary:"#8796a5",primary:"#00d4ff"}},typography:{baseFontSize:16,fontScale:1.25,fontFamilyHeadings:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:1280,sectionSpacing:2.5},shape:{radiusSize:c.RadiusSizes.medium,borderWidth:c.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:6},behavior:{transitionSpeed:c.TransitionSpeeds.fast,animationEasing:c.AnimationEasings["ease-in-out"],focusRingWidth:3,focusRingOpacity:.4},a11y:{minTouchTarget:c.TouchTargetSizes.standard,focusStyle:c.FocusStyles.ring}},"social-feed":{id:"social-feed",name:"Social Feed",tags:["app","featured"],description:"Content-first social platform with minimal chrome, bold actions, and vibrant media presentation",options:{liquidGlassEffects:!0,backgroundMesh:4},colors:{primary:"#1877f2",secondary:"#65676b",accent:"#fe2c55",background:"#ffffff",darkMode:{background:"#18191a",secondary:"#b0b3b8",primary:"#2d88ff"}},typography:{baseFontSize:15,fontScale:1.2,fontFamilyHeadings:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontFamilyBody:"system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:c.LineHeights.relaxed},spatialRhythm:{baseUnit:4,scaleRatio:1.25,containerMaxWidth:680,sectionSpacing:1.5},shape:{radiusSize:c.RadiusSizes.medium,borderWidth:c.BorderWidths.thin},behavior:{transitionSpeed:c.TransitionSpeeds.fast,animationEasing:c.AnimationEasings["ease-out"],hoverOpacity:.85}},"enterprise-dash":{id:"enterprise-dash",tags:["app","featured"],name:"Enterprise Dashboard",description:"Data-dense business intelligence app interface with organized hierarchy and professional polish",options:{liquidGlassEffects:!1},colors:{primary:"#0066cc",secondary:"#5f6368",accent:"#1a73e8",background:"#ffffff",success:"#34a853",warning:"#fbbc04",danger:"#ea4335",darkMode:{background:"#202124",secondary:"#9aa0a6",primary:"#8ab4f8"}},typography:{baseFontSize:14,fontScale:1.2,fontFamilyHeadings:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyBody:"'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif",fontFamilyMono:"'Roboto Mono', ui-monospace, Consolas, monospace",fontWeightNormal:400,fontWeightMedium:500,fontWeightSemibold:600,fontWeightBold:700,lineHeightNormal:c.LineHeights.tight},spatialRhythm:{baseUnit:4,scaleRatio:1.2,containerMaxWidth:1600,containerPadding:1.5,sectionSpacing:2},shape:{radiusSize:c.RadiusSizes.small,borderWidth:c.BorderWidths.thin},layers:{shadowDepth:"light",blurLight:4},behavior:{transitionSpeed:c.TransitionSpeeds.fast,animationEasing:c.AnimationEasings["ease-in-out"],focusRingWidth:2},layout:{densityCompact:.85,gridColumns:12}}};gt.default={id:"default",name:"Default",tags:["app","featured"],description:"Fresh and modern design system with balanced aesthetics and usability",options:{liquidGlassEffects:!0,backgroundMesh:4},form:{options:{widgets:{booleans:"toggle",numbers:"input",selects:"standard"},layouts:{fieldsets:"default",arrays:"default"},enhancements:{icons:!0,datalists:!0,rangeOutput:!0},validation:{showErrors:!0,validateOnChange:!1}}},colors:{primary:"#0e7490",secondary:"#a99b95",accent:"#e54271",background:"#e7e6de",darkMode:{background:"#16171a",secondary:"#8b9199",primary:"#06b6d4"},success:null,warning:"#B38600",danger:null,info:null,gradientStops:3,elevationOpacity:.05},typography:{baseFontSize:16,fontScale:1.2,fontFamilyHeadings:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyBody:'system-ui, -apple-system, "Segoe UI", Roboto, sans-serif',fontFamilyMono:'ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace',fontWeightLight:c.FontWeights.light,fontWeightNormal:c.FontWeights.normal,fontWeightMedium:c.FontWeights.medium,fontWeightSemibold:c.FontWeights.semibold,fontWeightBold:c.FontWeights.bold,lineHeightTight:c.LineHeights.tight,lineHeightNormal:c.LineHeights.normal,lineHeightRelaxed:c.LineHeights.relaxed,letterSpacingTight:-.025,letterSpacingNormal:0,letterSpacingWide:.025},spatialRhythm:{baseUnit:4,scaleRatio:1.25,maxSpacingSteps:32,containerMaxWidth:1200,containerPadding:1,inputPadding:.75,buttonPadding:1,sectionSpacing:2},layers:{shadowDepth:"medium",blurLight:4,blurMedium:8,blurHeavy:16,zIndexBase:0,zIndexDropdown:1e3,zIndexSticky:1020,zIndexFixed:1030,zIndexModal:1040,zIndexPopover:1050,zIndexTooltip:1060,zIndexNotification:1070},shape:{radiusSize:c.RadiusSizes.large,borderWidth:c.BorderWidths.medium,customRadius:null},behavior:{transitionSpeed:c.TransitionSpeeds.normal,animationEasing:c.AnimationEasings["ease-out"],customTransitionSpeed:null,customEasing:null,focusRingWidth:3,focusRingOpacity:.3,hoverOpacity:.8},layout:{gridColumns:12,gridGutter:1,baseShadowOpacity:.1,darkMode:{baseShadowOpacity:.25},breakpoints:{sm:640,md:768,lg:1024,xl:1280},densityCompact:.8,densityNormal:1,densityComfortable:1.2,buttonMinHeight:c.TouchTargetSizes.standard,inputMinHeight:40,utilities:{grid:!0,flex:!0,spacing:!0,container:!0},gridSystem:{columns:[1,2,3,4,6],autoFitBreakpoints:{sm:"150px",md:"250px",lg:"350px",xl:"450px"},enableGapUtilities:!0},containerMaxWidth:"1400px",containerPadding:"var(--spacing-6)"},advanced:{linkStyle:c.LinkStyles.inline,colorDerivation:"hsl"},a11y:{minTouchTarget:c.TouchTargetSizes.standard,prefersReducedMotion:!0,focusStyle:c.FocusStyles.ring},icons:{set:"phosphor",weight:"regular",defaultSize:24,externalPath:"/assets/img/icons/",sizes:c.IconSizes,include:{navigation:["arrow-left","arrow-right","arrow-up","arrow-down","arrow-counter-clockwise","caret-left","caret-right","caret-down","caret-up","x","list","list-dashes","dots-three-vertical","dots-three","house","gear","magnifying-glass","funnel","tabs","sidebar"],actions:["plus","minus","check","trash","pencil","floppy-disk","copy","download","upload","share","link","eye","eye-slash","heart","star","bookmark","note-pencil","cursor-click","clipboard","magic-wand","sparkle"],communication:["envelope","bell","bell-ringing","bell-simple","chat-circle","phone","paper-plane-tilt","user","users","user-gear","at"],content:["image","file","file-text","file-css","file-js","folder","folder-open","book-open","camera","video-camera","play","pause","microphone","brackets-curly","code","folder-simple","grid-four","briefcase","chart-line","chart-bar","database","map-pin"],status:["info","warning","check-circle","x-circle","question","shield","shield-check","shield-warning","lock","lock-open","fingerprint","circle-notch"],time:["calendar","clock","timer","hourglass"],commerce:["shopping-cart","credit-card","currency-dollar","tag","receipt","storefront"],formatting:["text-align-left","text-align-center","text-align-right","text-b","text-italic","text-underline","list-bullets","list-numbers","text-aa"],system:["cloud","cloud-arrow-up","cloud-arrow-down","desktop","device-mobile","globe","wifi-high","battery-charging","sun","moon","moon-stars","palette","rocket","feather","square","circle","squares-four","lightning","wrench"]},spritePath:"public/assets/pds/icons/pds-icons.svg"},gap:4,debug:!1};var wt=/^[a-z][a-z0-9+\-.]*:\/\//i,N=(()=>{try{return import.meta.url}catch{return}})(),J=e=>typeof e=="string"&&e.length&&!e.endsWith("/")?`${e}/`:e;function Y(e,t={}){if(!e||wt.test(e))return e;let{preferModule:s=!0}=t,n=()=>{if(!N)return null;try{return new URL(e,N).href}catch{return null}},r=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(e,window.location.origin).href}catch{return null}};return(s?n()||r():r()||n())||e}var je=(()=>{if(N)try{let e=new URL(N);if(/\/public\/assets\/js\//.test(e.pathname))return new URL("../pds/",N).href}catch{return}})(),_e=!1;function Be(e){_e||typeof document>"u"||(_e=!0,e.addEventListener("pds:ready",t=>{let s=t.detail?.mode;s&&document.documentElement.classList.add(`pds-${s}`,"pds-ready")}))}function he(e={},t={}){if(!t||typeof t!="object")return e;let s=Array.isArray(e)?[...e]:{...e};for(let[n,r]of Object.entries(t))r&&typeof r=="object"&&!Array.isArray(r)?s[n]=he(s[n]&&typeof s[n]=="object"?s[n]:{},r):s[n]=r;return s}function pe(e=""){return String(e).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")}function I(e){if(e==null)return e;if(typeof e=="function")return;if(typeof e!="object")return e;if(Array.isArray(e))return e.map(s=>I(s)).filter(s=>s!==void 0);let t={};for(let s in e)if(e.hasOwnProperty(s)){let n=e[s];if(typeof n!="function"){let r=I(n);r!==void 0&&(t[s]=r)}}return t}function He(e={},t={},{presets:s,defaultLog:n}){let r=e&&typeof e.log=="function"?e.log:n,i=typeof e=="object"&&("colors"in e||"typography"in e||"spatialRhythm"in e||"shape"in e||"behavior"in e||"layout"in e||"advanced"in e||"a11y"in e||"components"in e||"icons"in e),o=e&&e.enhancers;o&&!Array.isArray(o)&&(o=Object.values(o));let d=o??t.enhancers??[],p=e&&e.preset,l=e&&e.design,u=e&&e.icons&&typeof e.icons=="object"?e.icons:null,a="preset"in(e||{})||"design"in(e||{})||"enhancers"in(e||{});e&&typeof e=="object"&&Ue(e,{log:r,context:"PDS.start"});let h,f=null;if(a){l&&typeof l=="object"&&de(l,{log:r,context:"PDS.start"});let w=String(p||"default").toLowerCase(),k=s?.[w]||Object.values(s||{}).find(g=>pe(g.name)===w||String(g.name||"").toLowerCase()===w);if(!k)throw new Error(`PDS preset not found: "${p||"default"}"`);f={id:k.id||pe(k.name),name:k.name||k.id||String(w)};let m=structuredClone(k);if(l&&typeof l=="object"||u){let g=l?I(l):{},b=u?I(u):null,L=b?he(g,{icons:b}):g;m=he(m,structuredClone(L))}let{mode:x,autoDefine:P,applyGlobalStyles:A,manageTheme:T,themeStorageKey:C,preloadStyles:_,criticalLayers:z,managerURL:q,manager:R,preset:D,design:B,enhancers:v,log:U,...y}=e;h={...y,design:m,preset:f.name,log:U||n}}else if(i){de(e,{log:r,context:"PDS.start"});let{log:w,...k}=e;h={design:structuredClone(k),log:w||n}}else{let w=s?.default||Object.values(s||{}).find(k=>pe(k.name)==="default");if(!w)throw new Error("PDS default preset not available");f={id:w.id||"default",name:w.name||"Default"},h={design:structuredClone(w),preset:f.name,log:n}}return{generatorConfig:h,enhancers:d,presetInfo:f}}function Ne({manageTheme:e,themeStorageKey:t,applyResolvedTheme:s,setupSystemListenerIfNeeded:n}){let r="light",i=null;if(e&&typeof window<"u"){try{i=localStorage.getItem(t)||null}catch{i=null}try{s?.(i),n?.(i)}catch{}i?i==="system"?r=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":r=i:r=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:r,storedTheme:i}}function fe(e,{resolvePublicAssetURL:t}){let s=!!(e?.public?.root||e?.static?.root),n=t(e);return!s&&je&&(n=je),J(Y(n))}async function Oe(e,{baseEnhancers:t=[]}={}){let{autoDefineBaseURL:s="/auto-define/",autoDefinePreload:n=[],autoDefineMapper:r=null,enhancers:i=[],autoDefineOverrides:o=null,autoDefinePreferModule:d=!0}=e,p=(()=>{let u=new Map;return(t||[]).forEach(a=>u.set(a.selector,a)),(i||[]).forEach(a=>u.set(a.selector,a)),Array.from(u.values())})(),l=null;if(typeof window<"u"&&typeof document<"u"){let u=null;try{let m=await Promise.resolve().then(()=>(Fe(),$e));u=m?.AutoDefiner||m?.default?.AutoDefiner||m?.default||null}catch(m){console.warn("AutoDefiner not available:",m?.message||m)}let a=m=>{switch(m){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${m}.js`}},{mapper:h,...f}=o&&typeof o=="object"?o:{},k={baseURL:s&&J(Y(s,{preferModule:d})),predefine:n,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:p,onError:(m,x)=>{if(typeof m=="string"&&m.startsWith("pds-")){let A=["pds-form","pds-drawer"].includes(m),T=x?.message?.includes("#pds/lit")||x?.message?.includes("Failed to resolve module specifier");A&&T?console.error(`\u274C PDS component <${m}> requires Lit but #pds/lit is not in import map.
32
- See: https://github.com/Pure-Web-Foundation/pure-ds/blob/main/readme.md#lit-components-not-working`):console.warn(`\u26A0\uFE0F PDS component <${m}> not found. Assets may not be installed.`)}else console.error(`\u274C Auto-define error for <${m}>:`,x)},...f,mapper:m=>{if(customElements.get(m))return null;if(typeof r=="function")try{let x=r(m);return x===void 0?a(m):x}catch(x){return console.warn("Custom autoDefine.mapper error; falling back to default:",x?.message||x),a(m)}return a(m)}};u&&(l=new u(k),n.length>0&&typeof u.define=="function"&&await u.define(...n,{baseURL:s,mapper:k.mapper,onError:k.onError}))}return{autoDefiner:l,mergedEnhancers:p}}var me=["light","dark"],ye=new Set(me);function St(e){let s=(Array.isArray(e?.themes)?e.themes.map(n=>String(n).toLowerCase()):me).filter(n=>ye.has(n));return s.length?s:me}function ge(e,{preferDocument:t=!0}={}){let s=String(e||"").toLowerCase();if(ye.has(s))return s;if(t&&typeof document<"u"){let n=document.documentElement?.getAttribute("data-theme");if(ye.has(n))return n}return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function qe(e,t){let s=ge(t);return St(e).includes(s)}var Se=class extends EventTarget{},S=new Se;S.initializing=!1;S.currentPreset=null;S.debug=!1;var Ge=(e="")=>String(e).toLowerCase().replace(/&/g," and ").replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,""),be=function(e="log",t,...s){let n=!!(S.registry&&!S.registry.isLive),r=(this?.debug||this?.design?.debug||S.debug||!1)===!0;if(n){if(!S.debug)return}else if(!r&&e!=="error"&&e!=="warn")return;let i=console[e]||console.log;s.length>0?i(t,...s):i(t)};async function kt(e,t={}){if(t?.runtimeConfig===!1||typeof fetch!="function")return null;let s=t?.runtimeConfigURL||`${e}pds-runtime-config.json`;try{let n=await fetch(s,{cache:"no-store"});return n.ok?await n.json():null}catch{return null}}S.registry=F;S.enums=c;S.adoptLayers=Te;S.adoptPrimitives=Me;S.parse=se;S.createStylesheet=De;S.isLiveMode=()=>F.isLive;S.ask=We;S.toast=M;S.common=ne;S.AutoComplete=V;function Ve(e){let t=typeof CustomEvent=="function";try{let s=t?new CustomEvent("pds:ready",{detail:e}):new Event("pds:ready");S.dispatchEvent(s)}catch{}if(typeof document<"u")if(t){let s={detail:e,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",s))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",s))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}typeof window<"u"&&(window.PDS=S);var we="pure-ds-theme",W=null,O=null;function ke(e){try{if(typeof document>"u")return;let t="light";e?e==="system"?t=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t=e:t=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",t)}catch{}}function xe(e){try{if(W&&O){try{typeof W.removeEventListener=="function"?W.removeEventListener("change",O):typeof W.removeListener=="function"&&W.removeListener(O)}catch{}W=null,O=null}if(e==="system"&&typeof window<"u"&&window.matchMedia){let t=window.matchMedia("(prefers-color-scheme: dark)"),s=n=>{let r=n?.matches===void 0?t.matches:n.matches;try{let i=r?"dark":"light";document.documentElement.setAttribute("data-theme",i),S.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:i,source:"system"}}))}catch{}};W=t,O=s,typeof t.addEventListener=="function"?t.addEventListener("change",s):typeof t.addListener=="function"&&t.addListener(s)}}catch{}}Object.defineProperty(S,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(we)||null}catch{return null}},set(e){try{if(typeof window>"u")return;let t=S.currentConfig?.design||null,s=ge(e);if(t&&!qe(t,s)){let n=t?.name||S.currentPreset?.name||S.currentConfig?.preset||"current preset";console.warn(`PDS theme "${s}" not supported by preset "${n}".`),S.dispatchEvent(new CustomEvent("pds:theme:blocked",{detail:{theme:e,resolvedTheme:s,preset:n}}));return}e==null?localStorage.removeItem(we):localStorage.setItem(we,e),ke(e),xe(e),S.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:e,source:"api"}}))}catch{}}});S.defaultEnhancers=ie;async function xt(e){let t=e&&e.mode||"live",{mode:s,...n}=e||{};if(t==="static")return vt(n);let r=fe(n,{resolvePublicAssetURL:oe}),i=n?.managerURL||n?.public?.managerURL||n?.manager?.url||new URL("core/pds-manager.js",r).href||new URL("./pds-manager.js",import.meta.url).href,{startLive:o}=await import(i);return o(S,n,{emitReady:Ve,applyResolvedTheme:ke,setupSystemListenerIfNeeded:xe})}S.start=xt;async function vt(e){if(!e||typeof e!="object")throw new Error("PDS.start({ mode: 'static', ... }) requires a valid configuration object");let t=e.applyGlobalStyles??!0,s=e.manageTheme??!0,n=e.themeStorageKey??"pure-ds-theme",r=e.staticPaths??{},i=fe(e,{resolvePublicAssetURL:oe}),o=e&&e.autoDefine||null,d;o&&o.baseURL?d=J(Y(o.baseURL,{preferModule:!1})):d=`${i}components/`;let p=o&&Array.isArray(o.predefine)&&o.predefine||[],l=o&&typeof o.mapper=="function"&&o.mapper||null;try{Be(S);let{resolvedTheme:u}=Ne({manageTheme:s,themeStorageKey:n,applyResolvedTheme:ke,setupSystemListenerIfNeeded:xe}),a=await kt(i,e),h=a?.config?.design||a?.design||null,f=a?.config?.preset||a?.preset||"default",w=a?.presetId||Ge(f)||"default",k=h?{[String(w).toLowerCase()]:h,...String(w).toLowerCase()!=="default"?{default:h}:{}}:null,m=e?.design&&typeof e.design=="object"?I(e.design):null,x=Ge(e?.preset||"default")||"default",P=m?{[String(x).toLowerCase()]:m,...String(x).toLowerCase()!=="default"?{default:m}:{}}:null,A=k||e?.presets||P||{};if(!Object.keys(A||{}).length)throw new Error("PDS static mode requires preset data. Run pds:build or provide config.presets/config.design.");let T=a?.config?{...a.config,...e,preset:e?.preset||w,design:m||h||a?.config?.design}:e,C=He(T,{},{presets:A,defaultLog:be}),_=C.enhancers,z={tokens:`${i}styles/pds-tokens.css.js`,primitives:`${i}styles/pds-primitives.css.js`,components:`${i}styles/pds-components.css.js`,utilities:`${i}styles/pds-utilities.css.js`,styles:`${i}styles/pds-styles.css.js`},q=a?.paths||{};if(r={...z,...q,...r},S.registry.setStaticMode(r),t&&typeof document<"u")try{let v=await S.registry.getStylesheet("styles");if(v){v._pds=!0;let U=(document.adoptedStyleSheets||[]).filter(y=>y._pds!==!0);document.adoptedStyleSheets=[...U,v]}}catch(v){be.call(S,"warn","Failed to apply static styles:",v)}let R=null,D=[];try{let v=await Oe({autoDefineBaseURL:d,autoDefinePreload:p,autoDefineMapper:l,enhancers:_,autoDefineOverrides:o||null,autoDefinePreferModule:!(o&&o.baseURL)},{baseEnhancers:ie});R=v.autoDefiner,D=v.mergedEnhancers||[]}catch(v){be.call(S,"error","\u274C Failed to initialize AutoDefiner/Enhancers (static):",v)}let B=I(e);return S.currentConfig=Object.freeze({mode:"static",...structuredClone(B),design:structuredClone(C.generatorConfig.design),preset:C.generatorConfig.preset,theme:u,enhancers:D}),Ve({mode:"static",config:C.generatorConfig,theme:u,autoDefiner:R}),{config:C.generatorConfig,theme:u,autoDefiner:R}}catch(u){throw S.dispatchEvent(new CustomEvent("pds:error",{detail:{error:u}})),u}}var E={name:"@pure-ds/core",shortname:"pds",version:"0.6.9",description:"Pure Design System - Why develop a Design System when you can generate one?",repository:{type:"git",url:"git+https://github.com/Pure-Web-Foundation/pure-ds.git"},bugs:{url:"https://github.com/Pure-Web-Foundation/pure-ds/issues"},homepage:"https://puredesignsystem.z6.web.core.windows.net/",keywords:["design-system","css","web-components","lit","constructable-stylesheets","tokens","utilities","a11y"],type:"module",main:"./public/assets/js/pds.js",module:"./public/assets/js/pds.js",types:"./dist/types/pds.d.ts",bin:{"pds-build":"packages/pds-cli/bin/pds-static.js","pds-sync-assets":"packages/pds-cli/bin/sync-assets.js","pds-build-icons":"packages/pds-cli/bin/pds-build-icons.js","pds-setup-copilot":"packages/pds-cli/bin/pds-setup-copilot.js","pds-init-config":"packages/pds-cli/bin/pds-init-config.js","pds-bootstrap":"packages/pds-cli/bin/pds-bootstrap.js"},exports:{".":{types:"./src/js/pds.d.ts",import:"./public/assets/js/pds.js"},"./pds-core":"./src/js/pds.js","./auto-define/*":"./public/auto-define/*"},files:[".github/copilot-instructions.md",".cursorrules","dist/types/","public/assets/js/","public/assets/pds/components/","public/assets/pds/external/","public/assets/pds/vscode-custom-data.json","public/assets/pds/pds.css-data.json","public/assets/pds/pds-css-complete.json","public/auto-define/","public/pds/components/","public/assets/pds/icons/pds-icons.svg","packages/pds-cli/bin/","packages/pds-cli/lib/","src/js/pds.d.ts","src/js/pds.js","src/js/pds-core/","custom-elements.json","custom-elements-manifest.config.js","pds.html-data.json","pds.css-data.json","readme.md","INTELLISENSE.md","CSS-INTELLISENSE-LIMITATION.md","CSS-INTELLISENSE-QUICK-REF.md"],scripts:{test:'echo "Error: no test specified" && exit 1',dev:"node esbuild-dev.js",prebuild:"npm run types",build:"node esbuild-build.js",types:"tsc -p tsconfig.json && node scripts/sync-types.mjs",postinstall:"node packages/pds-cli/bin/postinstall.mjs","prepds:build":"npm run types","pds:build":"node packages/pds-cli/bin/pds-static.js","pds:build-icons":"node packages/pds-cli/bin/pds-build-icons.js","pds:bootstrap":"node packages/pds-cli/bin/pds-bootstrap.js","pds:manifest":"node packages/pds-cli/bin/generate-manifest.js","pds:css-data":"node packages/pds-cli/bin/generate-css-data.js","pds:dx":"node packages/pds-cli/bin/pds-dx.js","storybook:generate":"cd packages/pds-storybook && npm run generate-stories","storybook:dev":"cd packages/pds-storybook && npm run storybook:dev","storybook:build":"cd packages/pds-storybook && npm run storybook:build"},author:"Marc van Neerven",license:"ISC",engines:{node:">=18"},publishConfig:{access:"public"},devDependencies:{"@custom-elements-manifest/analyzer":"^0.9.9",esbuild:"^0.19.0","fs-extra":"^11.1.1",typescript:"^5.6.3","@types/node":"^22.10.2"},dependencies:{lit:"^3.3.1","pure-web":"1.1.30"},customElements:"custom-elements.json"};await S.start(Q);var At=new Date,Lt=At.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"}),Qe=typeof E.repository=="string"?E.repository:E.repository?.url,ve=Qe?Qe.replace(/^git\+/,"").replace(/\.git$/,""):"",Rt=E.homepage||ve,Ct=E.bugs?.url||"";document.body.innerHTML=`
33
- <header class="container section">
34
- <div class="stack-sm">
35
- <pds-toaster id="global-toaster"></pds-toaster>
36
- <div class="flex items-center gap-sm">
37
- <pds-icon icon="gear" size="lg"></pds-icon>
38
- <div>
39
- <h1>Pure Design System</h1>
40
- <p class="text-muted">${E.description}</p>
41
- </div>
42
- </div>
43
- <div class="flex items-center gap-sm">
44
- <span class="badge badge-primary">${E.name}</span>
45
- <span class="text-muted">Version ${E.version}</span>
46
- <span class="text-muted">Updated ${Lt}</span>
47
- </div>
48
- </div>
49
- </header>
50
-
51
- <main class="container section stack-lg">
52
- <section class="grid grid-auto-md gap-lg">
53
- <article class="card surface-elevated stack-sm">
54
- <header class="flex items-center gap-sm">
55
- <pds-icon icon="floppy-disk"></pds-icon>
56
- <h2>Package details</h2>
57
- </header>
58
- <div class="stack-lg">
59
- <div class="flex justify-between items-center">
60
- <span class="text-muted">Package</span>
61
- <strong>${E.name}</strong>
62
- </div>
63
- <div class="flex justify-between items-center">
64
- <span class="text-muted">Version</span>
65
- <strong>${E.version}</strong>
66
- </div>
67
- <div class="flex justify-between items-center">
68
- <span class="text-muted">License</span>
69
- <strong>${E.license}</strong>
70
- </div>
71
- <div class="flex justify-between items-center">
72
- <span class="text-muted">Repository</span>
73
- <a href="${ve}">GitHub</a>
74
- </div>
75
- </div>
76
- </article>
77
-
78
- <article class="card surface-elevated stack-sm">
79
- <header>
80
-
81
- <h2 flex items-center gap-sm> <pds-icon icon="download"></pds-icon> Install</h2>
82
- <p class="text-muted">Add the core runtime and assets to your project.</p>
83
- </header>
84
-
85
- <div class="stack-sm">
86
- <pre><code>npm i ${E.name}</code></pre>
87
- <pre><code>pnpm add ${E.name}</code></pre>
88
- </div>
89
- <div class="callout callout-info">
90
- Includes tokens, utilities, and web components from the PDS runtime bundle.
91
- </div>
92
- </article>
93
- </section>
94
-
95
- <section class="grid grid-auto-md gap-lg">
96
- <article class="card surface-elevated stack-sm">
97
- <header>
98
-
99
- <h2 class="flex items-center gap-sm"><pds-icon icon="tabs"></pds-icon>Project starter</h2>
100
- <p class="text-muted">Use the built-in bootstrap script to scaffold a fresh PDS setup.</p>
101
- </header>
102
-
103
- <div class="stack-sm">
104
- <pre><code>npm run pds:bootstrap</code></pre>
105
- </div>
106
- <ul class="stack-sm">
107
- <li>Copies the runtime assets into your project.</li>
108
- <li>Creates a starter PDS config and output folders.</li>
109
- <li>Prepares icons, tokens, and design layers.</li>
110
- </ul>
111
- </article>
112
-
113
- <article class="card surface-elevated stack-sm">
114
- <header class="flex items-center gap-sm">
115
- <pds-icon icon="link"></pds-icon>
116
- <h2>Quick links</h2>
31
+ `;let c=r.querySelector("#msg-container");ne(c,t)}r.addEventListener("click",c=>{c.target.closest('button[value="cancel"]')&&(r.close(),s(!1))});let i=()=>{let c=r.querySelector("form");c?c.addEventListener("submit",u=>{u.preventDefault();let d;e.useForm&&u.submitter.value==="ok"?(console.log("Found form:",c),console.log("Form elements:",c?Array.from(c.elements):"no form"),d=new FormData(c),console.log("FormData entries:",Array.from(d.entries()))):d=u.submitter.value==="ok",r.close(),s(d)}):requestAnimationFrame(i)};i(),r.addEventListener("close",()=>{setTimeout(()=>r.remove(),200)}),document.body.appendChild(r),typeof e.rendered=="function"&&e.rendered(r),r.showModal(),requestAnimationFrame(()=>We(r))})}async function ze(){let t=document.querySelector("pds-toaster");return t||(t=document.createElement("pds-toaster"),document.body.appendChild(t),await customElements.whenDefined("pds-toaster")),t}async function $(t,e={}){return(await ze()).toast(t,e)}$.success=async function(t,e={}){return $(t,{...e,type:"success"})};$.error=async function(t,e={}){return $(t,{...e,type:"error"})};$.warning=async function(t,e={}){return $(t,{...e,type:"warning"})};$.info=async function(t,e={}){return $(t,{...e,type:"information"})};var Be=[{selector:".accordion"},{selector:"nav[data-dropdown]"},{selector:"label[data-toggle]"},{selector:"label[data-color]"},{selector:'input[type="range"]'},{selector:"form[data-required]"},{selector:"fieldset[role=group][data-open]"},{selector:"[data-clip]"},{selector:"button, a[class*='btn-']"}];function Ve(t){t.dataset.enhancedAccordion||(t.dataset.enhancedAccordion="true",t.addEventListener("toggle",e=>{e.target.open&&e.target.parentElement===t&&t.querySelectorAll(":scope > details[open]").forEach(n=>{n!==e.target&&(n.open=!1)})},!0))}function Ge(t){if(t.dataset.enhancedDropdown)return;t.dataset.enhancedDropdown="true";let e=t.lastElementChild;if(!e)return;let n=t.querySelector("[data-dropdown-toggle]")||t.querySelector("button");n&&!n.hasAttribute("type")&&n.setAttribute("type","button"),e.id||(e.id=`dropdown-${Math.random().toString(36).slice(2,9)}`);let s=e.tagName?.toLowerCase()==="menu",r=8;s&&!e.hasAttribute("role")&&e.setAttribute("role","menu"),e.hasAttribute("aria-hidden")||e.setAttribute("aria-hidden","true"),n&&(n.setAttribute("aria-haspopup","true"),n.setAttribute("aria-controls",e.id),n.setAttribute("aria-expanded","false"));let o=()=>{let b=e.getAttribute("style");e.style.visibility="hidden",e.style.display="inline-block",e.style.pointerEvents="none";let S=e.getBoundingClientRect(),C=Math.max(e.offsetWidth||0,e.scrollWidth||0,S.width||0,1),v=Math.max(e.offsetHeight||0,e.scrollHeight||0,S.height||0,1);return b===null?e.removeAttribute("style"):e.setAttribute("style",b),{width:C,height:v}},i=()=>{let b=(t.getAttribute("data-direction")||t.getAttribute("data-dropdown-direction")||t.getAttribute("data-mode")||"auto").toLowerCase();if(b==="up"||b==="down")return b;let S=(n||t).getBoundingClientRect(),{height:C}=o(),v=Math.max(0,window.innerHeight-S.bottom),k=Math.max(0,S.top),M=v>=C,D=k>=C;return M&&!D?"down":D&&!M?"up":M&&D?"down":k>v?"up":"down"},c=()=>{let b=(t.getAttribute("data-align")||t.getAttribute("data-dropdown-align")||"auto").toLowerCase();if(b==="left"||b==="right"||b==="start"||b==="end")return b==="start"?"left":b==="end"?"right":b;let S=(n||t).getBoundingClientRect(),{width:C}=o(),v=Math.max(0,window.innerWidth-S.left),k=Math.max(0,S.right),M=v>=C,D=k>=C;return M&&!D?"left":D&&!M?"right":M&&D?"left":k>v?"right":"left"},u=(b,S=8)=>{let C=getComputedStyle(t).getPropertyValue(b).trim();if(!C)return S;let v=document.createElement("span");v.style.position="fixed",v.style.visibility="hidden",v.style.pointerEvents="none",v.style.height=C,document.body.appendChild(v);let k=Number.parseFloat(getComputedStyle(v).height);return v.remove(),Number.isFinite(k)?k:S},d=()=>{e.style.removeProperty("position"),e.style.removeProperty("left"),e.style.removeProperty("top"),e.style.removeProperty("right"),e.style.removeProperty("bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),e.style.removeProperty("max-width"),e.style.removeProperty("max-inline-size"),e.style.removeProperty("max-height"),e.style.removeProperty("overflow")},a=()=>{e.getAttribute("aria-hidden")==="false"&&(d(),requestAnimationFrame(()=>{requestAnimationFrame(()=>{l()})}))},l=()=>{if(e.getAttribute("aria-hidden")!=="false")return;let b=(n||t).getBoundingClientRect(),S=window.visualViewport,C=S?.width||document.documentElement?.clientWidth||window.innerWidth,v=S?.height||document.documentElement?.clientHeight||window.innerHeight,k=S?.offsetLeft||0,M=S?.offsetTop||0,D=Math.max(1,C-r*2),H=Math.max(1,v-r*2);e.style.maxWidth=`${Math.round(D)}px`,e.style.maxInlineSize=`${Math.round(D)}px`,e.style.maxHeight=`${Math.round(H)}px`,e.style.overflow="auto";let{width:p,height:m}=o(),f=u("--spacing-2",8),T=i(),I=c();t.dataset.dropdownDirection=T,t.dataset.dropdownAlign=I;let W=I==="right"?b.right-p:b.left;p>=D-1?W=k+r:W=Math.max(k+r,Math.min(W,k+C-p-r));let Z=T==="up"?b.top-f-m:b.bottom+f;Z=Math.max(M+r,Math.min(Z,M+v-m-r)),e.style.position="fixed",e.style.left=`${Math.round(W)}px`,e.style.top=`${Math.round(Z)}px`,e.style.right="auto",e.style.bottom="auto",e.style.marginTop="0",e.style.marginBottom="0"},h=null,y=()=>{h||(h=()=>l(),window.addEventListener("resize",h),window.addEventListener("scroll",h,!0))},A=()=>{h&&(window.removeEventListener("resize",h),window.removeEventListener("scroll",h,!0),h=null)},x=null,w=()=>{x||typeof document>"u"||(x=()=>{e.getAttribute("aria-hidden")==="false"&&(t.dataset.dropdownDirection=i(),t.dataset.dropdownAlign=c(),a(),setTimeout(()=>{e.getAttribute("aria-hidden")==="false"&&a()},50),setTimeout(()=>{e.getAttribute("aria-hidden")==="false"&&a()},150))},document.addEventListener("pds:config-changed",x))},L=()=>{!x||typeof document>"u"||(document.removeEventListener("pds:config-changed",x),x=null)},P=null,E=()=>{t.dataset.dropdownDirection=i(),t.dataset.dropdownAlign=c(),e.setAttribute("aria-hidden","false"),n?.setAttribute("aria-expanded","true"),y(),w(),a(),P||(P=b=>{(b.composedPath?b.composedPath():[b.target]).some(v=>v===t)||R()},setTimeout(()=>{document.addEventListener("click",P)},0))},R=()=>{e.setAttribute("aria-hidden","true"),n?.setAttribute("aria-expanded","false"),A(),L(),d(),P&&(document.removeEventListener("click",P),P=null)},_=()=>{e.getAttribute("aria-hidden")==="false"?R():E()};n?.addEventListener("click",b=>{b.preventDefault(),b.stopPropagation(),_()}),t.addEventListener("keydown",b=>{b.key==="Escape"&&(R(),n?.focus())}),t.addEventListener("focusout",b=>{b.relatedTarget&&((b.composedPath?b.composedPath():[b.relatedTarget]).some(v=>v===t)||R())})}function Ke(t){if(t.dataset.enhancedToggle)return;t.dataset.enhancedToggle="true";let e=t.querySelector('input[type="checkbox"]');if(!e)return;t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"),t.setAttribute("role","switch"),t.setAttribute("aria-checked",e.checked?"true":"false");let n=document.createElement("span");n.className="toggle-switch",n.setAttribute("role","presentation"),n.setAttribute("aria-hidden","true");let s=document.createElement("span");s.className="toggle-knob",n.appendChild(s),t.insertBefore(n,e.nextSibling);let r=()=>{t.setAttribute("aria-checked",e.checked?"true":"false")},o=()=>{e.disabled||(e.checked=!e.checked,r(),e.dispatchEvent(new Event("change",{bubbles:!0})))};t.addEventListener("click",i=>{i.preventDefault(),o()}),t.addEventListener("keydown",i=>{(i.key===" "||i.key==="Enter")&&(i.preventDefault(),o())}),e.addEventListener("change",r)}function Qe(t){if(t.dataset.enhancedColorInput)return;let e=t.querySelector('input[type="color"]');if(!e)return;t.dataset.enhancedColorInput="true";let n=t.querySelector(":scope > .color-control"),s=t.querySelector(":scope > .color-control > .color-swatch"),r=t.querySelector(":scope > .color-control > output");n||(n=document.createElement("span"),n.className="color-control",e.before(n)),s||(s=document.createElement("span"),s.className="color-swatch",n.appendChild(s)),e.parentElement!==s&&s.appendChild(e),r||(r=document.createElement("output"),n.appendChild(r));let o=()=>{if(e.dataset.colorUnset==="1"){r.value="",r.textContent="not set",n.dataset.value="",n.dataset.unset="1",s.dataset.unset="1";return}r.value=e.value,r.textContent=e.value,n.dataset.value=e.value,delete n.dataset.unset,delete s.dataset.unset};o();let i=()=>{e.dataset.colorUnset==="1"&&(e.dataset.colorUnset="0"),o()};e.addEventListener("input",i,{passive:!0}),e.addEventListener("change",i,{passive:!0})}function Ze(t){if(t.dataset.enhancedRange)return;let e=i=>{if(t.dataset.enhancedRangeProgrammatic)return;t.dataset.enhancedRangeProgrammatic="1";let c=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(t),"value")||Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value");c?.get&&c?.set&&Object.defineProperty(t,"value",{configurable:!0,enumerable:c.enumerable,get(){return c.get.call(this)},set(d){c.set.call(this,d),i()}}),new MutationObserver(d=>{d.some(l=>{let h=l.attributeName;return h==="value"||h==="min"||h==="max"})&&i()}).observe(t,{attributes:!0,attributeFilter:["value","min","max"]})},n=t.closest("label"),s=n?.classList.contains("range-output"),r=t.id||`range-${Math.random().toString(36).substring(2,11)}`,o=`${r}-output`;if(t.id=r,s){let i=n.querySelector("span");if(i&&!i.classList.contains("range-output-wrapper")){let c=document.createElement("span");c.className="range-output-wrapper",c.style.display="flex",c.style.justifyContent="space-between",c.style.alignItems="center";let u=document.createElement("span");u.textContent=i.textContent,c.appendChild(u);let d=document.createElement("output");d.id=o,d.setAttribute("for",r),d.style.color="var(--surface-text-secondary, var(--color-text-secondary))",d.style.fontSize="0.875rem",d.textContent=t.value,c.appendChild(d),i.textContent="",i.appendChild(c);let a=()=>{d.textContent=t.value};t.addEventListener("input",a),t.addEventListener("change",a),e(a),a()}}else{let i=t.closest(".range-container");i||(i=document.createElement("div"),i.className="range-container",t.parentNode?.insertBefore(i,t),i.appendChild(t)),i.style.position="relative";let c=document.createElement("output");c.id=o,c.setAttribute("for",r),c.className="range-bubble",c.setAttribute("aria-live","polite"),i.appendChild(c);let u=()=>{let l=parseFloat(t.min)||0,h=parseFloat(t.max)||100,y=parseFloat(t.value),A=(y-l)/(h-l);c.style.left=`calc(${A*100}% )`,c.textContent=String(y)},d=()=>c.classList.add("visible"),a=()=>c.classList.remove("visible");t.addEventListener("input",u),t.addEventListener("pointerdown",d),t.addEventListener("pointerup",a),t.addEventListener("pointerleave",a),t.addEventListener("focus",d),t.addEventListener("blur",a),t.addEventListener("change",u),e(u),u()}t.dataset.enhancedRange="1"}function Je(t){if(t.dataset.enhancedRequired)return;t.dataset.enhancedRequired="true";let e=n=>{let s;if(n.closest("[role$=group]")?s=n.closest("[role$=group]").querySelector("legend"):s=n.closest("label"),!s||s.querySelector(".required-asterisk"))return;let r=document.createElement("span");r.classList.add("required-asterisk"),r.textContent="*",r.style.marginLeft="4px";let o=s.querySelector("span, [data-label]");if(o)o.appendChild(r);else{let c=s.querySelector("input, select, textarea");c?s.insertBefore(r,c):s.appendChild(r)}let i=n.closest("form");if(i&&!i.querySelector(".required-legend")){let c=document.createElement("small");c.classList.add("required-legend"),c.textContent="* Required fields",i.insertBefore(c,i.querySelector(".form-actions")||i.lastElementChild)}};t.querySelectorAll("[required]").forEach(n=>{e(n)})}function Xe(t){if(t.dataset.enhancedOpenGroup)return;t.dataset.enhancedOpenGroup="true",t.classList.add("flex","flex-wrap","buttons");let e=document.createElement("input");e.type="text",e.placeholder="Add item...",e.classList.add("input-text","input-sm"),e.style.width="auto";let n=()=>t.querySelector('input[type="radio"], input[type="checkbox"]');t.appendChild(e),e.addEventListener("keydown",s=>{if(s.key==="Enter"||s.key==="Tab"){let r=e.value.trim();if(r){s.preventDefault();let o=n(),i=o?.type==="radio"?"radio":"checkbox",c=`open-group-${Math.random().toString(36).substring(2,11)}`,u=document.createElement("label"),d=document.createElement("span");d.setAttribute("data-label",""),d.textContent=r;let a=document.createElement("input");a.type=i,a.name=o?.name||t.getAttribute("data-name")||"open-group",a.value=r,a.id=c,u.appendChild(d),u.appendChild(a),t.insertBefore(u,e),e.value=""}}else if(s.key==="Backspace"&&e.value===""){s.preventDefault();let r=t.querySelectorAll("label");r.length>0&&r[r.length-1].remove()}})}function Ye(t){if(t.dataset.enhancedClip)return;t.dataset.enhancedClip="true",t.hasAttribute("tabindex")||t.setAttribute("tabindex","0"),t.hasAttribute("role")||t.setAttribute("role","button");let e=()=>{let s=t.getAttribute("data-clip-open")==="true";t.setAttribute("aria-expanded",s?"true":"false")},n=()=>{let s=t.getAttribute("data-clip-open")==="true";t.setAttribute("data-clip-open",s?"false":"true"),e()};t.addEventListener("click",s=>{s.defaultPrevented||n()}),t.addEventListener("keydown",s=>{(s.key===" "||s.key==="Enter")&&(s.preventDefault(),n())}),e()}function et(t){if(t.dataset.enhancedBtnWorking)return;t.dataset.enhancedBtnWorking="true";let e=null,n=!1;new MutationObserver(r=>{r.forEach(o=>{if(o.attributeName==="class"){let i=t.classList.contains("btn-working"),c=t.querySelector("pds-icon");if(i)if(c)e||(e=c.getAttribute("icon")),c.setAttribute("icon","circle-notch");else{let u=document.createElement("pds-icon");u.setAttribute("icon","circle-notch"),u.setAttribute("size","sm"),t.insertBefore(u,t.firstChild),n=!0}else o.oldValue?.includes("btn-working")&&c&&(n?(c.remove(),n=!1):e&&(c.setAttribute("icon",e),e=null))}})}).observe(t,{attributes:!0,attributeFilter:["class"],attributeOldValue:!0})}var tt=new Map([[".accordion",Ve],["nav[data-dropdown]",Ge],["label[data-toggle]",Ke],["label[data-color]",Qe],['input[type="range"]',Ze],["form[data-required]",Je],["fieldset[role=group][data-open]",Xe],["[data-clip]",Ye],["button, a[class*='btn-']",et]]),se=Be.map(t=>({...t,run:tt.get(t.selector)||(()=>{})}));var ke="pds",nt=/^([a-z][a-z0-9+\-.]*:)?\/\//i,Ce=/^[a-z]:/i;function N(t=""){return t.endsWith("/")?t:`${t}/`}function st(t="",e=ke){let n=t.replace(/\/+$/,"");return new RegExp(`(?:^|/)${e}$`,"i").test(n)?n:`${n}/${e}`}function rt(t){return t.replace(/^\.\/+/,"")}function ot(t){return Ce.test(t)?t.replace(Ce,"").replace(/^\/+/,""):t}function it(t){return t.startsWith("public/")?t.substring(7):t}function re(t,e={}){let n=e.segment||ke,s=e.defaultRoot||`/assets/${n}/`,r=t?.public&&t.public?.root||t?.static&&t.static?.root||null;if(!r||typeof r!="string")return N(s);let o=r.trim();return o?(o=o.replace(/\\/g,"/"),o=st(o,n),o=N(o),nt.test(o)?o:(o=rt(o),o=ot(o),o.startsWith("/")||(o=it(o),o.startsWith("/")||(o=`/${o}`),o=o.replace(/\/+/g,(i,c)=>c===0?i:"/")),N(o))):N(s)}var ct=/^[a-z][a-z0-9+\-.]*:\/\//i,q=(()=>{try{return import.meta.url}catch{return}})(),K=t=>typeof t=="string"&&t.length&&!t.endsWith("/")?`${t}/`:t;function Q(t,e={}){if(!t||ct.test(t))return t;let{preferModule:n=!0}=e,s=()=>{if(!q)return null;try{return new URL(t,q).href}catch{return null}},r=()=>{if(typeof window>"u"||!window.location?.origin)return null;try{return new URL(t,window.location.origin).href}catch{return null}};return(n?s()||r():r()||s())||t}var Me=(()=>{if(q)try{let t=new URL(q);if(/\/public\/assets\/js\//.test(t.pathname))return new URL("../pds/",q).href}catch{return}})(),Pe=!1;function Re(t){Pe||typeof document>"u"||(Pe=!0,t.addEventListener("pds:ready",e=>{let n=e.detail?.mode;n&&document.documentElement.classList.add(`pds-${n}`,"pds-ready")}))}function $e({manageTheme:t,themeStorageKey:e,applyResolvedTheme:n,setupSystemListenerIfNeeded:s}){let r="light",o=null;if(t&&typeof window<"u"){try{o=localStorage.getItem(e)||null}catch{o=null}try{n?.(o),s?.(o)}catch{}o?o==="system"?r=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":r=o:r=window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}return{resolvedTheme:r,storedTheme:o}}function ie(t,{resolvePublicAssetURL:e}){let n=!!(t?.public?.root||t?.static?.root),s=e(t);return!n&&Me&&(s=Me),K(Q(s))}async function Ie(t,{baseEnhancers:e=[]}={}){let{autoDefineBaseURL:n="/auto-define/",autoDefinePreload:s=[],autoDefineMapper:r=null,enhancers:o=[],autoDefineOverrides:i=null,autoDefinePreferModule:c=!0}=t,u=(()=>{let a=new Map;return(e||[]).forEach(l=>a.set(l.selector,l)),(o||[]).forEach(l=>a.set(l.selector,l)),Array.from(a.values())})(),d=null;if(typeof window<"u"&&typeof document<"u"){let a=null;try{let w=await Promise.resolve().then(()=>(Te(),De));a=w?.AutoDefiner||w?.default?.AutoDefiner||w?.default||null}catch(w){console.warn("AutoDefiner not available:",w?.message||w)}let l=w=>{switch(w){case"pds-tabpanel":return"pds-tabstrip.js";default:return`${w}.js`}},{mapper:h,...y}=i&&typeof i=="object"?i:{},x={baseURL:n&&K(Q(n,{preferModule:c})),predefine:s,scanExisting:!0,observeShadows:!0,patchAttachShadow:!0,debounceMs:16,enhancers:u,onError:(w,L)=>{if(typeof w=="string"&&w.startsWith("pds-")){let E=["pds-form","pds-drawer"].includes(w),R=L?.message?.includes("#pds/lit")||L?.message?.includes("Failed to resolve module specifier");E&&R?console.error(`\u274C PDS component <${w}> requires Lit but #pds/lit is not in import map.
32
+ See: https://github.com/Pure-Web-Foundation/pure-ds/blob/main/readme.md#lit-components-not-working`):console.warn(`\u26A0\uFE0F PDS component <${w}> not found. Assets may not be installed.`)}else console.error(`\u274C Auto-define error for <${w}>:`,L)},...y,mapper:w=>{if(customElements.get(w))return null;if(typeof r=="function")try{let L=r(w);return L===void 0?l(w):L}catch(L){return console.warn("Custom autoDefine.mapper error; falling back to default:",L?.message||L),l(w)}return l(w)}};a&&(d=new a(x),s.length>0&&typeof a.define=="function"&&await a.define(...s,{baseURL:n,mapper:x.mapper,onError:x.onError}))}return{autoDefiner:d,mergedEnhancers:u}}var ae=["light","dark"],ce=new Set(ae);function lt(t){let n=(Array.isArray(t?.themes)?t.themes.map(s=>String(s).toLowerCase()):ae).filter(s=>ce.has(s));return n.length?n:ae}function le(t,{preferDocument:e=!0}={}){let n=String(t||"").toLowerCase();if(ce.has(n))return n;if(e&&typeof document<"u"){let s=document.documentElement?.getAttribute("data-theme");if(ce.has(s))return s}return typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function je(t,e){let n=le(e);return lt(t).includes(n)}var ue=class extends EventTarget{},g=new ue;g.initializing=!1;g.currentPreset=null;g.debug=!1;var _e=function(t="log",e,...n){let s=!!(g.registry&&!g.registry.isLive),r=(this?.debug||this?.design?.debug||g.debug||!1)===!0;if(s){if(!g.debug)return}else if(!r&&t!=="error"&&t!=="warn")return;let o=console[t]||console.log;n.length>0?o(e,...n):o(e)};function pe(t){if(t==null)return t;if(typeof t=="function")return;if(typeof t!="object")return t;if(Array.isArray(t))return t.map(n=>pe(n)).filter(n=>n!==void 0);let e={};for(let[n,s]of Object.entries(t)){let r=pe(s);r!==void 0&&(e[n]=r)}return e}async function dt(t,e={}){if(e?.runtimeConfig===!1||typeof fetch!="function")return null;let n=e?.runtimeConfigURL||`${t}pds-runtime-config.json`;try{let s=await fetch(n,{cache:"no-store"});return s.ok?await s.json():null}catch{return null}}g.registry=U;g.enums=Se;g.adoptLayers=xe;g.adoptPrimitives=ve;g.parse=ee;g.createStylesheet=Ee;g.isLiveMode=()=>U.isLive;g.ask=Le;g.toast=$;g.common=te;g.AutoComplete=B;function Oe(t){let e=typeof CustomEvent=="function";try{let n=e?new CustomEvent("pds:ready",{detail:t}):new Event("pds:ready");g.dispatchEvent(n)}catch{}if(typeof document<"u")if(e){let n={detail:t,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:ready",n))}catch{}try{document.dispatchEvent(new CustomEvent("pds-ready",n))}catch{}}else{try{document.dispatchEvent(new Event("pds:ready"))}catch{}try{document.dispatchEvent(new Event("pds-ready"))}catch{}}}function Ue(t={}){let e=typeof CustomEvent=="function",n={at:Date.now(),...t};try{let s=e?new CustomEvent("pds:config-changed",{detail:n}):new Event("pds:config-changed");g.dispatchEvent(s)}catch{}if(typeof document<"u")if(e){let s={detail:n,bubbles:!0,composed:!0};try{document.dispatchEvent(new CustomEvent("pds:config-changed",s))}catch{}}else try{document.dispatchEvent(new Event("pds:config-changed"))}catch{}}typeof window<"u"&&(window.PDS=g);var de="pure-ds-theme",O=null,F=null;function he(t){try{if(typeof document>"u")return;let e="light";t?t==="system"?e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e=t:e=typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",document.documentElement.setAttribute("data-theme",e)}catch{}}function fe(t){try{if(O&&F){try{typeof O.removeEventListener=="function"?O.removeEventListener("change",F):typeof O.removeListener=="function"&&O.removeListener(F)}catch{}O=null,F=null}if(t==="system"&&typeof window<"u"&&window.matchMedia){let e=window.matchMedia("(prefers-color-scheme: dark)"),n=s=>{let r=s?.matches===void 0?e.matches:s.matches;try{let o=r?"dark":"light";document.documentElement.setAttribute("data-theme",o),g.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:o,source:"system"}}))}catch{}};O=e,F=n,typeof e.addEventListener=="function"?e.addEventListener("change",n):typeof e.addListener=="function"&&e.addListener(n)}}catch{}}Object.defineProperty(g,"theme",{get(){try{return typeof window>"u"?null:localStorage.getItem(de)||null}catch{return null}},set(t){try{if(typeof window>"u")return;let e=g.currentConfig?.design||null,n=le(t);if(e&&!je(e,n)){let s=e?.name||g.currentPreset?.name||g.currentConfig?.preset||"current preset";console.warn(`PDS theme "${n}" not supported by preset "${s}".`),g.dispatchEvent(new CustomEvent("pds:theme:blocked",{detail:{theme:t,resolvedTheme:n,preset:s}}));return}t==null?localStorage.removeItem(de):localStorage.setItem(de,t),he(t),fe(t),g.dispatchEvent(new CustomEvent("pds:theme:changed",{detail:{theme:t,source:"api"}}))}catch{}}});g.defaultEnhancers=se;async function ut(t){let e=t&&t.mode||"live",{mode:n,...s}=t||{};if(e==="static")return pt(s);let r=ie(s,{resolvePublicAssetURL:re}),o=s?.managerURL||s?.public?.managerURL||s?.manager?.url||new URL("core/pds-manager.js",r).href||new URL("./pds-manager.js",import.meta.url).href,{startLive:i}=await import(o);return i(g,s,{emitReady:Oe,emitConfigChanged:Ue,applyResolvedTheme:he,setupSystemListenerIfNeeded:fe})}g.start=ut;async function pt(t){if(!t||typeof t!="object")throw new Error("PDS.start({ mode: 'static', ... }) requires a valid configuration object");let e=t.applyGlobalStyles??!0,n=t.manageTheme??!0,s=t.themeStorageKey??"pure-ds-theme",r=t.staticPaths??{},o=ie(t,{resolvePublicAssetURL:re}),i=t&&t.autoDefine||null,c;i&&i.baseURL?c=K(Q(i.baseURL,{preferModule:!1})):c=`${o}components/`;let u=i&&Array.isArray(i.predefine)&&i.predefine||[],d=i&&typeof i.mapper=="function"&&i.mapper||null;try{Re(g);let{resolvedTheme:a}=$e({manageTheme:n,themeStorageKey:s,applyResolvedTheme:he,setupSystemListenerIfNeeded:fe}),l=await dt(o,t),h=Array.isArray(t?.enhancers)?t.enhancers:t?.enhancers&&typeof t.enhancers=="object"?Object.values(t.enhancers):[],y=l?.config?{...l.config,...t,design:t?.design||l.config.design,preset:t?.preset||l.config.preset}:{...t},A={tokens:`${o}styles/pds-tokens.css.js`,primitives:`${o}styles/pds-primitives.css.js`,components:`${o}styles/pds-components.css.js`,utilities:`${o}styles/pds-utilities.css.js`,styles:`${o}styles/pds-styles.css.js`},x=l?.paths||{};if(r={...A,...x,...r},g.registry.setStaticMode(r),e&&typeof document<"u")try{let E=await g.registry.getStylesheet("styles");if(E){E._pds=!0;let R=(document.adoptedStyleSheets||[]).filter(_=>_._pds!==!0);document.adoptedStyleSheets=[...R,E],Ue({mode:"static",source:"static:styles-applied"})}}catch(E){_e.call(g,"warn","Failed to apply static styles:",E)}let w=null,L=[];try{let E=await Ie({autoDefineBaseURL:c,autoDefinePreload:u,autoDefineMapper:d,enhancers:h,autoDefineOverrides:i||null,autoDefinePreferModule:!(i&&i.baseURL)},{baseEnhancers:se});w=E.autoDefiner,L=E.mergedEnhancers||[]}catch(E){_e.call(g,"error","\u274C Failed to initialize AutoDefiner/Enhancers (static):",E)}let P=pe(t);return g.currentConfig=Object.freeze({mode:"static",...structuredClone(P),design:structuredClone(y.design||{}),preset:y.preset,theme:a,enhancers:L}),Oe({mode:"static",config:y,theme:a,autoDefiner:w}),{config:y,theme:a,autoDefiner:w}}catch(a){throw g.dispatchEvent(new CustomEvent("pds:error",{detail:{error:a}})),a}}var j={name:"@pure-ds/core",shortname:"pds",version:"0.6.11",description:"Why develop a Design System when you can generate one?",repository:{type:"git",url:"git+https://github.com/Pure-Web-Foundation/pure-ds.git"},bugs:{url:"https://github.com/Pure-Web-Foundation/pure-ds/issues"},homepage:"https://puredesignsystem.z6.web.core.windows.net/",keywords:["design-system","css","web-components","lit","constructable-stylesheets","tokens","utilities","a11y"],type:"module",main:"./public/assets/js/pds.js",module:"./public/assets/js/pds.js",types:"./dist/types/pds.d.ts",bin:{"pds-build":"packages/pds-cli/bin/pds-static.js","pds-sync-assets":"packages/pds-cli/bin/sync-assets.js","pds-build-icons":"packages/pds-cli/bin/pds-build-icons.js","pds-import":"packages/pds-cli/bin/pds-import.js","pds-setup-copilot":"packages/pds-cli/bin/pds-setup-copilot.js","pds-init-config":"packages/pds-cli/bin/pds-init-config.js","pds-bootstrap":"packages/pds-cli/bin/pds-bootstrap.js"},exports:{".":{types:"./src/js/pds.d.ts",import:"./public/assets/js/pds.js"},"./pds-core":"./src/js/pds.js","./auto-define/*":"./public/auto-define/*"},files:[".github/copilot-instructions.md",".cursorrules","dist/types/","public/assets/js/","public/assets/pds/components/","public/assets/pds/templates/","public/assets/pds/external/","public/assets/pds/vscode-custom-data.json","public/assets/pds/pds.css-data.json","public/assets/pds/pds-css-complete.json","public/auto-define/","public/pds/components/","public/assets/pds/icons/pds-icons.svg","packages/pds-cli/bin/","packages/pds-cli/lib/","src/js/pds.d.ts","src/js/pds.js","src/js/pds-live-manager/","src/js/pds-core/","custom-elements.json","custom-elements-manifest.config.js","pds.html-data.json","pds.css-data.json","readme.md","INTELLISENSE.md","CSS-INTELLISENSE-LIMITATION.md","CSS-INTELLISENSE-QUICK-REF.md"],scripts:{test:'echo "Error: no test specified" && exit 1',dev:"node esbuild-dev.js",prebuild:"npm run types",build:"node esbuild-build.js",types:"tsc -p tsconfig.json && node scripts/sync-types.mjs",postinstall:"node packages/pds-cli/bin/postinstall.mjs","prepds:build":"npm run types","pds:build":"node packages/pds-cli/bin/pds-static.js","pds:build-icons":"node packages/pds-cli/bin/pds-build-icons.js","pds:bootstrap":"node packages/pds-cli/bin/pds-bootstrap.js","pds:manifest":"node packages/pds-cli/bin/generate-manifest.js","pds:css-data":"node packages/pds-cli/bin/generate-css-data.js","pds:import":"node packages/pds-cli/bin/pds-import.js","pds:dx":"node packages/pds-cli/bin/pds-dx.js","storybook:generate":"cd packages/pds-storybook && npm run generate-stories","storybook:dev":"cd packages/pds-storybook && npm run storybook:dev","storybook:build":"cd packages/pds-storybook && npm run storybook:build"},author:"Marc van Neerven",license:"ISC",engines:{node:">=18"},publishConfig:{access:"public"},devDependencies:{"@custom-elements-manifest/analyzer":"^0.9.9",esbuild:"^0.19.0","fs-extra":"^11.1.1",typescript:"^5.6.3","@types/node":"^22.10.2"},dependencies:{lit:"^3.3.1","pure-web":"1.1.32"},customElements:"custom-elements.json"};await g.start(V);var Ne=typeof j.repository=="string"?j.repository:j.repository?.url,ft=Ne?Ne.replace(/^git\+/,"").replace(/\.git$/,""):"",Gt=j.homepage||ft,Kt=j.bugs?.url||"";document.body.innerHTML=`
33
+ <pds-toaster id="global-toaster"></pds-toaster>
34
+
35
+ <div class="container text-center">
36
+ <img src="/assets/img/pds-logo.svg" alt="PDS Logo" width="64" height="64" />
37
+ <header class="container section">
38
+ <h1>${j.name} ${j.version}</h1>
39
+ <small class="text-muted">${j.description}</small>
117
40
  </header>
118
- <div class="stack-sm">
119
- <a href="${Rt}">Project homepage</a>
120
- <a href="${Ct}">Report an issue</a>
121
- <a href="${ve}">Browse the repo</a>
122
- </div>
123
- </article>
124
- </section>
125
-
126
- <section class="card surface-elevated stack-md">
127
- <header class="stack-xs">
128
- <h2 class="flex items-center gap-sm"><pds-icon icon="sliders"></pds-icon>Border width token demo</h2>
129
- <p class="text-muted">These examples react to <strong>shape.borderWidth</strong> and tokenized border styles.</p>
130
- </header>
131
- <div class="grid grid-auto-md gap-lg">
132
- <article class="stack-sm">
133
- <h3>Semantic elements</h3>
134
- <blockquote>
135
- <p>Blockquote, details, and rules use tokenized border widths.</p>
136
- <cite>Token-driven rendering</cite>
137
- </blockquote>
138
- <details open>
139
- <summary>Details border</summary>
140
- <p>Toggle me to confirm border consistency.</p>
141
- </details>
142
- <hr data-content="Demo divider">
143
- </article>
144
-
145
- <article class="stack-sm">
146
- <h3>Form + utility examples</h3>
147
- <form class="stack-sm" data-required>
148
- <label>
149
- <span>Email</span>
150
- <input type="email" placeholder="name@example.com" />
151
- </label>
152
- <fieldset role="group" class="buttons">
153
- <legend>Preferences</legend>
154
- <label><input type="checkbox" checked /> Daily summary</label>
155
- <label><input type="checkbox" /> Weekly digest</label>
156
- </fieldset>
157
- </form>
158
- <div class="border-gradient-medium card stack-xs">
159
- <strong>Gradient border utility</strong>
160
- <span class="text-muted">Uses border-width tokens as well.</span>
161
- </div>
162
- </article>
163
41
  </div>
164
- </section>
165
- </main>
166
42
  `;