@opengis/cms 0.0.4 → 0.0.6

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/cms.js CHANGED
@@ -5193,7 +5193,7 @@ const ys = /* @__PURE__ */ J(Ed, [["render", Yd]]), Nd = { class: "p-4 w-[260px]
5193
5193
  ], 64);
5194
5194
  };
5195
5195
  }
5196
- }, Id = { class: "w-full bg-[#f6f6f9] h-full h-[calc(100vh-60px)]" }, Wd = { class: "flex h-full" }, Vd = {
5196
+ }, Id = { class: "w-full bg-[#f6f6f9] h-[calc(100vh-60px)]" }, Wd = { class: "flex h-full" }, Vd = {
5197
5197
  __name: "vs-builder",
5198
5198
  setup(e) {
5199
5199
  const t = V({});
package/dist/cms.umd.cjs CHANGED
@@ -16,4 +16,4 @@ var pn;function w(){return pn.apply(null,arguments)}function oo(e){pn=e}function
16
16
  [`+o+"] ";for(i in arguments[0])C(arguments[0],i)&&(s+=i+": "+arguments[0][i]+", ");s=s.slice(0,-2)}else s=arguments[o];n.push(s)}gn(e+`
17
17
  Arguments: `+Array.prototype.slice.call(n).join("")+`
18
18
  `+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var wn={};function xn(e,t){w.deprecationHandler!=null&&w.deprecationHandler(e,t),wn[e]||(gn(t),wn[e]=!0)}w.suppressDeprecationWarnings=!1,w.deprecationHandler=null;function oe(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function lo(e){var t,r;for(r in e)C(e,r)&&(t=e[r],oe(t)?this[r]=t:this["_"+r]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)}function er(e,t){var r=ge({},e),n;for(n in t)C(t,n)&&(De(e[n])&&De(t[n])?(r[n]={},ge(r[n],e[n]),ge(r[n],t[n])):t[n]!=null?r[n]=t[n]:delete r[n]);for(n in e)C(e,n)&&!C(t,n)&&De(e[n])&&(r[n]=ge({},r[n]));return r}function tr(e){e!=null&&this.set(e)}var rr;Object.keys?rr=Object.keys:rr=function(e){var t,r=[];for(t in e)C(e,t)&&r.push(t);return r};var co={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function uo(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return oe(n)?n.call(t,r):n}function ie(e,t,r){var n=""+Math.abs(e),s=t-n.length,o=e>=0;return(o?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var nr=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,mt=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,sr={},Re={};function D(e,t,r,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),e&&(Re[e]=s),t&&(Re[t[0]]=function(){return ie(s.apply(this,arguments),t[1],t[2])}),r&&(Re[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function fo(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function ho(e){var t=e.match(nr),r,n;for(r=0,n=t.length;r<n;r++)Re[t[r]]?t[r]=Re[t[r]]:t[r]=fo(t[r]);return function(s){var o="",i;for(i=0;i<n;i++)o+=oe(t[i])?t[i].call(s,e):t[i];return o}}function pt(e,t){return e.isValid()?(t=kn(t,e.localeData()),sr[t]=sr[t]||ho(t),sr[t](e)):e.localeData().invalidDate()}function kn(e,t){var r=5;function n(s){return t.longDateFormat(s)||s}for(mt.lastIndex=0;r>=0&&mt.test(e);)e=e.replace(mt,n),mt.lastIndex=0,r-=1;return e}var mo={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};function po(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(nr).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var yo="Invalid date";function _o(){return this._invalidDate}var go="%d",wo=/\d{1,2}/;function xo(e){return this._ordinal.replace("%d",e)}var ko={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function bo(e,t,r,n){var s=this._relativeTime[r];return oe(s)?s(e,t,r,n):s.replace(/%d/i,e)}function So(e,t){var r=this._relativeTime[e>0?"future":"past"];return oe(r)?r(t):r.replace(/%s/i,t)}var bn={D:"date",dates:"date",date:"date",d:"day",days:"day",day:"day",e:"weekday",weekdays:"weekday",weekday:"weekday",E:"isoWeekday",isoweekdays:"isoWeekday",isoweekday:"isoWeekday",DDD:"dayOfYear",dayofyears:"dayOfYear",dayofyear:"dayOfYear",h:"hour",hours:"hour",hour:"hour",ms:"millisecond",milliseconds:"millisecond",millisecond:"millisecond",m:"minute",minutes:"minute",minute:"minute",M:"month",months:"month",month:"month",Q:"quarter",quarters:"quarter",quarter:"quarter",s:"second",seconds:"second",second:"second",gg:"weekYear",weekyears:"weekYear",weekyear:"weekYear",GG:"isoWeekYear",isoweekyears:"isoWeekYear",isoweekyear:"isoWeekYear",w:"week",weeks:"week",week:"week",W:"isoWeek",isoweeks:"isoWeek",isoweek:"isoWeek",y:"year",years:"year",year:"year"};function J(e){return typeof e=="string"?bn[e]||bn[e.toLowerCase()]:void 0}function ar(e){var t={},r,n;for(n in e)C(e,n)&&(r=J(n),r&&(t[r]=e[n]));return t}var Do={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Eo(e){var t=[],r;for(r in e)C(e,r)&&t.push({unit:r,priority:Do[r]});return t.sort(function(n,s){return n.priority-s.priority}),t}var Sn=/\d/,G=/\d\d/,Dn=/\d{3}/,or=/\d{4}/,yt=/[+-]?\d{6}/,Y=/\d\d?/,En=/\d\d\d\d?/,Nn=/\d\d\d\d\d\d?/,_t=/\d{1,3}/,ir=/\d{1,4}/,gt=/[+-]?\d{1,6}/,Ve=/\d+/,wt=/[+-]?\d+/,No=/Z|[+-]\d\d:?\d\d/gi,xt=/Z|[+-]\d\d(?::?\d\d)?/gi,Oo=/[+-]?\d+(\.\d{1,3})?/,ze=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Pe=/^[1-9]\d?/,lr=/^([1-9]\d|\d)/,kt;kt={};function x(e,t,r){kt[e]=oe(t)?t:function(n,s){return n&&r?r:t}}function Mo(e,t){return C(kt,e)?kt[e](t._strict,t._locale):new RegExp(To(e))}function To(e){return de(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,s,o){return r||n||s||o}))}function de(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function K(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function M(e){var t=+e,r=0;return t!==0&&isFinite(t)&&(r=K(t)),r}var cr={};function P(e,t){var r,n=t,s;for(typeof e=="string"&&(e=[e]),ce(t)&&(n=function(o,i){i[t]=M(o)}),s=e.length,r=0;r<s;r++)cr[e[r]]=n}function qe(e,t){P(e,function(r,n,s,o){s._w=s._w||{},t(r,s._w,s,o)})}function Co(e,t,r){t!=null&&C(cr,e)&&cr[e](t,r._a,r,e)}function bt(e){return e%4===0&&e%100!==0||e%400===0}var I=0,ue=1,le=2,$=3,te=4,fe=5,Ee=6,Ro=7,Vo=8;D("Y",0,0,function(){var e=this.year();return e<=9999?ie(e,4):"+"+e}),D(0,["YY",2],0,function(){return this.year()%100}),D(0,["YYYY",4],0,"year"),D(0,["YYYYY",5],0,"year"),D(0,["YYYYYY",6,!0],0,"year"),x("Y",wt),x("YY",Y,G),x("YYYY",ir,or),x("YYYYY",gt,yt),x("YYYYYY",gt,yt),P(["YYYYY","YYYYYY"],I),P("YYYY",function(e,t){t[I]=e.length===2?w.parseTwoDigitYear(e):M(e)}),P("YY",function(e,t){t[I]=w.parseTwoDigitYear(e)}),P("Y",function(e,t){t[I]=parseInt(e,10)});function Ge(e){return bt(e)?366:365}w.parseTwoDigitYear=function(e){return M(e)+(M(e)>68?1900:2e3)};var On=Ye("FullYear",!0);function Po(){return bt(this.year())}function Ye(e,t){return function(r){return r!=null?(Mn(this,e,r),w.updateOffset(this,t),this):Ze(this,e)}}function Ze(e,t){if(!e.isValid())return NaN;var r=e._d,n=e._isUTC;switch(t){case"Milliseconds":return n?r.getUTCMilliseconds():r.getMilliseconds();case"Seconds":return n?r.getUTCSeconds():r.getSeconds();case"Minutes":return n?r.getUTCMinutes():r.getMinutes();case"Hours":return n?r.getUTCHours():r.getHours();case"Date":return n?r.getUTCDate():r.getDate();case"Day":return n?r.getUTCDay():r.getDay();case"Month":return n?r.getUTCMonth():r.getMonth();case"FullYear":return n?r.getUTCFullYear():r.getFullYear();default:return NaN}}function Mn(e,t,r){var n,s,o,i,l;if(!(!e.isValid()||isNaN(r))){switch(n=e._d,s=e._isUTC,t){case"Milliseconds":return void(s?n.setUTCMilliseconds(r):n.setMilliseconds(r));case"Seconds":return void(s?n.setUTCSeconds(r):n.setSeconds(r));case"Minutes":return void(s?n.setUTCMinutes(r):n.setMinutes(r));case"Hours":return void(s?n.setUTCHours(r):n.setHours(r));case"Date":return void(s?n.setUTCDate(r):n.setDate(r));case"FullYear":break;default:return}o=r,i=e.month(),l=e.date(),l=l===29&&i===1&&!bt(o)?28:l,s?n.setUTCFullYear(o,i,l):n.setFullYear(o,i,l)}}function Yo(e){return e=J(e),oe(this[e])?this[e]():this}function Ao(e,t){if(typeof e=="object"){e=ar(e);var r=Eo(e),n,s=r.length;for(n=0;n<s;n++)this[r[n].unit](e[r[n].unit])}else if(e=J(e),oe(this[e]))return this[e](t);return this}function Fo(e,t){return(e%t+t)%t}var v;Array.prototype.indexOf?v=Array.prototype.indexOf:v=function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function dr(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=Fo(t,12);return e+=(t-r)/12,r===1?bt(e)?29:28:31-r%7%2}D("M",["MM",2],"Mo",function(){return this.month()+1}),D("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),D("MMMM",0,0,function(e){return this.localeData().months(this,e)}),x("M",Y,Pe),x("MM",Y,G),x("MMM",function(e,t){return t.monthsShortRegex(e)}),x("MMMM",function(e,t){return t.monthsRegex(e)}),P(["M","MM"],function(e,t){t[ue]=M(e)-1}),P(["MMM","MMMM"],function(e,t,r,n){var s=r._locale.monthsParse(e,n,r._strict);s!=null?t[ue]=s:N(r).invalidMonth=e});var Bo="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Tn="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Cn=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,vo=ze,$o=ze;function Uo(e,t){return e?X(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Cn).test(t)?"format":"standalone"][e.month()]:X(this._months)?this._months:this._months.standalone}function Lo(e,t){return e?X(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Cn.test(t)?"format":"standalone"][e.month()]:X(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Io(e,t,r){var n,s,o,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)o=ae([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(o,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(o,"").toLocaleLowerCase();return r?t==="MMM"?(s=v.call(this._shortMonthsParse,i),s!==-1?s:null):(s=v.call(this._longMonthsParse,i),s!==-1?s:null):t==="MMM"?(s=v.call(this._shortMonthsParse,i),s!==-1?s:(s=v.call(this._longMonthsParse,i),s!==-1?s:null)):(s=v.call(this._longMonthsParse,i),s!==-1?s:(s=v.call(this._shortMonthsParse,i),s!==-1?s:null))}function Wo(e,t,r){var n,s,o;if(this._monthsParseExact)return Io.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(s=ae([2e3,n]),r&&!this._longMonthsParse[n]&&(this._longMonthsParse[n]=new RegExp("^"+this.months(s,"").replace(".","")+"$","i"),this._shortMonthsParse[n]=new RegExp("^"+this.monthsShort(s,"").replace(".","")+"$","i")),!r&&!this._monthsParse[n]&&(o="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[n]=new RegExp(o.replace(".",""),"i")),r&&t==="MMMM"&&this._longMonthsParse[n].test(e))return n;if(r&&t==="MMM"&&this._shortMonthsParse[n].test(e))return n;if(!r&&this._monthsParse[n].test(e))return n}}function Rn(e,t){if(!e.isValid())return e;if(typeof t=="string"){if(/^\d+$/.test(t))t=M(t);else if(t=e.localeData().monthsParse(t),!ce(t))return e}var r=t,n=e.date();return n=n<29?n:Math.min(n,dr(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function Vn(e){return e!=null?(Rn(this,e),w.updateOffset(this,!0),this):Ze(this,"Month")}function jo(){return dr(this.year(),this.month())}function Ho(e){return this._monthsParseExact?(C(this,"_monthsRegex")||Pn.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(C(this,"_monthsShortRegex")||(this._monthsShortRegex=vo),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function zo(e){return this._monthsParseExact?(C(this,"_monthsRegex")||Pn.call(this),e?this._monthsStrictRegex:this._monthsRegex):(C(this,"_monthsRegex")||(this._monthsRegex=$o),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Pn(){function e(d,c){return c.length-d.length}var t=[],r=[],n=[],s,o,i,l;for(s=0;s<12;s++)o=ae([2e3,s]),i=de(this.monthsShort(o,"")),l=de(this.months(o,"")),t.push(i),r.push(l),n.push(l),n.push(i);t.sort(e),r.sort(e),n.sort(e),this._monthsRegex=new RegExp("^("+n.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+t.join("|")+")","i")}function qo(e,t,r,n,s,o,i){var l;return e<100&&e>=0?(l=new Date(e+400,t,r,n,s,o,i),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,r,n,s,o,i),l}function Je(e){var t,r;return e<100&&e>=0?(r=Array.prototype.slice.call(arguments),r[0]=e+400,t=new Date(Date.UTC.apply(null,r)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function St(e,t,r){var n=7+t-r,s=(7+Je(e,0,n).getUTCDay()-t)%7;return-s+n-1}function Yn(e,t,r,n,s){var o=(7+r-n)%7,i=St(e,n,s),l=1+7*(t-1)+o+i,d,c;return l<=0?(d=e-1,c=Ge(d)+l):l>Ge(e)?(d=e+1,c=l-Ge(e)):(d=e,c=l),{year:d,dayOfYear:c}}function Ke(e,t,r){var n=St(e.year(),t,r),s=Math.floor((e.dayOfYear()-n-1)/7)+1,o,i;return s<1?(i=e.year()-1,o=s+he(i,t,r)):s>he(e.year(),t,r)?(o=s-he(e.year(),t,r),i=e.year()+1):(i=e.year(),o=s),{week:o,year:i}}function he(e,t,r){var n=St(e,t,r),s=St(e+1,t,r);return(Ge(e)-n+s)/7}D("w",["ww",2],"wo","week"),D("W",["WW",2],"Wo","isoWeek"),x("w",Y,Pe),x("ww",Y,G),x("W",Y,Pe),x("WW",Y,G),qe(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=M(e)});function Go(e){return Ke(e,this._week.dow,this._week.doy).week}var Zo={dow:0,doy:6};function Jo(){return this._week.dow}function Ko(){return this._week.doy}function Qo(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Xo(e){var t=Ke(this,1,4).week;return e==null?t:this.add((e-t)*7,"d")}D("d",0,"do","day"),D("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),D("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),D("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),D("e",0,0,"weekday"),D("E",0,0,"isoWeekday"),x("d",Y),x("e",Y),x("E",Y),x("dd",function(e,t){return t.weekdaysMinRegex(e)}),x("ddd",function(e,t){return t.weekdaysShortRegex(e)}),x("dddd",function(e,t){return t.weekdaysRegex(e)}),qe(["dd","ddd","dddd"],function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);s!=null?t.d=s:N(r).invalidWeekday=e}),qe(["d","e","E"],function(e,t,r,n){t[n]=M(e)});function ei(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function ti(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function ur(e,t){return e.slice(t,7).concat(e.slice(0,t))}var ri="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),An="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),ni="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),si=ze,ai=ze,oi=ze;function ii(e,t){var r=X(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?ur(r,this._week.dow):e?r[e.day()]:r}function li(e){return e===!0?ur(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ci(e){return e===!0?ur(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function di(e,t,r){var n,s,o,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)o=ae([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(o,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(o,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(o,"").toLocaleLowerCase();return r?t==="dddd"?(s=v.call(this._weekdaysParse,i),s!==-1?s:null):t==="ddd"?(s=v.call(this._shortWeekdaysParse,i),s!==-1?s:null):(s=v.call(this._minWeekdaysParse,i),s!==-1?s:null):t==="dddd"?(s=v.call(this._weekdaysParse,i),s!==-1||(s=v.call(this._shortWeekdaysParse,i),s!==-1)?s:(s=v.call(this._minWeekdaysParse,i),s!==-1?s:null)):t==="ddd"?(s=v.call(this._shortWeekdaysParse,i),s!==-1||(s=v.call(this._weekdaysParse,i),s!==-1)?s:(s=v.call(this._minWeekdaysParse,i),s!==-1?s:null)):(s=v.call(this._minWeekdaysParse,i),s!==-1||(s=v.call(this._weekdaysParse,i),s!==-1)?s:(s=v.call(this._shortWeekdaysParse,i),s!==-1?s:null))}function ui(e,t,r){var n,s,o;if(this._weekdaysParseExact)return di.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=ae([2e3,1]).day(n),r&&!this._fullWeekdaysParse[n]&&(this._fullWeekdaysParse[n]=new RegExp("^"+this.weekdays(s,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[n]=new RegExp("^"+this.weekdaysShort(s,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[n]=new RegExp("^"+this.weekdaysMin(s,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[n]||(o="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(o.replace(".",""),"i")),r&&t==="dddd"&&this._fullWeekdaysParse[n].test(e))return n;if(r&&t==="ddd"&&this._shortWeekdaysParse[n].test(e))return n;if(r&&t==="dd"&&this._minWeekdaysParse[n].test(e))return n;if(!r&&this._weekdaysParse[n].test(e))return n}}function fi(e){if(!this.isValid())return e!=null?this:NaN;var t=Ze(this,"Day");return e!=null?(e=ei(e,this.localeData()),this.add(e-t,"d")):t}function hi(e){if(!this.isValid())return e!=null?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,"d")}function mi(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=ti(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function pi(e){return this._weekdaysParseExact?(C(this,"_weekdaysRegex")||fr.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(C(this,"_weekdaysRegex")||(this._weekdaysRegex=si),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function yi(e){return this._weekdaysParseExact?(C(this,"_weekdaysRegex")||fr.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(C(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=ai),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function _i(e){return this._weekdaysParseExact?(C(this,"_weekdaysRegex")||fr.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(C(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=oi),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function fr(){function e(f,h){return h.length-f.length}var t=[],r=[],n=[],s=[],o,i,l,d,c;for(o=0;o<7;o++)i=ae([2e3,1]).day(o),l=de(this.weekdaysMin(i,"")),d=de(this.weekdaysShort(i,"")),c=de(this.weekdays(i,"")),t.push(l),r.push(d),n.push(c),s.push(l),s.push(d),s.push(c);t.sort(e),r.sort(e),n.sort(e),s.sort(e),this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+n.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+t.join("|")+")","i")}function hr(){return this.hours()%12||12}function gi(){return this.hours()||24}D("H",["HH",2],0,"hour"),D("h",["hh",2],0,hr),D("k",["kk",2],0,gi),D("hmm",0,0,function(){return""+hr.apply(this)+ie(this.minutes(),2)}),D("hmmss",0,0,function(){return""+hr.apply(this)+ie(this.minutes(),2)+ie(this.seconds(),2)}),D("Hmm",0,0,function(){return""+this.hours()+ie(this.minutes(),2)}),D("Hmmss",0,0,function(){return""+this.hours()+ie(this.minutes(),2)+ie(this.seconds(),2)});function Fn(e,t){D(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Fn("a",!0),Fn("A",!1);function Bn(e,t){return t._meridiemParse}x("a",Bn),x("A",Bn),x("H",Y,lr),x("h",Y,Pe),x("k",Y,Pe),x("HH",Y,G),x("hh",Y,G),x("kk",Y,G),x("hmm",En),x("hmmss",Nn),x("Hmm",En),x("Hmmss",Nn),P(["H","HH"],$),P(["k","kk"],function(e,t,r){var n=M(e);t[$]=n===24?0:n}),P(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),P(["h","hh"],function(e,t,r){t[$]=M(e),N(r).bigHour=!0}),P("hmm",function(e,t,r){var n=e.length-2;t[$]=M(e.substr(0,n)),t[te]=M(e.substr(n)),N(r).bigHour=!0}),P("hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[$]=M(e.substr(0,n)),t[te]=M(e.substr(n,2)),t[fe]=M(e.substr(s)),N(r).bigHour=!0}),P("Hmm",function(e,t,r){var n=e.length-2;t[$]=M(e.substr(0,n)),t[te]=M(e.substr(n))}),P("Hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[$]=M(e.substr(0,n)),t[te]=M(e.substr(n,2)),t[fe]=M(e.substr(s))});function wi(e){return(e+"").toLowerCase().charAt(0)==="p"}var xi=/[ap]\.?m?\.?/i,ki=Ye("Hours",!0);function bi(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var vn={calendar:co,longDateFormat:mo,invalidDate:yo,ordinal:go,dayOfMonthOrdinalParse:wo,relativeTime:ko,months:Bo,monthsShort:Tn,week:Zo,weekdays:ri,weekdaysMin:ni,weekdaysShort:An,meridiemParse:xi},F={},Qe={},Xe;function Si(e,t){var r,n=Math.min(e.length,t.length);for(r=0;r<n;r+=1)if(e[r]!==t[r])return r;return n}function $n(e){return e&&e.toLowerCase().replace("_","-")}function Di(e){for(var t=0,r,n,s,o;t<e.length;){for(o=$n(e[t]).split("-"),r=o.length,n=$n(e[t+1]),n=n?n.split("-"):null;r>0;){if(s=Dt(o.slice(0,r).join("-")),s)return s;if(n&&n.length>=r&&Si(o,n)>=r-1)break;r--}t++}return Xe}function Ei(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Dt(e){var t=null,r;if(F[e]===void 0&&typeof module<"u"&&module&&module.exports&&Ei(e))try{t=Xe._abbr,r=require,r("./locale/"+e),we(t)}catch{F[e]=null}return F[e]}function we(e,t){var r;return e&&(z(t)?r=me(e):r=mr(e,t),r?Xe=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),Xe._abbr}function mr(e,t){if(t!==null){var r,n=vn;if(t.abbr=e,F[e]!=null)xn("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=F[e]._config;else if(t.parentLocale!=null)if(F[t.parentLocale]!=null)n=F[t.parentLocale]._config;else if(r=Dt(t.parentLocale),r!=null)n=r._config;else return Qe[t.parentLocale]||(Qe[t.parentLocale]=[]),Qe[t.parentLocale].push({name:e,config:t}),null;return F[e]=new tr(er(n,t)),Qe[e]&&Qe[e].forEach(function(s){mr(s.name,s.config)}),we(e),F[e]}else return delete F[e],null}function Ni(e,t){if(t!=null){var r,n,s=vn;F[e]!=null&&F[e].parentLocale!=null?F[e].set(er(F[e]._config,t)):(n=Dt(e),n!=null&&(s=n._config),t=er(s,t),n==null&&(t.abbr=e),r=new tr(t),r.parentLocale=F[e],F[e]=r),we(e)}else F[e]!=null&&(F[e].parentLocale!=null?(F[e]=F[e].parentLocale,e===we()&&we(e)):F[e]!=null&&delete F[e]);return F[e]}function me(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return Xe;if(!X(e)){if(t=Dt(e),t)return t;e=[e]}return Di(e)}function Oi(){return rr(F)}function pr(e){var t,r=e._a;return r&&N(e).overflow===-2&&(t=r[ue]<0||r[ue]>11?ue:r[le]<1||r[le]>dr(r[I],r[ue])?le:r[$]<0||r[$]>24||r[$]===24&&(r[te]!==0||r[fe]!==0||r[Ee]!==0)?$:r[te]<0||r[te]>59?te:r[fe]<0||r[fe]>59?fe:r[Ee]<0||r[Ee]>999?Ee:-1,N(e)._overflowDayOfYear&&(t<I||t>le)&&(t=le),N(e)._overflowWeeks&&t===-1&&(t=Ro),N(e)._overflowWeekday&&t===-1&&(t=Vo),N(e).overflow=t),e}var Mi=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ti=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ci=/Z|[+-]\d\d(?::?\d\d)?/,Et=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],yr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ri=/^\/?Date\((-?\d+)/i,Vi=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Pi={UT:0,GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function Un(e){var t,r,n=e._i,s=Mi.exec(n)||Ti.exec(n),o,i,l,d,c=Et.length,f=yr.length;if(s){for(N(e).iso=!0,t=0,r=c;t<r;t++)if(Et[t][1].exec(s[1])){i=Et[t][0],o=Et[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(s[3]){for(t=0,r=f;t<r;t++)if(yr[t][1].exec(s[3])){l=(s[2]||" ")+yr[t][0];break}if(l==null){e._isValid=!1;return}}if(!o&&l!=null){e._isValid=!1;return}if(s[4])if(Ci.exec(s[4]))d="Z";else{e._isValid=!1;return}e._f=i+(l||"")+(d||""),gr(e)}else e._isValid=!1}function Yi(e,t,r,n,s,o){var i=[Ai(e),Tn.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(s,10)];return o&&i.push(parseInt(o,10)),i}function Ai(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Fi(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Bi(e,t,r){if(e){var n=An.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(n!==s)return N(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function vi(e,t,r){if(e)return Pi[e];if(t)return 0;var n=parseInt(r,10),s=n%100,o=(n-s)/100;return o*60+s}function Ln(e){var t=Vi.exec(Fi(e._i)),r;if(t){if(r=Yi(t[4],t[3],t[2],t[5],t[6],t[7]),!Bi(t[1],r,e))return;e._a=r,e._tzm=vi(t[8],t[9],t[10]),e._d=Je.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),N(e).rfc2822=!0}else e._isValid=!1}function $i(e){var t=Ri.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Un(e),e._isValid===!1)delete e._isValid;else return;if(Ln(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:w.createFromInputFallback(e)}w.createFromInputFallback=Z("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))});function Ae(e,t,r){return e??t??r}function Ui(e){var t=new Date(w.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function _r(e){var t,r,n=[],s,o,i;if(!e._d){for(s=Ui(e),e._w&&e._a[le]==null&&e._a[ue]==null&&Li(e),e._dayOfYear!=null&&(i=Ae(e._a[I],s[I]),(e._dayOfYear>Ge(i)||e._dayOfYear===0)&&(N(e)._overflowDayOfYear=!0),r=Je(i,0,e._dayOfYear),e._a[ue]=r.getUTCMonth(),e._a[le]=r.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=n[t]=s[t];for(;t<7;t++)e._a[t]=n[t]=e._a[t]==null?t===2?1:0:e._a[t];e._a[$]===24&&e._a[te]===0&&e._a[fe]===0&&e._a[Ee]===0&&(e._nextDay=!0,e._a[$]=0),e._d=(e._useUTC?Je:qo).apply(null,n),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[$]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==o&&(N(e).weekdayMismatch=!0)}}function Li(e){var t,r,n,s,o,i,l,d,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(o=1,i=4,r=Ae(t.GG,e._a[I],Ke(A(),1,4).year),n=Ae(t.W,1),s=Ae(t.E,1),(s<1||s>7)&&(d=!0)):(o=e._locale._week.dow,i=e._locale._week.doy,c=Ke(A(),o,i),r=Ae(t.gg,e._a[I],c.year),n=Ae(t.w,c.week),t.d!=null?(s=t.d,(s<0||s>6)&&(d=!0)):t.e!=null?(s=t.e+o,(t.e<0||t.e>6)&&(d=!0)):s=o),n<1||n>he(r,o,i)?N(e)._overflowWeeks=!0:d!=null?N(e)._overflowWeekday=!0:(l=Yn(r,n,s,o,i),e._a[I]=l.year,e._dayOfYear=l.dayOfYear)}w.ISO_8601=function(){},w.RFC_2822=function(){};function gr(e){if(e._f===w.ISO_8601){Un(e);return}if(e._f===w.RFC_2822){Ln(e);return}e._a=[],N(e).empty=!0;var t=""+e._i,r,n,s,o,i,l=t.length,d=0,c,f;for(s=kn(e._f,e._locale).match(nr)||[],f=s.length,r=0;r<f;r++)o=s[r],n=(t.match(Mo(o,e))||[])[0],n&&(i=t.substr(0,t.indexOf(n)),i.length>0&&N(e).unusedInput.push(i),t=t.slice(t.indexOf(n)+n.length),d+=n.length),Re[o]?(n?N(e).empty=!1:N(e).unusedTokens.push(o),Co(o,n,e)):e._strict&&!n&&N(e).unusedTokens.push(o);N(e).charsLeftOver=l-d,t.length>0&&N(e).unusedInput.push(t),e._a[$]<=12&&N(e).bigHour===!0&&e._a[$]>0&&(N(e).bigHour=void 0),N(e).parsedDateParts=e._a.slice(0),N(e).meridiem=e._meridiem,e._a[$]=Ii(e._locale,e._a[$],e._meridiem),c=N(e).era,c!==null&&(e._a[I]=e._locale.erasConvertYear(c,e._a[I])),_r(e),pr(e)}function Ii(e,t,r){var n;return r==null?t:e.meridiemHour!=null?e.meridiemHour(t,r):(e.isPM!=null&&(n=e.isPM(r),n&&t<12&&(t+=12),!n&&t===12&&(t=0)),t)}function Wi(e){var t,r,n,s,o,i,l=!1,d=e._f.length;if(d===0){N(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<d;s++)o=0,i=!1,t=Xt({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],gr(t),Kt(t)&&(i=!0),o+=N(t).charsLeftOver,o+=N(t).unusedTokens.length*10,N(t).score=o,l?o<n&&(n=o,r=t):(n==null||o<n||i)&&(n=o,r=t,i&&(l=!0));ge(e,r||t)}function ji(e){if(!e._d){var t=ar(e._i),r=t.day===void 0?t.date:t.day;e._a=yn([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),_r(e)}}function Hi(e){var t=new He(pr(In(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function In(e){var t=e._i,r=e._f;return e._locale=e._locale||me(e._l),t===null||r===void 0&&t===""?ht({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),ee(t)?new He(pr(t)):(je(t)?e._d=t:X(r)?Wi(e):r?gr(e):zi(e),Kt(e)||(e._d=null),e))}function zi(e){var t=e._i;z(t)?e._d=new Date(w.now()):je(t)?e._d=new Date(t.valueOf()):typeof t=="string"?$i(e):X(t)?(e._a=yn(t.slice(0),function(r){return parseInt(r,10)}),_r(e)):De(t)?ji(e):ce(t)?e._d=new Date(t):w.createFromInputFallback(e)}function Wn(e,t,r,n,s){var o={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(De(e)&&Zt(e)||X(e)&&e.length===0)&&(e=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=s,o._l=r,o._i=e,o._f=t,o._strict=n,Hi(o)}function A(e,t,r,n){return Wn(e,t,r,n,!1)}var qi=Z("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=A.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:ht()}),Gi=Z("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var e=A.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:ht()});function jn(e,t){var r,n;if(t.length===1&&X(t[0])&&(t=t[0]),!t.length)return A();for(r=t[0],n=1;n<t.length;++n)(!t[n].isValid()||t[n][e](r))&&(r=t[n]);return r}function Zi(){var e=[].slice.call(arguments,0);return jn("isBefore",e)}function Ji(){var e=[].slice.call(arguments,0);return jn("isAfter",e)}var Ki=function(){return Date.now?Date.now():+new Date},et=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Qi(e){var t,r=!1,n,s=et.length;for(t in e)if(C(e,t)&&!(v.call(et,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<s;++n)if(e[et[n]]){if(r)return!1;parseFloat(e[et[n]])!==M(e[et[n]])&&(r=!0)}return!0}function Xi(){return this._isValid}function el(){return re(NaN)}function Nt(e){var t=ar(e),r=t.year||0,n=t.quarter||0,s=t.month||0,o=t.week||t.isoWeek||0,i=t.day||0,l=t.hour||0,d=t.minute||0,c=t.second||0,f=t.millisecond||0;this._isValid=Qi(t),this._milliseconds=+f+c*1e3+d*6e4+l*1e3*60*60,this._days=+i+o*7,this._months=+s+n*3+r*12,this._data={},this._locale=me(),this._bubble()}function Ot(e){return e instanceof Nt}function wr(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function tl(e,t,r){var n=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),o=0,i;for(i=0;i<n;i++)M(e[i])!==M(t[i])&&o++;return o+s}function Hn(e,t){D(e,0,0,function(){var r=this.utcOffset(),n="+";return r<0&&(r=-r,n="-"),n+ie(~~(r/60),2)+t+ie(~~r%60,2)})}Hn("Z",":"),Hn("ZZ",""),x("Z",xt),x("ZZ",xt),P(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=xr(xt,e)});var rl=/([\+\-]|\d\d)/gi;function xr(e,t){var r=(t||"").match(e),n,s,o;return r===null?null:(n=r[r.length-1]||[],s=(n+"").match(rl)||["-",0,0],o=+(s[1]*60)+M(s[2]),o===0?0:s[0]==="+"?o:-o)}function kr(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(ee(e)||je(e)?e.valueOf():A(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),w.updateOffset(r,!1),r):A(e).local()}function br(e){return-Math.round(e._d.getTimezoneOffset())}w.updateOffset=function(){};function nl(e,t,r){var n=this._offset||0,s;if(!this.isValid())return e!=null?this:NaN;if(e!=null){if(typeof e=="string"){if(e=xr(xt,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(s=br(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),n!==e&&(!t||this._changeInProgress?Zn(this,re(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,w.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:br(this)}function sl(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function al(e){return this.utcOffset(0,e)}function ol(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(br(this),"m")),this}function il(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=xr(No,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function ll(e){return this.isValid()?(e=e?A(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function cl(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function dl(){if(!z(this._isDSTShifted))return this._isDSTShifted;var e={},t;return Xt(e,this),e=In(e),e._a?(t=e._isUTC?ae(e._a):A(e._a),this._isDSTShifted=this.isValid()&&tl(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ul(){return this.isValid()?!this._isUTC:!1}function fl(){return this.isValid()?this._isUTC:!1}function zn(){return this.isValid()?this._isUTC&&this._offset===0:!1}var hl=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,ml=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function re(e,t){var r=e,n=null,s,o,i;return Ot(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:ce(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=hl.exec(e))?(s=n[1]==="-"?-1:1,r={y:0,d:M(n[le])*s,h:M(n[$])*s,m:M(n[te])*s,s:M(n[fe])*s,ms:M(wr(n[Ee]*1e3))*s}):(n=ml.exec(e))?(s=n[1]==="-"?-1:1,r={y:Ne(n[2],s),M:Ne(n[3],s),w:Ne(n[4],s),d:Ne(n[5],s),h:Ne(n[6],s),m:Ne(n[7],s),s:Ne(n[8],s)}):r==null?r={}:typeof r=="object"&&("from"in r||"to"in r)&&(i=pl(A(r.from),A(r.to)),r={},r.ms=i.milliseconds,r.M=i.months),o=new Nt(r),Ot(e)&&C(e,"_locale")&&(o._locale=e._locale),Ot(e)&&C(e,"_isValid")&&(o._isValid=e._isValid),o}re.fn=Nt.prototype,re.invalid=el;function Ne(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function qn(e,t){var r={};return r.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(r.months,"M").isAfter(t)&&--r.months,r.milliseconds=+t-+e.clone().add(r.months,"M"),r}function pl(e,t){var r;return e.isValid()&&t.isValid()?(t=kr(t,e),e.isBefore(t)?r=qn(e,t):(r=qn(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Gn(e,t){return function(r,n){var s,o;return n!==null&&!isNaN(+n)&&(xn(t,"moment()."+t+"(period, number) is deprecated. Please use moment()."+t+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),o=r,r=n,n=o),s=re(r,n),Zn(this,s,e),this}}function Zn(e,t,r,n){var s=t._milliseconds,o=wr(t._days),i=wr(t._months);e.isValid()&&(n=n??!0,i&&Rn(e,Ze(e,"Month")+i*r),o&&Mn(e,"Date",Ze(e,"Date")+o*r),s&&e._d.setTime(e._d.valueOf()+s*r),n&&w.updateOffset(e,o||i))}var yl=Gn(1,"add"),_l=Gn(-1,"subtract");function Jn(e){return typeof e=="string"||e instanceof String}function gl(e){return ee(e)||je(e)||Jn(e)||ce(e)||xl(e)||wl(e)||e===null||e===void 0}function wl(e){var t=De(e)&&!Zt(e),r=!1,n=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],s,o,i=n.length;for(s=0;s<i;s+=1)o=n[s],r=r||C(e,o);return t&&r}function xl(e){var t=X(e),r=!1;return t&&(r=e.filter(function(n){return!ce(n)&&Jn(e)}).length===0),t&&r}function kl(e){var t=De(e)&&!Zt(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,o;for(s=0;s<n.length;s+=1)o=n[s],r=r||C(e,o);return t&&r}function bl(e,t){var r=e.diff(t,"days",!0);return r<-6?"sameElse":r<-1?"lastWeek":r<0?"lastDay":r<1?"sameDay":r<2?"nextDay":r<7?"nextWeek":"sameElse"}function Sl(e,t){arguments.length===1&&(arguments[0]?gl(arguments[0])?(e=arguments[0],t=void 0):kl(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||A(),n=kr(r,this).startOf("day"),s=w.calendarFormat(this,n)||"sameElse",o=t&&(oe(t[s])?t[s].call(this,r):t[s]);return this.format(o||this.localeData().calendar(s,this,A(r)))}function Dl(){return new He(this)}function El(e,t){var r=ee(e)?e:A(e);return this.isValid()&&r.isValid()?(t=J(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function Nl(e,t){var r=ee(e)?e:A(e);return this.isValid()&&r.isValid()?(t=J(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function Ol(e,t,r,n){var s=ee(e)?e:A(e),o=ee(t)?t:A(t);return this.isValid()&&s.isValid()&&o.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(s,r):!this.isBefore(s,r))&&(n[1]===")"?this.isBefore(o,r):!this.isAfter(o,r))):!1}function Ml(e,t){var r=ee(e)?e:A(e),n;return this.isValid()&&r.isValid()?(t=J(t)||"millisecond",t==="millisecond"?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf())):!1}function Tl(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function Cl(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function Rl(e,t,r){var n,s,o;if(!this.isValid())return NaN;if(n=kr(e,this),!n.isValid())return NaN;switch(s=(n.utcOffset()-this.utcOffset())*6e4,t=J(t),t){case"year":o=Mt(this,n)/12;break;case"month":o=Mt(this,n);break;case"quarter":o=Mt(this,n)/3;break;case"second":o=(this-n)/1e3;break;case"minute":o=(this-n)/6e4;break;case"hour":o=(this-n)/36e5;break;case"day":o=(this-n-s)/864e5;break;case"week":o=(this-n-s)/6048e5;break;default:o=this-n}return r?o:K(o)}function Mt(e,t){if(e.date()<t.date())return-Mt(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),s,o;return t-n<0?(s=e.clone().add(r-1,"months"),o=(t-n)/(n-s)):(s=e.clone().add(r+1,"months"),o=(t-n)/(s-n)),-(r+o)||0}w.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",w.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function Vl(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function Pl(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?pt(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):oe(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",pt(r,"Z")):pt(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Yl(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,s,o;return this.isLocal()||(e=this.utcOffset()===0?"moment.utc":"moment.parseZone",t="Z"),r="["+e+'("]',n=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",s="-MM-DD[T]HH:mm:ss.SSS",o=t+'[")]',this.format(r+n+s+o)}function Al(e){e||(e=this.isUtc()?w.defaultFormatUtc:w.defaultFormat);var t=pt(this,e);return this.localeData().postformat(t)}function Fl(e,t){return this.isValid()&&(ee(e)&&e.isValid()||A(e).isValid())?re({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Bl(e){return this.from(A(),e)}function vl(e,t){return this.isValid()&&(ee(e)&&e.isValid()||A(e).isValid())?re({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function $l(e){return this.to(A(),e)}function Kn(e){var t;return e===void 0?this._locale._abbr:(t=me(e),t!=null&&(this._locale=t),this)}var Qn=Z("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return e===void 0?this.localeData():this.locale(e)});function Xn(){return this._locale}var Tt=1e3,Fe=60*Tt,Ct=60*Fe,es=(365*400+97)*24*Ct;function Be(e,t){return(e%t+t)%t}function ts(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-es:new Date(e,t,r).valueOf()}function rs(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-es:Date.UTC(e,t,r)}function Ul(e){var t,r;if(e=J(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?rs:ts,e){case"year":t=r(this.year(),0,1);break;case"quarter":t=r(this.year(),this.month()-this.month()%3,1);break;case"month":t=r(this.year(),this.month(),1);break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":t=r(this.year(),this.month(),this.date());break;case"hour":t=this._d.valueOf(),t-=Be(t+(this._isUTC?0:this.utcOffset()*Fe),Ct);break;case"minute":t=this._d.valueOf(),t-=Be(t,Fe);break;case"second":t=this._d.valueOf(),t-=Be(t,Tt);break}return this._d.setTime(t),w.updateOffset(this,!0),this}function Ll(e){var t,r;if(e=J(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?rs:ts,e){case"year":t=r(this.year()+1,0,1)-1;break;case"quarter":t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":t=r(this.year(),this.month()+1,1)-1;break;case"week":t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":t=r(this.year(),this.month(),this.date()+1)-1;break;case"hour":t=this._d.valueOf(),t+=Ct-Be(t+(this._isUTC?0:this.utcOffset()*Fe),Ct)-1;break;case"minute":t=this._d.valueOf(),t+=Fe-Be(t,Fe)-1;break;case"second":t=this._d.valueOf(),t+=Tt-Be(t,Tt)-1;break}return this._d.setTime(t),w.updateOffset(this,!0),this}function Il(){return this._d.valueOf()-(this._offset||0)*6e4}function Wl(){return Math.floor(this.valueOf()/1e3)}function jl(){return new Date(this.valueOf())}function Hl(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function zl(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function ql(){return this.isValid()?this.toISOString():null}function Gl(){return Kt(this)}function Zl(){return ge({},N(this))}function Jl(){return N(this).overflow}function Kl(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}D("N",0,0,"eraAbbr"),D("NN",0,0,"eraAbbr"),D("NNN",0,0,"eraAbbr"),D("NNNN",0,0,"eraName"),D("NNNNN",0,0,"eraNarrow"),D("y",["y",1],"yo","eraYear"),D("y",["yy",2],0,"eraYear"),D("y",["yyy",3],0,"eraYear"),D("y",["yyyy",4],0,"eraYear"),x("N",Sr),x("NN",Sr),x("NNN",Sr),x("NNNN",lc),x("NNNNN",cc),P(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?N(r).era=s:N(r).invalidEra=e}),x("y",Ve),x("yy",Ve),x("yyy",Ve),x("yyyy",Ve),x("yo",dc),P(["y","yy","yyy","yyyy"],I),P(["yo"],function(e,t,r,n){var s;r._locale._eraYearOrdinalRegex&&(s=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[I]=r._locale.eraYearOrdinalParse(e,s):t[I]=parseInt(e,10)});function Ql(e,t){var r,n,s,o=this._eras||me("en")._eras;for(r=0,n=o.length;r<n;++r){switch(typeof o[r].since){case"string":s=w(o[r].since).startOf("day"),o[r].since=s.valueOf();break}switch(typeof o[r].until){case"undefined":o[r].until=1/0;break;case"string":s=w(o[r].until).startOf("day").valueOf(),o[r].until=s.valueOf();break}}return o}function Xl(e,t,r){var n,s,o=this.eras(),i,l,d;for(e=e.toUpperCase(),n=0,s=o.length;n<s;++n)if(i=o[n].name.toUpperCase(),l=o[n].abbr.toUpperCase(),d=o[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(l===e)return o[n];break;case"NNNN":if(i===e)return o[n];break;case"NNNNN":if(d===e)return o[n];break}else if([i,l,d].indexOf(e)>=0)return o[n]}function ec(e,t){var r=e.since<=e.until?1:-1;return t===void 0?w(e.since).year():w(e.since).year()+(t-e.offset)*r}function tc(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].name;return""}function rc(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].narrow;return""}function nc(){var e,t,r,n=this.localeData().eras();for(e=0,t=n.length;e<t;++e)if(r=this.clone().startOf("day").valueOf(),n[e].since<=r&&r<=n[e].until||n[e].until<=r&&r<=n[e].since)return n[e].abbr;return""}function sc(){var e,t,r,n,s=this.localeData().eras();for(e=0,t=s.length;e<t;++e)if(r=s[e].since<=s[e].until?1:-1,n=this.clone().startOf("day").valueOf(),s[e].since<=n&&n<=s[e].until||s[e].until<=n&&n<=s[e].since)return(this.year()-w(s[e].since).year())*r+s[e].offset;return this.year()}function ac(e){return C(this,"_erasNameRegex")||Dr.call(this),e?this._erasNameRegex:this._erasRegex}function oc(e){return C(this,"_erasAbbrRegex")||Dr.call(this),e?this._erasAbbrRegex:this._erasRegex}function ic(e){return C(this,"_erasNarrowRegex")||Dr.call(this),e?this._erasNarrowRegex:this._erasRegex}function Sr(e,t){return t.erasAbbrRegex(e)}function lc(e,t){return t.erasNameRegex(e)}function cc(e,t){return t.erasNarrowRegex(e)}function dc(e,t){return t._eraYearOrdinalRegex||Ve}function Dr(){var e=[],t=[],r=[],n=[],s,o,i,l,d,c=this.eras();for(s=0,o=c.length;s<o;++s)i=de(c[s].name),l=de(c[s].abbr),d=de(c[s].narrow),t.push(i),e.push(l),r.push(d),n.push(i),n.push(l),n.push(d);this._erasRegex=new RegExp("^("+n.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+t.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+e.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+r.join("|")+")","i")}D(0,["gg",2],0,function(){return this.weekYear()%100}),D(0,["GG",2],0,function(){return this.isoWeekYear()%100});function Rt(e,t){D(0,[e,e.length],0,t)}Rt("gggg","weekYear"),Rt("ggggg","weekYear"),Rt("GGGG","isoWeekYear"),Rt("GGGGG","isoWeekYear"),x("G",wt),x("g",wt),x("GG",Y,G),x("gg",Y,G),x("GGGG",ir,or),x("gggg",ir,or),x("GGGGG",gt,yt),x("ggggg",gt,yt),qe(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=M(e)}),qe(["gg","GG"],function(e,t,r,n){t[n]=w.parseTwoDigitYear(e)});function uc(e){return ns.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function fc(e){return ns.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function hc(){return he(this.year(),1,4)}function mc(){return he(this.isoWeekYear(),1,4)}function pc(){var e=this.localeData()._week;return he(this.year(),e.dow,e.doy)}function yc(){var e=this.localeData()._week;return he(this.weekYear(),e.dow,e.doy)}function ns(e,t,r,n,s){var o;return e==null?Ke(this,n,s).year:(o=he(e,n,s),t>o&&(t=o),_c.call(this,e,t,r,n,s))}function _c(e,t,r,n,s){var o=Yn(e,t,r,n,s),i=Je(o.year,0,o.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}D("Q",0,"Qo","quarter"),x("Q",Sn),P("Q",function(e,t){t[ue]=(M(e)-1)*3});function gc(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}D("D",["DD",2],"Do","date"),x("D",Y,Pe),x("DD",Y,G),x("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),P(["D","DD"],le),P("Do",function(e,t){t[le]=M(e.match(Y)[0])});var ss=Ye("Date",!0);D("DDD",["DDDD",3],"DDDo","dayOfYear"),x("DDD",_t),x("DDDD",Dn),P(["DDD","DDDD"],function(e,t,r){r._dayOfYear=M(e)});function wc(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return e==null?t:this.add(e-t,"d")}D("m",["mm",2],0,"minute"),x("m",Y,lr),x("mm",Y,G),P(["m","mm"],te);var xc=Ye("Minutes",!1);D("s",["ss",2],0,"second"),x("s",Y,lr),x("ss",Y,G),P(["s","ss"],fe);var kc=Ye("Seconds",!1);D("S",0,0,function(){return~~(this.millisecond()/100)}),D(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),D(0,["SSS",3],0,"millisecond"),D(0,["SSSS",4],0,function(){return this.millisecond()*10}),D(0,["SSSSS",5],0,function(){return this.millisecond()*100}),D(0,["SSSSSS",6],0,function(){return this.millisecond()*1e3}),D(0,["SSSSSSS",7],0,function(){return this.millisecond()*1e4}),D(0,["SSSSSSSS",8],0,function(){return this.millisecond()*1e5}),D(0,["SSSSSSSSS",9],0,function(){return this.millisecond()*1e6}),x("S",_t,Sn),x("SS",_t,G),x("SSS",_t,Dn);var xe,as;for(xe="SSSS";xe.length<=9;xe+="S")x(xe,Ve);function bc(e,t){t[Ee]=M(("0."+e)*1e3)}for(xe="S";xe.length<=9;xe+="S")P(xe,bc);as=Ye("Milliseconds",!1),D("z",0,0,"zoneAbbr"),D("zz",0,0,"zoneName");function Sc(){return this._isUTC?"UTC":""}function Dc(){return this._isUTC?"Coordinated Universal Time":""}var m=He.prototype;m.add=yl,m.calendar=Sl,m.clone=Dl,m.diff=Rl,m.endOf=Ll,m.format=Al,m.from=Fl,m.fromNow=Bl,m.to=vl,m.toNow=$l,m.get=Yo,m.invalidAt=Jl,m.isAfter=El,m.isBefore=Nl,m.isBetween=Ol,m.isSame=Ml,m.isSameOrAfter=Tl,m.isSameOrBefore=Cl,m.isValid=Gl,m.lang=Qn,m.locale=Kn,m.localeData=Xn,m.max=Gi,m.min=qi,m.parsingFlags=Zl,m.set=Ao,m.startOf=Ul,m.subtract=_l,m.toArray=Hl,m.toObject=zl,m.toDate=jl,m.toISOString=Pl,m.inspect=Yl,typeof Symbol<"u"&&Symbol.for!=null&&(m[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),m.toJSON=ql,m.toString=Vl,m.unix=Wl,m.valueOf=Il,m.creationData=Kl,m.eraName=tc,m.eraNarrow=rc,m.eraAbbr=nc,m.eraYear=sc,m.year=On,m.isLeapYear=Po,m.weekYear=uc,m.isoWeekYear=fc,m.quarter=m.quarters=gc,m.month=Vn,m.daysInMonth=jo,m.week=m.weeks=Qo,m.isoWeek=m.isoWeeks=Xo,m.weeksInYear=pc,m.weeksInWeekYear=yc,m.isoWeeksInYear=hc,m.isoWeeksInISOWeekYear=mc,m.date=ss,m.day=m.days=fi,m.weekday=hi,m.isoWeekday=mi,m.dayOfYear=wc,m.hour=m.hours=ki,m.minute=m.minutes=xc,m.second=m.seconds=kc,m.millisecond=m.milliseconds=as,m.utcOffset=nl,m.utc=al,m.local=ol,m.parseZone=il,m.hasAlignedHourOffset=ll,m.isDST=cl,m.isLocal=ul,m.isUtcOffset=fl,m.isUtc=zn,m.isUTC=zn,m.zoneAbbr=Sc,m.zoneName=Dc,m.dates=Z("dates accessor is deprecated. Use date instead.",ss),m.months=Z("months accessor is deprecated. Use month instead",Vn),m.years=Z("years accessor is deprecated. Use year instead",On),m.zone=Z("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",sl),m.isDSTShifted=Z("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",dl);function Ec(e){return A(e*1e3)}function Nc(){return A.apply(null,arguments).parseZone()}function os(e){return e}var R=tr.prototype;R.calendar=uo,R.longDateFormat=po,R.invalidDate=_o,R.ordinal=xo,R.preparse=os,R.postformat=os,R.relativeTime=bo,R.pastFuture=So,R.set=lo,R.eras=Ql,R.erasParse=Xl,R.erasConvertYear=ec,R.erasAbbrRegex=oc,R.erasNameRegex=ac,R.erasNarrowRegex=ic,R.months=Uo,R.monthsShort=Lo,R.monthsParse=Wo,R.monthsRegex=zo,R.monthsShortRegex=Ho,R.week=Go,R.firstDayOfYear=Ko,R.firstDayOfWeek=Jo,R.weekdays=ii,R.weekdaysMin=ci,R.weekdaysShort=li,R.weekdaysParse=ui,R.weekdaysRegex=pi,R.weekdaysShortRegex=yi,R.weekdaysMinRegex=_i,R.isPM=wi,R.meridiem=bi;function Vt(e,t,r,n){var s=me(),o=ae().set(n,t);return s[r](o,e)}function is(e,t,r){if(ce(e)&&(t=e,e=void 0),e=e||"",t!=null)return Vt(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=Vt(e,n,r,"month");return s}function Er(e,t,r,n){typeof e=="boolean"?(ce(t)&&(r=t,t=void 0),t=t||""):(t=e,r=t,e=!1,ce(t)&&(r=t,t=void 0),t=t||"");var s=me(),o=e?s._week.dow:0,i,l=[];if(r!=null)return Vt(t,(r+o)%7,n,"day");for(i=0;i<7;i++)l[i]=Vt(t,(i+o)%7,n,"day");return l}function Oc(e,t){return is(e,t,"months")}function Mc(e,t){return is(e,t,"monthsShort")}function Tc(e,t,r){return Er(e,t,r,"weekdays")}function Cc(e,t,r){return Er(e,t,r,"weekdaysShort")}function Rc(e,t,r){return Er(e,t,r,"weekdaysMin")}we("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10,r=M(e%100/10)===1?"th":t===1?"st":t===2?"nd":t===3?"rd":"th";return e+r}}),w.lang=Z("moment.lang is deprecated. Use moment.locale instead.",we),w.langData=Z("moment.langData is deprecated. Use moment.localeData instead.",me);var pe=Math.abs;function Vc(){var e=this._data;return this._milliseconds=pe(this._milliseconds),this._days=pe(this._days),this._months=pe(this._months),e.milliseconds=pe(e.milliseconds),e.seconds=pe(e.seconds),e.minutes=pe(e.minutes),e.hours=pe(e.hours),e.months=pe(e.months),e.years=pe(e.years),this}function ls(e,t,r,n){var s=re(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function Pc(e,t){return ls(this,e,t,1)}function Yc(e,t){return ls(this,e,t,-1)}function cs(e){return e<0?Math.floor(e):Math.ceil(e)}function Ac(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,s,o,i,l,d;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=cs(Nr(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,s=K(e/1e3),n.seconds=s%60,o=K(s/60),n.minutes=o%60,i=K(o/60),n.hours=i%24,t+=K(i/24),d=K(ds(t)),r+=d,t-=cs(Nr(d)),l=K(r/12),r%=12,n.days=t,n.months=r,n.years=l,this}function ds(e){return e*4800/146097}function Nr(e){return e*146097/4800}function Fc(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=J(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+ds(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Nr(this._months)),e){case"week":return t/7+n/6048e5;case"day":return t+n/864e5;case"hour":return t*24+n/36e5;case"minute":return t*1440+n/6e4;case"second":return t*86400+n/1e3;case"millisecond":return Math.floor(t*864e5)+n;default:throw new Error("Unknown unit "+e)}}function ye(e){return function(){return this.as(e)}}var us=ye("ms"),Bc=ye("s"),vc=ye("m"),$c=ye("h"),Uc=ye("d"),Lc=ye("w"),Ic=ye("M"),Wc=ye("Q"),jc=ye("y"),Hc=us;function zc(){return re(this)}function qc(e){return e=J(e),this.isValid()?this[e+"s"]():NaN}function Oe(e){return function(){return this.isValid()?this._data[e]:NaN}}var Gc=Oe("milliseconds"),Zc=Oe("seconds"),Jc=Oe("minutes"),Kc=Oe("hours"),Qc=Oe("days"),Xc=Oe("months"),ed=Oe("years");function td(){return K(this.days()/7)}var _e=Math.round,ve={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function rd(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function nd(e,t,r,n){var s=re(e).abs(),o=_e(s.as("s")),i=_e(s.as("m")),l=_e(s.as("h")),d=_e(s.as("d")),c=_e(s.as("M")),f=_e(s.as("w")),h=_e(s.as("y")),b=o<=r.ss&&["s",o]||o<r.s&&["ss",o]||i<=1&&["m"]||i<r.m&&["mm",i]||l<=1&&["h"]||l<r.h&&["hh",l]||d<=1&&["d"]||d<r.d&&["dd",d];return r.w!=null&&(b=b||f<=1&&["w"]||f<r.w&&["ww",f]),b=b||c<=1&&["M"]||c<r.M&&["MM",c]||h<=1&&["y"]||["yy",h],b[2]=t,b[3]=+e>0,b[4]=n,rd.apply(null,b)}function sd(e){return e===void 0?_e:typeof e=="function"?(_e=e,!0):!1}function ad(e,t){return ve[e]===void 0?!1:t===void 0?ve[e]:(ve[e]=t,e==="s"&&(ve.ss=t-1),!0)}function od(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=ve,s,o;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},ve,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),s=this.localeData(),o=nd(this,!r,n,s),r&&(o=s.pastFuture(+this,o)),s.postformat(o)}var Or=Math.abs;function $e(e){return(e>0)-(e<0)||+e}function Pt(){if(!this.isValid())return this.localeData().invalidDate();var e=Or(this._milliseconds)/1e3,t=Or(this._days),r=Or(this._months),n,s,o,i,l=this.asSeconds(),d,c,f,h;return l?(n=K(e/60),s=K(n/60),e%=60,n%=60,o=K(r/12),r%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",d=l<0?"-":"",c=$e(this._months)!==$e(l)?"-":"",f=$e(this._days)!==$e(l)?"-":"",h=$e(this._milliseconds)!==$e(l)?"-":"",d+"P"+(o?c+o+"Y":"")+(r?c+r+"M":"")+(t?f+t+"D":"")+(s||n||e?"T":"")+(s?h+s+"H":"")+(n?h+n+"M":"")+(e?h+i+"S":"")):"P0D"}var T=Nt.prototype;T.isValid=Xi,T.abs=Vc,T.add=Pc,T.subtract=Yc,T.as=Fc,T.asMilliseconds=us,T.asSeconds=Bc,T.asMinutes=vc,T.asHours=$c,T.asDays=Uc,T.asWeeks=Lc,T.asMonths=Ic,T.asQuarters=Wc,T.asYears=jc,T.valueOf=Hc,T._bubble=Ac,T.clone=zc,T.get=qc,T.milliseconds=Gc,T.seconds=Zc,T.minutes=Jc,T.hours=Kc,T.days=Qc,T.weeks=td,T.months=Xc,T.years=ed,T.humanize=od,T.toISOString=Pt,T.toString=Pt,T.toJSON=Pt,T.locale=Kn,T.localeData=Xn,T.toIsoString=Z("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Pt),T.lang=Qn,D("X",0,0,"unix"),D("x",0,0,"valueOf"),x("x",wt),x("X",Oo),P("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)}),P("x",function(e,t,r){r._d=new Date(M(e))});//! moment.js
19
- w.version="2.30.1",oo(A),w.fn=m,w.min=Zi,w.max=Ji,w.now=Ki,w.utc=ae,w.unix=Ec,w.months=Oc,w.isDate=je,w.locale=we,w.invalid=ht,w.duration=re,w.isMoment=ee,w.weekdays=Tc,w.parseZone=Nc,w.localeData=me,w.isDuration=Ot,w.monthsShort=Mc,w.weekdaysMin=Rc,w.defineLocale=mr,w.updateLocale=Ni,w.locales=Oi,w.weekdaysShort=Cc,w.normalizeUnits=J,w.relativeTimeRounding=sd,w.relativeTimeThreshold=ad,w.calendarFormat=bl,w.prototype=m,w.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const id={class:"whitespace-nowrap"},ld={__name:"vs-manager-table-date",props:{value:{type:String,default:()=>""}},setup(e){const t=e,r=a.computed(()=>{if(!t.value)return"-";try{const n=w(t.value,"YYYY-MM-DD");return new Date(n).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return t.value}});return(n,s)=>(a.openBlock(),a.createElementBlock("div",id,a.toDisplayString(r.value),1))}},cd={},dd={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-check"};function ud(e,t,r,n,s,o){return a.openBlock(),a.createElementBlock("svg",dd,t[0]||(t[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const fd=j(cd,[["render",ud]]),fs={__name:"vs-manager-table-switch",props:{value:{type:Boolean,default:()=>!1}},setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["w-[20px] h-[20px] rounded-md flex items-center justify-center disabled",[e.value?"bg-blue-400":"border"]])},[a.createVNode(fd,{height:"18",width:"18",class:"text-white"})],2))}},hd={switch:fs,switcher:fs,date:ld},md={props:{title:{type:String,default:()=>"Дані для відображення відсутні"},text:{type:String,default:()=>"Змініть параметри пошуку або спробуйте пізніше"}}},pd={class:"w-full"},yd={class:"p-5 min-h-[500px] flex flex-col justify-center items-center text-center"},_d={class:"max-w-sm mx-auto mt-6"},gd={class:"font-medium text-gray-800 dark:text-neutral-200"},wd={class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"};function xd(e,t,r,n,s,o){return a.openBlock(),a.createElementBlock("div",pd,[a.createElementVNode("div",yd,[t[0]||(t[0]=a.createStaticVNode('<svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg>',1)),a.createElementVNode("div",_d,[a.createElementVNode("p",gd,a.toDisplayString(r.title),1),a.createElementVNode("p",wd,a.toDisplayString(r.text),1)])])])}const Yt=j(md,[["render",xd]]),kd={class:"w-full"},bd={key:0,class:"relative min-w-full divide-y-2 divide-gray-200 bg-white text-[12px]"},Sd={class:"sticky top-[0px] z-[1] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},Dd={class:"divide-y divide-gray-200 dark:divide-neutral-700"},Ed=["onClick"],Nd={class:"px-4 py-2 text-gray-700 max-w-[250px] admin-component-is"},Od={__name:"vs-manager-collection-table",props:{objectData:Object,template:String},setup(e){const t=[{ua:"Назва",name:"title",format:"Text"},{ua:"Шлях",name:"url",format:"Text"},{ua:"Чи увімкнений",name:"enabled",format:"Switch"},{ua:"Дата створення",name:"cdate",format:"Date"}];return(r,n)=>{var s,o,i;return a.openBlock(),a.createElementBlock("div",kd,[(o=(s=e.objectData)==null?void 0:s.rows)!=null&&o.length?(a.openBlock(),a.createElementBlock("table",bd,[a.createElementVNode("thead",Sd,[a.createElementVNode("tr",null,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(t,(l,d)=>a.createElementVNode("th",{key:d,class:"text-start px-4 py-2 font-medium text-gray-900 max-w-[250px]"},a.toDisplayString(l==null?void 0:l.ua),1)),64))])]),a.createElementVNode("tbody",Dd,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((i=e.objectData)==null?void 0:i.rows,l=>(a.openBlock(),a.createElementBlock("tr",{class:"odd:bg-gray-50",onClick:d=>r.$router.push(`/cms/manager/collection/${e.template}/${l==null?void 0:l.id}`)},[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(t,d=>{var c;return a.createElementVNode("td",Nd,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(hd)[(c=d==null?void 0:d.format)==null?void 0:c.toLowerCase()]||"div"),{value:l==null?void 0:l[d==null?void 0:d.name]},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(l==null?void 0:l[d==null?void 0:d.name]),1)]),_:2},1032,["value"]))])}),64))],8,Ed))),256))])])):(a.openBlock(),a.createBlock(Yt,{key:1}))])}}},Md=e=>{const t={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"ts",ч:"ch",ш:"sh",щ:"shch",ы:"y",э:"e",ю:"yu",я:"ya",ь:"",ъ:"",є:"ye",і:"i",ї:"yi",ґ:"g"};return e.toLowerCase().split("").map(r=>t[r]||r).join("").replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim("-")},Td={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Cd={__name:"vs-manager-colection-table-add",props:{template:{type:String,default:()=>""}},emits:["update-list"],setup(e,{emit:t}){const r=a.getCurrentInstance().proxy.$notify,n=t,s=e,o=a.ref(!1),i=a.ref({}),l=a.ref(),d=async()=>{try{await l.value.doValidation(),i.value.url=Md(i.value.title),await O.post(`/api/cms-manager/${s.template}`,i.value),r({type:"success",title:"Успушно!",message:"Об'єкт створено успішно"}),i.value={},o.value=!1,n("update-list")}catch{r({type:"error",title:"Помилка!",message:"При спробі створити об'єкт сталася помилка"})}},c=[{key:"title",ua:"Назва",type:"Text",placeholder:"Назва",validators:["required"]},{key:"body",ua:"Контент",type:"TextEditor",validators:["required"]},{ua:"Чи увімкнений",name:"enabled",type:"Switcher"}];return(f,h)=>{const b=a.resolveComponent("VsForm"),S=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("button",{onClick:h[0]||(h[0]=_=>o.value=!0),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Створити "),a.createVNode(S,{title:"Створити об'єкт",visible:o.value,"onUpdate:visible":h[3]||(h[3]=_=>o.value=_)},{footer:a.withCtx(()=>[a.createElementVNode("div",Td,[a.createElementVNode("button",{onClick:h[2]||(h[2]=_=>o.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати"),a.createElementVNode("button",{onClick:d,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Створити ")])]),default:a.withCtx(()=>[a.createElementVNode("div",null,[a.createVNode(b,{ref_key:"form",ref:l,scheme:c,modelValue:i.value,"onUpdate:modelValue":h[1]||(h[1]=_=>i.value=_)},null,8,["modelValue"])])]),_:1},8,["visible"])],64)}}},Rd=(e,t=300)=>{let r;return function(...n){clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}},Vd={class:"bg-white rounded-xl p-[20px] border mt-[20px]"},Pd={class:"mb-4 xl:mb-8"},Yd={class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"},Ad={class:"text-sm text-gray-500 dark:text-neutral-500"},Fd={class:"flex items-center"},Bd={class:"flex justify-end ml-auto items-center"},vd={__name:"vs-manager-collection-content",setup(e){const t=ft(),r=a.computed(()=>{var i;return(i=t==null?void 0:t.params)==null?void 0:i.template}),n=a.ref(null),s=async(i=null)=>{try{const{data:l}=await O.get(`/api/cms-manager/${r.value}`,{params:{search:i}});n.value=l}catch{}},o=Rd(i=>s(i),300);return a.watch(r,s),a.onMounted(()=>s()),(i,l)=>{var d,c,f,h;return a.openBlock(),a.createElementBlock("div",Vd,[a.createElementVNode("div",Pd,[a.createElementVNode("h1",Yd,a.toDisplayString((c=(d=n.value)==null?void 0:d.type)==null?void 0:c.name),1),a.createElementVNode("p",Ad,a.toDisplayString((h=(f=n.value)==null?void 0:f.type)==null?void 0:h.description),1)]),a.createElementVNode("div",Fd,[a.createElementVNode("input",{type:"text",onInput:l[0]||(l[0]=({target:b})=>a.unref(o)(b.value)),class:"py-2 px-4 block max-w-[400px] w-full bg-gray-100 border-transparent rounded-lg text-sm focus:outline-2 focus:outline-blue-500 h-[36px] mb-[1px]",placeholder:"Пошук за назвою"},null,32),a.createElementVNode("div",Bd,[a.createVNode(Cd,{template:r.value,onUpdateList:s},null,8,["template"])])]),a.createVNode(Od,{objectData:n.value,template:r.value},null,8,["objectData","template"])])}}},$d={class:"flex items-center justify-between"},Ud={class:"mt-[10px]"},Ld={class:"font-medium text-2xl"},Id={class:"text-gray-600"},Wd={class:"w-full mt-[20px] bg-white rounded-xl p-[20px] border"},jd={__name:"vs-manager-collection-item-content",setup(e){const t=a.getCurrentInstance().proxy.$notify,r=ft(),n=Wa(),s=a.computed(()=>{var S;return(S=r==null?void 0:r.params)==null?void 0:S.template}),o=a.computed(()=>{var S;return(S=r==null?void 0:r.params)==null?void 0:S.id}),i=a.ref(null),l=a.ref({}),d=a.ref(1),c=async()=>{var S,_;try{const{data:k}=await O.get(`/api/cms-manager/${s.value}/${o.value}`);i.value=(S=k==null?void 0:k.rows)==null?void 0:S[0],l.value=(_=k==null?void 0:k.rows)==null?void 0:_[0],d.value=d.value+1}catch{}},f=async()=>{try{await O.put(`/api/cms-manager/${o.value}`,l.value),await t({type:"success",title:"Успішно!",message:"Дані успішно оновлено"}),c()}catch{await t({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}},h=async()=>{try{await O.delete(`/api/cms-manager/${o.value}`),await t({type:"success",title:"Успішно!",message:"Об'єкт видалено успішно"}),await(n==null?void 0:n.back())}catch{await t({type:"error",title:"Помилка!",message:"При спробі видалити об'єкт виникла помилка"})}};a.watch(s,c),a.onMounted(()=>c());const b={title:{ua:"Назва",type:"Text",placeholder:"Назва",validators:["required"]},body:{ua:"Контент",type:"TextEditor",validators:["required"]},enabled:{ua:"Чи увімкнений",type:"Switcher"}};return(S,_)=>{var y,p;const k=a.resolveComponent("VsForm");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",$d,[a.createElementVNode("div",Ud,[a.createElementVNode("h2",Ld,a.toDisplayString((y=i.value)==null?void 0:y.title),1),a.createElementVNode("p",Id,a.toDisplayString((p=i.value)==null?void 0:p.description),1)]),a.createElementVNode("div",{class:"flex items-center gap-1"},[a.createElementVNode("button",{onClick:h,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-red-500 rounded-lg !border-gray-200 hover:bg-red-700 duration-300"}," Видалити "),a.createElementVNode("button",{onClick:f,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),a.createElementVNode("div",null,[a.createElementVNode("div",Wd,[(a.openBlock(),a.createBlock(k,{key:d.value,class:"w-full",scheme:b,modelValue:l.value,"onUpdate:modelValue":_[0]||(_[0]=V=>l.value=V)},null,8,["modelValue"]))])])],64)}}},Hd={class:"flex items-center justify-between"},zd={class:"mt-[10px]"},qd={class:"font-medium text-2xl"},Gd={class:"text-gray-600"},Zd={class:"w-full mt-[20px] bg-white rounded-xl p-[20px] border"},Jd={__name:"vs-manager-single-content",setup(e){const t=ft(),r=a.computed(()=>{var c;return(c=t==null?void 0:t.params)==null?void 0:c.template}),n=a.ref(null),s=a.ref({}),o=a.ref(1),i=async()=>{var c,f;try{const{data:h}=await O.get(`/api/cms-manager/${r.value}`);n.value=(c=h==null?void 0:h.rows)==null?void 0:c[0],s.value=(f=h==null?void 0:h.rows)==null?void 0:f[0],o.value=o.value+1}catch{}},l=async()=>{var c;try{await O.put(`/api/cms-manager/${(c=n.value)==null?void 0:c.id}`,s.value),await $notify({type:"success",title:"Успішно!",message:"Дані успішно оновлено"}),i()}catch{await $notify({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}};a.watch(r,i),a.onMounted(()=>i());const d={title:{ua:"Назва",type:"Text",placeholder:"Назва"},enabled:{ua:"Чи увімкнений",type:"Switcher"}};return(c,f)=>{var b,S;const h=a.resolveComponent("VsForm");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",Hd,[a.createElementVNode("div",zd,[a.createElementVNode("h2",qd,a.toDisplayString((b=n.value)==null?void 0:b.title),1),a.createElementVNode("p",Gd,a.toDisplayString((S=n.value)==null?void 0:S.description),1)]),a.createElementVNode("div",{class:"flex items-center gap-1"},[a.createElementVNode("button",{onClick:l,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),a.createElementVNode("div",null,[a.createElementVNode("div",Zd,[(a.openBlock(),a.createBlock(h,{key:o.value,class:"w-full",scheme:d,modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=_=>s.value=_)},null,8,["modelValue"]))])])],64)}}},Kd={},Qd={xmlns:"http://www.w3.org/2000/svg",width:"5",height:"5",fill:"currentColor",viewBox:"0 0 4 4"};function Xd(e,t){return a.openBlock(),a.createElementBlock("svg",Qd,t[0]||(t[0]=[a.createElementVNode("rect",{width:"4",height:"4",fill:"currentColor",rx:"2"},null,-1)]))}const At=j(Kd,[["render",Xd]]),eu={},tu={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-plus"};function ru(e,t){return a.openBlock(),a.createElementBlock("svg",tu,t[0]||(t[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M12 5l0 14"},null,-1),a.createElementVNode("path",{d:"M5 12l14 0"},null,-1)]))}const hs=j(eu,[["render",ru]]),nu={class:"p-4 w-[260px] border-r h-[100%] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},su={class:"flex flex-col space-y-1"},au={class:"pt-2"},ou={class:"flex flex-col space-y-1"},iu={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},lu={__name:"vs-builder-menu",props:{UPDATE:{},UPDATEModifiers:{}},emits:["update:UPDATE"],setup(e){var h;const t=(h=a.getCurrentInstance().proxy)==null?void 0:h.$notify,r=a.useModel(e,"UPDATE"),n=a.ref(null),s=a.ref(!1),o=a.ref({}),i=a.ref(""),l=a.ref(),d=async()=>{try{const{data:b}=await O.get("/api/cms-builder");n.value=(b==null?void 0:b.rows)||null}catch{}},c=b=>{b==="single"?(o.value={type:"single"},i.value="Створити новий тип"):(o.value={type:"collection"},i.value="Створити колекцію"),s.value=!0},f=async()=>{try{await l.value.doValidation(),await O.post("/api/cms-builder",o.value),await t({type:"success",title:"Успішно!",message:"Об'єкт створено успішно"}),s.value=!1,await d()}catch{await t({type:"error",title:"Помилка!",message:"При спробі створити об'єкт виникла помилка"})}};return d(),a.onMounted(()=>r.value.getList=()=>d()),(b,S)=>{var p,V;const _=a.resolveComponent("router-link"),k=a.resolveComponent("VsForm"),y=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",nu,[a.createElementVNode("div",null,[S[6]||(S[6]=a.createElementVNode("h2",{v:"",class:"block text-[14px] font-medium text-gray-800 mb-2 dark:text-neutral-200"}," Колекції ",-1)),a.createElementVNode("ul",su,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((p=n.value)==null?void 0:p.filter(g=>(g==null?void 0:g.type)=="collection"),g=>{var U,B;return a.openBlock(),a.createElementBlock("li",{key:g==null?void 0:g.id},[a.createVNode(_,{to:`/cms/builder/${g==null?void 0:g.id}`,class:a.normalizeClass([[((B=(U=b.$route)==null?void 0:U.params)==null?void 0:B.id)===(g==null?void 0:g.id)?"bg-gray-200":""],"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-200 focus:outline-none dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"])},{default:a.withCtx(()=>[a.createVNode(At,{class:"text-gray-500"}),a.createTextVNode(" "+a.toDisplayString(g==null?void 0:g.name),1)]),_:2},1032,["to","class"])])}),128))]),a.createElementVNode("button",{onClick:S[0]||(S[0]=g=>c("colection")),class:"text-blue-500 flex text-[14px] py-2 px-2 text-nowrap hover:text-blue-700 duration-300 gap-2 items-center"},[a.createVNode(hs,{height:"16",width:"16"}),S[5]||(S[5]=a.createTextVNode(" Створити нову колекцію "))])]),a.createElementVNode("div",au,[S[8]||(S[8]=a.createElementVNode("h2",{class:"block text-[14px] mb-2 font-medium text-gray-800 dark:text-neutral-200"}," Одиничні типи ",-1)),a.createElementVNode("ul",ou,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((V=n.value)==null?void 0:V.filter(g=>(g==null?void 0:g.type)=="single"),g=>{var U,B;return a.openBlock(),a.createElementBlock("li",{key:g==null?void 0:g.id},[a.createVNode(_,{to:`/cms/builder/${g==null?void 0:g.id}`,class:a.normalizeClass([[((B=(U=b.$route)==null?void 0:U.params)==null?void 0:B.id)===(g==null?void 0:g.id)?"bg-gray-200":""],"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 hover:bg-gray-200 rounded-lg focus:outline-none dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"])},{default:a.withCtx(()=>[a.createVNode(At,{class:"text-gray-500"}),a.createTextVNode(" "+a.toDisplayString(g==null?void 0:g.name),1)]),_:2},1032,["to","class"])])}),128))]),a.createElementVNode("button",{onClick:S[1]||(S[1]=g=>c("single")),class:"text-blue-500 flex text-[14px] py-2 px-2 hover:text-blue-700 duration-300 gap-2 items-center"},[a.createVNode(hs,{height:"16",width:"16"}),S[7]||(S[7]=a.createTextVNode(" Створити новий тип "))])])]),a.createVNode(y,{visible:s.value,"onUpdate:visible":S[4]||(S[4]=g=>s.value=g),title:i.value},{footer:a.withCtx(()=>[a.createElementVNode("div",iu,[a.createElementVNode("button",{onClick:S[3]||(S[3]=g=>s.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати"),a.createElementVNode("button",{onClick:f,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:a.withCtx(()=>[a.createElementVNode("div",null,[a.createVNode(k,{modelValue:o.value,"onUpdate:modelValue":S[2]||(S[2]=g=>o.value=g),scheme:a.unref(mn),ref_key:"form",ref:l},null,8,["modelValue","scheme"])])]),_:1},8,["visible","title"])],64)}}},cu={class:"w-full bg-[#f6f6f9] h-full h-[calc(100vh-60px)]"},du={class:"flex h-full"},uu={__name:"vs-builder",setup(e){const t=a.ref({});return(r,n)=>{const s=a.resolveComponent("router-view");return a.openBlock(),a.createElementBlock("div",cu,[a.createElementVNode("div",du,[a.createVNode(lu,{UPDATE:t.value,"onUpdate:UPDATE":n[0]||(n[0]=o=>t.value=o)},null,8,["UPDATE"]),a.createVNode(s,null,{default:a.withCtx(({Component:o})=>[o?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(o),{key:0,UPDATE:t.value},null,8,["UPDATE"])):(a.openBlock(),a.createBlock(Yt,{key:1,class:"pt-[100px]",text:"Оберіть один з існуючих пунктів меню, або створіть новий"}))]),_:1})])])}}},fu={class:"p-4 w-[260px] shrink-0 border-r h-[100vh]"},hu={key:0,class:""},mu={class:"flex flex-col space-y-1"},pu={class:"pt-5"},yu={class:"flex flex-col space-y-1"},_u={__name:"vs-manager-menu",setup(e){const t=a.ref(null);return(async()=>{try{const{data:n}=await O.get("/api/cms-builder");t.value=(n==null?void 0:n.rows)||null}catch{}})(),(n,s)=>{var i,l,d;const o=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",fu,[(i=t.value)!=null&&i.length?(a.openBlock(),a.createElementBlock("div",hu,[s[0]||(s[0]=a.createElementVNode("h2",{class:"block text-[14px] font-medium text-gray-800 mb-2 dark:text-neutral-200"}," Колекції ",-1)),a.createElementVNode("ul",mu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((l=t.value)==null?void 0:l.filter(c=>(c==null?void 0:c.type)=="collection"),c=>{var f,h,b;return a.openBlock(),a.createElementBlock("li",{key:(f=n.item)==null?void 0:f.id},[a.createVNode(o,{to:`/cms/manager/collection/${c==null?void 0:c.template}`,class:a.normalizeClass([[((b=(h=n.$route)==null?void 0:h.params)==null?void 0:b.template)===(c==null?void 0:c.template)?"bg-gray-200":""],"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-200 focus:outline-none dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"])},{default:a.withCtx(()=>[a.createVNode(At,{class:"text-gray-500"}),a.createTextVNode(" "+a.toDisplayString((c==null?void 0:c.name)||(c==null?void 0:c.title)),1)]),_:2},1032,["to","class"])])}),128))])])):a.createCommentVNode("",!0),a.createElementVNode("div",pu,[s[1]||(s[1]=a.createElementVNode("h2",{class:"block text-[14px] mb-2 font-medium text-gray-800 dark:text-neutral-200"}," Одиничні типи ",-1)),a.createElementVNode("ul",yu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((d=t.value)==null?void 0:d.filter(c=>(c==null?void 0:c.type)=="single"),c=>{var f,h,b;return a.openBlock(),a.createElementBlock("li",{key:(f=n.item)==null?void 0:f.id},[a.createVNode(o,{to:`/cms/manager/single/${c==null?void 0:c.template}`,class:a.normalizeClass([[((b=(h=n.$route)==null?void 0:h.params)==null?void 0:b.template)===(c==null?void 0:c.template)?"bg-gray-200":""],"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-200 focus:outline-none dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"])},{default:a.withCtx(()=>[a.createVNode(At,{class:"text-gray-500"}),a.createTextVNode(" "+a.toDisplayString((c==null?void 0:c.name)||(c==null?void 0:c.title)),1)]),_:2},1032,["to","class"])])}),128))])])])}}},gu={class:"w-full bg-[#f6f6f9] h-[calc(100vh-60px)]"},wu={class:"flex"},xu={class:"w-full flex justify-center"},ku={class:"p-[20px] w-full max-w-[1440px]"},bu={__name:"vs-manager",setup(e){return(t,r)=>{const n=a.resolveComponent("router-view");return a.openBlock(),a.createElementBlock("div",gu,[a.createElementVNode("div",wu,[a.createVNode(_u),a.createElementVNode("div",xu,[a.createElementVNode("div",ku,[a.createElementVNode("button",{onClick:r[0]||(r[0]=s=>t.$router.back()),class:"text-blue-500 flex gap-2 items-center hover:text-blue-700 duration-300"},[a.createVNode(hn,{template:t.template},null,8,["template"]),r[1]||(r[1]=a.createTextVNode(" Повернутися назад "))]),a.createVNode(n,null,{default:a.withCtx(({Component:s})=>[s?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(s),{key:0})):(a.openBlock(),a.createBlock(Yt,{key:1,class:"pt-[100px]",text:"Оберіть один з існуючих пунктів меню, або створіть новий"}))]),_:1})])])])])}}},Su={},Du={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function Eu(e,t){return a.openBlock(),a.createElementBlock("svg",Du,t[0]||(t[0]=[a.createElementVNode("path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"},null,-1),a.createElementVNode("polyline",{points:"9 22 9 12 15 12 15 22"},null,-1)]))}const Nu=j(Su,[["render",Eu]]),Ou={},Mu={"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"};function Tu(e,t){return a.openBlock(),a.createElementBlock("svg",Mu,t[0]||(t[0]=[a.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"},null,-1)]))}const Cu={components:{IconHome:Nu,IconChewronRight:j(Ou,[["render",Tu]])},props:{initialPath:{type:String,default:""},root:{type:String,default:"Root"}},data(){return{breadcrumbs:[]}},watch:{initialPath:{immediate:!0,handler(e){const t=e.split("/").filter(Boolean);this.breadcrumbs=[this.root,...t]}}},methods:{navigateTo(e){const t=e===0?"":this.breadcrumbs.slice(1,e+1).join("/");this.$emit("update-path",t)}}},Ru={"aria-label":"Breadcrumb",class:"mb-4"},Vu={class:"flex items-start justify-between"},Pu={class:"flex flex-wrap items-center gap-[5px] min-h-8"},Yu={class:"flex items-center"},Au=["onClick"],Fu={key:1};function Bu(e,t,r,n,s,o){const i=a.resolveComponent("IconHome"),l=a.resolveComponent("IconChewronRight");return a.openBlock(),a.createElementBlock("nav",Ru,[a.createElementVNode("div",Vu,[a.createElementVNode("ol",Pu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.breadcrumbs,(d,c)=>(a.openBlock(),a.createElementBlock("li",{key:c,class:"whitespace-nowrap"},[a.createElementVNode("div",Yu,[a.createElementVNode("button",{onClick:f=>o.navigateTo(c),class:a.normalizeClass([["hover:text-blue-500 focus:outline-none flex items-center",c===s.breadcrumbs.length-1?"font-medium underline text-blue-500":"text-gray-500"],"h-8 flex items-center"])},[c===0?(a.openBlock(),a.createBlock(i,{key:0,class:"w-4 h-4"})):(a.openBlock(),a.createElementBlock("span",Fu,a.toDisplayString(d),1))],10,Au),c<s.breadcrumbs.length-1?(a.openBlock(),a.createBlock(l,{key:0,class:"text-gray-400 w-3 h-3 ml-[10px]"})):a.createCommentVNode("",!0)])]))),128))])])])}const vu=j(Cu,[["render",Bu]]),$u={},Uu={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Lu(e,t){return a.openBlock(),a.createElementBlock("svg",Uu,t[0]||(t[0]=[a.createElementVNode("path",{d:"M6.41667 11.0833C8.994 11.0833 11.0833 8.994 11.0833 6.41667C11.0833 3.83934 8.994 1.75 6.41667 1.75C3.83934 1.75 1.75 3.83934 1.75 6.41667C1.75 8.994 3.83934 11.0833 6.41667 11.0833Z",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),a.createElementVNode("path",{d:"M12.25 12.25L9.7417 9.7417",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Iu=j($u,[["render",Lu]]),Wu={},ju={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function Hu(e,t){return a.openBlock(),a.createElementBlock("svg",ju,t[0]||(t[0]=[a.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),a.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)]))}const zu=j(Wu,[["render",Hu]]),qu={},Gu={width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Zu(e,t){return a.openBlock(),a.createElementBlock("svg",Gu,t[0]||(t[0]=[a.createElementVNode("path",{d:"M3 8.2C3 7.07989 3 6.51984 3.21799 6.09202C3.40973 5.71569 3.71569 5.40973 4.09202 5.21799C4.51984 5 5.0799 5 6.2 5H9.67452C10.1637 5 10.4083 5 10.6385 5.05526C10.8425 5.10425 11.0376 5.18506 11.2166 5.29472C11.4184 5.4184 11.5914 5.59135 11.9373 5.93726L12.0627 6.06274C12.4086 6.40865 12.5816 6.5816 12.7834 6.70528C12.9624 6.81494 13.1575 6.89575 13.3615 6.94474C13.5917 7 13.8363 7 14.3255 7H17.8C18.9201 7 19.4802 7 19.908 7.21799C20.2843 7.40973 20.5903 7.71569 20.782 8.09202C21 8.51984 21 9.0799 21 10.2V15.8C21 16.9201 21 17.4802 20.782 17.908C20.5903 18.2843 20.2843 18.5903 19.908 18.782C19.4802 19 18.9201 19 17.8 19H6.2C5.07989 19 4.51984 19 4.09202 18.782C3.71569 18.5903 3.40973 18.2843 3.21799 17.908C3 17.4802 3 16.9201 3 15.8V8.2Z",stroke:"#000000","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Ju=j(qu,[["render",Zu]]),Ku={},Qu={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Xu(e,t){return a.openBlock(),a.createElementBlock("svg",Qu,t[0]||(t[0]=[a.createElementVNode("path",{d:"M18 6L6 18",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),a.createElementVNode("path",{d:"M6 6L18 18",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const ef=j(Ku,[["render",Xu]]),tf={},rf={class:"flex-shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function nf(e,t){return a.openBlock(),a.createElementBlock("svg",rf,t[0]||(t[0]=[a.createStaticVNode('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>',9)]))}const sf=j(tf,[["render",nf]]),af={},of={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function lf(e,t){return a.openBlock(),a.createElementBlock("svg",of,t[0]||(t[0]=[a.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),a.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)]))}const cf={components:{Breadcrumb:vu,IconSearch:Iu,IconFolder:zu,IconFolder2:Ju,IconClose:ef,IconImage:j(af,[["render",lf]]),IconActions:sf,VsNotData:Yt},props:{type:{type:String,default:"icon"}},data(){return{icons:[],currentPage:parseInt(this.$route.query.page,10)||1,iconsPerPage:15,token:"",searchQuery:"",selectedFile:null,isAddDirModalOpen:!1,newDirName:""}},watch:{isAddDirModalOpen(e){e||(this.newDirName="")}},computed:{currentDir(){return this.$route.query.dir||""},currentTab(){return this.$route.query.tab||""},filteredIcons(){return this.searchQuery?this.icons.filter(e=>e.name.toLowerCase().includes(this.searchQuery.toLowerCase())):this.icons},sortedIcons(){return[...this.filteredIcons].sort((e,t)=>e.type==="dir"&&t.type!=="dir"?-1:e.type!=="dir"&&t.type==="dir"?1:e.name.localeCompare(t.name))},currentIcons(){const e=(this.currentPage-1)*this.iconsPerPage,t=e+this.iconsPerPage;return this.sortedIcons.slice(e,t)}},methods:{async fetchIcons(e){try{const{data:t}=await O.get("/api/cms-media",{params:{dir:e}});this.icons=(t==null?void 0:t.data)||[],this.token=t==null?void 0:t.token}catch(t){console.error("Error fetching icons:",t)}},async addDir(){var e,t;if(!this.newDirName.trim()){this.$notify({type:"error",title:"Помилка",message:"Назва папки не може бути порожньою."});return}try{const r=await O.post(`/api/cms-media/${this.token}`,{name:this.newDirName});this.$notify({type:"success",title:"Успіх!",message:`Папку "${this.newDirName}" успішно створено.`}),this.fetchIcons(this.currentDir),this.handeAddFolderClose(),this.newDirName=""}catch(r){console.error("Error creating directory:",r),this.$notify({type:"error",title:"Помилка",message:((t=(e=r.response)==null?void 0:e.data)==null?void 0:t.message)||"Не вдалося створити папку."})}},handeAddFolderClose(){this.isAddDirModalOpen=!1},navigateToDir(e){const t=`${this.currentDir}/${e}`.replace(/\/+/g,"/");this.updateURL(t)},updatePath(e){this.updateURL(e)},updateURL(e){this.$router.push({query:{...this.$route.query,dir:e,page:this.currentPage}})},async handleFileChange(e){const t=e.target.files[0];if(!t)return;const r=new FormData;r.append("file",t);try{const n=await O.post(`/api/cms-media/${this.token}`,r,{headers:{"Content-Type":"multipart/form-data"}});this.$notify({type:"success",title:"Успіх!",message:"Файл успішно додано!"}),this.currentPage=1}catch(n){console.error("Error uploading file:",n),this.$notify({type:"error",title:"Помилка",message:n.response.statustext||n.message||n})}finally{await this.fetchIcons(this.currentDir)}},clearSearch(){this.searchQuery=""},copyToClipboard(e){try{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),t.setSelectionRange(0,e.length);const r=document.execCommand("copy");document.body.removeChild(t),r?this.$notify({type:"success",title:"Скопійовано!",message:"Назву іконки успішно скопійовано."}):this.$notify({type:"error",title:"Помилка",message:"Не вдалося скопіювати шлях."})}catch(t){this.$notify({type:"error",title:"Помилка",message:"Не вдалося скопіювати координати"}),console.error("Copy failed",t)}}},watch:{currentDir:{immediate:!0,handler(e){this.fetchIcons(e)}},currentTab:{handler(){this.currentPage=1}},currentPage(e){this.$emit("update-url",{query:{...this.$route.query,page:e}})}},async mounted(){await this.fetchIcons(this.currentDir)}},df={class:"w-full p-[20px] bg-gray-100 flex justify-center h-[calc(100vh-60px)]"},uf={class:"p-[20px] w-full max-w-[1640px]"},ff={class:"flex items-start justify-between"},hf={class:"flex gap-2 relative"},mf={class:"flex items-center justify-between bg-white py-2 px-3 rounded-lg border border-gray-300 focus:outline-none focus:border-blue-500 text-sm w-[250px]"},pf={class:"flex items-center gap-[12px]"},yf={for:"file-upload",class:"py-2 px-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:bg-blue-700 cursor-pointer"},_f={key:0,class:"flex flex-col items-center justify-center h-64 bg-gray-50 rounded-lg border text-center"},gf={key:1},wf={class:"grid grid-cols-2 lg:grid-cols-5 gap-3 xl:gap-5"},xf=["onClick"],kf={class:"relative group"},bf={class:"w-full h-36 sm:h-[170px] object-cover rounded-t-xl flex items-center justify-center"},Sf={key:0,class:"text-[#54aeff]"},Df=["src","alt"],Ef={class:"p-3 flex items-center gap-x-3 border-t"},Nf={key:0,class:"flex shrink-0 justify-center items-center w-10 h-10 bg-white border border-solid text-gray-500 rounded-lg"},Of=["title"],Mf=["onClick"],Tf={class:"block truncate text-xs text-gray-500"},Cf={class:"p-4"},Rf={class:"flex justify-end"};function Vf(e,t,r,n,s,o){var y;const i=a.resolveComponent("Breadcrumb"),l=a.resolveComponent("IconSearch"),d=a.resolveComponent("IconClose"),c=a.resolveComponent("IconFolder2"),f=a.resolveComponent("VsNotData"),h=a.resolveComponent("IconFolder"),b=a.resolveComponent("IconImage"),S=a.resolveComponent("VsPagination"),_=a.resolveComponent("VsText"),k=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock("div",df,[a.createElementVNode("div",uf,[a.createElementVNode("div",null,[a.createElementVNode("div",ff,[a.createVNode(i,{initialPath:o.currentDir,onUpdatePath:o.updatePath},null,8,["initialPath","onUpdatePath"]),a.createElementVNode("div",hf,[a.createElementVNode("div",mf,[a.createElementVNode("div",pf,[a.createVNode(l),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=p=>s.searchQuery=p),type:"text",placeholder:"Пошук за назвою...",class:"focus:outline-none"},null,512),[[a.vModelText,s.searchQuery]])]),s.searchQuery?(a.openBlock(),a.createBlock(d,{key:0,class:"w-4 h-4 cursor-pointer",onClick:o.clearSearch},null,8,["onClick"])):a.createCommentVNode("",!0)]),a.createElementVNode("button",{ref:"dropdownButton",onClick:t[1]||(t[1]=p=>s.isAddDirModalOpen=!0),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium border border-gray-300 rounded-lg text-gray-800 hover:bg-gray-100 bg-white"},[a.createVNode(c),t[7]||(t[7]=a.createTextVNode(" Додати папку "))],512),a.createElementVNode("label",yf,[t[8]||(t[8]=a.createTextVNode(" Завантажити ")),a.createElementVNode("input",{id:"file-upload",type:"file",class:"hidden",onChange:t[2]||(t[2]=(...p)=>o.handleFileChange&&o.handleFileChange(...p))},null,32)])])]),(y=o.filteredIcons)!=null&&y.length?(a.openBlock(),a.createElementBlock("div",gf,[a.createElementVNode("div",wf,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.currentIcons,p=>{var V;return a.openBlock(),a.createElementBlock("div",{key:p==null?void 0:p.id,class:a.normalizeClass(["flex flex-col bg-white border rounded-xl",{"cursor-pointer hover:border-blue-500":p.type==="dir","cursor-default":p.type!=="dir"}]),onClick:g=>p.type==="dir"?o.navigateToDir(p.name):null},[a.createElementVNode("div",kf,[a.createElementVNode("div",bf,[(p==null?void 0:p.type)==="dir"?(a.openBlock(),a.createElementBlock("div",Sf,[a.createVNode(h)])):(a.openBlock(),a.createElementBlock("img",{key:1,class:"object-contain max-h-[40px]",src:`/api/cms-media/${p==null?void 0:p.token}`,alt:p==null?void 0:p.name,style:a.normalizeStyle((V=p==null?void 0:p.path)!=null&&V.includes(".svg")?"width:250px;max-height:100px":"")},null,12,Df))])]),a.createElementVNode("div",Ef,[p.type!=="dir"?(a.openBlock(),a.createElementBlock("span",Nf,[a.createVNode(b)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"grow truncate",title:p==null?void 0:p.name},[a.createElementVNode("p",{class:a.normalizeClass(["block truncate text-sm font-semibold text-gray-800",{"cursor-pointer":p.type!=="dir"}]),onClick:a.withModifiers(g=>p.type!=="dir"&&o.copyToClipboard(p==null?void 0:p.name),["stop"])},a.toDisplayString(p==null?void 0:p.name),11,Mf),a.createElementVNode("p",Tf,a.toDisplayString(p==null?void 0:p.size),1)],8,Of)])],10,xf)}),128))]),o.filteredIcons.length>s.iconsPerPage?(a.openBlock(),a.createBlock(S,{key:0,defaultPage:s.currentPage,class:"mt-6 focus-visible:outline-blue-500 flex !justify-center",total:o.filteredIcons.length,pageSize:s.iconsPerPage,maxPages:3,goTo:!1,onPageChange:t[3]||(t[3]=p=>s.currentPage=p)},null,8,["defaultPage","total","pageSize"])):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("div",_f,[a.createVNode(f,{text:"",class:"![&>div]:min-w-[100px] !w-auto"})]))]),a.createVNode(k,{visible:s.isAddDirModalOpen,"onUpdate:visible":t[6]||(t[6]=p=>s.isAddDirModalOpen=p),title:"Додати папку",size:"small",closeClickBack:!0,onOnClose:o.handeAddFolderClose},{default:a.withCtx(()=>[a.createElementVNode("div",Cf,[a.createVNode(_,{modelValue:s.newDirName,"onUpdate:modelValue":t[4]||(t[4]=p=>s.newDirName=p),placeholder:"Назва нової папки.."},null,8,["modelValue"]),a.createElementVNode("div",Rf,[a.createElementVNode("button",{onClick:t[5]||(t[5]=(...p)=>o.addDir&&o.addDir(...p)),class:"mt-4 py-2 px-4 text-white bg-blue-600 hover:bg-blue-700 rounded-lg"}," Створити ")])])]),_:1},8,["visible","onOnClose"])])])}const ms={"vs-builder":uu,"vs-builder-content":ao,"vs-manager":bu,"vs-manager-collection-content":vd,"vs-manager-collection-item-content":jd,"vs-manager-single-content":Jd,"vs-media":j(cf,[["render",Vf]])},ps={install:e=>{var t;(t=Object.entries(ms))==null||t.forEach(([r,n])=>e.component(r,n))},components:ms};return typeof window<"u"&&(window.v3Cms=ps),ps});
19
+ w.version="2.30.1",oo(A),w.fn=m,w.min=Zi,w.max=Ji,w.now=Ki,w.utc=ae,w.unix=Ec,w.months=Oc,w.isDate=je,w.locale=we,w.invalid=ht,w.duration=re,w.isMoment=ee,w.weekdays=Tc,w.parseZone=Nc,w.localeData=me,w.isDuration=Ot,w.monthsShort=Mc,w.weekdaysMin=Rc,w.defineLocale=mr,w.updateLocale=Ni,w.locales=Oi,w.weekdaysShort=Cc,w.normalizeUnits=J,w.relativeTimeRounding=sd,w.relativeTimeThreshold=ad,w.calendarFormat=bl,w.prototype=m,w.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"};const id={class:"whitespace-nowrap"},ld={__name:"vs-manager-table-date",props:{value:{type:String,default:()=>""}},setup(e){const t=e,r=a.computed(()=>{if(!t.value)return"-";try{const n=w(t.value,"YYYY-MM-DD");return new Date(n).toLocaleDateString("uk-UA",{day:"2-digit",month:"long",year:"numeric"})}catch{return t.value}});return(n,s)=>(a.openBlock(),a.createElementBlock("div",id,a.toDisplayString(r.value),1))}},cd={},dd={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-check"};function ud(e,t,r,n,s,o){return a.openBlock(),a.createElementBlock("svg",dd,t[0]||(t[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const fd=j(cd,[["render",ud]]),fs={__name:"vs-manager-table-switch",props:{value:{type:Boolean,default:()=>!1}},setup(e){return(t,r)=>(a.openBlock(),a.createElementBlock("div",{class:a.normalizeClass(["w-[20px] h-[20px] rounded-md flex items-center justify-center disabled",[e.value?"bg-blue-400":"border"]])},[a.createVNode(fd,{height:"18",width:"18",class:"text-white"})],2))}},hd={switch:fs,switcher:fs,date:ld},md={props:{title:{type:String,default:()=>"Дані для відображення відсутні"},text:{type:String,default:()=>"Змініть параметри пошуку або спробуйте пізніше"}}},pd={class:"w-full"},yd={class:"p-5 min-h-[500px] flex flex-col justify-center items-center text-center"},_d={class:"max-w-sm mx-auto mt-6"},gd={class:"font-medium text-gray-800 dark:text-neutral-200"},wd={class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"};function xd(e,t,r,n,s,o){return a.openBlock(),a.createElementBlock("div",pd,[a.createElementVNode("div",yd,[t[0]||(t[0]=a.createStaticVNode('<svg class="w-48 mx-auto" viewBox="0 0 178 90" fill="none" xmlns="http://www.w3.org/2000/svg"><rect x="27" y="50.5" width="124" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="27" y="50.5" width="124" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-50 dark:stroke-neutral-700/10"></rect><rect x="34.5" y="58" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="61" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="66.5" y="73" width="77" height="6" rx="3" fill="currentColor" class="fill-gray-50 dark:fill-neutral-700/30"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" fill="currentColor" class="fill-white dark:fill-neutral-800"></rect><rect x="19.5" y="28.5" width="139" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/30"></rect><rect x="27" y="36" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="39" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><rect x="59" y="51" width="92" height="6" rx="3" fill="currentColor" class="fill-gray-100 dark:fill-neutral-700/70"></rect><g filter="url(#filter1)"><rect x="12" y="6" width="154" height="40" rx="8" fill="currentColor" class="fill-white dark:fill-neutral-800" shape-rendering="crispEdges"></rect><rect x="12.5" y="6.5" width="153" height="39" rx="7.5" stroke="currentColor" class="stroke-gray-100 dark:stroke-neutral-700/60" shape-rendering="crispEdges"></rect><rect x="20" y="14" width="24" height="24" rx="4" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="17" width="60" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect><rect x="52" y="29" width="106" height="6" rx="3" fill="currentColor" class="fill-gray-200 dark:fill-neutral-700"></rect></g><defs><filter id="filter1" x="0" y="0" width="178" height="64" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="6"></feOffset><feGaussianBlur stdDeviation="6"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_1187_14810"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_1187_14810" result="shape"></feBlend></filter></defs></svg>',1)),a.createElementVNode("div",_d,[a.createElementVNode("p",gd,a.toDisplayString(r.title),1),a.createElementVNode("p",wd,a.toDisplayString(r.text),1)])])])}const Yt=j(md,[["render",xd]]),kd={class:"w-full"},bd={key:0,class:"relative min-w-full divide-y-2 divide-gray-200 bg-white text-[12px]"},Sd={class:"sticky top-[0px] z-[1] bg-white w-full after:absolute after:content-[''] after:block after:w-full after:h-px after:bg-stone-200"},Dd={class:"divide-y divide-gray-200 dark:divide-neutral-700"},Ed=["onClick"],Nd={class:"px-4 py-2 text-gray-700 max-w-[250px] admin-component-is"},Od={__name:"vs-manager-collection-table",props:{objectData:Object,template:String},setup(e){const t=[{ua:"Назва",name:"title",format:"Text"},{ua:"Шлях",name:"url",format:"Text"},{ua:"Чи увімкнений",name:"enabled",format:"Switch"},{ua:"Дата створення",name:"cdate",format:"Date"}];return(r,n)=>{var s,o,i;return a.openBlock(),a.createElementBlock("div",kd,[(o=(s=e.objectData)==null?void 0:s.rows)!=null&&o.length?(a.openBlock(),a.createElementBlock("table",bd,[a.createElementVNode("thead",Sd,[a.createElementVNode("tr",null,[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(t,(l,d)=>a.createElementVNode("th",{key:d,class:"text-start px-4 py-2 font-medium text-gray-900 max-w-[250px]"},a.toDisplayString(l==null?void 0:l.ua),1)),64))])]),a.createElementVNode("tbody",Dd,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((i=e.objectData)==null?void 0:i.rows,l=>(a.openBlock(),a.createElementBlock("tr",{class:"odd:bg-gray-50",onClick:d=>r.$router.push(`/cms/manager/collection/${e.template}/${l==null?void 0:l.id}`)},[(a.openBlock(),a.createElementBlock(a.Fragment,null,a.renderList(t,d=>{var c;return a.createElementVNode("td",Nd,[(a.openBlock(),a.createBlock(a.resolveDynamicComponent(a.unref(hd)[(c=d==null?void 0:d.format)==null?void 0:c.toLowerCase()]||"div"),{value:l==null?void 0:l[d==null?void 0:d.name]},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(l==null?void 0:l[d==null?void 0:d.name]),1)]),_:2},1032,["value"]))])}),64))],8,Ed))),256))])])):(a.openBlock(),a.createBlock(Yt,{key:1}))])}}},Md=e=>{const t={а:"a",б:"b",в:"v",г:"g",д:"d",е:"e",ё:"e",ж:"zh",з:"z",и:"i",й:"y",к:"k",л:"l",м:"m",н:"n",о:"o",п:"p",р:"r",с:"s",т:"t",у:"u",ф:"f",х:"kh",ц:"ts",ч:"ch",ш:"sh",щ:"shch",ы:"y",э:"e",ю:"yu",я:"ya",ь:"",ъ:"",є:"ye",і:"i",ї:"yi",ґ:"g"};return e.toLowerCase().split("").map(r=>t[r]||r).join("").replace(/[^a-z0-9\s-]/g,"").replace(/\s+/g,"-").replace(/-+/g,"-").trim("-")},Td={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Cd={__name:"vs-manager-colection-table-add",props:{template:{type:String,default:()=>""}},emits:["update-list"],setup(e,{emit:t}){const r=a.getCurrentInstance().proxy.$notify,n=t,s=e,o=a.ref(!1),i=a.ref({}),l=a.ref(),d=async()=>{try{await l.value.doValidation(),i.value.url=Md(i.value.title),await O.post(`/api/cms-manager/${s.template}`,i.value),r({type:"success",title:"Успушно!",message:"Об'єкт створено успішно"}),i.value={},o.value=!1,n("update-list")}catch{r({type:"error",title:"Помилка!",message:"При спробі створити об'єкт сталася помилка"})}},c=[{key:"title",ua:"Назва",type:"Text",placeholder:"Назва",validators:["required"]},{key:"body",ua:"Контент",type:"TextEditor",validators:["required"]},{ua:"Чи увімкнений",name:"enabled",type:"Switcher"}];return(f,h)=>{const b=a.resolveComponent("VsForm"),S=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("button",{onClick:h[0]||(h[0]=_=>o.value=!0),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Створити "),a.createVNode(S,{title:"Створити об'єкт",visible:o.value,"onUpdate:visible":h[3]||(h[3]=_=>o.value=_)},{footer:a.withCtx(()=>[a.createElementVNode("div",Td,[a.createElementVNode("button",{onClick:h[2]||(h[2]=_=>o.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати"),a.createElementVNode("button",{onClick:d,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Створити ")])]),default:a.withCtx(()=>[a.createElementVNode("div",null,[a.createVNode(b,{ref_key:"form",ref:l,scheme:c,modelValue:i.value,"onUpdate:modelValue":h[1]||(h[1]=_=>i.value=_)},null,8,["modelValue"])])]),_:1},8,["visible"])],64)}}},Rd=(e,t=300)=>{let r;return function(...n){clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}},Vd={class:"bg-white rounded-xl p-[20px] border mt-[20px]"},Pd={class:"mb-4 xl:mb-8"},Yd={class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"},Ad={class:"text-sm text-gray-500 dark:text-neutral-500"},Fd={class:"flex items-center"},Bd={class:"flex justify-end ml-auto items-center"},vd={__name:"vs-manager-collection-content",setup(e){const t=ft(),r=a.computed(()=>{var i;return(i=t==null?void 0:t.params)==null?void 0:i.template}),n=a.ref(null),s=async(i=null)=>{try{const{data:l}=await O.get(`/api/cms-manager/${r.value}`,{params:{search:i}});n.value=l}catch{}},o=Rd(i=>s(i),300);return a.watch(r,s),a.onMounted(()=>s()),(i,l)=>{var d,c,f,h;return a.openBlock(),a.createElementBlock("div",Vd,[a.createElementVNode("div",Pd,[a.createElementVNode("h1",Yd,a.toDisplayString((c=(d=n.value)==null?void 0:d.type)==null?void 0:c.name),1),a.createElementVNode("p",Ad,a.toDisplayString((h=(f=n.value)==null?void 0:f.type)==null?void 0:h.description),1)]),a.createElementVNode("div",Fd,[a.createElementVNode("input",{type:"text",onInput:l[0]||(l[0]=({target:b})=>a.unref(o)(b.value)),class:"py-2 px-4 block max-w-[400px] w-full bg-gray-100 border-transparent rounded-lg text-sm focus:outline-2 focus:outline-blue-500 h-[36px] mb-[1px]",placeholder:"Пошук за назвою"},null,32),a.createElementVNode("div",Bd,[a.createVNode(Cd,{template:r.value,onUpdateList:s},null,8,["template"])])]),a.createVNode(Od,{objectData:n.value,template:r.value},null,8,["objectData","template"])])}}},$d={class:"flex items-center justify-between"},Ud={class:"mt-[10px]"},Ld={class:"font-medium text-2xl"},Id={class:"text-gray-600"},Wd={class:"w-full mt-[20px] bg-white rounded-xl p-[20px] border"},jd={__name:"vs-manager-collection-item-content",setup(e){const t=a.getCurrentInstance().proxy.$notify,r=ft(),n=Wa(),s=a.computed(()=>{var S;return(S=r==null?void 0:r.params)==null?void 0:S.template}),o=a.computed(()=>{var S;return(S=r==null?void 0:r.params)==null?void 0:S.id}),i=a.ref(null),l=a.ref({}),d=a.ref(1),c=async()=>{var S,_;try{const{data:k}=await O.get(`/api/cms-manager/${s.value}/${o.value}`);i.value=(S=k==null?void 0:k.rows)==null?void 0:S[0],l.value=(_=k==null?void 0:k.rows)==null?void 0:_[0],d.value=d.value+1}catch{}},f=async()=>{try{await O.put(`/api/cms-manager/${o.value}`,l.value),await t({type:"success",title:"Успішно!",message:"Дані успішно оновлено"}),c()}catch{await t({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}},h=async()=>{try{await O.delete(`/api/cms-manager/${o.value}`),await t({type:"success",title:"Успішно!",message:"Об'єкт видалено успішно"}),await(n==null?void 0:n.back())}catch{await t({type:"error",title:"Помилка!",message:"При спробі видалити об'єкт виникла помилка"})}};a.watch(s,c),a.onMounted(()=>c());const b={title:{ua:"Назва",type:"Text",placeholder:"Назва",validators:["required"]},body:{ua:"Контент",type:"TextEditor",validators:["required"]},enabled:{ua:"Чи увімкнений",type:"Switcher"}};return(S,_)=>{var y,p;const k=a.resolveComponent("VsForm");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",$d,[a.createElementVNode("div",Ud,[a.createElementVNode("h2",Ld,a.toDisplayString((y=i.value)==null?void 0:y.title),1),a.createElementVNode("p",Id,a.toDisplayString((p=i.value)==null?void 0:p.description),1)]),a.createElementVNode("div",{class:"flex items-center gap-1"},[a.createElementVNode("button",{onClick:h,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-red-500 rounded-lg !border-gray-200 hover:bg-red-700 duration-300"}," Видалити "),a.createElementVNode("button",{onClick:f,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),a.createElementVNode("div",null,[a.createElementVNode("div",Wd,[(a.openBlock(),a.createBlock(k,{key:d.value,class:"w-full",scheme:b,modelValue:l.value,"onUpdate:modelValue":_[0]||(_[0]=V=>l.value=V)},null,8,["modelValue"]))])])],64)}}},Hd={class:"flex items-center justify-between"},zd={class:"mt-[10px]"},qd={class:"font-medium text-2xl"},Gd={class:"text-gray-600"},Zd={class:"w-full mt-[20px] bg-white rounded-xl p-[20px] border"},Jd={__name:"vs-manager-single-content",setup(e){const t=ft(),r=a.computed(()=>{var c;return(c=t==null?void 0:t.params)==null?void 0:c.template}),n=a.ref(null),s=a.ref({}),o=a.ref(1),i=async()=>{var c,f;try{const{data:h}=await O.get(`/api/cms-manager/${r.value}`);n.value=(c=h==null?void 0:h.rows)==null?void 0:c[0],s.value=(f=h==null?void 0:h.rows)==null?void 0:f[0],o.value=o.value+1}catch{}},l=async()=>{var c;try{await O.put(`/api/cms-manager/${(c=n.value)==null?void 0:c.id}`,s.value),await $notify({type:"success",title:"Успішно!",message:"Дані успішно оновлено"}),i()}catch{await $notify({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}};a.watch(r,i),a.onMounted(()=>i());const d={title:{ua:"Назва",type:"Text",placeholder:"Назва"},enabled:{ua:"Чи увімкнений",type:"Switcher"}};return(c,f)=>{var b,S;const h=a.resolveComponent("VsForm");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",Hd,[a.createElementVNode("div",zd,[a.createElementVNode("h2",qd,a.toDisplayString((b=n.value)==null?void 0:b.title),1),a.createElementVNode("p",Gd,a.toDisplayString((S=n.value)==null?void 0:S.description),1)]),a.createElementVNode("div",{class:"flex items-center gap-1"},[a.createElementVNode("button",{onClick:l,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),a.createElementVNode("div",null,[a.createElementVNode("div",Zd,[(a.openBlock(),a.createBlock(h,{key:o.value,class:"w-full",scheme:d,modelValue:s.value,"onUpdate:modelValue":f[0]||(f[0]=_=>s.value=_)},null,8,["modelValue"]))])])],64)}}},Kd={},Qd={xmlns:"http://www.w3.org/2000/svg",width:"5",height:"5",fill:"currentColor",viewBox:"0 0 4 4"};function Xd(e,t){return a.openBlock(),a.createElementBlock("svg",Qd,t[0]||(t[0]=[a.createElementVNode("rect",{width:"4",height:"4",fill:"currentColor",rx:"2"},null,-1)]))}const At=j(Kd,[["render",Xd]]),eu={},tu={xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"icon icon-tabler icons-tabler-outline icon-tabler-plus"};function ru(e,t){return a.openBlock(),a.createElementBlock("svg",tu,t[0]||(t[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M12 5l0 14"},null,-1),a.createElementVNode("path",{d:"M5 12l14 0"},null,-1)]))}const hs=j(eu,[["render",ru]]),nu={class:"p-4 w-[260px] border-r h-[100%] overflow-auto [&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar]:w-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-track]:bg-stone-100 [&::-webkit-scrollbar-thumb]:bg-stone-300 dark:[&::-webkit-scrollbar-track]:bg-neutral-700 dark:[&::-webkit-scrollbar-thumb]:bg-neutral-500"},su={class:"flex flex-col space-y-1"},au={class:"pt-2"},ou={class:"flex flex-col space-y-1"},iu={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},lu={__name:"vs-builder-menu",props:{UPDATE:{},UPDATEModifiers:{}},emits:["update:UPDATE"],setup(e){var h;const t=(h=a.getCurrentInstance().proxy)==null?void 0:h.$notify,r=a.useModel(e,"UPDATE"),n=a.ref(null),s=a.ref(!1),o=a.ref({}),i=a.ref(""),l=a.ref(),d=async()=>{try{const{data:b}=await O.get("/api/cms-builder");n.value=(b==null?void 0:b.rows)||null}catch{}},c=b=>{b==="single"?(o.value={type:"single"},i.value="Створити новий тип"):(o.value={type:"collection"},i.value="Створити колекцію"),s.value=!0},f=async()=>{try{await l.value.doValidation(),await O.post("/api/cms-builder",o.value),await t({type:"success",title:"Успішно!",message:"Об'єкт створено успішно"}),s.value=!1,await d()}catch{await t({type:"error",title:"Помилка!",message:"При спробі створити об'єкт виникла помилка"})}};return d(),a.onMounted(()=>r.value.getList=()=>d()),(b,S)=>{var p,V;const _=a.resolveComponent("router-link"),k=a.resolveComponent("VsForm"),y=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",nu,[a.createElementVNode("div",null,[S[6]||(S[6]=a.createElementVNode("h2",{v:"",class:"block text-[14px] font-medium text-gray-800 mb-2 dark:text-neutral-200"}," Колекції ",-1)),a.createElementVNode("ul",su,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((p=n.value)==null?void 0:p.filter(g=>(g==null?void 0:g.type)=="collection"),g=>{var U,B;return a.openBlock(),a.createElementBlock("li",{key:g==null?void 0:g.id},[a.createVNode(_,{to:`/cms/builder/${g==null?void 0:g.id}`,class:a.normalizeClass([[((B=(U=b.$route)==null?void 0:U.params)==null?void 0:B.id)===(g==null?void 0:g.id)?"bg-gray-200":""],"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-200 focus:outline-none dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"])},{default:a.withCtx(()=>[a.createVNode(At,{class:"text-gray-500"}),a.createTextVNode(" "+a.toDisplayString(g==null?void 0:g.name),1)]),_:2},1032,["to","class"])])}),128))]),a.createElementVNode("button",{onClick:S[0]||(S[0]=g=>c("colection")),class:"text-blue-500 flex text-[14px] py-2 px-2 text-nowrap hover:text-blue-700 duration-300 gap-2 items-center"},[a.createVNode(hs,{height:"16",width:"16"}),S[5]||(S[5]=a.createTextVNode(" Створити нову колекцію "))])]),a.createElementVNode("div",au,[S[8]||(S[8]=a.createElementVNode("h2",{class:"block text-[14px] mb-2 font-medium text-gray-800 dark:text-neutral-200"}," Одиничні типи ",-1)),a.createElementVNode("ul",ou,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((V=n.value)==null?void 0:V.filter(g=>(g==null?void 0:g.type)=="single"),g=>{var U,B;return a.openBlock(),a.createElementBlock("li",{key:g==null?void 0:g.id},[a.createVNode(_,{to:`/cms/builder/${g==null?void 0:g.id}`,class:a.normalizeClass([[((B=(U=b.$route)==null?void 0:U.params)==null?void 0:B.id)===(g==null?void 0:g.id)?"bg-gray-200":""],"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 hover:bg-gray-200 rounded-lg focus:outline-none dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"])},{default:a.withCtx(()=>[a.createVNode(At,{class:"text-gray-500"}),a.createTextVNode(" "+a.toDisplayString(g==null?void 0:g.name),1)]),_:2},1032,["to","class"])])}),128))]),a.createElementVNode("button",{onClick:S[1]||(S[1]=g=>c("single")),class:"text-blue-500 flex text-[14px] py-2 px-2 hover:text-blue-700 duration-300 gap-2 items-center"},[a.createVNode(hs,{height:"16",width:"16"}),S[7]||(S[7]=a.createTextVNode(" Створити новий тип "))])])]),a.createVNode(y,{visible:s.value,"onUpdate:visible":S[4]||(S[4]=g=>s.value=g),title:i.value},{footer:a.withCtx(()=>[a.createElementVNode("div",iu,[a.createElementVNode("button",{onClick:S[3]||(S[3]=g=>s.value=!1),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-black border rounded-lg border-gray-200 hover:bg-gray-100 duration-300"}," Скасувати"),a.createElementVNode("button",{onClick:f,class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm whitespace-nowrap text-white bg-blue-500 rounded-lg !border-gray-200 hover:bg-blue-700 duration-300"}," Зберегти ")])]),default:a.withCtx(()=>[a.createElementVNode("div",null,[a.createVNode(k,{modelValue:o.value,"onUpdate:modelValue":S[2]||(S[2]=g=>o.value=g),scheme:a.unref(mn),ref_key:"form",ref:l},null,8,["modelValue","scheme"])])]),_:1},8,["visible","title"])],64)}}},cu={class:"w-full bg-[#f6f6f9] h-[calc(100vh-60px)]"},du={class:"flex h-full"},uu={__name:"vs-builder",setup(e){const t=a.ref({});return(r,n)=>{const s=a.resolveComponent("router-view");return a.openBlock(),a.createElementBlock("div",cu,[a.createElementVNode("div",du,[a.createVNode(lu,{UPDATE:t.value,"onUpdate:UPDATE":n[0]||(n[0]=o=>t.value=o)},null,8,["UPDATE"]),a.createVNode(s,null,{default:a.withCtx(({Component:o})=>[o?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(o),{key:0,UPDATE:t.value},null,8,["UPDATE"])):(a.openBlock(),a.createBlock(Yt,{key:1,class:"pt-[100px]",text:"Оберіть один з існуючих пунктів меню, або створіть новий"}))]),_:1})])])}}},fu={class:"p-4 w-[260px] shrink-0 border-r h-[100vh]"},hu={key:0,class:""},mu={class:"flex flex-col space-y-1"},pu={class:"pt-5"},yu={class:"flex flex-col space-y-1"},_u={__name:"vs-manager-menu",setup(e){const t=a.ref(null);return(async()=>{try{const{data:n}=await O.get("/api/cms-builder");t.value=(n==null?void 0:n.rows)||null}catch{}})(),(n,s)=>{var i,l,d;const o=a.resolveComponent("router-link");return a.openBlock(),a.createElementBlock("div",fu,[(i=t.value)!=null&&i.length?(a.openBlock(),a.createElementBlock("div",hu,[s[0]||(s[0]=a.createElementVNode("h2",{class:"block text-[14px] font-medium text-gray-800 mb-2 dark:text-neutral-200"}," Колекції ",-1)),a.createElementVNode("ul",mu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((l=t.value)==null?void 0:l.filter(c=>(c==null?void 0:c.type)=="collection"),c=>{var f,h,b;return a.openBlock(),a.createElementBlock("li",{key:(f=n.item)==null?void 0:f.id},[a.createVNode(o,{to:`/cms/manager/collection/${c==null?void 0:c.template}`,class:a.normalizeClass([[((b=(h=n.$route)==null?void 0:h.params)==null?void 0:b.template)===(c==null?void 0:c.template)?"bg-gray-200":""],"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-200 focus:outline-none dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"])},{default:a.withCtx(()=>[a.createVNode(At,{class:"text-gray-500"}),a.createTextVNode(" "+a.toDisplayString((c==null?void 0:c.name)||(c==null?void 0:c.title)),1)]),_:2},1032,["to","class"])])}),128))])])):a.createCommentVNode("",!0),a.createElementVNode("div",pu,[s[1]||(s[1]=a.createElementVNode("h2",{class:"block text-[14px] mb-2 font-medium text-gray-800 dark:text-neutral-200"}," Одиничні типи ",-1)),a.createElementVNode("ul",yu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList((d=t.value)==null?void 0:d.filter(c=>(c==null?void 0:c.type)=="single"),c=>{var f,h,b;return a.openBlock(),a.createElementBlock("li",{key:(f=n.item)==null?void 0:f.id},[a.createVNode(o,{to:`/cms/manager/single/${c==null?void 0:c.template}`,class:a.normalizeClass([[((b=(h=n.$route)==null?void 0:h.params)==null?void 0:b.template)===(c==null?void 0:c.template)?"bg-gray-200":""],"w-full flex items-center gap-x-3.5 py-2 px-2.5 text-sm text-gray-800 rounded-lg hover:bg-gray-200 focus:outline-none dark:text-white dark:hover:bg-neutral-800 dark:focus:bg-neutral-800"])},{default:a.withCtx(()=>[a.createVNode(At,{class:"text-gray-500"}),a.createTextVNode(" "+a.toDisplayString((c==null?void 0:c.name)||(c==null?void 0:c.title)),1)]),_:2},1032,["to","class"])])}),128))])])])}}},gu={class:"w-full bg-[#f6f6f9] h-[calc(100vh-60px)]"},wu={class:"flex"},xu={class:"w-full flex justify-center"},ku={class:"p-[20px] w-full max-w-[1440px]"},bu={__name:"vs-manager",setup(e){return(t,r)=>{const n=a.resolveComponent("router-view");return a.openBlock(),a.createElementBlock("div",gu,[a.createElementVNode("div",wu,[a.createVNode(_u),a.createElementVNode("div",xu,[a.createElementVNode("div",ku,[a.createElementVNode("button",{onClick:r[0]||(r[0]=s=>t.$router.back()),class:"text-blue-500 flex gap-2 items-center hover:text-blue-700 duration-300"},[a.createVNode(hn,{template:t.template},null,8,["template"]),r[1]||(r[1]=a.createTextVNode(" Повернутися назад "))]),a.createVNode(n,null,{default:a.withCtx(({Component:s})=>[s?(a.openBlock(),a.createBlock(a.resolveDynamicComponent(s),{key:0})):(a.openBlock(),a.createBlock(Yt,{key:1,class:"pt-[100px]",text:"Оберіть один з існуючих пунктів меню, або створіть новий"}))]),_:1})])])])])}}},Su={},Du={xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function Eu(e,t){return a.openBlock(),a.createElementBlock("svg",Du,t[0]||(t[0]=[a.createElementVNode("path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"},null,-1),a.createElementVNode("polyline",{points:"9 22 9 12 15 12 15 22"},null,-1)]))}const Nu=j(Su,[["render",Eu]]),Ou={},Mu={"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"};function Tu(e,t){return a.openBlock(),a.createElementBlock("svg",Mu,t[0]||(t[0]=[a.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"},null,-1)]))}const Cu={components:{IconHome:Nu,IconChewronRight:j(Ou,[["render",Tu]])},props:{initialPath:{type:String,default:""},root:{type:String,default:"Root"}},data(){return{breadcrumbs:[]}},watch:{initialPath:{immediate:!0,handler(e){const t=e.split("/").filter(Boolean);this.breadcrumbs=[this.root,...t]}}},methods:{navigateTo(e){const t=e===0?"":this.breadcrumbs.slice(1,e+1).join("/");this.$emit("update-path",t)}}},Ru={"aria-label":"Breadcrumb",class:"mb-4"},Vu={class:"flex items-start justify-between"},Pu={class:"flex flex-wrap items-center gap-[5px] min-h-8"},Yu={class:"flex items-center"},Au=["onClick"],Fu={key:1};function Bu(e,t,r,n,s,o){const i=a.resolveComponent("IconHome"),l=a.resolveComponent("IconChewronRight");return a.openBlock(),a.createElementBlock("nav",Ru,[a.createElementVNode("div",Vu,[a.createElementVNode("ol",Pu,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(s.breadcrumbs,(d,c)=>(a.openBlock(),a.createElementBlock("li",{key:c,class:"whitespace-nowrap"},[a.createElementVNode("div",Yu,[a.createElementVNode("button",{onClick:f=>o.navigateTo(c),class:a.normalizeClass([["hover:text-blue-500 focus:outline-none flex items-center",c===s.breadcrumbs.length-1?"font-medium underline text-blue-500":"text-gray-500"],"h-8 flex items-center"])},[c===0?(a.openBlock(),a.createBlock(i,{key:0,class:"w-4 h-4"})):(a.openBlock(),a.createElementBlock("span",Fu,a.toDisplayString(d),1))],10,Au),c<s.breadcrumbs.length-1?(a.openBlock(),a.createBlock(l,{key:0,class:"text-gray-400 w-3 h-3 ml-[10px]"})):a.createCommentVNode("",!0)])]))),128))])])])}const vu=j(Cu,[["render",Bu]]),$u={},Uu={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Lu(e,t){return a.openBlock(),a.createElementBlock("svg",Uu,t[0]||(t[0]=[a.createElementVNode("path",{d:"M6.41667 11.0833C8.994 11.0833 11.0833 8.994 11.0833 6.41667C11.0833 3.83934 8.994 1.75 6.41667 1.75C3.83934 1.75 1.75 3.83934 1.75 6.41667C1.75 8.994 3.83934 11.0833 6.41667 11.0833Z",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),a.createElementVNode("path",{d:"M12.25 12.25L9.7417 9.7417",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Iu=j($u,[["render",Lu]]),Wu={},ju={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function Hu(e,t){return a.openBlock(),a.createElementBlock("svg",ju,t[0]||(t[0]=[a.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),a.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)]))}const zu=j(Wu,[["render",Hu]]),qu={},Gu={width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Zu(e,t){return a.openBlock(),a.createElementBlock("svg",Gu,t[0]||(t[0]=[a.createElementVNode("path",{d:"M3 8.2C3 7.07989 3 6.51984 3.21799 6.09202C3.40973 5.71569 3.71569 5.40973 4.09202 5.21799C4.51984 5 5.0799 5 6.2 5H9.67452C10.1637 5 10.4083 5 10.6385 5.05526C10.8425 5.10425 11.0376 5.18506 11.2166 5.29472C11.4184 5.4184 11.5914 5.59135 11.9373 5.93726L12.0627 6.06274C12.4086 6.40865 12.5816 6.5816 12.7834 6.70528C12.9624 6.81494 13.1575 6.89575 13.3615 6.94474C13.5917 7 13.8363 7 14.3255 7H17.8C18.9201 7 19.4802 7 19.908 7.21799C20.2843 7.40973 20.5903 7.71569 20.782 8.09202C21 8.51984 21 9.0799 21 10.2V15.8C21 16.9201 21 17.4802 20.782 17.908C20.5903 18.2843 20.2843 18.5903 19.908 18.782C19.4802 19 18.9201 19 17.8 19H6.2C5.07989 19 4.51984 19 4.09202 18.782C3.71569 18.5903 3.40973 18.2843 3.21799 17.908C3 17.4802 3 16.9201 3 15.8V8.2Z",stroke:"#000000","stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Ju=j(qu,[["render",Zu]]),Ku={},Qu={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Xu(e,t){return a.openBlock(),a.createElementBlock("svg",Qu,t[0]||(t[0]=[a.createElementVNode("path",{d:"M18 6L6 18",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),a.createElementVNode("path",{d:"M6 6L18 18",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const ef=j(Ku,[["render",Xu]]),tf={},rf={class:"flex-shrink-0 size-3.5",xmlns:"http://www.w3.org/2000/svg",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"};function nf(e,t){return a.openBlock(),a.createElementBlock("svg",rf,t[0]||(t[0]=[a.createStaticVNode('<line x1="21" x2="14" y1="4" y2="4"></line><line x1="10" x2="3" y1="4" y2="4"></line><line x1="21" x2="12" y1="12" y2="12"></line><line x1="8" x2="3" y1="12" y2="12"></line><line x1="21" x2="16" y1="20" y2="20"></line><line x1="12" x2="3" y1="20" y2="20"></line><line x1="14" x2="14" y1="2" y2="6"></line><line x1="8" x2="8" y1="10" y2="14"></line><line x1="16" x2="16" y1="18" y2="22"></line>',9)]))}const sf=j(tf,[["render",nf]]),af={},of={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function lf(e,t){return a.openBlock(),a.createElementBlock("svg",of,t[0]||(t[0]=[a.createElementVNode("path",{d:"M.513 1.513A1.75 1.75 0 0 1 1.75 1h3.5c.55 0 1.07.26 1.4.7l.9 1.2a.25.25 0 0 0 .2.1H 13a1 1 0 0 1 1 1v.5H2.75a.75.75 0 0 0 0 1.5h11.978a1 1 0 0 1 .994 1.117L15 13.25A1.75 1.75 0 0 1 13.25 15H1.75A1.75 1.75 0 0 1 0 13.25V2.75c0-.464.184-.91.513-1.237Z"},null,-1),a.createElementVNode("path",{d:"M1.75 1A1.75 1.75 0 0 0 0 2.75v10.5C0 14.216.784 15 1.75 15h12.5A1.75 1.75 0 0 0 16 13.25v-8.5A1.75 1.75 0 0 0 14.25 3H7.5a.25.25 0 0 1-.2-.1l-.9-1.2C6.07 1.26 5.55 1 5 1H1.75Z"},null,-1)]))}const cf={components:{Breadcrumb:vu,IconSearch:Iu,IconFolder:zu,IconFolder2:Ju,IconClose:ef,IconImage:j(af,[["render",lf]]),IconActions:sf,VsNotData:Yt},props:{type:{type:String,default:"icon"}},data(){return{icons:[],currentPage:parseInt(this.$route.query.page,10)||1,iconsPerPage:15,token:"",searchQuery:"",selectedFile:null,isAddDirModalOpen:!1,newDirName:""}},watch:{isAddDirModalOpen(e){e||(this.newDirName="")}},computed:{currentDir(){return this.$route.query.dir||""},currentTab(){return this.$route.query.tab||""},filteredIcons(){return this.searchQuery?this.icons.filter(e=>e.name.toLowerCase().includes(this.searchQuery.toLowerCase())):this.icons},sortedIcons(){return[...this.filteredIcons].sort((e,t)=>e.type==="dir"&&t.type!=="dir"?-1:e.type!=="dir"&&t.type==="dir"?1:e.name.localeCompare(t.name))},currentIcons(){const e=(this.currentPage-1)*this.iconsPerPage,t=e+this.iconsPerPage;return this.sortedIcons.slice(e,t)}},methods:{async fetchIcons(e){try{const{data:t}=await O.get("/api/cms-media",{params:{dir:e}});this.icons=(t==null?void 0:t.data)||[],this.token=t==null?void 0:t.token}catch(t){console.error("Error fetching icons:",t)}},async addDir(){var e,t;if(!this.newDirName.trim()){this.$notify({type:"error",title:"Помилка",message:"Назва папки не може бути порожньою."});return}try{const r=await O.post(`/api/cms-media/${this.token}`,{name:this.newDirName});this.$notify({type:"success",title:"Успіх!",message:`Папку "${this.newDirName}" успішно створено.`}),this.fetchIcons(this.currentDir),this.handeAddFolderClose(),this.newDirName=""}catch(r){console.error("Error creating directory:",r),this.$notify({type:"error",title:"Помилка",message:((t=(e=r.response)==null?void 0:e.data)==null?void 0:t.message)||"Не вдалося створити папку."})}},handeAddFolderClose(){this.isAddDirModalOpen=!1},navigateToDir(e){const t=`${this.currentDir}/${e}`.replace(/\/+/g,"/");this.updateURL(t)},updatePath(e){this.updateURL(e)},updateURL(e){this.$router.push({query:{...this.$route.query,dir:e,page:this.currentPage}})},async handleFileChange(e){const t=e.target.files[0];if(!t)return;const r=new FormData;r.append("file",t);try{const n=await O.post(`/api/cms-media/${this.token}`,r,{headers:{"Content-Type":"multipart/form-data"}});this.$notify({type:"success",title:"Успіх!",message:"Файл успішно додано!"}),this.currentPage=1}catch(n){console.error("Error uploading file:",n),this.$notify({type:"error",title:"Помилка",message:n.response.statustext||n.message||n})}finally{await this.fetchIcons(this.currentDir)}},clearSearch(){this.searchQuery=""},copyToClipboard(e){try{const t=document.createElement("textarea");t.value=e,document.body.appendChild(t),t.select(),t.setSelectionRange(0,e.length);const r=document.execCommand("copy");document.body.removeChild(t),r?this.$notify({type:"success",title:"Скопійовано!",message:"Назву іконки успішно скопійовано."}):this.$notify({type:"error",title:"Помилка",message:"Не вдалося скопіювати шлях."})}catch(t){this.$notify({type:"error",title:"Помилка",message:"Не вдалося скопіювати координати"}),console.error("Copy failed",t)}}},watch:{currentDir:{immediate:!0,handler(e){this.fetchIcons(e)}},currentTab:{handler(){this.currentPage=1}},currentPage(e){this.$emit("update-url",{query:{...this.$route.query,page:e}})}},async mounted(){await this.fetchIcons(this.currentDir)}},df={class:"w-full p-[20px] bg-gray-100 flex justify-center h-[calc(100vh-60px)]"},uf={class:"p-[20px] w-full max-w-[1640px]"},ff={class:"flex items-start justify-between"},hf={class:"flex gap-2 relative"},mf={class:"flex items-center justify-between bg-white py-2 px-3 rounded-lg border border-gray-300 focus:outline-none focus:border-blue-500 text-sm w-[250px]"},pf={class:"flex items-center gap-[12px]"},yf={for:"file-upload",class:"py-2 px-3 inline-flex justify-center items-center gap-x-2 text-sm font-medium rounded-lg border border-transparent bg-blue-600 text-white hover:bg-blue-700 focus:outline-none focus:bg-blue-700 cursor-pointer"},_f={key:0,class:"flex flex-col items-center justify-center h-64 bg-gray-50 rounded-lg border text-center"},gf={key:1},wf={class:"grid grid-cols-2 lg:grid-cols-5 gap-3 xl:gap-5"},xf=["onClick"],kf={class:"relative group"},bf={class:"w-full h-36 sm:h-[170px] object-cover rounded-t-xl flex items-center justify-center"},Sf={key:0,class:"text-[#54aeff]"},Df=["src","alt"],Ef={class:"p-3 flex items-center gap-x-3 border-t"},Nf={key:0,class:"flex shrink-0 justify-center items-center w-10 h-10 bg-white border border-solid text-gray-500 rounded-lg"},Of=["title"],Mf=["onClick"],Tf={class:"block truncate text-xs text-gray-500"},Cf={class:"p-4"},Rf={class:"flex justify-end"};function Vf(e,t,r,n,s,o){var y;const i=a.resolveComponent("Breadcrumb"),l=a.resolveComponent("IconSearch"),d=a.resolveComponent("IconClose"),c=a.resolveComponent("IconFolder2"),f=a.resolveComponent("VsNotData"),h=a.resolveComponent("IconFolder"),b=a.resolveComponent("IconImage"),S=a.resolveComponent("VsPagination"),_=a.resolveComponent("VsText"),k=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock("div",df,[a.createElementVNode("div",uf,[a.createElementVNode("div",null,[a.createElementVNode("div",ff,[a.createVNode(i,{initialPath:o.currentDir,onUpdatePath:o.updatePath},null,8,["initialPath","onUpdatePath"]),a.createElementVNode("div",hf,[a.createElementVNode("div",mf,[a.createElementVNode("div",pf,[a.createVNode(l),a.withDirectives(a.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=p=>s.searchQuery=p),type:"text",placeholder:"Пошук за назвою...",class:"focus:outline-none"},null,512),[[a.vModelText,s.searchQuery]])]),s.searchQuery?(a.openBlock(),a.createBlock(d,{key:0,class:"w-4 h-4 cursor-pointer",onClick:o.clearSearch},null,8,["onClick"])):a.createCommentVNode("",!0)]),a.createElementVNode("button",{ref:"dropdownButton",onClick:t[1]||(t[1]=p=>s.isAddDirModalOpen=!0),class:"py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium border border-gray-300 rounded-lg text-gray-800 hover:bg-gray-100 bg-white"},[a.createVNode(c),t[7]||(t[7]=a.createTextVNode(" Додати папку "))],512),a.createElementVNode("label",yf,[t[8]||(t[8]=a.createTextVNode(" Завантажити ")),a.createElementVNode("input",{id:"file-upload",type:"file",class:"hidden",onChange:t[2]||(t[2]=(...p)=>o.handleFileChange&&o.handleFileChange(...p))},null,32)])])]),(y=o.filteredIcons)!=null&&y.length?(a.openBlock(),a.createElementBlock("div",gf,[a.createElementVNode("div",wf,[(a.openBlock(!0),a.createElementBlock(a.Fragment,null,a.renderList(o.currentIcons,p=>{var V;return a.openBlock(),a.createElementBlock("div",{key:p==null?void 0:p.id,class:a.normalizeClass(["flex flex-col bg-white border rounded-xl",{"cursor-pointer hover:border-blue-500":p.type==="dir","cursor-default":p.type!=="dir"}]),onClick:g=>p.type==="dir"?o.navigateToDir(p.name):null},[a.createElementVNode("div",kf,[a.createElementVNode("div",bf,[(p==null?void 0:p.type)==="dir"?(a.openBlock(),a.createElementBlock("div",Sf,[a.createVNode(h)])):(a.openBlock(),a.createElementBlock("img",{key:1,class:"object-contain max-h-[40px]",src:`/api/cms-media/${p==null?void 0:p.token}`,alt:p==null?void 0:p.name,style:a.normalizeStyle((V=p==null?void 0:p.path)!=null&&V.includes(".svg")?"width:250px;max-height:100px":"")},null,12,Df))])]),a.createElementVNode("div",Ef,[p.type!=="dir"?(a.openBlock(),a.createElementBlock("span",Nf,[a.createVNode(b)])):a.createCommentVNode("",!0),a.createElementVNode("div",{class:"grow truncate",title:p==null?void 0:p.name},[a.createElementVNode("p",{class:a.normalizeClass(["block truncate text-sm font-semibold text-gray-800",{"cursor-pointer":p.type!=="dir"}]),onClick:a.withModifiers(g=>p.type!=="dir"&&o.copyToClipboard(p==null?void 0:p.name),["stop"])},a.toDisplayString(p==null?void 0:p.name),11,Mf),a.createElementVNode("p",Tf,a.toDisplayString(p==null?void 0:p.size),1)],8,Of)])],10,xf)}),128))]),o.filteredIcons.length>s.iconsPerPage?(a.openBlock(),a.createBlock(S,{key:0,defaultPage:s.currentPage,class:"mt-6 focus-visible:outline-blue-500 flex !justify-center",total:o.filteredIcons.length,pageSize:s.iconsPerPage,maxPages:3,goTo:!1,onPageChange:t[3]||(t[3]=p=>s.currentPage=p)},null,8,["defaultPage","total","pageSize"])):a.createCommentVNode("",!0)])):(a.openBlock(),a.createElementBlock("div",_f,[a.createVNode(f,{text:"",class:"![&>div]:min-w-[100px] !w-auto"})]))]),a.createVNode(k,{visible:s.isAddDirModalOpen,"onUpdate:visible":t[6]||(t[6]=p=>s.isAddDirModalOpen=p),title:"Додати папку",size:"small",closeClickBack:!0,onOnClose:o.handeAddFolderClose},{default:a.withCtx(()=>[a.createElementVNode("div",Cf,[a.createVNode(_,{modelValue:s.newDirName,"onUpdate:modelValue":t[4]||(t[4]=p=>s.newDirName=p),placeholder:"Назва нової папки.."},null,8,["modelValue"]),a.createElementVNode("div",Rf,[a.createElementVNode("button",{onClick:t[5]||(t[5]=(...p)=>o.addDir&&o.addDir(...p)),class:"mt-4 py-2 px-4 text-white bg-blue-600 hover:bg-blue-700 rounded-lg"}," Створити ")])])]),_:1},8,["visible","onOnClose"])])])}const ms={"vs-builder":uu,"vs-builder-content":ao,"vs-manager":bu,"vs-manager-collection-content":vd,"vs-manager-collection-item-content":jd,"vs-manager-single-content":Jd,"vs-media":j(cf,[["render",Vf]])},ps={install:e=>{var t;(t=Object.entries(ms))==null||t.forEach(([r,n])=>e.component(r,n))},components:ms};return typeof window<"u"&&(window.v3Cms=ps),ps});
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@opengis/cms",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "description": "cms",
5
5
  "type": "module",
6
6
  "author": "Softpro",
7
+ "main": "dist/cms.js",
7
8
  "license": "EULA",
8
9
  "files": [
9
- "dist"
10
+ "dist/*"
10
11
  ],
11
12
  "scripts": {
12
13
  "test": "node --test test/**/*.test.js",