@ntix/components-scorad 1.0.0 → 1.0.1

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.
@@ -901,7 +901,7 @@ function __decorate(e, t, n, r) {
901
901
  else for (var s = e.length - 1; s >= 0; s--) (o = e[s]) && (a = (i < 3 ? o(a) : i > 3 ? o(t, n, a) : o(t, n)) || a);
902
902
  return i > 3 && a && Object.defineProperty(t, n, a), a;
903
903
  }
904
- var component_default$1 = ":host{--host-display:flex;--host-heading-border:var(--scorad-heading-border,solid 1px currentColor);--host-score-color:var(--scorad-score-color,var(--color));--host-score-background:var(--scorad-score-background,var(--background-color));--host-score-border:var(--scorad-score-border,solid 2px currentColor);gap:var(--host-spacing-unit);flex-wrap:wrap;width:fit-content}scorad-weightings{margin-bottom:var(--host-spacing-unit);align-self:center}section{flex-direction:column;flex:auto;display:flex}h3{border:var(--host-heading-border);width:1.5em;height:1.5em;padding:var(--host-padding-unit);margin:var(--host-spacing-unit);border-radius:50%;justify-content:center;align-items:center;display:inline-flex}scorad-label{flex:100%;font-size:1.2rem}scorad-label>span{padding:var(--host-padding-unit);outline:var(--host-score-border);border-radius:var(--host-border-radius);color:var(--host-score-color);background:var(--host-score-background)}", host_default = "*{box-sizing:border-box}:host{--host-spacing-unit:var(--scorad-spacing-unit,.25rem);--host-padding-unit:var(--scorad-padding-unit,.333rem);--host-border-radius:var(--scorad-border-radius,3px);--host-border-radius-outer:var(--scorad-border-radius-outer,calc(var(--host-border-radius) + var(--host-padding-unit)));display:var(--host-display,inline-flex)}";
904
+ var component_default$1 = ":host{--host-display:flex;--host-heading-border:var(--scorad-heading-border,solid 1px var(--host-color));--host-score-color:var(--scorad-score-color,var(--host-color));--host-score-background:var(--scorad-score-background,var(--host-background-color));--host-score-border:var(--scorad-score-border,solid 2px var(--host-color));gap:var(--host-spacing-unit);flex-wrap:wrap;width:fit-content}scorad-weightings{margin-bottom:var(--host-spacing-unit);align-self:center}section{flex-direction:column;flex:auto;display:flex}h3{border:var(--host-heading-border);width:1.5em;height:1.5em;padding:var(--host-padding-unit);margin:var(--host-spacing-unit);border-radius:50%;justify-content:center;align-items:center;display:inline-flex}scorad-label{flex:100%;font-size:1.2rem}scorad-label>span{padding:var(--host-padding-unit);outline:var(--host-score-border);border-radius:var(--host-border-radius);color:var(--host-score-color);background:var(--host-score-background)}", host_default = "*{box-sizing:border-box}:host{--host-color:var(--color,#444);--host-background-color:var(--background-color,#eee);--host-primary-color:var(--primary-color,var(--host-color));--host-spacing-unit:var(--scorad-spacing-unit,.25rem);--host-padding-unit:var(--scorad-padding-unit,.333rem);--host-border-radius:var(--scorad-border-radius,3px);--host-border-radius-outer:var(--scorad-border-radius-outer,calc(var(--host-border-radius) + var(--host-padding-unit)));display:var(--host-display,inline-flex)}";
905
905
  const SCORAD_EXTENT_MAX_VALUE = 100, SCORAD_INTENSITY_MAX_VALUE = 3, SCORAD_SUBJECTIVE_MAX_VALUE = 10, SCORAD_EXTENT_DEFAULT = {
906
906
  headNeck: -1,
907
907
  anteriorTrunk: -1,
@@ -939,7 +939,7 @@ const SCORAD_EXTENT_MAX_VALUE = 100, SCORAD_INTENSITY_MAX_VALUE = 3, SCORAD_SUBJ
939
939
  lowerLimbs: .28,
940
940
  genitals: 0
941
941
  };
942
- var component_default$6 = ":host{--host-display:inline-flex;--host-font-size:1rem;justify-content:center;align-items:center;gap:var(--host-spacing-unit);flex-wrap:wrap;position:relative}label{padding:var(--host-padding-unit)}svg{width:calc(50% - var(--host-spacing-unit));padding:var(--host-spacing-unit)0;fill:#0000;stroke:currentColor;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;flex:auto;overflow:visible}path,line{vector-effect:non-scaling-stroke}path{opacity:.333}text,line{opacity:.667}g{outline:none}g[tabindex] path{opacity:1;fill:hsla(var(--scorad-h,0),var(--extent,\"0%\"),50%,var(--opacity,0))}:is(:not(:has(:active)) g[tabindex]:hover path,:not(:has(:active)) g[tabindex]:hover line){stroke-width:2px;stroke:var(--primary-color);stroke-dasharray:2 3.5;opacity:1}g[tabindex]:focus path,g[tabindex]:active path,g[tabindex].selected path,g[tabindex]:focus line,g[tabindex]:active line,g[tabindex].selected line{stroke-width:2px;stroke:var(--primary-color);opacity:1;stroke-dasharray:none!important}g[tabindex] text{fill:currentColor;stroke:none;font-size:var(--host-font-size);text-anchor:end}:is(:not(:has(:active)) g[tabindex]:hover text,g[tabindex]:focus text,g[tabindex]:active text,g[tabindex].selected text){fill:var(--primary-color);opacity:1}", tag$6 = "scorad-extent", HTMLScoradExtentElement = class extends HTMLComponentElement {
942
+ var component_default$6 = ":host{--host-display:inline-flex;--host-font-size:1rem;flex-wrap:wrap;justify-content:center;align-items:center;position:relative}label{padding:var(--host-padding-unit)}svg{width:140px;padding:var(--host-spacing-unit)0;fill:#0000;stroke:var(--host-color);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;flex:auto;overflow:visible}path,line{vector-effect:non-scaling-stroke}path{opacity:.333}text,line{opacity:.667}g{outline:none}g[tabindex] path{opacity:1;fill:hsla(var(--scorad-h,0),var(--extent,\"0%\"),50%,var(--opacity,0))}:is(:not(:has(:active)) g[tabindex]:hover path,:not(:has(:active)) g[tabindex]:hover line){stroke-width:2px;stroke:var(--host-primary-color);stroke-dasharray:2 3.5;opacity:1}g[tabindex]:focus path,g[tabindex]:active path,g[tabindex].selected path,g[tabindex]:focus line,g[tabindex]:active line,g[tabindex].selected line{stroke-width:2px;stroke:var(--host-primary-color);opacity:1;stroke-dasharray:none!important}g[tabindex] text{fill:var(--host-color);stroke:none;font-size:var(--host-font-size);text-anchor:end}:is(:not(:has(:active)) g[tabindex]:hover text,g[tabindex]:focus text,g[tabindex]:active text,g[tabindex].selected text){fill:var(--host-primary-color);opacity:1}", tag$6 = "scorad-extent", HTMLScoradExtentElement = class extends HTMLComponentElement {
943
943
  connectedCallback() {
944
944
  this.render();
945
945
  }
@@ -1027,7 +1027,7 @@ var component_default$6 = ":host{--host-display:inline-flex;--host-font-size:1re
1027
1027
  t && (t.textContent = `${this.value[e]}%`);
1028
1028
  };
1029
1029
  return html`
1030
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 164 240" width="200">
1030
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 164 240">
1031
1031
  <g ${e("headNeck")}
1032
1032
  class="head-neck" tabindex="0">
1033
1033
  <text x="40" y="20" ${t("headNeck")}>--</text>
@@ -1072,7 +1072,7 @@ var component_default$6 = ":host{--host-display:inline-flex;--host-font-size:1re
1072
1072
  <path d="M120,139 100,154 100,230 A1,1 0,0,0 120,230Z"></path>
1073
1073
  </g>
1074
1074
  </svg>
1075
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 164 240" width="200">
1075
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 164 240">
1076
1076
  <g class="head-neck">
1077
1077
  <path d="M100,45 100,49 Q95,48 90,49 L90,45 A20,22.5 1,1,1 100,45Z"></path>
1078
1078
  </g>
@@ -1170,7 +1170,7 @@ const ScoradResources = {
1170
1170
  }
1171
1171
  }
1172
1172
  };
1173
- var component_default$5 = ":host{--host-display:inline-flex;--host-option-width:var(--scorad-option-width,1.5em);--host-option-height:var(--scorad-option-height,1.5em);--host-option-border:var(--scorad-option-border,solid 1px var(--color));--host-option-border-selected:var(--scorad-option-border-selected,solid 2px var(--color));--host-option-color:var(--scorad-option-color,var(--color));--host-option-background:var(--scorad-option-background,transparent);--host-option-color-selected:var(--scorad-option-color-selected,var(--background-color));--host-option-background-selected:var(--scorad-option-background-selected,var(--color));gap:var(--host-spacing-unit);padding:calc(1.5*var(--host-padding-unit))0;outline:none;width:max-content;position:relative}span{height:var(--host-option-height);width:var(--host-option-width);outline:var(--host-option-border);border-radius:var(--host-border-radius);padding:calc(.5*var(--host-padding-unit))var(--host-padding-unit);color:var(--host-option-color);background:var(--host-option-background);cursor:pointer;touch-action:none}span:before{content:\"​\";touch-action:none;pointer-events:none}span[aria-selected=true]{outline:var(--host-option-border-selected);color:var(--host-option-color-selected);background:var(--host-option-background-selected)}", tag$5 = "scorad-options", HTMLScoradOptionsElement = class extends HTMLComponentElement {
1173
+ var component_default$5 = ":host{--host-display:inline-flex;--host-option-width:var(--scorad-option-width,1.5em);--host-option-height:var(--scorad-option-height,1.5em);--host-option-border:var(--scorad-option-border,solid 1px var(--host-color));--host-option-border-selected:var(--scorad-option-border-selected,solid 2px var(--host-color));--host-option-color:var(--scorad-option-color,var(--host-color));--host-option-background:var(--scorad-option-background,transparent);--host-option-color-selected:var(--scorad-option-color-selected,var(--host-background-color));--host-option-background-selected:var(--scorad-option-background-selected,var(--host-color));gap:var(--host-spacing-unit);padding:calc(1.5*var(--host-padding-unit))0;outline:none;width:max-content;position:relative}span{height:var(--host-option-height);width:var(--host-option-width);outline:var(--host-option-border);border-radius:var(--host-border-radius);padding:calc(.5*var(--host-padding-unit))var(--host-padding-unit);color:var(--host-option-color);background:var(--host-option-background);cursor:pointer;touch-action:none}span:before{content:\"​\";touch-action:none;pointer-events:none}span[aria-selected=true]{outline:var(--host-option-border-selected);color:var(--host-option-color-selected);background:var(--host-option-background-selected)}", tag$5 = "scorad-options", HTMLScoradOptionsElement = class extends HTMLComponentElement {
1174
1174
  connectedCallback() {
1175
1175
  this.render(), this.addEventListener("focusin", this._handleFocusIn, { once: !0 }), this.addEventListener("pointerdown", this._handleDown);
1176
1176
  }
@@ -1359,7 +1359,7 @@ __decorate([Watch("value")], HTMLScoradSubjectiveElement.prototype, "afterRender
1359
1359
  css: [host_default, component_default$3],
1360
1360
  delegatesFocus: !0
1361
1361
  })], HTMLScoradSubjectiveElement);
1362
- var component_default$2 = ":host{--host-display:inline-flex;--host-outline-hover:var(--scorad-weightings-outline-hover,dashed 2px var(--primary-color));--host-outline-focus:var(--scorad-weightings-outline-focus,solid 2px var(--primary-color));padding:0 var(--host-padding-unit);border-radius:var(--host-border-radius);justify-content:center;align-items:baseline;position:relative}:host(:hover){outline:var(--host-outline-hover)}:host(:focus-within){outline:var(--host-outline-focus)}scorad-options{--host-option-width:auto;--host-option-height:auto}", tag$2 = "scorad-weightings", HTMLScoradWeightingsElement = class extends HTMLComponentElement {
1362
+ var component_default$2 = ":host{--host-display:inline-flex;--host-outline-hover:var(--scorad-weightings-outline-hover,dashed 2px var(--host-primary-color));--host-outline-focus:var(--scorad-weightings-outline-focus,solid 2px var(--host-primary-color));padding:0 var(--host-padding-unit);border-radius:var(--host-border-radius);justify-content:center;align-items:baseline;position:relative}:host(:hover){outline:var(--host-outline-hover)}:host(:focus-within){outline:var(--host-outline-focus)}scorad-options{--host-option-width:auto;--host-option-height:auto}", tag$2 = "scorad-weightings", HTMLScoradWeightingsElement = class extends HTMLComponentElement {
1363
1363
  connectedCallback() {
1364
1364
  this.render();
1365
1365
  }
@@ -1497,7 +1497,7 @@ __decorate([Watch("value")], HTMLScoradElement.prototype, "afterRender", null),
1497
1497
  delegatesFocus: !0
1498
1498
  })], HTMLScoradElement);
1499
1499
  const componentsScoradLogger = provideLogger("@ntix/components-scorad", typeof ANTIX_COMPONENTS_SCORAD_LOG_LEVEL > "u" ? LogLevel.warn : ANTIX_COMPONENTS_SCORAD_LOG_LEVEL);
1500
- var component_default = ":host{--host-display:inline-flex;--host-options:var(--scorad-label-options,solid 1px currentColor);--host-hover:var(--scorad-label-hover,dashed 2px var(--primary-color));--host-focus:var(--scorad-label-focus,solid 2px var(--primary-color));padding:var(--host-padding-unit);border-radius:var(--host-border-radius-outer);flex-wrap:wrap;align-items:baseline;position:relative}:host(:hover){outline:var(--host-hover)}:host(:focus-within){outline:var(--host-focus)}:host>label>span{transition:all .2s ease-in-out;display:block}:host>label>small{opacity:0;height:0;transition:all .4s ease-in-out;display:block}:host(:hover)>label>span,:host(:focus-within)>label>span{transform:translateY(-.5em)}:host(:hover)>label>small,:host(:focus-within)>label>small{opacity:.667;transform:translateY(-.6em)}:host>label{padding:var(--host-padding-unit);flex:1;padding-left:0}", tag = "scorad-label", HTMLScoradLabelElement = class extends HTMLComponentElement {
1500
+ var component_default = ":host{--host-display:inline-flex;--host-options:var(--scorad-label-options,solid 1px var(--host-color));--host-hover:var(--scorad-label-hover,dashed 2px var(--host-primary-color));--host-focus:var(--scorad-label-focus,solid 2px var(--host-primary-color));padding:var(--host-padding-unit);border-radius:var(--host-border-radius-outer);flex-wrap:wrap;align-items:baseline;position:relative}:host(:hover){outline:var(--host-hover)}:host(:focus-within){outline:var(--host-focus)}:host>label>span{transition:all .2s ease-in-out;display:block}:host>label>small{opacity:0;height:0;transition:all .4s ease-in-out;display:block}:host(:hover)>label>span,:host(:focus-within)>label>span{transform:translateY(-.5em)}:host(:hover)>label>small,:host(:focus-within)>label>small{opacity:.667;transform:translateY(-.6em)}:host>label{padding:var(--host-padding-unit);flex:1;padding-left:0}", tag = "scorad-label", HTMLScoradLabelElement = class extends HTMLComponentElement {
1501
1501
  connectedCallback() {
1502
1502
  this.render(), this.addEventListener("mousedown", this._handleClick);
1503
1503
  }
@@ -8,8 +8,8 @@
8
8
  [contenteditable]:not([contenteditable="false"])
9
9
  `,a={trace:0,debug:1,log:2,info:3,warn:4,error:5};function o(e,t,n){let r=()=>{},i={provide:r=>o(`${e}.${r}`,t,n)};for(let o of Object.keys(a)){let s=o,c=a[s],l=n[s];t>c?i[s]=r:i[s]=((t,...n)=>l(`[${e}]`,t,...n))}return i}var s=(()=>{let e=(e,t)=>(t??=s.defaultLevel,o(e,t,s.adapter));return e.adapter=console,e.defaultLevel=a.warn,e})(),c=(e,t)=>{if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(typeof e==`object`&&e)||!(typeof t==`object`&&t))return!1;let n=Array.isArray(e);if(n!==Array.isArray(t))return!1;if(n){let n=e,r=t;if(n.length!==r.length)return!1;for(let e=0;e<n.length;e++)if(!c(n[e],r[e]))return!1;return!0}let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let n of r){if(!Object.prototype.hasOwnProperty.call(t,n))return!1;let r=e[n],i=t[n];if(!c(r,i))return!1}return!0},l=(e,t)=>{let n=e;for(;n;){let e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Object.getPrototypeOf(n)}},u=e=>Object.keys(e);function d(e){return e!=null&&typeof e.then==`function`}var f=class{constructor(e){this.value=e}value;orThrow(){return this.value}orNull(){return this.value}},p=class e{constructor(e){this.errors=e}errors;orThrow(){throw Error(e.formatErrors(this.errors))}orNull(){return null}static formatErrors=e=>e.join(`
10
10
  `)},m={Ok:e=>new f(e),Fail:e=>new p(e)},h=(e,t)=>e.toString().padStart(t,`0`).slice(-t),g=e=>e==null?e:e?.replace(/[A-Z]+(?![a-z])|[A-Z]/g,(e,t)=>(t?`-`:``)+e).toLowerCase();function _(e={}){return function(t,n){let i=e?.name??n,a=e?.read??(e=>e),o=e?.write??(e=>e);if(!o&&!a)throw Error(`@Att() should have read or write options`);var s=r(t.constructor);s.__metadata.attributes=[...s.__metadata.attributes,{propertyName:n,name:g(i),read:a,write:o}]}}var ee={read:e=>e===`true`,write:e=>e===!0?`true`:`false`},v={read:e=>e!=null,write:e=>e===!0?``:void 0},y=s(`@ntix/components-core`,typeof ANTIX_COMPONENTS_CORE_LOG_LEVEL>`u`?a.warn:ANTIX_COMPONENTS_CORE_LOG_LEVEL);function te(e){return typeof e==`object`&&!!e&&`render`in e&&typeof e.render==`function`&&e.render.length===1}function b(e={tag:void 0}){let t=()=>{},r=y.provide(`component-decorator`),i={shadowRoot:`open`,delegatesFocus:!1,...e,css:n(e.css)};return function(n){let a=new Map,o=class extends n{constructor(...e){super(...e);let t=n.__metadata;t&&(t.events.forEach(e=>{r.debug(`event`,e.propertyName,e.name),Object.defineProperty(this,e.propertyName,{value:function(t){let n=new CustomEvent(e.name,{detail:t,...e.init});return this.dispatchEvent(n)},writable:!1,configurable:!1,enumerable:!0})}),t.watches.forEach(e=>{let t=e.methodName;r.debug(`${this.tagName}.${t}()`,{propertyNames:e.propertyNames}),e.propertyNames.forEach(e=>{let n=l(this,e);r.debug(`watch`,e,n);let i=n?.value,a=n?.get?.bind(this)??(()=>i),o=n?.set?.bind(this)??(e=>{i=e});Object.defineProperty(this,e,{get:a,set:function(n){let r=a();r!==n&&(o(n),this[t](n,r,e)===!1&&o(r))},enumerable:!0,configurable:!0})})}),t.attributes.forEach(e=>{let t=l(this,e.propertyName),n=t?.value,i=t?.get?.bind(this)??(()=>n),o=t?.set?.bind(this)??(e=>{n=e});if(e.write){let t=o,n=e.write;o=r=>{r!==i()&&t(r);let a=this.getAttribute(e.name),o=n(r);if(o==null)a!=null&&this.removeAttribute(e.name);else{let t=`${o}`;a!==t&&this.setAttribute(e.name,t)}}}r.debug(`${this.tagName}.${e.propertyName}`,{att:e.name,read:!!e.read,write:!!e.write}),Object.defineProperty(this,e.propertyName,{get:i,set:o,enumerable:!0}),e.read&&a.set(e.name,()=>{this.hasAttribute(e.name)||o(i())})}))}__shadowRoot};if(o.__metadata){let e=new Set(o.observedAttributes);o.__metadata.attributes.forEach(t=>{t.read&&e.add(t.name)}),o.observedAttributes=Array.from(e)}let s;o.prototype.resizeCallback&&(s=new ResizeObserver(e=>{o.prototype.resizeCallback?.call(e[0].target)}));let c=o.prototype.attributeChangedCallback??t;o.prototype.attributeChangedCallback=function(e,t,n){if(c(e,t,n),n!==t){var r=o.__metadata?.attributes.find(t=>t.name===e);r?.read&&(this[r.propertyName]=r.read(n))}};let u=o.prototype.connectedCallback??t;o.prototype.connectedCallback=function(){a.forEach(e=>e()),(i.shadowRoot===`open`||i.shadowRoot===`closed`)&&!this.__shadowRoot&&(this.__shadowRoot=this.attachShadow({delegatesFocus:i.delegatesFocus,mode:i.shadowRoot,slotAssignment:`named`}),this.__shadowRoot.adoptedStyleSheets=i.css),u.call(this),s&&s.observe(this)};let f=o.prototype.disconnectedCallback??t;o.prototype.disconnectedCallback=function(){f.call(this),s&&s.unobserve(this)};let p=o.prototype.beforeRender??t,m=o.prototype.render??t,h=o.prototype.afterRender??t;return o.prototype.render=async function(){r.debug(`render`,this.tagName);let e=p.call(this);if(d(e)&&await e,this.__shadowRoot){let e=this.__shadowRoot,t=m.call(this);te(t)?await t.render(e):e.innerHTML=t}h.call(this)},r.debug(`define`,e.tag),window.customElements.define(e.tag,o),o}}function x(e={}){return function(t,n){var i=r(t.constructor);i.__metadata.events=[...i.__metadata.events,{name:e?.name??g(n),init:e,propertyName:n}]}}var S=class extends HTMLElement{addEventListener(e,t,n){return super.addEventListener(e,t,n),()=>{super.removeEventListener(e,t,n)}}removeEventListener(e,t,n){super.removeEventListener(e,t,n)}};function C(...e){return function(t,n){var i=r(t.constructor);i.__metadata.watches=[...i.__metadata.watches,{methodName:n,propertyNames:e}]}}function ne(e){return typeof e==`function`}var w=class extends Array{render=(e,t=``)=>new Promise(n=>{let r=document.createElement(`template`),i={},a=e=>{let t=`_${Object.keys(i).length}`;return i[t]=e,t},o=e=>Array.isArray(e)?e.map(o).join(``):ne(e)?`_r_=${a(e)}`:`${e}`;r.innerHTML=t+o(this),e.replaceChildren(r.content);let s=async e=>{if(e.nodeType===Node.ELEMENT_NODE&&e.hasAttribute(`_r_`)){let t=e.getAttribute(`_r_`);if(t){e.removeAttribute(`_r_`);let n=i[t];for(n.element=e;!e.isConnected;)await new Promise(e=>requestAnimationFrame(()=>e()));n(e)}}await Promise.all([...e.children].map(s))};s(e).then(n)})},{entries:re,setPrototypeOf:ie,isFrozen:ae,getPrototypeOf:oe,getOwnPropertyDescriptor:se}=Object,{freeze:T,seal:E,create:ce}=Object,{apply:le,construct:ue}=typeof Reflect<`u`&&Reflect;T||=function(e){return e},E||=function(e){return e},le||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},ue||=function(e){return new e(...[...arguments].slice(1))};var de=k(Array.prototype.forEach),fe=k(Array.prototype.lastIndexOf),pe=k(Array.prototype.pop),me=k(Array.prototype.push),he=k(Array.prototype.splice),ge=k(String.prototype.toLowerCase),_e=k(String.prototype.toString),ve=k(String.prototype.match),ye=k(String.prototype.replace),be=k(String.prototype.indexOf),xe=k(String.prototype.trim),D=k(Object.prototype.hasOwnProperty),O=k(RegExp.prototype.test),Se=Ce(TypeError);function k(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return le(e,t,n)}}function Ce(e){return function(){return ue(e,[...arguments])}}function A(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ge;ie&&ie(e,null);let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(ae(t)||(t[r]=e),i=e)}e[i]=!0}return e}function j(e){for(let t=0;t<e.length;t++)D(e,t)||(e[t]=null);return e}function M(e){let t=ce(null);for(let[n,r]of re(e))D(e,n)&&(Array.isArray(r)?t[n]=j(r):r&&typeof r==`object`&&r.constructor===Object?t[n]=M(r):t[n]=r);return t}function we(e,t){for(;e!==null;){let n=se(e,t);if(n){if(n.get)return k(n.get);if(typeof n.value==`function`)return k(n.value)}e=oe(e)}function n(){return null}return n}var Te=T(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),Ee=T(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),De=T([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Oe=T([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),ke=T(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Ae=T([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),je=T([`#text`]),Me=T(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns.slot`.split(`.`)),Ne=T(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),Pe=T(`accent.accentunder.align.bevelled.close.columnsalign.columnlines.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lspace.lquote.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),Fe=T([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),Ie=E(/\{\{[\w\W]*|[\w\W]*\}\}/gm),N=E(/<%[\w\W]*|[\w\W]*%>/gm),Le=E(/\$\{[\w\W]*/gm),P=E(/^data-[\-\w.\u00B7-\uFFFF]+$/),Re=E(/^aria-[\-\w]+$/),ze=E(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Be=E(/^(?:\w+script|data):/i),F=E(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Ve=E(/^html$/i),He=E(/^[a-z][.\w]*(-[.\w]+)+$/i),Ue=Object.freeze({__proto__:null,ARIA_ATTR:Re,ATTR_WHITESPACE:F,CUSTOM_ELEMENT:He,DATA_ATTR:P,DOCTYPE_NAME:Ve,ERB_EXPR:N,IS_ALLOWED_URI:ze,IS_SCRIPT_OR_DATA:Be,MUSTACHE_EXPR:Ie,TMPLIT_EXPR:Le}),We={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ge=function(){return typeof window>`u`?null:window},Ke=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},qe=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};function Je(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ge(),t=e=>Je(e);if(t.version=`3.3.0`,t.removed=[],!e||!e.document||e.document.nodeType!==We.document||!e.Element)return t.isSupported=!1,t;let{document:n}=e,r=n,i=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:o,Node:s,Element:c,NodeFilter:l,NamedNodeMap:u=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,m=c.prototype,h=we(m,`cloneNode`),g=we(m,`remove`),_=we(m,`nextSibling`),ee=we(m,`childNodes`),v=we(m,`parentNode`);if(typeof o==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let y,te=``,{implementation:b,createNodeIterator:x,createDocumentFragment:S,getElementsByTagName:C}=n,{importNode:ne}=r,w=qe();t.isSupported=typeof re==`function`&&typeof v==`function`&&b&&b.createHTMLDocument!==void 0;let{MUSTACHE_EXPR:ie,ERB_EXPR:ae,TMPLIT_EXPR:oe,DATA_ATTR:se,ARIA_ATTR:E,IS_SCRIPT_OR_DATA:le,ATTR_WHITESPACE:ue,CUSTOM_ELEMENT:k}=Ue,{IS_ALLOWED_URI:Ce}=Ue,j=null,Ie=A({},[...Te,...Ee,...De,...ke,...je]),N=null,Le=A({},[...Me,...Ne,...Pe,...Fe]),P=Object.seal(ce(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Re=null,Be=null,F=Object.seal(ce(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),He=!0,Ye=!0,Xe=!1,I=!0,L=!1,Ze=!0,R=!1,z=!1,B=!1,V=!1,H=!1,Qe=!1,$e=!0,et=!1,tt=!0,U=!1,nt={},W=null,rt=A({},[`annotation-xml`,`audio`,`colgroup`,`desc`,`foreignobject`,`head`,`iframe`,`math`,`mi`,`mn`,`mo`,`ms`,`mtext`,`noembed`,`noframes`,`noscript`,`plaintext`,`script`,`style`,`svg`,`template`,`thead`,`title`,`video`,`xmp`]),it=null,G=A({},[`audio`,`video`,`img`,`source`,`image`,`track`]),at=null,K=A({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),ot=`http://www.w3.org/1998/Math/MathML`,st=`http://www.w3.org/2000/svg`,q=`http://www.w3.org/1999/xhtml`,ct=q,lt=!1,J=null,ut=A({},[ot,st,q],_e),Y=A({},[`mi`,`mo`,`mn`,`ms`,`mtext`]),dt=A({},[`annotation-xml`]),ft=A({},[`title`,`style`,`font`,`a`,`script`]),X=null,pt=[`application/xhtml+xml`,`text/html`],Z=null,mt=null,ht=n.createElement(`form`),gt=function(e){return e instanceof RegExp||e instanceof Function},_t=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!(mt&&mt===e)){if((!e||typeof e!=`object`)&&(e={}),e=M(e),X=pt.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,Z=X===`application/xhtml+xml`?_e:ge,j=D(e,`ALLOWED_TAGS`)?A({},e.ALLOWED_TAGS,Z):Ie,N=D(e,`ALLOWED_ATTR`)?A({},e.ALLOWED_ATTR,Z):Le,J=D(e,`ALLOWED_NAMESPACES`)?A({},e.ALLOWED_NAMESPACES,_e):ut,at=D(e,`ADD_URI_SAFE_ATTR`)?A(M(K),e.ADD_URI_SAFE_ATTR,Z):K,it=D(e,`ADD_DATA_URI_TAGS`)?A(M(G),e.ADD_DATA_URI_TAGS,Z):G,W=D(e,`FORBID_CONTENTS`)?A({},e.FORBID_CONTENTS,Z):rt,Re=D(e,`FORBID_TAGS`)?A({},e.FORBID_TAGS,Z):M({}),Be=D(e,`FORBID_ATTR`)?A({},e.FORBID_ATTR,Z):M({}),nt=D(e,`USE_PROFILES`)?e.USE_PROFILES:!1,He=e.ALLOW_ARIA_ATTR!==!1,Ye=e.ALLOW_DATA_ATTR!==!1,Xe=e.ALLOW_UNKNOWN_PROTOCOLS||!1,I=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,L=e.SAFE_FOR_TEMPLATES||!1,Ze=e.SAFE_FOR_XML!==!1,R=e.WHOLE_DOCUMENT||!1,V=e.RETURN_DOM||!1,H=e.RETURN_DOM_FRAGMENT||!1,Qe=e.RETURN_TRUSTED_TYPE||!1,B=e.FORCE_BODY||!1,$e=e.SANITIZE_DOM!==!1,et=e.SANITIZE_NAMED_PROPS||!1,tt=e.KEEP_CONTENT!==!1,U=e.IN_PLACE||!1,Ce=e.ALLOWED_URI_REGEXP||ze,ct=e.NAMESPACE||q,Y=e.MATHML_TEXT_INTEGRATION_POINTS||Y,dt=e.HTML_INTEGRATION_POINTS||dt,P=e.CUSTOM_ELEMENT_HANDLING||{},e.CUSTOM_ELEMENT_HANDLING&&gt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(P.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&gt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(P.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==`boolean`&&(P.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),L&&(Ye=!1),H&&(V=!0),nt&&(j=A({},je),N=[],nt.html===!0&&(A(j,Te),A(N,Me)),nt.svg===!0&&(A(j,Ee),A(N,Ne),A(N,Fe)),nt.svgFilters===!0&&(A(j,De),A(N,Ne),A(N,Fe)),nt.mathMl===!0&&(A(j,ke),A(N,Pe),A(N,Fe))),e.ADD_TAGS&&(typeof e.ADD_TAGS==`function`?F.tagCheck=e.ADD_TAGS:(j===Ie&&(j=M(j)),A(j,e.ADD_TAGS,Z))),e.ADD_ATTR&&(typeof e.ADD_ATTR==`function`?F.attributeCheck=e.ADD_ATTR:(N===Le&&(N=M(N)),A(N,e.ADD_ATTR,Z))),e.ADD_URI_SAFE_ATTR&&A(at,e.ADD_URI_SAFE_ATTR,Z),e.FORBID_CONTENTS&&(W===rt&&(W=M(W)),A(W,e.FORBID_CONTENTS,Z)),tt&&(j[`#text`]=!0),R&&A(j,[`html`,`head`,`body`]),j.table&&(A(j,[`tbody`]),delete Re.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Se(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Se(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);y=e.TRUSTED_TYPES_POLICY,te=y.createHTML(``)}else y===void 0&&(y=Ke(p,i)),y!==null&&typeof te==`string`&&(te=y.createHTML(``));T&&T(e),mt=e}},vt=A({},[...Ee,...De,...Oe]),yt=A({},[...ke,...Ae]),bt=function(e){let t=v(e);(!t||!t.tagName)&&(t={namespaceURI:ct,tagName:`template`});let n=ge(e.tagName),r=ge(t.tagName);return J[e.namespaceURI]?e.namespaceURI===st?t.namespaceURI===q?n===`svg`:t.namespaceURI===ot?n===`svg`&&(r===`annotation-xml`||Y[r]):!!vt[n]:e.namespaceURI===ot?t.namespaceURI===q?n===`math`:t.namespaceURI===st?n===`math`&&dt[r]:!!yt[n]:e.namespaceURI===q?t.namespaceURI===st&&!dt[r]||t.namespaceURI===ot&&!Y[r]?!1:!yt[n]&&(ft[n]||!vt[n]):!!(X===`application/xhtml+xml`&&J[e.namespaceURI]):!1},xt=function(e){me(t.removed,{element:e});try{v(e).removeChild(e)}catch{g(e)}},Q=function(e,n){try{me(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{me(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(V||H)try{xt(n)}catch{}else try{n.setAttribute(e,``)}catch{}},St=function(e){let t=null,r=null;if(B)e=`<remove></remove>`+e;else{let t=ve(e,/^[\r\n\t ]+/);r=t&&t[0]}X===`application/xhtml+xml`&&ct===q&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=y?y.createHTML(e):e;if(ct===q)try{t=new f().parseFromString(i,X)}catch{}if(!t||!t.documentElement){t=b.createDocument(ct,`template`,null);try{t.documentElement.innerHTML=lt?te:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),ct===q?C.call(t,R?`html`:`body`)[0]:R?t.documentElement:a},Ct=function(e){return x.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},wt=function(e){return e instanceof d&&(typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||!(e.attributes instanceof u)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`)},Tt=function(e){return typeof s==`function`&&e instanceof s};function $(e,n,r){de(e,e=>{e.call(t,n,r,mt)})}let Et=function(e){let n=null;if($(w.beforeSanitizeElements,e,null),wt(e))return xt(e),!0;let r=Z(e.nodeName);if($(w.uponSanitizeElement,e,{tagName:r,allowedTags:j}),Ze&&e.hasChildNodes()&&!Tt(e.firstElementChild)&&O(/<[/\w!]/g,e.innerHTML)&&O(/<[/\w!]/g,e.textContent)||e.nodeType===We.progressingInstruction||Ze&&e.nodeType===We.comment&&O(/<[/\w]/g,e.data))return xt(e),!0;if(!(F.tagCheck instanceof Function&&F.tagCheck(r))&&(!j[r]||Re[r])){if(!Re[r]&&Ot(r)&&(P.tagNameCheck instanceof RegExp&&O(P.tagNameCheck,r)||P.tagNameCheck instanceof Function&&P.tagNameCheck(r)))return!1;if(tt&&!W[r]){let t=v(e)||e.parentNode,n=ee(e)||e.childNodes;if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=h(n[i],!0);r.__removalCount=(e.__removalCount||0)+1,t.insertBefore(r,_(e))}}}return xt(e),!0}return e instanceof c&&!bt(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&O(/<\/no(script|embed|frames)/i,e.innerHTML)?(xt(e),!0):(L&&e.nodeType===We.text&&(n=e.textContent,de([ie,ae,oe],e=>{n=ye(n,e,` `)}),e.textContent!==n&&(me(t.removed,{element:e.cloneNode()}),e.textContent=n)),$(w.afterSanitizeElements,e,null),!1)},Dt=function(e,t,r){if($e&&(t===`id`||t===`name`)&&(r in n||r in ht))return!1;if(!(Ye&&!Be[t]&&O(se,t))&&!(He&&O(E,t))&&!(F.attributeCheck instanceof Function&&F.attributeCheck(t,e))){if(!N[t]||Be[t]){if(!(Ot(e)&&(P.tagNameCheck instanceof RegExp&&O(P.tagNameCheck,e)||P.tagNameCheck instanceof Function&&P.tagNameCheck(e))&&(P.attributeNameCheck instanceof RegExp&&O(P.attributeNameCheck,t)||P.attributeNameCheck instanceof Function&&P.attributeNameCheck(t,e))||t===`is`&&P.allowCustomizedBuiltInElements&&(P.tagNameCheck instanceof RegExp&&O(P.tagNameCheck,r)||P.tagNameCheck instanceof Function&&P.tagNameCheck(r))))return!1}else if(!at[t]&&!O(Ce,ye(r,ue,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&be(r,`data:`)===0&&it[e])&&!(Xe&&!O(le,ye(r,ue,``)))&&r)return!1}return!0},Ot=function(e){return e!==`annotation-xml`&&ve(e,k)},kt=function(e){$(w.beforeSanitizeAttributes,e,null);let{attributes:n}=e;if(!n||wt(e))return;let r={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:N,forceKeepAttr:void 0},i=n.length;for(;i--;){let{name:a,namespaceURI:o,value:s}=n[i],c=Z(a),l=s,u=a===`value`?l:xe(l);if(r.attrName=c,r.attrValue=u,r.keepAttr=!0,r.forceKeepAttr=void 0,$(w.uponSanitizeAttribute,e,r),u=r.attrValue,et&&(c===`id`||c===`name`)&&(Q(a,e),u=`user-content-`+u),Ze&&O(/((--!?|])>)|<\/(style|title|textarea)/i,u)){Q(a,e);continue}if(c===`attributename`&&ve(u,`href`)){Q(a,e);continue}if(r.forceKeepAttr)continue;if(!r.keepAttr){Q(a,e);continue}if(!I&&O(/\/>/i,u)){Q(a,e);continue}L&&de([ie,ae,oe],e=>{u=ye(u,e,` `)});let d=Z(e.nodeName);if(!Dt(d,c,u)){Q(a,e);continue}if(y&&typeof p==`object`&&typeof p.getAttributeType==`function`&&!o)switch(p.getAttributeType(d,c)){case`TrustedHTML`:u=y.createHTML(u);break;case`TrustedScriptURL`:u=y.createScriptURL(u);break}if(u!==l)try{o?e.setAttributeNS(o,a,u):e.setAttribute(a,u),wt(e)?xt(e):pe(t.removed)}catch{Q(a,e)}}$(w.afterSanitizeAttributes,e,null)},At=function e(t){let n=null,r=Ct(t);for($(w.beforeSanitizeShadowDOM,t,null);n=r.nextNode();)$(w.uponSanitizeShadowNode,n,null),Et(n),kt(n),n.content instanceof a&&e(n.content);$(w.afterSanitizeShadowDOM,t,null)};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,o=null,c=null,l=null;if(lt=!e,lt&&(e=`<!-->`),typeof e!=`string`&&!Tt(e))if(typeof e.toString==`function`){if(e=e.toString(),typeof e!=`string`)throw Se(`dirty is not a string, aborting`)}else throw Se(`toString is not a function`);if(!t.isSupported)return e;if(z||_t(n),t.removed=[],typeof e==`string`&&(U=!1),U){if(e.nodeName){let t=Z(e.nodeName);if(!j[t]||Re[t])throw Se(`root node is forbidden and cannot be sanitized in-place`)}}else if(e instanceof s)i=St(`<!---->`),o=i.ownerDocument.importNode(e,!0),o.nodeType===We.element&&o.nodeName===`BODY`||o.nodeName===`HTML`?i=o:i.appendChild(o);else{if(!V&&!L&&!R&&e.indexOf(`<`)===-1)return y&&Qe?y.createHTML(e):e;if(i=St(e),!i)return V?null:Qe?te:``}i&&B&&xt(i.firstChild);let u=Ct(U?e:i);for(;c=u.nextNode();)Et(c),kt(c),c.content instanceof a&&At(c.content);if(U)return e;if(V){if(H)for(l=S.call(i.ownerDocument);i.firstChild;)l.appendChild(i.firstChild);else l=i;return(N.shadowroot||N.shadowrootmode)&&(l=ne.call(r,l,!0)),l}let d=R?i.outerHTML:i.innerHTML;return R&&j[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&O(Ve,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
11
- `+d),L&&de([ie,ae,oe],e=>{d=ye(d,e,` `)}),y&&Qe?y.createHTML(d):d},t.setConfig=function(){_t(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),z=!0},t.clearConfig=function(){mt=null,z=!1},t.isValidAttribute=function(e,t,n){return mt||_t({}),Dt(Z(e),Z(t),n)},t.addHook=function(e,t){typeof t==`function`&&me(w[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=fe(w[e],t);return n===-1?void 0:he(w[e],n,1)[0]}return pe(w[e])},t.removeHooks=function(e){w[e]=[]},t.removeAllHooks=function(){w=qe()},t}var Ye=Je(),Xe={sanitize:e=>Ye.sanitize(e)},I=(e,...t)=>new w(e.reduce((e,n,r)=>{let i=t[r]??``;return typeof i==`string`?[...e,n,Xe.sanitize(i)]:i===!1?[...e,n]:Array.isArray(i)?[...e,n,...i]:[...e,n,i]},[]));function L(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var Ze=`:host{--host-display:flex;--host-heading-border:var(--scorad-heading-border,solid 1px currentColor);--host-score-color:var(--scorad-score-color,var(--color));--host-score-background:var(--scorad-score-background,var(--background-color));--host-score-border:var(--scorad-score-border,solid 2px currentColor);gap:var(--host-spacing-unit);flex-wrap:wrap;width:fit-content}scorad-weightings{margin-bottom:var(--host-spacing-unit);align-self:center}section{flex-direction:column;flex:auto;display:flex}h3{border:var(--host-heading-border);width:1.5em;height:1.5em;padding:var(--host-padding-unit);margin:var(--host-spacing-unit);border-radius:50%;justify-content:center;align-items:center;display:inline-flex}scorad-label{flex:100%;font-size:1.2rem}scorad-label>span{padding:var(--host-padding-unit);outline:var(--host-score-border);border-radius:var(--host-border-radius);color:var(--host-score-color);background:var(--host-score-background)}`,R=`*{box-sizing:border-box}:host{--host-spacing-unit:var(--scorad-spacing-unit,.25rem);--host-padding-unit:var(--scorad-padding-unit,.333rem);--host-border-radius:var(--scorad-border-radius,3px);--host-border-radius-outer:var(--scorad-border-radius-outer,calc(var(--host-border-radius) + var(--host-padding-unit)));display:var(--host-display,inline-flex)}`;let z={headNeck:-1,anteriorTrunk:-1,posteriorTrunk:-1,upperLimbs:-1,lowerLimbs:-1,genitals:-1},B={erythema:-1,oedemaPapulation:-1,oozingCrusting:-1,excoriations:-1,lichenification:-1,xerosis:-1},V={pruritus:-1,sleeplessness:-1},H={child:!1,extent:z,intensity:B,subjective:V},Qe={headNeck:.09,anteriorTrunk:.18,posteriorTrunk:.18,upperLimbs:.18,lowerLimbs:.36,genitals:.01},$e={headNeck:.18,anteriorTrunk:.18,posteriorTrunk:.18,upperLimbs:.18,lowerLimbs:.28,genitals:0};var et=`:host{--host-display:inline-flex;--host-font-size:1rem;justify-content:center;align-items:center;gap:var(--host-spacing-unit);flex-wrap:wrap;position:relative}label{padding:var(--host-padding-unit)}svg{width:calc(50% - var(--host-spacing-unit));padding:var(--host-spacing-unit)0;fill:#0000;stroke:currentColor;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;flex:auto;overflow:visible}path,line{vector-effect:non-scaling-stroke}path{opacity:.333}text,line{opacity:.667}g{outline:none}g[tabindex] path{opacity:1;fill:hsla(var(--scorad-h,0),var(--extent,"0%"),50%,var(--opacity,0))}:is(:not(:has(:active)) g[tabindex]:hover path,:not(:has(:active)) g[tabindex]:hover line){stroke-width:2px;stroke:var(--primary-color);stroke-dasharray:2 3.5;opacity:1}g[tabindex]:focus path,g[tabindex]:active path,g[tabindex].selected path,g[tabindex]:focus line,g[tabindex]:active line,g[tabindex].selected line{stroke-width:2px;stroke:var(--primary-color);opacity:1;stroke-dasharray:none!important}g[tabindex] text{fill:currentColor;stroke:none;font-size:var(--host-font-size);text-anchor:end}:is(:not(:has(:active)) g[tabindex]:hover text,g[tabindex]:focus text,g[tabindex]:active text,g[tabindex].selected text){fill:var(--primary-color);opacity:1}`,tt=`scorad-extent`,U=class extends S{connectedCallback(){this.render()}child=!1;value=z;score;afterRender(){if(!this.value){this.value=z;return}if(this.shadowRoot)for(let e of u(z)){let t=(this.value??{})[e],n=this.shadowRoot.querySelector(`.${g(e)}`);if(!n)return;n.style.setProperty(`--extent`,`${t}%`),n.style.setProperty(`--opacity`,`${(t??0)/100}`);let r=n.querySelector(`text`);if(!r)return;r.textContent=t>=0?`${t}%`:`--`}}resizeCallback(){if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector(`svg`);if(!e)return;let t=Math.round(18e3/e.clientWidth)/100;this.style.setProperty(`--host-font-size`,`${t}rem`)}render(){let e=e=>{let t=t=>{let n=Math.round(Math.min(100,Math.max(0,t)));this.value={...this.value,[e]:n},this.valueInput(this.value)};return n=>{if(!n)return;`ontouchstart`in window&&n.addEventListener(`touchstart`,e=>{e.preventDefault()},{passive:!1}),n.style.touchAction=`none`,n.addEventListener(`pointerdown`,r=>{r.preventDefault(),r.stopPropagation(),n.focus();let i=this.value[e],a=r.clientY,o=e=>{e.preventDefault();let n=a-e.clientY;t(Math.round((i+n)/5)*5)},s=()=>{document.removeEventListener(`pointermove`,o),document.removeEventListener(`pointerup`,s),document.removeEventListener(`pointercancel`,s)};document.addEventListener(`pointermove`,o),document.addEventListener(`pointerup`,s),document.addEventListener(`pointercancel`,s)});let r,i;n.addEventListener(`focus`,()=>{i=`000`,r=this.value[e]}),n.addEventListener(`keydown`,n=>{let a=this.value[e],o=n.shiftKey?5:1;switch(n.key){case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:t(Number.parseInt(i.substring(1)+n.key)),i=h(this.value[e],3);break;case`ArrowLeft`:case`ArrowDown`:n.preventDefault(),t(a-o);break;case`ArrowUp`:case`ArrowRight`:n.preventDefault(),t(a+o);break;case`Escape`:n.preventDefault(),t(r);break}})}},t=e=>t=>{t&&(t.textContent=`${this.value[e]}%`)};return I`
12
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 164 240" width="200">
11
+ `+d),L&&de([ie,ae,oe],e=>{d=ye(d,e,` `)}),y&&Qe?y.createHTML(d):d},t.setConfig=function(){_t(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),z=!0},t.clearConfig=function(){mt=null,z=!1},t.isValidAttribute=function(e,t,n){return mt||_t({}),Dt(Z(e),Z(t),n)},t.addHook=function(e,t){typeof t==`function`&&me(w[e],t)},t.removeHook=function(e,t){if(t!==void 0){let n=fe(w[e],t);return n===-1?void 0:he(w[e],n,1)[0]}return pe(w[e])},t.removeHooks=function(e){w[e]=[]},t.removeAllHooks=function(){w=qe()},t}var Ye=Je(),Xe={sanitize:e=>Ye.sanitize(e)},I=(e,...t)=>new w(e.reduce((e,n,r)=>{let i=t[r]??``;return typeof i==`string`?[...e,n,Xe.sanitize(i)]:i===!1?[...e,n]:Array.isArray(i)?[...e,n,...i]:[...e,n,i]},[]));function L(e,t,n,r){var i=arguments.length,a=i<3?t:r===null?r=Object.getOwnPropertyDescriptor(t,n):r,o;if(typeof Reflect==`object`&&typeof Reflect.decorate==`function`)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}var Ze=`:host{--host-display:flex;--host-heading-border:var(--scorad-heading-border,solid 1px var(--host-color));--host-score-color:var(--scorad-score-color,var(--host-color));--host-score-background:var(--scorad-score-background,var(--host-background-color));--host-score-border:var(--scorad-score-border,solid 2px var(--host-color));gap:var(--host-spacing-unit);flex-wrap:wrap;width:fit-content}scorad-weightings{margin-bottom:var(--host-spacing-unit);align-self:center}section{flex-direction:column;flex:auto;display:flex}h3{border:var(--host-heading-border);width:1.5em;height:1.5em;padding:var(--host-padding-unit);margin:var(--host-spacing-unit);border-radius:50%;justify-content:center;align-items:center;display:inline-flex}scorad-label{flex:100%;font-size:1.2rem}scorad-label>span{padding:var(--host-padding-unit);outline:var(--host-score-border);border-radius:var(--host-border-radius);color:var(--host-score-color);background:var(--host-score-background)}`,R=`*{box-sizing:border-box}:host{--host-color:var(--color,#444);--host-background-color:var(--background-color,#eee);--host-primary-color:var(--primary-color,var(--host-color));--host-spacing-unit:var(--scorad-spacing-unit,.25rem);--host-padding-unit:var(--scorad-padding-unit,.333rem);--host-border-radius:var(--scorad-border-radius,3px);--host-border-radius-outer:var(--scorad-border-radius-outer,calc(var(--host-border-radius) + var(--host-padding-unit)));display:var(--host-display,inline-flex)}`;let z={headNeck:-1,anteriorTrunk:-1,posteriorTrunk:-1,upperLimbs:-1,lowerLimbs:-1,genitals:-1},B={erythema:-1,oedemaPapulation:-1,oozingCrusting:-1,excoriations:-1,lichenification:-1,xerosis:-1},V={pruritus:-1,sleeplessness:-1},H={child:!1,extent:z,intensity:B,subjective:V},Qe={headNeck:.09,anteriorTrunk:.18,posteriorTrunk:.18,upperLimbs:.18,lowerLimbs:.36,genitals:.01},$e={headNeck:.18,anteriorTrunk:.18,posteriorTrunk:.18,upperLimbs:.18,lowerLimbs:.28,genitals:0};var et=`:host{--host-display:inline-flex;--host-font-size:1rem;flex-wrap:wrap;justify-content:center;align-items:center;position:relative}label{padding:var(--host-padding-unit)}svg{width:140px;padding:var(--host-spacing-unit)0;fill:#0000;stroke:var(--host-color);stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;flex:auto;overflow:visible}path,line{vector-effect:non-scaling-stroke}path{opacity:.333}text,line{opacity:.667}g{outline:none}g[tabindex] path{opacity:1;fill:hsla(var(--scorad-h,0),var(--extent,"0%"),50%,var(--opacity,0))}:is(:not(:has(:active)) g[tabindex]:hover path,:not(:has(:active)) g[tabindex]:hover line){stroke-width:2px;stroke:var(--host-primary-color);stroke-dasharray:2 3.5;opacity:1}g[tabindex]:focus path,g[tabindex]:active path,g[tabindex].selected path,g[tabindex]:focus line,g[tabindex]:active line,g[tabindex].selected line{stroke-width:2px;stroke:var(--host-primary-color);opacity:1;stroke-dasharray:none!important}g[tabindex] text{fill:var(--host-color);stroke:none;font-size:var(--host-font-size);text-anchor:end}:is(:not(:has(:active)) g[tabindex]:hover text,g[tabindex]:focus text,g[tabindex]:active text,g[tabindex].selected text){fill:var(--host-primary-color);opacity:1}`,tt=`scorad-extent`,U=class extends S{connectedCallback(){this.render()}child=!1;value=z;score;afterRender(){if(!this.value){this.value=z;return}if(this.shadowRoot)for(let e of u(z)){let t=(this.value??{})[e],n=this.shadowRoot.querySelector(`.${g(e)}`);if(!n)return;n.style.setProperty(`--extent`,`${t}%`),n.style.setProperty(`--opacity`,`${(t??0)/100}`);let r=n.querySelector(`text`);if(!r)return;r.textContent=t>=0?`${t}%`:`--`}}resizeCallback(){if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector(`svg`);if(!e)return;let t=Math.round(18e3/e.clientWidth)/100;this.style.setProperty(`--host-font-size`,`${t}rem`)}render(){let e=e=>{let t=t=>{let n=Math.round(Math.min(100,Math.max(0,t)));this.value={...this.value,[e]:n},this.valueInput(this.value)};return n=>{if(!n)return;`ontouchstart`in window&&n.addEventListener(`touchstart`,e=>{e.preventDefault()},{passive:!1}),n.style.touchAction=`none`,n.addEventListener(`pointerdown`,r=>{r.preventDefault(),r.stopPropagation(),n.focus();let i=this.value[e],a=r.clientY,o=e=>{e.preventDefault();let n=a-e.clientY;t(Math.round((i+n)/5)*5)},s=()=>{document.removeEventListener(`pointermove`,o),document.removeEventListener(`pointerup`,s),document.removeEventListener(`pointercancel`,s)};document.addEventListener(`pointermove`,o),document.addEventListener(`pointerup`,s),document.addEventListener(`pointercancel`,s)});let r,i;n.addEventListener(`focus`,()=>{i=`000`,r=this.value[e]}),n.addEventListener(`keydown`,n=>{let a=this.value[e],o=n.shiftKey?5:1;switch(n.key){case`0`:case`1`:case`2`:case`3`:case`4`:case`5`:case`6`:case`7`:case`8`:case`9`:t(Number.parseInt(i.substring(1)+n.key)),i=h(this.value[e],3);break;case`ArrowLeft`:case`ArrowDown`:n.preventDefault(),t(a-o);break;case`ArrowUp`:case`ArrowRight`:n.preventDefault(),t(a+o);break;case`Escape`:n.preventDefault(),t(r);break}})}},t=e=>t=>{t&&(t.textContent=`${this.value[e]}%`)};return I`
12
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 164 240">
13
13
  <g ${e(`headNeck`)}
14
14
  class="head-neck" tabindex="0">
15
15
  <text x="40" y="20" ${t(`headNeck`)}>--</text>
@@ -54,7 +54,7 @@
54
54
  <path d="M120,139 100,154 100,230 A1,1 0,0,0 120,230Z"></path>
55
55
  </g>
56
56
  </svg>
57
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 164 240" width="200">
57
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 164 240">
58
58
  <g class="head-neck">
59
59
  <path d="M100,45 100,49 Q95,48 90,49 L90,45 A20,22.5 1,1,1 100,45Z"></path>
60
60
  </g>
@@ -73,7 +73,7 @@
73
73
  <path d="M120,142 Q110,155 100,151 L100,230 A1,1 0,0,0 120,230Z"></path>
74
74
  </g>
75
75
  </svg>
76
- `}valueInput;valueChange};L([_(v)],U.prototype,`child`,void 0),L([C(`value`)],U.prototype,`afterRender`,null),L([C(`child`)],U.prototype,`render`,null),L([x()],U.prototype,`valueInput`,void 0),L([x()],U.prototype,`valueChange`,void 0),U=L([b({tag:tt,css:[R,et],delegatesFocus:!0})],U);var nt=`:host{--host-display:inline-flex;flex-direction:column;position:relative}scorad-options{margin-left:auto}`;let W={child:{text:`child`,description:`use weightings for a child`},extent:{headNeck:{text:`Head/Neck`,description:`percentage of the head and neck area affected`},anteriorTrunk:{text:`Anterior Trunk`,description:`percentage of the front torso area affected`},posteriorTrunk:{text:`Posterior Trunk`,description:`percentage of the back torso area affected`},genitals:{text:`Genitals`,description:`percentage of the genital area affected`},upperLimbs:{text:`Upper Limbs`,description:`percentage of the arms and shoulders affected`},lowerLimbs:{text:`Lower Limbs`,description:`percentage of the legs and hips affected`}},intensity:{erythema:{text:`Erythema`,description:`redness of the skin`},oedemaPapulation:{text:`Oedema/Papulation`,description:`swelling and small, raised bumps`},oozingCrusting:{text:`Oozing/Crusting`,description:`fluid leakage and dried scabs`},excoriations:{text:`Excoriations`,description:`scratch marks`},lichenification:{text:`Lichenification`,description:`skin thickening and hardening`},xerosis:{text:`Xerosis`,description:`dryness of the skin`}},subjective:{pruritus:{text:`Pruritus`,description:`itching`},sleeplessness:{text:`Sleeplessness`,description:`difficulty sleeping`}}};var rt=`:host{--host-display:inline-flex;--host-option-width:var(--scorad-option-width,1.5em);--host-option-height:var(--scorad-option-height,1.5em);--host-option-border:var(--scorad-option-border,solid 1px var(--color));--host-option-border-selected:var(--scorad-option-border-selected,solid 2px var(--color));--host-option-color:var(--scorad-option-color,var(--color));--host-option-background:var(--scorad-option-background,transparent);--host-option-color-selected:var(--scorad-option-color-selected,var(--background-color));--host-option-background-selected:var(--scorad-option-background-selected,var(--color));gap:var(--host-spacing-unit);padding:calc(1.5*var(--host-padding-unit))0;outline:none;width:max-content;position:relative}span{height:var(--host-option-height);width:var(--host-option-width);outline:var(--host-option-border);border-radius:var(--host-border-radius);padding:calc(.5*var(--host-padding-unit))var(--host-padding-unit);color:var(--host-option-color);background:var(--host-option-background);cursor:pointer;touch-action:none}span:before{content:"​";touch-action:none;pointer-events:none}span[aria-selected=true]{outline:var(--host-option-border-selected);color:var(--host-option-color-selected);background:var(--host-option-background-selected)}`,it=`scorad-options`,G=class extends S{connectedCallback(){this.render(),this.addEventListener(`focusin`,this._handleFocusIn,{once:!0}),this.addEventListener(`pointerdown`,this._handleDown)}disconnectedCallback(){this.addEventListener(`pointerdown`,this._handleDown)}_handleFocusIn=()=>{this.readonly||(this.committedValue=this.value,this.addEventListener(`focusout`,this._handleFocusOut,{once:!0}),this.addEventListener(`keydown`,this._handleKeydown))};_handleFocusOut=()=>{this.removeEventListener(`keydown`,this._handleKeydown),this.addEventListener(`focusin`,this._handleFocusIn,{once:!0}),this.setValue(this.value),this.value!==this.committedValue&&this.valueChange(this.value)};_handleDown=e=>{this.readonly||(e.stopPropagation(),e.preventDefault(),this.focus(),this._handleMove(e),document.addEventListener(`pointerup`,this._handleUp),document.addEventListener(`pointermove`,this._handleMove))};_handleUp=e=>{e.stopPropagation(),document.removeEventListener(`pointerup`,this._handleUp),document.removeEventListener(`pointermove`,this._handleMove)};_handleMove=e=>{let t=e.composedPath()[0];if(!(t instanceof HTMLSpanElement))return;let n=Number.parseInt(t.dataset.value);this.setValue(n)};_handleKeydown=e=>{let t=this.value??0;switch(e.key){case`ArrowLeft`:case`ArrowDown`:e.preventDefault(),this.setValue(t-1);break;case`ArrowUp`:case`ArrowRight`:e.preventDefault(),this.setValue(t+1);break;case`Escape`:e.preventDefault(),this.setValue(this.committedValue);break}};min=0;max=5;showHue=!1;committedValue=0;value=0;setValue=e=>{this.value=Math.max(this.min,Math.min(this.max,e)),this.valueInput(this.value)};readonly=!1;text=[];render(){return I`
76
+ `}valueInput;valueChange};L([_(v)],U.prototype,`child`,void 0),L([C(`value`)],U.prototype,`afterRender`,null),L([C(`child`)],U.prototype,`render`,null),L([x()],U.prototype,`valueInput`,void 0),L([x()],U.prototype,`valueChange`,void 0),U=L([b({tag:tt,css:[R,et],delegatesFocus:!0})],U);var nt=`:host{--host-display:inline-flex;flex-direction:column;position:relative}scorad-options{margin-left:auto}`;let W={child:{text:`child`,description:`use weightings for a child`},extent:{headNeck:{text:`Head/Neck`,description:`percentage of the head and neck area affected`},anteriorTrunk:{text:`Anterior Trunk`,description:`percentage of the front torso area affected`},posteriorTrunk:{text:`Posterior Trunk`,description:`percentage of the back torso area affected`},genitals:{text:`Genitals`,description:`percentage of the genital area affected`},upperLimbs:{text:`Upper Limbs`,description:`percentage of the arms and shoulders affected`},lowerLimbs:{text:`Lower Limbs`,description:`percentage of the legs and hips affected`}},intensity:{erythema:{text:`Erythema`,description:`redness of the skin`},oedemaPapulation:{text:`Oedema/Papulation`,description:`swelling and small, raised bumps`},oozingCrusting:{text:`Oozing/Crusting`,description:`fluid leakage and dried scabs`},excoriations:{text:`Excoriations`,description:`scratch marks`},lichenification:{text:`Lichenification`,description:`skin thickening and hardening`},xerosis:{text:`Xerosis`,description:`dryness of the skin`}},subjective:{pruritus:{text:`Pruritus`,description:`itching`},sleeplessness:{text:`Sleeplessness`,description:`difficulty sleeping`}}};var rt=`:host{--host-display:inline-flex;--host-option-width:var(--scorad-option-width,1.5em);--host-option-height:var(--scorad-option-height,1.5em);--host-option-border:var(--scorad-option-border,solid 1px var(--host-color));--host-option-border-selected:var(--scorad-option-border-selected,solid 2px var(--host-color));--host-option-color:var(--scorad-option-color,var(--host-color));--host-option-background:var(--scorad-option-background,transparent);--host-option-color-selected:var(--scorad-option-color-selected,var(--host-background-color));--host-option-background-selected:var(--scorad-option-background-selected,var(--host-color));gap:var(--host-spacing-unit);padding:calc(1.5*var(--host-padding-unit))0;outline:none;width:max-content;position:relative}span{height:var(--host-option-height);width:var(--host-option-width);outline:var(--host-option-border);border-radius:var(--host-border-radius);padding:calc(.5*var(--host-padding-unit))var(--host-padding-unit);color:var(--host-option-color);background:var(--host-option-background);cursor:pointer;touch-action:none}span:before{content:"​";touch-action:none;pointer-events:none}span[aria-selected=true]{outline:var(--host-option-border-selected);color:var(--host-option-color-selected);background:var(--host-option-background-selected)}`,it=`scorad-options`,G=class extends S{connectedCallback(){this.render(),this.addEventListener(`focusin`,this._handleFocusIn,{once:!0}),this.addEventListener(`pointerdown`,this._handleDown)}disconnectedCallback(){this.addEventListener(`pointerdown`,this._handleDown)}_handleFocusIn=()=>{this.readonly||(this.committedValue=this.value,this.addEventListener(`focusout`,this._handleFocusOut,{once:!0}),this.addEventListener(`keydown`,this._handleKeydown))};_handleFocusOut=()=>{this.removeEventListener(`keydown`,this._handleKeydown),this.addEventListener(`focusin`,this._handleFocusIn,{once:!0}),this.setValue(this.value),this.value!==this.committedValue&&this.valueChange(this.value)};_handleDown=e=>{this.readonly||(e.stopPropagation(),e.preventDefault(),this.focus(),this._handleMove(e),document.addEventListener(`pointerup`,this._handleUp),document.addEventListener(`pointermove`,this._handleMove))};_handleUp=e=>{e.stopPropagation(),document.removeEventListener(`pointerup`,this._handleUp),document.removeEventListener(`pointermove`,this._handleMove)};_handleMove=e=>{let t=e.composedPath()[0];if(!(t instanceof HTMLSpanElement))return;let n=Number.parseInt(t.dataset.value);this.setValue(n)};_handleKeydown=e=>{let t=this.value??0;switch(e.key){case`ArrowLeft`:case`ArrowDown`:e.preventDefault(),this.setValue(t-1);break;case`ArrowUp`:case`ArrowRight`:e.preventDefault(),this.setValue(t+1);break;case`Escape`:e.preventDefault(),this.setValue(this.committedValue);break}};min=0;max=5;showHue=!1;committedValue=0;value=0;setValue=e=>{this.value=Math.max(this.min,Math.min(this.max,e)),this.valueInput(this.value)};readonly=!1;text=[];render(){return I`
77
77
  ${Array.from({length:this.max-this.min+1},(e,t)=>this.min+t).map(e=>I`
78
78
  <span data-value="${e}">${this.text[e]}</span>
79
79
  `)}
@@ -96,7 +96,7 @@
96
96
  <scorad-options ${t}
97
97
  min="0" max="10" show-hue tabindex="0"></scorad-options>
98
98
  </scorad-label>
99
- `}valueInput;valueChange};L([C(`value`)],q.prototype,`afterRender`,null),L([x()],q.prototype,`valueInput`,void 0),L([x()],q.prototype,`valueChange`,void 0),q=L([b({tag:st,css:[R,ot],delegatesFocus:!0})],q);var ct=`:host{--host-display:inline-flex;--host-outline-hover:var(--scorad-weightings-outline-hover,dashed 2px var(--primary-color));--host-outline-focus:var(--scorad-weightings-outline-focus,solid 2px var(--primary-color));padding:0 var(--host-padding-unit);border-radius:var(--host-border-radius);justify-content:center;align-items:baseline;position:relative}:host(:hover){outline:var(--host-outline-hover)}:host(:focus-within){outline:var(--host-outline-focus)}scorad-options{--host-option-width:auto;--host-option-height:auto}`,lt=`scorad-weightings`,J=class extends S{connectedCallback(){this.render()}value=!1;afterRender(){if(this.value==null){this.value=!1;return}if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector(`scorad-options`);e&&(e.value=this.value?1:0,e.text=[`Adult`,`Child`])}render(){return I`
99
+ `}valueInput;valueChange};L([C(`value`)],q.prototype,`afterRender`,null),L([x()],q.prototype,`valueInput`,void 0),L([x()],q.prototype,`valueChange`,void 0),q=L([b({tag:st,css:[R,ot],delegatesFocus:!0})],q);var ct=`:host{--host-display:inline-flex;--host-outline-hover:var(--scorad-weightings-outline-hover,dashed 2px var(--host-primary-color));--host-outline-focus:var(--scorad-weightings-outline-focus,solid 2px var(--host-primary-color));padding:0 var(--host-padding-unit);border-radius:var(--host-border-radius);justify-content:center;align-items:baseline;position:relative}:host(:hover){outline:var(--host-outline-hover)}:host(:focus-within){outline:var(--host-outline-focus)}scorad-options{--host-option-width:auto;--host-option-height:auto}`,lt=`scorad-weightings`,J=class extends S{connectedCallback(){this.render()}value=!1;afterRender(){if(this.value==null){this.value=!1;return}if(!this.shadowRoot)return;let e=this.shadowRoot.querySelector(`scorad-options`);e&&(e.value=this.value?1:0,e.text=[`Adult`,`Child`])}render(){return I`
100
100
  <scorad-options ${e=>{e.addEventListener(`value-input`,e=>{this.value=e.detail===1,this.valueInput(this.value)})}}
101
101
  min="0" max="1" tabindex="0"
102
102
  ></scorad-options>
@@ -123,7 +123,7 @@
123
123
  >
124
124
  <span id="score" tabindex="0"></span>
125
125
  </scorad-label>
126
- `}};L([C(`value`)],X.prototype,`afterRender`,null),X=L([b({tag:ft,css:[R,Ze],delegatesFocus:!0})],X);let pt=s(`@ntix/components-scorad`,typeof ANTIX_COMPONENTS_SCORAD_LOG_LEVEL>`u`?a.warn:ANTIX_COMPONENTS_SCORAD_LOG_LEVEL);var Z=`:host{--host-display:inline-flex;--host-options:var(--scorad-label-options,solid 1px currentColor);--host-hover:var(--scorad-label-hover,dashed 2px var(--primary-color));--host-focus:var(--scorad-label-focus,solid 2px var(--primary-color));padding:var(--host-padding-unit);border-radius:var(--host-border-radius-outer);flex-wrap:wrap;align-items:baseline;position:relative}:host(:hover){outline:var(--host-hover)}:host(:focus-within){outline:var(--host-focus)}:host>label>span{transition:all .2s ease-in-out;display:block}:host>label>small{opacity:0;height:0;transition:all .4s ease-in-out;display:block}:host(:hover)>label>span,:host(:focus-within)>label>span{transform:translateY(-.5em)}:host(:hover)>label>small,:host(:focus-within)>label>small{opacity:.667;transform:translateY(-.6em)}:host>label{padding:var(--host-padding-unit);flex:1;padding-left:0}`,mt=`scorad-label`,ht=class extends S{connectedCallback(){this.render(),this.addEventListener(`mousedown`,this._handleClick)}_handleClick=e=>{this.querySelector(i)?.focus()};text=`(label)`;description;render(){return I`
126
+ `}};L([C(`value`)],X.prototype,`afterRender`,null),X=L([b({tag:ft,css:[R,Ze],delegatesFocus:!0})],X);let pt=s(`@ntix/components-scorad`,typeof ANTIX_COMPONENTS_SCORAD_LOG_LEVEL>`u`?a.warn:ANTIX_COMPONENTS_SCORAD_LOG_LEVEL);var Z=`:host{--host-display:inline-flex;--host-options:var(--scorad-label-options,solid 1px var(--host-color));--host-hover:var(--scorad-label-hover,dashed 2px var(--host-primary-color));--host-focus:var(--scorad-label-focus,solid 2px var(--host-primary-color));padding:var(--host-padding-unit);border-radius:var(--host-border-radius-outer);flex-wrap:wrap;align-items:baseline;position:relative}:host(:hover){outline:var(--host-hover)}:host(:focus-within){outline:var(--host-focus)}:host>label>span{transition:all .2s ease-in-out;display:block}:host>label>small{opacity:0;height:0;transition:all .4s ease-in-out;display:block}:host(:hover)>label>span,:host(:focus-within)>label>span{transform:translateY(-.5em)}:host(:hover)>label>small,:host(:focus-within)>label>small{opacity:.667;transform:translateY(-.6em)}:host>label{padding:var(--host-padding-unit);flex:1;padding-left:0}`,mt=`scorad-label`,ht=class extends S{connectedCallback(){this.render(),this.addEventListener(`mousedown`,this._handleClick)}_handleClick=e=>{this.querySelector(i)?.focus()};text=`(label)`;description;render(){return I`
127
127
  <label>
128
128
  <span>${this.text}</span>
129
129
  <small>${this.description}</small>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ntix/components-scorad",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"