prlg-ui 1.8.295 → 1.8.297

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/rekaUI.d.ts CHANGED
@@ -44,6 +44,7 @@ import { ComputedOptions } from 'vue';
44
44
  import { ComputedRef } from 'vue';
45
45
  import { ConfigType } from 'dayjs';
46
46
  import { createColumnHelper } from '@tanstack/vue-table';
47
+ import { CreateComponentPublicInstanceWithMixins } from 'vue';
47
48
  import { DatePickerAnchor } from 'reka-ui';
48
49
  import { DatePickerCalendar } from 'reka-ui';
49
50
  import { DatePickerCell } from 'reka-ui';
@@ -744,6 +745,26 @@ declare type __VLS_Props = {
744
745
  };
745
746
 
746
747
  declare type __VLS_Props_10 = {
748
+ label?: string;
749
+ placeholder?: string;
750
+ name?: string;
751
+ disabled?: boolean;
752
+ rows?: number;
753
+ cols?: number;
754
+ maxHeight?: number;
755
+ error?: boolean;
756
+ errorText?: string;
757
+ smallText?: string;
758
+ inputId?: string;
759
+ size?: 'default' | 'small' | 'large';
760
+ maxlength?: number;
761
+ resizable?: boolean;
762
+ required?: boolean;
763
+ allowClear?: boolean;
764
+ minHeight?: string;
765
+ };
766
+
767
+ declare type __VLS_Props_11 = {
747
768
  placeholder?: string;
748
769
  };
749
770
 
@@ -787,23 +808,11 @@ declare type __VLS_Props_7 = InputTextProps;
787
808
  declare type __VLS_Props_8 = InputTextProps_2;
788
809
 
789
810
  declare type __VLS_Props_9 = {
790
- label?: string;
791
- placeholder?: string;
792
- name?: string;
793
- disabled?: boolean;
794
- rows?: number;
795
- cols?: number;
796
- maxHeight?: number;
797
- error?: boolean;
798
- errorText?: string;
799
- smallText?: string;
800
- inputId?: string;
801
- size?: 'default' | 'small' | 'large';
802
- maxlength?: number;
803
- resizable?: boolean;
804
- required?: boolean;
805
- allowClear?: boolean;
806
- minHeight?: string;
811
+ file: string | IFile;
812
+ alt?: string;
813
+ size?: "small" | "medium" | "large" | "full";
814
+ fullScreen?: boolean;
815
+ viewInfo?: boolean;
807
816
  };
808
817
 
809
818
  declare type __VLS_PublicProps = {
@@ -826,11 +835,11 @@ declare type __VLS_PublicProps_4 = {
826
835
 
827
836
  declare type __VLS_PublicProps_5 = {
828
837
  modelValue?: string;
829
- } & __VLS_Props_9;
838
+ } & __VLS_Props_10;
830
839
 
831
840
  declare type __VLS_PublicProps_6 = {
832
841
  modelValue: TShedule | null;
833
- } & __VLS_Props_10;
842
+ } & __VLS_Props_11;
834
843
 
835
844
  declare function __VLS_template(): {
836
845
  attrs: Partial<{}>;
@@ -2739,6 +2748,38 @@ declare interface IDropdownMenuSubContentProps extends DropdownMenuSubContentPro
2739
2748
  width?: number;
2740
2749
  }
2741
2750
 
2751
+ declare interface IFile {
2752
+ id: string;
2753
+ url: string;
2754
+ name?: string;
2755
+ mime: string | null;
2756
+ size: number | null;
2757
+ }
2758
+
2759
+ declare const Image_2: DefineComponent<__VLS_Props_9, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<__VLS_Props_9> & Readonly<{}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
2760
+ imageFullModal: CreateComponentPublicInstanceWithMixins<Readonly<{
2761
+ src: string;
2762
+ alt?: string;
2763
+ }> & Readonly<{}>, {
2764
+ open: () => void;
2765
+ close: () => void;
2766
+ }, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {}, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
2767
+ P: {};
2768
+ B: {};
2769
+ D: {};
2770
+ C: {};
2771
+ M: {};
2772
+ Defaults: {};
2773
+ }, Readonly<{
2774
+ src: string;
2775
+ alt?: string;
2776
+ }> & Readonly<{}>, {
2777
+ open: () => void;
2778
+ close: () => void;
2779
+ }, {}, {}, {}, {}> | null;
2780
+ }, any>;
2781
+ export { Image_2 as Image }
2782
+
2742
2783
  export declare const InputPhone: DefineComponent<__VLS_PublicProps_4, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
2743
2784
  "update:modelValue": (value: string) => any;
2744
2785
  } & {
@@ -1,4 +1,4 @@
1
- import { p as o } from "./parseFileSize.util-EJk-rAI5.js";
1
+ import { p as o } from "./parseFileSize.util-BAG-MLFl.js";
2
2
  function s(e) {
3
3
  if (!e) return;
4
4
  const a = Array.isArray(e) ? e : [e], i = {
@@ -1 +1 @@
1
- "use strict";const s=require("./parseFileSize.util-DE7Sk0nR.cjs");function o(e){if(!e)return;const a=Array.isArray(e)?e:[e],i={image:["image/*"],pdf:["application/pdf"],excel:["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],word:["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],all:["*/*"]};return a.flatMap(t=>i[t]||[]).join(",")}function d(e={}){return new Promise(a=>{const i=document.createElement("input");i.type="file",i.style.display="none",e.multiple&&e.maxFiles&&e.maxFiles>1&&(i.multiple=!0);const t=o(e.accept);t&&(i.accept=t),i.addEventListener("change",r=>{const n=r.target;let l=[];if(n.files&&n.files.length>0&&(l=Array.from(n.files),e.maxFiles&&l.length>e.maxFiles&&(l=l.slice(0,e.maxFiles)),e.maxFileSize)){const c=s.parseFileSize(e.maxFileSize);l=l.filter(m=>m.size<=c)}a(l),document.body.removeChild(i)}),document.body.appendChild(i),i.click()})}exports.openFileDialog=d;
1
+ "use strict";const s=require("./parseFileSize.util-zKz6zjwq.cjs");function o(e){if(!e)return;const a=Array.isArray(e)?e:[e],i={image:["image/*"],pdf:["application/pdf"],excel:["application/vnd.ms-excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],word:["application/msword","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],all:["*/*"]};return a.flatMap(t=>i[t]||[]).join(",")}function d(e={}){return new Promise(a=>{const i=document.createElement("input");i.type="file",i.style.display="none",e.multiple&&e.maxFiles&&e.maxFiles>1&&(i.multiple=!0);const t=o(e.accept);t&&(i.accept=t),i.addEventListener("change",r=>{const n=r.target;let l=[];if(n.files&&n.files.length>0&&(l=Array.from(n.files),e.maxFiles&&l.length>e.maxFiles&&(l=l.slice(0,e.maxFiles)),e.maxFileSize)){const c=s.parseFileSize(e.maxFileSize);l=l.filter(m=>m.size<=c)}a(l),document.body.removeChild(i)}),document.body.appendChild(i),i.click()})}exports.openFileDialog=d;
@@ -0,0 +1,64 @@
1
+ import { inject as h, ref as u, onMounted as p, onUnmounted as f, watch as m, provide as g } from "vue";
2
+ class k {
3
+ stack = [];
4
+ baseZIndex = {
5
+ confirm: 1400,
6
+ modal: 1300,
7
+ drawer: 1200,
8
+ popover: 1100,
9
+ tooltip: 1e3
10
+ };
11
+ step = 10;
12
+ // шаг между "корневыми" оверлеями одного типа
13
+ childStep = 50;
14
+ // шаг для вложенных (popover внутри modal и т.д.) - увеличиваем для гарантии
15
+ idCounter = 0;
16
+ listeners = /* @__PURE__ */ new Set();
17
+ subscribe(t) {
18
+ return this.listeners.add(t), () => this.listeners.delete(t);
19
+ }
20
+ notify() {
21
+ this.listeners.forEach((t) => t());
22
+ }
23
+ register(t, e) {
24
+ const s = ++this.idCounter, l = e ? this.stack.find((i) => i.id === e) : void 0;
25
+ let r;
26
+ if (l)
27
+ r = l.zIndex + this.childStep;
28
+ else {
29
+ const i = this.stack.filter((n) => n.type === t && !n.parentId);
30
+ r = (i.length ? Math.max(...i.map((n) => n.zIndex)) : this.baseZIndex[t]) + this.step;
31
+ }
32
+ const c = { id: s, type: t, parentId: e ?? null, zIndex: r };
33
+ return this.stack.push(c), this.notify(), c;
34
+ }
35
+ unregister(t) {
36
+ this.stack = this.stack.filter((e) => e.id !== t), this.notify();
37
+ }
38
+ getTop() {
39
+ return this.stack.length ? this.stack[this.stack.length - 1] : null;
40
+ }
41
+ isTop(t) {
42
+ return this.getTop()?.id === t;
43
+ }
44
+ getStack() {
45
+ return [...this.stack];
46
+ }
47
+ }
48
+ const a = new k(), d = Symbol("OVERLAY_PARENT");
49
+ function y(o) {
50
+ const t = h(d, null), e = u(null);
51
+ return p(() => {
52
+ e.value = a.register(o, t ?? null);
53
+ }), f(() => {
54
+ e.value && a.unregister(e.value.id);
55
+ }), m(e, (s) => {
56
+ s && g(d, s.id);
57
+ }, { immediate: !0 }), {
58
+ zIndex: e,
59
+ isTop: () => e.value ? a.isTop(e.value.id) : !1
60
+ };
61
+ }
62
+ export {
63
+ y as u
64
+ };
@@ -0,0 +1 @@
1
+ "use strict";const s=require("vue");class h{stack=[];baseZIndex={confirm:1400,modal:1300,drawer:1200,popover:1100,tooltip:1e3};step=10;childStep=50;idCounter=0;listeners=new Set;subscribe(t){return this.listeners.add(t),()=>this.listeners.delete(t)}notify(){this.listeners.forEach(t=>t())}register(t,e){const i=++this.idCounter,c=e?this.stack.find(n=>n.id===e):void 0;let a;if(c)a=c.zIndex+this.childStep;else{const n=this.stack.filter(r=>r.type===t&&!r.parentId);a=(n.length?Math.max(...n.map(r=>r.zIndex)):this.baseZIndex[t])+this.step}const u={id:i,type:t,parentId:e??null,zIndex:a};return this.stack.push(u),this.notify(),u}unregister(t){this.stack=this.stack.filter(e=>e.id!==t),this.notify()}getTop(){return this.stack.length?this.stack[this.stack.length-1]:null}isTop(t){return this.getTop()?.id===t}getStack(){return[...this.stack]}}const l=new h,d=Symbol("OVERLAY_PARENT");function p(o){const t=s.inject(d,null),e=s.ref(null);return s.onMounted(()=>{e.value=l.register(o,t??null)}),s.onUnmounted(()=>{e.value&&l.unregister(e.value.id)}),s.watch(e,i=>{i&&s.provide(d,i.id)},{immediate:!0}),{zIndex:e,isTop:()=>e.value?l.isTop(e.value.id):!1}}exports.useOverlay=p;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../eventBus.util-K9Yq6hZm.cjs"),z=require("../parseFileSize.util-DE7Sk0nR.cjs"),I=require("../uploadFile.util-B_xj5G6-.cjs"),J=require("../ru-aZ6Jw9om.cjs"),X=6048e5,U=864e5,Y=Symbol.for("constructDateFrom");function b(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Y in t?t[Y](e):t instanceof Date?new t.constructor(e):new Date(e)}function m(t,e){return b(e||t,t)}let K={};function D(){return K}function p(t,e){const n=D(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=m(t,e?.in),i=a.getDay(),o=(i<r?7:0)+i-r;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function k(t,e){return p(t,{...e,weekStartsOn:1})}function L(t,e){const n=m(t,e?.in),r=n.getFullYear(),a=b(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const i=k(a),o=b(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const u=k(o);return n.getTime()>=i.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function N(t){const e=m(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function S(t,...e){const n=b.bind(null,t||e.find(r=>typeof r=="object"));return e.map(n)}function T(t,e){const n=m(t,e?.in);return n.setHours(0,0,0,0),n}function Q(t,e,n){const[r,a]=S(n?.in,t,e),i=T(r),o=T(a),u=+i-N(i),d=+o-N(o);return Math.round((u-d)/U)}function Z(t,e){const n=L(t,e),r=b(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),k(r)}function tt(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function et(t){return!(!tt(t)&&typeof t!="number"||isNaN(+m(t)))}function nt(t,e,n){const[r,a]=S(n?.in,t,e),i=F(r,a),o=Math.abs(Q(r,a));r.setDate(r.getDate()-i*o);const u=+(F(r,a)===-i),d=i*(o-u);return d===0?0:d}function F(t,e){const n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function rt(t,e){const n=m(t,e?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const at={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},it=(t,e,n)=>{let r;const a=at[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function M(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const ot={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},st={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ut={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ct={date:M({formats:ot,defaultWidth:"full"}),time:M({formats:st,defaultWidth:"full"}),dateTime:M({formats:ut,defaultWidth:"full"})},dt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},lt=(t,e,n,r)=>dt[t];function h(t){return(e,n)=>{const r=n?.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,u=n?.width?String(n.width):o;a=t.formattingValues[u]||t.formattingValues[o]}else{const o=t.defaultWidth,u=n?.width?String(n.width):t.defaultWidth;a=t.values[u]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const ft={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ht={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},gt={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},wt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},yt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},bt=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},vt={ordinalNumber:bt,era:h({values:ft,defaultWidth:"wide"}),quarter:h({values:mt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:h({values:ht,defaultWidth:"wide"}),day:h({values:gt,defaultWidth:"wide"}),dayPeriod:h({values:wt,defaultWidth:"wide",formattingValues:yt,defaultFormattingWidth:"wide"})};function g(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],u=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(u)?Pt(u,c=>c.test(o)):pt(u,c=>c.test(o));let w;w=t.valueCallback?t.valueCallback(d):d,w=n.valueCallback?n.valueCallback(w):w;const l=e.slice(o.length);return{value:w,rest:l}}}function pt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Pt(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function B(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const u=e.slice(a.length);return{value:o,rest:u}}}const Mt=/^(\d+)(th|st|nd|rd)?/i,Wt=/\d+/i,kt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Dt={any:[/^b/i,/^(a|c)/i]},Ot={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xt={any:[/1/i,/2/i,/3/i,/4/i]},St={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Gt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Yt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Nt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Tt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ft={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Et={ordinalNumber:B({matchPattern:Mt,parsePattern:Wt,valueCallback:t=>parseInt(t,10)}),era:g({matchPatterns:kt,defaultMatchWidth:"wide",parsePatterns:Dt,defaultParseWidth:"any"}),quarter:g({matchPatterns:Ot,defaultMatchWidth:"wide",parsePatterns:xt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:g({matchPatterns:St,defaultMatchWidth:"wide",parsePatterns:Gt,defaultParseWidth:"any"}),day:g({matchPatterns:Yt,defaultMatchWidth:"wide",parsePatterns:Nt,defaultParseWidth:"any"}),dayPeriod:g({matchPatterns:Tt,defaultMatchWidth:"any",parsePatterns:Ft,defaultParseWidth:"any"})},Ct={code:"en-US",formatDistance:it,formatLong:ct,formatRelative:lt,localize:vt,match:Et,options:{weekStartsOn:0,firstWeekContainsDate:1}};function qt(t,e){const n=m(t,e?.in);return Q(n,rt(n))+1}function $t(t,e){const n=m(t,e?.in),r=+k(n)-+Z(n);return Math.round(r/X)+1}function V(t,e){const n=m(t,e?.in),r=n.getFullYear(),a=D(),i=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,o=b(e?.in||t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const u=p(o,e),d=b(e?.in||t,0);d.setFullYear(r,0,i),d.setHours(0,0,0,0);const w=p(d,e);return+n>=+u?r+1:+n>=+w?r:r-1}function Ht(t,e){const n=D(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=V(t,e),i=b(e?.in||t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),p(i,e)}function _t(t,e){const n=m(t,e?.in),r=+p(n,e)-+Ht(n,e);return Math.round(r/X)+1}function s(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const y={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return s(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):s(n+1,2)},d(t,e){return s(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return s(t.getHours()%12||12,e.length)},H(t,e){return s(t.getHours(),e.length)},m(t,e){return s(t.getMinutes(),e.length)},s(t,e){return s(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return s(a,e.length)}},P={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},E={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return y.y(t,e)},Y:function(t,e,n,r){const a=V(t,r),i=a>0?a:1-a;if(e==="YY"){const o=i%100;return s(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):s(i,e.length)},R:function(t,e){const n=L(t);return s(n,e.length)},u:function(t,e){const n=t.getFullYear();return s(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return s(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return s(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return y.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return s(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=_t(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):s(a,e.length)},I:function(t,e,n){const r=$t(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):s(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):y.d(t,e)},D:function(t,e,n){const r=qt(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):s(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return s(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return s(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return s(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=P.noon:r===0?a=P.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=P.evening:r>=12?a=P.afternoon:r>=4?a=P.morning:a=P.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return y.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):y.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):s(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):s(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):y.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):y.s(t,e)},S:function(t,e){return y.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return q(r);case"XXXX":case"XX":return v(r);case"XXXXX":case"XXX":default:return v(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return q(r);case"xxxx":case"xx":return v(r);case"xxxxx":case"xxx":default:return v(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+C(r,":");case"OOOO":default:return"GMT"+v(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+C(r,":");case"zzzz":default:return"GMT"+v(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return s(r,e.length)},T:function(t,e,n){return s(+t,e.length)}};function C(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+e+s(i,2)}function q(t,e){return t%60===0?(t>0?"-":"+")+s(Math.abs(t)/60,2):v(t,e)}function v(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=s(Math.trunc(r/60),2),i=s(r%60,2);return n+a+e+i}const $=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},j=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Xt=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return $(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",$(r,e)).replace("{{time}}",j(a,e))},Lt={p:j,P:Xt},Qt=/^D+$/,Bt=/^Y+$/,Vt=["D","DD","YY","YYYY"];function jt(t){return Qt.test(t)}function Rt(t){return Bt.test(t)}function At(t,e,n){const r=zt(t,e,n);if(console.warn(r),Vt.includes(t))throw new RangeError(r)}function zt(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const It=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ut=/^'([^]*?)'?$/,Kt=/''/g,Zt=/[a-zA-Z]/;function R(t,e,n){const r=D(),a=n?.locale??r.locale??Ct,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,u=m(t,n?.in);if(!et(u))throw new RangeError("Invalid time value");let d=e.match(Jt).map(l=>{const c=l[0];if(c==="p"||c==="P"){const O=Lt[c];return O(l,a.formatLong)}return l}).join("").match(It).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const c=l[0];if(c==="'")return{isToken:!1,value:te(l)};if(E[c])return{isToken:!0,value:l};if(c.match(Zt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+c+"`");return{isToken:!1,value:l}});a.localize.preprocessor&&(d=a.localize.preprocessor(u,d));const w={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return d.map(l=>{if(!l.isToken)return l.value;const c=l.value;(!n?.useAdditionalWeekYearTokens&&Rt(c)||!n?.useAdditionalDayOfYearTokens&&jt(c))&&At(c,e,String(t));const O=E[c[0]];return O(u,c,a.localize,w)}).join("")}function te(t){const e=t.match(Ut);return e?e[1].replace(Kt,"'"):t}function ee(t,e){return+m(t)>+m(e)}function H(t,e,n){const[r,a]=S(n?.in,t,e);return+p(r,n)==+p(a,n)}function W(t,e){if(t.one!==void 0&&e===1)return t.one;const n=e%10,r=e%100;return n===1&&r!==11?t.singularNominative.replace("{{count}}",String(e)):n>=2&&n<=4&&(r<10||r>20)?t.singularGenitive.replace("{{count}}",String(e)):t.pluralGenitive.replace("{{count}}",String(e))}function f(t){return(e,n)=>n?.addSuffix?n.comparison&&n.comparison>0?t.future?W(t.future,e):"через "+W(t.regular,e):t.past?W(t.past,e):W(t.regular,e)+" назад":W(t.regular,e)}const ne={lessThanXSeconds:f({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:f({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду назад",singularGenitive:"{{count}} секунды назад",pluralGenitive:"{{count}} секунд назад"},future:{singularNominative:"через {{count}} секунду",singularGenitive:"через {{count}} секунды",pluralGenitive:"через {{count}} секунд"}}),halfAMinute:(t,e)=>e?.addSuffix?e.comparison&&e.comparison>0?"через полминуты":"полминуты назад":"полминуты",lessThanXMinutes:f({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:f({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:f({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:f({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:f({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:f({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:f({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:f({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:f({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:f({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:f({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:f({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:f({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})},re=(t,e,n)=>ne[t](e,n),ae={full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},ie={full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},oe={any:"{{date}}, {{time}}"},se={date:M({formats:ae,defaultWidth:"full"}),time:M({formats:ie,defaultWidth:"full"}),dateTime:M({formats:oe,defaultWidth:"any"})},G=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function ue(t){const e=G[t];switch(t){case 0:return"'в прошлое "+e+" в' p";case 1:case 2:case 4:return"'в прошлый "+e+" в' p";case 3:case 5:case 6:return"'в прошлую "+e+" в' p"}}function _(t){const e=G[t];return t===2?"'во "+e+" в' p":"'в "+e+" в' p"}function ce(t){const e=G[t];switch(t){case 0:return"'в следующее "+e+" в' p";case 1:case 2:case 4:return"'в следующий "+e+" в' p";case 3:case 5:case 6:return"'в следующую "+e+" в' p"}}const de={lastWeek:(t,e,n)=>{const r=t.getDay();return H(t,e,n)?_(r):ue(r)},yesterday:"'вчера в' p",today:"'сегодня в' p",tomorrow:"'завтра в' p",nextWeek:(t,e,n)=>{const r=t.getDay();return H(t,e,n)?_(r):ce(r)},other:"P"},le=(t,e,n,r)=>{const a=de[t];return typeof a=="function"?a(e,n,r):a},fe={narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},me={narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},he={narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},ge={narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},we={narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},ye={narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утро",afternoon:"день",evening:"вечер",night:"ночь"}},be={narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утра",afternoon:"дня",evening:"вечера",night:"ночи"}},ve=(t,e)=>{const n=Number(t),r=e?.unit;let a;return r==="date"?a="-е":r==="week"||r==="minute"||r==="second"?a="-я":a="-й",n+a},pe={ordinalNumber:ve,era:h({values:fe,defaultWidth:"wide"}),quarter:h({values:me,defaultWidth:"wide",argumentCallback:t=>t-1}),month:h({values:he,defaultWidth:"wide",formattingValues:ge,defaultFormattingWidth:"wide"}),day:h({values:we,defaultWidth:"wide"}),dayPeriod:h({values:ye,defaultWidth:"any",formattingValues:be,defaultFormattingWidth:"wide"})},Pe=/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,Me=/\d+/i,We={narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},ke={any:[/^д/i,/^н/i]},De={narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыои]?й?)? кв.?/i,wide:/^[1234](-?[ыои]?й?)? квартал/i},Oe={any:[/1/i,/2/i,/3/i,/4/i]},xe={narrow:/^[яфмаисонд]/i,abbreviated:/^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,wide:/^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i},Se={narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^я/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},Ge={narrow:/^[впсч]/i,short:/^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,abbreviated:/^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,wide:/^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i},Ye={narrow:[/^в/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^в[ос]/i,/^п[он]/i,/^в/i,/^ср/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},Ne={narrow:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,abbreviated:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,wide:/^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i},Te={any:{am:/^дп/i,pm:/^пп/i,midnight:/^полн/i,noon:/^полд/i,morning:/^у/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},Fe={ordinalNumber:B({matchPattern:Pe,parsePattern:Me,valueCallback:t=>parseInt(t,10)}),era:g({matchPatterns:We,defaultMatchWidth:"wide",parsePatterns:ke,defaultParseWidth:"any"}),quarter:g({matchPatterns:De,defaultMatchWidth:"wide",parsePatterns:Oe,defaultParseWidth:"any",valueCallback:t=>t+1}),month:g({matchPatterns:xe,defaultMatchWidth:"wide",parsePatterns:Se,defaultParseWidth:"any"}),day:g({matchPatterns:Ge,defaultMatchWidth:"wide",parsePatterns:Ye,defaultParseWidth:"any"}),dayPeriod:g({matchPatterns:Ne,defaultMatchWidth:"wide",parsePatterns:Te,defaultParseWidth:"any"})},A={code:"ru",formatDistance:re,formatLong:se,formatRelative:le,localize:pe,match:Fe,options:{weekStartsOn:1,firstWeekContainsDate:1}};function Ee(t){return R(new Date(t),"d MMMM yyyy",{locale:A})}function Ce(t){return R(new Date(t),"d MMMM, HH:mm",{locale:A})}function qe(t,e){return nt(new Date(e),new Date(t))}function $e(t){return ee(new Date,new Date(t))}function He(t,e="₽",n=2){return`${t.toLocaleString("en-US",{minimumFractionDigits:n,maximumFractionDigits:n}).replace(/,/g," ")} ${e}`}function _e(t){return t.reduce((e,n)=>e+n,0)}function Xe(t){const e=t.replace(/[^\d.,]/g,"").replace(",",".");return parseFloat(e)||0}exports.EventBus=x.EventBus;exports.Portal=x._sfc_main;exports.useBodyScroll=x.useBodyScroll;exports.onClickOutside=z.onClickOutside;exports.openFileDialog=I.openFileDialog;exports.dayjs=J.dayjs;exports.formatDateReadable=Ee;exports.formatDateWithTime=Ce;exports.formatPrice=He;exports.getDaysBetween=qe;exports.isExpired=$e;exports.parsePrice=Xe;exports.sumPrices=_e;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../eventBus.util-K9Yq6hZm.cjs"),z=require("../dayjs.util-DVNMZ0pw.cjs"),I=require("../uploadFile.util-DUsZt4gt.cjs"),J=require("../parseFileSize.util-zKz6zjwq.cjs"),X=6048e5,U=864e5,Y=Symbol.for("constructDateFrom");function b(t,e){return typeof t=="function"?t(e):t&&typeof t=="object"&&Y in t?t[Y](e):t instanceof Date?new t.constructor(e):new Date(e)}function m(t,e){return b(e||t,t)}let K={};function D(){return K}function p(t,e){const n=D(),r=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??n.weekStartsOn??n.locale?.options?.weekStartsOn??0,a=m(t,e?.in),i=a.getDay(),o=(i<r?7:0)+i-r;return a.setDate(a.getDate()-o),a.setHours(0,0,0,0),a}function k(t,e){return p(t,{...e,weekStartsOn:1})}function L(t,e){const n=m(t,e?.in),r=n.getFullYear(),a=b(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const i=k(a),o=b(n,0);o.setFullYear(r,0,4),o.setHours(0,0,0,0);const u=k(o);return n.getTime()>=i.getTime()?r+1:n.getTime()>=u.getTime()?r:r-1}function N(t){const e=m(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),+t-+n}function S(t,...e){const n=b.bind(null,t||e.find(r=>typeof r=="object"));return e.map(n)}function T(t,e){const n=m(t,e?.in);return n.setHours(0,0,0,0),n}function Q(t,e,n){const[r,a]=S(n?.in,t,e),i=T(r),o=T(a),u=+i-N(i),d=+o-N(o);return Math.round((u-d)/U)}function Z(t,e){const n=L(t,e),r=b(t,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),k(r)}function tt(t){return t instanceof Date||typeof t=="object"&&Object.prototype.toString.call(t)==="[object Date]"}function et(t){return!(!tt(t)&&typeof t!="number"||isNaN(+m(t)))}function nt(t,e,n){const[r,a]=S(n?.in,t,e),i=F(r,a),o=Math.abs(Q(r,a));r.setDate(r.getDate()-i*o);const u=+(F(r,a)===-i),d=i*(o-u);return d===0?0:d}function F(t,e){const n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function rt(t,e){const n=m(t,e?.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}const at={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},it=(t,e,n)=>{let r;const a=at[t];return typeof a=="string"?r=a:e===1?r=a.one:r=a.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function M(t){return(e={})=>{const n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}const ot={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},st={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ut={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},ct={date:M({formats:ot,defaultWidth:"full"}),time:M({formats:st,defaultWidth:"full"}),dateTime:M({formats:ut,defaultWidth:"full"})},dt={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},lt=(t,e,n,r)=>dt[t];function h(t){return(e,n)=>{const r=n?.context?String(n.context):"standalone";let a;if(r==="formatting"&&t.formattingValues){const o=t.defaultFormattingWidth||t.defaultWidth,u=n?.width?String(n.width):o;a=t.formattingValues[u]||t.formattingValues[o]}else{const o=t.defaultWidth,u=n?.width?String(n.width):t.defaultWidth;a=t.values[u]||t.values[o]}const i=t.argumentCallback?t.argumentCallback(e):e;return a[i]}}const ft={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mt={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ht={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},gt={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},wt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},yt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},bt=(t,e)=>{const n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},vt={ordinalNumber:bt,era:h({values:ft,defaultWidth:"wide"}),quarter:h({values:mt,defaultWidth:"wide",argumentCallback:t=>t-1}),month:h({values:ht,defaultWidth:"wide"}),day:h({values:gt,defaultWidth:"wide"}),dayPeriod:h({values:wt,defaultWidth:"wide",formattingValues:yt,defaultFormattingWidth:"wide"})};function g(t){return(e,n={})=>{const r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;const o=i[0],u=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(u)?Pt(u,c=>c.test(o)):pt(u,c=>c.test(o));let w;w=t.valueCallback?t.valueCallback(d):d,w=n.valueCallback?n.valueCallback(w):w;const l=e.slice(o.length);return{value:w,rest:l}}}function pt(t,e){for(const n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}function Pt(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}function B(t){return(e,n={})=>{const r=e.match(t.matchPattern);if(!r)return null;const a=r[0],i=e.match(t.parsePattern);if(!i)return null;let o=t.valueCallback?t.valueCallback(i[0]):i[0];o=n.valueCallback?n.valueCallback(o):o;const u=e.slice(a.length);return{value:o,rest:u}}}const Mt=/^(\d+)(th|st|nd|rd)?/i,Wt=/\d+/i,kt={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Dt={any:[/^b/i,/^(a|c)/i]},Ot={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xt={any:[/1/i,/2/i,/3/i,/4/i]},St={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Gt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Yt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Nt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Tt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ft={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Et={ordinalNumber:B({matchPattern:Mt,parsePattern:Wt,valueCallback:t=>parseInt(t,10)}),era:g({matchPatterns:kt,defaultMatchWidth:"wide",parsePatterns:Dt,defaultParseWidth:"any"}),quarter:g({matchPatterns:Ot,defaultMatchWidth:"wide",parsePatterns:xt,defaultParseWidth:"any",valueCallback:t=>t+1}),month:g({matchPatterns:St,defaultMatchWidth:"wide",parsePatterns:Gt,defaultParseWidth:"any"}),day:g({matchPatterns:Yt,defaultMatchWidth:"wide",parsePatterns:Nt,defaultParseWidth:"any"}),dayPeriod:g({matchPatterns:Tt,defaultMatchWidth:"any",parsePatterns:Ft,defaultParseWidth:"any"})},Ct={code:"en-US",formatDistance:it,formatLong:ct,formatRelative:lt,localize:vt,match:Et,options:{weekStartsOn:0,firstWeekContainsDate:1}};function qt(t,e){const n=m(t,e?.in);return Q(n,rt(n))+1}function $t(t,e){const n=m(t,e?.in),r=+k(n)-+Z(n);return Math.round(r/X)+1}function V(t,e){const n=m(t,e?.in),r=n.getFullYear(),a=D(),i=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??a.firstWeekContainsDate??a.locale?.options?.firstWeekContainsDate??1,o=b(e?.in||t,0);o.setFullYear(r+1,0,i),o.setHours(0,0,0,0);const u=p(o,e),d=b(e?.in||t,0);d.setFullYear(r,0,i),d.setHours(0,0,0,0);const w=p(d,e);return+n>=+u?r+1:+n>=+w?r:r-1}function Ht(t,e){const n=D(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??n.firstWeekContainsDate??n.locale?.options?.firstWeekContainsDate??1,a=V(t,e),i=b(e?.in||t,0);return i.setFullYear(a,0,r),i.setHours(0,0,0,0),p(i,e)}function _t(t,e){const n=m(t,e?.in),r=+p(n,e)-+Ht(n,e);return Math.round(r/X)+1}function s(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}const y={y(t,e){const n=t.getFullYear(),r=n>0?n:1-n;return s(e==="yy"?r%100:r,e.length)},M(t,e){const n=t.getMonth();return e==="M"?String(n+1):s(n+1,2)},d(t,e){return s(t.getDate(),e.length)},a(t,e){const n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(t,e){return s(t.getHours()%12||12,e.length)},H(t,e){return s(t.getHours(),e.length)},m(t,e){return s(t.getMinutes(),e.length)},s(t,e){return s(t.getSeconds(),e.length)},S(t,e){const n=e.length,r=t.getMilliseconds(),a=Math.trunc(r*Math.pow(10,n-3));return s(a,e.length)}},P={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},E={G:function(t,e,n){const r=t.getFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if(e==="yo"){const r=t.getFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return y.y(t,e)},Y:function(t,e,n,r){const a=V(t,r),i=a>0?a:1-a;if(e==="YY"){const o=i%100;return s(o,2)}return e==="Yo"?n.ordinalNumber(i,{unit:"year"}):s(i,e.length)},R:function(t,e){const n=L(t);return s(n,e.length)},u:function(t,e){const n=t.getFullYear();return s(n,e.length)},Q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return s(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){const r=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return s(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){const r=t.getMonth();switch(e){case"M":case"MM":return y.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){const r=t.getMonth();switch(e){case"L":return String(r+1);case"LL":return s(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){const a=_t(t,r);return e==="wo"?n.ordinalNumber(a,{unit:"week"}):s(a,e.length)},I:function(t,e,n){const r=$t(t);return e==="Io"?n.ordinalNumber(r,{unit:"week"}):s(r,e.length)},d:function(t,e,n){return e==="do"?n.ordinalNumber(t.getDate(),{unit:"date"}):y.d(t,e)},D:function(t,e,n){const r=qt(t);return e==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):s(r,e.length)},E:function(t,e,n){const r=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return s(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});case"eeee":default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){const a=t.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return s(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});case"cccc":default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){const r=t.getDay(),a=r===0?7:r;switch(e){case"i":return String(a);case"ii":return s(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){const a=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},b:function(t,e,n){const r=t.getHours();let a;switch(r===12?a=P.noon:r===0?a=P.midnight:a=r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(t,e,n){const r=t.getHours();let a;switch(r>=17?a=P.evening:r>=12?a=P.afternoon:r>=4?a=P.morning:a=P.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(t,e,n){if(e==="ho"){let r=t.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return y.h(t,e)},H:function(t,e,n){return e==="Ho"?n.ordinalNumber(t.getHours(),{unit:"hour"}):y.H(t,e)},K:function(t,e,n){const r=t.getHours()%12;return e==="Ko"?n.ordinalNumber(r,{unit:"hour"}):s(r,e.length)},k:function(t,e,n){let r=t.getHours();return r===0&&(r=24),e==="ko"?n.ordinalNumber(r,{unit:"hour"}):s(r,e.length)},m:function(t,e,n){return e==="mo"?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):y.m(t,e)},s:function(t,e,n){return e==="so"?n.ordinalNumber(t.getSeconds(),{unit:"second"}):y.s(t,e)},S:function(t,e){return y.S(t,e)},X:function(t,e,n){const r=t.getTimezoneOffset();if(r===0)return"Z";switch(e){case"X":return q(r);case"XXXX":case"XX":return v(r);case"XXXXX":case"XXX":default:return v(r,":")}},x:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"x":return q(r);case"xxxx":case"xx":return v(r);case"xxxxx":case"xxx":default:return v(r,":")}},O:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+C(r,":");case"OOOO":default:return"GMT"+v(r,":")}},z:function(t,e,n){const r=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+C(r,":");case"zzzz":default:return"GMT"+v(r,":")}},t:function(t,e,n){const r=Math.trunc(+t/1e3);return s(r,e.length)},T:function(t,e,n){return s(+t,e.length)}};function C(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=Math.trunc(r/60),i=r%60;return i===0?n+String(a):n+String(a)+e+s(i,2)}function q(t,e){return t%60===0?(t>0?"-":"+")+s(Math.abs(t)/60,2):v(t,e)}function v(t,e=""){const n=t>0?"-":"+",r=Math.abs(t),a=s(Math.trunc(r/60),2),i=s(r%60,2);return n+a+e+i}const $=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},j=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},Xt=(t,e)=>{const n=t.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return $(t,e);let i;switch(r){case"P":i=e.dateTime({width:"short"});break;case"PP":i=e.dateTime({width:"medium"});break;case"PPP":i=e.dateTime({width:"long"});break;case"PPPP":default:i=e.dateTime({width:"full"});break}return i.replace("{{date}}",$(r,e)).replace("{{time}}",j(a,e))},Lt={p:j,P:Xt},Qt=/^D+$/,Bt=/^Y+$/,Vt=["D","DD","YY","YYYY"];function jt(t){return Qt.test(t)}function Rt(t){return Bt.test(t)}function At(t,e,n){const r=zt(t,e,n);if(console.warn(r),Vt.includes(t))throw new RangeError(r)}function zt(t,e,n){const r=t[0]==="Y"?"years":"days of the month";return`Use \`${t.toLowerCase()}\` instead of \`${t}\` (in \`${e}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const It=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Jt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ut=/^'([^]*?)'?$/,Kt=/''/g,Zt=/[a-zA-Z]/;function R(t,e,n){const r=D(),a=n?.locale??r.locale??Ct,i=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??r.firstWeekContainsDate??r.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??r.weekStartsOn??r.locale?.options?.weekStartsOn??0,u=m(t,n?.in);if(!et(u))throw new RangeError("Invalid time value");let d=e.match(Jt).map(l=>{const c=l[0];if(c==="p"||c==="P"){const O=Lt[c];return O(l,a.formatLong)}return l}).join("").match(It).map(l=>{if(l==="''")return{isToken:!1,value:"'"};const c=l[0];if(c==="'")return{isToken:!1,value:te(l)};if(E[c])return{isToken:!0,value:l};if(c.match(Zt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+c+"`");return{isToken:!1,value:l}});a.localize.preprocessor&&(d=a.localize.preprocessor(u,d));const w={firstWeekContainsDate:i,weekStartsOn:o,locale:a};return d.map(l=>{if(!l.isToken)return l.value;const c=l.value;(!n?.useAdditionalWeekYearTokens&&Rt(c)||!n?.useAdditionalDayOfYearTokens&&jt(c))&&At(c,e,String(t));const O=E[c[0]];return O(u,c,a.localize,w)}).join("")}function te(t){const e=t.match(Ut);return e?e[1].replace(Kt,"'"):t}function ee(t,e){return+m(t)>+m(e)}function H(t,e,n){const[r,a]=S(n?.in,t,e);return+p(r,n)==+p(a,n)}function W(t,e){if(t.one!==void 0&&e===1)return t.one;const n=e%10,r=e%100;return n===1&&r!==11?t.singularNominative.replace("{{count}}",String(e)):n>=2&&n<=4&&(r<10||r>20)?t.singularGenitive.replace("{{count}}",String(e)):t.pluralGenitive.replace("{{count}}",String(e))}function f(t){return(e,n)=>n?.addSuffix?n.comparison&&n.comparison>0?t.future?W(t.future,e):"через "+W(t.regular,e):t.past?W(t.past,e):W(t.regular,e)+" назад":W(t.regular,e)}const ne={lessThanXSeconds:f({regular:{one:"меньше секунды",singularNominative:"меньше {{count}} секунды",singularGenitive:"меньше {{count}} секунд",pluralGenitive:"меньше {{count}} секунд"},future:{one:"меньше, чем через секунду",singularNominative:"меньше, чем через {{count}} секунду",singularGenitive:"меньше, чем через {{count}} секунды",pluralGenitive:"меньше, чем через {{count}} секунд"}}),xSeconds:f({regular:{singularNominative:"{{count}} секунда",singularGenitive:"{{count}} секунды",pluralGenitive:"{{count}} секунд"},past:{singularNominative:"{{count}} секунду назад",singularGenitive:"{{count}} секунды назад",pluralGenitive:"{{count}} секунд назад"},future:{singularNominative:"через {{count}} секунду",singularGenitive:"через {{count}} секунды",pluralGenitive:"через {{count}} секунд"}}),halfAMinute:(t,e)=>e?.addSuffix?e.comparison&&e.comparison>0?"через полминуты":"полминуты назад":"полминуты",lessThanXMinutes:f({regular:{one:"меньше минуты",singularNominative:"меньше {{count}} минуты",singularGenitive:"меньше {{count}} минут",pluralGenitive:"меньше {{count}} минут"},future:{one:"меньше, чем через минуту",singularNominative:"меньше, чем через {{count}} минуту",singularGenitive:"меньше, чем через {{count}} минуты",pluralGenitive:"меньше, чем через {{count}} минут"}}),xMinutes:f({regular:{singularNominative:"{{count}} минута",singularGenitive:"{{count}} минуты",pluralGenitive:"{{count}} минут"},past:{singularNominative:"{{count}} минуту назад",singularGenitive:"{{count}} минуты назад",pluralGenitive:"{{count}} минут назад"},future:{singularNominative:"через {{count}} минуту",singularGenitive:"через {{count}} минуты",pluralGenitive:"через {{count}} минут"}}),aboutXHours:f({regular:{singularNominative:"около {{count}} часа",singularGenitive:"около {{count}} часов",pluralGenitive:"около {{count}} часов"},future:{singularNominative:"приблизительно через {{count}} час",singularGenitive:"приблизительно через {{count}} часа",pluralGenitive:"приблизительно через {{count}} часов"}}),xHours:f({regular:{singularNominative:"{{count}} час",singularGenitive:"{{count}} часа",pluralGenitive:"{{count}} часов"}}),xDays:f({regular:{singularNominative:"{{count}} день",singularGenitive:"{{count}} дня",pluralGenitive:"{{count}} дней"}}),aboutXWeeks:f({regular:{singularNominative:"около {{count}} недели",singularGenitive:"около {{count}} недель",pluralGenitive:"около {{count}} недель"},future:{singularNominative:"приблизительно через {{count}} неделю",singularGenitive:"приблизительно через {{count}} недели",pluralGenitive:"приблизительно через {{count}} недель"}}),xWeeks:f({regular:{singularNominative:"{{count}} неделя",singularGenitive:"{{count}} недели",pluralGenitive:"{{count}} недель"}}),aboutXMonths:f({regular:{singularNominative:"около {{count}} месяца",singularGenitive:"около {{count}} месяцев",pluralGenitive:"около {{count}} месяцев"},future:{singularNominative:"приблизительно через {{count}} месяц",singularGenitive:"приблизительно через {{count}} месяца",pluralGenitive:"приблизительно через {{count}} месяцев"}}),xMonths:f({regular:{singularNominative:"{{count}} месяц",singularGenitive:"{{count}} месяца",pluralGenitive:"{{count}} месяцев"}}),aboutXYears:f({regular:{singularNominative:"около {{count}} года",singularGenitive:"около {{count}} лет",pluralGenitive:"около {{count}} лет"},future:{singularNominative:"приблизительно через {{count}} год",singularGenitive:"приблизительно через {{count}} года",pluralGenitive:"приблизительно через {{count}} лет"}}),xYears:f({regular:{singularNominative:"{{count}} год",singularGenitive:"{{count}} года",pluralGenitive:"{{count}} лет"}}),overXYears:f({regular:{singularNominative:"больше {{count}} года",singularGenitive:"больше {{count}} лет",pluralGenitive:"больше {{count}} лет"},future:{singularNominative:"больше, чем через {{count}} год",singularGenitive:"больше, чем через {{count}} года",pluralGenitive:"больше, чем через {{count}} лет"}}),almostXYears:f({regular:{singularNominative:"почти {{count}} год",singularGenitive:"почти {{count}} года",pluralGenitive:"почти {{count}} лет"},future:{singularNominative:"почти через {{count}} год",singularGenitive:"почти через {{count}} года",pluralGenitive:"почти через {{count}} лет"}})},re=(t,e,n)=>ne[t](e,n),ae={full:"EEEE, d MMMM y 'г.'",long:"d MMMM y 'г.'",medium:"d MMM y 'г.'",short:"dd.MM.y"},ie={full:"H:mm:ss zzzz",long:"H:mm:ss z",medium:"H:mm:ss",short:"H:mm"},oe={any:"{{date}}, {{time}}"},se={date:M({formats:ae,defaultWidth:"full"}),time:M({formats:ie,defaultWidth:"full"}),dateTime:M({formats:oe,defaultWidth:"any"})},G=["воскресенье","понедельник","вторник","среду","четверг","пятницу","субботу"];function ue(t){const e=G[t];switch(t){case 0:return"'в прошлое "+e+" в' p";case 1:case 2:case 4:return"'в прошлый "+e+" в' p";case 3:case 5:case 6:return"'в прошлую "+e+" в' p"}}function _(t){const e=G[t];return t===2?"'во "+e+" в' p":"'в "+e+" в' p"}function ce(t){const e=G[t];switch(t){case 0:return"'в следующее "+e+" в' p";case 1:case 2:case 4:return"'в следующий "+e+" в' p";case 3:case 5:case 6:return"'в следующую "+e+" в' p"}}const de={lastWeek:(t,e,n)=>{const r=t.getDay();return H(t,e,n)?_(r):ue(r)},yesterday:"'вчера в' p",today:"'сегодня в' p",tomorrow:"'завтра в' p",nextWeek:(t,e,n)=>{const r=t.getDay();return H(t,e,n)?_(r):ce(r)},other:"P"},le=(t,e,n,r)=>{const a=de[t];return typeof a=="function"?a(e,n,r):a},fe={narrow:["до н.э.","н.э."],abbreviated:["до н. э.","н. э."],wide:["до нашей эры","нашей эры"]},me={narrow:["1","2","3","4"],abbreviated:["1-й кв.","2-й кв.","3-й кв.","4-й кв."],wide:["1-й квартал","2-й квартал","3-й квартал","4-й квартал"]},he={narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","март","апр.","май","июнь","июль","авг.","сент.","окт.","нояб.","дек."],wide:["январь","февраль","март","апрель","май","июнь","июль","август","сентябрь","октябрь","ноябрь","декабрь"]},ge={narrow:["Я","Ф","М","А","М","И","И","А","С","О","Н","Д"],abbreviated:["янв.","фев.","мар.","апр.","мая","июн.","июл.","авг.","сент.","окт.","нояб.","дек."],wide:["января","февраля","марта","апреля","мая","июня","июля","августа","сентября","октября","ноября","декабря"]},we={narrow:["В","П","В","С","Ч","П","С"],short:["вс","пн","вт","ср","чт","пт","сб"],abbreviated:["вск","пнд","втр","срд","чтв","птн","суб"],wide:["воскресенье","понедельник","вторник","среда","четверг","пятница","суббота"]},ye={narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утро",afternoon:"день",evening:"веч.",night:"ночь"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утро",afternoon:"день",evening:"вечер",night:"ночь"}},be={narrow:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},abbreviated:{am:"ДП",pm:"ПП",midnight:"полн.",noon:"полд.",morning:"утра",afternoon:"дня",evening:"веч.",night:"ночи"},wide:{am:"ДП",pm:"ПП",midnight:"полночь",noon:"полдень",morning:"утра",afternoon:"дня",evening:"вечера",night:"ночи"}},ve=(t,e)=>{const n=Number(t),r=e?.unit;let a;return r==="date"?a="-е":r==="week"||r==="minute"||r==="second"?a="-я":a="-й",n+a},pe={ordinalNumber:ve,era:h({values:fe,defaultWidth:"wide"}),quarter:h({values:me,defaultWidth:"wide",argumentCallback:t=>t-1}),month:h({values:he,defaultWidth:"wide",formattingValues:ge,defaultFormattingWidth:"wide"}),day:h({values:we,defaultWidth:"wide"}),dayPeriod:h({values:ye,defaultWidth:"any",formattingValues:be,defaultFormattingWidth:"wide"})},Pe=/^(\d+)(-?(е|я|й|ое|ье|ая|ья|ый|ой|ий|ый))?/i,Me=/\d+/i,We={narrow:/^((до )?н\.?\s?э\.?)/i,abbreviated:/^((до )?н\.?\s?э\.?)/i,wide:/^(до нашей эры|нашей эры|наша эра)/i},ke={any:[/^д/i,/^н/i]},De={narrow:/^[1234]/i,abbreviated:/^[1234](-?[ыои]?й?)? кв.?/i,wide:/^[1234](-?[ыои]?й?)? квартал/i},Oe={any:[/1/i,/2/i,/3/i,/4/i]},xe={narrow:/^[яфмаисонд]/i,abbreviated:/^(янв|фев|март?|апр|ма[йя]|июн[ья]?|июл[ья]?|авг|сент?|окт|нояб?|дек)\.?/i,wide:/^(январ[ья]|феврал[ья]|марта?|апрел[ья]|ма[йя]|июн[ья]|июл[ья]|августа?|сентябр[ья]|октябр[ья]|октябр[ья]|ноябр[ья]|декабр[ья])/i},Se={narrow:[/^я/i,/^ф/i,/^м/i,/^а/i,/^м/i,/^и/i,/^и/i,/^а/i,/^с/i,/^о/i,/^н/i,/^я/i],any:[/^я/i,/^ф/i,/^мар/i,/^ап/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^ав/i,/^с/i,/^о/i,/^н/i,/^д/i]},Ge={narrow:/^[впсч]/i,short:/^(вс|во|пн|по|вт|ср|чт|че|пт|пя|сб|су)\.?/i,abbreviated:/^(вск|вос|пнд|пон|втр|вто|срд|сре|чтв|чет|птн|пят|суб).?/i,wide:/^(воскресень[ея]|понедельника?|вторника?|сред[аы]|четверга?|пятниц[аы]|суббот[аы])/i},Ye={narrow:[/^в/i,/^п/i,/^в/i,/^с/i,/^ч/i,/^п/i,/^с/i],any:[/^в[ос]/i,/^п[он]/i,/^в/i,/^ср/i,/^ч/i,/^п[ят]/i,/^с[уб]/i]},Ne={narrow:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,abbreviated:/^([дп]п|полн\.?|полд\.?|утр[оа]|день|дня|веч\.?|ноч[ьи])/i,wide:/^([дп]п|полночь|полдень|утр[оа]|день|дня|вечера?|ноч[ьи])/i},Te={any:{am:/^дп/i,pm:/^пп/i,midnight:/^полн/i,noon:/^полд/i,morning:/^у/i,afternoon:/^д[ен]/i,evening:/^в/i,night:/^н/i}},Fe={ordinalNumber:B({matchPattern:Pe,parsePattern:Me,valueCallback:t=>parseInt(t,10)}),era:g({matchPatterns:We,defaultMatchWidth:"wide",parsePatterns:ke,defaultParseWidth:"any"}),quarter:g({matchPatterns:De,defaultMatchWidth:"wide",parsePatterns:Oe,defaultParseWidth:"any",valueCallback:t=>t+1}),month:g({matchPatterns:xe,defaultMatchWidth:"wide",parsePatterns:Se,defaultParseWidth:"any"}),day:g({matchPatterns:Ge,defaultMatchWidth:"wide",parsePatterns:Ye,defaultParseWidth:"any"}),dayPeriod:g({matchPatterns:Ne,defaultMatchWidth:"wide",parsePatterns:Te,defaultParseWidth:"any"})},A={code:"ru",formatDistance:re,formatLong:se,formatRelative:le,localize:pe,match:Fe,options:{weekStartsOn:1,firstWeekContainsDate:1}};function Ee(t){return R(new Date(t),"d MMMM yyyy",{locale:A})}function Ce(t){return R(new Date(t),"d MMMM, HH:mm",{locale:A})}function qe(t,e){return nt(new Date(e),new Date(t))}function $e(t){return ee(new Date,new Date(t))}function He(t,e="₽",n=2){return`${t.toLocaleString("en-US",{minimumFractionDigits:n,maximumFractionDigits:n}).replace(/,/g," ")} ${e}`}function _e(t){return t.reduce((e,n)=>e+n,0)}function Xe(t){const e=t.replace(/[^\d.,]/g,"").replace(",",".");return parseFloat(e)||0}exports.EventBus=x.EventBus;exports.Portal=x._sfc_main;exports.useBodyScroll=x.useBodyScroll;exports.onClickOutside=z.onClickOutside;exports.openFileDialog=I.openFileDialog;exports.dayjs=J.dayjs;exports.formatDateReadable=Ee;exports.formatDateWithTime=Ce;exports.formatPrice=He;exports.getDaysBetween=qe;exports.isExpired=$e;exports.parsePrice=Xe;exports.sumPrices=_e;
@@ -1,7 +1,7 @@
1
1
  import { E as Xe, _ as _e, u as Le } from "../eventBus.util-msbJpg6N.js";
2
- import { o as Ve } from "../parseFileSize.util-EJk-rAI5.js";
3
- import { o as Re } from "../uploadFile.util-vuFr0xb6.js";
4
- import { d as Ae } from "../ru-DQ91TLXh.js";
2
+ import { o as Ve } from "../dayjs.util-DSjkslnJ.js";
3
+ import { o as Re } from "../uploadFile.util-CTWK4zza.js";
4
+ import { d as Ae } from "../parseFileSize.util-BAG-MLFl.js";
5
5
  const X = 6048e5, A = 864e5, G = Symbol.for("constructDateFrom");
6
6
  function b(t, e) {
7
7
  return typeof t == "function" ? t(e) : t && typeof t == "object" && G in t ? t[G](e) : t instanceof Date ? new t.constructor(e) : new Date(e);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "prlg-ui",
3
3
  "private": false,
4
- "version": "1.8.295",
4
+ "version": "1.8.297",
5
5
  "type": "module",
6
6
  "main": "dist/prlg-ui.umd.js",
7
7
  "module": "dist/prlg-ui.es.js",
@@ -1 +0,0 @@
1
- "use strict";const e=require("vue"),p=require("./FileIcon-Dt-TWf3B.cjs"),m=require("./EyeIcon-CJg2W9QQ.cjs"),y=require("./parseFileSize.util-DE7Sk0nR.cjs");class I{stack=[];baseZIndex={confirm:1400,modal:1300,drawer:1200,popover:1100,tooltip:1e3};step=10;childStep=50;idCounter=0;listeners=new Set;subscribe(a){return this.listeners.add(a),()=>this.listeners.delete(a)}notify(){this.listeners.forEach(a=>a())}register(a,o){const i=++this.idCounter,l=o?this.stack.find(u=>u.id===o):void 0;let s;if(l)s=l.zIndex+this.childStep;else{const u=this.stack.filter(c=>c.type===a&&!c.parentId);s=(u.length?Math.max(...u.map(c=>c.zIndex)):this.baseZIndex[a])+this.step}const n={id:i,type:a,parentId:o??null,zIndex:s};return this.stack.push(n),this.notify(),n}unregister(a){this.stack=this.stack.filter(o=>o.id!==a),this.notify()}getTop(){return this.stack.length?this.stack[this.stack.length-1]:null}isTop(a){return this.getTop()?.id===a}getStack(){return[...this.stack]}}const v=new I,g=Symbol("OVERLAY_PARENT");function _(t){const a=e.inject(g,null),o=e.ref(null);return e.onMounted(()=>{o.value=v.register(t,a??null)}),e.onUnmounted(()=>{o.value&&v.unregister(o.value.id)}),e.watch(o,i=>{i&&e.provide(g,i.id)},{immediate:!0}),{zIndex:o,isTop:()=>o.value?v.isTop(o.value.id):!1}}function h(t){return t.startsWith("image/")?"image":t==="application/pdf"?"pdf":t==="application/msword"||t==="application/vnd.openxmlformats-officedocument.wordprocessingml.document"?"word":t==="application/vnd.ms-excel"||t==="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"?"excel":"other"}const E={key:1,class:"file__title"},z={key:2,class:"file__info"},V={key:0,class:"file__type"},C={key:1,class:"file__info-separator"},N={key:2,class:"file__size"},w=e.defineComponent({__name:"File",props:{file:{},viewName:{type:Boolean,default:!1},outlined:{type:Boolean,default:!0},removable:{type:Boolean}},emits:["remove"],setup(t,{emit:a}){const o=a,i=e.useId(),l=e.ref(null);async function s(r,c="image"){const d=await(await fetch(r)).blob(),k=d.type.split("/")[1]||"",B=k?`${c}.${k}`:c;return new File([d],B,{type:d.type})}const n=e.computed(()=>l.value&&l.value.mime?h(l.value.mime):null),u=e.computed(()=>{switch(n.value){case"pdf":return p.PdfIcon;case"word":return p.WordIcon;case"excel":return p.ExcelIcon;case"other":default:return p.FileIcon}});return e.onMounted(async()=>{if(typeof t.file=="string"){const r=await s(t.file);l.value={id:i,url:t.file,name:r.name,mime:r.type,size:r.size}}else l.value=t.file}),(r,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["file",{"file--outlined":r.outlined}])},[r.removable&&typeof r.file!="string"?(e.openBlock(),e.createElementBlock("button",{key:0,class:"file__remove",onClick:c[0]||(c[0]=f=>o("remove",r.file))},[e.createVNode(e.unref(m.CloseIcon))])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(u.value),{class:"file__icon"})),l.value&&l.value.name&&r.viewName?(e.openBlock(),e.createElementBlock("div",E,e.toDisplayString(l.value?l.value.name.split(".")[0]:"unknown"),1)):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("div",z,[l.value.mime?(e.openBlock(),e.createElementBlock("div",V,e.toDisplayString(n.value),1)):e.createCommentVNode("",!0),l.value.mime&&l.value.size?(e.openBlock(),e.createElementBlock("div",C)):e.createCommentVNode("",!0),l.value.size?(e.openBlock(),e.createElementBlock("div",N,e.toDisplayString(l.value?e.unref(y.formatFileSize)(l.value.size):"0 Б"),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2))}}),F=m._export_sfc(w,[["__scopeId","data-v-7c3d1c11"]]),b={class:"image-full-modal__wrapper"},S={class:"image-full-modal__header"},$={class:"image-full-modal__main"},x=["src","alt"],M=e.defineComponent({__name:"ImageFullModal",props:{src:{},alt:{}},setup(t,{expose:a}){const o=e.ref(!1),{zIndex:i}=_("modal");return a({open:()=>{o.value=!0},close:()=>{o.value=!1}}),(l,s)=>(e.openBlock(),e.createBlock(e.Teleport,{to:"body"},[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"image-full-modal",style:e.normalizeStyle({zIndex:e.unref(i)?.zIndex})},[e.createElementVNode("div",{class:"image-full-modal__overlay",onClick:s[0]||(s[0]=n=>o.value=!1)}),e.createElementVNode("div",b,[e.createElementVNode("div",S,[e.createElementVNode("button",{class:"image-full-modal__close",onClick:s[1]||(s[1]=n=>o.value=!1)},[e.createVNode(e.unref(m.CloseIcon))])]),e.createElementVNode("div",$,[e.createElementVNode("img",{src:l.src,alt:l.alt},null,8,x)]),s[2]||(s[2]=e.createElementVNode("div",{class:"image-full-modal__footer"},null,-1))])],4)):e.createCommentVNode("",!0)]),_:1})]))}}),O=m._export_sfc(M,[["__scopeId","data-v-26b5c867"]]),T=["src","alt"],R={key:1,class:"image__info"},D={key:0,class:"image__size"},q=e.defineComponent({__name:"Image",props:{file:{},alt:{},size:{default:"medium"},fullScreen:{type:Boolean},viewInfo:{type:Boolean,default:!1}},setup(t){const a=e.useId(),o=e.useTemplateRef("imageFullModal"),i=e.ref(null);async function l(n,u="image"){const c=await(await fetch(n)).blob(),f=c.type.split("/")[1]||"",d=f?`${u}.${f}`:u;return new File([c],d,{type:c.type})}const s=e.computed(()=>typeof t.file=="string"?t.file:t.file.url);return e.onMounted(async()=>{if(t.viewInfo)if(typeof t.file=="string"){const n=await l(t.file);i.value={id:a,url:t.file,name:n.name,mime:n.type,size:n.size}}else i.value=t.file}),(n,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass(["image",`image--${n.size}`,{"image--full-screen":n.fullScreen}])},[n.fullScreen?(e.openBlock(),e.createElementBlock("div",{key:0,class:"image__overlay",onClick:u[0]||(u[0]=r=>o.value?.open())},[e.createVNode(e.unref(m.EyeIcon))])):e.createCommentVNode("",!0),e.createElementVNode("img",{src:s.value,alt:n.alt},null,8,T),n.viewInfo&&i.value&&(i.value.mime||i.value.size)&&n.size==="large"?(e.openBlock(),e.createElementBlock("div",R,[i.value.size?(e.openBlock(),e.createElementBlock("div",D,e.toDisplayString(i.value?e.unref(y.formatFileSize)(i.value.size):"0 Б"),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)],2),n.fullScreen?(e.openBlock(),e.createBlock(O,{key:0,ref:"imageFullModal",src:s.value,alt:n.alt},null,8,["src","alt"])):e.createCommentVNode("",!0)],64))}}),A=m._export_sfc(q,[["__scopeId","data-v-903c99cc"]]);exports.File=F;exports.Image=A;exports.getFileTypeByMime=h;exports.useOverlay=_;