@oslokommune/punkt-elements 12.7.2 → 12.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +6 -0
- package/dist/pkt-alert.cjs +1 -1
- package/dist/pkt-alert.js +1 -1
- package/dist/pkt-card.cjs +1 -1
- package/dist/pkt-card.js +1 -1
- package/dist/pkt-component-template.cjs +1 -1
- package/dist/pkt-component-template.js +1 -1
- package/dist/pkt-datepicker.cjs +1 -1
- package/dist/pkt-datepicker.js +1 -1
- package/dist/pkt-input-wrapper.cjs +1 -1
- package/dist/pkt-input-wrapper.js +1 -1
- package/dist/pkt-link.cjs +1 -1
- package/dist/pkt-link.js +1 -1
- package/dist/pkt-messagebox.cjs +1 -1
- package/dist/pkt-messagebox.js +1 -1
- package/dist/pkt-tag.cjs +1 -1
- package/dist/pkt-tag.js +1 -1
- package/dist/ref-CY86ZeRJ.js +201 -0
- package/dist/ref-CkYAEPA_.cjs +13 -0
- package/package.json +4 -4
- package/dist/ref-BuQtfKiL.cjs +0 -13
- package/dist/ref-rfvuMlT1.js +0 -173
package/dist/index.d.ts
CHANGED
|
@@ -385,9 +385,15 @@ declare class PktSlotController implements ReactiveController {
|
|
|
385
385
|
host: LitElement & ReactiveControllerHost;
|
|
386
386
|
nodes: Element[];
|
|
387
387
|
slots: Ref<HTMLElement>[];
|
|
388
|
+
observer: MutationObserver;
|
|
388
389
|
constructor(host: LitElement & ReactiveControllerHost, ...slots: Ref<HTMLElement>[]);
|
|
389
390
|
hostConnected(): void;
|
|
391
|
+
hostDisconnected(): void;
|
|
390
392
|
hostUpdated(): void;
|
|
393
|
+
private updateNodes;
|
|
394
|
+
private updateSlots;
|
|
395
|
+
private handleMutations;
|
|
396
|
+
private isSlotElement;
|
|
391
397
|
private nodeFromElement;
|
|
392
398
|
}
|
|
393
399
|
|
package/dist/pkt-alert.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-BYZhBzXZ.cjs"),c=require("./ref-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-BYZhBzXZ.cjs"),c=require("./ref-CkYAEPA_.cjs"),d=require("./class-map-DjxCaVFk.cjs"),k=require("./directive-DtixNHDT.cjs");require("./index-DAWAnAW_.cjs");const u="pkt-alert",m=!0,f={onClose:{description:"React: Klikk-event for 'Lukk'-knappen"},close:{description:"Vue: Klikk-event for 'Lukk'-knappen"}},v={title:{name:"Tittel",description:"Tittelen som vises øverst i på meldingen",type:"string"},skin:{name:"Utseende",description:"Hvordan type melding er dette?",type:["info","success","warning","error"],default:"info"},date:{name:"Sist oppdatert",description:"Dato som vises nederst i på meldingen",type:"string"},ariaLive:{name:"aria-live",description:"Hvordan skal skjermleseren lese opp meldingen?",type:["off","polite","assertive"],default:"polite"},compact:{name:"Kompakt",description:"Gjør meldingen mindre",type:"boolean",default:!1},closeAlert:{name:"Vis 'Lukk'-knapp",description:"Viser 'Lukk'-knappen",type:"boolean",default:!1}},h={default:{description:"Innholdet i meldingen"}},l={name:u,"css-class":"pkt-alert","dark-mode":!0,isElement:m,events:f,props:v,slots:h};var y=Object.defineProperty,_=Object.getOwnPropertyDescriptor,s=(n,e,o,r)=>{for(var i=r>1?void 0:r?_(e,o):e,a=n.length-1,p;a>=0;a--)(p=n[a])&&(i=(r?p(e,o,i):p(i))||i);return r&&i&&y(e,o,i),i};exports.PktAlert=class extends t.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.compact=l.props.compact.default,this.title="",this.skin=l.props.skin.default,this.ariaLive=l.props.ariaLive.default,this.closeAlert=l.props.closeAlert.default,this.date=null,this._isClosed=!1,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:e},bubbles:!0,composed:!0}))},this.slotController=new c.PktSlotController(this,this.defaultSlot),this._isClosed=!1}render(){const e={"pkt-alert":!0,"pkt-alert--compact":this.compact,[`pkt-alert--${this.skin}`]:this.skin,"pkt-hide":this._isClosed};return t.x`
|
|
2
2
|
<div class=${d.e(e)} aria-live=${this.ariaLive}>
|
|
3
3
|
<pkt-icon
|
|
4
4
|
class="pkt-alert__icon"
|
package/dist/pkt-alert.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as m, P as u, x as n, E as k, n as o } from "./index-CF6_-ZoF.js";
|
|
2
|
-
import { e as f, P as h, n as v } from "./ref-
|
|
2
|
+
import { e as f, P as h, n as v } from "./ref-CY86ZeRJ.js";
|
|
3
3
|
import { e as y } from "./class-map-luGhSuLj.js";
|
|
4
4
|
import { t as _ } from "./directive-Cxhakbpr.js";
|
|
5
5
|
import "./index-B-KXmo65.js";
|
package/dist/pkt-card.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-BYZhBzXZ.cjs"),d=require("./ref-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-BYZhBzXZ.cjs"),d=require("./ref-CkYAEPA_.cjs"),c=require("./class-map-DjxCaVFk.cjs"),g=require("./directive-DtixNHDT.cjs");require("./index-DAWAnAW_.cjs");require("./pkt-tag.cjs");const k="pkt-card",u=!0,h={heading:{type:"string",name:"Heading",description:"Tittel på kortet"},subheading:{type:"string",name:"Subheading",description:"Undertittel på kortet"},tags:{type:"IPktTag[]",description:"Liste av tags på kortet. Tar inn en array med IPktTag-objekter med følgende stringproperties: skin, iconName, ariaLabel, text",name:"Tags",items:{type:"object",properties:{skin:{type:["blue","green","red","yellow"],description:"Farge på tag"},iconName:{type:"string",description:"Id på ikonet du ønsker å bruke til tag"},ariaLabel:{type:"string",description:"Tekst for aria-label"},text:{type:"string",description:"Tekst på tag"}},required:["text"]}},skin:{type:["outlined","gray","blue","beige","green"],name:"Skin",description:"Farge på kortet",default:"outlined"},direction:{type:["landscape","portrait"],name:"Direction",description:"Retningen innholdet skal ligge i forhold til kortet",default:"portrait"},image:{type:"object",image:"Image",description:"Bilde på kortet. Tar inn et objekt av typen {src: string, alt: string}. src er stien til bildet, og alt er tekst for aria-label.",items:{type:"object",properties:{src:{type:"string",description:"Bilde på kortet"},alt:{type:"string",description:"Tekst for aria-label"}},required:["src","alt"]}}},m={default:{description:"Innholdet i kortet"}},l={name:k,"css-class":"pkt-card",isElement:u,props:h,slots:m};var y=Object.defineProperty,b=Object.getOwnPropertyDescriptor,r=(n,i,s,a)=>{for(var e=a>1?void 0:a?b(i,s):i,o=n.length-1,p;o>=0;o--)(p=n[o])&&(e=(a?p(i,s,e):p(e))||e);return a&&e&&y(i,s,e),e};exports.PktCard=class extends t.PktElement{constructor(){super(),this.defaultSlot=d.e(),this.skin=l.props.skin.default,this.direction=l.props.direction.default,this.image={src:"",alt:""},this.heading="",this.subheading="",this.tags=[],this.slotController=new d.PktSlotController(this,this.defaultSlot)}connectedCallback(){super.connectedCallback()}render(){const i={"pkt-card":!0,[`pkt-card--${this.skin}`]:this.skin,[`pkt-card--${this.direction}`]:this.direction};return t.x`
|
|
2
2
|
<div class=${c.e(i)}>
|
|
3
3
|
${this.image.src&&t.x`
|
|
4
4
|
<div class="pkt-card__image">
|
package/dist/pkt-card.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as g, x as r, E as k, n as a } from "./index-CF6_-ZoF.js";
|
|
2
|
-
import { e as h, P as m, n as u } from "./ref-
|
|
2
|
+
import { e as h, P as m, n as u } from "./ref-CY86ZeRJ.js";
|
|
3
3
|
import { e as y } from "./class-map-luGhSuLj.js";
|
|
4
4
|
import { t as f } from "./directive-Cxhakbpr.js";
|
|
5
5
|
import "./index-B-KXmo65.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BYZhBzXZ.cjs"),h=require("./directive-DtixNHDT.cjs"),r=require("./ref-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BYZhBzXZ.cjs"),h=require("./directive-DtixNHDT.cjs"),r=require("./ref-CkYAEPA_.cjs"),d=require("./class-map-DjxCaVFk.cjs"),c=require("./converters-DhM11VlY.cjs");var u=Object.defineProperty,m=Object.getOwnPropertyDescriptor,o=(l,t,s,i)=>{for(var n=i>1?void 0:i?m(t,s):t,a=l.length-1,p;a>=0;a--)(p=l[a])&&(n=(i?p(t,s,n):p(n))||n);return i&&n&&u(t,s,n),n};exports.PktComponent=class extends e.PktElement{constructor(){super(),this.string="",this.strings=[],this.darkmode=!1,this._list=[],this.defaultSlot=r.e(),this.namedSlot=r.e(),this.slotController=new r.PktSlotController(this,this.defaultSlot,this.namedSlot)}connectedCallback(){this.strings.length&&this.strings.forEach(t=>{this._list.push(t.toUpperCase())}),super.connectedCallback()}render(){const t={"pkt-component":!0,"pkt-component--has-list":this.strings.length>0,"pkt-darkmode":this.darkmode};return e.x`
|
|
2
2
|
<div class="${d.e(t)}">
|
|
3
3
|
<h1 class="pkt-txt-28">${this.string}</h1>
|
|
4
4
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { P as m, x as h, t as u, n as i } from "./index-CF6_-ZoF.js";
|
|
2
2
|
import { t as f } from "./directive-Cxhakbpr.js";
|
|
3
|
-
import { e as d, P as v, n as c } from "./ref-
|
|
3
|
+
import { e as d, P as v, n as c } from "./ref-CY86ZeRJ.js";
|
|
4
4
|
import { e as g } from "./class-map-luGhSuLj.js";
|
|
5
5
|
import { c as k } from "./converters-DNCwIFwr.js";
|
|
6
6
|
var S = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, n = (t, e, l, o) => {
|
package/dist/pkt-datepicker.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-BYZhBzXZ.cjs"),S=require("./directive-DtixNHDT.cjs"),o=require("./ref-BuQtfKiL.cjs"),M=require("./class-map-DjxCaVFk.cjs"),j=require("./converters-DhM11VlY.cjs"),y=require("./index-CzPkBTm-.cjs");require("./pkt-input-wrapper.cjs");require("./index-DAWAnAW_.cjs");require("./pkt-tag.cjs");function C(n){return y.startOfWeek(n,{weekStartsOn:1})}function V(n){const e=y.toDate(n),t=e.getFullYear(),a=y.constructFrom(n,0);a.setFullYear(t+1,0,4),a.setHours(0,0,0,0);const r=C(a),i=y.constructFrom(n,0);i.setFullYear(t,0,4),i.setHours(0,0,0,0);const s=C(i);return e.getTime()>=r.getTime()?t+1:e.getTime()>=s.getTime()?t:t-1}function W(n){const e=y.toDate(n);return e.setHours(0,0,0,0),e}function _(n){const e=y.toDate(n),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+n-+t}function A(n,e){const t=W(n),a=W(e),r=+t-_(t),i=+a-_(a);return Math.round((r-i)/y.millisecondsInDay)}function L(n){const e=V(n),t=y.constructFrom(n,0);return t.setFullYear(e,0,4),t.setHours(0,0,0,0),C(t)}function Q(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function X(n){if(!Q(n)&&typeof n!="number")return!1;const e=y.toDate(n);return!isNaN(Number(e))}function G(n){const e=y.toDate(n),t=y.constructFrom(n,0);return t.setFullYear(e.getFullYear(),0,1),t.setHours(0,0,0,0),t}const U={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},J=(n,e,t)=>{let a;const r=U[n];return typeof r=="string"?a=r:e===1?a=r.one:a=r.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+a:a+" ago":a};function R(n){return(e={})=>{const t=e.width?String(e.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const K={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},z={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Z={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ee={date:R({formats:K,defaultWidth:"full"}),time:R({formats:z,defaultWidth:"full"}),dateTime:R({formats:Z,defaultWidth:"full"})},te={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ne=(n,e,t,a)=>te[n];function O(n){return(e,t)=>{const a=t!=null&&t.context?String(t.context):"standalone";let r;if(a==="formatting"&&n.formattingValues){const s=n.defaultFormattingWidth||n.defaultWidth,h=t!=null&&t.width?String(t.width):s;r=n.formattingValues[h]||n.formattingValues[s]}else{const s=n.defaultWidth,h=t!=null&&t.width?String(t.width):n.defaultWidth;r=n.values[h]||n.values[s]}const i=n.argumentCallback?n.argumentCallback(e):e;return r[i]}}const ae={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},re={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ie={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},se={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},oe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ue={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},le=(n,e)=>{const t=Number(n),a=t%100;if(a>20||a<10)switch(a%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},de={ordinalNumber:le,era:O({values:ae,defaultWidth:"wide"}),quarter:O({values:re,defaultWidth:"wide",argumentCallback:n=>n-1}),month:O({values:ie,defaultWidth:"wide"}),day:O({values:se,defaultWidth:"wide"}),dayPeriod:O({values:oe,defaultWidth:"wide",formattingValues:ue,defaultFormattingWidth:"wide"})};function T(n){return(e,t={})=>{const a=t.width,r=a&&n.matchPatterns[a]||n.matchPatterns[n.defaultMatchWidth],i=e.match(r);if(!i)return null;const s=i[0],h=a&&n.parsePatterns[a]||n.parsePatterns[n.defaultParseWidth],v=Array.isArray(h)?he(h,c=>c.test(s)):ce(h,c=>c.test(s));let w;w=n.valueCallback?n.valueCallback(v):v,w=t.valueCallback?t.valueCallback(w):w;const x=e.slice(s.length);return{value:w,rest:x}}}function ce(n,e){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t]))return t}function he(n,e){for(let t=0;t<n.length;t++)if(e(n[t]))return t}function fe(n){return(e,t={})=>{const a=e.match(n.matchPattern);if(!a)return null;const r=a[0],i=e.match(n.parsePattern);if(!i)return null;let s=n.valueCallback?n.valueCallback(i[0]):i[0];s=t.valueCallback?t.valueCallback(s):s;const h=e.slice(r.length);return{value:s,rest:h}}}const pe=/^(\d+)(th|st|nd|rd)?/i,me=/\d+/i,ge={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ye={any:[/^b/i,/^(a|c)/i]},ve={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},we={any:[/1/i,/2/i,/3/i,/4/i]},ke={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},be={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},xe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Pe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},De={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},$e={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Me={ordinalNumber:fe({matchPattern:pe,parsePattern:me,valueCallback:n=>parseInt(n,10)}),era:T({matchPatterns:ge,defaultMatchWidth:"wide",parsePatterns:ye,defaultParseWidth:"any"}),quarter:T({matchPatterns:ve,defaultMatchWidth:"wide",parsePatterns:we,defaultParseWidth:"any",valueCallback:n=>n+1}),month:T({matchPatterns:ke,defaultMatchWidth:"wide",parsePatterns:be,defaultParseWidth:"any"}),day:T({matchPatterns:xe,defaultMatchWidth:"wide",parsePatterns:Pe,defaultParseWidth:"any"}),dayPeriod:T({matchPatterns:De,defaultMatchWidth:"any",parsePatterns:$e,defaultParseWidth:"any"})},Oe={code:"en-US",formatDistance:J,formatLong:ee,formatRelative:ne,localize:de,match:Me,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Te(n){const e=y.toDate(n);return A(e,G(e))+1}function Se(n){const e=y.toDate(n),t=+C(e)-+L(e);return Math.round(t/y.millisecondsInWeek)+1}function u(n,e){const t=n<0?"-":"",a=Math.abs(n).toString().padStart(e,"0");return t+a}const b={y(n,e){const t=n.getFullYear(),a=t>0?t:1-t;return u(e==="yy"?a%100:a,e.length)},M(n,e){const t=n.getMonth();return e==="M"?String(t+1):u(t+1,2)},d(n,e){return u(n.getDate(),e.length)},a(n,e){const t=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(n,e){return u(n.getHours()%12||12,e.length)},H(n,e){return u(n.getHours(),e.length)},m(n,e){return u(n.getMinutes(),e.length)},s(n,e){return u(n.getSeconds(),e.length)},S(n,e){const t=e.length,a=n.getMilliseconds(),r=Math.trunc(a*Math.pow(10,t-3));return u(r,e.length)}},$={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},I={G:function(n,e,t){const a=n.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(a,{width:"abbreviated"});case"GGGGG":return t.era(a,{width:"narrow"});case"GGGG":default:return t.era(a,{width:"wide"})}},y:function(n,e,t){if(e==="yo"){const a=n.getFullYear(),r=a>0?a:1-a;return t.ordinalNumber(r,{unit:"year"})}return b.y(n,e)},Y:function(n,e,t,a){const r=y.getWeekYear(n,a),i=r>0?r:1-r;if(e==="YY"){const s=i%100;return u(s,2)}return e==="Yo"?t.ordinalNumber(i,{unit:"year"}):u(i,e.length)},R:function(n,e){const t=V(n);return u(t,e.length)},u:function(n,e){const t=n.getFullYear();return u(t,e.length)},Q:function(n,e,t){const a=Math.ceil((n.getMonth()+1)/3);switch(e){case"Q":return String(a);case"QQ":return u(a,2);case"Qo":return t.ordinalNumber(a,{unit:"quarter"});case"QQQ":return t.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(a,{width:"wide",context:"formatting"})}},q:function(n,e,t){const a=Math.ceil((n.getMonth()+1)/3);switch(e){case"q":return String(a);case"qq":return u(a,2);case"qo":return t.ordinalNumber(a,{unit:"quarter"});case"qqq":return t.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(a,{width:"wide",context:"standalone"})}},M:function(n,e,t){const a=n.getMonth();switch(e){case"M":case"MM":return b.M(n,e);case"Mo":return t.ordinalNumber(a+1,{unit:"month"});case"MMM":return t.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(a,{width:"wide",context:"formatting"})}},L:function(n,e,t){const a=n.getMonth();switch(e){case"L":return String(a+1);case"LL":return u(a+1,2);case"Lo":return t.ordinalNumber(a+1,{unit:"month"});case"LLL":return t.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(a,{width:"wide",context:"standalone"})}},w:function(n,e,t,a){const r=y.getWeek(n,a);return e==="wo"?t.ordinalNumber(r,{unit:"week"}):u(r,e.length)},I:function(n,e,t){const a=Se(n);return e==="Io"?t.ordinalNumber(a,{unit:"week"}):u(a,e.length)},d:function(n,e,t){return e==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):b.d(n,e)},D:function(n,e,t){const a=Te(n);return e==="Do"?t.ordinalNumber(a,{unit:"dayOfYear"}):u(a,e.length)},E:function(n,e,t){const a=n.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(a,{width:"short",context:"formatting"});case"EEEE":default:return t.day(a,{width:"wide",context:"formatting"})}},e:function(n,e,t,a){const r=n.getDay(),i=(r-a.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return u(i,2);case"eo":return t.ordinalNumber(i,{unit:"day"});case"eee":return t.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(r,{width:"short",context:"formatting"});case"eeee":default:return t.day(r,{width:"wide",context:"formatting"})}},c:function(n,e,t,a){const r=n.getDay(),i=(r-a.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return u(i,e.length);case"co":return t.ordinalNumber(i,{unit:"day"});case"ccc":return t.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(r,{width:"narrow",context:"standalone"});case"cccccc":return t.day(r,{width:"short",context:"standalone"});case"cccc":default:return t.day(r,{width:"wide",context:"standalone"})}},i:function(n,e,t){const a=n.getDay(),r=a===0?7:a;switch(e){case"i":return String(r);case"ii":return u(r,e.length);case"io":return t.ordinalNumber(r,{unit:"day"});case"iii":return t.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(a,{width:"short",context:"formatting"});case"iiii":default:return t.day(a,{width:"wide",context:"formatting"})}},a:function(n,e,t){const r=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(n,e,t){const a=n.getHours();let r;switch(a===12?r=$.noon:a===0?r=$.midnight:r=a/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(n,e,t){const a=n.getHours();let r;switch(a>=17?r=$.evening:a>=12?r=$.afternoon:a>=4?r=$.morning:r=$.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(n,e,t){if(e==="ho"){let a=n.getHours()%12;return a===0&&(a=12),t.ordinalNumber(a,{unit:"hour"})}return b.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):b.H(n,e)},K:function(n,e,t){const a=n.getHours()%12;return e==="Ko"?t.ordinalNumber(a,{unit:"hour"}):u(a,e.length)},k:function(n,e,t){let a=n.getHours();return a===0&&(a=24),e==="ko"?t.ordinalNumber(a,{unit:"hour"}):u(a,e.length)},m:function(n,e,t){return e==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):b.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):b.s(n,e)},S:function(n,e){return b.S(n,e)},X:function(n,e,t){const a=n.getTimezoneOffset();if(a===0)return"Z";switch(e){case"X":return F(a);case"XXXX":case"XX":return D(a);case"XXXXX":case"XXX":default:return D(a,":")}},x:function(n,e,t){const a=n.getTimezoneOffset();switch(e){case"x":return F(a);case"xxxx":case"xx":return D(a);case"xxxxx":case"xxx":default:return D(a,":")}},O:function(n,e,t){const a=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+q(a,":");case"OOOO":default:return"GMT"+D(a,":")}},z:function(n,e,t){const a=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+q(a,":");case"zzzz":default:return"GMT"+D(a,":")}},t:function(n,e,t){const a=Math.trunc(n.getTime()/1e3);return u(a,e.length)},T:function(n,e,t){const a=n.getTime();return u(a,e.length)}};function q(n,e=""){const t=n>0?"-":"+",a=Math.abs(n),r=Math.trunc(a/60),i=a%60;return i===0?t+String(r):t+String(r)+e+u(i,2)}function F(n,e){return n%60===0?(n>0?"-":"+")+u(Math.abs(n)/60,2):D(n,e)}function D(n,e=""){const t=n>0?"-":"+",a=Math.abs(n),r=u(Math.trunc(a/60),2),i=u(a%60,2);return t+r+e+i}const Y=(n,e)=>{switch(n){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},H=(n,e)=>{switch(n){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Ce=(n,e)=>{const t=n.match(/(P+)(p+)?/)||[],a=t[1],r=t[2];if(!r)return Y(n,e);let i;switch(a){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",Y(a,e)).replace("{{time}}",H(r,e))},Re={p:H,P:Ce},Ee=/^D+$/,We=/^Y+$/,_e=["D","DD","YY","YYYY"];function Ie(n){return Ee.test(n)}function qe(n){return We.test(n)}function Fe(n,e,t){const a=Ye(n,e,t);if(console.warn(a),_e.includes(n))throw new RangeError(a)}function Ye(n,e,t){const a=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${a} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Be=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ne=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,je=/^'([^]*?)'?$/,Ve=/''/g,He=/[a-zA-Z]/;function Ae(n,e,t){var x,c,g,p;const a=y.getDefaultOptions(),r=a.locale??Oe,i=a.firstWeekContainsDate??((c=(x=a.locale)==null?void 0:x.options)==null?void 0:c.firstWeekContainsDate)??1,s=a.weekStartsOn??((p=(g=a.locale)==null?void 0:g.options)==null?void 0:p.weekStartsOn)??0,h=y.toDate(n);if(!X(h))throw new RangeError("Invalid time value");let v=e.match(Ne).map(d=>{const f=d[0];if(f==="p"||f==="P"){const P=Re[f];return P(d,r.formatLong)}return d}).join("").match(Be).map(d=>{if(d==="''")return{isToken:!1,value:"'"};const f=d[0];if(f==="'")return{isToken:!1,value:Le(d)};if(I[f])return{isToken:!0,value:d};if(f.match(He))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:d}});r.localize.preprocessor&&(v=r.localize.preprocessor(h,v));const w={firstWeekContainsDate:i,weekStartsOn:s,locale:r};return v.map(d=>{if(!d.isToken)return d.value;const f=d.value;(qe(f)||Ie(f))&&Fe(f,e,String(n));const P=I[f[0]];return P(h,f,r.localize,w)}).join("")}function Le(n){const e=n.match(je);return e?e[1].replace(Ve,"'"):n}/**
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-BYZhBzXZ.cjs"),S=require("./directive-DtixNHDT.cjs"),o=require("./ref-CkYAEPA_.cjs"),M=require("./class-map-DjxCaVFk.cjs"),j=require("./converters-DhM11VlY.cjs"),y=require("./index-CzPkBTm-.cjs");require("./pkt-input-wrapper.cjs");require("./index-DAWAnAW_.cjs");require("./pkt-tag.cjs");function C(n){return y.startOfWeek(n,{weekStartsOn:1})}function V(n){const e=y.toDate(n),t=e.getFullYear(),a=y.constructFrom(n,0);a.setFullYear(t+1,0,4),a.setHours(0,0,0,0);const r=C(a),i=y.constructFrom(n,0);i.setFullYear(t,0,4),i.setHours(0,0,0,0);const s=C(i);return e.getTime()>=r.getTime()?t+1:e.getTime()>=s.getTime()?t:t-1}function W(n){const e=y.toDate(n);return e.setHours(0,0,0,0),e}function _(n){const e=y.toDate(n),t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),+n-+t}function A(n,e){const t=W(n),a=W(e),r=+t-_(t),i=+a-_(a);return Math.round((r-i)/y.millisecondsInDay)}function L(n){const e=V(n),t=y.constructFrom(n,0);return t.setFullYear(e,0,4),t.setHours(0,0,0,0),C(t)}function Q(n){return n instanceof Date||typeof n=="object"&&Object.prototype.toString.call(n)==="[object Date]"}function X(n){if(!Q(n)&&typeof n!="number")return!1;const e=y.toDate(n);return!isNaN(Number(e))}function G(n){const e=y.toDate(n),t=y.constructFrom(n,0);return t.setFullYear(e.getFullYear(),0,1),t.setHours(0,0,0,0),t}const U={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},J=(n,e,t)=>{let a;const r=U[n];return typeof r=="string"?a=r:e===1?a=r.one:a=r.other.replace("{{count}}",e.toString()),t!=null&&t.addSuffix?t.comparison&&t.comparison>0?"in "+a:a+" ago":a};function R(n){return(e={})=>{const t=e.width?String(e.width):n.defaultWidth;return n.formats[t]||n.formats[n.defaultWidth]}}const K={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},z={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Z={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ee={date:R({formats:K,defaultWidth:"full"}),time:R({formats:z,defaultWidth:"full"}),dateTime:R({formats:Z,defaultWidth:"full"})},te={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ne=(n,e,t,a)=>te[n];function O(n){return(e,t)=>{const a=t!=null&&t.context?String(t.context):"standalone";let r;if(a==="formatting"&&n.formattingValues){const s=n.defaultFormattingWidth||n.defaultWidth,h=t!=null&&t.width?String(t.width):s;r=n.formattingValues[h]||n.formattingValues[s]}else{const s=n.defaultWidth,h=t!=null&&t.width?String(t.width):n.defaultWidth;r=n.values[h]||n.values[s]}const i=n.argumentCallback?n.argumentCallback(e):e;return r[i]}}const ae={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},re={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ie={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},se={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},oe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},ue={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},le=(n,e)=>{const t=Number(n),a=t%100;if(a>20||a<10)switch(a%10){case 1:return t+"st";case 2:return t+"nd";case 3:return t+"rd"}return t+"th"},de={ordinalNumber:le,era:O({values:ae,defaultWidth:"wide"}),quarter:O({values:re,defaultWidth:"wide",argumentCallback:n=>n-1}),month:O({values:ie,defaultWidth:"wide"}),day:O({values:se,defaultWidth:"wide"}),dayPeriod:O({values:oe,defaultWidth:"wide",formattingValues:ue,defaultFormattingWidth:"wide"})};function T(n){return(e,t={})=>{const a=t.width,r=a&&n.matchPatterns[a]||n.matchPatterns[n.defaultMatchWidth],i=e.match(r);if(!i)return null;const s=i[0],h=a&&n.parsePatterns[a]||n.parsePatterns[n.defaultParseWidth],v=Array.isArray(h)?he(h,c=>c.test(s)):ce(h,c=>c.test(s));let w;w=n.valueCallback?n.valueCallback(v):v,w=t.valueCallback?t.valueCallback(w):w;const x=e.slice(s.length);return{value:w,rest:x}}}function ce(n,e){for(const t in n)if(Object.prototype.hasOwnProperty.call(n,t)&&e(n[t]))return t}function he(n,e){for(let t=0;t<n.length;t++)if(e(n[t]))return t}function fe(n){return(e,t={})=>{const a=e.match(n.matchPattern);if(!a)return null;const r=a[0],i=e.match(n.parsePattern);if(!i)return null;let s=n.valueCallback?n.valueCallback(i[0]):i[0];s=t.valueCallback?t.valueCallback(s):s;const h=e.slice(r.length);return{value:s,rest:h}}}const pe=/^(\d+)(th|st|nd|rd)?/i,me=/\d+/i,ge={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ye={any:[/^b/i,/^(a|c)/i]},ve={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},we={any:[/1/i,/2/i,/3/i,/4/i]},ke={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},be={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},xe={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Pe={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},De={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},$e={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Me={ordinalNumber:fe({matchPattern:pe,parsePattern:me,valueCallback:n=>parseInt(n,10)}),era:T({matchPatterns:ge,defaultMatchWidth:"wide",parsePatterns:ye,defaultParseWidth:"any"}),quarter:T({matchPatterns:ve,defaultMatchWidth:"wide",parsePatterns:we,defaultParseWidth:"any",valueCallback:n=>n+1}),month:T({matchPatterns:ke,defaultMatchWidth:"wide",parsePatterns:be,defaultParseWidth:"any"}),day:T({matchPatterns:xe,defaultMatchWidth:"wide",parsePatterns:Pe,defaultParseWidth:"any"}),dayPeriod:T({matchPatterns:De,defaultMatchWidth:"any",parsePatterns:$e,defaultParseWidth:"any"})},Oe={code:"en-US",formatDistance:J,formatLong:ee,formatRelative:ne,localize:de,match:Me,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Te(n){const e=y.toDate(n);return A(e,G(e))+1}function Se(n){const e=y.toDate(n),t=+C(e)-+L(e);return Math.round(t/y.millisecondsInWeek)+1}function u(n,e){const t=n<0?"-":"",a=Math.abs(n).toString().padStart(e,"0");return t+a}const b={y(n,e){const t=n.getFullYear(),a=t>0?t:1-t;return u(e==="yy"?a%100:a,e.length)},M(n,e){const t=n.getMonth();return e==="M"?String(t+1):u(t+1,2)},d(n,e){return u(n.getDate(),e.length)},a(n,e){const t=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.toUpperCase();case"aaa":return t;case"aaaaa":return t[0];case"aaaa":default:return t==="am"?"a.m.":"p.m."}},h(n,e){return u(n.getHours()%12||12,e.length)},H(n,e){return u(n.getHours(),e.length)},m(n,e){return u(n.getMinutes(),e.length)},s(n,e){return u(n.getSeconds(),e.length)},S(n,e){const t=e.length,a=n.getMilliseconds(),r=Math.trunc(a*Math.pow(10,t-3));return u(r,e.length)}},$={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},I={G:function(n,e,t){const a=n.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return t.era(a,{width:"abbreviated"});case"GGGGG":return t.era(a,{width:"narrow"});case"GGGG":default:return t.era(a,{width:"wide"})}},y:function(n,e,t){if(e==="yo"){const a=n.getFullYear(),r=a>0?a:1-a;return t.ordinalNumber(r,{unit:"year"})}return b.y(n,e)},Y:function(n,e,t,a){const r=y.getWeekYear(n,a),i=r>0?r:1-r;if(e==="YY"){const s=i%100;return u(s,2)}return e==="Yo"?t.ordinalNumber(i,{unit:"year"}):u(i,e.length)},R:function(n,e){const t=V(n);return u(t,e.length)},u:function(n,e){const t=n.getFullYear();return u(t,e.length)},Q:function(n,e,t){const a=Math.ceil((n.getMonth()+1)/3);switch(e){case"Q":return String(a);case"QQ":return u(a,2);case"Qo":return t.ordinalNumber(a,{unit:"quarter"});case"QQQ":return t.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return t.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return t.quarter(a,{width:"wide",context:"formatting"})}},q:function(n,e,t){const a=Math.ceil((n.getMonth()+1)/3);switch(e){case"q":return String(a);case"qq":return u(a,2);case"qo":return t.ordinalNumber(a,{unit:"quarter"});case"qqq":return t.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return t.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return t.quarter(a,{width:"wide",context:"standalone"})}},M:function(n,e,t){const a=n.getMonth();switch(e){case"M":case"MM":return b.M(n,e);case"Mo":return t.ordinalNumber(a+1,{unit:"month"});case"MMM":return t.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return t.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return t.month(a,{width:"wide",context:"formatting"})}},L:function(n,e,t){const a=n.getMonth();switch(e){case"L":return String(a+1);case"LL":return u(a+1,2);case"Lo":return t.ordinalNumber(a+1,{unit:"month"});case"LLL":return t.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return t.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return t.month(a,{width:"wide",context:"standalone"})}},w:function(n,e,t,a){const r=y.getWeek(n,a);return e==="wo"?t.ordinalNumber(r,{unit:"week"}):u(r,e.length)},I:function(n,e,t){const a=Se(n);return e==="Io"?t.ordinalNumber(a,{unit:"week"}):u(a,e.length)},d:function(n,e,t){return e==="do"?t.ordinalNumber(n.getDate(),{unit:"date"}):b.d(n,e)},D:function(n,e,t){const a=Te(n);return e==="Do"?t.ordinalNumber(a,{unit:"dayOfYear"}):u(a,e.length)},E:function(n,e,t){const a=n.getDay();switch(e){case"E":case"EE":case"EEE":return t.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return t.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return t.day(a,{width:"short",context:"formatting"});case"EEEE":default:return t.day(a,{width:"wide",context:"formatting"})}},e:function(n,e,t,a){const r=n.getDay(),i=(r-a.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return u(i,2);case"eo":return t.ordinalNumber(i,{unit:"day"});case"eee":return t.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return t.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return t.day(r,{width:"short",context:"formatting"});case"eeee":default:return t.day(r,{width:"wide",context:"formatting"})}},c:function(n,e,t,a){const r=n.getDay(),i=(r-a.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return u(i,e.length);case"co":return t.ordinalNumber(i,{unit:"day"});case"ccc":return t.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return t.day(r,{width:"narrow",context:"standalone"});case"cccccc":return t.day(r,{width:"short",context:"standalone"});case"cccc":default:return t.day(r,{width:"wide",context:"standalone"})}},i:function(n,e,t){const a=n.getDay(),r=a===0?7:a;switch(e){case"i":return String(r);case"ii":return u(r,e.length);case"io":return t.ordinalNumber(r,{unit:"day"});case"iii":return t.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return t.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return t.day(a,{width:"short",context:"formatting"});case"iiii":default:return t.day(a,{width:"wide",context:"formatting"})}},a:function(n,e,t){const r=n.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"aaaa":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(n,e,t){const a=n.getHours();let r;switch(a===12?r=$.noon:a===0?r=$.midnight:r=a/12>=1?"pm":"am",e){case"b":case"bb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"bbbb":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(n,e,t){const a=n.getHours();let r;switch(a>=17?r=$.evening:a>=12?r=$.afternoon:a>=4?r=$.morning:r=$.night,e){case"B":case"BB":case"BBB":return t.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return t.dayPeriod(r,{width:"narrow",context:"formatting"});case"BBBB":default:return t.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(n,e,t){if(e==="ho"){let a=n.getHours()%12;return a===0&&(a=12),t.ordinalNumber(a,{unit:"hour"})}return b.h(n,e)},H:function(n,e,t){return e==="Ho"?t.ordinalNumber(n.getHours(),{unit:"hour"}):b.H(n,e)},K:function(n,e,t){const a=n.getHours()%12;return e==="Ko"?t.ordinalNumber(a,{unit:"hour"}):u(a,e.length)},k:function(n,e,t){let a=n.getHours();return a===0&&(a=24),e==="ko"?t.ordinalNumber(a,{unit:"hour"}):u(a,e.length)},m:function(n,e,t){return e==="mo"?t.ordinalNumber(n.getMinutes(),{unit:"minute"}):b.m(n,e)},s:function(n,e,t){return e==="so"?t.ordinalNumber(n.getSeconds(),{unit:"second"}):b.s(n,e)},S:function(n,e){return b.S(n,e)},X:function(n,e,t){const a=n.getTimezoneOffset();if(a===0)return"Z";switch(e){case"X":return F(a);case"XXXX":case"XX":return D(a);case"XXXXX":case"XXX":default:return D(a,":")}},x:function(n,e,t){const a=n.getTimezoneOffset();switch(e){case"x":return F(a);case"xxxx":case"xx":return D(a);case"xxxxx":case"xxx":default:return D(a,":")}},O:function(n,e,t){const a=n.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+q(a,":");case"OOOO":default:return"GMT"+D(a,":")}},z:function(n,e,t){const a=n.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+q(a,":");case"zzzz":default:return"GMT"+D(a,":")}},t:function(n,e,t){const a=Math.trunc(n.getTime()/1e3);return u(a,e.length)},T:function(n,e,t){const a=n.getTime();return u(a,e.length)}};function q(n,e=""){const t=n>0?"-":"+",a=Math.abs(n),r=Math.trunc(a/60),i=a%60;return i===0?t+String(r):t+String(r)+e+u(i,2)}function F(n,e){return n%60===0?(n>0?"-":"+")+u(Math.abs(n)/60,2):D(n,e)}function D(n,e=""){const t=n>0?"-":"+",a=Math.abs(n),r=u(Math.trunc(a/60),2),i=u(a%60,2);return t+r+e+i}const Y=(n,e)=>{switch(n){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},H=(n,e)=>{switch(n){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Ce=(n,e)=>{const t=n.match(/(P+)(p+)?/)||[],a=t[1],r=t[2];if(!r)return Y(n,e);let i;switch(a){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",Y(a,e)).replace("{{time}}",H(r,e))},Re={p:H,P:Ce},Ee=/^D+$/,We=/^Y+$/,_e=["D","DD","YY","YYYY"];function Ie(n){return Ee.test(n)}function qe(n){return We.test(n)}function Fe(n,e,t){const a=Ye(n,e,t);if(console.warn(a),_e.includes(n))throw new RangeError(a)}function Ye(n,e,t){const a=n[0]==="Y"?"years":"days of the month";return`Use \`${n.toLowerCase()}\` instead of \`${n}\` (in \`${e}\`) for formatting ${a} to the input \`${t}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Be=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ne=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,je=/^'([^]*?)'?$/,Ve=/''/g,He=/[a-zA-Z]/;function Ae(n,e,t){var x,c,g,p;const a=y.getDefaultOptions(),r=a.locale??Oe,i=a.firstWeekContainsDate??((c=(x=a.locale)==null?void 0:x.options)==null?void 0:c.firstWeekContainsDate)??1,s=a.weekStartsOn??((p=(g=a.locale)==null?void 0:g.options)==null?void 0:p.weekStartsOn)??0,h=y.toDate(n);if(!X(h))throw new RangeError("Invalid time value");let v=e.match(Ne).map(d=>{const f=d[0];if(f==="p"||f==="P"){const P=Re[f];return P(d,r.formatLong)}return d}).join("").match(Be).map(d=>{if(d==="''")return{isToken:!1,value:"'"};const f=d[0];if(f==="'")return{isToken:!1,value:Le(d)};if(I[f])return{isToken:!0,value:d};if(f.match(He))throw new RangeError("Format string contains an unescaped latin alphabet character `"+f+"`");return{isToken:!1,value:d}});r.localize.preprocessor&&(v=r.localize.preprocessor(h,v));const w={firstWeekContainsDate:i,weekStartsOn:s,locale:r};return v.map(d=>{if(!d.isToken)return d.value;const f=d.value;(qe(f)||Ie(f))&&Fe(f,e,String(n));const P=I[f[0]];return P(h,f,r.localize,w)}).join("")}function Le(n){const e=n.match(je);return e?e[1].replace(Ve,"'"):n}/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
package/dist/pkt-datepicker.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { T as K, a as z, x as M, E as B, n as g } from "./index-CF6_-ZoF.js";
|
|
2
2
|
import { e as Z, i as ee, a as te, t as ne } from "./directive-Cxhakbpr.js";
|
|
3
|
-
import { p as ae, v as O, r as S, M as Y, m as re, e as C, n as P } from "./ref-
|
|
3
|
+
import { p as ae, v as O, r as S, M as Y, m as re, e as C, n as P } from "./ref-CY86ZeRJ.js";
|
|
4
4
|
import { e as R } from "./class-map-luGhSuLj.js";
|
|
5
5
|
import { a as G } from "./converters-DNCwIFwr.js";
|
|
6
6
|
import { s as ie, t as k, c as _, m as se, a as oe, g as ue, b as le, d as de } from "./index-BkXggpNp.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BYZhBzXZ.cjs"),k=require("./ref-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BYZhBzXZ.cjs"),k=require("./ref-CkYAEPA_.cjs"),c=require("./index-DAWAnAW_.cjs"),u=require("./class-map-DjxCaVFk.cjs"),$=require("./directive-DtixNHDT.cjs");/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2020 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as w, v as T, E as o, x as i, n as r } from "./index-CF6_-ZoF.js";
|
|
2
|
-
import { e as _, P as D, n as I } from "./ref-
|
|
2
|
+
import { e as _, P as D, n as I } from "./ref-CY86ZeRJ.js";
|
|
3
3
|
import { o as f } from "./index-B-KXmo65.js";
|
|
4
4
|
import { e as c } from "./class-map-luGhSuLj.js";
|
|
5
5
|
import { t as E } from "./directive-Cxhakbpr.js";
|
package/dist/pkt-link.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BYZhBzXZ.cjs"),c=require("./ref-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BYZhBzXZ.cjs"),c=require("./ref-CkYAEPA_.cjs"),k=require("./class-map-DjxCaVFk.cjs"),h=require("./directive-DtixNHDT.cjs");require("./index-DAWAnAW_.cjs");const f="pkt-link",u=!0,d={href:{name:"URL",description:"URL til lenken",type:"string",default:"#"},target:{name:"Mål",description:"Mål for lenken",type:["_blank","_self","_parent","_top"],default:"_self"},iconName:{name:"Ikon",description:"Ikon som skal vises ved siden av lenketeksten",type:"icon"},iconPosition:{name:"Ikonposisjon",description:"Posisjonen til ikonet i forhold til lenketeksten",type:["left","right"]},external:{name:"Ekstern lenke",description:"Vis ikon for ekstern lenke",type:"boolean",default:!1}},m={default:{description:"Innholdet i lenken"}},p={name:f,"css-class":"pkt-link","dark-mode":!0,isElement:u,props:d,slots:m};var P=Object.defineProperty,y=Object.getOwnPropertyDescriptor,i=(s,n,r,o)=>{for(var t=o>1?void 0:o?y(n,r):n,l=s.length-1,a;l>=0;l--)(a=s[l])&&(t=(o?a(n,r,t):a(t))||t);return o&&t&&P(n,r,t),t};exports.PktLink=class extends e.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.href=p.props.href.default,this.iconName=void 0,this.iconPosition=void 0,this.external=p.props.external.default,this.target=p.props.target.default,this.slotController=new c.PktSlotController(this,this.defaultSlot)}render(){const n={"pkt-link":!0,"pkt-link--icon-left":!!this.iconName&&this.iconPosition==="left"||!!(this.iconName&&!this.iconPosition),"pkt-link--icon-right":!!this.iconName&&this.iconPosition==="right","pkt-link--external":this.external};return e.x`<a
|
|
2
2
|
class=${k.e(n)}
|
|
3
3
|
href=${this.href}
|
|
4
4
|
@click=${this.handleClick}
|
package/dist/pkt-link.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { P as f, x as k, E as h, n as i } from "./index-CF6_-ZoF.js";
|
|
2
|
-
import { e as m, P as d, n as u } from "./ref-
|
|
2
|
+
import { e as m, P as d, n as u } from "./ref-CY86ZeRJ.js";
|
|
3
3
|
import { e as P } from "./class-map-luGhSuLj.js";
|
|
4
4
|
import { t as y } from "./directive-Cxhakbpr.js";
|
|
5
5
|
import "./index-B-KXmo65.js";
|
package/dist/pkt-messagebox.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BYZhBzXZ.cjs"),c=require("./ref-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BYZhBzXZ.cjs"),c=require("./ref-CkYAEPA_.cjs"),b=require("./class-map-DjxCaVFk.cjs"),d=require("./directive-DtixNHDT.cjs");require("./index-DAWAnAW_.cjs");const k="pkt-messagebox",u=!0,g={onClose:{description:"React: Event som trigges når meldingsboksen lukkes"},"on-close":{description:"Vue: Event som trigges når meldingsboksen lukkes"}},m={title:{name:"Tittel",description:"Tittelen på meldingsboksen",type:"string"},skin:{name:"Utseende",description:"Velg farge på meldingsboksen",type:["beige","blue","red","green"],default:"beige"},compact:{name:"Kompakt",description:"Gjør meldingsboksen mindre",type:"boolean",default:!1},closable:{name:"Kan lukkes",description:"Viser lukkeknapp",type:"boolean",default:!1}},h={default:{description:"Innholdet i meldingsboksen"}},p={name:k,"css-class":"pkt-messagebox",isElement:u,events:g,props:m,slots:h};var f=Object.defineProperty,x=Object.getOwnPropertyDescriptor,o=(i,t,n,l)=>{for(var s=l>1?void 0:l?x(t,n):t,r=i.length-1,a;r>=0;r--)(a=i[r])&&(s=(l?a(t,n,s):a(s))||s);return l&&s&&f(t,n,s),s};exports.PktMessagebox=class extends e.PktElement{constructor(){super(),this.defaultSlot=c.e(),this.closable=p.props.closable.default,this.compact=p.props.compact.default,this.title="",this.skin=p.props.skin.default,this._isClosed=!1,this.close=t=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:t},bubbles:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:t},bubbles:!0}))},this.slotController=new c.PktSlotController(this,this.defaultSlot),this._isClosed=!1}render(){const t={"pkt-messagebox":!0,"pkt-messagebox--compact":this.compact,[`pkt-messagebox--${this.skin}`]:this.skin,"pkt-messagebox--closable":this.closable,"pkt-hide":this._isClosed};return e.x`<div class=${b.e(t)}>
|
|
2
2
|
${this.closable?e.x`<div class="pkt-messagebox__close">
|
|
3
3
|
<button
|
|
4
4
|
@click=${this.close}
|
package/dist/pkt-messagebox.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as b, P as k, x as c, E as d, n } from "./index-CF6_-ZoF.js";
|
|
2
|
-
import { e as u, P as g, n as h } from "./ref-
|
|
2
|
+
import { e as u, P as g, n as h } from "./ref-CY86ZeRJ.js";
|
|
3
3
|
import { e as f } from "./class-map-luGhSuLj.js";
|
|
4
4
|
import { t as v } from "./directive-Cxhakbpr.js";
|
|
5
5
|
import "./index-B-KXmo65.js";
|
package/dist/pkt-tag.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./class-map-DjxCaVFk.cjs"),g=require("./directive-DtixNHDT.cjs"),t=require("./index-BYZhBzXZ.cjs"),o=require("./ref-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./class-map-DjxCaVFk.cjs"),g=require("./directive-DtixNHDT.cjs"),t=require("./index-BYZhBzXZ.cjs"),o=require("./ref-CkYAEPA_.cjs");require("./index-DAWAnAW_.cjs");const h="pkt-tag",d=!0,k={closeTag:{type:"boolean",required:!1,default:!1},size:{required:!1,default:"medium",type:["small","medium","large"]},iconName:{type:"string",required:!1},skin:{required:!1,default:"blue",type:["blue","green","red","beige","yellow","gray","blue-light"]},textStyle:{required:!1,default:"normal-text",type:["thin-text","normal-text"]},type:{required:!1,default:"button",type:["button","submit","reset"]},ariaLabel:{type:"string",required:!1,default:"Lukk"}},f={default:{description:"Teksten til tag"}},a={name:h,"css-class":"pkt-tag",isElement:d,props:k,slots:f};var y=Object.defineProperty,b=Object.getOwnPropertyDescriptor,s=(n,e,r,l)=>{for(var i=l>1?void 0:l?b(e,r):e,p=n.length-1,c;p>=0;p--)(c=n[p])&&(i=(l?c(e,r,i):c(i))||i);return l&&i&&y(e,r,i),i};exports.PktTag=class extends t.PktElement{constructor(){super(),this.defaultSlot=o.e(),this.closeTag=a.props.closeTag.default,this.size=a.props.size.default,this.skin=a.props.skin.default,this.textStyle=a.props.textStyle.default,this.iconName=void 0,this.type=a.props.type.default,this.ariaLabel=a.props.ariaLabel.default,this._isClosed=!1,this.close=e=>{this._isClosed=!0,this.dispatchEvent(new CustomEvent("close",{detail:{origin:e},bubbles:!0,composed:!0})),this.dispatchEvent(new CustomEvent("on-close",{detail:{origin:e},bubbles:!0,composed:!0}))},this.slotController=new o.PktSlotController(this,this.defaultSlot),this._isClosed=!1}render(){const e={"pkt-tag":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle},r={"pkt-tag":!0,"pkt-btn":!0,"pkt-btn--tertiary":!0,[`pkt-tag--${this.size}`]:!!this.size,[`pkt-tag--${this.skin}`]:!!this.skin,[`pkt-tag--${this.textStyle}`]:!!this.textStyle,"pkt-btn--icons-right-and-left":this.closeTag&&!!this.iconName,"pkt-hide":this._isClosed};return this.closeTag?t.x`
|
|
2
2
|
<button
|
|
3
3
|
class=${u.e(r)}
|
|
4
4
|
type=${this.type}
|
package/dist/pkt-tag.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { e as h } from "./class-map-luGhSuLj.js";
|
|
2
2
|
import { t as d } from "./directive-Cxhakbpr.js";
|
|
3
3
|
import { r as y, P as g, x as p, n as l } from "./index-CF6_-ZoF.js";
|
|
4
|
-
import { e as m, P as k, n as f } from "./ref-
|
|
4
|
+
import { e as m, P as k, n as f } from "./ref-CY86ZeRJ.js";
|
|
5
5
|
import "./index-B-KXmo65.js";
|
|
6
6
|
const b = "pkt-tag", S = !0, $ = {
|
|
7
7
|
closeTag: {
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { Z as p, E as A } from "./index-CF6_-ZoF.js";
|
|
2
|
+
import { i as v, a as N, e as m } from "./directive-Cxhakbpr.js";
|
|
3
|
+
class w {
|
|
4
|
+
constructor(e, ...t) {
|
|
5
|
+
this.nodes = [], this.host = e, this.host.addController(this), this.slots = t, this.nodes = [], this.observer = new MutationObserver((i) => this.handleMutations(i));
|
|
6
|
+
}
|
|
7
|
+
hostConnected() {
|
|
8
|
+
this.updateNodes(), this.observer.observe(this.host, { childList: !0 });
|
|
9
|
+
}
|
|
10
|
+
hostDisconnected() {
|
|
11
|
+
this.observer.disconnect();
|
|
12
|
+
}
|
|
13
|
+
hostUpdated() {
|
|
14
|
+
this.updateSlots();
|
|
15
|
+
}
|
|
16
|
+
updateNodes() {
|
|
17
|
+
this.nodes = [], Array.from(this.host.childNodes).forEach((t) => {
|
|
18
|
+
var i;
|
|
19
|
+
if (t.nodeType === Node.TEXT_NODE && ((i = t.nodeValue) != null && i.trim())) {
|
|
20
|
+
const o = document == null ? void 0 : document.createElement("template");
|
|
21
|
+
o.content.appendChild(t), this.nodes.push(o);
|
|
22
|
+
} else this.isSlotElement(t) || this.nodes.push(t);
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
updateSlots() {
|
|
26
|
+
this.slots.forEach((e) => {
|
|
27
|
+
if (!e.value) return;
|
|
28
|
+
const t = e.value.getAttribute("name"), o = this.nodes.flatMap(
|
|
29
|
+
(n) => n.getAttribute && n.getAttribute("slot") == t ? this.nodeFromElement(n, e) : []
|
|
30
|
+
).filter(
|
|
31
|
+
(n) => e.value && !e.value.contains(n) && !n.contains(e.value)
|
|
32
|
+
);
|
|
33
|
+
o.length > 0 && e.value.replaceChildren(...o);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
handleMutations(e) {
|
|
37
|
+
let t = !1;
|
|
38
|
+
e.forEach((i) => {
|
|
39
|
+
i.type === "childList" && (i.addedNodes.forEach((o) => {
|
|
40
|
+
var h;
|
|
41
|
+
const n = o.nodeType === Node.ELEMENT_NODE && !this.isSlotElement(o), d = o.nodeType === Node.TEXT_NODE && ((h = o.nodeValue) == null ? void 0 : h.trim());
|
|
42
|
+
if (n)
|
|
43
|
+
this.nodes.push(o), t = !0;
|
|
44
|
+
else if (d) {
|
|
45
|
+
const l = document == null ? void 0 : document.createElement("template");
|
|
46
|
+
l.content.appendChild(o), this.nodes.push(l), t = !0;
|
|
47
|
+
}
|
|
48
|
+
}), i.removedNodes.forEach((o) => {
|
|
49
|
+
this.nodes = this.nodes.filter((n) => n !== o), t = !0;
|
|
50
|
+
}));
|
|
51
|
+
}), t && this.updateSlots();
|
|
52
|
+
}
|
|
53
|
+
isSlotElement(e) {
|
|
54
|
+
return this.slots.some((t) => t.value === e);
|
|
55
|
+
}
|
|
56
|
+
nodeFromElement(e, t) {
|
|
57
|
+
var i;
|
|
58
|
+
return e === ((i = t.value) == null ? void 0 : i.parentNode) ? [] : e instanceof HTMLTemplateElement ? Array.from(e.content.childNodes) : [e];
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @license
|
|
63
|
+
* Copyright 2020 Google LLC
|
|
64
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
65
|
+
*/
|
|
66
|
+
const { I: E } = p, g = (s) => s.strings === void 0, $ = () => document.createComment(""), B = (s, e, t) => {
|
|
67
|
+
var n;
|
|
68
|
+
const i = s._$AA.parentNode, o = e === void 0 ? s._$AB : e._$AA;
|
|
69
|
+
if (t === void 0) {
|
|
70
|
+
const d = i.insertBefore($(), o), h = i.insertBefore($(), o);
|
|
71
|
+
t = new E(d, h, s, s.options);
|
|
72
|
+
} else {
|
|
73
|
+
const d = t._$AB.nextSibling, h = t._$AM, l = h !== s;
|
|
74
|
+
if (l) {
|
|
75
|
+
let r;
|
|
76
|
+
(n = t._$AQ) == null || n.call(t, s), t._$AM = s, t._$AP !== void 0 && (r = s._$AU) !== h._$AU && t._$AP(r);
|
|
77
|
+
}
|
|
78
|
+
if (d !== o || l) {
|
|
79
|
+
let r = t._$AA;
|
|
80
|
+
for (; r !== d; ) {
|
|
81
|
+
const _ = r.nextSibling;
|
|
82
|
+
i.insertBefore(r, o), r = _;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return t;
|
|
87
|
+
}, H = (s, e, t = s) => (s._$AI(e, t), s), C = {}, O = (s, e = C) => s._$AH = e, P = (s) => s._$AH, k = (s) => {
|
|
88
|
+
var i;
|
|
89
|
+
(i = s._$AP) == null || i.call(s, !1, !0);
|
|
90
|
+
let e = s._$AA;
|
|
91
|
+
const t = s._$AB.nextSibling;
|
|
92
|
+
for (; e !== t; ) {
|
|
93
|
+
const o = e.nextSibling;
|
|
94
|
+
e.remove(), e = o;
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* @license
|
|
99
|
+
* Copyright 2017 Google LLC
|
|
100
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
101
|
+
*/
|
|
102
|
+
const c = (s, e) => {
|
|
103
|
+
var i;
|
|
104
|
+
const t = s._$AN;
|
|
105
|
+
if (t === void 0) return !1;
|
|
106
|
+
for (const o of t) (i = o._$AO) == null || i.call(o, e, !1), c(o, e);
|
|
107
|
+
return !0;
|
|
108
|
+
}, a = (s) => {
|
|
109
|
+
let e, t;
|
|
110
|
+
do {
|
|
111
|
+
if ((e = s._$AM) === void 0) break;
|
|
112
|
+
t = e._$AN, t.delete(s), s = e;
|
|
113
|
+
} while ((t == null ? void 0 : t.size) === 0);
|
|
114
|
+
}, f = (s) => {
|
|
115
|
+
for (let e; e = s._$AM; s = e) {
|
|
116
|
+
let t = e._$AN;
|
|
117
|
+
if (t === void 0) e._$AN = t = /* @__PURE__ */ new Set();
|
|
118
|
+
else if (t.has(s)) break;
|
|
119
|
+
t.add(s), T(e);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
function b(s) {
|
|
123
|
+
this._$AN !== void 0 ? (a(this), this._$AM = s, f(this)) : this._$AM = s;
|
|
124
|
+
}
|
|
125
|
+
function M(s, e = !1, t = 0) {
|
|
126
|
+
const i = this._$AH, o = this._$AN;
|
|
127
|
+
if (o !== void 0 && o.size !== 0) if (e) if (Array.isArray(i)) for (let n = t; n < i.length; n++) c(i[n], !1), a(i[n]);
|
|
128
|
+
else i != null && (c(i, !1), a(i));
|
|
129
|
+
else c(this, s);
|
|
130
|
+
}
|
|
131
|
+
const T = (s) => {
|
|
132
|
+
s.type == N.CHILD && (s._$AP ?? (s._$AP = M), s._$AQ ?? (s._$AQ = b));
|
|
133
|
+
};
|
|
134
|
+
class S extends v {
|
|
135
|
+
constructor() {
|
|
136
|
+
super(...arguments), this._$AN = void 0;
|
|
137
|
+
}
|
|
138
|
+
_$AT(e, t, i) {
|
|
139
|
+
super._$AT(e, t, i), f(this), this.isConnected = e._$AU;
|
|
140
|
+
}
|
|
141
|
+
_$AO(e, t = !0) {
|
|
142
|
+
var i, o;
|
|
143
|
+
e !== this.isConnected && (this.isConnected = e, e ? (i = this.reconnected) == null || i.call(this) : (o = this.disconnected) == null || o.call(this)), t && (c(this, e), a(this));
|
|
144
|
+
}
|
|
145
|
+
setValue(e) {
|
|
146
|
+
if (g(this._$Ct)) this._$Ct._$AI(e, this);
|
|
147
|
+
else {
|
|
148
|
+
const t = [...this._$Ct._$AH];
|
|
149
|
+
t[this._$Ci] = e, this._$Ct._$AI(t, this, 0);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
disconnected() {
|
|
153
|
+
}
|
|
154
|
+
reconnected() {
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* @license
|
|
159
|
+
* Copyright 2020 Google LLC
|
|
160
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
161
|
+
*/
|
|
162
|
+
const D = () => new y();
|
|
163
|
+
class y {
|
|
164
|
+
}
|
|
165
|
+
const u = /* @__PURE__ */ new WeakMap(), I = m(class extends S {
|
|
166
|
+
render(s) {
|
|
167
|
+
return A;
|
|
168
|
+
}
|
|
169
|
+
update(s, [e]) {
|
|
170
|
+
var i;
|
|
171
|
+
const t = e !== this.Y;
|
|
172
|
+
return t && this.Y !== void 0 && this.rt(void 0), (t || this.lt !== this.ct) && (this.Y = e, this.ht = (i = s.options) == null ? void 0 : i.host, this.rt(this.ct = s.element)), A;
|
|
173
|
+
}
|
|
174
|
+
rt(s) {
|
|
175
|
+
if (this.isConnected || (s = void 0), typeof this.Y == "function") {
|
|
176
|
+
const e = this.ht ?? globalThis;
|
|
177
|
+
let t = u.get(e);
|
|
178
|
+
t === void 0 && (t = /* @__PURE__ */ new WeakMap(), u.set(e, t)), t.get(this.Y) !== void 0 && this.Y.call(this.ht, void 0), t.set(this.Y, s), s !== void 0 && this.Y.call(this.ht, s);
|
|
179
|
+
} else this.Y.value = s;
|
|
180
|
+
}
|
|
181
|
+
get lt() {
|
|
182
|
+
var s, e;
|
|
183
|
+
return typeof this.Y == "function" ? (s = u.get(this.ht ?? globalThis)) == null ? void 0 : s.get(this.Y) : (e = this.Y) == null ? void 0 : e.value;
|
|
184
|
+
}
|
|
185
|
+
disconnected() {
|
|
186
|
+
this.lt === this.ct && this.rt(void 0);
|
|
187
|
+
}
|
|
188
|
+
reconnected() {
|
|
189
|
+
this.rt(this.ct);
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
export {
|
|
193
|
+
k as M,
|
|
194
|
+
w as P,
|
|
195
|
+
D as e,
|
|
196
|
+
O as m,
|
|
197
|
+
I as n,
|
|
198
|
+
P as p,
|
|
199
|
+
B as r,
|
|
200
|
+
H as v
|
|
201
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";const A=require("./index-BYZhBzXZ.cjs"),$=require("./directive-DtixNHDT.cjs");class v{constructor(e,...t){this.nodes=[],this.host=e,this.host.addController(this),this.slots=t,this.nodes=[],this.observer=new MutationObserver(i=>this.handleMutations(i))}hostConnected(){this.updateNodes(),this.observer.observe(this.host,{childList:!0})}hostDisconnected(){this.observer.disconnect()}hostUpdated(){this.updateSlots()}updateNodes(){this.nodes=[],Array.from(this.host.childNodes).forEach(t=>{var i;if(t.nodeType===Node.TEXT_NODE&&((i=t.nodeValue)!=null&&i.trim())){const o=document==null?void 0:document.createElement("template");o.content.appendChild(t),this.nodes.push(o)}else this.isSlotElement(t)||this.nodes.push(t)})}updateSlots(){this.slots.forEach(e=>{if(!e.value)return;const t=e.value.getAttribute("name"),o=this.nodes.flatMap(n=>n.getAttribute&&n.getAttribute("slot")==t?this.nodeFromElement(n,e):[]).filter(n=>e.value&&!e.value.contains(n)&&!n.contains(e.value));o.length>0&&e.value.replaceChildren(...o)})}handleMutations(e){let t=!1;e.forEach(i=>{i.type==="childList"&&(i.addedNodes.forEach(o=>{var h;const n=o.nodeType===Node.ELEMENT_NODE&&!this.isSlotElement(o),l=o.nodeType===Node.TEXT_NODE&&((h=o.nodeValue)==null?void 0:h.trim());if(n)this.nodes.push(o),t=!0;else if(l){const d=document==null?void 0:document.createElement("template");d.content.appendChild(o),this.nodes.push(d),t=!0}}),i.removedNodes.forEach(o=>{this.nodes=this.nodes.filter(n=>n!==o),t=!0}))}),t&&this.updateSlots()}isSlotElement(e){return this.slots.some(t=>t.value===e)}nodeFromElement(e,t){var i;return e===((i=t.value)==null?void 0:i.parentNode)?[]:e instanceof HTMLTemplateElement?Array.from(e.content.childNodes):[e]}}/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2020 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
+
*/const{I:N}=A.Z,m=s=>s.strings===void 0,_=()=>document.createComment(""),E=(s,e,t)=>{var n;const i=s._$AA.parentNode,o=e===void 0?s._$AB:e._$AA;if(t===void 0){const l=i.insertBefore(_(),o),h=i.insertBefore(_(),o);t=new N(l,h,s,s.options)}else{const l=t._$AB.nextSibling,h=t._$AM,d=h!==s;if(d){let r;(n=t._$AQ)==null||n.call(t,s),t._$AM=s,t._$AP!==void 0&&(r=s._$AU)!==h._$AU&&t._$AP(r)}if(l!==o||d){let r=t._$AA;for(;r!==l;){const p=r.nextSibling;i.insertBefore(r,o),r=p}}}return t},g=(s,e,t=s)=>(s._$AI(e,t),s),C={},b=(s,e=C)=>s._$AH=e,M=s=>s._$AH,S=s=>{var i;(i=s._$AP)==null||i.call(s,!1,!0);let e=s._$AA;const t=s._$AB.nextSibling;for(;e!==t;){const o=e.nextSibling;e.remove(),e=o}};/**
|
|
6
|
+
* @license
|
|
7
|
+
* Copyright 2017 Google LLC
|
|
8
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
+
*/const c=(s,e)=>{var i;const t=s._$AN;if(t===void 0)return!1;for(const o of t)(i=o._$AO)==null||i.call(o,e,!1),c(o,e);return!0},a=s=>{let e,t;do{if((e=s._$AM)===void 0)break;t=e._$AN,t.delete(s),s=e}while((t==null?void 0:t.size)===0)},f=s=>{for(let e;e=s._$AM;s=e){let t=e._$AN;if(t===void 0)e._$AN=t=new Set;else if(t.has(s))break;t.add(s),Y(e)}};function T(s){this._$AN!==void 0?(a(this),this._$AM=s,f(this)):this._$AM=s}function y(s,e=!1,t=0){const i=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(e)if(Array.isArray(i))for(let n=t;n<i.length;n++)c(i[n],!1),a(i[n]);else i!=null&&(c(i,!1),a(i));else c(this,s)}const Y=s=>{s.type==$.t$1.CHILD&&(s._$AP??(s._$AP=y),s._$AQ??(s._$AQ=T))};class w extends $.i{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,t,i){super._$AT(e,t,i),f(this),this.isConnected=e._$AU}_$AO(e,t=!0){var i,o;e!==this.isConnected&&(this.isConnected=e,e?(i=this.reconnected)==null||i.call(this):(o=this.disconnected)==null||o.call(this)),t&&(c(this,e),a(this))}setValue(e){if(m(this._$Ct))this._$Ct._$AI(e,this);else{const t=[...this._$Ct._$AH];t[this._$Ci]=e,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}}/**
|
|
10
|
+
* @license
|
|
11
|
+
* Copyright 2020 Google LLC
|
|
12
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
+
*/const x=()=>new k;class k{}const u=new WeakMap,B=$.e(class extends w{render(s){return A.E}update(s,[e]){var i;const t=e!==this.Y;return t&&this.Y!==void 0&&this.rt(void 0),(t||this.lt!==this.ct)&&(this.Y=e,this.ht=(i=s.options)==null?void 0:i.host,this.rt(this.ct=s.element)),A.E}rt(s){if(this.isConnected||(s=void 0),typeof this.Y=="function"){const e=this.ht??globalThis;let t=u.get(e);t===void 0&&(t=new WeakMap,u.set(e,t)),t.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),t.set(this.Y,s),s!==void 0&&this.Y.call(this.ht,s)}else this.Y.value=s}get lt(){var s,e;return typeof this.Y=="function"?(s=u.get(this.ht??globalThis))==null?void 0:s.get(this.Y):(e=this.Y)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});exports.M=S;exports.PktSlotController=v;exports.e=x;exports.m=b;exports.n=B;exports.p=M;exports.r=E;exports.v=g;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oslokommune/punkt-elements",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.8.0",
|
|
4
4
|
"description": "Komponentbiblioteket til Punkt, et designsystem laget av Oslo Origo",
|
|
5
5
|
"homepage": "https://punkt.oslo.kommune.no",
|
|
6
6
|
"author": "Team Designsystem, Oslo Origo",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"urlpattern-polyfill": "^10.0.0"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@oslokommune/punkt-assets": "^12.7.
|
|
31
|
-
"@oslokommune/punkt-css": "^12.7.
|
|
30
|
+
"@oslokommune/punkt-assets": "^12.7.3",
|
|
31
|
+
"@oslokommune/punkt-css": "^12.7.3",
|
|
32
32
|
"sass": "^1.78.0",
|
|
33
33
|
"typescript": "^5.6.2",
|
|
34
34
|
"vite": "^5.4.4",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"url": "https://github.com/oslokommune/punkt/issues"
|
|
56
56
|
},
|
|
57
57
|
"license": "MIT",
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "6a26838f6a70751231f97d3419383cfc4532e1e4"
|
|
59
59
|
}
|
package/dist/ref-BuQtfKiL.cjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";const A=require("./index-BYZhBzXZ.cjs"),a=require("./directive-DtixNHDT.cjs");class p{constructor(e,...s){this.nodes=[],this.host=e,this.host.addController(this),this.slots=s,this.nodes=[]}hostConnected(){Array.from(this.host.childNodes).forEach(e=>{var s;if(e.nodeName==="#text"){if((s=e.nodeValue)!=null&&s.trim()){const i=document==null?void 0:document.createElement("template");i.content.appendChild(e),this.nodes.push(i)}}else this.nodes.push(e)})}hostUpdated(){this.slots.forEach(e=>{if(!e.value)return;const s=e.value.getAttribute("name"),i=this.nodes.flatMap(o=>o.getAttribute&&o.getAttribute("slot")==s?this.nodeFromElement(o,e):[]);i.length&&e.value.replaceChildren(...i)})}nodeFromElement(e,s){var i;return e===((i=s.value)==null?void 0:i.parentNode)?[]:e instanceof HTMLTemplateElement?Array.from(e.content.childNodes):e}}/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2020 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/const{I:m}=A.Z,g=t=>t.strings===void 0,u=()=>document.createComment(""),C=(t,e,s)=>{var n;const i=t._$AA.parentNode,o=e===void 0?t._$AB:e._$AA;if(s===void 0){const c=i.insertBefore(u(),o),l=i.insertBefore(u(),o);s=new m(c,l,t,t.options)}else{const c=s._$AB.nextSibling,l=s._$AM,_=l!==t;if(_){let h;(n=s._$AQ)==null||n.call(s,t),s._$AM=t,s._$AP!==void 0&&(h=t._$AU)!==l._$AU&&s._$AP(h)}if(c!==o||_){let h=s._$AA;for(;h!==c;){const v=h.nextSibling;i.insertBefore(h,o),h=v}}}return s},N=(t,e,s=t)=>(t._$AI(e,s),t),M={},Y=(t,e=M)=>t._$AH=e,b=t=>t._$AH,E=t=>{var i;(i=t._$AP)==null||i.call(t,!1,!0);let e=t._$AA;const s=t._$AB.nextSibling;for(;e!==s;){const o=e.nextSibling;e.remove(),e=o}};/**
|
|
6
|
-
* @license
|
|
7
|
-
* Copyright 2017 Google LLC
|
|
8
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const r=(t,e)=>{var i;const s=t._$AN;if(s===void 0)return!1;for(const o of s)(i=o._$AO)==null||i.call(o,e,!1),r(o,e);return!0},d=t=>{let e,s;do{if((e=t._$AM)===void 0)break;s=e._$AN,s.delete(t),t=e}while((s==null?void 0:s.size)===0)},f=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(s===void 0)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),S(e)}};function x(t){this._$AN!==void 0?(d(this),this._$AM=t,f(this)):this._$AM=t}function y(t,e=!1,s=0){const i=this._$AH,o=this._$AN;if(o!==void 0&&o.size!==0)if(e)if(Array.isArray(i))for(let n=s;n<i.length;n++)r(i[n],!1),d(i[n]);else i!=null&&(r(i,!1),d(i));else r(this,t)}const S=t=>{t.type==a.t$1.CHILD&&(t._$AP??(t._$AP=y),t._$AQ??(t._$AQ=x))};class k extends a.i{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,s,i){super._$AT(e,s,i),f(this),this.isConnected=e._$AU}_$AO(e,s=!0){var i,o;e!==this.isConnected&&(this.isConnected=e,e?(i=this.reconnected)==null||i.call(this):(o=this.disconnected)==null||o.call(this)),s&&(r(this,e),d(this))}setValue(e){if(g(this._$Ct))this._$Ct._$AI(e,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=e,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
|
|
10
|
-
* @license
|
|
11
|
-
* Copyright 2020 Google LLC
|
|
12
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const w=()=>new B;class B{}const $=new WeakMap,H=a.e(class extends k{render(t){return A.E}update(t,[e]){var i;const s=e!==this.Y;return s&&this.Y!==void 0&&this.rt(void 0),(s||this.lt!==this.ct)&&(this.Y=e,this.ht=(i=t.options)==null?void 0:i.host,this.rt(this.ct=t.element)),A.E}rt(t){if(this.isConnected||(t=void 0),typeof this.Y=="function"){const e=this.ht??globalThis;let s=$.get(e);s===void 0&&(s=new WeakMap,$.set(e,s)),s.get(this.Y)!==void 0&&this.Y.call(this.ht,void 0),s.set(this.Y,t),t!==void 0&&this.Y.call(this.ht,t)}else this.Y.value=t}get lt(){var t,e;return typeof this.Y=="function"?(t=$.get(this.ht??globalThis))==null?void 0:t.get(this.Y):(e=this.Y)==null?void 0:e.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});exports.M=E;exports.PktSlotController=p;exports.e=w;exports.m=Y;exports.n=H;exports.p=b;exports.r=C;exports.v=N;
|
package/dist/ref-rfvuMlT1.js
DELETED
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
import { Z as v, E as A } from "./index-CF6_-ZoF.js";
|
|
2
|
-
import { i as p, a as m, e as g } from "./directive-Cxhakbpr.js";
|
|
3
|
-
class H {
|
|
4
|
-
constructor(e, ...s) {
|
|
5
|
-
this.nodes = [], this.host = e, this.host.addController(this), this.slots = s, this.nodes = [];
|
|
6
|
-
}
|
|
7
|
-
hostConnected() {
|
|
8
|
-
Array.from(this.host.childNodes).forEach((e) => {
|
|
9
|
-
var s;
|
|
10
|
-
if (e.nodeName === "#text") {
|
|
11
|
-
if ((s = e.nodeValue) != null && s.trim()) {
|
|
12
|
-
const i = document == null ? void 0 : document.createElement("template");
|
|
13
|
-
i.content.appendChild(e), this.nodes.push(i);
|
|
14
|
-
}
|
|
15
|
-
} else
|
|
16
|
-
this.nodes.push(e);
|
|
17
|
-
});
|
|
18
|
-
}
|
|
19
|
-
hostUpdated() {
|
|
20
|
-
this.slots.forEach((e) => {
|
|
21
|
-
if (!e.value) return;
|
|
22
|
-
const s = e.value.getAttribute("name"), i = this.nodes.flatMap(
|
|
23
|
-
(o) => o.getAttribute && o.getAttribute("slot") == s ? this.nodeFromElement(o, e) : []
|
|
24
|
-
);
|
|
25
|
-
i.length && e.value.replaceChildren(...i);
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
nodeFromElement(e, s) {
|
|
29
|
-
var i;
|
|
30
|
-
return e === ((i = s.value) == null ? void 0 : i.parentNode) ? [] : e instanceof HTMLTemplateElement ? Array.from(e.content.childNodes) : e;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* @license
|
|
35
|
-
* Copyright 2020 Google LLC
|
|
36
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
|
-
*/
|
|
38
|
-
const { I: C } = v, N = (t) => t.strings === void 0, _ = () => document.createComment(""), P = (t, e, s) => {
|
|
39
|
-
var n;
|
|
40
|
-
const i = t._$AA.parentNode, o = e === void 0 ? t._$AB : e._$AA;
|
|
41
|
-
if (s === void 0) {
|
|
42
|
-
const c = i.insertBefore(_(), o), l = i.insertBefore(_(), o);
|
|
43
|
-
s = new C(c, l, t, t.options);
|
|
44
|
-
} else {
|
|
45
|
-
const c = s._$AB.nextSibling, l = s._$AM, $ = l !== t;
|
|
46
|
-
if ($) {
|
|
47
|
-
let h;
|
|
48
|
-
(n = s._$AQ) == null || n.call(s, t), s._$AM = t, s._$AP !== void 0 && (h = t._$AU) !== l._$AU && s._$AP(h);
|
|
49
|
-
}
|
|
50
|
-
if (c !== o || $) {
|
|
51
|
-
let h = s._$AA;
|
|
52
|
-
for (; h !== c; ) {
|
|
53
|
-
const u = h.nextSibling;
|
|
54
|
-
i.insertBefore(h, o), h = u;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return s;
|
|
59
|
-
}, S = (t, e, s = t) => (t._$AI(e, s), t), Y = {}, T = (t, e = Y) => t._$AH = e, k = (t) => t._$AH, I = (t) => {
|
|
60
|
-
var i;
|
|
61
|
-
(i = t._$AP) == null || i.call(t, !1, !0);
|
|
62
|
-
let e = t._$AA;
|
|
63
|
-
const s = t._$AB.nextSibling;
|
|
64
|
-
for (; e !== s; ) {
|
|
65
|
-
const o = e.nextSibling;
|
|
66
|
-
e.remove(), e = o;
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
/**
|
|
70
|
-
* @license
|
|
71
|
-
* Copyright 2017 Google LLC
|
|
72
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
73
|
-
*/
|
|
74
|
-
const r = (t, e) => {
|
|
75
|
-
var i;
|
|
76
|
-
const s = t._$AN;
|
|
77
|
-
if (s === void 0) return !1;
|
|
78
|
-
for (const o of s) (i = o._$AO) == null || i.call(o, e, !1), r(o, e);
|
|
79
|
-
return !0;
|
|
80
|
-
}, d = (t) => {
|
|
81
|
-
let e, s;
|
|
82
|
-
do {
|
|
83
|
-
if ((e = t._$AM) === void 0) break;
|
|
84
|
-
s = e._$AN, s.delete(t), t = e;
|
|
85
|
-
} while ((s == null ? void 0 : s.size) === 0);
|
|
86
|
-
}, f = (t) => {
|
|
87
|
-
for (let e; e = t._$AM; t = e) {
|
|
88
|
-
let s = e._$AN;
|
|
89
|
-
if (s === void 0) e._$AN = s = /* @__PURE__ */ new Set();
|
|
90
|
-
else if (s.has(t)) break;
|
|
91
|
-
s.add(t), x(e);
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
function b(t) {
|
|
95
|
-
this._$AN !== void 0 ? (d(this), this._$AM = t, f(this)) : this._$AM = t;
|
|
96
|
-
}
|
|
97
|
-
function M(t, e = !1, s = 0) {
|
|
98
|
-
const i = this._$AH, o = this._$AN;
|
|
99
|
-
if (o !== void 0 && o.size !== 0) if (e) if (Array.isArray(i)) for (let n = s; n < i.length; n++) r(i[n], !1), d(i[n]);
|
|
100
|
-
else i != null && (r(i, !1), d(i));
|
|
101
|
-
else r(this, t);
|
|
102
|
-
}
|
|
103
|
-
const x = (t) => {
|
|
104
|
-
t.type == m.CHILD && (t._$AP ?? (t._$AP = M), t._$AQ ?? (t._$AQ = b));
|
|
105
|
-
};
|
|
106
|
-
class y extends p {
|
|
107
|
-
constructor() {
|
|
108
|
-
super(...arguments), this._$AN = void 0;
|
|
109
|
-
}
|
|
110
|
-
_$AT(e, s, i) {
|
|
111
|
-
super._$AT(e, s, i), f(this), this.isConnected = e._$AU;
|
|
112
|
-
}
|
|
113
|
-
_$AO(e, s = !0) {
|
|
114
|
-
var i, o;
|
|
115
|
-
e !== this.isConnected && (this.isConnected = e, e ? (i = this.reconnected) == null || i.call(this) : (o = this.disconnected) == null || o.call(this)), s && (r(this, e), d(this));
|
|
116
|
-
}
|
|
117
|
-
setValue(e) {
|
|
118
|
-
if (N(this._$Ct)) this._$Ct._$AI(e, this);
|
|
119
|
-
else {
|
|
120
|
-
const s = [...this._$Ct._$AH];
|
|
121
|
-
s[this._$Ci] = e, this._$Ct._$AI(s, this, 0);
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
disconnected() {
|
|
125
|
-
}
|
|
126
|
-
reconnected() {
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
/**
|
|
130
|
-
* @license
|
|
131
|
-
* Copyright 2020 Google LLC
|
|
132
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
133
|
-
*/
|
|
134
|
-
const U = () => new E();
|
|
135
|
-
class E {
|
|
136
|
-
}
|
|
137
|
-
const a = /* @__PURE__ */ new WeakMap(), z = g(class extends y {
|
|
138
|
-
render(t) {
|
|
139
|
-
return A;
|
|
140
|
-
}
|
|
141
|
-
update(t, [e]) {
|
|
142
|
-
var i;
|
|
143
|
-
const s = e !== this.Y;
|
|
144
|
-
return s && this.Y !== void 0 && this.rt(void 0), (s || this.lt !== this.ct) && (this.Y = e, this.ht = (i = t.options) == null ? void 0 : i.host, this.rt(this.ct = t.element)), A;
|
|
145
|
-
}
|
|
146
|
-
rt(t) {
|
|
147
|
-
if (this.isConnected || (t = void 0), typeof this.Y == "function") {
|
|
148
|
-
const e = this.ht ?? globalThis;
|
|
149
|
-
let s = a.get(e);
|
|
150
|
-
s === void 0 && (s = /* @__PURE__ */ new WeakMap(), a.set(e, s)), s.get(this.Y) !== void 0 && this.Y.call(this.ht, void 0), s.set(this.Y, t), t !== void 0 && this.Y.call(this.ht, t);
|
|
151
|
-
} else this.Y.value = t;
|
|
152
|
-
}
|
|
153
|
-
get lt() {
|
|
154
|
-
var t, e;
|
|
155
|
-
return typeof this.Y == "function" ? (t = a.get(this.ht ?? globalThis)) == null ? void 0 : t.get(this.Y) : (e = this.Y) == null ? void 0 : e.value;
|
|
156
|
-
}
|
|
157
|
-
disconnected() {
|
|
158
|
-
this.lt === this.ct && this.rt(void 0);
|
|
159
|
-
}
|
|
160
|
-
reconnected() {
|
|
161
|
-
this.rt(this.ct);
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
export {
|
|
165
|
-
I as M,
|
|
166
|
-
H as P,
|
|
167
|
-
U as e,
|
|
168
|
-
T as m,
|
|
169
|
-
z as n,
|
|
170
|
-
k as p,
|
|
171
|
-
P as r,
|
|
172
|
-
S as v
|
|
173
|
-
};
|