@3mo/file-upload 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/package.json +1 -1
  2. package/dist/FileUpload/FileUpload.d.ts +0 -37
  3. package/dist/FileUpload/FileUpload.d.ts.map +0 -1
  4. package/dist/FileUpload/index.d.ts +0 -2
  5. package/dist/FileUpload/index.d.ts.map +0 -1
  6. package/dist/bundle.js +0 -25
  7. package/dist/localization/CardinalPluralizationRulesByLanguage.d.ts +0 -13
  8. package/dist/localization/CardinalPluralizationRulesByLanguage.d.ts.map +0 -1
  9. package/dist/localization/DirectionsByLanguage.d.ts +0 -11
  10. package/dist/localization/DirectionsByLanguage.d.ts.map +0 -1
  11. package/dist/localization/LanguageCode.d.ts +0 -187
  12. package/dist/localization/LanguageCode.d.ts.map +0 -1
  13. package/dist/localization/LanguageController.d.ts +0 -10
  14. package/dist/localization/LanguageController.d.ts.map +0 -1
  15. package/dist/localization/Localizer.d.ts +0 -41
  16. package/dist/localization/Localizer.d.ts.map +0 -1
  17. package/dist/localization/formatters/Currency.d.ts +0 -373
  18. package/dist/localization/formatters/Currency.d.ts.map +0 -1
  19. package/dist/localization/formatters/Date.format.d.ts +0 -31
  20. package/dist/localization/formatters/Date.format.d.ts.map +0 -1
  21. package/dist/localization/formatters/Date.formatAsDate.d.ts +0 -9
  22. package/dist/localization/formatters/Date.formatAsDate.d.ts.map +0 -1
  23. package/dist/localization/formatters/Date.formatAsTime.d.ts +0 -9
  24. package/dist/localization/formatters/Date.formatAsTime.d.ts.map +0 -1
  25. package/dist/localization/formatters/Number.format.d.ts +0 -9
  26. package/dist/localization/formatters/Number.format.d.ts.map +0 -1
  27. package/dist/localization/formatters/Number.formatAsCurrency.d.ts +0 -12
  28. package/dist/localization/formatters/Number.formatAsCurrency.d.ts.map +0 -1
  29. package/dist/localization/formatters/Number.formatAsPercent.d.ts +0 -9
  30. package/dist/localization/formatters/Number.formatAsPercent.d.ts.map +0 -1
  31. package/dist/localization/formatters/Number.formatAsUnit.d.ts +0 -11
  32. package/dist/localization/formatters/Number.formatAsUnit.d.ts.map +0 -1
  33. package/dist/localization/formatters/OptionsWithLanguage.d.ts +0 -5
  34. package/dist/localization/formatters/OptionsWithLanguage.d.ts.map +0 -1
  35. package/dist/localization/formatters/String.toNumber.d.ts +0 -7
  36. package/dist/localization/formatters/String.toNumber.d.ts.map +0 -1
  37. package/dist/localization/formatters/index.d.ts +0 -10
  38. package/dist/localization/formatters/index.d.ts.map +0 -1
  39. package/dist/localization/index.d.ts +0 -7
  40. package/dist/localization/index.d.ts.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@3mo/file-upload",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "File Upload facilitates the upload of files.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,37 +0,0 @@
1
- import { Component } from '@a11d/lit';
2
- import '@3mo/localization';
3
- /**
4
- * @element mo-file-upload - Facilitates the upload of files.
5
- *
6
- * @attr upload - The mandatory upload function that is called when the user selects a file.
7
- * @attr uploadOnSelection
8
- *
9
- * @i18n "Upload has failed. Try again."
10
- *
11
- * @fires change {CustomEvent<TResult | undefined>} - Fired when the uploading process results in success or failure. The event detail is the result of the upload, either the result of the upload function or undefined if the upload failed.
12
- * @fires uploadingChange {CustomEvent<boolean>} - Fired when the uploading process starts or ends. The event detail is true if the uploading process has started, false otherwise.
13
- * @fires fileChange {CustomEvent<File | undefined>} - Fired when the selected file changes. The event detail is the selected file or undefined if no file is selected.
14
- */
15
- export declare class FileUpload<TResult> extends Component {
16
- readonly change: EventDispatcher<TResult | undefined>;
17
- readonly uploadingChange: EventDispatcher<boolean>;
18
- readonly fileChange: EventDispatcher<File | undefined>;
19
- upload: (file: File) => Promise<TResult>;
20
- uploadOnSelection: boolean;
21
- protected isUploading: boolean;
22
- protected readonly inputElement: HTMLInputElement;
23
- openExplorer(): void;
24
- get file(): File | undefined;
25
- executeUpload(action?: () => Promise<TResult>): Promise<TResult>;
26
- uploadFile(file?: File): Promise<TResult>;
27
- protected setIsUploading(isUploading: boolean): void;
28
- protected resetFiles(): void;
29
- protected get template(): import("lit-html").TemplateResult<1>;
30
- private handleChange;
31
- }
32
- declare global {
33
- interface HTMLElementTagNameMap {
34
- 'mo-file-upload': FileUpload<unknown>;
35
- }
36
- }
37
- //# sourceMappingURL=FileUpload.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileUpload.d.ts","sourceRoot":"","sources":["../../FileUpload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAkD,MAAM,WAAW,CAAA;AAErF,OAAO,mBAAmB,CAAA;AAE1B;;;;;;;;;;;GAWG;AACH,qBACa,UAAU,CAAC,OAAO,CAAE,SAAQ,SAAS;IACxC,QAAQ,CAAC,MAAM,EAAG,eAAe,CAAC,OAAO,GAAG,SAAS,CAAC,CAAA;IACtD,QAAQ,CAAC,eAAe,EAAG,eAAe,CAAC,OAAO,CAAC,CAAA;IACnD,QAAQ,CAAC,UAAU,EAAG,eAAe,CAAC,IAAI,GAAG,SAAS,CAAC,CAAA;IAElC,MAAM,EAAG,CAAC,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;IAC1C,iBAAiB,UAAQ;IAE7C,SAAS,CAAC,WAAW,UAAQ;IAEtB,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAG,gBAAgB,CAAA;IAElE,YAAY;IAIZ,IAAI,IAAI,qBAA0C;IAE5C,aAAa,CAAC,MAAM,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC;IAiBnD,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI;IAQtB,SAAS,CAAC,cAAc,CAAC,WAAW,EAAE,OAAO;IAK7C,SAAS,CAAC,UAAU;IAKpB,cAAuB,QAAQ,yCAE9B;IAED,OAAO,CAAC,YAAY,CAInB;CACD;AAED,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,qBAAqB;QAC9B,gBAAgB,EAAE,UAAU,CAAC,OAAO,CAAC,CAAA;KACrC;CACD"}
@@ -1,2 +0,0 @@
1
- export * from './FileUpload.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
package/dist/bundle.js DELETED
@@ -1,25 +0,0 @@
1
- (()=>{"use strict";var e={388:(t,e)=>{(function(t){t.Unidentified="Unidentified",t.Alt="Alt",t.AltGraph="AltGraph",t.CapsLock="CapsLock",t.Control="Control",t.Fn="Fn",t.FnLock="FnLock",t.Hyper="Hyper",t.Meta="Meta",t.NumLock="NumLock",t.ScrollLock="ScrollLock",t.Shift="Shift",t.Super="Super",t.Symbol="Symbol",t.SymbolLock="SymbolLock",t.Enter="Enter",t.Tab="Tab",t.ArrowDown="ArrowDown",t.ArrowLeft="ArrowLeft",t.ArrowRight="ArrowRight",t.ArrowUp="ArrowUp",t.End="End",t.Home="Home",t.PageDown="PageDown",t.PageUp="PageUp",t.Backspace="Backspace",t.Clear="Clear",t.Copy="Copy",t.CrSel="CrSel",t.Cut="Cut",t.Delete="Delete",t.EraseEof="EraseEof",t.ExSel="ExSel",t.Insert="Insert",t.Paste="Paste",t.Redo="Redo",t.Undo="Undo",t.Accept="Accept",t.Again="Again",t.Attn="Attn",t.Cancel="Cancel",t.ContextMenu="ContextMenu",t.Escape="Escape",t.Execute="Execute",t.Find="Find",t.Finish="Finish",t.Help="Help",t.Pause="Pause",t.Play="Play",t.Props="Props",t.Select="Select",t.ZoomIn="ZoomIn",t.ZoomOut="ZoomOut",t.BrightnessDown="BrightnessDown",t.BrightnessUp="BrightnessUp",t.Eject="Eject",t.LogOff="LogOff",t.Power="Power",t.PowerOff="PowerOff",t.PrintScreen="PrintScreen",t.Hibernate="Hibernate",t.Standby="Standby",t.WakeUp="WakeUp",t.AllCandidates="AllCandidates",t.Alphanumeric="Alphanumeric",t.CodeInput="CodeInput",t.Compose="Compose",t.Convert="Convert",t.Dead="Dead",t.FinalMode="FinalMode",t.GroupFirst="GroupFirst",t.GroupLast="GroupLast",t.GroupNext="GroupNext",t.GroupPrevious="GroupPrevious",t.ModeChange="ModeChange",t.NextCandidate="NextCandidate",t.NonConvert="NonConvert",t.PreviousCandidate="PreviousCandidate",t.Process="Process",t.SingleCandidate="SingleCandidate",t.HangulMode="HangulMode",t.HanjaMode="HanjaMode",t.JunjaMode="JunjaMode",t.Eisu="Eisu",t.Hankaku="Hankaku",t.Hiragana="Hiragana",t.HiraganaKatakana="HiraganaKatakana",t.KanaMode="KanaMode",t.KanjiMode="KanjiMode",t.Katakana="Katakana",t.Romaji="Romaji",t.Zenkaku="Zenkaku",t.ZenkakuHanaku="ZenkakuHanaku",t.F1="F1",t.F2="F2",t.F3="F3",t.F4="F4",t.F5="F5",t.F6="F6",t.F7="F7",t.F8="F8",t.F9="F9",t.F10="F10",t.F11="F11",t.F12="F12",t.F13="F13",t.F14="F14",t.F15="F15",t.F16="F16",t.F17="F17",t.F18="F18",t.F19="F19",t.F20="F20",t.Soft1="Soft1",t.Soft2="Soft2",t.Soft3="Soft3",t.Soft4="Soft4",t.AppSwitch="AppSwitch",t.Call="Call",t.Camera="Camera",t.CameraFocus="CameraFocus",t.EndCall="EndCall",t.GoBack="GoBack",t.GoHome="GoHome",t.HeadsetHook="HeadsetHook",t.LastNumberRedial="LastNumberRedial",t.Notification="Notification",t.MannerMode="MannerMode",t.VoiceDial="VoiceDial",t.ChannelDown="ChannelDown",t.ChannelUp="ChannelUp",t.MediaFastForward="MediaFastForward",t.MediaPause="MediaPause",t.MediaPlay="MediaPlay",t.MediaPlayPause="MediaPlayPause",t.MediaRecord="MediaRecord",t.MediaRewind="MediaRewind",t.MediaStop="MediaStop",t.MediaTrackNext="MediaTrackNext",t.MediaTrackPrevious="MediaTrackPrevious",t.AudioBalanceLeft="AudioBalanceLeft",t.AudioBalanceRight="AudioBalanceRight",t.AudioBassDown="AudioBassDown",t.AudioBassBoostDown="AudioBassBoostDown",t.AudioBassBoostToggle="AudioBassBoostToggle",t.AudioBassBoostUp="AudioBassBoostUp",t.AudioBassUp="AudioBassUp",t.AudioFaderFront="AudioFaderFront",t.AudioFaderRear="AudioFaderRear",t.AudioSurroundModeNext="AudioSurroundModeNext",t.AudioTrebleDown="AudioTrebleDown",t.AudioTrebleUp="AudioTrebleUp",t.AudioVolumeDown="AudioVolumeDown",t.AudioVolumeMute="AudioVolumeMute",t.AudioVolumeUp="AudioVolumeUp",t.MicrophoneToggle="MicrophoneToggle",t.MicrophoneVolumeDown="MicrophoneVolumeDown",t.MicrophoneVolumeMute="MicrophoneVolumeMute",t.MicrophoneVolumeUp="MicrophoneVolumeUp",t.TV="TV",t.TV3DMode="TV3DMode",t.TVAntennaCable="TVAntennaCable",t.TVAudioDescription="TVAudioDescription",t.TVAudioDescriptionMixDown="TVAudioDescriptionMixDown",t.TVAudioDescriptionMixUp="TVAudioDescriptionMixUp",t.TVContentsMenu="TVContentsMenu",t.TVDataService="TVDataService",t.TVInput="TVInput",t.TVInputComponent1="TVInputComponent1",t.TVInputComponent2="TVInputComponent2",t.TVInputComposite1="TVInputComposite1",t.TVInputComposite2="TVInputComposite2",t.TVInputHDMI1="TVInputHDMI1",t.TVInputHDMI2="TVInputHDMI2",t.TVInputHDMI3="TVInputHDMI3",t.TVInputHDMI4="TVInputHDMI4",t.TVInputVGA1="TVInputVGA1",t.TVMediaContext="TVMediaContext",t.TVNetwork="TVNetwork",t.TVNumberEntry="TVNumberEntry",t.TVPower="TVPower",t.TVRadioService="TVRadioService",t.TVSatellite="TVSatellite",t.TVSatelliteBS="TVSatelliteBS",t.TVSatelliteCS="TVSatelliteCS",t.TVSatelliteToggle="TVSatelliteToggle",t.TVTerrestrialAnalog="TVTerrestrialAnalog",t.TVTerrestrialDigital="TVTerrestrialDigital",t.TVTimer="TVTimer",t.AVRInput="AVRInput",t.AVRPower="AVRPower",t.ColorF0Red="ColorF0Red",t.ColorF1Green="ColorF1Green",t.ColorF2Yellow="ColorF2Yellow",t.ColorF3Blue="ColorF3Blue",t.ColorF4Grey="ColorF4Grey",t.ColorF5Brown="ColorF5Brown",t.ClosedCaptionToggle="ClosedCaptionToggle",t.Dimmer="Dimmer",t.DisplaySwap="DisplaySwap",t.DVR="DVR",t.Exit="Exit",t.FavoriteClear0="FavoriteClear0",t.FavoriteClear1="FavoriteClear1",t.FavoriteClear2="FavoriteClear2",t.FavoriteClear3="FavoriteClear3",t.FavoriteRecall0="FavoriteRecall0",t.FavoriteRecall1="FavoriteRecall1",t.FavoriteRecall2="FavoriteRecall2",t.FavoriteRecall3="FavoriteRecall3",t.FavoriteStore0="FavoriteStore0",t.FavoriteStore1="FavoriteStore1",t.FavoriteStore2="FavoriteStore2",t.FavoriteStore3="FavoriteStore3",t.Guide="Guide",t.GuideNextDay="GuideNextDay",t.GuidePreviousDay="GuidePreviousDay",t.Info="Info",t.InstantReplay="InstantReplay",t.Link="Link",t.ListProgram="ListProgram",t.LiveContent="LiveContent",t.Lock="Lock",t.MediaApps="MediaApps",t.MediaAudioTrack="MediaAudioTrack",t.MediaLast="MediaLast",t.MediaSkipBackward="MediaSkipBackward",t.MediaSkipForward="MediaSkipForward",t.MediaStepBackward="MediaStepBackward",t.MediaStepForward="MediaStepForward",t.MediaTopMenu="MediaTopMenu",t.NavigateIn="NavigateIn",t.NavigateNext="NavigateNext",t.NavigateOut="NavigateOut",t.NavigatePrevious="NavigatePrevious",t.NextFavoriteChannel="NextFavoriteChannel",t.NextUserProfile="NextUserProfile",t.OnDemand="OnDemand",t.Pairing="Pairing",t.PinPDown="PinPDown",t.PinPMove="PinPMove",t.PinPToggle="PinPToggle",t.PinPUp="PinPUp",t.PlaySpeedDown="PlaySpeedDown",t.PlaySpeedReset="PlaySpeedReset",t.PlaySpeedUp="PlaySpeedUp",t.RandomToggle="RandomToggle",t.RcLowBattery="RcLowBattery",t.RecordSpeedNext="RecordSpeedNext",t.RfBypass="RfBypass",t.ScanChannelsToggle="ScanChannelsToggle",t.ScreenModeNext="ScreenModeNext",t.Settings="Settings",t.SplitScreenToggle="SplitScreenToggle",t.STBInput="STBInput",t.STBPower="STBPower",t.Subtitle="Subtitle",t.Teletext="Teletext",t.VideoModeNext="VideoModeNext",t.Wink="Wink",t.ZoomToggle="ZoomToggle",t.SpeechCorrectionList="SpeechCorrectionList",t.SpeechInputToggle="SpeechInputToggle",t.Close="Close",t.New="New",t.Open="Open",t.Print="Print",t.Save="Save",t.SpellCheck="SpellCheck",t.MailForward="MailForward",t.MailReply="MailReply",t.MailSend="MailSend",t.LaunchCalculator="LaunchCalculator",t.LaunchCalendar="LaunchCalendar",t.LaunchContacts="LaunchContacts",t.LaunchMail="LaunchMail",t.LaunchMediaPlayer="LaunchMediaPlayer",t.LaunchMusicPlayer="LaunchMusicPlayer",t.LaunchMyComputer="LaunchMyComputer",t.LaunchPhone="LaunchPhone",t.LaunchScreenSaver="LaunchScreenSaver",t.LaunchSpreadsheet="LaunchSpreadsheet",t.LaunchWebBrowser="LaunchWebBrowser",t.LaunchWebCam="LaunchWebCam",t.LaunchWordProcessor="LaunchWordProcessor",t.LaunchApplication1="LaunchApplication1",t.LaunchApplication2="LaunchApplication2",t.LaunchApplication3="LaunchApplication3",t.LaunchApplication4="LaunchApplication4",t.LaunchApplication5="LaunchApplication5",t.LaunchApplication6="LaunchApplication6",t.LaunchApplication7="LaunchApplication7",t.LaunchApplication8="LaunchApplication8",t.LaunchApplication9="LaunchApplication9",t.LaunchApplication10="LaunchApplication10",t.LaunchApplication11="LaunchApplication11",t.LaunchApplication12="LaunchApplication12",t.LaunchApplication13="LaunchApplication13",t.LaunchApplication14="LaunchApplication14",t.LaunchApplication15="LaunchApplication15",t.LaunchApplication16="LaunchApplication16",t.BrowserBack="BrowserBack",t.BrowserFavorites="BrowserFavorites",t.BrowserForward="BrowserForward",t.BrowserHome="BrowserHome",t.BrowserRefresh="BrowserRefresh",t.BrowserSearch="BrowserSearch",t.BrowserStop="BrowserStop",t.Decimal="Decimal",t.Key11="Key11",t.Key12="Key12",t.Multiply="Multiply",t.Add="Add",t.Divide="Divide",t.Subtract="Subtract",t.Separator="Separator"})(e.s||(e.s={}))}},n={};function i(t){var r=n[t];if(void 0!==r)return r.exports;var o=n[t]={exports:{}};return e[t](o,o.exports,i),o.exports}(()=>{function e(t,e,n,i){var r,o=arguments.length,s=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(s=(o<3?r(s):o>3?r(e,n,s):r(e,n))||s);return o>3&&s&&Object.defineProperty(e,n,s),s}Object.create;Object.create;const n=window,r=n.ShadowRoot&&(void 0===n.ShadyCSS||n.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,o=Symbol(),s=new WeakMap;class a{constructor(t,e,n){if(this._$cssResult$=!0,n!==o)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const e=this.t;if(r&&void 0===t){const n=void 0!==e&&1===e.length;n&&(t=s.get(e)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&s.set(e,t))}return t}toString(){return this.cssText}}const c=(t,...e)=>{const n=1===t.length?t[0]:e.reduce(((e,n,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+t[i+1]),t[0]);return new a(n,t,o)},l=r?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const n of t.cssRules)e+=n.cssText;return(t=>new a("string"==typeof t?t:t+"",void 0,o))(e)})(t):t;var h;const u=window,d=u.trustedTypes,p=d?d.emptyScript:"",f=u.reactiveElementPolyfillSupport,g={toAttribute(t,e){switch(e){case Boolean:t=t?p:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let n=t;switch(e){case Boolean:n=null!==t;break;case Number:n=null===t?null:Number(t);break;case Object:case Array:try{n=JSON.parse(t)}catch(t){n=null}}return n}},m=(t,e)=>e!==t&&(e==e||t==t),v={attribute:!0,type:String,converter:g,reflect:!1,hasChanged:m};class y extends HTMLElement{constructor(){super(),this._$Ei=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$El=null,this.u()}static addInitializer(t){var e;this.finalize(),(null!==(e=this.h)&&void 0!==e?e:this.h=[]).push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,n)=>{const i=this._$Ep(n,e);void 0!==i&&(this._$Ev.set(i,n),t.push(i))})),t}static createProperty(t,e=v){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const n="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,n,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,n){return{get(){return this[e]},set(i){const r=this[t];this[e]=i,this.requestUpdate(t,r,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||v}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),void 0!==t.h&&(this.h=[...t.h]),this.elementProperties=new Map(t.elementProperties),this._$Ev=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const n of e)this.createProperty(n,t[n])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const n=new Set(t.flat(1/0).reverse());for(const t of n)e.unshift(l(t))}else void 0!==t&&e.push(l(t));return e}static _$Ep(t,e){const n=e.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof t?t.toLowerCase():void 0}u(){var t;this._$E_=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Eg(),this.requestUpdate(),null===(t=this.constructor.h)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,n;(null!==(e=this._$ES)&&void 0!==e?e:this._$ES=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(n=t.hostConnected)||void 0===n||n.call(t))}removeController(t){var e;null===(e=this._$ES)||void 0===e||e.splice(this._$ES.indexOf(t)>>>0,1)}_$Eg(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Ei.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{r?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const i=document.createElement("style"),r=n.litNonce;void 0!==r&&i.setAttribute("nonce",r),i.textContent=e.cssText,t.appendChild(i)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,n){this._$AK(t,n)}_$EO(t,e,n=v){var i;const r=this.constructor._$Ep(t,n);if(void 0!==r&&!0===n.reflect){const o=(void 0!==(null===(i=n.converter)||void 0===i?void 0:i.toAttribute)?n.converter:g).toAttribute(e,n.type);this._$El=t,null==o?this.removeAttribute(r):this.setAttribute(r,o),this._$El=null}}_$AK(t,e){var n;const i=this.constructor,r=i._$Ev.get(t);if(void 0!==r&&this._$El!==r){const t=i.getPropertyOptions(r),o="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==(null===(n=t.converter)||void 0===n?void 0:n.fromAttribute)?t.converter:g;this._$El=r,this[r]=o.fromAttribute(e,t.type),this._$El=null}}requestUpdate(t,e,n){let i=!0;void 0!==t&&(((n=n||this.constructor.getPropertyOptions(t)).hasChanged||m)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===n.reflect&&this._$El!==t&&(void 0===this._$EC&&(this._$EC=new Map),this._$EC.set(t,n))):i=!1),!this.isUpdatePending&&i&&(this._$E_=this._$Ej())}async _$Ej(){this.isUpdatePending=!0;try{await this._$E_}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Ei&&(this._$Ei.forEach(((t,e)=>this[e]=t)),this._$Ei=void 0);let e=!1;const n=this._$AL;try{e=this.shouldUpdate(n),e?(this.willUpdate(n),null===(t=this._$ES)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(n)):this._$Ek()}catch(t){throw e=!1,this._$Ek(),t}e&&this._$AE(n)}willUpdate(t){}_$AE(t){var e;null===(e=this._$ES)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$Ek(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$E_}shouldUpdate(t){return!0}update(t){void 0!==this._$EC&&(this._$EC.forEach(((t,e)=>this._$EO(e,this[e],t))),this._$EC=void 0),this._$Ek()}updated(t){}firstUpdated(t){}}var w;y.finalized=!0,y.elementProperties=new Map,y.elementStyles=[],y.shadowRootOptions={mode:"open"},null==f||f({ReactiveElement:y}),(null!==(h=u.reactiveElementVersions)&&void 0!==h?h:u.reactiveElementVersions=[]).push("1.6.1");const A=window,C=A.trustedTypes,S=C?C.createPolicy("lit-html",{createHTML:t=>t}):void 0,$="$lit$",b=`lit$${(Math.random()+"").slice(9)}$`,E="?"+b,x=`<${E}>`,_=document,P=()=>_.createComment(""),k=t=>null===t||"object"!=typeof t&&"function"!=typeof t,T=Array.isArray,R=t=>T(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]),L="[ \t\n\f\r]",M=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,D=/-->/g,N=/>/g,I=RegExp(`>|${L}(?:([^\\s"'>=/]+)(${L}*=${L}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),F=/'/g,U=/"/g,H=/^(?:script|style|textarea|title)$/i,O=t=>(e,...n)=>({_$litType$:t,strings:e,values:n}),B=O(1),V=O(2),j=Symbol.for("lit-noChange"),G=Symbol.for("lit-nothing"),W=new WeakMap,K=_.createTreeWalker(_,129,null,!1),z=(t,e)=>{const n=t.length-1,i=[];let r,o=2===e?"<svg>":"",s=M;for(let e=0;e<n;e++){const n=t[e];let a,c,l=-1,h=0;for(;h<n.length&&(s.lastIndex=h,c=s.exec(n),null!==c);)h=s.lastIndex,s===M?"!--"===c[1]?s=D:void 0!==c[1]?s=N:void 0!==c[2]?(H.test(c[2])&&(r=RegExp("</"+c[2],"g")),s=I):void 0!==c[3]&&(s=I):s===I?">"===c[0]?(s=null!=r?r:M,l=-1):void 0===c[1]?l=-2:(l=s.lastIndex-c[2].length,a=c[1],s=void 0===c[3]?I:'"'===c[3]?U:F):s===U||s===F?s=I:s===D||s===N?s=M:(s=I,r=void 0);const u=s===I&&t[e+1].startsWith("/>")?" ":"";o+=s===M?n+x:l>=0?(i.push(a),n.slice(0,l)+$+n.slice(l)+b+u):n+b+(-2===l?(i.push(void 0),e):u)}const a=o+(t[n]||"<?>")+(2===e?"</svg>":"");if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==S?S.createHTML(a):a,i]};class q{constructor({strings:t,_$litType$:e},n){let i;this.parts=[];let r=0,o=0;const s=t.length-1,a=this.parts,[c,l]=z(t,e);if(this.el=q.createElement(c,n),K.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=K.nextNode())&&a.length<s;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const e of i.getAttributeNames())if(e.endsWith($)||e.startsWith(b)){const n=l[o++];if(t.push(e),void 0!==n){const t=i.getAttribute(n.toLowerCase()+$).split(b),e=/([.?@])?(.*)/.exec(n);a.push({type:1,index:r,name:e[2],strings:t,ctor:"."===e[1]?Q:"?"===e[1]?et:"@"===e[1]?nt:J})}else a.push({type:6,index:r})}for(const e of t)i.removeAttribute(e)}if(H.test(i.tagName)){const t=i.textContent.split(b),e=t.length-1;if(e>0){i.textContent=C?C.emptyScript:"";for(let n=0;n<e;n++)i.append(t[n],P()),K.nextNode(),a.push({type:2,index:++r});i.append(t[e],P())}}}else if(8===i.nodeType)if(i.data===E)a.push({type:2,index:r});else{let t=-1;for(;-1!==(t=i.data.indexOf(b,t+1));)a.push({type:7,index:r}),t+=b.length-1}r++}}static createElement(t,e){const n=_.createElement("template");return n.innerHTML=t,n}}function Z(t,e,n=t,i){var r,o,s,a;if(e===j)return e;let c=void 0!==i?null===(r=n._$Co)||void 0===r?void 0:r[i]:n._$Cl;const l=k(e)?void 0:e._$litDirective$;return(null==c?void 0:c.constructor)!==l&&(null===(o=null==c?void 0:c._$AO)||void 0===o||o.call(c,!1),void 0===l?c=void 0:(c=new l(t),c._$AT(t,n,i)),void 0!==i?(null!==(s=(a=n)._$Co)&&void 0!==s?s:a._$Co=[])[i]=c:n._$Cl=c),void 0!==c&&(e=Z(t,c._$AS(t,e.values),c,i)),e}class X{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:n},parts:i}=this._$AD,r=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:_).importNode(n,!0);K.currentNode=r;let o=K.nextNode(),s=0,a=0,c=i[0];for(;void 0!==c;){if(s===c.index){let e;2===c.type?e=new Y(o,o.nextSibling,this,t):1===c.type?e=new c.ctor(o,c.name,c.strings,this,t):6===c.type&&(e=new it(o,this,t)),this._$AV.push(e),c=i[++a]}s!==(null==c?void 0:c.index)&&(o=K.nextNode(),s++)}return r}v(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class Y{constructor(t,e,n,i){var r;this.type=2,this._$AH=G,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=i,this._$Cp=null===(r=null==i?void 0:i.isConnected)||void 0===r||r}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Z(this,t,e),k(t)?t===G||null==t||""===t?(this._$AH!==G&&this._$AR(),this._$AH=G):t!==this._$AH&&t!==j&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):R(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==G&&k(this._$AH)?this._$AA.nextSibling.data=t:this.$(_.createTextNode(t)),this._$AH=t}g(t){var e;const{values:n,_$litType$:i}=t,r="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=q.createElement(i.h,this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===r)this._$AH.v(n);else{const t=new X(r,this),e=t.u(this.options);t.v(n),this.$(e),this._$AH=t}}_$AC(t){let e=W.get(t.strings);return void 0===e&&W.set(t.strings,e=new q(t)),e}T(t){T(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,i=0;for(const r of t)i===e.length?e.push(n=new Y(this.k(P()),this.k(P()),this,this.options)):n=e[i],n._$AI(r),i++;i<e.length&&(this._$AR(n&&n._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class J{constructor(t,e,n,i,r){this.type=1,this._$AH=G,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=r,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=G}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,i){const r=this.strings;let o=!1;if(void 0===r)t=Z(this,t,e,0),o=!k(t)||t!==this._$AH&&t!==j,o&&(this._$AH=t);else{const i=t;let s,a;for(t=r[0],s=0;s<r.length-1;s++)a=Z(this,i[n+s],e,s),a===j&&(a=this._$AH[s]),o||(o=!k(a)||a!==this._$AH[s]),a===G?t=G:t!==G&&(t+=(null!=a?a:"")+r[s+1]),this._$AH[s]=a}o&&!i&&this.j(t)}j(t){t===G?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class Q extends J{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===G?void 0:t}}const tt=C?C.emptyScript:"";class et extends J{constructor(){super(...arguments),this.type=4}j(t){t&&t!==G?this.element.setAttribute(this.name,tt):this.element.removeAttribute(this.name)}}class nt extends J{constructor(t,e,n,i,r){super(t,e,n,i,r),this.type=5}_$AI(t,e=this){var n;if((t=null!==(n=Z(this,t,e,0))&&void 0!==n?n:G)===j)return;const i=this._$AH,r=t===G&&i!==G||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,o=t!==G&&(i===G||r);r&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}class it{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Z(this,t)}}const rt={O:$,P:b,A:E,C:1,M:z,L:X,D:R,R:Z,I:Y,V:J,H:et,N:nt,U:Q,F:it},ot=A.litHtmlPolyfillSupport;null==ot||ot(q,Y),(null!==(w=A.litHtmlVersions)&&void 0!==w?w:A.litHtmlVersions=[]).push("2.7.3");const st=(t,e,n)=>{var i,r;const o=null!==(i=null==n?void 0:n.renderBefore)&&void 0!==i?i:e;let s=o._$litPart$;if(void 0===s){const t=null!==(r=null==n?void 0:n.renderBefore)&&void 0!==r?r:null;o._$litPart$=s=new Y(e.insertBefore(P(),t),t,void 0,null!=n?n:{})}return s._$AI(t),s};var at,ct;class lt extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){var t,e;const n=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=n.firstChild),n}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=st(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Do)||void 0===t||t.setConnected(!1)}render(){return j}}lt.finalized=!0,lt._$litElement$=!0,null===(at=globalThis.litElementHydrateSupport)||void 0===at||at.call(globalThis,{LitElement:lt});const ht=globalThis.litElementPolyfillSupport;null==ht||ht({LitElement:lt});(null!==(ct=globalThis.litElementVersions)&&void 0!==ct?ct:globalThis.litElementVersions=[]).push("3.3.2");const ut=(t,e)=>"method"===e.kind&&e.descriptor&&!("value"in e.descriptor)?{...e,finisher(n){n.createProperty(e.key,t)}}:{kind:"field",key:Symbol(),placement:"own",descriptor:{},originalKey:e.key,initializer(){"function"==typeof e.initializer&&(this[e.key]=e.initializer.call(this))},finisher(n){n.createProperty(e.key,t)}};function dt(t){return(e,n)=>void 0!==n?((t,e,n)=>{e.constructor.createProperty(n,t)})(t,e,n):ut(t,e)}var pt;null===(pt=window.HTMLSlotElement)||void 0===pt||pt.prototype.assignedElements;const ft=Symbol.for(""),gt=t=>{if((null==t?void 0:t.r)===ft)return null==t?void 0:t._$litStatic$},mt=(t,...e)=>({_$litStatic$:e.reduce(((e,n,i)=>e+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`)})(n)+t[i+1]),t[0]),r:ft}),vt=new Map,yt=t=>(e,...n)=>{const i=n.length;let r,o;const s=[],a=[];let c,l=0,h=!1;for(;l<i;){for(c=e[l];l<i&&void 0!==(o=n[l],r=gt(o));)c+=r+e[++l],h=!0;l!==i&&a.push(o),s.push(c),l++}if(l===i&&s.push(e[i]),h){const t=s.join("$$lit$$");void 0===(e=vt.get(t))&&(s.raw=s,vt.set(t,e=s)),n=a}return t(e,...n)},wt=yt(B),{I:At}=(yt(V),rt),Ct=(t,e)=>void 0===e?void 0!==(null==t?void 0:t._$litType$):(null==t?void 0:t._$litType$)===e,St=t=>void 0===t.strings,$t=()=>document.createComment(""),bt=(t,e,n)=>{var i;const r=t._$AA.parentNode,o=void 0===e?t._$AB:e._$AA;if(void 0===n){const e=r.insertBefore($t(),o),i=r.insertBefore($t(),o);n=new At(e,i,t,t.options)}else{const e=n._$AB.nextSibling,s=n._$AM,a=s!==t;if(a){let e;null===(i=n._$AQ)||void 0===i||i.call(n,t),n._$AM=t,void 0!==n._$AP&&(e=t._$AU)!==s._$AU&&n._$AP(e)}if(e!==o||a){let t=n._$AA;for(;t!==e;){const e=t.nextSibling;r.insertBefore(t,o),t=e}}}return n},Et=(t,e,n=t)=>(t._$AI(e,n),t),xt={},_t=(t,e=xt)=>t._$AH=e,Pt=t=>t._$AH,kt=t=>{var e;null===(e=t._$AP)||void 0===e||e.call(t,!1,!0);let n=t._$AA;const i=t._$AB.nextSibling;for(;n!==i;){const t=n.nextSibling;n.remove(),n=t}},Tt=t=>{t._$AR()},Rt=1,Lt=2,Mt=3,Dt=4,Nt=6,It=t=>(...e)=>({_$litDirective$:t,values:e});class Ft{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,n){this._$Ct=t,this._$AM=e,this._$Ci=n}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const Ut=(t,e)=>{var n,i;const r=t._$AN;if(void 0===r)return!1;for(const t of r)null===(i=(n=t)._$AO)||void 0===i||i.call(n,e,!1),Ut(t,e);return!0},Ht=t=>{let e,n;do{if(void 0===(e=t._$AM))break;n=e._$AN,n.delete(t),t=e}while(0===(null==n?void 0:n.size))},Ot=t=>{for(let e;e=t._$AM;t=e){let n=e._$AN;if(void 0===n)e._$AN=n=new Set;else if(n.has(t))break;n.add(t),jt(e)}};function Bt(t){void 0!==this._$AN?(Ht(this),this._$AM=t,Ot(this)):this._$AM=t}function Vt(t,e=!1,n=0){const i=this._$AH,r=this._$AN;if(void 0!==r&&0!==r.size)if(e)if(Array.isArray(i))for(let t=n;t<i.length;t++)Ut(i[t],!1),Ht(i[t]);else null!=i&&(Ut(i,!1),Ht(i));else Ut(this,t)}const jt=t=>{var e,n,i,r;t.type==Lt&&(null!==(e=(i=t)._$AP)&&void 0!==e||(i._$AP=Vt),null!==(n=(r=t)._$AQ)&&void 0!==n||(r._$AQ=Bt))};class Gt extends Ft{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,n){super._$AT(t,e,n),Ot(this),this.isConnected=t._$AU}_$AO(t,e=!0){var n,i;t!==this.isConnected&&(this.isConnected=t,t?null===(n=this.reconnected)||void 0===n||n.call(this):null===(i=this.disconnected)||void 0===i||i.call(this)),e&&(Ut(this,t),Ht(this))}setValue(t){if(St(this._$Ct))this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class Wt{constructor(t){this.G=t}disconnect(){this.G=void 0}reconnect(t){this.G=t}deref(){return this.G}}class Kt{constructor(){this.Y=void 0,this.Z=void 0}get(){return this.Y}pause(){var t;null!==(t=this.Y)&&void 0!==t||(this.Y=new Promise((t=>this.Z=t)))}resume(){var t;null===(t=this.Z)||void 0===t||t.call(this),this.Y=this.Z=void 0}}class zt extends Gt{constructor(){super(...arguments),this._$Cq=new Wt(this),this._$CK=new Kt}render(t,e){return j}update(t,[e,n]){if(this.isConnected||this.disconnected(),e===this._$CX)return;this._$CX=e;let i=0;const{_$Cq:r,_$CK:o}=this;return(async(t,e)=>{for await(const n of t)if(!1===await e(n))return})(e,(async t=>{for(;o.get();)await o.get();const s=r.deref();if(void 0!==s){if(s._$CX!==e)return!1;void 0!==n&&(t=n(t,i)),s.commitValue(t,i),i++}return!0})),j}commitValue(t,e){this.setValue(t)}disconnected(){this._$Cq.disconnect(),this._$CK.pause()}reconnected(){this._$Cq.reconnect(this),this._$CK.resume()}}It(zt),It(class extends zt{constructor(t){if(super(t),t.type!==Lt)throw Error("asyncAppend can only be used in child expressions")}update(t,e){return this._$CJ=t,super.update(t,e)}commitValue(t,e){0===e&&Tt(this._$CJ);const n=bt(this._$CJ);Et(n,t)}}),It(class extends Ft{constructor(t){super(t),this.tt=new WeakMap}render(t){return[t]}update(t,[e]){if(Ct(this.et)&&(!Ct(e)||this.et.strings!==e.strings)){const e=Pt(t).pop();let n=this.tt.get(this.et.strings);if(void 0===n){const t=document.createDocumentFragment();n=st(G,t),n.setConnected(!1),this.tt.set(this.et.strings,n)}_t(n,[e]),bt(n,void 0,e)}if(Ct(e)){if(!Ct(this.et)||this.et.strings!==e.strings){const n=this.tt.get(e.strings);if(void 0!==n){const e=Pt(n).pop();Tt(t),bt(t,void 0,e),_t(t,[e])}}this.et=e}else this.et=void 0;return this.render(e)}}),It(class extends Ft{constructor(t){var e;if(super(t),t.type!==Rt||"class"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var n,i;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null===(n=this.nt)||void 0===n?void 0:n.has(t))&&this.it.add(t);return this.render(e)}const r=t.element.classList;this.it.forEach((t=>{t in e||(r.remove(t),this.it.delete(t))}));for(const t in e){const n=!!e[t];n===this.it.has(t)||(null===(i=this.nt)||void 0===i?void 0:i.has(t))||(n?(r.add(t),this.it.add(t)):(r.remove(t),this.it.delete(t)))}return j}});const qt={};It(class extends Ft{constructor(){super(...arguments),this.st=qt}render(t,e){return e()}update(t,[e,n]){if(Array.isArray(e)){if(Array.isArray(this.st)&&this.st.length===e.length&&e.every(((t,e)=>t===this.st[e])))return j}else if(this.st===e)return j;return this.st=Array.isArray(e)?Array.from(e):e,this.render(e,n)}}),It(class extends Ft{constructor(){super(...arguments),this.key=G}render(t,e){return this.key=t,e}update(t,[e,n]){return e!==this.key&&(_t(t),this.key=e),n}}),It(class extends Ft{constructor(t){if(super(t),t.type!==Mt&&t.type!==Rt&&t.type!==Dt)throw Error("The `live` directive is not allowed on child or event bindings");if(!St(t))throw Error("`live` bindings can only contain a single expression")}render(t){return t}update(t,[e]){if(e===j||e===G)return e;const n=t.element,i=t.name;if(t.type===Mt){if(e===n[i])return j}else if(t.type===Dt){if(!!e===n.hasAttribute(i))return j}else if(t.type===Rt&&n.getAttribute(i)===e+"")return j;return _t(t),e}});const Zt=new WeakMap,Xt=(It(class extends Gt{render(t){return G}update(t,[e]){var n;const i=e!==this.G;return i&&void 0!==this.G&&this.ot(void 0),(i||this.rt!==this.lt)&&(this.G=e,this.ct=null===(n=t.options)||void 0===n?void 0:n.host,this.ot(this.lt=t.element)),G}ot(t){var e;if("function"==typeof this.G){const n=null!==(e=this.ct)&&void 0!==e?e:globalThis;let i=Zt.get(n);void 0===i&&(i=new WeakMap,Zt.set(n,i)),void 0!==i.get(this.G)&&this.G.call(this.ct,void 0),i.set(this.G,t),void 0!==t&&this.G.call(this.ct,t)}else this.G.value=t}get rt(){var t,e,n;return"function"==typeof this.G?null===(e=Zt.get(null!==(t=this.ct)&&void 0!==t?t:globalThis))||void 0===e?void 0:e.get(this.G):null===(n=this.G)||void 0===n?void 0:n.value}disconnected(){this.rt===this.lt&&this.ot(void 0)}reconnected(){this.ot(this.lt)}}),(t,e,n)=>{const i=new Map;for(let r=e;r<=n;r++)i.set(t[r],r);return i}),Yt=(It(class extends Ft{constructor(t){if(super(t),t.type!==Lt)throw Error("repeat() can only be used in text expressions")}dt(t,e,n){let i;void 0===n?n=e:void 0!==e&&(i=e);const r=[],o=[];let s=0;for(const e of t)r[s]=i?i(e,s):s,o[s]=n(e,s),s++;return{values:o,keys:r}}render(t,e,n){return this.dt(t,e,n).values}update(t,[e,n,i]){var r;const o=Pt(t),{values:s,keys:a}=this.dt(e,n,i);if(!Array.isArray(o))return this.ht=a,s;const c=null!==(r=this.ht)&&void 0!==r?r:this.ht=[],l=[];let h,u,d=0,p=o.length-1,f=0,g=s.length-1;for(;d<=p&&f<=g;)if(null===o[d])d++;else if(null===o[p])p--;else if(c[d]===a[f])l[f]=Et(o[d],s[f]),d++,f++;else if(c[p]===a[g])l[g]=Et(o[p],s[g]),p--,g--;else if(c[d]===a[g])l[g]=Et(o[d],s[g]),bt(t,l[g+1],o[d]),d++,g--;else if(c[p]===a[f])l[f]=Et(o[p],s[f]),bt(t,o[d],o[p]),p--,f++;else if(void 0===h&&(h=Xt(a,f,g),u=Xt(c,d,p)),h.has(c[d]))if(h.has(c[p])){const e=u.get(a[f]),n=void 0!==e?o[e]:null;if(null===n){const e=bt(t,o[d]);Et(e,s[f]),l[f]=e}else l[f]=Et(n,s[f]),bt(t,o[d],n),o[e]=null;f++}else kt(o[p]),p--;else kt(o[d]),d++;for(;f<=g;){const e=bt(t,l[g+1]);Et(e,s[f]),l[f++]=e}for(;d<=p;){const t=o[d++];null!==t&&kt(t)}return this.ht=a,_t(t,l),j}}),"important"),Jt=" !"+Yt;It(class extends Ft{constructor(t){var e;if(super(t),t.type!==Rt||"style"!==t.name||(null===(e=t.strings)||void 0===e?void 0:e.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,n)=>{const i=t[n];return null==i?e:e+`${n=n.includes("-")?n:n.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:n}=t.element;if(void 0===this.ut){this.ut=new Set;for(const t in e)this.ut.add(t);return this.render(e)}this.ut.forEach((t=>{null==e[t]&&(this.ut.delete(t),t.includes("-")?n.removeProperty(t):n[t]="")}));for(const t in e){const i=e[t];if(null!=i){this.ut.add(t);const e="string"==typeof i&&i.endsWith(Jt);t.includes("-")||e?n.setProperty(t,e?i.slice(0,-11):i,e?Yt:""):n[t]=i}}return j}}),It(class extends Ft{constructor(t){if(super(t),t.type!==Lt)throw Error("templateContent can only be used in child bindings")}render(t){return this.vt===t?j:(this.vt=t,document.importNode(t.content,!0))}});class Qt extends Ft{constructor(t){if(super(t),this.et=G,t.type!==Lt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===G||null==t)return this.ft=void 0,this.et=t;if(t===j)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.ft;this.et=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}Qt.directiveName="unsafeHTML",Qt.resultType=1;It(Qt);class te extends Qt{}te.directiveName="unsafeSVG",te.resultType=2;It(te);const ee=t=>!(t=>null===t||"object"!=typeof t&&"function"!=typeof t)(t)&&"function"==typeof t.then,ne=1073741823;It(class extends Gt{constructor(){super(...arguments),this._$C_t=ne,this._$Cwt=[],this._$Cq=new Wt(this),this._$CK=new Kt}render(...t){var e;return null!==(e=t.find((t=>!ee(t))))&&void 0!==e?e:j}update(t,e){const n=this._$Cwt;let i=n.length;this._$Cwt=e;const r=this._$Cq,o=this._$CK;this.isConnected||this.disconnected();for(let t=0;t<e.length&&!(t>this._$C_t);t++){const s=e[t];if(!ee(s))return this._$C_t=t,s;t<i&&s===n[t]||(this._$C_t=ne,i=0,Promise.resolve(s).then((async t=>{for(;o.get();)await o.get();const e=r.deref();if(void 0!==e){const n=e._$Cwt.indexOf(s);n>-1&&n<e._$C_t&&(e._$C_t=n,e.setValue(t))}})))}return j}disconnected(){this._$Cq.disconnect(),this._$CK.pause()}reconnected(){this._$Cq.reconnect(this),this._$CK.resume()}});const ie=G,re=t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:n,elements:i}=e;return{kind:n,elements:i,finisher(e){customElements.define(t,e)}}})(t,e);class oe extends lt{initialized(){}connected(){}disconnected(){}get template(){return ie}render(){return this.template}firstUpdated(t){super.firstUpdated(t),this.initialized()}connectedCallback(){super.connectedCallback(),this.connected()}disconnectedCallback(){super.disconnectedCallback(),this.disconnected()}}class se{constructor(t){this.host=t,this.host.addController(this)}}class ae extends Ft{constructor(t){if(super(t),t.type!==Nt)throw new Error("style directive can only be used on an element");const e=t;this.element=e.element}render(t){for(const[e,n]of Object.entries(t)){([...ae.handlers].find((t=>t.handles(this.element,[e,n])))??ae.defaultHandler).apply(this.element,[e,n])}}}ae.handlers=new Set,ae.defaultHandler=new class{handles(){return!0}apply(t,[e,n]){t.style[e]=null==n?"":n}};const ce=It(ae);let le=class{handles(t,[e]){return e.startsWith("--")}apply(t,[e,n]){t.style.setProperty(e,n)}};le=e([t=>{const e=new t;ae.handlers.add(e)}],le);const he=t=>(e,n)=>{e.constructor.addInitializer((e=>e.addController(new class extends se{constructor(){super(e),this.hasChanged=!1}get value(){return this.host[n]}hostUpdate(){this.value!==this.oldValue&&(this.hasChanged=!0)}hostUpdated(){this.hasChanged&&(this.hasChanged=!1,t.call(this.host,this.value,this.oldValue),this.oldValue=this.value)}})))},ue=t=>(e,n)=>(t?.updated&&he(t.updated)(e,n),dt(t)(e,n)),de=t=>(e,n)=>(t?.updated&&he(t.updated)(e,n),function(t){return dt({...t,state:!0})}(t)(e,n));async function pe(t){const e=t=>t?Symbol.iterator in t?[...t]:[t]:t;if(void 0===t)return e(this);if("function"==typeof t){let n=t.call(this);if(n instanceof Promise&&(n=await n),n instanceof EventTarget)return e(n);if(Symbol.iterator in(n??{})&&[...n].every((t=>t instanceof EventTarget)))return e(n);throw new TypeError(`${this.constructor}.target is not an EventTarget`)}return e(t??this)}class fe extends se{constructor(t,...e){super(t),this.host=t,this.options=function(t){const e="string"==typeof t[0];return{target:e?void 0:t[0].target,type:e?t[0]:t[0].type,listener:e?t[1]:t[0].listener,options:e?t[2]:t[0].options}}(e)}async subscribe(){const t=await pe.call(this.host,this.options.target);for(const e of t)e.addEventListener(this.options.type,this.options.listener,this.options.options)}async unsubscribe(){const t=await pe.call(this.host,this.options.target);for(const e of t)e?.removeEventListener(this.options.type,this.options.listener,this.options.options)}async hostConnected(){await this.subscribe()}async hostDisconnected(){await this.unsubscribe()}}const ge=(...t)=>(e,n,i)=>{e.constructor.addInitializer((e=>{e.addController(new class extends fe{constructor(){const{type:n,target:i,options:r}=function(t){const e=(t=>"string"==typeof t[0])(t);return{type:e?t[0]:t[0].type,target:e?void 0:t[0].target,options:e?t[1]:t[0].options}}(t);super(e,{type:n,target:i,options:r,listener:void 0})}hostConnected(){const t=i?"function"==typeof i.get?i.get:i.value:Object.getOwnPropertyDescriptor(e,n)?.value;return this.options.listener=t.bind(e),super.hostConnected()}})}))};class me{constructor(){this.handlers=new Set}subscribe(t){this.handlers.add(t)}unsubscribe(t){this.handlers.delete(t)}dispatch(t){for(const e of this.handlers)e(t)}}class ve{constructor(t,e,n){this.element=t,this.type=e,this.options=n,this.handlersMap=new Map}dispatch(t){this.element.dispatchEvent(t instanceof CustomEvent?t:new CustomEvent(this.type,{detail:t,...this.options}))}subscribe(t){if(!1===this.handlersMap.has(t)){const e=e=>t(e.detail);this.element.addEventListener(this.type,e),this.handlersMap.set(t,e)}}unsubscribe(t){const e=this.handlersMap.get(t);e&&this.element.removeEventListener(this.type,e),this.handlersMap.delete(t)}}function ye(t){return(e,n)=>{if(void 0===n)return;const i=`$${n}Event$`;Object.defineProperty(e,n,{get(){return this[i]||(this[i]=this instanceof HTMLElement?new ve(this,n,t):new me),this[i]}})}}class we extends Set{async execute(t){await Promise.allSettled([...this].map((e=>e(t))))}}class Ae{static open(t=window.location.pathname,e=0){return new Promise(((n,i)=>{window.matchMedia("(display-mode: standalone)").matches&&0===e&&!manifest?.display_override?.includes("tabbed")&&(e=1);const r=window.open(t,void 0,0===e?"":"popup");if(!r)return i(new Error("Failed to open a window, probably because the permission is denied."));r.resizeTo(window.outerWidth*Ae.windowSizeReductionMultiplier,window.outerHeight*Ae.windowSizeReductionMultiplier),r.moveTo(window.screenX+(window.outerWidth-r.outerWidth)/2,window.screenY+(window.outerHeight-r.outerHeight)/2),r.addEventListener("Application.initialized",(()=>n(r)),{once:!0})}))}static async openAndFocus(...t){(await Ae.open(...t)).focus()}}Ae.windowSizeReductionMultiplier=.9;class Ce extends Error{constructor(t,e=Ce.defaultMessageByErrorCode.get(t)){super(e),this.statusCode=t}}function Se(t){return(e,n)=>{Object.defineProperty(e,n,{get(){const e=[...this.renderRoot?.querySelectorAll("*")??[]].find((e=>t in e.constructor&&!0===e.constructor[t]));if(!e)throw new Error(`${this.constructor.name}'s ${n} cannot be found.`);return e}})}}function $e(){return(t,e)=>{Object.defineProperty(t,e,{get(){return[...window.document.querySelectorAll("*")].find((t=>t instanceof this))}})}}Ce.defaultMessageByErrorCode=new Map([[400,"Bad Request"],[401,"Unauthorized"],[402,"Payment Required"],[404,"Page Not Found"],[403,"Access Denied"],[405,"Method Not Allowed"],[406,"Not Accepted"],[407,"Proxy Authentication Required"],[408,"Request Timeout"],[409,"Conflict"],[410,"Gone"],[411,"Length Required"],[412,"Precondition Failed"],[413,"Request Entity Too Large"],[414,"Request Uri Too Long"],[415,"Unsupported Media Type"],[416,"Requested Range Not Satisfiable"],[417,"Expectation Failed"],[421,"Misdirected Request"],[422,"Unprocessable Entity"],[423,"Locked"],[424,"Failed Dependency"],[426,"Upgrade Required"],[428,"Precondition Required"],[429,"Too Many Requests"],[431,"Request Header Fields TooLarge"],[451,"Unavailable For Legal Reasons"],[500,"Internal Server Error"],[501,"Not Implemented"],[502,"Bad Gateway"],[503,"Service Unavailable"],[504,"Gateway Timeout"],[505,"Http Version Not Supported"],[506,"Variant Also Negotiates"],[507,"Insufficient Storage"],[508,"Loop Detected"],[510,"Not Extended"],[511,"Network Authentication Required"]]);const be=t=>{Object.defineProperty(t.prototype,"inert",{enumerable:!0,configurable:!1,get:()=>!1,set:t=>t})};var Ee=i(388),xe=class{constructor(t,e,n,i,r,o){this.type=3,this.name="",this.prefix="",this.value="",this.suffix="",this.modifier=3,this.type=t,this.name=e,this.prefix=n,this.value=i,this.suffix=r,this.modifier=o}hasCustomName(){return""!==this.name&&"number"!=typeof this.name}},_e=/[$_\p{ID_Start}]/u,Pe=/[$_\u200C\u200D\p{ID_Continue}]/u,ke=".*";function Te(t,e){return(e?/^[\x00-\xFF]*$/:/^[\x00-\x7F]*$/).test(t)}function Re(t,e=!1){const n=[];let i=0;for(;i<t.length;){const r=t[i],o=function(r){if(!e)throw new TypeError(r);n.push({type:"INVALID_CHAR",index:i,value:t[i++]})};if("*"!==r)if("+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)n.push({type:"CHAR",index:i,value:t[i++]});else{let e=1,r="",s=i+1,a=!1;if("?"===t[s]){o(`Pattern cannot start with "?" at ${s}`);continue}for(;s<t.length;){if(!Te(t[s],!1)){o(`Invalid character '${t[s]}' at ${s}.`),a=!0;break}if("\\"!==t[s]){if(")"===t[s]){if(e--,0===e){s++;break}}else if("("===t[s]&&(e++,"?"!==t[s+1])){o(`Capturing groups are not allowed at ${s}`),a=!0;break}r+=t[s++]}else r+=t[s++]+t[s++]}if(a)continue;if(e){o(`Unbalanced pattern at ${i}`);continue}if(!r){o(`Missing pattern at ${i}`);continue}n.push({type:"REGEX",index:i,value:r}),i=s}else{let e="",r=i+1;for(;r<t.length;){const n=t.substr(r,1);if(!(r===i+1&&_e.test(n)||r!==i+1&&Pe.test(n)))break;e+=t[r++]}if(!e){o(`Missing parameter name at ${i}`);continue}n.push({type:"NAME",index:i,value:e}),i=r}else n.push({type:"CLOSE",index:i,value:t[i++]});else n.push({type:"OPEN",index:i,value:t[i++]});else n.push({type:"ESCAPED_CHAR",index:i++,value:t[i++]});else n.push({type:"OTHER_MODIFIER",index:i,value:t[i++]});else n.push({type:"ASTERISK",index:i,value:t[i++]})}return n.push({type:"END",index:i,value:""}),n}function Le(t,e={}){const n=Re(t);e.delimiter??(e.delimiter="/#?"),e.prefixes??(e.prefixes="./");const i=`[^${Me(e.delimiter)}]+?`,r=[];let o=0,s=0,a=new Set;const c=t=>{if(s<n.length&&n[s].type===t)return n[s++].value},l=()=>c("OTHER_MODIFIER")??c("ASTERISK"),h=t=>{const e=c(t);if(void 0!==e)return e;const{type:i,index:r}=n[s];throw new TypeError(`Unexpected ${i} at ${r}, expected ${t}`)},u=()=>{let t,e="";for(;t=c("CHAR")??c("ESCAPED_CHAR");)e+=t;return e},d=e.encodePart||(t=>t);let p="";const f=t=>{p+=t},g=()=>{p.length&&(r.push(new xe(3,"","",d(p),"",3)),p="")},m=(t,e,n,s,c)=>{let l,h=3;switch(c){case"?":h=1;break;case"*":h=0;break;case"+":h=2}if(!e&&!n&&3===h)return void f(t);if(g(),!e&&!n){if(!t)return;return void r.push(new xe(3,"","",d(t),"",h))}l=n?"*"===n?ke:n:i;let u,p=2;if(l===i?(p=1,l=""):l===ke&&(p=0,l=""),e?u=e:n&&(u=o++),a.has(u))throw new TypeError(`Duplicate name '${u}'.`);a.add(u),r.push(new xe(p,u,d(t),l,d(s),h))};for(;s<n.length;){const t=c("CHAR"),n=c("NAME");let i=c("REGEX");if(n||i||(i=c("ASTERISK")),n||i){let r=t??"";-1===e.prefixes.indexOf(r)&&(f(r),r=""),g(),m(r,n,i,"",l());continue}const r=t??c("ESCAPED_CHAR");if(r){f(r);continue}if(c("OPEN")){const t=u(),e=c("NAME");let n=c("REGEX");e||n||(n=c("ASTERISK"));const i=u();h("CLOSE");m(t,e,n,i,l())}else g(),h("END")}return r}function Me(t){return t.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}function De(t){return t&&t.ignoreCase?"ui":"u"}function Ne(t){switch(t){case 0:return"*";case 1:return"?";case 2:return"+";case 3:return""}}function Ie(t,e,n={}){n.delimiter??(n.delimiter="/#?"),n.prefixes??(n.prefixes="./"),n.sensitive??(n.sensitive=!1),n.strict??(n.strict=!1),n.end??(n.end=!0),n.start??(n.start=!0),n.endsWith="";let i=n.start?"^":"";for(const r of t){if(3===r.type){3===r.modifier?i+=Me(r.value):i+=`(?:${Me(r.value)})${Ne(r.modifier)}`;continue}e&&e.push(r.name);const t=`[^${Me(n.delimiter)}]+?`;let o=r.value;1===r.type?o=t:0===r.type&&(o=ke),r.prefix.length||r.suffix.length?3!==r.modifier&&1!==r.modifier?(i+=`(?:${Me(r.prefix)}`,i+=`((?:${o})(?:`,i+=Me(r.suffix),i+=Me(r.prefix),i+=`(?:${o}))*)${Me(r.suffix)})`,0===r.modifier&&(i+="?")):(i+=`(?:${Me(r.prefix)}(${o})${Me(r.suffix)})`,i+=Ne(r.modifier)):3===r.modifier||1===r.modifier?i+=`(${o})${Ne(r.modifier)}`:i+=`((?:${o})${Ne(r.modifier)})`}const r=`[${Me(n.endsWith)}]|$`,o=`[${Me(n.delimiter)}]`;if(n.end)return n.strict||(i+=`${o}?`),n.endsWith.length?i+=`(?=${r})`:i+="$",new RegExp(i,De(n));n.strict||(i+=`(?:${o}(?=${r}))?`);let s=!1;if(t.length){const e=t[t.length-1];3===e.type&&3===e.modifier&&(s=n.delimiter.indexOf(e)>-1)}return s||(i+=`(?=${o}|${r})`),new RegExp(i,De(n))}var Fe={delimiter:"",prefixes:"",sensitive:!0,strict:!0},Ue={delimiter:".",prefixes:"",sensitive:!0,strict:!0},He={delimiter:"/",prefixes:"/",sensitive:!0,strict:!0};function Oe(t,e){return t.startsWith(e)?t.substring(e.length,t.length):t}function Be(t){return!(!t||t.length<2)&&("["===t[0]||("\\"===t[0]||"{"===t[0])&&"["===t[1])}var Ve=["ftp","file","http","https","ws","wss"];function je(t){if(!t)return!0;for(const e of Ve)if(t.test(e))return!0;return!1}function Ge(t){switch(t){case"ws":case"http":return"80";case"wws":case"https":return"443";case"ftp":return"21";default:return""}}function We(t){if(""===t)return t;if(/^[-+.A-Za-z0-9]*$/.test(t))return t.toLowerCase();throw new TypeError(`Invalid protocol '${t}'.`)}function Ke(t){if(""===t)return t;const e=new URL("https://example.com");return e.username=t,e.username}function ze(t){if(""===t)return t;const e=new URL("https://example.com");return e.password=t,e.password}function qe(t){if(""===t)return t;if(/[\t\n\r #%/:<>?@[\]^\\|]/g.test(t))throw new TypeError(`Invalid hostname '${t}'`);const e=new URL("https://example.com");return e.hostname=t,e.hostname}function Ze(t){if(""===t)return t;if(/[^0-9a-fA-F[\]:]/g.test(t))throw new TypeError(`Invalid IPv6 hostname '${t}'`);return t.toLowerCase()}function Xe(t){if(""===t)return t;if(/^[0-9]*$/.test(t)&&parseInt(t)<=65535)return t;throw new TypeError(`Invalid port '${t}'.`)}function Ye(t){if(""===t)return t;const e=new URL("https://example.com");return e.pathname="/"!==t[0]?"/-"+t:t,"/"!==t[0]?e.pathname.substring(2,e.pathname.length):e.pathname}function Je(t){if(""===t)return t;return new URL(`data:${t}`).pathname}function Qe(t){if(""===t)return t;const e=new URL("https://example.com");return e.search=t,e.search.substring(1,e.search.length)}function tn(t){if(""===t)return t;const e=new URL("https://example.com");return e.hash=t,e.hash.substring(1,e.hash.length)}var en=["protocol","username","password","hostname","port","pathname","search","hash"],nn="*";function rn(t,e){if("string"!=typeof t)throw new TypeError("parameter 1 is not of type 'string'.");const n=new URL(t,e);return{protocol:n.protocol.substring(0,n.protocol.length-1),username:n.username,password:n.password,hostname:n.hostname,port:n.port,pathname:n.pathname,search:""!==n.search?n.search.substring(1,n.search.length):void 0,hash:""!==n.hash?n.hash.substring(1,n.hash.length):void 0}}function on(t,e){return e?an(t):t}function sn(t,e,n){let i;if("string"==typeof e.baseURL)try{i=new URL(e.baseURL),t.protocol=on(i.protocol.substring(0,i.protocol.length-1),n),t.username=on(i.username,n),t.password=on(i.password,n),t.hostname=on(i.hostname,n),t.port=on(i.port,n),t.pathname=on(i.pathname,n),t.search=on(i.search.substring(1,i.search.length),n),t.hash=on(i.hash.substring(1,i.hash.length),n)}catch{throw new TypeError(`invalid baseURL '${e.baseURL}'.`)}if("string"==typeof e.protocol&&(t.protocol=function(t,e){var n,i;return i=":",t=(n=t).endsWith(i)?n.substr(0,n.length-i.length):n,e||""===t?t:We(t)}(e.protocol,n)),"string"==typeof e.username&&(t.username=function(t,e){if(e||""===t)return t;const n=new URL("https://example.com");return n.username=t,n.username}(e.username,n)),"string"==typeof e.password&&(t.password=function(t,e){if(e||""===t)return t;const n=new URL("https://example.com");return n.password=t,n.password}(e.password,n)),"string"==typeof e.hostname&&(t.hostname=function(t,e){return e||""===t?t:Be(t)?Ze(t):qe(t)}(e.hostname,n)),"string"==typeof e.port&&(t.port=function(t,e,n){return Ge(e)===t&&(t=""),n||""===t?t:Xe(t)}(e.port,t.protocol,n)),"string"==typeof e.pathname){if(t.pathname=e.pathname,i&&!function(t,e){return!(!t.length||"/"!==t[0]&&(!e||t.length<2||"\\"!=t[0]&&"{"!=t[0]||"/"!=t[1]))}(t.pathname,n)){const e=i.pathname.lastIndexOf("/");e>=0&&(t.pathname=on(i.pathname.substring(0,e+1),n)+t.pathname)}t.pathname=function(t,e,n){if(n||""===t)return t;if(e&&!Ve.includes(e))return new URL(`${e}:${t}`).pathname;const i="/"==t[0];return t=new URL(i?t:"/-"+t,"https://example.com").pathname,i||(t=t.substring(2,t.length)),t}(t.pathname,t.protocol,n)}return"string"==typeof e.search&&(t.search=function(t,e){if(t=Oe(t,"?"),e||""===t)return t;const n=new URL("https://example.com");return n.search=t,n.search?n.search.substring(1,n.search.length):""}(e.search,n)),"string"==typeof e.hash&&(t.hash=function(t,e){if(t=Oe(t,"#"),e||""===t)return t;const n=new URL("https://example.com");return n.hash=t,n.hash?n.hash.substring(1,n.hash.length):""}(e.hash,n)),t}function an(t){return t.replace(/([+*?:{}()\\])/g,"\\$1")}function cn(t,e){e.delimiter??(e.delimiter="/#?"),e.prefixes??(e.prefixes="./"),e.sensitive??(e.sensitive=!1),e.strict??(e.strict=!1),e.end??(e.end=!0),e.start??(e.start=!0),e.endsWith="";const n=`[^${i=e.delimiter,i.replace(/([.+*?^${}()[\]|/\\])/g,"\\$1")}]+?`;var i;const r=/[$_\u200C\u200D\p{ID_Continue}]/u;let o="";for(let i=0;i<t.length;++i){const s=t[i];if(3===s.type){if(3===s.modifier){o+=an(s.value);continue}o+=`{${an(s.value)}}${Ne(s.modifier)}`;continue}const a=s.hasCustomName();let c=!!s.suffix.length||!!s.prefix.length&&(1!==s.prefix.length||!e.prefixes.includes(s.prefix));const l=i>0?t[i-1]:null,h=i<t.length-1?t[i+1]:null;if(!c&&a&&1===s.type&&3===s.modifier&&h&&!h.prefix.length&&!h.suffix.length)if(3===h.type){const t=h.value.length>0?h.value[0]:"";c=r.test(t)}else c=!h.hasCustomName();if(!c&&!s.prefix.length&&l&&3===l.type){const t=l.value[l.value.length-1];c=e.prefixes.includes(t)}c&&(o+="{"),o+=an(s.prefix),a&&(o+=`:${s.name}`),2===s.type?o+=`(${s.value})`:1===s.type?a||(o+=`(${n})`):0===s.type&&(a||l&&3!==l.type&&3===l.modifier&&!c&&""===s.prefix?o+="(.*)":o+="*"),1===s.type&&a&&s.suffix.length&&r.test(s.suffix[0])&&(o+="\\"),o+=an(s.suffix),c&&(o+="}"),3!==s.modifier&&(o+=Ne(s.modifier))}return o}function ln(t,e){void 0===e&&(e={});for(var n=function(t){for(var e=[],n=0;n<t.length;){var i=t[n];if("*"!==i&&"+"!==i&&"?"!==i)if("\\"!==i)if("{"!==i)if("}"!==i)if(":"!==i)if("("!==i)e.push({type:"CHAR",index:n,value:t[n++]});else{var r=1,o="";if("?"===t[a=n+1])throw new TypeError('Pattern cannot start with "?" at '.concat(a));for(;a<t.length;)if("\\"!==t[a]){if(")"===t[a]){if(0==--r){a++;break}}else if("("===t[a]&&(r++,"?"!==t[a+1]))throw new TypeError("Capturing groups are not allowed at ".concat(a));o+=t[a++]}else o+=t[a++]+t[a++];if(r)throw new TypeError("Unbalanced pattern at ".concat(n));if(!o)throw new TypeError("Missing pattern at ".concat(n));e.push({type:"PATTERN",index:n,value:o}),n=a}else{for(var s="",a=n+1;a<t.length;){var c=t.charCodeAt(a);if(!(c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;s+=t[a++]}if(!s)throw new TypeError("Missing parameter name at ".concat(n));e.push({type:"NAME",index:n,value:s}),n=a}else e.push({type:"CLOSE",index:n,value:t[n++]});else e.push({type:"OPEN",index:n,value:t[n++]});else e.push({type:"ESCAPED_CHAR",index:n++,value:t[n++]});else e.push({type:"MODIFIER",index:n,value:t[n++]})}return e.push({type:"END",index:n,value:""}),e}(t),i=e.prefixes,r=void 0===i?"./":i,o="[^".concat(dn(e.delimiter||"/#?"),"]+?"),s=[],a=0,c=0,l="",h=function(t){if(c<n.length&&n[c].type===t)return n[c++].value},u=function(t){var e=h(t);if(void 0!==e)return e;var i=n[c],r=i.type,o=i.index;throw new TypeError("Unexpected ".concat(r," at ").concat(o,", expected ").concat(t))},d=function(){for(var t,e="";t=h("CHAR")||h("ESCAPED_CHAR");)e+=t;return e};c<n.length;){var p=h("CHAR"),f=h("NAME"),g=h("PATTERN");if(f||g){var m=p||"";-1===r.indexOf(m)&&(l+=m,m=""),l&&(s.push(l),l=""),s.push({name:f||a++,prefix:m,suffix:"",pattern:g||o,modifier:h("MODIFIER")||""})}else{var v=p||h("ESCAPED_CHAR");if(v)l+=v;else if(l&&(s.push(l),l=""),h("OPEN")){m=d();var y=h("NAME")||"",w=h("PATTERN")||"",A=d();u("CLOSE"),s.push({name:y||(w?a++:""),pattern:y&&!w?o:w,prefix:m,suffix:A,modifier:h("MODIFIER")||""})}else u("END")}}return s}function hn(t,e){return function(t,e){void 0===e&&(e={});var n=pn(e),i=e.encode,r=void 0===i?function(t){return t}:i,o=e.validate,s=void 0===o||o,a=t.map((function(t){if("object"==typeof t)return new RegExp("^(?:".concat(t.pattern,")$"),n)}));return function(e){for(var n="",i=0;i<t.length;i++){var o=t[i];if("string"!=typeof o){var c=e?e[o.name]:void 0,l="?"===o.modifier||"*"===o.modifier,h="*"===o.modifier||"+"===o.modifier;if(Array.isArray(c)){if(!h)throw new TypeError('Expected "'.concat(o.name,'" to not repeat, but got an array'));if(0===c.length){if(l)continue;throw new TypeError('Expected "'.concat(o.name,'" to not be empty'))}for(var u=0;u<c.length;u++){var d=r(c[u],o);if(s&&!a[i].test(d))throw new TypeError('Expected all "'.concat(o.name,'" to match "').concat(o.pattern,'", but got "').concat(d,'"'));n+=o.prefix+d+o.suffix}}else if("string"!=typeof c&&"number"!=typeof c){if(!l){var p=h?"an array":"a string";throw new TypeError('Expected "'.concat(o.name,'" to be ').concat(p))}}else{d=r(String(c),o);if(s&&!a[i].test(d))throw new TypeError('Expected "'.concat(o.name,'" to match "').concat(o.pattern,'", but got "').concat(d,'"'));n+=o.prefix+d+o.suffix}}else n+=o}return n}}(ln(t,e),e)}function un(t,e){var n=[];return function(t,e,n){void 0===n&&(n={});var i=n.decode,r=void 0===i?function(t){return t}:i;return function(n){var i=t.exec(n);if(!i)return!1;for(var o=i[0],s=i.index,a=Object.create(null),c=function(t){if(void 0===i[t])return"continue";var n=e[t-1];"*"===n.modifier||"+"===n.modifier?a[n.name]=i[t].split(n.prefix+n.suffix).map((function(t){return r(t,n)})):a[n.name]=r(i[t],n)},l=1;l<i.length;l++)c(l);return{path:o,index:s,params:a}}}(gn(t,n,e),n,e)}function dn(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function pn(t){return t&&t.sensitive?"":"i"}function fn(t,e,n){return function(t,e,n){void 0===n&&(n={});for(var i=n.strict,r=void 0!==i&&i,o=n.start,s=void 0===o||o,a=n.end,c=void 0===a||a,l=n.encode,h=void 0===l?function(t){return t}:l,u=n.delimiter,d=void 0===u?"/#?":u,p=n.endsWith,f="[".concat(dn(void 0===p?"":p),"]|$"),g="[".concat(dn(d),"]"),m=s?"^":"",v=0,y=t;v<y.length;v++){var w=y[v];if("string"==typeof w)m+=dn(h(w));else{var A=dn(h(w.prefix)),C=dn(h(w.suffix));if(w.pattern)if(e&&e.push(w),A||C)if("+"===w.modifier||"*"===w.modifier){var S="*"===w.modifier?"?":"";m+="(?:".concat(A,"((?:").concat(w.pattern,")(?:").concat(C).concat(A,"(?:").concat(w.pattern,"))*)").concat(C,")").concat(S)}else m+="(?:".concat(A,"(").concat(w.pattern,")").concat(C,")").concat(w.modifier);else"+"===w.modifier||"*"===w.modifier?m+="((?:".concat(w.pattern,")").concat(w.modifier,")"):m+="(".concat(w.pattern,")").concat(w.modifier);else m+="(?:".concat(A).concat(C,")").concat(w.modifier)}}if(c)r||(m+="".concat(g,"?")),m+=n.endsWith?"(?=".concat(f,")"):"$";else{var $=t[t.length-1],b="string"==typeof $?g.indexOf($[$.length-1])>-1:void 0===$;r||(m+="(?:".concat(g,"(?=").concat(f,"))?")),b||(m+="(?=".concat(g,"|").concat(f,")"))}return new RegExp(m,pn(n))}(ln(t,n),e,n)}function gn(t,e,n){return t instanceof RegExp?function(t,e){if(!e)return t;for(var n=/\((?:\?<(.*?)>)?(?!\?)/g,i=0,r=n.exec(t.source);r;)e.push({name:r[1]||i++,prefix:"",suffix:"",modifier:"",pattern:""}),r=n.exec(t.source);return t}(t,e):Array.isArray(t)?function(t,e,n){var i=t.map((function(t){return gn(t,e,n).source}));return new RegExp("(?:".concat(i.join("|"),")"),pn(n))}(t,e,n):fn(t,e,n)}globalThis.URLPattern||(globalThis.URLPattern=class{constructor(t={},e,n){this.regexp={},this.names={},this.component_pattern={},this.parts={};try{let i;if("string"==typeof e?i=e:n=e,"string"==typeof t){const e=new class{constructor(t){this.tokenList=[],this.internalResult={},this.tokenIndex=0,this.tokenIncrement=1,this.componentStart=0,this.state=0,this.groupDepth=0,this.hostnameIPv6BracketDepth=0,this.shouldTreatAsStandardURL=!1,this.input=t}get result(){return this.internalResult}parse(){for(this.tokenList=Re(this.input,!0);this.tokenIndex<this.tokenList.length;this.tokenIndex+=this.tokenIncrement){if(this.tokenIncrement=1,"END"===this.tokenList[this.tokenIndex].type){if(0===this.state){this.rewind(),this.isHashPrefix()?this.changeState(9,1):this.isSearchPrefix()?(this.changeState(8,1),this.internalResult.hash=""):(this.changeState(7,0),this.internalResult.search="",this.internalResult.hash="");continue}if(2===this.state){this.rewindAndSetState(5);continue}this.changeState(10,0);break}if(this.groupDepth>0){if(!this.isGroupClose())continue;this.groupDepth-=1}if(this.isGroupOpen())this.groupDepth+=1;else switch(this.state){case 0:this.isProtocolSuffix()&&(this.internalResult.username="",this.internalResult.password="",this.internalResult.hostname="",this.internalResult.port="",this.internalResult.pathname="",this.internalResult.search="",this.internalResult.hash="",this.rewindAndSetState(1));break;case 1:if(this.isProtocolSuffix()){this.computeShouldTreatAsStandardURL();let t=7,e=1;this.shouldTreatAsStandardURL&&(this.internalResult.pathname="/"),this.nextIsAuthoritySlashes()?(t=2,e=3):this.shouldTreatAsStandardURL&&(t=2),this.changeState(t,e)}break;case 2:this.isIdentityTerminator()?this.rewindAndSetState(3):(this.isPathnameStart()||this.isSearchPrefix()||this.isHashPrefix())&&this.rewindAndSetState(5);break;case 3:this.isPasswordPrefix()?this.changeState(4,1):this.isIdentityTerminator()&&this.changeState(5,1);break;case 4:this.isIdentityTerminator()&&this.changeState(5,1);break;case 5:this.isIPv6Open()?this.hostnameIPv6BracketDepth+=1:this.isIPv6Close()&&(this.hostnameIPv6BracketDepth-=1),this.isPortPrefix()&&!this.hostnameIPv6BracketDepth?this.changeState(6,1):this.isPathnameStart()?this.changeState(7,0):this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 6:this.isPathnameStart()?this.changeState(7,0):this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 7:this.isSearchPrefix()?this.changeState(8,1):this.isHashPrefix()&&this.changeState(9,1);break;case 8:this.isHashPrefix()&&this.changeState(9,1)}}}changeState(t,e){switch(this.state){case 0:case 2:case 10:break;case 1:this.internalResult.protocol=this.makeComponentString();break;case 3:this.internalResult.username=this.makeComponentString();break;case 4:this.internalResult.password=this.makeComponentString();break;case 5:this.internalResult.hostname=this.makeComponentString();break;case 6:this.internalResult.port=this.makeComponentString();break;case 7:this.internalResult.pathname=this.makeComponentString();break;case 8:this.internalResult.search=this.makeComponentString();break;case 9:this.internalResult.hash=this.makeComponentString()}this.changeStateWithoutSettingComponent(t,e)}changeStateWithoutSettingComponent(t,e){this.state=t,this.componentStart=this.tokenIndex+e,this.tokenIndex+=e,this.tokenIncrement=0}rewind(){this.tokenIndex=this.componentStart,this.tokenIncrement=0}rewindAndSetState(t){this.rewind(),this.state=t}safeToken(t){return t<0&&(t=this.tokenList.length-t),t<this.tokenList.length?this.tokenList[t]:this.tokenList[this.tokenList.length-1]}isNonSpecialPatternChar(t,e){const n=this.safeToken(t);return n.value===e&&("CHAR"===n.type||"ESCAPED_CHAR"===n.type||"INVALID_CHAR"===n.type)}isProtocolSuffix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}nextIsAuthoritySlashes(){return this.isNonSpecialPatternChar(this.tokenIndex+1,"/")&&this.isNonSpecialPatternChar(this.tokenIndex+2,"/")}isIdentityTerminator(){return this.isNonSpecialPatternChar(this.tokenIndex,"@")}isPasswordPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}isPortPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,":")}isPathnameStart(){return this.isNonSpecialPatternChar(this.tokenIndex,"/")}isSearchPrefix(){if(this.isNonSpecialPatternChar(this.tokenIndex,"?"))return!0;if("?"!==this.tokenList[this.tokenIndex].value)return!1;const t=this.safeToken(this.tokenIndex-1);return"NAME"!==t.type&&"REGEX"!==t.type&&"CLOSE"!==t.type&&"ASTERISK"!==t.type}isHashPrefix(){return this.isNonSpecialPatternChar(this.tokenIndex,"#")}isGroupOpen(){return"OPEN"==this.tokenList[this.tokenIndex].type}isGroupClose(){return"CLOSE"==this.tokenList[this.tokenIndex].type}isIPv6Open(){return this.isNonSpecialPatternChar(this.tokenIndex,"[")}isIPv6Close(){return this.isNonSpecialPatternChar(this.tokenIndex,"]")}makeComponentString(){const t=this.tokenList[this.tokenIndex],e=this.safeToken(this.componentStart).index;return this.input.substring(e,t.index)}computeShouldTreatAsStandardURL(){const t={};Object.assign(t,Fe),t.encodePart=We;const e=function(t,e,n){return Ie(Le(t,n),e,n)}(this.makeComponentString(),void 0,t);this.shouldTreatAsStandardURL=je(e)}}(t);if(e.parse(),t=e.result,void 0===i&&"string"!=typeof t.protocol)throw new TypeError("A base URL must be provided for a relative constructor string.");t.baseURL=i}else{if(!t||"object"!=typeof t)throw new TypeError("parameter 1 is not of type 'string' and cannot convert to dictionary.");if(i)throw new TypeError("parameter 1 is not of type 'string'.")}void 0===n&&(n={ignoreCase:!1});const r={ignoreCase:!0===n.ignoreCase},o={pathname:nn,protocol:nn,username:nn,password:nn,hostname:nn,port:nn,search:nn,hash:nn};let s;for(s of(this.pattern=sn(o,t,!0),Ge(this.pattern.protocol)===this.pattern.port&&(this.pattern.port=""),en)){if(!(s in this.pattern))continue;const t={},e=this.pattern[s];switch(this.names[s]=[],s){case"protocol":Object.assign(t,Fe),t.encodePart=We;break;case"username":Object.assign(t,Fe),t.encodePart=Ke;break;case"password":Object.assign(t,Fe),t.encodePart=ze;break;case"hostname":Object.assign(t,Ue),Be(e)?t.encodePart=Ze:t.encodePart=qe;break;case"port":Object.assign(t,Fe),t.encodePart=Xe;break;case"pathname":je(this.regexp.protocol)?(Object.assign(t,He,r),t.encodePart=Ye):(Object.assign(t,Fe,r),t.encodePart=Je);break;case"search":Object.assign(t,Fe,r),t.encodePart=Qe;break;case"hash":Object.assign(t,Fe,r),t.encodePart=tn}try{this.parts[s]=Le(e,t),this.regexp[s]=Ie(this.parts[s],this.names[s],t),this.component_pattern[s]=cn(this.parts[s],t)}catch(t){throw new TypeError(`invalid ${s} pattern '${this.pattern[s]}'.`)}}}catch(t){throw new TypeError(`Failed to construct 'URLPattern': ${t.message}`)}}test(t={},e){let n,i={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if("string"!=typeof t&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(void 0===t)return!1;try{i=sn(i,"object"==typeof t?t:rn(t,e),!1)}catch(t){return!1}for(n of en)if(!this.regexp[n].exec(i[n]))return!1;return!0}exec(t={},e){let n={pathname:"",protocol:"",username:"",password:"",hostname:"",port:"",search:"",hash:""};if("string"!=typeof t&&e)throw new TypeError("parameter 1 is not of type 'string'.");if(void 0===t)return;try{n=sn(n,"object"==typeof t?t:rn(t,e),!1)}catch(t){return null}let i,r={};for(i of(r.inputs=e?[t,e]:[t],en)){let t=this.regexp[i].exec(n[i]);if(!t)return null;let e={};for(let[n,r]of this.names[i].entries())if("string"==typeof r||"number"==typeof r){let i=t[n+1];e[r]=i}r[i]={input:n[i]??"",groups:e}}return r}static compareComponent(t,e,n){const i=(t,e)=>{for(let n of["type","modifier","prefix","value","suffix"]){if(t[n]<e[n])return-1;if(t[n]!==e[n])return 1}return 0},r=new xe(3,"","","","",3),o=new xe(0,"","","","",3),s=(t,e)=>{let n=0;for(;n<Math.min(t.length,e.length);++n){let r=i(t[n],e[n]);if(r)return r}return t.length===e.length?0:i(t[n]??r,e[n]??r)};return e.component_pattern[t]||n.component_pattern[t]?e.component_pattern[t]&&!n.component_pattern[t]?s(e.parts[t],[o]):!e.component_pattern[t]&&n.component_pattern[t]?s([o],n.parts[t]):s(e.parts[t],n.parts[t]):0}get protocol(){return this.component_pattern.protocol}get username(){return this.component_pattern.username}get password(){return this.component_pattern.password}get hostname(){return this.component_pattern.hostname}get port(){return this.component_pattern.port}get pathname(){return this.component_pattern.pathname}get search(){return this.component_pattern.search}get hash(){return this.component_pattern.hash}});class mn extends Map{constructor(){super(...arguments),this.basePath=""}set(t,e){return super.set(this.basePath+t,e)}}class vn{get basePath(){return vn.container.basePath}set basePath(t){vn.container.basePath=t}static getPathOf(t){const e=this.getRouteOf(t);return void 0===e?void 0:hn(e)(t.parameters)}static setPathByPage(t){const e=vn.getPathOf(t);e&&(vn.path=e)}static match(t,e="all"){const n=vn.getRouteOf(t),i=void 0!==n&&un(n)(vn.path);if(!1===i)return!1;if("ignore-parameters"===e)return!0;const r=i.params;return Object.keys(r).every((e=>e in(t.parameters??{})&&r[e]===t.parameters[e]))}static getRouteOf(t){return[...vn.container].find((([,{pageConstructor:e}])=>e.name===t.constructor.name))?.[0]}static get path(){return window.location.pathname+window.location.search}static set path(t){window.history.pushState(null,"",t),window.dispatchEvent(new PopStateEvent("popstate"))}}vn.container=new mn;const yn=new WeakMap,wn=t=>{if((t=>void 0!==t.pattern)(t))return t.pattern;let e=yn.get(t);return void 0===e&&yn.set(t,e=new URLPattern({pathname:t.path})),e};class An{constructor(t,e,n){this.routes=[],this.o=[],this.t={},this.i=t=>{if(t.routes===this)return;const e=t.routes;this.o.push(e),e.l=this,t.stopImmediatePropagation(),t.onDisconnect=()=>{var t;null===(t=this.o)||void 0===t||t.splice(this.o.indexOf(e)>>>0,1)};const n=Cn(this.t);void 0!==n&&e.goto(n)},(this.h=t).addController(this),this.routes=[...e],this.fallback=null==n?void 0:n.fallback}link(t){var e,n;if(null==t?void 0:t.startsWith("/"))return t;if(null==t?void 0:t.startsWith("."))throw Error("Not implemented");return null!=t||(t=this.u),(null!==(n=null===(e=this.l)||void 0===e?void 0:e.link())&&void 0!==n?n:"")+t}async goto(t){var e;let n;if(0===this.routes.length&&void 0===this.fallback)n=t,this.u="",this.t={0:n};else{const i=this.v(t);if(void 0===i)throw Error("No route found for "+t);const r=wn(i).exec({pathname:t}),o=null!==(e=null==r?void 0:r.pathname.groups)&&void 0!==e?e:{};if(n=Cn(o),"function"==typeof i.enter&&!1===await i.enter(o))return;this.p=i,this.t=o,this.u=void 0===n?t:t.substring(0,t.length-n.length)}if(void 0!==n)for(const t of this.o)t.goto(n);this.h.requestUpdate()}outlet(){var t,e;return null===(e=null===(t=this.p)||void 0===t?void 0:t.render)||void 0===e?void 0:e.call(t,this.t)}get params(){return this.t}v(t){const e=this.routes.find((e=>wn(e).test({pathname:t})));return e||void 0===this.fallback?e:this.fallback?{...this.fallback,path:"/*"}:void 0}hostConnected(){this.h.addEventListener(Sn.eventName,this.i);const t=new Sn(this);this.h.dispatchEvent(t),this._=t.onDisconnect}hostDisconnected(){var t;null===(t=this._)||void 0===t||t.call(this),this.l=void 0}}const Cn=t=>{let e;for(const n of Object.keys(t))/\d+/.test(n)&&(void 0===e||n>e)&&(e=n);return e&&t[e]};class Sn extends Event{constructor(t){super(Sn.eventName,{bubbles:!0,composed:!0,cancelable:!1}),this.routes=t}}Sn.eventName="lit-routes-connected";const $n=location.origin||location.protocol+"//"+location.host;class bn extends An{constructor(){super(...arguments),this.m=t=>{const e=0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey;if(t.defaultPrevented||e)return;const n=t.composedPath().find((t=>"A"===t.tagName));if(void 0===n||""!==n.target||n.hasAttribute("download")||"external"===n.getAttribute("rel"))return;const i=n.href;if(""===i||i.startsWith("mailto:"))return;const r=window.location;n.origin===$n&&(t.preventDefault(),i!==r.href&&(window.history.pushState({},"",i),this.goto(n.pathname)))},this.R=t=>{this.goto(window.location.pathname)}}hostConnected(){super.hostConnected(),window.addEventListener("click",this.m),window.addEventListener("popstate",this.R),this.goto(window.location.pathname)}hostDisconnected(){super.hostDisconnected(),window.removeEventListener("click",this.m),window.removeEventListener("popstate",this.R)}}class En extends bn{hostConnected(){this.importDecoratorRoutesIfAvailable(),super.hostConnected()}constructor(...t){super(...t),this.host=t[0]}importDecoratorRoutesIfAvailable(){const t=[...vn.container].filter((([,{routerHostConstructor:t}])=>this.host.constructor===t||this.host.constructor.prototype instanceof t)).map((([t,{pageConstructor:e}])=>({route:t,pageConstructor:e})));for(const{pageConstructor:e,route:n}of t)this.routes.push({path:n,render:t=>this.currentPage?.parameters===t&&this.currentPage?.constructor===e?this.currentPage:this.currentPage=new e(t)})}}class xn{static inject(t,e=document.createElement("style")){return e.innerHTML=t.cssText,document.head.appendChild(e),e}}class _n{constructor(t,e){this.rootStyle=e,this.styleElement=document.createElement("style"),t.addController(this)}hostConnected(){xn.inject(this.rootStyle,this.styleElement)}hostDisconnected(){this.styleElement?.remove()}}class Pn extends oe{constructor(){super(...arguments),this.router=new En(this,[],{fallback:{render:()=>new Ln({error:404})}}),this.rootCssInjector=new _n(this,this.constructor.styles),this.shallRenderRouter=!1}static get styles(){return c`:root{color-scheme:light dark}[application],body,html{margin:0;padding:0;scrollbar-width:thin;display:block;min-height:100vh;min-height:100dvh}[application]{display:flex;flex-direction:column}::-webkit-scrollbar{width:5px;height:5px}::-webkit-scrollbar-thumb{background:rgba(128,128,128,.75)}lit-page-host{display:flex;flex:1;margin:auto;width:100%;max-width:var(--lit-application-page-host-max-width,2560px)}lit-page-host>*{padding:max(min(1rem,1vw),min(1rem,1vh))}`}createRenderRoot(){return this}async connectedCallback(){this.setAttribute("application",""),await Pn.connectingHooks.execute(),super.connectedCallback(),window.dispatchEvent(new Event("Application.connected"))}async initialized(){window.dispatchEvent(new Event("Application.initialized")),await Pn.beforeRouteHooks.execute(),this.shallRenderRouter=!0}get documentTitle(){return[this.pageHeading,manifest?.short_name].filter(Boolean).join(" | ")}get template(){return B`${this.notificationHostTemplate} ${this.bodyTemplate} ${this.dialogHostTemplate}`}get notificationHostTemplate(){return B`<lit-notification-host></lit-notification-host>`}get bodyTemplate(){return B`${this.pageHostTemplate}`}get pageHostTemplate(){return B`<lit-page-host @pageHeadingChange="${t=>this.pageHeading=t.detail}">${this.shallRenderRouter?this.router.outlet():ie}</lit-page-host>`}get dialogHostTemplate(){return B`<lit-dialog-host></lit-dialog-host>`}}Pn.connectingHooks=new we,Pn.beforeRouteHooks=new we,e([ue({updated(){document.title=this.documentTitle}})],Pn.prototype,"pageHeading",void 0),e([de()],Pn.prototype,"shallRenderRouter",void 0),e([$e()],Pn,"instance",void 0);const kn=(...t)=>e=>{const{routerHostConstructor:n,routes:i}=function(...t){return"string"==typeof t[0]?{routerHostConstructor:Pn,routes:t}:{routerHostConstructor:t[0],routes:t.slice(1)}}(...t);for(const t of i)vn.container.set(t,{routerHostConstructor:n,pageConstructor:e})};class Tn extends oe{static pageElement(){return t=>{t[Tn.pageElementConstructorSymbol]=!0}}async navigate(t=0,e=!1){if(!1!==e||!vn.match(this,"all"))if(0===t)vn.setPathByPage(this);else{const e=window.location.origin+vn.getPathOf(this);await Ae.openAndFocus(e,2===t?1:0)}}constructor(t){super(),this.parameters=t}async connectedCallback(){await Tn.connectingHooks.execute(this),super.connectedCallback()}refresh(t=this.parameters){return new this.constructor(t).navigate(0,!0)}}var Rn;Tn.connectingHooks=new we,Tn.pageElementConstructorSymbol=Symbol("PageComponent.PageElementConstructor"),Tn.defaultPageElementTag=mt`lit-page`,e([Se(Tn.pageElementConstructorSymbol)],Tn.prototype,"pageElement",void 0);let Ln=Rn=class extends Tn{static get styles(){return c`
2
- .code {
3
- font-size: 60px;
4
- font-weight: 400;
5
- text-align: center;
6
- }
7
-
8
- h1, h2 {
9
- text-align: center;
10
- margin: 0;
11
- }
12
- `}get template(){return wt`
13
- <${Tn.defaultPageElementTag} heading=${`Error ${this.parameters.error}`} fullHeight>
14
- <div ${ce({display:"flex",gap:"8px",flexDirection:"column",alignItems:"center",justifyContent:"center"})}>
15
- <div class='code'>${this.errorTemplate}</div>
16
- <div ${ce({display:"flex",gap:"4px",flexDirection:"column"})}>
17
- <h1>${this.parameters.message??Ce.defaultMessageByErrorCode.get(this.parameters.error)??"Unknown Error"}</h1>
18
- </div>
19
- </div>
20
- </${Tn.defaultPageElementTag}>
21
- `}get errorTemplate(){const t=String(this.parameters.error),e=Rn.emojisByErrorCodes.get(this.parameters.error);return e?B`
22
- <span>${t.charAt(0)}</span>${e}<span>${t.charAt(2)}</span>
23
- `:B`
24
- <span>${t}</span>
25
- `}};Ln.emojisByErrorCodes=new Map([[400,"😟"],[401,"⛔"],[402,"🤑"],[404,"🧐"],[403,"🔒"],[405,"🚫"],[406,"😵"],[407,"🤐"],[408,"⏲"],[409,"😵"],[500,"😥"],[501,"😳"],[502,"🥴"],[503,"😴"],[504,"⌚"],[505,"🙄"],[506,"🤪"],[507,"💾"],[508,"➰"]]),Ln=Rn=e([re("lit-page-error"),kn("/error/:error")],Ln);let Mn=class extends oe{get template(){return B`<div part="pageHolder" ${ce({display:"grid",gridTemplateRows:"1fr",width:"100%"})}><slot></slot></div>`}};e([$e()],Mn,"instance",void 0),Mn=e([re("lit-page-host")],Mn);class Dn extends Error{constructor(t){super(`Dialog "${t.tagName.toLowerCase()}" was cancelled.`)}}let Nn=class extends oe{createRenderRoot(){return this}};e([$e()],Nn,"instance",void 0),Nn=e([re("lit-dialog-host")],Nn);class In{constructor(t,e,n){this.name=t,this.defaultValue=e,this.reviver=n,this.changed=new me,In.container.add(this)}get value(){const t=window.localStorage.getItem(this.name)??void 0;if(void 0===t)return this.defaultValue;try{return JSON.parse(t,this.reviver)}catch(e){return t}}set value(t){window.localStorage.setItem(this.name,JSON.stringify(t)),this.changed.dispatch(t),In.changed.dispatch(this)}}In.changed=new me,In.container=new Set;class Fn extends oe{static dialogElement(){return t=>{t[Fn.dialogElementConstructorSymbol]=!0}}static getHost(){return Promise.resolve(Nn.instance??Pn.instance??document.body)}get primaryActionElement(){return this.dialogElement.primaryActionElement}get secondaryActionElement(){return this.dialogElement.secondaryActionElement}get cancellationActionElement(){return this.dialogElement.cancellationActionElement}constructor(t){super(),this.parameters=t,this.handleAction=async t=>{const e=new Map([["primary",this.primaryAction],["secondary",this.secondaryAction],["cancellation",this.cancellationAction]]),n=e.get(t)?.bind(this);if(!n)throw new Error(`No action for key ${t}`);try{this.dialogElement.executingAction=t;const e=await n();this.dialogElement.manualClose&&"cancellation"!==t||this.close(e)}catch(t){throw notificationHost.notifyError(t.message),t}finally{this.dialogElement.executingAction=void 0}}}async handleBeforeUnload(){this.dialogElement.boundToWindow&&await this.handleAction("cancellation")}async handleKeyDown(t){[...(await Fn.getHost()).children].filter((t=>t instanceof Fn)).reverse()[0]===this&&(!0===this.dialogElement.primaryOnEnter&&t.key===Ee.s.Enter&&await this.handleAction("primary"),this.dialogElement.preventCancellationOnEscape||t.key!==Ee.s.Escape||await this.handleAction("cancellation"))}async connectedCallback(){await Fn.connectingHooks.execute(this),super.connectedCallback()}confirm(t=0){return 0===t?this.confirmAsDialog():this.confirmAsPopup(t)}async confirmAsDialog(){return(await Fn.getHost()).appendChild(this),new Promise(((t,e)=>{this._confirmationPromiseExecutor=[t,e]}))}async confirmAsPopup(t){this._popupWindow=await Ae.open(Hn.route,2===t?1:0);const e=new(this._popupWindow.customElements.get(this.tagName.toLowerCase()))(this.parameters);[...this.constructor.elementProperties.keys()].forEach((t=>e[t]=this[t]));const n=this._popupWindow.document.querySelector("[application]");await n.updateComplete;const i=this._popupWindow.document.querySelector("lit-page-dialog"),r=e.confirm();return await e.updateComplete,e.dialogElement.dialogHeadingChange.subscribe((t=>i.heading=t)),e.dialogElement.boundToWindow=!0,i.heading=e.dialogElement.heading,r}async pop(t=1){this.open=!1;try{const e=await this.confirm(t);this._confirmationPromiseExecutor?.[0](e)}catch(t){this._confirmationPromiseExecutor?.[1](t)}finally{this._popupWindow?.close(),this.remove()}}close(t){this.open=!1,t instanceof Error?this._confirmationPromiseExecutor?.[1](t):this._confirmationPromiseExecutor?.[0](t),this.remove()}get open(){return this.dialogElement.open??!1}set open(t){this.dialogElement&&(this.dialogElement.open=t)}firstUpdated(t){this.dialogElement.handleAction=this.handleAction,this.dialogElement.requestPopup?.subscribe((()=>this.pop())),this.dialogElement.poppable&&window.location.pathname!==Hn.route&&0!==Fn.poppableConfirmationStrategy.value?this.pop(Fn.poppableConfirmationStrategy.value):(this.open=!0,super.firstUpdated(t))}primaryAction(){throw new Error("Not implemented.")}secondaryAction(){return this.cancellationAction()}cancellationAction(){return new Dn(this)}}var Un;Fn.connectingHooks=new we,Fn.dialogElementConstructorSymbol=Symbol("DialogComponent.DialogElementConstructor"),Fn.defaultDialogElementTag=mt`lit-dialog`,Fn.poppableConfirmationStrategy=new In("DialogComponent.PoppableConfirmationStrategy",0),e([Se(Fn.dialogElementConstructorSymbol)],Fn.prototype,"dialogElement",void 0),e([ge({target:window,type:"beforeunload"})],Fn.prototype,"handleBeforeUnload",null),e([ge({target:window,type:"keydown"})],Fn.prototype,"handleKeyDown",null);let Hn=Un=class extends Tn{constructor(){super(...arguments),this.heading=""}get template(){return wt`<${Tn.defaultPageElementTag} heading=${this.heading}></${Tn.defaultPageElementTag}>`}};Hn.route="/dialog",e([de()],Hn.prototype,"heading",void 0),Hn=Un=e([kn(Un.route),re("lit-page-dialog")],Hn);It(class extends Gt{constructor(t){if(super(t),t.type!==Nt)throw new Error("routerLink can only be used on an element")}update(t,e){const n=!this.parameters;return this.element=t.element,this.parameters=function(...t){return t[0]instanceof Tn||t[0]instanceof Fn?{component:t[0],matchMode:"all",selectionChangeHandler:void 0,invocationHandler:void 0}:t[0]}(...e),this.isConnected&&this.addEventListeners(),n&&this.executeSelectionChange(),super.update(t,e)}render(...t){return j}disconnected(){this.removeEventListeners()}handleEvent(t){switch(t.type){case"click":case"auxclick":t.preventDefault(),this.invoke(t);break;case"popstate":this.executeSelectionChange()}}addEventListeners(){window.addEventListener("popstate",this),this.element.addEventListener("click",this),this.element.addEventListener("auxclick",this)}removeEventListeners(){window.removeEventListener("popstate",this),this.element.removeEventListener("click",this),this.element.removeEventListener("auxclick",this)}invoke(t){const e=new(0,this.parameters.component.constructor)(this.parameters.component.parameters);e instanceof Tn?e.navigate((()=>{switch(!0){case t.ctrlKey||t.metaKey||"auxclick"===t.type:return 1;case t.shiftKey:return 2;default:return 0}})(),"auxclick"===t.type):e.confirm((()=>{switch(!0){case t.ctrlKey||t.metaKey||"auxclick"===t.type:return 1;case t.shiftKey:return 2;default:return 0}})()),this.parameters.invocationHandler?.()}executeSelectionChange(){const t=!(this.parameters.component instanceof Fn)&&vn.match(this.parameters.component,this.parameters.matchMode);t?this.element.setAttribute("data-router-selected",""):this.element.removeAttribute("data-router-selected"),this.parameters.selectionChangeHandler&&this.parameters.selectionChangeHandler.call(this.element,t)}});var On;function Bn(...t){return"string"!=typeof t[0]?t[0]:{message:t[0],actions:t.slice(1)}}let Vn=On=class extends oe{constructor(){super(...arguments),this.notifications=new Set}notifyInfo(...t){return this.notify({type:"info",...Bn(...t)})}notifySuccess(...t){return this.notify({type:"success",...Bn(...t)})}notifyWarning(...t){return this.notify({type:"warning",...Bn(...t)})}notifyError(...t){return this.notify({type:"error",...Bn(...t)})}notifyAndThrowError(t,...e){const n=Bn(...e);throw n.message??(n.message=t.message),this.notifyError(n),t}async notify(t){const e=new On.NotificationComponentConstructor;e.notification=t,e instanceof lt&&(this.notifications.add(e),this.requestUpdate()),await e.show(),e instanceof lt&&(this.notifications.delete(e),this.requestUpdate()),On.shownNotifications.add(t)}createRenderRoot(){return this}static get styles(){return c`:host{z-index:var(--lit-notification-host-z-index,8);position:fixed;inset-block-end:0;inset-inline:0;max-height:max(50vh,50%);display:grid;justify-items:center;justify-content:center;gap:.5vh;overflow:hidden}`}get template(){return B`${this.notifications}`}};var jn;Vn.shownNotifications=new Set,Vn.notificationComponent=()=>t=>{On.NotificationComponentConstructor=t},e([de()],Vn.prototype,"notifications",void 0),e([$e()],Vn,"instance",void 0),Vn=On=e([re("lit-notification-host"),t=>{be(t)}],Vn),Object.defineProperty(globalThis,"notificationHost",{get:()=>Vn.instance,configurable:!1}),Pn.connectingHooks.add((async()=>{globalThis.manifest=void 0;const t=globalThis.document.head.querySelector("link[rel=manifest]");try{if(t){const e=await fetch(t.href),n=await e.text();globalThis.manifest=JSON.parse(n)}}catch{}}));jn=class{static get serviceWorkerContainer(){return navigator.serviceWorker}static async registerServiceWorker(t){try{await(this.serviceWorkerContainer?.register(t,{scope:"/"})),await this.requestInstallation()}catch(t){console.error(t)}}static async unregisterServiceWorkers(){const t=await(this.serviceWorkerContainer?.getRegistrations())||[];for(const e of t)e.unregister()}static async requestInstallation(){if(!1===(void 0!==this.pwaPrompt))return;await(this.pwaPrompt?.prompt());const t=await(this.pwaPrompt?.userChoice);if("accepted"!==t?.outcome)throw new Error("PWA installation was not accepted")}},window.addEventListener("beforeinstallprompt",(t=>{jn.pwaPrompt=t,t.preventDefault()}));class Gn{static get(t){return Gn.rules.get(t)}static add(t,...e){e.forEach((e=>Gn.rules.set(e,t)))}}Gn.rules=new Map,Gn.add((()=>0),"ay","bo","cgg","dz","id","ja","ka","kk","km","ko","ky","lo","ms","my","su","th","tt","ug","vi","zh"),Gn.add((t=>t>1?1:0),"ak","am","br","fil","fa","fr","gu","ln","mfe","mg","pt","tg","ti","tr","uz"),Gn.add((t=>1!==t?1:0),"af","as","az","bg","bn","brx","ca","da","de","el","en","eo","es","et","eu","ff","fi","fo","gl","gu","ha","hi","hu","hy","it","kln","kn","ku","lb","ml","mn","mr","nb","ne","nl","nn","or","pa","ps","pt","rm","rw","sd","se","si","so","sq","sv","sw","ta","te","tk","ur","yo"),Gn.add((t=>t%10!=1||t%100==11?1:0),"is"),Gn.add((t=>0!==t?1:0),"jv"),Gn.add((t=>1===t||t%10==1?0:1),"mk"),Gn.add((t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2),"be","bs","hr","lt"),Gn.add((t=>1===t?0:t>=2&&t<=4?1:2),"cs"),Gn.add((t=>1===t?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2),"pl"),Gn.add((t=>t%10==1&&t%100!=11?0:0!==t?1:2),"lv"),Gn.add((t=>1===t?0:0===t||t%100>0&&t%100<20?1:2),"ro"),Gn.add((t=>1===t?0:2===t?1:8!==t&&11!==t?2:3),"cy"),Gn.add((t=>1===t||11===t?0:2===t||12===t?1:t>2&&t<20?2:3),"gd"),Gn.add((t=>1===t?0:2===t?1:3===t?2:3),"kw"),Gn.add((t=>1===t?0:0===t||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3),"mt"),Gn.add((t=>t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0),"sl"),Gn.add((t=>t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2),"ru","sr","uk"),Gn.add((t=>1===t?0:t>=2&&t<=4?1:2),"sk"),Gn.add((t=>1===t?0:2===t?1:t>2&&t<7?2:t>6&&t<11?3:4),"ga"),Gn.add((t=>0===t?0:1===t?1:2===t?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5),"ar");class Wn{static get currentLanguage(){var t;return(null===(t=window.location.search.split("lang=")[1])||void 0===t?void 0:t.split("&")[0])||Wn.languageCodeStorage.value||navigator.language.split("-")[0]||"en"}static set currentLanguage(t){Wn.languageCodeStorage.value=t,Wn.languageChange.dispatch(t)}static register(t,e){const n="object"==typeof e?new Map(Object.entries(e)):e,i=Wn.dictionariesByLanguageCode.get(t),r=new Map([...null!=i?i:[],...n]);Wn.dictionariesByLanguageCode.set(t,r)}static get currentLanguageDictionary(){return Wn.dictionariesByLanguageCode.get(Wn.currentLanguage)}static localize(t,e){var n;return Wn.currentLanguage===Wn.defaultLanguage||(null===(n=Wn.currentLanguageDictionary)||void 0===n?void 0:n.has(t))||console.warn(`[Localizer] No "${Wn.currentLanguage}" localization found for "${t}".`),Wn.getLocalization(t,e)}static matchLocalizationParameters(t){return[...t.matchAll(Wn.regex)].map((([t,e,n])=>({group:t,key:e,type:n})))}static getLocalization(t,e){var n,i,r,o,s;const a=Wn.matchLocalizationParameters(t),c=t=>a.reduce(((t,n)=>((t,e,n)=>{const i=a.find((t=>t.key===e));return(null==i?void 0:i.group)?t.replace(i.group,n).replace(`\${${i.key}}`,"function"==typeof(null==n?void 0:n.format)?n.format():n):t})(t,n.key,e[n.key])),t),l=null!==(i=null===(n=Wn.currentLanguageDictionary)||void 0===n?void 0:n.get(t))&&void 0!==i?i:t;if(!Array.isArray(l))return c(l);const h=null===(r=a.find((t=>t.type===Wn.pluralityIdentityType)))||void 0===r?void 0:r.key,u=h&&e[h]||0;return c(l[null!==(s=null===(o=Gn.get(Wn.currentLanguage))||void 0===o?void 0:o(u))&&void 0!==s?s:0])}static getLocalizationParameter(t,e){Wn.matchLocalizationParameters(t).find((t=>t.key===e))}}Wn.defaultLanguage="en",Wn.pluralityIdentityType="pluralityNumber",Wn.languageCodeStorage=new In("Localizer.Language",void 0),Wn.dictionariesByLanguageCode=new Map,Wn.regex=/\${(.+?)(?::(.+?))?}/g,e([ye()],Wn,"languageChange",void 0),globalThis.t=Wn.localize;class Kn{static get(t){var e;return null!==(e=Kn.directions.get(t))&&void 0!==e?e:"ltr"}static updateAttributes(){window.document.body.setAttribute("lang",Wn.currentLanguage),window.document.body.setAttribute("dir",Kn.get(Wn.currentLanguage))}static add(t,...e){e.forEach((e=>Kn.directions.set(e,t)))}}Kn.directions=new Map,Kn.add("rtl","ar","hy","az","fa","he","ku","mdv","ur"),Kn.updateAttributes(),Wn.languageChange.subscribe((()=>Kn.updateAttributes()));class zn extends se{static requestUpdate(){for(const t of zn.connectedComponents)t.requestUpdate()}constructor(t){super(t),this.host=t}hostConnected(){zn.connectedComponents.add(this.host)}hostDisconnected(){zn.connectedComponents.delete(this.host)}}zn.connectedComponents=new Set,Wn.languageChange.subscribe((()=>zn.requestUpdate())),y.addInitializer((t=>new zn(t))),Number.prototype.format=function(t){var e;return Intl.NumberFormat(null!==(e=null==t?void 0:t.language)&&void 0!==e?e:Wn.currentLanguage,Object.assign({maximumFractionDigits:16,minimumFractionDigits:0,useGrouping:!1},t)).format(this||0)};const qn=["BTC","AFN","EUR","ALL","DZD","USD","AOA","XCD","ARS","AMD","AWG","AUD","AZN","BSD","BHD","BDT","BBD","BYN","BZD","XOF","BMD","INR","BTN","BOB","BOV","BAM","BWP","NOK","BRL","BND","BGN","BIF","CVE","KHR","XAF","CAD","KYD","CLP","CLF","CNY","COP","COU","KMF","CDF","NZD","CRC","CUP","CUC","ANG","CZK","DKK","DJF","DOP","EGP","SVC","ERN","SZL","ETB","FKP","FJD","XPF","GMD","GEL","GHS","GIP","GTQ","GBP","GNF","GYD","HTG","HNL","HKD","HUF","ISK","IDR","XDR","IRR","IQD","ILS","JMD","JPY","JOD","KZT","KES","KPW","KRW","KWD","KGS","LAK","LBP","LSL","ZAR","LRD","LYD","CHF","MOP","MKD","MGA","MWK","MYR","MVR","MRU","MUR","XUA","MXN","MXV","MDL","MNT","MAD","MZN","MMK","NAD","NPR","NIO","NGN","OMR","PKR","PAB","PGK","PYG","PEN","PHP","PLN","QAR","RON","RUB","RWF","SHP","WST","STN","SAR","RSD","SCR","SLL","SGD","XSU","SBD","SOS","SSP","LKR","SDG","SRD","SEK","CHE","CHW","SYP","SLE","TWD","TJS","TZS","THB","TOP","TTD","TND","TRY","TMT","UGX","UAH","AED","USN","UYU","UYI","UYW","UZS","VUV","VES","VED","VND","YER","ZMW","ZWL","XBA","XBB","XBC","XBD","XTS","XXX","XAU","XPD","XPT","XAG"];class Zn{constructor(t){if(this.code=t,!qn.includes(t))throw new Error(`Invalid currency code: ${t}`)}toString(){return this.code}valueOf(){return this.code}get symbol(){var t,e;try{return null!==(e=null===(t=Intl.NumberFormat("de-DE",{style:"currency",currency:this.code,maximumFractionDigits:0}).formatToParts(0).find((t=>"currency"===t.type)))||void 0===t?void 0:t.value)&&void 0!==e?e:this.code}catch(t){return this.code}}}function Xn(t){const e=null!=t?t:{},{language:n}=e,i=function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n}(e,["language"]),r=0===Object.keys(i).length;return[null!=n?n:Wn.currentLanguage,r?void 0:i]}(()=>{for(const t of qn)Object.defineProperty(Zn,t,{get:()=>new Zn(t)})})(),Number.prototype.formatAsCurrency=function(...t){var e;const n=t[0]instanceof Zn||"string"==typeof t[0],[i,r]=[n?t[0]:void 0,n?t[1]:t[0]],o=i?i instanceof Zn?i:new Zn(i):void 0;return Intl.NumberFormat(null!==(e=null==r?void 0:r.language)&&void 0!==e?e:Wn.currentLanguage,Object.assign({style:o?"currency":"decimal",currency:null==o?void 0:o.code,useGrouping:!0,minimumFractionDigits:2,maximumFractionDigits:2},r)).format(this||0)},Number.prototype.formatAsUnit=function(t,e){var n;return Intl.NumberFormat(null!==(n=null==e?void 0:e.language)&&void 0!==n?n:Wn.currentLanguage,Object.assign({style:"unit",unit:t},e)).format(this||0)},Number.prototype.formatAsPercent=function(t){var e;return Intl.NumberFormat(null!==(e=null==t?void 0:t.language)&&void 0!==e?e:Wn.currentLanguage,Object.assign({style:"percent",useGrouping:!1,minimumFractionDigits:0,maximumFractionDigits:2},t)).format(this/100||0)},String.prototype.toNumber=function(t=Wn.currentLanguage){var e,n,i,r;const o=this.replace(/ /g,""),s=null!==(n=null===(e=Intl.NumberFormat(t).formatToParts(1e3).find((t=>"group"===t.type)))||void 0===e?void 0:e.value)&&void 0!==n?n:"",a=null!==(r=null===(i=Intl.NumberFormat(t).formatToParts(1.1).find((t=>"decimal"===t.type)))||void 0===i?void 0:i.value)&&void 0!==r?r:"",c=parseFloat(o.replace(new RegExp(`\\${s}`,"g"),"").replace(new RegExp(`\\${a}`),"."));return Number.isNaN(c)?void 0:c},Date.prototype.format=function(t){const[e,n]=Xn(t);return Intl.DateTimeFormat(e,null!=n?n:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"shortOffset"}).format(this)},Date.prototype.formatAsDate=function(t){const[e,n]=Xn(t);return Intl.DateTimeFormat(e,null!=n?n:{year:"numeric",month:"2-digit",day:"2-digit"}).format(this)},Date.prototype.formatAsTime=function(t){const[e,n]=Xn(t);return Intl.DateTimeFormat(e,null!=n?n:{hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"shortOffset"}).format(this)};let Yn=class extends oe{constructor(){super(...arguments),this.uploadOnSelection=!1,this.isUploading=!1,this.handleChange=()=>{const t=this.file;return this.fileChange.dispatch(t),this.uploadOnSelection?this.executeUpload():void 0}}openExplorer(){this.inputElement.click()}get file(){var t;return null===(t=this.inputElement.files)||void 0===t?void 0:t[0]}async executeUpload(e){var n;try{this.setIsUploading(!0),null!=e||(e=this.uploadFile);const t=await e();return this.change.dispatch(t),t}catch(e){throw null===(n=Vn.instance)||void 0===n||n.notifyError(t("Upload has failed. Try again.")),this.change.dispatch(void 0),e}finally{this.setIsUploading(!1),this.resetFiles()}}uploadFile(t){if(null!=t||(t=this.file),!t)throw new Error("No file selected");return this.upload(t)}setIsUploading(t){this.isUploading=t,this.uploadingChange.dispatch(t)}resetFiles(){this.inputElement.files=null,this.fileChange.dispatch(void 0)}get template(){return B`<input type="file" style="display:none" @change="${this.handleChange}">`}};var Jn;e([ye()],Yn.prototype,"change",void 0),e([ye()],Yn.prototype,"uploadingChange",void 0),e([ye()],Yn.prototype,"fileChange",void 0),e([ue({type:Function})],Yn.prototype,"upload",void 0),e([ue({type:Boolean})],Yn.prototype,"uploadOnSelection",void 0),e([de()],Yn.prototype,"isUploading",void 0),e([(Jn="input",(t,e)=>{Object.defineProperty(t,e,{get(){return this.renderRoot?.querySelector(Jn)??void 0}})})],Yn.prototype,"inputElement",void 0),Yn=e([re("mo-file-upload")],Yn)})()})();
@@ -1,13 +0,0 @@
1
- import { LanguageCode } from './LanguageCode.js';
2
- type PluralizationRuleFunction = (count: number) => number;
3
- /**
4
- * Provides cardinal pluralization rules based on the Unicode Common Locale Data Repository.
5
- * @see http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html
6
- */
7
- export declare class CardinalPluralizationRulesByLanguage {
8
- private static readonly rules;
9
- static get(languageCode: LanguageCode): PluralizationRuleFunction | undefined;
10
- private static add;
11
- }
12
- export {};
13
- //# sourceMappingURL=CardinalPluralizationRulesByLanguage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CardinalPluralizationRulesByLanguage.d.ts","sourceRoot":"","sources":["../../../localization/CardinalPluralizationRulesByLanguage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,KAAK,yBAAyB,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAA;AAE1D;;;GAGG;AACH,qBAAa,oCAAoC;IAChD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAqD;IA8HlF,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,YAAY;IAIrC,OAAO,CAAC,MAAM,CAAC,GAAG;CAGlB"}
@@ -1,11 +0,0 @@
1
- import { LanguageCode } from './LanguageCode.js';
2
- type Direction = 'ltr' | 'rtl';
3
- /** Provides direction for a given language code. */
4
- export declare class DirectionsByLanguage {
5
- private static readonly directions;
6
- static get(languageCode: LanguageCode): Direction;
7
- static updateAttributes(): void;
8
- private static add;
9
- }
10
- export {};
11
- //# sourceMappingURL=DirectionsByLanguage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"DirectionsByLanguage.d.ts","sourceRoot":"","sources":["../../../localization/DirectionsByLanguage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAEhD,KAAK,SAAS,GAAG,KAAK,GAAG,KAAK,CAAA;AAE9B,oDAAoD;AACpD,qBAAa,oBAAoB;IAChC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAqC;IAoBvE,MAAM,CAAC,GAAG,CAAC,YAAY,EAAE,YAAY;IAIrC,MAAM,CAAC,gBAAgB;IAKvB,OAAO,CAAC,MAAM,CAAC,GAAG;CAGlB"}
@@ -1,187 +0,0 @@
1
- export declare const enum LanguageCode {
2
- Afrikaans = "af",
3
- Aghem = "agq",
4
- Akan = "ak",
5
- Albanian = "sq",
6
- Amharic = "am",
7
- Arabic = "ar",
8
- Armenian = "hy",
9
- Assamese = "as",
10
- Asu = "asa",
11
- Aymara = "ay",
12
- Azerbaijani = "az",
13
- Bafia = "ksf",
14
- Bambara = "bm",
15
- Basa = "bas",
16
- Basque = "eu",
17
- Belarusian = "be",
18
- Bemba = "bem",
19
- Bena = "bez",
20
- Bengali = "bn",
21
- Bodo = "brx",
22
- Bosnian = "bs",
23
- Breton = "br",
24
- Bulgarian = "bg",
25
- Burmese = "my",
26
- Cambodian = "km",
27
- Catalan = "ca",
28
- CentralAtlasTamazight = "tzm",
29
- Cherokee = "chr",
30
- Chiga = "cgg",
31
- Chinese = "zh",
32
- CongoSwahili = "swc",
33
- Cornish = "kw",
34
- Criol = "kea",
35
- Croatian = "hr",
36
- Czech = "cs",
37
- Danish = "da",
38
- Dawida = "dav",
39
- Douala = "dua",
40
- Dutch = "nl",
41
- Dzongkha = "dz",
42
- Ekugusii = "guz",
43
- English = "en",
44
- Esperanto = "eo",
45
- Estonian = "et",
46
- Ewe = "ee",
47
- Ewondo = "ewo",
48
- Faroese = "fo",
49
- Farsi = "fa",
50
- Filipino = "fil",
51
- Finnish = "fi",
52
- French = "fr",
53
- Galician = "gl",
54
- Ganda = "lg",
55
- Georgian = "ka",
56
- GermanSwiss = "gsw",
57
- German = "de",
58
- Greek = "el",
59
- Greenlandic = "kl",
60
- Guarani = "gn",
61
- Gujarati = "gu",
62
- Hausa = "ha",
63
- Hawaiian = "haw",
64
- Hebrew = "he",
65
- Hindi = "hi",
66
- Hungarian = "hu",
67
- Icelandic = "is",
68
- Igbo = "ig",
69
- Indonesian = "id",
70
- Inuktitut = "iu",
71
- Irish = "ga",
72
- Italian = "it",
73
- Japanese = "ja",
74
- Javanese = "jv",
75
- JolaFonyi = "dyo",
76
- Kabyle = "kab",
77
- Kalenjin = "kln",
78
- Kamba = "kam",
79
- Kannada = "kn",
80
- Kashmiri = "ks",
81
- Kazakh = "kk",
82
- Kiembu = "ebu",
83
- Kikuyu = "ki",
84
- Kinyarwanda = "rw",
85
- Kirghiz = "ky",
86
- Konkani = "kok",
87
- Korean = "ko",
88
- KoyraboroSenni = "ses",
89
- Kurdish = "ku",
90
- Lao = "lo",
91
- Latin = "la",
92
- Latvian = "lv",
93
- Lingala = "ln",
94
- Lithuanian = "lt",
95
- LubaKatanga = "lu",
96
- Luo = "luo",
97
- Luxembourgish = "lb",
98
- Luyia = "luy",
99
- Macedonian = "mk",
100
- Machame = "jmc",
101
- MakhuwaMeetto = "mgh",
102
- Makonde = "kde",
103
- Malagasy = "mg",
104
- Malayalam = "ml",
105
- Malay = "ms",
106
- Maltese = "mt",
107
- Manx = "gv",
108
- Marathi = "mr",
109
- Masai = "mas",
110
- Meru = "mer",
111
- Moldavian = "mo",
112
- Mongolian = "mn",
113
- Morisyen = "mfe",
114
- Mundang = "mua",
115
- Maldivian = "mdv",
116
- Nama = "naq",
117
- Nepali = "ne",
118
- NorthNdebele = "nd",
119
- Norwegian = "nb",
120
- Nuer = "nus",
121
- Nyankole = "nyn",
122
- Nynorsk = "nn",
123
- Oriya = "or",
124
- Oromo = "om",
125
- Pashto = "ps",
126
- Peul = "ff",
127
- Polish = "pl",
128
- Portuguese = "pt",
129
- Punjabi = "pa",
130
- Quechua = "qu",
131
- RaetoRomance = "rm",
132
- Romanian = "ro",
133
- Rombo = "rof",
134
- Rundi = "rn",
135
- Russian = "ru",
136
- Rwa = "rwk",
137
- Samburu = "saq",
138
- Sami = "se",
139
- Sangu = "sbp",
140
- Sanskrit = "sa",
141
- Scottish = "gd",
142
- Sena = "seh",
143
- Serbian = "sr",
144
- Shambala = "ksb",
145
- Shona = "sn",
146
- SichuanYi = "ii",
147
- Sindhi = "sd",
148
- Sinhalese = "si",
149
- Slovak = "sk",
150
- Slovenian = "sl",
151
- Soga = "xog",
152
- Somali = "so",
153
- Songhay = "khq",
154
- Spanish = "es",
155
- Sundanese = "su",
156
- Swahili = "sw",
157
- Swedish = "sv",
158
- Tachelhit = "shi",
159
- Tagalog = "tl",
160
- Tajiki = "tg",
161
- Tamil = "ta",
162
- Tasawaq = "twq",
163
- Tatar = "tt",
164
- Telugu = "te",
165
- Teso = "teo",
166
- Thai = "th",
167
- Tibetan = "bo",
168
- Tigrinya = "ti",
169
- Tongan = "to",
170
- Turkish = "tr",
171
- Turkmen = "tk",
172
- Uighur = "ug",
173
- Ukrainian = "uk",
174
- Urdu = "ur",
175
- Uzbek = "uz",
176
- Vai = "vai",
177
- Vietnamese = "vi",
178
- Vunjo = "vun",
179
- Welsh = "cy",
180
- Xhosa = "xh",
181
- Yangben = "yav",
182
- Yiddish = "yi",
183
- Yoruba = "yo",
184
- Zarma = "dje",
185
- Zulu = "zu"
186
- }
187
- //# sourceMappingURL=LanguageCode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LanguageCode.d.ts","sourceRoot":"","sources":["../../../localization/LanguageCode.ts"],"names":[],"mappings":"AAAA,0BAAkB,YAAY;IAC7B,SAAS,OAAO;IAChB,KAAK,QAAQ;IACb,IAAI,OAAO;IACX,QAAQ,OAAO;IACf,OAAO,OAAO;IACd,MAAM,OAAO;IACb,QAAQ,OAAO;IACf,QAAQ,OAAO;IACf,GAAG,QAAQ;IACX,MAAM,OAAO;IACb,WAAW,OAAO;IAClB,KAAK,QAAQ;IACb,OAAO,OAAO;IACd,IAAI,QAAQ;IACZ,MAAM,OAAO;IACb,UAAU,OAAO;IACjB,KAAK,QAAQ;IACb,IAAI,QAAQ;IACZ,OAAO,OAAO;IACd,IAAI,QAAQ;IACZ,OAAO,OAAO;IACd,MAAM,OAAO;IACb,SAAS,OAAO;IAChB,OAAO,OAAO;IACd,SAAS,OAAO;IAChB,OAAO,OAAO;IACd,qBAAqB,QAAQ;IAC7B,QAAQ,QAAQ;IAChB,KAAK,QAAQ;IACb,OAAO,OAAO;IACd,YAAY,QAAQ;IACpB,OAAO,OAAO;IACd,KAAK,QAAQ;IACb,QAAQ,OAAO;IACf,KAAK,OAAO;IACZ,MAAM,OAAO;IACb,MAAM,QAAQ;IACd,MAAM,QAAQ;IACd,KAAK,OAAO;IACZ,QAAQ,OAAO;IACf,QAAQ,QAAQ;IAChB,OAAO,OAAO;IACd,SAAS,OAAO;IAChB,QAAQ,OAAO;IACf,GAAG,OAAO;IACV,MAAM,QAAQ;IACd,OAAO,OAAO;IACd,KAAK,OAAO;IACZ,QAAQ,QAAQ;IAChB,OAAO,OAAO;IACd,MAAM,OAAO;IACb,QAAQ,OAAO;IACf,KAAK,OAAO;IACZ,QAAQ,OAAO;IACf,WAAW,QAAQ;IACnB,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,WAAW,OAAO;IAClB,OAAO,OAAO;IACd,QAAQ,OAAO;IACf,KAAK,OAAO;IACZ,QAAQ,QAAQ;IAChB,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,SAAS,OAAO;IAChB,SAAS,OAAO;IAChB,IAAI,OAAO;IACX,UAAU,OAAO;IACjB,SAAS,OAAO;IAChB,KAAK,OAAO;IACZ,OAAO,OAAO;IACd,QAAQ,OAAO;IACf,QAAQ,OAAO;IACf,SAAS,QAAQ;IACjB,MAAM,QAAQ;IACd,QAAQ,QAAQ;IAChB,KAAK,QAAQ;IACb,OAAO,OAAO;IACd,QAAQ,OAAO;IACf,MAAM,OAAO;IACb,MAAM,QAAQ;IACd,MAAM,OAAO;IACb,WAAW,OAAO;IAClB,OAAO,OAAO;IACd,OAAO,QAAQ;IACf,MAAM,OAAO;IACb,cAAc,QAAQ;IACtB,OAAO,OAAO;IACd,GAAG,OAAO;IACV,KAAK,OAAO;IACZ,OAAO,OAAO;IACd,OAAO,OAAO;IACd,UAAU,OAAO;IACjB,WAAW,OAAO;IAClB,GAAG,QAAQ;IACX,aAAa,OAAO;IACpB,KAAK,QAAQ;IACb,UAAU,OAAO;IACjB,OAAO,QAAQ;IACf,aAAa,QAAQ;IACrB,OAAO,QAAQ;IACf,QAAQ,OAAO;IACf,SAAS,OAAO;IAChB,KAAK,OAAO;IACZ,OAAO,OAAO;IACd,IAAI,OAAO;IACX,OAAO,OAAO;IACd,KAAK,QAAQ;IACb,IAAI,QAAQ;IACZ,SAAS,OAAO;IAChB,SAAS,OAAO;IAChB,QAAQ,QAAQ;IAChB,OAAO,QAAQ;IACf,SAAS,QAAQ;IACjB,IAAI,QAAQ;IACZ,MAAM,OAAO;IACb,YAAY,OAAO;IACnB,SAAS,OAAO;IAChB,IAAI,QAAQ;IACZ,QAAQ,QAAQ;IAChB,OAAO,OAAO;IACd,KAAK,OAAO;IACZ,KAAK,OAAO;IACZ,MAAM,OAAO;IACb,IAAI,OAAO;IACX,MAAM,OAAO;IACb,UAAU,OAAO;IACjB,OAAO,OAAO;IACd,OAAO,OAAO;IACd,YAAY,OAAO;IACnB,QAAQ,OAAO;IACf,KAAK,QAAQ;IACb,KAAK,OAAO;IACZ,OAAO,OAAO;IACd,GAAG,QAAQ;IACX,OAAO,QAAQ;IACf,IAAI,OAAO;IACX,KAAK,QAAQ;IACb,QAAQ,OAAO;IACf,QAAQ,OAAO;IACf,IAAI,QAAQ;IACZ,OAAO,OAAO;IACd,QAAQ,QAAQ;IAChB,KAAK,OAAO;IACZ,SAAS,OAAO;IAChB,MAAM,OAAO;IACb,SAAS,OAAO;IAChB,MAAM,OAAO;IACb,SAAS,OAAO;IAChB,IAAI,QAAQ;IACZ,MAAM,OAAO;IACb,OAAO,QAAQ;IACf,OAAO,OAAO;IACd,SAAS,OAAO;IAChB,OAAO,OAAO;IACd,OAAO,OAAO;IACd,SAAS,QAAQ;IACjB,OAAO,OAAO;IACd,MAAM,OAAO;IACb,KAAK,OAAO;IACZ,OAAO,QAAQ;IACf,KAAK,OAAO;IACZ,MAAM,OAAO;IACb,IAAI,QAAQ;IACZ,IAAI,OAAO;IACX,OAAO,OAAO;IACd,QAAQ,OAAO;IACf,MAAM,OAAO;IACb,OAAO,OAAO;IACd,OAAO,OAAO;IACd,MAAM,OAAO;IACb,SAAS,OAAO;IAChB,IAAI,OAAO;IACX,KAAK,OAAO;IACZ,GAAG,QAAQ;IACX,UAAU,OAAO;IACjB,KAAK,QAAQ;IACb,KAAK,OAAO;IACZ,KAAK,OAAO;IACZ,OAAO,QAAQ;IACf,OAAO,OAAO;IACd,MAAM,OAAO;IACb,KAAK,QAAQ;IACb,IAAI,OAAO;CACX"}
@@ -1,10 +0,0 @@
1
- import { Controller, ReactiveElement } from '@a11d/lit';
2
- export declare class LocalizerController extends Controller {
3
- protected readonly host: ReactiveElement;
4
- static readonly connectedComponents: Set<ReactiveElement>;
5
- static requestUpdate(): void;
6
- constructor(host: ReactiveElement);
7
- hostConnected(): void;
8
- hostDisconnected(): void;
9
- }
10
- //# sourceMappingURL=LanguageController.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"LanguageController.d.ts","sourceRoot":"","sources":["../../../localization/LanguageController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,WAAW,CAAA;AAGvD,qBAAa,mBAAoB,SAAQ,UAAU;uBAaV,IAAI,EAAE,eAAe;IAZ7D,MAAM,CAAC,QAAQ,CAAC,mBAAmB,uBAA6B;IAMhE,MAAM,CAAC,aAAa;gBAMoB,IAAI,EAAE,eAAe;IAIpD,aAAa;IAIb,gBAAgB;CAGzB"}
@@ -1,41 +0,0 @@
1
- import { LanguageCode } from './LanguageCode.js';
2
- type Dictionary = Map<string, string | Array<string>>;
3
- type ExtractProperties<T extends string> = T extends `${string}${'${'}${infer P}${'}'}${infer Rest}` ? P | ExtractProperties<Rest> : never;
4
- type ExtractKey<TProperty extends string> = TProperty extends `${infer Key}:${string}` ? Key : TProperty;
5
- type ExtractType<T extends string> = T extends `${string}:${infer Type}:${string}` ? GetMatchedType<Type> : T extends `${string}:${infer Type}` ? GetMatchedType<Type> : GetMatchedType<''>;
6
- type GetMatchedType<T extends string> = T extends keyof LocalizationFormatterTypeMap ? LocalizationFormatterTypeMap[T] : string;
7
- interface LocalizationFormatterTypeMap {
8
- [Localizer.pluralityIdentityType]: number;
9
- 'string': string;
10
- 'number': number;
11
- 'Date': Date;
12
- '': string;
13
- }
14
- type LocalizationParameters<T extends string> = {
15
- [P in ExtractProperties<T> as ExtractKey<P>]: ExtractType<P>;
16
- };
17
- export declare class Localizer {
18
- static readonly defaultLanguage = LanguageCode.English;
19
- static readonly pluralityIdentityType = "pluralityNumber";
20
- static readonly languageChange: EventDispatcher<LanguageCode>;
21
- static get currentLanguage(): LanguageCode;
22
- static set currentLanguage(value: LanguageCode);
23
- private static readonly languageCodeStorage;
24
- private static readonly dictionariesByLanguageCode;
25
- private static readonly regex;
26
- static register(languageCode: LanguageCode, dictionary: Dictionary | Record<string, string | Array<string>>): void;
27
- static get currentLanguageDictionary(): Dictionary | undefined;
28
- static localize<T extends string>(key: T, parameters?: LocalizationParameters<T>): string;
29
- static matchLocalizationParameters(key: string): {
30
- group: string;
31
- key: string | undefined;
32
- type: string | undefined;
33
- }[];
34
- static getLocalization<T extends string>(key: T, parameters?: LocalizationParameters<T>): string;
35
- static getLocalizationParameter(key: string, parameter: string): void;
36
- }
37
- declare global {
38
- var t: typeof Localizer.localize;
39
- }
40
- export {};
41
- //# sourceMappingURL=Localizer.d.ts.map