@opengis/cms 0.0.10 → 0.0.12
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 +3615 -2931
- package/dist/cms.umd.cjs +13 -13
- package/dist/style.css +1 -0
- package/package.json +5 -5
- package/server/app.js +5 -2
- package/server/migrations/site.sql +428 -0
- package/server/routes/site/controllers/deleteMedia.js +47 -0
- package/server/routes/site/controllers/downloadMedia.js +48 -0
- package/server/routes/site/controllers/getPermissions.js +16 -0
- package/server/routes/site/controllers/listMedia.js +60 -0
- package/server/routes/site/controllers/metadataMedia.js +37 -0
- package/server/routes/site/controllers/setPermissions.js +50 -0
- package/server/routes/site/controllers/uploadMedia.js +66 -0
- package/server/routes/site/index.mjs +34 -0
- package/server/migrations/media.sql +0 -30
package/dist/cms.umd.cjs
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
(function(a,Me){typeof exports=="object"&&typeof module<"u"?module.exports=Me(require("vue")):typeof define=="function"&&define.amd?define(["vue"],Me):(a=typeof globalThis<"u"?globalThis:a||self,a.cms=Me(a.Vue))})(this,function(a){"use strict";function Me(e,t){return function(){return e.apply(t,arguments)}}const{toString:gs}=Object.prototype,{getPrototypeOf:Bt}=Object,tt=(e=>t=>{const r=gs.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Q=e=>(e=e.toLowerCase(),t=>tt(t)===e),rt=e=>t=>typeof t===e,{isArray:Te}=Array,Ue=rt("undefined");function ws(e){return e!==null&&!Ue(e)&&e.constructor!==null&&!Ue(e.constructor)&&q(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Mr=Q("ArrayBuffer");function xs(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Mr(e.buffer),t}const ks=rt("string"),q=rt("function"),Tr=rt("number"),nt=e=>e!==null&&typeof e=="object",bs=e=>e===!0||e===!1,st=e=>{if(tt(e)!=="object")return!1;const t=Bt(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Ss=Q("Date"),Ds=Q("File"),Es=Q("Blob"),Ns=Q("FileList"),Os=e=>nt(e)&&q(e.pipe),Ms=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||q(e.append)&&((t=tt(e))==="formdata"||t==="object"&&q(e.toString)&&e.toString()==="[object FormData]"))},Ts=Q("URLSearchParams"),[Cs,Rs,Vs,Ps]=["ReadableStream","Request","Response","Headers"].map(Q),Ys=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Le(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),Te(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let l;for(n=0;n<i;n++)l=o[n],t.call(null,e[l],l,e)}}function Cr(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}const ke=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Rr=e=>!Ue(e)&&e!==ke;function vt(){const{caseless:e}=Rr(this)&&this||{},t={},r=(n,s)=>{const o=e&&Cr(t,s)||s;st(t[o])&&st(n)?t[o]=vt(t[o],n):st(n)?t[o]=vt({},n):Te(n)?t[o]=n.slice():t[o]=n};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&Le(arguments[n],r);return t}const As=(e,t,r,{allOwnKeys:n}={})=>(Le(t,(s,o)=>{r&&q(s)?e[o]=Me(s,r):e[o]=s},{allOwnKeys:n}),e),Fs=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Bs=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},vs=(e,t,r,n)=>{let s,o,i;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),o=s.length;o-- >0;)i=s[o],(!n||n(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=r!==!1&&Bt(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},$s=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Us=e=>{if(!e)return null;if(Te(e))return e;let t=e.length;if(!Tr(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Ls=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Bt(Uint8Array)),Is=(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=n.next())&&!s.done;){const o=s.value;t.call(e,o[0],o[1])}},Ws=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},js=Q("HTMLFormElement"),Hs=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),Vr=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),zs=Q("RegExp"),Pr=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Le(r,(s,o)=>{let i;(i=t(s,o,e))!==!1&&(n[o]=i||s)}),Object.defineProperties(e,n)},qs=e=>{Pr(e,(t,r)=>{if(q(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(q(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Gs=(e,t)=>{const r={},n=s=>{s.forEach(o=>{r[o]=!0})};return Te(e)?n(e):n(String(e).split(t)),r},Zs=()=>{},Js=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ks(e){return!!(e&&q(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Qs=e=>{const t=new Array(10),r=(n,s)=>{if(nt(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[s]=n;const o=Te(n)?[]:{};return Le(n,(i,l)=>{const d=r(i,s+1);!Ue(d)&&(o[l]=d)}),t[s]=void 0,o}}return n};return r(e,0)},Xs=Q("AsyncFunction"),ea=e=>e&&(nt(e)||q(e))&&q(e.then)&&q(e.catch),Yr=((e,t)=>e?setImmediate:t?((r,n)=>(ke.addEventListener("message",({source:s,data:o})=>{s===ke&&o===r&&n.length&&n.shift()()},!1),s=>{n.push(s),ke.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",q(ke.postMessage)),ta=typeof queueMicrotask<"u"?queueMicrotask.bind(ke):typeof process<"u"&&process.nextTick||Yr,u={isArray:Te,isArrayBuffer:Mr,isBuffer:ws,isFormData:Ms,isArrayBufferView:xs,isString:ks,isNumber:Tr,isBoolean:bs,isObject:nt,isPlainObject:st,isReadableStream:Cs,isRequest:Rs,isResponse:Vs,isHeaders:Ps,isUndefined:Ue,isDate:Ss,isFile:Ds,isBlob:Es,isRegExp:zs,isFunction:q,isStream:Os,isURLSearchParams:Ts,isTypedArray:Ls,isFileList:Ns,forEach:Le,merge:vt,extend:As,trim:Ys,stripBOM:Fs,inherits:Bs,toFlatObject:vs,kindOf:tt,kindOfTest:Q,endsWith:$s,toArray:Us,forEachEntry:Is,matchAll:Ws,isHTMLForm:js,hasOwnProperty:Vr,hasOwnProp:Vr,reduceDescriptors:Pr,freezeMethods:qs,toObjectSet:Gs,toCamelCase:Hs,noop:Zs,toFiniteNumber:Js,findKey:Cr,global:ke,isContextDefined:Rr,isSpecCompliantForm:Ks,toJSONObject:Qs,isAsyncFn:Xs,isThenable:ea,setImmediate:Yr,asap:ta};function E(e,t,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}u.inherits(E,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:u.toJSONObject(this.config),code:this.code,status:this.status}}});const Ar=E.prototype,Fr={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Fr[e]={value:e}}),Object.defineProperties(E,Fr),Object.defineProperty(Ar,"isAxiosError",{value:!0}),E.from=(e,t,r,n,s,o)=>{const i=Object.create(Ar);return u.toFlatObject(e,i,function(d){return d!==Error.prototype},l=>l!=="isAxiosError"),E.call(i,e.message,t,r,n,s),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const ra=null;function $t(e){return u.isPlainObject(e)||u.isArray(e)}function Br(e){return u.endsWith(e,"[]")?e.slice(0,-2):e}function vr(e,t,r){return e?e.concat(t).map(function(s,o){return s=Br(s),!r&&o?"["+s+"]":s}).join(r?".":""):t}function na(e){return u.isArray(e)&&!e.some($t)}const sa=u.toFlatObject(u,{},null,function(t){return/^is[A-Z]/.test(t)});function at(e,t,r){if(!u.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=u.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,y){return!u.isUndefined(y[k])});const n=r.metaTokens,s=r.visitor||f,o=r.dots,i=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&u.isSpecCompliantForm(t);if(!u.isFunction(s))throw new TypeError("visitor must be a function");function c(_){if(_===null)return"";if(u.isDate(_))return _.toISOString();if(!d&&u.isBlob(_))throw new E("Blob is not supported. Use a Buffer instead.");return u.isArrayBuffer(_)||u.isTypedArray(_)?d&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function f(_,k,y){let p=_;if(_&&!y&&typeof _=="object"){if(u.endsWith(k,"{}"))k=n?k:k.slice(0,-2),_=JSON.stringify(_);else if(u.isArray(_)&&na(_)||(u.isFileList(_)||u.endsWith(k,"[]"))&&(p=u.toArray(_)))return k=Br(k),p.forEach(function(g,U){!(u.isUndefined(g)||g===null)&&t.append(i===!0?vr([k],U,o):i===null?k:k+"[]",c(g))}),!1}return $t(_)?!0:(t.append(vr(y,k,o),c(_)),!1)}const h=[],b=Object.assign(sa,{defaultVisitor:f,convertValue:c,isVisitable:$t});function S(_,k){if(!u.isUndefined(_)){if(h.indexOf(_)!==-1)throw Error("Circular reference detected in "+k.join("."));h.push(_),u.forEach(_,function(p,V){(!(u.isUndefined(p)||p===null)&&s.call(t,p,u.isString(V)?V.trim():V,k,b))===!0&&S(p,k?k.concat(V):[V])}),h.pop()}}if(!u.isObject(e))throw new TypeError("data must be an object");return S(e),t}function $r(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Ut(e,t){this._pairs=[],e&&at(e,this,t)}const Ur=Ut.prototype;Ur.append=function(t,r){this._pairs.push([t,r])},Ur.toString=function(t){const r=t?function(n){return t.call(this,n,$r)}:$r;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function aa(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Lr(e,t,r){if(!t)return e;const n=r&&r.encode||aa;u.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let o;if(s?o=s(t,r):o=u.isURLSearchParams(t)?t.toString():new Ut(t,r).toString(n),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class Ir{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){u.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Wr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},oa={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ut,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Lt=typeof window<"u"&&typeof document<"u",It=typeof navigator=="object"&&navigator||void 0,ia=Lt&&(!It||["ReactNative","NativeScript","NS"].indexOf(It.product)<0),la=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",ca=Lt&&window.location.href||"http://localhost",L={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Lt,hasStandardBrowserEnv:ia,hasStandardBrowserWebWorkerEnv:la,navigator:It,origin:ca},Symbol.toStringTag,{value:"Module"})),...oa};function da(e,t){return at(e,new L.classes.URLSearchParams,Object.assign({visitor:function(r,n,s,o){return L.isNode&&u.isBuffer(r)?(this.append(n,r.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function ua(e){return u.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function fa(e){const t={},r=Object.keys(e);let n;const s=r.length;let o;for(n=0;n<s;n++)o=r[n],t[o]=e[o];return t}function jr(e){function t(r,n,s,o){let i=r[o++];if(i==="__proto__")return!0;const l=Number.isFinite(+i),d=o>=r.length;return i=!i&&u.isArray(s)?s.length:i,d?(u.hasOwnProp(s,i)?s[i]=[s[i],n]:s[i]=n,!l):((!s[i]||!u.isObject(s[i]))&&(s[i]=[]),t(r,n,s[i],o)&&u.isArray(s[i])&&(s[i]=fa(s[i])),!l)}if(u.isFormData(e)&&u.isFunction(e.entries)){const r={};return u.forEachEntry(e,(n,s)=>{t(ua(n),s,r,0)}),r}return null}function ha(e,t,r){if(u.isString(e))try{return(t||JSON.parse)(e),u.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Ie={transitional:Wr,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,o=u.isObject(t);if(o&&u.isHTMLForm(t)&&(t=new FormData(t)),u.isFormData(t))return s?JSON.stringify(jr(t)):t;if(u.isArrayBuffer(t)||u.isBuffer(t)||u.isStream(t)||u.isFile(t)||u.isBlob(t)||u.isReadableStream(t))return t;if(u.isArrayBufferView(t))return t.buffer;if(u.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return da(t,this.formSerializer).toString();if((l=u.isFileList(t))||n.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return at(l?{"files[]":t}:t,d&&new d,this.formSerializer)}}return o||s?(r.setContentType("application/json",!1),ha(t)):t}],transformResponse:[function(t){const r=this.transitional||Ie.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(u.isResponse(t)||u.isReadableStream(t))return t;if(t&&u.isString(t)&&(n&&!this.responseType||s)){const i=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(l){if(i)throw l.name==="SyntaxError"?E.from(l,E.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:L.classes.FormData,Blob:L.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};u.forEach(["delete","get","head","post","put","patch"],e=>{Ie.headers[e]={}});const ma=u.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),pa=e=>{const t={};let r,n,s;return e&&e.split(`
|
|
2
|
-
`).forEach(function(i){s=i.indexOf(":"),r=i.substring(0,s).trim().toLowerCase(),n=i.substring(s+1).trim(),!(!r||t[r]&&
|
|
3
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(s=>n.set(s)),n}static accessor(t){const n=(this[Hr]=this[Hr]={accessors:{}}).accessors,s=this.prototype;function o(i){const l=We(i);n[l]||(wa(s,i),n[l]=!0)}return u.isArray(t)?t.forEach(o):o(t),this}};H.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),u.reduceDescriptors(H.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),u.freezeMethods(H);function jt(e,t){const r=this||Ie,n=t||r,s=H.from(n.headers);let o=n.data;return u.forEach(e,function(l){o=l.call(r,o,s.normalize(),t?t.status:void 0)}),s.normalize(),o}function zr(e){return!!(e&&e.__CANCEL__)}function Ce(e,t,r){E.call(this,e??"canceled",E.ERR_CANCELED,t,r),this.name="CanceledError"}u.inherits(Ce,E,{__CANCEL__:!0});function qr(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new E("Request failed with status code "+r.status,[E.ERR_BAD_REQUEST,E.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function xa(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function ka(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s=0,o=0,i;return t=t!==void 0?t:1e3,function(d){const c=Date.now(),f=n[o];i||(i=c),r[s]=d,n[s]=c;let h=o,b=0;for(;h!==s;)b+=r[h++],h=h%e;if(s=(s+1)%e,s===o&&(o=(o+1)%e),c-i<t)return;const S=f&&c-f;return S?Math.round(b*1e3/S):void 0}}function ba(e,t){let r=0,n=1e3/t,s,o;const i=(c,f=Date.now())=>{r=f,s=null,o&&(clearTimeout(o),o=null),e.apply(null,c)};return[(...c)=>{const f=Date.now(),h=f-r;h>=n?i(c,f):(s=c,o||(o=setTimeout(()=>{o=null,i(s)},n-h)))},()=>s&&i(s)]}const it=(e,t,r=3)=>{let n=0;const s=ka(50,250);return ba(o=>{const i=o.loaded,l=o.lengthComputable?o.total:void 0,d=i-n,c=s(d),f=i<=l;n=i;const h={loaded:i,total:l,progress:l?i/l:void 0,bytes:d,rate:c||void 0,estimated:c&&l&&f?(l-i)/c:void 0,event:o,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(h)},r)},Gr=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Zr=e=>(...t)=>u.asap(()=>e(...t)),Sa=L.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,L.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(L.origin),L.navigator&&/(msie|trident)/i.test(L.navigator.userAgent)):()=>!0,Da=L.hasStandardBrowserEnv?{write(e,t,r,n,s,o){const i=[e+"="+encodeURIComponent(t)];u.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),u.isString(n)&&i.push("path="+n),u.isString(s)&&i.push("domain="+s),o===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ea(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Na(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Jr(e,t,r){let n=!Ea(t);return e&&n||r==!1?Na(e,t):t}const Kr=e=>e instanceof H?{...e}:e;function be(e,t){t=t||{};const r={};function n(c,f,h,b){return u.isPlainObject(c)&&u.isPlainObject(f)?u.merge.call({caseless:b},c,f):u.isPlainObject(f)?u.merge({},f):u.isArray(f)?f.slice():f}function s(c,f,h,b){if(u.isUndefined(f)){if(!u.isUndefined(c))return n(void 0,c,h,b)}else return n(c,f,h,b)}function o(c,f){if(!u.isUndefined(f))return n(void 0,f)}function i(c,f){if(u.isUndefined(f)){if(!u.isUndefined(c))return n(void 0,c)}else return n(void 0,f)}function l(c,f,h){if(h in t)return n(c,f);if(h in e)return n(void 0,c)}const d={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(c,f,h)=>s(Kr(c),Kr(f),h,!0)};return u.forEach(Object.keys(Object.assign({},e,t)),function(f){const h=d[f]||s,b=h(e[f],t[f],f);u.isUndefined(b)&&h!==l||(r[f]=b)}),r}const Qr=e=>{const t=be({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:o,headers:i,auth:l}=t;t.headers=i=H.from(i),t.url=Lr(Jr(t.baseURL,t.url),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let d;if(u.isFormData(r)){if(L.hasStandardBrowserEnv||L.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((d=i.getContentType())!==!1){const[c,...f]=d?d.split(";").map(h=>h.trim()).filter(Boolean):[];i.setContentType([c||"multipart/form-data",...f].join("; "))}}if(L.hasStandardBrowserEnv&&(n&&u.isFunction(n)&&(n=n(t)),n||n!==!1&&Sa(t.url))){const c=s&&o&&Da.read(o);c&&i.set(s,c)}return t},Oa=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const s=Qr(e);let o=s.data;const i=H.from(s.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:c}=s,f,h,b,S,_;function k(){S&&S(),_&&_(),s.cancelToken&&s.cancelToken.unsubscribe(f),s.signal&&s.signal.removeEventListener("abort",f)}let y=new XMLHttpRequest;y.open(s.method.toUpperCase(),s.url,!0),y.timeout=s.timeout;function p(){if(!y)return;const g=H.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),B={data:!l||l==="text"||l==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:g,config:e,request:y};qr(function(W){r(W),k()},function(W){n(W),k()},B),y=null}"onloadend"in y?y.onloadend=p:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(p)},y.onabort=function(){y&&(n(new E("Request aborted",E.ECONNABORTED,e,y)),y=null)},y.onerror=function(){n(new E("Network Error",E.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let U=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const B=s.transitional||Wr;s.timeoutErrorMessage&&(U=s.timeoutErrorMessage),n(new E(U,B.clarifyTimeoutError?E.ETIMEDOUT:E.ECONNABORTED,e,y)),y=null},o===void 0&&i.setContentType(null),"setRequestHeader"in y&&u.forEach(i.toJSON(),function(U,B){y.setRequestHeader(B,U)}),u.isUndefined(s.withCredentials)||(y.withCredentials=!!s.withCredentials),l&&l!=="json"&&(y.responseType=s.responseType),c&&([b,_]=it(c,!0),y.addEventListener("progress",b)),d&&y.upload&&([h,S]=it(d),y.upload.addEventListener("progress",h),y.upload.addEventListener("loadend",S)),(s.cancelToken||s.signal)&&(f=g=>{y&&(n(!g||g.type?new Ce(null,e,y):g),y.abort(),y=null)},s.cancelToken&&s.cancelToken.subscribe(f),s.signal&&(s.signal.aborted?f():s.signal.addEventListener("abort",f)));const V=xa(s.url);if(V&&L.protocols.indexOf(V)===-1){n(new E("Unsupported protocol "+V+":",E.ERR_BAD_REQUEST,e));return}y.send(o||null)})},Ma=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,s;const o=function(c){if(!s){s=!0,l();const f=c instanceof Error?c:this.reason;n.abort(f instanceof E?f:new Ce(f instanceof Error?f.message:f))}};let i=t&&setTimeout(()=>{i=null,o(new E(`timeout ${t} of ms exceeded`,E.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(o):c.removeEventListener("abort",o)}),e=null)};e.forEach(c=>c.addEventListener("abort",o));const{signal:d}=n;return d.unsubscribe=()=>u.asap(l),d}},Ta=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,s;for(;n<r;)s=n+t,yield e.slice(n,s),n=s},Ca=async function*(e,t){for await(const r of Ra(e))yield*Ta(r,t)},Ra=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Xr=(e,t,r,n)=>{const s=Ca(e,t);let o=0,i,l=d=>{i||(i=!0,n&&n(d))};return new ReadableStream({async pull(d){try{const{done:c,value:f}=await s.next();if(c){l(),d.close();return}let h=f.byteLength;if(r){let b=o+=h;r(b)}d.enqueue(new Uint8Array(f))}catch(c){throw l(c),c}},cancel(d){return l(d),s.return()}},{highWaterMark:2})},lt=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",en=lt&&typeof ReadableStream=="function",Va=lt&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),tn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Pa=en&&tn(()=>{let e=!1;const t=new Request(L.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),rn=64*1024,Ht=en&&tn(()=>u.isReadableStream(new Response("").body)),ct={stream:Ht&&(e=>e.body)};lt&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ct[t]&&(ct[t]=u.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new E(`Response type '${t}' is not supported`,E.ERR_NOT_SUPPORT,n)})})})(new Response);const Ya=async e=>{if(e==null)return 0;if(u.isBlob(e))return e.size;if(u.isSpecCompliantForm(e))return(await new Request(L.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(u.isArrayBufferView(e)||u.isArrayBuffer(e))return e.byteLength;if(u.isURLSearchParams(e)&&(e=e+""),u.isString(e))return(await Va(e)).byteLength},Aa=async(e,t)=>{const r=u.toFiniteNumber(e.getContentLength());return r??Ya(t)},zt={http:ra,xhr:Oa,fetch:lt&&(async e=>{let{url:t,method:r,data:n,signal:s,cancelToken:o,timeout:i,onDownloadProgress:l,onUploadProgress:d,responseType:c,headers:f,withCredentials:h="same-origin",fetchOptions:b}=Qr(e);c=c?(c+"").toLowerCase():"text";let S=Ma([s,o&&o.toAbortSignal()],i),_;const k=S&&S.unsubscribe&&(()=>{S.unsubscribe()});let y;try{if(d&&Pa&&r!=="get"&&r!=="head"&&(y=await Aa(f,n))!==0){let B=new Request(t,{method:"POST",body:n,duplex:"half"}),ne;if(u.isFormData(n)&&(ne=B.headers.get("content-type"))&&f.setContentType(ne),B.body){const[W,Ft]=Gr(y,it(Zr(d)));n=Xr(B.body,rn,W,Ft)}}u.isString(h)||(h=h?"include":"omit");const p="credentials"in Request.prototype;_=new Request(t,{...b,signal:S,method:r.toUpperCase(),headers:f.normalize().toJSON(),body:n,duplex:"half",credentials:p?h:void 0});let V=await fetch(_);const g=Ht&&(c==="stream"||c==="response");if(Ht&&(l||g&&k)){const B={};["status","statusText","headers"].forEach(ys=>{B[ys]=V[ys]});const ne=u.toFiniteNumber(V.headers.get("content-length")),[W,Ft]=l&&Gr(ne,it(Zr(l),!0))||[];V=new Response(Xr(V.body,rn,W,()=>{Ft&&Ft(),k&&k()}),B)}c=c||"text";let U=await ct[u.findKey(ct,c)||"text"](V,e);return!g&&k&&k(),await new Promise((B,ne)=>{qr(B,ne,{data:U,headers:H.from(V.headers),status:V.status,statusText:V.statusText,config:e,request:_})})}catch(p){throw k&&k(),p&&p.name==="TypeError"&&/fetch/i.test(p.message)?Object.assign(new E("Network Error",E.ERR_NETWORK,e,_),{cause:p.cause||p}):E.from(p,p&&p.code,e,_)}})};u.forEach(zt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const nn=e=>`- ${e}`,Fa=e=>u.isFunction(e)||e===null||e===!1,sn={getAdapter:e=>{e=u.isArray(e)?e:[e];const{length:t}=e;let r,n;const s={};for(let o=0;o<t;o++){r=e[o];let i;if(n=r,!Fa(r)&&(n=zt[(i=String(r)).toLowerCase()],n===void 0))throw new E(`Unknown adapter '${i}'`);if(n)break;s[i||"#"+o]=n}if(!n){const o=Object.entries(s).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let i=t?o.length>1?`since :
|
|
4
|
-
`+
|
|
5
|
-
`):" "+
|
|
6
|
-
`+
|
|
7
|
-
* vue-router v4.5.
|
|
8
|
-
* (c)
|
|
1
|
+
(function(o,Ce){typeof exports=="object"&&typeof module<"u"?module.exports=Ce(require("vue")):typeof define=="function"&&define.amd?define(["vue"],Ce):(o=typeof globalThis<"u"?globalThis:o||self,o.cms=Ce(o.Vue))})(this,function(o){"use strict";function Ce(e,t){return function(){return e.apply(t,arguments)}}const{toString:Es}=Object.prototype,{getPrototypeOf:Ft}=Object,{iterator:st,toStringTag:Tr}=Symbol,ot=(e=>t=>{const r=Es.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),X=e=>(e=e.toLowerCase(),t=>ot(t)===e),at=e=>t=>typeof t===e,{isArray:Me}=Array,Ie=at("undefined");function Ds(e){return e!==null&&!Ie(e)&&e.constructor!==null&&!Ie(e.constructor)&&z(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Vr=X("ArrayBuffer");function Ns(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Vr(e.buffer),t}const Os=at("string"),z=at("function"),Rr=at("number"),it=e=>e!==null&&typeof e=="object",Cs=e=>e===!0||e===!1,lt=e=>{if(ot(e)!=="object")return!1;const t=Ft(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Tr in e)&&!(st in e)},Ms=X("Date"),Ts=X("File"),Vs=X("Blob"),Rs=X("FileList"),Bs=e=>it(e)&&z(e.pipe),Ps=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||z(e.append)&&((t=ot(e))==="formdata"||t==="object"&&z(e.toString)&&e.toString()==="[object FormData]"))},$s=X("URLSearchParams"),[Ys,As,Fs,vs]=["ReadableStream","Request","Response","Headers"].map(X),Ls=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function je(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,s;if(typeof e!="object"&&(e=[e]),Me(e))for(n=0,s=e.length;n<s;n++)t.call(null,e[n],n,e);else{const a=r?Object.getOwnPropertyNames(e):Object.keys(e),i=a.length;let l;for(n=0;n<i;n++)l=a[n],t.call(null,e[l],l,e)}}function Br(e,t){t=t.toLowerCase();const r=Object.keys(e);let n=r.length,s;for(;n-- >0;)if(s=r[n],t===s.toLowerCase())return s;return null}const ke=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Pr=e=>!Ie(e)&&e!==ke;function vt(){const{caseless:e}=Pr(this)&&this||{},t={},r=(n,s)=>{const a=e&&Br(t,s)||s;lt(t[a])&<(n)?t[a]=vt(t[a],n):lt(n)?t[a]=vt({},n):Me(n)?t[a]=n.slice():t[a]=n};for(let n=0,s=arguments.length;n<s;n++)arguments[n]&&je(arguments[n],r);return t}const Us=(e,t,r,{allOwnKeys:n}={})=>(je(t,(s,a)=>{r&&z(s)?e[a]=Ce(s,r):e[a]=s},{allOwnKeys:n}),e),Is=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),js=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Ws=(e,t,r,n)=>{let s,a,i;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)i=s[a],(!n||n(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=r!==!1&&Ft(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Hs=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},zs=e=>{if(!e)return null;if(Me(e))return e;let t=e.length;if(!Rr(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},qs=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ft(Uint8Array)),Gs=(e,t)=>{const n=(e&&e[st]).call(e);let s;for(;(s=n.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},Zs=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},Js=X("HTMLFormElement"),Ks=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,s){return n.toUpperCase()+s}),$r=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Qs=X("RegExp"),Yr=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};je(r,(s,a)=>{let i;(i=t(s,a,e))!==!1&&(n[a]=i||s)}),Object.defineProperties(e,n)},Xs=e=>{Yr(e,(t,r)=>{if(z(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(z(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},eo=(e,t)=>{const r={},n=s=>{s.forEach(a=>{r[a]=!0})};return Me(e)?n(e):n(String(e).split(t)),r},to=()=>{},ro=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function no(e){return!!(e&&z(e.append)&&e[Tr]==="FormData"&&e[st])}const so=e=>{const t=new Array(10),r=(n,s)=>{if(it(n)){if(t.indexOf(n)>=0)return;if(!("toJSON"in n)){t[s]=n;const a=Me(n)?[]:{};return je(n,(i,l)=>{const d=r(i,s+1);!Ie(d)&&(a[l]=d)}),t[s]=void 0,a}}return n};return r(e,0)},oo=X("AsyncFunction"),ao=e=>e&&(it(e)||z(e))&&z(e.then)&&z(e.catch),Ar=((e,t)=>e?setImmediate:t?((r,n)=>(ke.addEventListener("message",({source:s,data:a})=>{s===ke&&a===r&&n.length&&n.shift()()},!1),s=>{n.push(s),ke.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",z(ke.postMessage)),io=typeof queueMicrotask<"u"?queueMicrotask.bind(ke):typeof process<"u"&&process.nextTick||Ar,h={isArray:Me,isArrayBuffer:Vr,isBuffer:Ds,isFormData:Ps,isArrayBufferView:Ns,isString:Os,isNumber:Rr,isBoolean:Cs,isObject:it,isPlainObject:lt,isReadableStream:Ys,isRequest:As,isResponse:Fs,isHeaders:vs,isUndefined:Ie,isDate:Ms,isFile:Ts,isBlob:Vs,isRegExp:Qs,isFunction:z,isStream:Bs,isURLSearchParams:$s,isTypedArray:qs,isFileList:Rs,forEach:je,merge:vt,extend:Us,trim:Ls,stripBOM:Is,inherits:js,toFlatObject:Ws,kindOf:ot,kindOfTest:X,endsWith:Hs,toArray:zs,forEachEntry:Gs,matchAll:Zs,isHTMLForm:Js,hasOwnProperty:$r,hasOwnProp:$r,reduceDescriptors:Yr,freezeMethods:Xs,toObjectSet:eo,toCamelCase:Ks,noop:to,toFiniteNumber:ro,findKey:Br,global:ke,isContextDefined:Pr,isSpecCompliantForm:no,toJSONObject:so,isAsyncFn:oo,isThenable:ao,setImmediate:Ar,asap:io,isIterable:e=>e!=null&&z(e[st])};function N(e,t,r,n,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),s&&(this.response=s,this.status=s.status?s.status:null)}h.inherits(N,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:h.toJSONObject(this.config),code:this.code,status:this.status}}});const Fr=N.prototype,vr={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{vr[e]={value:e}}),Object.defineProperties(N,vr),Object.defineProperty(Fr,"isAxiosError",{value:!0}),N.from=(e,t,r,n,s,a)=>{const i=Object.create(Fr);return h.toFlatObject(e,i,function(d){return d!==Error.prototype},l=>l!=="isAxiosError"),N.call(i,e.message,t,r,n,s),i.cause=e,i.name=e.name,a&&Object.assign(i,a),i};const lo=null;function Lt(e){return h.isPlainObject(e)||h.isArray(e)}function Lr(e){return h.endsWith(e,"[]")?e.slice(0,-2):e}function Ur(e,t,r){return e?e.concat(t).map(function(s,a){return s=Lr(s),!r&&a?"["+s+"]":s}).join(r?".":""):t}function co(e){return h.isArray(e)&&!e.some(Lt)}const uo=h.toFlatObject(h,{},null,function(t){return/^is[A-Z]/.test(t)});function ct(e,t,r){if(!h.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=h.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(_,f){return!h.isUndefined(f[_])});const n=r.metaTokens,s=r.visitor||u,a=r.dots,i=r.indexes,d=(r.Blob||typeof Blob<"u"&&Blob)&&h.isSpecCompliantForm(t);if(!h.isFunction(s))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(h.isDate(g))return g.toISOString();if(!d&&h.isBlob(g))throw new N("Blob is not supported. Use a Buffer instead.");return h.isArrayBuffer(g)||h.isTypedArray(g)?d&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function u(g,_,f){let p=g;if(g&&!f&&typeof g=="object"){if(h.endsWith(_,"{}"))_=n?_:_.slice(0,-2),g=JSON.stringify(g);else if(h.isArray(g)&&co(g)||(h.isFileList(g)||h.endsWith(_,"[]"))&&(p=h.toArray(g)))return _=Lr(_),p.forEach(function(y,P){!(h.isUndefined(y)||y===null)&&t.append(i===!0?Ur([_],P,a):i===null?_:_+"[]",c(y))}),!1}return Lt(g)?!0:(t.append(Ur(f,_,a),c(g)),!1)}const m=[],w=Object.assign(uo,{defaultVisitor:u,convertValue:c,isVisitable:Lt});function k(g,_){if(!h.isUndefined(g)){if(m.indexOf(g)!==-1)throw Error("Circular reference detected in "+_.join("."));m.push(g),h.forEach(g,function(p,b){(!(h.isUndefined(p)||p===null)&&s.call(t,p,h.isString(b)?b.trim():b,_,w))===!0&&k(p,_?_.concat(b):[b])}),m.pop()}}if(!h.isObject(e))throw new TypeError("data must be an object");return k(e),t}function Ir(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function Ut(e,t){this._pairs=[],e&&ct(e,this,t)}const jr=Ut.prototype;jr.append=function(t,r){this._pairs.push([t,r])},jr.toString=function(t){const r=t?function(n){return t.call(this,n,Ir)}:Ir;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function fo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Wr(e,t,r){if(!t)return e;const n=r&&r.encode||fo;h.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let a;if(s?a=s(t,r):a=h.isURLSearchParams(t)?t.toString():new Ut(t,r).toString(n),a){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Hr{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){h.forEach(this.handlers,function(n){n!==null&&t(n)})}}const zr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ho={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ut,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},It=typeof window<"u"&&typeof document<"u",jt=typeof navigator=="object"&&navigator||void 0,mo=It&&(!jt||["ReactNative","NativeScript","NS"].indexOf(jt.product)<0),po=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",yo=It&&window.location.href||"http://localhost",j={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:It,hasStandardBrowserEnv:mo,hasStandardBrowserWebWorkerEnv:po,navigator:jt,origin:yo},Symbol.toStringTag,{value:"Module"})),...ho};function _o(e,t){return ct(e,new j.classes.URLSearchParams,Object.assign({visitor:function(r,n,s,a){return j.isNode&&h.isBuffer(r)?(this.append(n,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function go(e){return h.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function wo(e){const t={},r=Object.keys(e);let n;const s=r.length;let a;for(n=0;n<s;n++)a=r[n],t[a]=e[a];return t}function qr(e){function t(r,n,s,a){let i=r[a++];if(i==="__proto__")return!0;const l=Number.isFinite(+i),d=a>=r.length;return i=!i&&h.isArray(s)?s.length:i,d?(h.hasOwnProp(s,i)?s[i]=[s[i],n]:s[i]=n,!l):((!s[i]||!h.isObject(s[i]))&&(s[i]=[]),t(r,n,s[i],a)&&h.isArray(s[i])&&(s[i]=wo(s[i])),!l)}if(h.isFormData(e)&&h.isFunction(e.entries)){const r={};return h.forEachEntry(e,(n,s)=>{t(go(n),s,r,0)}),r}return null}function xo(e,t,r){if(h.isString(e))try{return(t||JSON.parse)(e),h.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const We={transitional:zr,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",s=n.indexOf("application/json")>-1,a=h.isObject(t);if(a&&h.isHTMLForm(t)&&(t=new FormData(t)),h.isFormData(t))return s?JSON.stringify(qr(t)):t;if(h.isArrayBuffer(t)||h.isBuffer(t)||h.isStream(t)||h.isFile(t)||h.isBlob(t)||h.isReadableStream(t))return t;if(h.isArrayBufferView(t))return t.buffer;if(h.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return _o(t,this.formSerializer).toString();if((l=h.isFileList(t))||n.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return ct(l?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||s?(r.setContentType("application/json",!1),xo(t)):t}],transformResponse:[function(t){const r=this.transitional||We.transitional,n=r&&r.forcedJSONParsing,s=this.responseType==="json";if(h.isResponse(t)||h.isReadableStream(t))return t;if(t&&h.isString(t)&&(n&&!this.responseType||s)){const i=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(l){if(i)throw l.name==="SyntaxError"?N.from(l,N.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:j.classes.FormData,Blob:j.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};h.forEach(["delete","get","head","post","put","patch"],e=>{We.headers[e]={}});const ko=h.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),bo=e=>{const t={};let r,n,s;return e&&e.split(`
|
|
2
|
+
`).forEach(function(i){s=i.indexOf(":"),r=i.substring(0,s).trim().toLowerCase(),n=i.substring(s+1).trim(),!(!r||t[r]&&ko[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},Gr=Symbol("internals");function He(e){return e&&String(e).trim().toLowerCase()}function dt(e){return e===!1||e==null?e:h.isArray(e)?e.map(dt):String(e)}function So(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const Eo=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Wt(e,t,r,n,s){if(h.isFunction(n))return n.call(this,t,r);if(s&&(t=r),!!h.isString(t)){if(h.isString(n))return t.indexOf(n)!==-1;if(h.isRegExp(n))return n.test(t)}}function Do(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function No(e,t){const r=h.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(s,a,i){return this[n].call(this,t,s,a,i)},configurable:!0})})}let q=class{constructor(t){t&&this.set(t)}set(t,r,n){const s=this;function a(l,d,c){const u=He(d);if(!u)throw new Error("header name must be a non-empty string");const m=h.findKey(s,u);(!m||s[m]===void 0||c===!0||c===void 0&&s[m]!==!1)&&(s[m||d]=dt(l))}const i=(l,d)=>h.forEach(l,(c,u)=>a(c,u,d));if(h.isPlainObject(t)||t instanceof this.constructor)i(t,r);else if(h.isString(t)&&(t=t.trim())&&!Eo(t))i(bo(t),r);else if(h.isObject(t)&&h.isIterable(t)){let l={},d,c;for(const u of t){if(!h.isArray(u))throw TypeError("Object iterator must return a key-value pair");l[c=u[0]]=(d=l[c])?h.isArray(d)?[...d,u[1]]:[d,u[1]]:u[1]}i(l,r)}else t!=null&&a(r,t,n);return this}get(t,r){if(t=He(t),t){const n=h.findKey(this,t);if(n){const s=this[n];if(!r)return s;if(r===!0)return So(s);if(h.isFunction(r))return r.call(this,s,n);if(h.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=He(t),t){const n=h.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||Wt(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let s=!1;function a(i){if(i=He(i),i){const l=h.findKey(n,i);l&&(!r||Wt(n,n[l],l,r))&&(delete n[l],s=!0)}}return h.isArray(t)?t.forEach(a):a(t),s}clear(t){const r=Object.keys(this);let n=r.length,s=!1;for(;n--;){const a=r[n];(!t||Wt(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const r=this,n={};return h.forEach(this,(s,a)=>{const i=h.findKey(n,a);if(i){r[i]=dt(s),delete r[a];return}const l=t?Do(a):String(a).trim();l!==a&&delete r[a],r[l]=dt(s),n[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return h.forEach(this,(n,s)=>{n!=null&&n!==!1&&(r[s]=t&&h.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
3
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(s=>n.set(s)),n}static accessor(t){const n=(this[Gr]=this[Gr]={accessors:{}}).accessors,s=this.prototype;function a(i){const l=He(i);n[l]||(No(s,i),n[l]=!0)}return h.isArray(t)?t.forEach(a):a(t),this}};q.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),h.reduceDescriptors(q.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),h.freezeMethods(q);function Ht(e,t){const r=this||We,n=t||r,s=q.from(n.headers);let a=n.data;return h.forEach(e,function(l){a=l.call(r,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Zr(e){return!!(e&&e.__CANCEL__)}function Te(e,t,r){N.call(this,e??"canceled",N.ERR_CANCELED,t,r),this.name="CanceledError"}h.inherits(Te,N,{__CANCEL__:!0});function Jr(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new N("Request failed with status code "+r.status,[N.ERR_BAD_REQUEST,N.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Oo(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Co(e,t){e=e||10;const r=new Array(e),n=new Array(e);let s=0,a=0,i;return t=t!==void 0?t:1e3,function(d){const c=Date.now(),u=n[a];i||(i=c),r[s]=d,n[s]=c;let m=a,w=0;for(;m!==s;)w+=r[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),c-i<t)return;const k=u&&c-u;return k?Math.round(w*1e3/k):void 0}}function Mo(e,t){let r=0,n=1e3/t,s,a;const i=(c,u=Date.now())=>{r=u,s=null,a&&(clearTimeout(a),a=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),m=u-r;m>=n?i(c,u):(s=c,a||(a=setTimeout(()=>{a=null,i(s)},n-m)))},()=>s&&i(s)]}const ut=(e,t,r=3)=>{let n=0;const s=Co(50,250);return Mo(a=>{const i=a.loaded,l=a.lengthComputable?a.total:void 0,d=i-n,c=s(d),u=i<=l;n=i;const m={loaded:i,total:l,progress:l?i/l:void 0,bytes:d,rate:c||void 0,estimated:c&&l&&u?(l-i)/c:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},r)},Kr=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Qr=e=>(...t)=>h.asap(()=>e(...t)),To=j.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,j.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(j.origin),j.navigator&&/(msie|trident)/i.test(j.navigator.userAgent)):()=>!0,Vo=j.hasStandardBrowserEnv?{write(e,t,r,n,s,a){const i=[e+"="+encodeURIComponent(t)];h.isNumber(r)&&i.push("expires="+new Date(r).toGMTString()),h.isString(n)&&i.push("path="+n),h.isString(s)&&i.push("domain="+s),a===!0&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Ro(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Bo(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Xr(e,t,r){let n=!Ro(t);return e&&(n||r==!1)?Bo(e,t):t}const en=e=>e instanceof q?{...e}:e;function be(e,t){t=t||{};const r={};function n(c,u,m,w){return h.isPlainObject(c)&&h.isPlainObject(u)?h.merge.call({caseless:w},c,u):h.isPlainObject(u)?h.merge({},u):h.isArray(u)?u.slice():u}function s(c,u,m,w){if(h.isUndefined(u)){if(!h.isUndefined(c))return n(void 0,c,m,w)}else return n(c,u,m,w)}function a(c,u){if(!h.isUndefined(u))return n(void 0,u)}function i(c,u){if(h.isUndefined(u)){if(!h.isUndefined(c))return n(void 0,c)}else return n(void 0,u)}function l(c,u,m){if(m in t)return n(c,u);if(m in e)return n(void 0,c)}const d={url:a,method:a,data:a,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(c,u,m)=>s(en(c),en(u),m,!0)};return h.forEach(Object.keys(Object.assign({},e,t)),function(u){const m=d[u]||s,w=m(e[u],t[u],u);h.isUndefined(w)&&m!==l||(r[u]=w)}),r}const tn=e=>{const t=be({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:s,xsrfCookieName:a,headers:i,auth:l}=t;t.headers=i=q.from(i),t.url=Wr(Xr(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&i.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let d;if(h.isFormData(r)){if(j.hasStandardBrowserEnv||j.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if((d=i.getContentType())!==!1){const[c,...u]=d?d.split(";").map(m=>m.trim()).filter(Boolean):[];i.setContentType([c||"multipart/form-data",...u].join("; "))}}if(j.hasStandardBrowserEnv&&(n&&h.isFunction(n)&&(n=n(t)),n||n!==!1&&To(t.url))){const c=s&&a&&Vo.read(a);c&&i.set(s,c)}return t},Po=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const s=tn(e);let a=s.data;const i=q.from(s.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:c}=s,u,m,w,k,g;function _(){k&&k(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let f=new XMLHttpRequest;f.open(s.method.toUpperCase(),s.url,!0),f.timeout=s.timeout;function p(){if(!f)return;const y=q.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),$={data:!l||l==="text"||l==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:y,config:e,request:f};Jr(function(U){r(U),_()},function(U){n(U),_()},$),f=null}"onloadend"in f?f.onloadend=p:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(p)},f.onabort=function(){f&&(n(new N("Request aborted",N.ECONNABORTED,e,f)),f=null)},f.onerror=function(){n(new N("Network Error",N.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let P=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const $=s.transitional||zr;s.timeoutErrorMessage&&(P=s.timeoutErrorMessage),n(new N(P,$.clarifyTimeoutError?N.ETIMEDOUT:N.ECONNABORTED,e,f)),f=null},a===void 0&&i.setContentType(null),"setRequestHeader"in f&&h.forEach(i.toJSON(),function(P,$){f.setRequestHeader($,P)}),h.isUndefined(s.withCredentials)||(f.withCredentials=!!s.withCredentials),l&&l!=="json"&&(f.responseType=s.responseType),c&&([w,g]=ut(c,!0),f.addEventListener("progress",w)),d&&f.upload&&([m,k]=ut(d),f.upload.addEventListener("progress",m),f.upload.addEventListener("loadend",k)),(s.cancelToken||s.signal)&&(u=y=>{f&&(n(!y||y.type?new Te(null,e,f):y),f.abort(),f=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const b=Oo(s.url);if(b&&j.protocols.indexOf(b)===-1){n(new N("Unsupported protocol "+b+":",N.ERR_BAD_REQUEST,e));return}f.send(a||null)})},$o=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,s;const a=function(c){if(!s){s=!0,l();const u=c instanceof Error?c:this.reason;n.abort(u instanceof N?u:new Te(u instanceof Error?u.message:u))}};let i=t&&setTimeout(()=>{i=null,a(new N(`timeout ${t} of ms exceeded`,N.ETIMEDOUT))},t);const l=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(a):c.removeEventListener("abort",a)}),e=null)};e.forEach(c=>c.addEventListener("abort",a));const{signal:d}=n;return d.unsubscribe=()=>h.asap(l),d}},Yo=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,s;for(;n<r;)s=n+t,yield e.slice(n,s),n=s},Ao=async function*(e,t){for await(const r of Fo(e))yield*Yo(r,t)},Fo=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},rn=(e,t,r,n)=>{const s=Ao(e,t);let a=0,i,l=d=>{i||(i=!0,n&&n(d))};return new ReadableStream({async pull(d){try{const{done:c,value:u}=await s.next();if(c){l(),d.close();return}let m=u.byteLength;if(r){let w=a+=m;r(w)}d.enqueue(new Uint8Array(u))}catch(c){throw l(c),c}},cancel(d){return l(d),s.return()}},{highWaterMark:2})},ft=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",nn=ft&&typeof ReadableStream=="function",vo=ft&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),sn=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Lo=nn&&sn(()=>{let e=!1;const t=new Request(j.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),on=64*1024,zt=nn&&sn(()=>h.isReadableStream(new Response("").body)),ht={stream:zt&&(e=>e.body)};ft&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ht[t]&&(ht[t]=h.isFunction(e[t])?r=>r[t]():(r,n)=>{throw new N(`Response type '${t}' is not supported`,N.ERR_NOT_SUPPORT,n)})})})(new Response);const Uo=async e=>{if(e==null)return 0;if(h.isBlob(e))return e.size;if(h.isSpecCompliantForm(e))return(await new Request(j.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(h.isArrayBufferView(e)||h.isArrayBuffer(e))return e.byteLength;if(h.isURLSearchParams(e)&&(e=e+""),h.isString(e))return(await vo(e)).byteLength},Io=async(e,t)=>{const r=h.toFiniteNumber(e.getContentLength());return r??Uo(t)},qt={http:lo,xhr:Po,fetch:ft&&(async e=>{let{url:t,method:r,data:n,signal:s,cancelToken:a,timeout:i,onDownloadProgress:l,onUploadProgress:d,responseType:c,headers:u,withCredentials:m="same-origin",fetchOptions:w}=tn(e);c=c?(c+"").toLowerCase():"text";let k=$o([s,a&&a.toAbortSignal()],i),g;const _=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let f;try{if(d&&Lo&&r!=="get"&&r!=="head"&&(f=await Io(u,n))!==0){let $=new Request(t,{method:"POST",body:n,duplex:"half"}),H;if(h.isFormData(n)&&(H=$.headers.get("content-type"))&&u.setContentType(H),$.body){const[U,Le]=Kr(f,ut(Qr(d)));n=rn($.body,on,U,Le)}}h.isString(m)||(m=m?"include":"omit");const p="credentials"in Request.prototype;g=new Request(t,{...w,signal:k,method:r.toUpperCase(),headers:u.normalize().toJSON(),body:n,duplex:"half",credentials:p?m:void 0});let b=await fetch(g);const y=zt&&(c==="stream"||c==="response");if(zt&&(l||y&&_)){const $={};["status","statusText","headers"].forEach(Ue=>{$[Ue]=b[Ue]});const H=h.toFiniteNumber(b.headers.get("content-length")),[U,Le]=l&&Kr(H,ut(Qr(l),!0))||[];b=new Response(rn(b.body,on,U,()=>{Le&&Le(),_&&_()}),$)}c=c||"text";let P=await ht[h.findKey(ht,c)||"text"](b,e);return!y&&_&&_(),await new Promise(($,H)=>{Jr($,H,{data:P,headers:q.from(b.headers),status:b.status,statusText:b.statusText,config:e,request:g})})}catch(p){throw _&&_(),p&&p.name==="TypeError"&&/Load failed|fetch/i.test(p.message)?Object.assign(new N("Network Error",N.ERR_NETWORK,e,g),{cause:p.cause||p}):N.from(p,p&&p.code,e,g)}})};h.forEach(qt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const an=e=>`- ${e}`,jo=e=>h.isFunction(e)||e===null||e===!1,ln={getAdapter:e=>{e=h.isArray(e)?e:[e];const{length:t}=e;let r,n;const s={};for(let a=0;a<t;a++){r=e[a];let i;if(n=r,!jo(r)&&(n=qt[(i=String(r)).toLowerCase()],n===void 0))throw new N(`Unknown adapter '${i}'`);if(n)break;s[i||"#"+a]=n}if(!n){const a=Object.entries(s).map(([l,d])=>`adapter ${l} `+(d===!1?"is not supported by the environment":"is not available in the build"));let i=t?a.length>1?`since :
|
|
4
|
+
`+a.map(an).join(`
|
|
5
|
+
`):" "+an(a[0]):"as no adapter specified";throw new N("There is no suitable adapter to dispatch the request "+i,"ERR_NOT_SUPPORT")}return n},adapters:qt};function Gt(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Te(null,e)}function cn(e){return Gt(e),e.headers=q.from(e.headers),e.data=Ht.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ln.getAdapter(e.adapter||We.adapter)(e).then(function(n){return Gt(e),n.data=Ht.call(e,e.transformResponse,n),n.headers=q.from(n.headers),n},function(n){return Zr(n)||(Gt(e),n&&n.response&&(n.response.data=Ht.call(e,e.transformResponse,n.response),n.response.headers=q.from(n.response.headers))),Promise.reject(n)})}const dn="1.9.0",mt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{mt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const un={};mt.transitional=function(t,r,n){function s(a,i){return"[Axios v"+dn+"] Transitional option '"+a+"'"+i+(n?". "+n:"")}return(a,i,l)=>{if(t===!1)throw new N(s(i," has been removed"+(r?" in "+r:"")),N.ERR_DEPRECATED);return r&&!un[i]&&(un[i]=!0,console.warn(s(i," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,i,l):!0}},mt.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Wo(e,t,r){if(typeof e!="object")throw new N("options must be an object",N.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let s=n.length;for(;s-- >0;){const a=n[s],i=t[a];if(i){const l=e[a],d=l===void 0||i(l,a,e);if(d!==!0)throw new N("option "+a+" must be "+d,N.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new N("Unknown option "+a,N.ERR_BAD_OPTION)}}const pt={assertOptions:Wo,validators:mt},se=pt.validators;let Se=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Hr,response:new Hr}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=s.stack?s.stack.replace(/^.+\n/,""):"";try{n.stack?a&&!String(n.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(n.stack+=`
|
|
6
|
+
`+a):n.stack=a}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=be(this.defaults,r);const{transitional:n,paramsSerializer:s,headers:a}=r;n!==void 0&&pt.assertOptions(n,{silentJSONParsing:se.transitional(se.boolean),forcedJSONParsing:se.transitional(se.boolean),clarifyTimeoutError:se.transitional(se.boolean)},!1),s!=null&&(h.isFunction(s)?r.paramsSerializer={serialize:s}:pt.assertOptions(s,{encode:se.function,serialize:se.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),pt.assertOptions(r,{baseUrl:se.spelling("baseURL"),withXsrfToken:se.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let i=a&&h.merge(a.common,a[r.method]);a&&h.forEach(["delete","get","head","post","put","patch","common"],g=>{delete a[g]}),r.headers=q.concat(i,a);const l=[];let d=!0;this.interceptors.request.forEach(function(_){typeof _.runWhen=="function"&&_.runWhen(r)===!1||(d=d&&_.synchronous,l.unshift(_.fulfilled,_.rejected))});const c=[];this.interceptors.response.forEach(function(_){c.push(_.fulfilled,_.rejected)});let u,m=0,w;if(!d){const g=[cn.bind(this),void 0];for(g.unshift.apply(g,l),g.push.apply(g,c),w=g.length,u=Promise.resolve(r);m<w;)u=u.then(g[m++],g[m++]);return u}w=l.length;let k=r;for(m=0;m<w;){const g=l[m++],_=l[m++];try{k=g(k)}catch(f){_.call(this,f);break}}try{u=cn.call(this,k)}catch(g){return Promise.reject(g)}for(m=0,w=c.length;m<w;)u=u.then(c[m++],c[m++]);return u}getUri(t){t=be(this.defaults,t);const r=Xr(t.baseURL,t.url,t.allowAbsoluteUrls);return Wr(r,t.params,t.paramsSerializer)}};h.forEach(["delete","get","head","options"],function(t){Se.prototype[t]=function(r,n){return this.request(be(n||{},{method:t,url:r,data:(n||{}).data}))}}),h.forEach(["post","put","patch"],function(t){function r(n){return function(a,i,l){return this.request(be(l||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:a,data:i}))}}Se.prototype[t]=r(),Se.prototype[t+"Form"]=r(!0)});let Ho=class Ss{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const n=this;this.promise.then(s=>{if(!n._listeners)return;let a=n._listeners.length;for(;a-- >0;)n._listeners[a](s);n._listeners=null}),this.promise.then=s=>{let a;const i=new Promise(l=>{n.subscribe(l),a=l}).then(s);return i.cancel=function(){n.unsubscribe(a)},i},t(function(a,i,l){n.reason||(n.reason=new Te(a,i,l),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Ss(function(s){t=s}),cancel:t}}};function zo(e){return function(r){return e.apply(null,r)}}function qo(e){return h.isObject(e)&&e.isAxiosError===!0}const Zt={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Zt).forEach(([e,t])=>{Zt[t]=e});function fn(e){const t=new Se(e),r=Ce(Se.prototype.request,t);return h.extend(r,Se.prototype,t,{allOwnKeys:!0}),h.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return fn(be(e,s))},r}const C=fn(We);C.Axios=Se,C.CanceledError=Te,C.CancelToken=Ho,C.isCancel=Zr,C.VERSION=dn,C.toFormData=ct,C.AxiosError=N,C.Cancel=C.CanceledError,C.all=function(t){return Promise.all(t)},C.spread=zo,C.isAxiosError=qo,C.mergeConfig=be,C.AxiosHeaders=q,C.formToJSON=e=>qr(h.isHTMLForm(e)?new FormData(e):e),C.getAdapter=ln.getAdapter,C.HttpStatusCode=Zt,C.default=C;const{Axios:Vh,AxiosError:Rh,CanceledError:Bh,isCancel:Ph,CancelToken:$h,VERSION:Yh,all:Ah,Cancel:Fh,isAxiosError:vh,spread:Lh,toFormData:Uh,AxiosHeaders:Ih,HttpStatusCode:jh,formToJSON:Wh,getAdapter:Hh,mergeConfig:zh}=C;/*!
|
|
7
|
+
* vue-router v4.5.1
|
|
8
|
+
* (c) 2025 Eduardo San Martin Morote
|
|
9
9
|
* @license MIT
|
|
10
|
-
*/var dn;(function(e){e.pop="pop",e.push="push"})(dn||(dn={}));var un;(function(e){e.back="back",e.forward="forward",e.unknown=""})(un||(un={})),Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var fn;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(fn||(fn={})),Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),Symbol(process.env.NODE_ENV!=="production"?"router view depth":"");const La=Symbol(process.env.NODE_ENV!=="production"?"router":""),Ia=Symbol(process.env.NODE_ENV!=="production"?"route location":"");Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function Wa(){return a.inject(La)}function ft(e){return a.inject(Ia)}const j=(e,t)=>{const r=e.__vccOpts||e;for(const[n,s]of t)r[n]=s;return r},ja={},Ha={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-arrow-left"};function za(e,t){return a.openBlock(),a.createElementBlock("svg",Ha,t[0]||(t[0]=[a.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),a.createElementVNode("path",{d:"M5 12l14 0"},null,-1),a.createElementVNode("path",{d:"M5 12l6 6"},null,-1),a.createElementVNode("path",{d:"M5 12l6 -6"},null,-1)]))}const hn=j(ja,[["render",za]]),qa=[{key:"title",placeholder:"Назва колонки українською",ua:"Назва колонки українською",type:"text",slots:{row:'<div class="flex items-center gap-2"><img class="block" height="24" width="30" :src="`https://cdn.softpro.ua/data/npm/admin/column-types/icon-${row?.type?.toLowerCase()}.svg`"/> <span class="text-[12px]">{{ row?.title }}</span></div>'},validators:["required"]},{key:"type",type:"radio",ua:"Тип колонки",view:"buttons",style:{class:"!w-[calc(50%-5px)]"},slots:{label:'<div class="flex items-center justify-start w-full gap-4"><img class="block" height="24" width="30" :src="`https://cdn.softpro.ua/data/npm/admin/column-types/icon-${id?.toLowerCase()}.svg`"/><div class="flex flex-col items-start gap-1"><span class="text-black text-[14px]">{{text}}</span><span class="text-[12px]">{{description}}</span></div></div>'},options:[{id:"Text",text:"Текст",description:"Маленький або довгий текст, наприклад заголовок або опис"},{id:"Number",text:"Цифри",description:"Числа (цілі, з плаваючою точкою, десяткові)"},{id:"Email",text:"Електронна пошта",description:"Поле електронної пошти з фоматом перевірки"},{id:"Date",text:"Дата",description:"Вибір дати з годинами, хвилинами та секундами"},{id:"Switcher",text:"Так/Ні",description:"Так чи ні, 1 або 0, вірно чи хибно"},{id:"File",text:"Файл",description:"Різноманітні файли"},{id:"Select",text:"Селект",description:"Список значень, а потім виберіть одне"},{id:"Badge",text:"Бейдж",description:"Стилізоване значення з переліку"}],validators:["required"]},{key:"enabled",type:"Switcher",ua:"Увімкнено",col:6}],mn=[{key:"name",type:"Text",ua:"Назва",placeholder:"Назва",validators:["required"]},{key:"template",type:"Text",ua:"Шаблон",placeholder:"Шаблон",validators:["required"]},{key:"description",type:"Text",ua:"Опис",placeholder:"Опис"}],Ga={class:"w-full flex justify-center"},Za={class:"p-[20px] w-full max-w-[1440px]"},Ja={class:"flex items-center justify-between"},Ka={class:"mt-[10px]"},Qa={class:"flex items-end gap-1"},Xa={class:"font-medium text-2xl"},eo={class:"text-gray-600 font-medium text-2xl"},to={class:"text-gray-600"},ro={class:"flex items-center gap-1"},no={class:"w-full mt-[20px] bg-white rounded-xl"},so={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},ao={__name:"vs-builder-content",props:{UPDATE:Object},setup(e){var _;const t=ft(),r=(_=a.getCurrentInstance().proxy)==null?void 0:_.$notify,n=e,s=a.computed(()=>{var k;return(k=t==null?void 0:t.params)==null?void 0:k.id}),o=a.ref(null),i=a.ref([]),l=a.ref({}),d=a.ref(!1),c=a.ref(),f=async()=>{var k,y,p,V;try{const{data:g}=await O.get(`/api/cms-builder/${s.value}`);o.value=(k=g==null?void 0:g.rows)==null?void 0:k[0],l.value=(y=g==null?void 0:g.rows)==null?void 0:y[0],i.value=((V=(p=g==null?void 0:g.rows)==null?void 0:p[0])==null?void 0:V.columns)||[]}catch{}},h=async()=>{try{await O.put(`/api/cms-builder/${s.value}`,{...o.value,columns:i.value}),await r({type:"success",title:"Успішно!",message:"Дані оновлено успішно"}),await f()}catch(k){console.log(k),await r({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}},b=async()=>{try{await c.value.doValidation(),await O.put(`/api/cms-builder/${s.value}`,l.value),await r({type:"success",title:"Успішно!",message:"Дані оновлено успішно"}),await f(),d.value=!1,n.UPDATE.getList()}catch(k){console.log(k),await r({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}};a.watch(s,f),a.onMounted(()=>f());const S={key:"type",type:"Autocomplete",ua:"Тип",searchable:!1,options:[{id:"single",text:"Одиночний тип"},{id:"collection",text:"Колекція"}]};return(k,y)=>{var U,B,ne;const p=a.resolveComponent("VsDataTable"),V=a.resolveComponent("VsForm"),g=a.resolveComponent("VsDialog");return a.openBlock(),a.createElementBlock(a.Fragment,null,[a.createElementVNode("div",Ga,[a.createElementVNode("div",Za,[a.createElementVNode("button",{onClick:y[0]||(y[0]=W=>k.$router.back()),class:"text-blue-500 flex gap-2 items-center hover:text-blue-700 duration-300"},[a.createVNode(hn),y[6]||(y[6]=a.createTextVNode(" Повернутися назад "))]),a.createElementVNode("div",Ja,[a.createElementVNode("div",Ka,[a.createElementVNode("div",Qa,[a.createElementVNode("h2",Xa,a.toDisplayString((U=o.value)==null?void 0:U.name)+" -",1),a.createElementVNode("span",eo,a.toDisplayString((B=o.value)==null?void 0:B.template),1)]),a.createElementVNode("p",to,a.toDisplayString((ne=o.value)==null?void 0:ne.description),1)]),a.createElementVNode("div",ro,[a.createElementVNode("button",{onClick:y[1]||(y[1]=W=>d.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.createElementVNode("button",{onClick:h,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",no,[a.createVNode(p,{class:"w-full",colModel:a.unref(qa),modelValue:i.value,"onUpdate:modelValue":y[2]||(y[2]=W=>i.value=W),addition:!1,import:!1,additionBottom:!0},null,8,["colModel","modelValue"])])])])]),a.createVNode(g,{title:"Редагувати",visible:d.value,"onUpdate:visible":y[5]||(y[5]=W=>d.value=W)},{footer:a.withCtx(()=>[a.createElementVNode("div",so,[a.createElementVNode("button",{onClick:y[4]||(y[4]=W=>d.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:b,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(V,{modelValue:l.value,"onUpdate:modelValue":y[3]||(y[3]=W=>l.value=W),scheme:[...a.unref(mn),S],ref_key:"form",ref:c},null,8,["modelValue","scheme"])])]),_:1},8,["visible"])],64)}}};//! moment.js
|
|
10
|
+
*/var hn;(function(e){e.pop="pop",e.push="push"})(hn||(hn={}));var mn;(function(e){e.back="back",e.forward="forward",e.unknown=""})(mn||(mn={})),Symbol(process.env.NODE_ENV!=="production"?"navigation failure":"");var pn;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(pn||(pn={})),Symbol(process.env.NODE_ENV!=="production"?"router view location matched":""),Symbol(process.env.NODE_ENV!=="production"?"router view depth":"");const Go=Symbol(process.env.NODE_ENV!=="production"?"router":""),Zo=Symbol(process.env.NODE_ENV!=="production"?"route location":"");Symbol(process.env.NODE_ENV!=="production"?"router view location":"");function Jo(){return o.inject(Go)}function yt(e){return o.inject(Zo)}const I=(e,t)=>{const r=e.__vccOpts||e;for(const[n,s]of t)r[n]=s;return r},Ko={},Qo={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-arrow-left"};function Xo(e,t){return o.openBlock(),o.createElementBlock("svg",Qo,t[0]||(t[0]=[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),o.createElementVNode("path",{d:"M5 12l14 0"},null,-1),o.createElementVNode("path",{d:"M5 12l6 6"},null,-1),o.createElementVNode("path",{d:"M5 12l6 -6"},null,-1)]))}const yn=I(Ko,[["render",Xo]]),ea=[{key:"title",placeholder:"Назва колонки українською",ua:"Назва колонки українською",type:"text",slots:{row:'<div class="flex items-center gap-2"><img class="block" height="24" width="30" :src="`https://cdn.softpro.ua/data/npm/admin/column-types/icon-${row?.type?.toLowerCase()}.svg`"/> <span class="text-[12px]">{{ row?.title }}</span></div>'},validators:["required"]},{key:"type",type:"radio",ua:"Тип колонки",view:"buttons",style:{class:"!w-[calc(50%-5px)]"},slots:{label:'<div class="flex items-center justify-start w-full gap-4"><img class="block" height="24" width="30" :src="`https://cdn.softpro.ua/data/npm/admin/column-types/icon-${id?.toLowerCase()}.svg`"/><div class="flex flex-col items-start gap-1"><span class="text-black text-[14px]">{{text}}</span><span class="text-[12px]">{{description}}</span></div></div>'},options:[{id:"Text",text:"Текст",description:"Маленький або довгий текст, наприклад заголовок або опис"},{id:"Number",text:"Цифри",description:"Числа (цілі, з плаваючою точкою, десяткові)"},{id:"Email",text:"Електронна пошта",description:"Поле електронної пошти з фоматом перевірки"},{id:"Date",text:"Дата",description:"Вибір дати з годинами, хвилинами та секундами"},{id:"Switcher",text:"Так/Ні",description:"Так чи ні, 1 або 0, вірно чи хибно"},{id:"File",text:"Файл",description:"Різноманітні файли"},{id:"Select",text:"Селект",description:"Список значень, а потім виберіть одне"},{id:"Badge",text:"Бейдж",description:"Стилізоване значення з переліку"}],validators:["required"]},{key:"enabled",type:"Switcher",ua:"Увімкнено",col:6}],_n=[{key:"name",type:"Text",ua:"Назва",placeholder:"Назва",validators:["required"]},{key:"template",type:"Text",ua:"Шаблон",placeholder:"Шаблон",validators:["required"]},{key:"description",type:"Text",ua:"Опис",placeholder:"Опис"}],ta={class:"w-full flex justify-center"},ra={class:"p-[20px] w-full max-w-[1440px]"},na={class:"flex items-center justify-between"},sa={class:"mt-[10px]"},oa={class:"flex items-end gap-1"},aa={class:"font-medium text-2xl"},ia={class:"text-gray-600 font-medium text-2xl"},la={class:"text-gray-600"},ca={class:"flex items-center gap-1"},da={class:"w-full mt-[20px] bg-white rounded-xl"},ua={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},fa={__name:"vs-builder-content",props:{UPDATE:Object},setup(e){var g;const t=yt(),r=(g=o.getCurrentInstance().proxy)==null?void 0:g.$notify,n=e,s=o.computed(()=>{var _;return(_=t==null?void 0:t.params)==null?void 0:_.id}),a=o.ref(null),i=o.ref([]),l=o.ref({}),d=o.ref(!1),c=o.ref(),u=async()=>{var _,f,p,b;try{const{data:y}=await C.get(`/api/cms-builder/${s.value}`);a.value=(_=y==null?void 0:y.rows)==null?void 0:_[0],l.value=(f=y==null?void 0:y.rows)==null?void 0:f[0],i.value=((b=(p=y==null?void 0:y.rows)==null?void 0:p[0])==null?void 0:b.columns)||[]}catch{}},m=async()=>{try{await C.put(`/api/cms-builder/${s.value}`,{...a.value,columns:i.value}),await r({type:"success",title:"Успішно!",message:"Дані оновлено успішно"}),await u()}catch(_){console.log(_),await r({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}},w=async()=>{try{await c.value.doValidation(),await C.put(`/api/cms-builder/${s.value}`,l.value),await r({type:"success",title:"Успішно!",message:"Дані оновлено успішно"}),await u(),d.value=!1,n.UPDATE.getList()}catch(_){console.log(_),await r({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}};o.watch(s,u),o.onMounted(()=>u());const k={key:"type",type:"Autocomplete",ua:"Тип",searchable:!1,options:[{id:"single",text:"Одиночний тип"},{id:"collection",text:"Колекція"}]};return(_,f)=>{var P,$,H;const p=o.resolveComponent("VsDataTable"),b=o.resolveComponent("VsForm"),y=o.resolveComponent("VsDialog");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",ta,[o.createElementVNode("div",ra,[o.createElementVNode("button",{onClick:f[0]||(f[0]=U=>_.$router.back()),class:"text-blue-500 flex gap-2 items-center hover:text-blue-700 duration-300"},[o.createVNode(yn),f[6]||(f[6]=o.createTextVNode(" Повернутися назад "))]),o.createElementVNode("div",na,[o.createElementVNode("div",sa,[o.createElementVNode("div",oa,[o.createElementVNode("h2",aa,o.toDisplayString((P=a.value)==null?void 0:P.name)+" -",1),o.createElementVNode("span",ia,o.toDisplayString(($=a.value)==null?void 0:$.template),1)]),o.createElementVNode("p",la,o.toDisplayString((H=a.value)==null?void 0:H.description),1)]),o.createElementVNode("div",ca,[o.createElementVNode("button",{onClick:f[1]||(f[1]=U=>d.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"}," Редагувати "),o.createElementVNode("button",{onClick:m,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"}," Зберегти ")])]),o.createElementVNode("div",null,[o.createElementVNode("div",da,[o.createVNode(p,{class:"w-full",colModel:o.unref(ea),modelValue:i.value,"onUpdate:modelValue":f[2]||(f[2]=U=>i.value=U),addition:!1,import:!1,additionBottom:!0},null,8,["colModel","modelValue"])])])])]),o.createVNode(y,{title:"Редагувати",visible:d.value,"onUpdate:visible":f[5]||(f[5]=U=>d.value=U)},{footer:o.withCtx(()=>[o.createElementVNode("div",ua,[o.createElementVNode("button",{onClick:f[4]||(f[4]=U=>d.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"}," Скасувати"),o.createElementVNode("button",{onClick:w,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:o.withCtx(()=>[o.createElementVNode("div",null,[o.createVNode(b,{modelValue:l.value,"onUpdate:modelValue":f[3]||(f[3]=U=>l.value=U),scheme:[...o.unref(_n),k],ref_key:"form",ref:c},null,8,["modelValue","scheme"])])]),_:1},8,["visible"])],64)}}},ha={},ma={xmlns:"http://www.w3.org/2000/svg",width:"5",height:"5",fill:"currentColor",viewBox:"0 0 4 4"};function pa(e,t){return o.openBlock(),o.createElementBlock("svg",ma,t[0]||(t[0]=[o.createElementVNode("rect",{width:"4",height:"4",fill:"currentColor",rx:"2"},null,-1)]))}const Jt=I(ha,[["render",pa]]),ya={},_a={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 ga(e,t){return o.openBlock(),o.createElementBlock("svg",_a,t[0]||(t[0]=[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),o.createElementVNode("path",{d:"M12 5l0 14"},null,-1),o.createElementVNode("path",{d:"M5 12l14 0"},null,-1)]))}const gn=I(ya,[["render",ga]]),wa={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"},xa={class:"flex flex-col space-y-1"},ka={class:"pt-2"},ba={class:"flex flex-col space-y-1"},Sa={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},Ea={__name:"vs-builder-menu",props:{UPDATE:{},UPDATEModifiers:{}},emits:["update:UPDATE"],setup(e){var m;const t=(m=o.getCurrentInstance().proxy)==null?void 0:m.$notify,r=o.useModel(e,"UPDATE"),n=o.ref(null),s=o.ref(!1),a=o.ref({}),i=o.ref(""),l=o.ref(),d=async()=>{try{const{data:w}=await C.get("/api/cms-builder");n.value=(w==null?void 0:w.rows)||null}catch{}},c=w=>{w==="single"?(a.value={type:"single"},i.value="Створити новий тип"):(a.value={type:"collection"},i.value="Створити колекцію"),s.value=!0},u=async()=>{try{await l.value.doValidation(),await C.post("/api/cms-builder",a.value),await t({type:"success",title:"Успішно!",message:"Об'єкт створено успішно"}),s.value=!1,await d()}catch{await t({type:"error",title:"Помилка!",message:"При спробі створити об'єкт виникла помилка"})}};return d(),o.onMounted(()=>r.value.getList=()=>d()),(w,k)=>{var p,b;const g=o.resolveComponent("router-link"),_=o.resolveComponent("VsForm"),f=o.resolveComponent("VsDialog");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",wa,[o.createElementVNode("div",null,[k[6]||(k[6]=o.createElementVNode("h2",{v:"",class:"block text-[14px] font-medium text-gray-800 mb-2 dark:text-neutral-200"}," Колекції ",-1)),o.createElementVNode("ul",xa,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList((p=n.value)==null?void 0:p.filter(y=>(y==null?void 0:y.type)=="collection"),y=>{var P,$;return o.openBlock(),o.createElementBlock("li",{key:y==null?void 0:y.id},[o.createVNode(g,{to:`/builder/${y==null?void 0:y.id}`,class:o.normalizeClass([[(($=(P=w.$route)==null?void 0:P.params)==null?void 0:$.id)===(y==null?void 0:y.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:o.withCtx(()=>[o.createVNode(Jt,{class:"text-gray-500"}),o.createTextVNode(" "+o.toDisplayString(y==null?void 0:y.name),1)]),_:2},1032,["to","class"])])}),128))]),o.createElementVNode("button",{onClick:k[0]||(k[0]=y=>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"},[o.createVNode(gn,{height:"16",width:"16"}),k[5]||(k[5]=o.createTextVNode(" Створити нову колекцію "))])]),o.createElementVNode("div",ka,[k[8]||(k[8]=o.createElementVNode("h2",{class:"block text-[14px] mb-2 font-medium text-gray-800 dark:text-neutral-200"}," Одиничні типи ",-1)),o.createElementVNode("ul",ba,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList((b=n.value)==null?void 0:b.filter(y=>(y==null?void 0:y.type)=="single"),y=>{var P,$;return o.openBlock(),o.createElementBlock("li",{key:y==null?void 0:y.id},[o.createVNode(g,{to:`/builder/${y==null?void 0:y.id}`,class:o.normalizeClass([[(($=(P=w.$route)==null?void 0:P.params)==null?void 0:$.id)===(y==null?void 0:y.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:o.withCtx(()=>[o.createVNode(Jt,{class:"text-gray-500"}),o.createTextVNode(" "+o.toDisplayString(y==null?void 0:y.name),1)]),_:2},1032,["to","class"])])}),128))]),o.createElementVNode("button",{onClick:k[1]||(k[1]=y=>c("single")),class:"text-blue-500 flex text-[14px] py-2 px-2 hover:text-blue-700 duration-300 gap-2 items-center"},[o.createVNode(gn,{height:"16",width:"16"}),k[7]||(k[7]=o.createTextVNode(" Створити новий тип "))])])]),o.createVNode(f,{visible:s.value,"onUpdate:visible":k[4]||(k[4]=y=>s.value=y),title:i.value},{footer:o.withCtx(()=>[o.createElementVNode("div",Sa,[o.createElementVNode("button",{onClick:k[3]||(k[3]=y=>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"}," Скасувати"),o.createElementVNode("button",{onClick:u,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:o.withCtx(()=>[o.createElementVNode("div",null,[o.createVNode(_,{modelValue:a.value,"onUpdate:modelValue":k[2]||(k[2]=y=>a.value=y),scheme:o.unref(_n),ref_key:"form",ref:l},null,8,["modelValue","scheme"])])]),_:1},8,["visible","title"])],64)}}},Da={props:{title:{type:String,default:()=>"Дані для відображення відсутні"},text:{type:String,default:()=>"Змініть параметри пошуку або спробуйте пізніше"}}},Na={class:"w-full"},Oa={class:"p-5 min-h-[500px] flex flex-col justify-center items-center text-center"},Ca={class:"max-w-sm mx-auto mt-6"},Ma={class:"font-medium text-gray-800 dark:text-neutral-200"},Ta={class:"mt-2 text-sm text-gray-500 dark:text-neutral-500"};function Va(e,t,r,n,s,a){return o.openBlock(),o.createElementBlock("div",Na,[o.createElementVNode("div",Oa,[t[0]||(t[0]=o.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)),o.createElementVNode("div",Ca,[o.createElementVNode("p",Ma,o.toDisplayString(r.title),1),o.createElementVNode("p",Ta,o.toDisplayString(r.text),1)])])])}const ze=I(Da,[["render",Va]]),Ra={class:"w-full bg-[#f6f6f9] h-[calc(100vh-60px)]"},Ba={class:"flex h-full"},Pa={__name:"vs-builder",setup(e){const t=o.ref({});return(r,n)=>{const s=o.resolveComponent("router-view");return o.openBlock(),o.createElementBlock("div",Ra,[o.createElementVNode("div",Ba,[o.createVNode(Ea,{UPDATE:t.value,"onUpdate:UPDATE":n[0]||(n[0]=a=>t.value=a)},null,8,["UPDATE"]),o.createVNode(s,null,{default:o.withCtx(({Component:a})=>[a?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(a),{key:0,UPDATE:t.value},null,8,["UPDATE"])):(o.openBlock(),o.createBlock(ze,{key:1,class:"pt-[100px]",text:"Оберіть один з існуючих пунктів меню, або створіть новий"}))]),_:1})])])}}},$a={class:"p-4 w-[260px] shrink-0 border-r h-[calc(100vh-60px)]"},Ya={class:"flex flex-col space-y-1"},Aa={__name:"vs-manager-single-menu",setup(e){const t=o.ref(null);return(async()=>{try{const{data:n}=await C.get("/api/cms-builder");t.value=(n==null?void 0:n.rows)||null}catch{}})(),(n,s)=>{var i;const a=o.resolveComponent("router-link");return o.openBlock(),o.createElementBlock("div",$a,[s[0]||(s[0]=o.createElementVNode("h2",{class:"block text-[14px] mb-2 font-medium text-gray-800 dark:text-neutral-200"}," Одиничні типи ",-1)),o.createElementVNode("ul",Ya,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList((i=t.value)==null?void 0:i.filter(l=>(l==null?void 0:l.type)=="single"),l=>{var d,c,u;return o.openBlock(),o.createElementBlock("li",{key:(d=n.item)==null?void 0:d.id},[o.createVNode(a,{to:`/manager-single/${l==null?void 0:l.template}`,class:o.normalizeClass([[((u=(c=n.$route)==null?void 0:c.params)==null?void 0:u.template)===(l==null?void 0:l.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:o.withCtx(()=>[o.createVNode(Jt,{class:"text-gray-500"}),o.createTextVNode(" "+o.toDisplayString((l==null?void 0:l.name)||(l==null?void 0:l.title)),1)]),_:2},1032,["to","class"])])}),128))])])}}},Fa={class:"w-full bg-[#f6f6f9] h-[calc(100vh-60px)]"},va={class:"flex"},La={class:"w-full flex justify-center"},Ua={class:"p-[20px] w-full max-w-[1440px]"},Ia={__name:"vs-manager-single",setup(e){return(t,r)=>{const n=o.resolveComponent("VsNotData"),s=o.resolveComponent("router-view");return o.openBlock(),o.createElementBlock("div",Fa,[o.createElementVNode("div",va,[o.createVNode(Aa),o.createElementVNode("div",La,[o.createElementVNode("div",Ua,[o.createVNode(s,null,{default:o.withCtx(({Component:a})=>[a?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(a),{key:0})):(o.openBlock(),o.createBlock(n,{key:1,class:"pt-[100px]",text:"Оберіть один з існуючих пунктів меню, або створіть новий"}))]),_:1})])])])])}}},ja={class:"w-full flex justify-center bg-gray-100 h-[calc(100vh-60px)]"},Wa={class:"p-[20px] w-full max-w-[1440px]"},Ha={class:"flex gap-2 items-center"},za={key:0},qa={key:2},Ga={key:3,class:"flex gap-2 items-center hover:text-blue-700 duration-300"},Za={__name:"vs-manager-collection",setup(e){const t=o.ref(null),r=o.ref({firstLevel:"",secondLevel:""});return(async()=>{var s;try{const{data:a}=await C.get("/api/cms-builder");t.value=((s=a==null?void 0:a.rows)==null?void 0:s.filter(i=>(i==null?void 0:i.type)=="collection"))||null}catch{}})(),(s,a)=>{var d,c,u,m,w,k,g,_,f,p,b;const i=o.resolveComponent("router-link"),l=o.resolveComponent("router-view");return o.openBlock(),o.createElementBlock("div",ja,[o.createElementVNode("div",Wa,[o.createElementVNode("div",Ha,[o.createVNode(i,{to:"/manager-collection",class:"flex gap-2 items-center hover:text-blue-700 duration-300"},{default:o.withCtx(()=>a[1]||(a[1]=[o.createTextVNode(" Менеджер колекцій ")])),_:1}),(c=(d=s.$route)==null?void 0:d.params)!=null&&c.template?(o.openBlock(),o.createElementBlock("span",za,"/")):o.createCommentVNode("",!0),(m=(u=s.$route)==null?void 0:u.params)!=null&&m.template?(o.openBlock(),o.createBlock(i,{key:1,to:`/manager-collection/${(k=(w=s.$route)==null?void 0:w.params)==null?void 0:k.template}`,class:"flex gap-2 items-center hover:text-blue-700 duration-300"},{default:o.withCtx(()=>{var y;return[o.createTextVNode(o.toDisplayString((y=r.value)==null?void 0:y.firstLevel),1)]}),_:1},8,["to"])):o.createCommentVNode("",!0),(_=(g=s.$route)==null?void 0:g.params)!=null&&_.id?(o.openBlock(),o.createElementBlock("span",qa,"/")):o.createCommentVNode("",!0),(p=(f=s.$route)==null?void 0:f.params)!=null&&p.id?(o.openBlock(),o.createElementBlock("p",Ga,o.toDisplayString((b=r.value)==null?void 0:b.secondLevel),1)):o.createCommentVNode("",!0)]),o.createVNode(l,null,{default:o.withCtx(({Component:y})=>[y?(o.openBlock(),o.createBlock(o.resolveDynamicComponent(y),{key:0,list:t.value,titles:r.value,"onUpdate:titles":a[0]||(a[0]=P=>r.value=P)},null,40,["list","titles"])):(o.openBlock(),o.createBlock(ze,{key:1,class:"pt-[100px]",text:"Оберіть один з існуючих пунктів меню, або створіть новий"}))]),_:1})])])}}};//! moment.js
|
|
11
11
|
//! version : 2.30.1
|
|
12
12
|
//! authors : Tim Wood, Iskren Chernev, Moment.js contributors
|
|
13
13
|
//! license : MIT
|
|
14
14
|
//! momentjs.com
|
|
15
|
-
var
|
|
16
|
-
[`+
|
|
15
|
+
var wn;function S(){return wn.apply(null,arguments)}function Ja(e){wn=e}function ee(e){return e instanceof Array||Object.prototype.toString.call(e)==="[object Array]"}function Ee(e){return e!=null&&Object.prototype.toString.call(e)==="[object Object]"}function V(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Kt(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;var t;for(t in e)if(V(e,t))return!1;return!0}function G(e){return e===void 0}function ce(e){return typeof e=="number"||Object.prototype.toString.call(e)==="[object Number]"}function qe(e){return e instanceof Date||Object.prototype.toString.call(e)==="[object Date]"}function xn(e,t){var r=[],n,s=e.length;for(n=0;n<s;++n)r.push(t(e[n],n));return r}function ge(e,t){for(var r in t)V(t,r)&&(e[r]=t[r]);return V(t,"toString")&&(e.toString=t.toString),V(t,"valueOf")&&(e.valueOf=t.valueOf),e}function oe(e,t,r,n){return qn(e,t,r,n,!0).utc()}function Ka(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function O(e){return e._pf==null&&(e._pf=Ka()),e._pf}var Qt;Array.prototype.some?Qt=Array.prototype.some:Qt=function(e){var t=Object(this),r=t.length>>>0,n;for(n=0;n<r;n++)if(n in t&&e.call(this,t[n],n,t))return!0;return!1};function Xt(e){var t=null,r=!1,n=e._d&&!isNaN(e._d.getTime());if(n&&(t=O(e),r=Qt.call(t.parsedDateParts,function(s){return s!=null}),n=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&r),e._strict&&(n=n&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=n;else return n;return e._isValid}function _t(e){var t=oe(NaN);return e!=null?ge(O(t),e):O(t).userInvalidated=!0,t}var kn=S.momentProperties=[],er=!1;function tr(e,t){var r,n,s,a=kn.length;if(G(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),G(t._i)||(e._i=t._i),G(t._f)||(e._f=t._f),G(t._l)||(e._l=t._l),G(t._strict)||(e._strict=t._strict),G(t._tzm)||(e._tzm=t._tzm),G(t._isUTC)||(e._isUTC=t._isUTC),G(t._offset)||(e._offset=t._offset),G(t._pf)||(e._pf=O(t)),G(t._locale)||(e._locale=t._locale),a>0)for(r=0;r<a;r++)n=kn[r],s=t[n],G(s)||(e[n]=s);return e}function Ge(e){tr(this,e),this._d=new Date(e._d!=null?e._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),er===!1&&(er=!0,S.updateOffset(this),er=!1)}function te(e){return e instanceof Ge||e!=null&&e._isAMomentObject!=null}function bn(e){S.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+e)}function J(e,t){var r=!0;return ge(function(){if(S.deprecationHandler!=null&&S.deprecationHandler(null,e),r){var n=[],s,a,i,l=arguments.length;for(a=0;a<l;a++){if(s="",typeof arguments[a]=="object"){s+=`
|
|
16
|
+
[`+a+"] ";for(i in arguments[0])V(arguments[0],i)&&(s+=i+": "+arguments[0][i]+", ");s=s.slice(0,-2)}else s=arguments[a];n.push(s)}bn(e+`
|
|
17
17
|
Arguments: `+Array.prototype.slice.call(n).join("")+`
|
|
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(`/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:`/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:`/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:`/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:`/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});
|
|
18
|
+
`+new Error().stack),r=!1}return t.apply(this,arguments)},t)}var Sn={};function En(e,t){S.deprecationHandler!=null&&S.deprecationHandler(e,t),Sn[e]||(bn(t),Sn[e]=!0)}S.suppressDeprecationWarnings=!1,S.deprecationHandler=null;function ae(e){return typeof Function<"u"&&e instanceof Function||Object.prototype.toString.call(e)==="[object Function]"}function Qa(e){var t,r;for(r in e)V(e,r)&&(t=e[r],ae(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 rr(e,t){var r=ge({},e),n;for(n in t)V(t,n)&&(Ee(e[n])&&Ee(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)V(e,n)&&!V(t,n)&&Ee(e[n])&&(r[n]=ge({},r[n]));return r}function nr(e){e!=null&&this.set(e)}var sr;Object.keys?sr=Object.keys:sr=function(e){var t,r=[];for(t in e)V(e,t)&&r.push(t);return r};var Xa={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"};function ei(e,t,r){var n=this._calendar[e]||this._calendar.sameElse;return ae(n)?n.call(t,r):n}function ie(e,t,r){var n=""+Math.abs(e),s=t-n.length,a=e>=0;return(a?r?"+":"":"-")+Math.pow(10,Math.max(0,s)).toString().substr(1)+n}var or=/(\[[^\[]*\])|(\\)?([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,gt=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ar={},Ve={};function D(e,t,r,n){var s=n;typeof n=="string"&&(s=function(){return this[n]()}),e&&(Ve[e]=s),t&&(Ve[t[0]]=function(){return ie(s.apply(this,arguments),t[1],t[2])}),r&&(Ve[r]=function(){return this.localeData().ordinal(s.apply(this,arguments),e)})}function ti(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,""):e.replace(/\\/g,"")}function ri(e){var t=e.match(or),r,n;for(r=0,n=t.length;r<n;r++)Ve[t[r]]?t[r]=Ve[t[r]]:t[r]=ti(t[r]);return function(s){var a="",i;for(i=0;i<n;i++)a+=ae(t[i])?t[i].call(s,e):t[i];return a}}function wt(e,t){return e.isValid()?(t=Dn(t,e.localeData()),ar[t]=ar[t]||ri(t),ar[t](e)):e.localeData().invalidDate()}function Dn(e,t){var r=5;function n(s){return t.longDateFormat(s)||s}for(gt.lastIndex=0;r>=0&>.test(e);)e=e.replace(gt,n),gt.lastIndex=0,r-=1;return e}var ni={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 si(e){var t=this._longDateFormat[e],r=this._longDateFormat[e.toUpperCase()];return t||!r?t:(this._longDateFormat[e]=r.match(or).map(function(n){return n==="MMMM"||n==="MM"||n==="DD"||n==="dddd"?n.slice(1):n}).join(""),this._longDateFormat[e])}var oi="Invalid date";function ai(){return this._invalidDate}var ii="%d",li=/\d{1,2}/;function ci(e){return this._ordinal.replace("%d",e)}var di={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 ui(e,t,r,n){var s=this._relativeTime[r];return ae(s)?s(e,t,r,n):s.replace(/%d/i,e)}function fi(e,t){var r=this._relativeTime[e>0?"future":"past"];return ae(r)?r(t):r.replace(/%s/i,t)}var Nn={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 K(e){return typeof e=="string"?Nn[e]||Nn[e.toLowerCase()]:void 0}function ir(e){var t={},r,n;for(n in e)V(e,n)&&(r=K(n),r&&(t[r]=e[n]));return t}var hi={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 mi(e){var t=[],r;for(r in e)V(e,r)&&t.push({unit:r,priority:hi[r]});return t.sort(function(n,s){return n.priority-s.priority}),t}var On=/\d/,Z=/\d\d/,Cn=/\d{3}/,lr=/\d{4}/,xt=/[+-]?\d{6}/,Y=/\d\d?/,Mn=/\d\d\d\d?/,Tn=/\d\d\d\d\d\d?/,kt=/\d{1,3}/,cr=/\d{1,4}/,bt=/[+-]?\d{1,6}/,Re=/\d+/,St=/[+-]?\d+/,pi=/Z|[+-]\d\d:?\d\d/gi,Et=/Z|[+-]\d\d(?::?\d\d)?/gi,yi=/[+-]?\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,Be=/^[1-9]\d?/,dr=/^([1-9]\d|\d)/,Dt;Dt={};function E(e,t,r){Dt[e]=ae(t)?t:function(n,s){return n&&r?r:t}}function _i(e,t){return V(Dt,e)?Dt[e](t._strict,t._locale):new RegExp(gi(e))}function gi(e){return de(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,r,n,s,a){return r||n||s||a}))}function de(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Q(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=Q(t)),r}var ur={};function B(e,t){var r,n=t,s;for(typeof e=="string"&&(e=[e]),ce(t)&&(n=function(a,i){i[t]=M(a)}),s=e.length,r=0;r<s;r++)ur[e[r]]=n}function Je(e,t){B(e,function(r,n,s,a){s._w=s._w||{},t(r,s._w,s,a)})}function wi(e,t,r){t!=null&&V(ur,e)&&ur[e](t,r._a,r,e)}function Nt(e){return e%4===0&&e%100!==0||e%400===0}var W=0,ue=1,le=2,L=3,re=4,fe=5,De=6,xi=7,ki=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"),E("Y",St),E("YY",Y,Z),E("YYYY",cr,lr),E("YYYYY",bt,xt),E("YYYYYY",bt,xt),B(["YYYYY","YYYYYY"],W),B("YYYY",function(e,t){t[W]=e.length===2?S.parseTwoDigitYear(e):M(e)}),B("YY",function(e,t){t[W]=S.parseTwoDigitYear(e)}),B("Y",function(e,t){t[W]=parseInt(e,10)});function Ke(e){return Nt(e)?366:365}S.parseTwoDigitYear=function(e){return M(e)+(M(e)>68?1900:2e3)};var Vn=Pe("FullYear",!0);function bi(){return Nt(this.year())}function Pe(e,t){return function(r){return r!=null?(Rn(this,e,r),S.updateOffset(this,t),this):Qe(this,e)}}function Qe(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 Rn(e,t,r){var n,s,a,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}a=r,i=e.month(),l=e.date(),l=l===29&&i===1&&!Nt(a)?28:l,s?n.setUTCFullYear(a,i,l):n.setFullYear(a,i,l)}}function Si(e){return e=K(e),ae(this[e])?this[e]():this}function Ei(e,t){if(typeof e=="object"){e=ir(e);var r=mi(e),n,s=r.length;for(n=0;n<s;n++)this[r[n].unit](e[r[n].unit])}else if(e=K(e),ae(this[e]))return this[e](t);return this}function Di(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 fr(e,t){if(isNaN(e)||isNaN(t))return NaN;var r=Di(t,12);return e+=(t-r)/12,r===1?Nt(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)}),E("M",Y,Be),E("MM",Y,Z),E("MMM",function(e,t){return t.monthsShortRegex(e)}),E("MMMM",function(e,t){return t.monthsRegex(e)}),B(["M","MM"],function(e,t){t[ue]=M(e)-1}),B(["MMM","MMMM"],function(e,t,r,n){var s=r._locale.monthsParse(e,n,r._strict);s!=null?t[ue]=s:O(r).invalidMonth=e});var Ni="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Bn="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),Pn=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Oi=Ze,Ci=Ze;function Mi(e,t){return e?ee(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Pn).test(t)?"format":"standalone"][e.month()]:ee(this._months)?this._months:this._months.standalone}function Ti(e,t){return e?ee(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Pn.test(t)?"format":"standalone"][e.month()]:ee(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function Vi(e,t,r){var n,s,a,i=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],n=0;n<12;++n)a=oe([2e3,n]),this._shortMonthsParse[n]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[n]=this.months(a,"").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 Ri(e,t,r){var n,s,a;if(this._monthsParseExact)return Vi.call(this,e,t,r);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),n=0;n<12;n++){if(s=oe([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]&&(a="^"+this.months(s,"")+"|^"+this.monthsShort(s,""),this._monthsParse[n]=new RegExp(a.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 $n(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,fr(e.year(),r)),e._isUTC?e._d.setUTCMonth(r,n):e._d.setMonth(r,n),e}function Yn(e){return e!=null?($n(this,e),S.updateOffset(this,!0),this):Qe(this,"Month")}function Bi(){return fr(this.year(),this.month())}function Pi(e){return this._monthsParseExact?(V(this,"_monthsRegex")||An.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(V(this,"_monthsShortRegex")||(this._monthsShortRegex=Oi),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function $i(e){return this._monthsParseExact?(V(this,"_monthsRegex")||An.call(this),e?this._monthsStrictRegex:this._monthsRegex):(V(this,"_monthsRegex")||(this._monthsRegex=Ci),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function An(){function e(d,c){return c.length-d.length}var t=[],r=[],n=[],s,a,i,l;for(s=0;s<12;s++)a=oe([2e3,s]),i=de(this.monthsShort(a,"")),l=de(this.months(a,"")),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 Yi(e,t,r,n,s,a,i){var l;return e<100&&e>=0?(l=new Date(e+400,t,r,n,s,a,i),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,r,n,s,a,i),l}function Xe(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 Ot(e,t,r){var n=7+t-r,s=(7+Xe(e,0,n).getUTCDay()-t)%7;return-s+n-1}function Fn(e,t,r,n,s){var a=(7+r-n)%7,i=Ot(e,n,s),l=1+7*(t-1)+a+i,d,c;return l<=0?(d=e-1,c=Ke(d)+l):l>Ke(e)?(d=e+1,c=l-Ke(e)):(d=e,c=l),{year:d,dayOfYear:c}}function et(e,t,r){var n=Ot(e.year(),t,r),s=Math.floor((e.dayOfYear()-n-1)/7)+1,a,i;return s<1?(i=e.year()-1,a=s+he(i,t,r)):s>he(e.year(),t,r)?(a=s-he(e.year(),t,r),i=e.year()+1):(i=e.year(),a=s),{week:a,year:i}}function he(e,t,r){var n=Ot(e,t,r),s=Ot(e+1,t,r);return(Ke(e)-n+s)/7}D("w",["ww",2],"wo","week"),D("W",["WW",2],"Wo","isoWeek"),E("w",Y,Be),E("ww",Y,Z),E("W",Y,Be),E("WW",Y,Z),Je(["w","ww","W","WW"],function(e,t,r,n){t[n.substr(0,1)]=M(e)});function Ai(e){return et(e,this._week.dow,this._week.doy).week}var Fi={dow:0,doy:6};function vi(){return this._week.dow}function Li(){return this._week.doy}function Ui(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,"d")}function Ii(e){var t=et(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"),E("d",Y),E("e",Y),E("E",Y),E("dd",function(e,t){return t.weekdaysMinRegex(e)}),E("ddd",function(e,t){return t.weekdaysShortRegex(e)}),E("dddd",function(e,t){return t.weekdaysRegex(e)}),Je(["dd","ddd","dddd"],function(e,t,r,n){var s=r._locale.weekdaysParse(e,n,r._strict);s!=null?t.d=s:O(r).invalidWeekday=e}),Je(["d","e","E"],function(e,t,r,n){t[n]=M(e)});function ji(e,t){return typeof e!="string"?e:isNaN(e)?(e=t.weekdaysParse(e),typeof e=="number"?e:null):parseInt(e,10)}function Wi(e,t){return typeof e=="string"?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function hr(e,t){return e.slice(t,7).concat(e.slice(0,t))}var Hi="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),vn="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),zi="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),qi=Ze,Gi=Ze,Zi=Ze;function Ji(e,t){var r=ee(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?"format":"standalone"];return e===!0?hr(r,this._week.dow):e?r[e.day()]:r}function Ki(e){return e===!0?hr(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function Qi(e){return e===!0?hr(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function Xi(e,t,r){var n,s,a,i=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],n=0;n<7;++n)a=oe([2e3,1]).day(n),this._minWeekdaysParse[n]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[n]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[n]=this.weekdays(a,"").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 el(e,t,r){var n,s,a;if(this._weekdaysParseExact)return Xi.call(this,e,t,r);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),n=0;n<7;n++){if(s=oe([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]||(a="^"+this.weekdays(s,"")+"|^"+this.weekdaysShort(s,"")+"|^"+this.weekdaysMin(s,""),this._weekdaysParse[n]=new RegExp(a.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 tl(e){if(!this.isValid())return e!=null?this:NaN;var t=Qe(this,"Day");return e!=null?(e=ji(e,this.localeData()),this.add(e-t,"d")):t}function rl(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 nl(e){if(!this.isValid())return e!=null?this:NaN;if(e!=null){var t=Wi(e,this.localeData());return this.day(this.day()%7?t:t-7)}else return this.day()||7}function sl(e){return this._weekdaysParseExact?(V(this,"_weekdaysRegex")||mr.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(V(this,"_weekdaysRegex")||(this._weekdaysRegex=qi),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ol(e){return this._weekdaysParseExact?(V(this,"_weekdaysRegex")||mr.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(V(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Gi),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function al(e){return this._weekdaysParseExact?(V(this,"_weekdaysRegex")||mr.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(V(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Zi),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function mr(){function e(u,m){return m.length-u.length}var t=[],r=[],n=[],s=[],a,i,l,d,c;for(a=0;a<7;a++)i=oe([2e3,1]).day(a),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 pr(){return this.hours()%12||12}function il(){return this.hours()||24}D("H",["HH",2],0,"hour"),D("h",["hh",2],0,pr),D("k",["kk",2],0,il),D("hmm",0,0,function(){return""+pr.apply(this)+ie(this.minutes(),2)}),D("hmmss",0,0,function(){return""+pr.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 Ln(e,t){D(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}Ln("a",!0),Ln("A",!1);function Un(e,t){return t._meridiemParse}E("a",Un),E("A",Un),E("H",Y,dr),E("h",Y,Be),E("k",Y,Be),E("HH",Y,Z),E("hh",Y,Z),E("kk",Y,Z),E("hmm",Mn),E("hmmss",Tn),E("Hmm",Mn),E("Hmmss",Tn),B(["H","HH"],L),B(["k","kk"],function(e,t,r){var n=M(e);t[L]=n===24?0:n}),B(["a","A"],function(e,t,r){r._isPm=r._locale.isPM(e),r._meridiem=e}),B(["h","hh"],function(e,t,r){t[L]=M(e),O(r).bigHour=!0}),B("hmm",function(e,t,r){var n=e.length-2;t[L]=M(e.substr(0,n)),t[re]=M(e.substr(n)),O(r).bigHour=!0}),B("hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[L]=M(e.substr(0,n)),t[re]=M(e.substr(n,2)),t[fe]=M(e.substr(s)),O(r).bigHour=!0}),B("Hmm",function(e,t,r){var n=e.length-2;t[L]=M(e.substr(0,n)),t[re]=M(e.substr(n))}),B("Hmmss",function(e,t,r){var n=e.length-4,s=e.length-2;t[L]=M(e.substr(0,n)),t[re]=M(e.substr(n,2)),t[fe]=M(e.substr(s))});function ll(e){return(e+"").toLowerCase().charAt(0)==="p"}var cl=/[ap]\.?m?\.?/i,dl=Pe("Hours",!0);function ul(e,t,r){return e>11?r?"pm":"PM":r?"am":"AM"}var In={calendar:Xa,longDateFormat:ni,invalidDate:oi,ordinal:ii,dayOfMonthOrdinalParse:li,relativeTime:di,months:Ni,monthsShort:Bn,week:Fi,weekdays:Hi,weekdaysMin:zi,weekdaysShort:vn,meridiemParse:cl},F={},tt={},rt;function fl(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 jn(e){return e&&e.toLowerCase().replace("_","-")}function hl(e){for(var t=0,r,n,s,a;t<e.length;){for(a=jn(e[t]).split("-"),r=a.length,n=jn(e[t+1]),n=n?n.split("-"):null;r>0;){if(s=Ct(a.slice(0,r).join("-")),s)return s;if(n&&n.length>=r&&fl(a,n)>=r-1)break;r--}t++}return rt}function ml(e){return!!(e&&e.match("^[^/\\\\]*$"))}function Ct(e){var t=null,r;if(F[e]===void 0&&typeof module<"u"&&module&&module.exports&&ml(e))try{t=rt._abbr,r=require,r("./locale/"+e),we(t)}catch{F[e]=null}return F[e]}function we(e,t){var r;return e&&(G(t)?r=me(e):r=yr(e,t),r?rt=r:typeof console<"u"&&console.warn&&console.warn("Locale "+e+" not found. Did you forget to load it?")),rt._abbr}function yr(e,t){if(t!==null){var r,n=In;if(t.abbr=e,F[e]!=null)En("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=Ct(t.parentLocale),r!=null)n=r._config;else return tt[t.parentLocale]||(tt[t.parentLocale]=[]),tt[t.parentLocale].push({name:e,config:t}),null;return F[e]=new nr(rr(n,t)),tt[e]&&tt[e].forEach(function(s){yr(s.name,s.config)}),we(e),F[e]}else return delete F[e],null}function pl(e,t){if(t!=null){var r,n,s=In;F[e]!=null&&F[e].parentLocale!=null?F[e].set(rr(F[e]._config,t)):(n=Ct(e),n!=null&&(s=n._config),t=rr(s,t),n==null&&(t.abbr=e),r=new nr(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 rt;if(!ee(e)){if(t=Ct(e),t)return t;e=[e]}return hl(e)}function yl(){return sr(F)}function _r(e){var t,r=e._a;return r&&O(e).overflow===-2&&(t=r[ue]<0||r[ue]>11?ue:r[le]<1||r[le]>fr(r[W],r[ue])?le:r[L]<0||r[L]>24||r[L]===24&&(r[re]!==0||r[fe]!==0||r[De]!==0)?L:r[re]<0||r[re]>59?re:r[fe]<0||r[fe]>59?fe:r[De]<0||r[De]>999?De:-1,O(e)._overflowDayOfYear&&(t<W||t>le)&&(t=le),O(e)._overflowWeeks&&t===-1&&(t=xi),O(e)._overflowWeekday&&t===-1&&(t=ki),O(e).overflow=t),e}var _l=/^\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)?)?$/,gl=/^\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)?)?$/,wl=/Z|[+-]\d\d(?::?\d\d)?/,Mt=[["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]],gr=[["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/]],xl=/^\/?Date\((-?\d+)/i,kl=/^(?:(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}))$/,bl={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 Wn(e){var t,r,n=e._i,s=_l.exec(n)||gl.exec(n),a,i,l,d,c=Mt.length,u=gr.length;if(s){for(O(e).iso=!0,t=0,r=c;t<r;t++)if(Mt[t][1].exec(s[1])){i=Mt[t][0],a=Mt[t][2]!==!1;break}if(i==null){e._isValid=!1;return}if(s[3]){for(t=0,r=u;t<r;t++)if(gr[t][1].exec(s[3])){l=(s[2]||" ")+gr[t][0];break}if(l==null){e._isValid=!1;return}}if(!a&&l!=null){e._isValid=!1;return}if(s[4])if(wl.exec(s[4]))d="Z";else{e._isValid=!1;return}e._f=i+(l||"")+(d||""),xr(e)}else e._isValid=!1}function Sl(e,t,r,n,s,a){var i=[El(e),Bn.indexOf(t),parseInt(r,10),parseInt(n,10),parseInt(s,10)];return a&&i.push(parseInt(a,10)),i}function El(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Dl(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Nl(e,t,r){if(e){var n=vn.indexOf(e),s=new Date(t[0],t[1],t[2]).getDay();if(n!==s)return O(r).weekdayMismatch=!0,r._isValid=!1,!1}return!0}function Ol(e,t,r){if(e)return bl[e];if(t)return 0;var n=parseInt(r,10),s=n%100,a=(n-s)/100;return a*60+s}function Hn(e){var t=kl.exec(Dl(e._i)),r;if(t){if(r=Sl(t[4],t[3],t[2],t[5],t[6],t[7]),!Nl(t[1],r,e))return;e._a=r,e._tzm=Ol(t[8],t[9],t[10]),e._d=Xe.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),O(e).rfc2822=!0}else e._isValid=!1}function Cl(e){var t=xl.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Wn(e),e._isValid===!1)delete e._isValid;else return;if(Hn(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:S.createFromInputFallback(e)}S.createFromInputFallback=J("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 $e(e,t,r){return e??t??r}function Ml(e){var t=new Date(S.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function wr(e){var t,r,n=[],s,a,i;if(!e._d){for(s=Ml(e),e._w&&e._a[le]==null&&e._a[ue]==null&&Tl(e),e._dayOfYear!=null&&(i=$e(e._a[W],s[W]),(e._dayOfYear>Ke(i)||e._dayOfYear===0)&&(O(e)._overflowDayOfYear=!0),r=Xe(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[L]===24&&e._a[re]===0&&e._a[fe]===0&&e._a[De]===0&&(e._nextDay=!0,e._a[L]=0),e._d=(e._useUTC?Xe:Yi).apply(null,n),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[L]=24),e._w&&typeof e._w.d<"u"&&e._w.d!==a&&(O(e).weekdayMismatch=!0)}}function Tl(e){var t,r,n,s,a,i,l,d,c;t=e._w,t.GG!=null||t.W!=null||t.E!=null?(a=1,i=4,r=$e(t.GG,e._a[W],et(A(),1,4).year),n=$e(t.W,1),s=$e(t.E,1),(s<1||s>7)&&(d=!0)):(a=e._locale._week.dow,i=e._locale._week.doy,c=et(A(),a,i),r=$e(t.gg,e._a[W],c.year),n=$e(t.w,c.week),t.d!=null?(s=t.d,(s<0||s>6)&&(d=!0)):t.e!=null?(s=t.e+a,(t.e<0||t.e>6)&&(d=!0)):s=a),n<1||n>he(r,a,i)?O(e)._overflowWeeks=!0:d!=null?O(e)._overflowWeekday=!0:(l=Fn(r,n,s,a,i),e._a[W]=l.year,e._dayOfYear=l.dayOfYear)}S.ISO_8601=function(){},S.RFC_2822=function(){};function xr(e){if(e._f===S.ISO_8601){Wn(e);return}if(e._f===S.RFC_2822){Hn(e);return}e._a=[],O(e).empty=!0;var t=""+e._i,r,n,s,a,i,l=t.length,d=0,c,u;for(s=Dn(e._f,e._locale).match(or)||[],u=s.length,r=0;r<u;r++)a=s[r],n=(t.match(_i(a,e))||[])[0],n&&(i=t.substr(0,t.indexOf(n)),i.length>0&&O(e).unusedInput.push(i),t=t.slice(t.indexOf(n)+n.length),d+=n.length),Ve[a]?(n?O(e).empty=!1:O(e).unusedTokens.push(a),wi(a,n,e)):e._strict&&!n&&O(e).unusedTokens.push(a);O(e).charsLeftOver=l-d,t.length>0&&O(e).unusedInput.push(t),e._a[L]<=12&&O(e).bigHour===!0&&e._a[L]>0&&(O(e).bigHour=void 0),O(e).parsedDateParts=e._a.slice(0),O(e).meridiem=e._meridiem,e._a[L]=Vl(e._locale,e._a[L],e._meridiem),c=O(e).era,c!==null&&(e._a[W]=e._locale.erasConvertYear(c,e._a[W])),wr(e),_r(e)}function Vl(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 Rl(e){var t,r,n,s,a,i,l=!1,d=e._f.length;if(d===0){O(e).invalidFormat=!0,e._d=new Date(NaN);return}for(s=0;s<d;s++)a=0,i=!1,t=tr({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[s],xr(t),Xt(t)&&(i=!0),a+=O(t).charsLeftOver,a+=O(t).unusedTokens.length*10,O(t).score=a,l?a<n&&(n=a,r=t):(n==null||a<n||i)&&(n=a,r=t,i&&(l=!0));ge(e,r||t)}function Bl(e){if(!e._d){var t=ir(e._i),r=t.day===void 0?t.date:t.day;e._a=xn([t.year,t.month,r,t.hour,t.minute,t.second,t.millisecond],function(n){return n&&parseInt(n,10)}),wr(e)}}function Pl(e){var t=new Ge(_r(zn(e)));return t._nextDay&&(t.add(1,"d"),t._nextDay=void 0),t}function zn(e){var t=e._i,r=e._f;return e._locale=e._locale||me(e._l),t===null||r===void 0&&t===""?_t({nullInput:!0}):(typeof t=="string"&&(e._i=t=e._locale.preparse(t)),te(t)?new Ge(_r(t)):(qe(t)?e._d=t:ee(r)?Rl(e):r?xr(e):$l(e),Xt(e)||(e._d=null),e))}function $l(e){var t=e._i;G(t)?e._d=new Date(S.now()):qe(t)?e._d=new Date(t.valueOf()):typeof t=="string"?Cl(e):ee(t)?(e._a=xn(t.slice(0),function(r){return parseInt(r,10)}),wr(e)):Ee(t)?Bl(e):ce(t)?e._d=new Date(t):S.createFromInputFallback(e)}function qn(e,t,r,n,s){var a={};return(t===!0||t===!1)&&(n=t,t=void 0),(r===!0||r===!1)&&(n=r,r=void 0),(Ee(e)&&Kt(e)||ee(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=s,a._l=r,a._i=e,a._f=t,a._strict=n,Pl(a)}function A(e,t,r,n){return qn(e,t,r,n,!1)}var Yl=J("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:_t()}),Al=J("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:_t()});function Gn(e,t){var r,n;if(t.length===1&&ee(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 Fl(){var e=[].slice.call(arguments,0);return Gn("isBefore",e)}function vl(){var e=[].slice.call(arguments,0);return Gn("isAfter",e)}var Ll=function(){return Date.now?Date.now():+new Date},nt=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Ul(e){var t,r=!1,n,s=nt.length;for(t in e)if(V(e,t)&&!(v.call(nt,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(n=0;n<s;++n)if(e[nt[n]]){if(r)return!1;parseFloat(e[nt[n]])!==M(e[nt[n]])&&(r=!0)}return!0}function Il(){return this._isValid}function jl(){return ne(NaN)}function Tt(e){var t=ir(e),r=t.year||0,n=t.quarter||0,s=t.month||0,a=t.week||t.isoWeek||0,i=t.day||0,l=t.hour||0,d=t.minute||0,c=t.second||0,u=t.millisecond||0;this._isValid=Ul(t),this._milliseconds=+u+c*1e3+d*6e4+l*1e3*60*60,this._days=+i+a*7,this._months=+s+n*3+r*12,this._data={},this._locale=me(),this._bubble()}function Vt(e){return e instanceof Tt}function kr(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Wl(e,t,r){var n=Math.min(e.length,t.length),s=Math.abs(e.length-t.length),a=0,i;for(i=0;i<n;i++)M(e[i])!==M(t[i])&&a++;return a+s}function Zn(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)})}Zn("Z",":"),Zn("ZZ",""),E("Z",Et),E("ZZ",Et),B(["Z","ZZ"],function(e,t,r){r._useUTC=!0,r._tzm=br(Et,e)});var Hl=/([\+\-]|\d\d)/gi;function br(e,t){var r=(t||"").match(e),n,s,a;return r===null?null:(n=r[r.length-1]||[],s=(n+"").match(Hl)||["-",0,0],a=+(s[1]*60)+M(s[2]),a===0?0:s[0]==="+"?a:-a)}function Sr(e,t){var r,n;return t._isUTC?(r=t.clone(),n=(te(e)||qe(e)?e.valueOf():A(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+n),S.updateOffset(r,!1),r):A(e).local()}function Er(e){return-Math.round(e._d.getTimezoneOffset())}S.updateOffset=function(){};function zl(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=br(Et,e),e===null)return this}else Math.abs(e)<16&&!r&&(e=e*60);return!this._isUTC&&t&&(s=Er(this)),this._offset=e,this._isUTC=!0,s!=null&&this.add(s,"m"),n!==e&&(!t||this._changeInProgress?Xn(this,ne(e-n,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,S.updateOffset(this,!0),this._changeInProgress=null)),this}else return this._isUTC?n:Er(this)}function ql(e,t){return e!=null?(typeof e!="string"&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()}function Gl(e){return this.utcOffset(0,e)}function Zl(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Er(this),"m")),this}function Jl(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i=="string"){var e=br(pi,this._i);e!=null?this.utcOffset(e):this.utcOffset(0,!0)}return this}function Kl(e){return this.isValid()?(e=e?A(e).utcOffset():0,(this.utcOffset()-e)%60===0):!1}function Ql(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Xl(){if(!G(this._isDSTShifted))return this._isDSTShifted;var e={},t;return tr(e,this),e=zn(e),e._a?(t=e._isUTC?oe(e._a):A(e._a),this._isDSTShifted=this.isValid()&&Wl(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function ec(){return this.isValid()?!this._isUTC:!1}function tc(){return this.isValid()?this._isUTC:!1}function Jn(){return this.isValid()?this._isUTC&&this._offset===0:!1}var rc=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,nc=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ne(e,t){var r=e,n=null,s,a,i;return Vt(e)?r={ms:e._milliseconds,d:e._days,M:e._months}:ce(e)||!isNaN(+e)?(r={},t?r[t]=+e:r.milliseconds=+e):(n=rc.exec(e))?(s=n[1]==="-"?-1:1,r={y:0,d:M(n[le])*s,h:M(n[L])*s,m:M(n[re])*s,s:M(n[fe])*s,ms:M(kr(n[De]*1e3))*s}):(n=nc.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=sc(A(r.from),A(r.to)),r={},r.ms=i.milliseconds,r.M=i.months),a=new Tt(r),Vt(e)&&V(e,"_locale")&&(a._locale=e._locale),Vt(e)&&V(e,"_isValid")&&(a._isValid=e._isValid),a}ne.fn=Tt.prototype,ne.invalid=jl;function Ne(e,t){var r=e&&parseFloat(e.replace(",","."));return(isNaN(r)?0:r)*t}function Kn(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 sc(e,t){var r;return e.isValid()&&t.isValid()?(t=Sr(t,e),e.isBefore(t)?r=Kn(e,t):(r=Kn(t,e),r.milliseconds=-r.milliseconds,r.months=-r.months),r):{milliseconds:0,months:0}}function Qn(e,t){return function(r,n){var s,a;return n!==null&&!isNaN(+n)&&(En(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."),a=r,r=n,n=a),s=ne(r,n),Xn(this,s,e),this}}function Xn(e,t,r,n){var s=t._milliseconds,a=kr(t._days),i=kr(t._months);e.isValid()&&(n=n??!0,i&&$n(e,Qe(e,"Month")+i*r),a&&Rn(e,"Date",Qe(e,"Date")+a*r),s&&e._d.setTime(e._d.valueOf()+s*r),n&&S.updateOffset(e,a||i))}var oc=Qn(1,"add"),ac=Qn(-1,"subtract");function es(e){return typeof e=="string"||e instanceof String}function ic(e){return te(e)||qe(e)||es(e)||ce(e)||cc(e)||lc(e)||e===null||e===void 0}function lc(e){var t=Ee(e)&&!Kt(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,a,i=n.length;for(s=0;s<i;s+=1)a=n[s],r=r||V(e,a);return t&&r}function cc(e){var t=ee(e),r=!1;return t&&(r=e.filter(function(n){return!ce(n)&&es(e)}).length===0),t&&r}function dc(e){var t=Ee(e)&&!Kt(e),r=!1,n=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],s,a;for(s=0;s<n.length;s+=1)a=n[s],r=r||V(e,a);return t&&r}function uc(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 fc(e,t){arguments.length===1&&(arguments[0]?ic(arguments[0])?(e=arguments[0],t=void 0):dc(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||A(),n=Sr(r,this).startOf("day"),s=S.calendarFormat(this,n)||"sameElse",a=t&&(ae(t[s])?t[s].call(this,r):t[s]);return this.format(a||this.localeData().calendar(s,this,A(r)))}function hc(){return new Ge(this)}function mc(e,t){var r=te(e)?e:A(e);return this.isValid()&&r.isValid()?(t=K(t)||"millisecond",t==="millisecond"?this.valueOf()>r.valueOf():r.valueOf()<this.clone().startOf(t).valueOf()):!1}function pc(e,t){var r=te(e)?e:A(e);return this.isValid()&&r.isValid()?(t=K(t)||"millisecond",t==="millisecond"?this.valueOf()<r.valueOf():this.clone().endOf(t).valueOf()<r.valueOf()):!1}function yc(e,t,r,n){var s=te(e)?e:A(e),a=te(t)?t:A(t);return this.isValid()&&s.isValid()&&a.isValid()?(n=n||"()",(n[0]==="("?this.isAfter(s,r):!this.isBefore(s,r))&&(n[1]===")"?this.isBefore(a,r):!this.isAfter(a,r))):!1}function _c(e,t){var r=te(e)?e:A(e),n;return this.isValid()&&r.isValid()?(t=K(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 gc(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function wc(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function xc(e,t,r){var n,s,a;if(!this.isValid())return NaN;if(n=Sr(e,this),!n.isValid())return NaN;switch(s=(n.utcOffset()-this.utcOffset())*6e4,t=K(t),t){case"year":a=Rt(this,n)/12;break;case"month":a=Rt(this,n);break;case"quarter":a=Rt(this,n)/3;break;case"second":a=(this-n)/1e3;break;case"minute":a=(this-n)/6e4;break;case"hour":a=(this-n)/36e5;break;case"day":a=(this-n-s)/864e5;break;case"week":a=(this-n-s)/6048e5;break;default:a=this-n}return r?a:Q(a)}function Rt(e,t){if(e.date()<t.date())return-Rt(t,e);var r=(t.year()-e.year())*12+(t.month()-e.month()),n=e.clone().add(r,"months"),s,a;return t-n<0?(s=e.clone().add(r-1,"months"),a=(t-n)/(n-s)):(s=e.clone().add(r+1,"months"),a=(t-n)/(s-n)),-(r+a)||0}S.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",S.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";function kc(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function bc(e){if(!this.isValid())return null;var t=e!==!0,r=t?this.clone().utc():this;return r.year()<0||r.year()>9999?wt(r,t?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):ae(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace("Z",wt(r,"Z")):wt(r,t?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")}function Sc(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var e="moment",t="",r,n,s,a;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",a=t+'[")]',this.format(r+n+s+a)}function Ec(e){e||(e=this.isUtc()?S.defaultFormatUtc:S.defaultFormat);var t=wt(this,e);return this.localeData().postformat(t)}function Dc(e,t){return this.isValid()&&(te(e)&&e.isValid()||A(e).isValid())?ne({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Nc(e){return this.from(A(),e)}function Oc(e,t){return this.isValid()&&(te(e)&&e.isValid()||A(e).isValid())?ne({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Cc(e){return this.to(A(),e)}function ts(e){var t;return e===void 0?this._locale._abbr:(t=me(e),t!=null&&(this._locale=t),this)}var rs=J("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 ns(){return this._locale}var Bt=1e3,Ye=60*Bt,Pt=60*Ye,ss=(365*400+97)*24*Pt;function Ae(e,t){return(e%t+t)%t}function os(e,t,r){return e<100&&e>=0?new Date(e+400,t,r)-ss:new Date(e,t,r).valueOf()}function as(e,t,r){return e<100&&e>=0?Date.UTC(e+400,t,r)-ss:Date.UTC(e,t,r)}function Mc(e){var t,r;if(e=K(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?as:os,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-=Ae(t+(this._isUTC?0:this.utcOffset()*Ye),Pt);break;case"minute":t=this._d.valueOf(),t-=Ae(t,Ye);break;case"second":t=this._d.valueOf(),t-=Ae(t,Bt);break}return this._d.setTime(t),S.updateOffset(this,!0),this}function Tc(e){var t,r;if(e=K(e),e===void 0||e==="millisecond"||!this.isValid())return this;switch(r=this._isUTC?as:os,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+=Pt-Ae(t+(this._isUTC?0:this.utcOffset()*Ye),Pt)-1;break;case"minute":t=this._d.valueOf(),t+=Ye-Ae(t,Ye)-1;break;case"second":t=this._d.valueOf(),t+=Bt-Ae(t,Bt)-1;break}return this._d.setTime(t),S.updateOffset(this,!0),this}function Vc(){return this._d.valueOf()-(this._offset||0)*6e4}function Rc(){return Math.floor(this.valueOf()/1e3)}function Bc(){return new Date(this.valueOf())}function Pc(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function $c(){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 Yc(){return this.isValid()?this.toISOString():null}function Ac(){return Xt(this)}function Fc(){return ge({},O(this))}function vc(){return O(this).overflow}function Lc(){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"),E("N",Dr),E("NN",Dr),E("NNN",Dr),E("NNNN",Kc),E("NNNNN",Qc),B(["N","NN","NNN","NNNN","NNNNN"],function(e,t,r,n){var s=r._locale.erasParse(e,n,r._strict);s?O(r).era=s:O(r).invalidEra=e}),E("y",Re),E("yy",Re),E("yyy",Re),E("yyyy",Re),E("yo",Xc),B(["y","yy","yyy","yyyy"],W),B(["yo"],function(e,t,r,n){var s;r._locale._eraYearOrdinalRegex&&(s=e.match(r._locale._eraYearOrdinalRegex)),r._locale.eraYearOrdinalParse?t[W]=r._locale.eraYearOrdinalParse(e,s):t[W]=parseInt(e,10)});function Uc(e,t){var r,n,s,a=this._eras||me("en")._eras;for(r=0,n=a.length;r<n;++r){switch(typeof a[r].since){case"string":s=S(a[r].since).startOf("day"),a[r].since=s.valueOf();break}switch(typeof a[r].until){case"undefined":a[r].until=1/0;break;case"string":s=S(a[r].until).startOf("day").valueOf(),a[r].until=s.valueOf();break}}return a}function Ic(e,t,r){var n,s,a=this.eras(),i,l,d;for(e=e.toUpperCase(),n=0,s=a.length;n<s;++n)if(i=a[n].name.toUpperCase(),l=a[n].abbr.toUpperCase(),d=a[n].narrow.toUpperCase(),r)switch(t){case"N":case"NN":case"NNN":if(l===e)return a[n];break;case"NNNN":if(i===e)return a[n];break;case"NNNNN":if(d===e)return a[n];break}else if([i,l,d].indexOf(e)>=0)return a[n]}function jc(e,t){var r=e.since<=e.until?1:-1;return t===void 0?S(e.since).year():S(e.since).year()+(t-e.offset)*r}function Wc(){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 Hc(){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 zc(){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 qc(){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()-S(s[e].since).year())*r+s[e].offset;return this.year()}function Gc(e){return V(this,"_erasNameRegex")||Nr.call(this),e?this._erasNameRegex:this._erasRegex}function Zc(e){return V(this,"_erasAbbrRegex")||Nr.call(this),e?this._erasAbbrRegex:this._erasRegex}function Jc(e){return V(this,"_erasNarrowRegex")||Nr.call(this),e?this._erasNarrowRegex:this._erasRegex}function Dr(e,t){return t.erasAbbrRegex(e)}function Kc(e,t){return t.erasNameRegex(e)}function Qc(e,t){return t.erasNarrowRegex(e)}function Xc(e,t){return t._eraYearOrdinalRegex||Re}function Nr(){var e=[],t=[],r=[],n=[],s,a,i,l,d,c=this.eras();for(s=0,a=c.length;s<a;++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 $t(e,t){D(0,[e,e.length],0,t)}$t("gggg","weekYear"),$t("ggggg","weekYear"),$t("GGGG","isoWeekYear"),$t("GGGGG","isoWeekYear"),E("G",St),E("g",St),E("GG",Y,Z),E("gg",Y,Z),E("GGGG",cr,lr),E("gggg",cr,lr),E("GGGGG",bt,xt),E("ggggg",bt,xt),Je(["gggg","ggggg","GGGG","GGGGG"],function(e,t,r,n){t[n.substr(0,2)]=M(e)}),Je(["gg","GG"],function(e,t,r,n){t[n]=S.parseTwoDigitYear(e)});function ed(e){return is.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function td(e){return is.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function rd(){return he(this.year(),1,4)}function nd(){return he(this.isoWeekYear(),1,4)}function sd(){var e=this.localeData()._week;return he(this.year(),e.dow,e.doy)}function od(){var e=this.localeData()._week;return he(this.weekYear(),e.dow,e.doy)}function is(e,t,r,n,s){var a;return e==null?et(this,n,s).year:(a=he(e,n,s),t>a&&(t=a),ad.call(this,e,t,r,n,s))}function ad(e,t,r,n,s){var a=Fn(e,t,r,n,s),i=Xe(a.year,0,a.dayOfYear);return this.year(i.getUTCFullYear()),this.month(i.getUTCMonth()),this.date(i.getUTCDate()),this}D("Q",0,"Qo","quarter"),E("Q",On),B("Q",function(e,t){t[ue]=(M(e)-1)*3});function id(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}D("D",["DD",2],"Do","date"),E("D",Y,Be),E("DD",Y,Z),E("Do",function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),B(["D","DD"],le),B("Do",function(e,t){t[le]=M(e.match(Y)[0])});var ls=Pe("Date",!0);D("DDD",["DDDD",3],"DDDo","dayOfYear"),E("DDD",kt),E("DDDD",Cn),B(["DDD","DDDD"],function(e,t,r){r._dayOfYear=M(e)});function ld(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"),E("m",Y,dr),E("mm",Y,Z),B(["m","mm"],re);var cd=Pe("Minutes",!1);D("s",["ss",2],0,"second"),E("s",Y,dr),E("ss",Y,Z),B(["s","ss"],fe);var dd=Pe("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}),E("S",kt,On),E("SS",kt,Z),E("SSS",kt,Cn);var xe,cs;for(xe="SSSS";xe.length<=9;xe+="S")E(xe,Re);function ud(e,t){t[De]=M(("0."+e)*1e3)}for(xe="S";xe.length<=9;xe+="S")B(xe,ud);cs=Pe("Milliseconds",!1),D("z",0,0,"zoneAbbr"),D("zz",0,0,"zoneName");function fd(){return this._isUTC?"UTC":""}function hd(){return this._isUTC?"Coordinated Universal Time":""}var x=Ge.prototype;x.add=oc,x.calendar=fc,x.clone=hc,x.diff=xc,x.endOf=Tc,x.format=Ec,x.from=Dc,x.fromNow=Nc,x.to=Oc,x.toNow=Cc,x.get=Si,x.invalidAt=vc,x.isAfter=mc,x.isBefore=pc,x.isBetween=yc,x.isSame=_c,x.isSameOrAfter=gc,x.isSameOrBefore=wc,x.isValid=Ac,x.lang=rs,x.locale=ts,x.localeData=ns,x.max=Al,x.min=Yl,x.parsingFlags=Fc,x.set=Ei,x.startOf=Mc,x.subtract=ac,x.toArray=Pc,x.toObject=$c,x.toDate=Bc,x.toISOString=bc,x.inspect=Sc,typeof Symbol<"u"&&Symbol.for!=null&&(x[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),x.toJSON=Yc,x.toString=kc,x.unix=Rc,x.valueOf=Vc,x.creationData=Lc,x.eraName=Wc,x.eraNarrow=Hc,x.eraAbbr=zc,x.eraYear=qc,x.year=Vn,x.isLeapYear=bi,x.weekYear=ed,x.isoWeekYear=td,x.quarter=x.quarters=id,x.month=Yn,x.daysInMonth=Bi,x.week=x.weeks=Ui,x.isoWeek=x.isoWeeks=Ii,x.weeksInYear=sd,x.weeksInWeekYear=od,x.isoWeeksInYear=rd,x.isoWeeksInISOWeekYear=nd,x.date=ls,x.day=x.days=tl,x.weekday=rl,x.isoWeekday=nl,x.dayOfYear=ld,x.hour=x.hours=dl,x.minute=x.minutes=cd,x.second=x.seconds=dd,x.millisecond=x.milliseconds=cs,x.utcOffset=zl,x.utc=Gl,x.local=Zl,x.parseZone=Jl,x.hasAlignedHourOffset=Kl,x.isDST=Ql,x.isLocal=ec,x.isUtcOffset=tc,x.isUtc=Jn,x.isUTC=Jn,x.zoneAbbr=fd,x.zoneName=hd,x.dates=J("dates accessor is deprecated. Use date instead.",ls),x.months=J("months accessor is deprecated. Use month instead",Yn),x.years=J("years accessor is deprecated. Use year instead",Vn),x.zone=J("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",ql),x.isDSTShifted=J("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",Xl);function md(e){return A(e*1e3)}function pd(){return A.apply(null,arguments).parseZone()}function ds(e){return e}var R=nr.prototype;R.calendar=ei,R.longDateFormat=si,R.invalidDate=ai,R.ordinal=ci,R.preparse=ds,R.postformat=ds,R.relativeTime=ui,R.pastFuture=fi,R.set=Qa,R.eras=Uc,R.erasParse=Ic,R.erasConvertYear=jc,R.erasAbbrRegex=Zc,R.erasNameRegex=Gc,R.erasNarrowRegex=Jc,R.months=Mi,R.monthsShort=Ti,R.monthsParse=Ri,R.monthsRegex=$i,R.monthsShortRegex=Pi,R.week=Ai,R.firstDayOfYear=Li,R.firstDayOfWeek=vi,R.weekdays=Ji,R.weekdaysMin=Qi,R.weekdaysShort=Ki,R.weekdaysParse=el,R.weekdaysRegex=sl,R.weekdaysShortRegex=ol,R.weekdaysMinRegex=al,R.isPM=ll,R.meridiem=ul;function Yt(e,t,r,n){var s=me(),a=oe().set(n,t);return s[r](a,e)}function us(e,t,r){if(ce(e)&&(t=e,e=void 0),e=e||"",t!=null)return Yt(e,t,r,"month");var n,s=[];for(n=0;n<12;n++)s[n]=Yt(e,n,r,"month");return s}function Or(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(),a=e?s._week.dow:0,i,l=[];if(r!=null)return Yt(t,(r+a)%7,n,"day");for(i=0;i<7;i++)l[i]=Yt(t,(i+a)%7,n,"day");return l}function yd(e,t){return us(e,t,"months")}function _d(e,t){return us(e,t,"monthsShort")}function gd(e,t,r){return Or(e,t,r,"weekdays")}function wd(e,t,r){return Or(e,t,r,"weekdaysShort")}function xd(e,t,r){return Or(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}}),S.lang=J("moment.lang is deprecated. Use moment.locale instead.",we),S.langData=J("moment.langData is deprecated. Use moment.localeData instead.",me);var pe=Math.abs;function kd(){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 fs(e,t,r,n){var s=ne(t,r);return e._milliseconds+=n*s._milliseconds,e._days+=n*s._days,e._months+=n*s._months,e._bubble()}function bd(e,t){return fs(this,e,t,1)}function Sd(e,t){return fs(this,e,t,-1)}function hs(e){return e<0?Math.floor(e):Math.ceil(e)}function Ed(){var e=this._milliseconds,t=this._days,r=this._months,n=this._data,s,a,i,l,d;return e>=0&&t>=0&&r>=0||e<=0&&t<=0&&r<=0||(e+=hs(Cr(r)+t)*864e5,t=0,r=0),n.milliseconds=e%1e3,s=Q(e/1e3),n.seconds=s%60,a=Q(s/60),n.minutes=a%60,i=Q(a/60),n.hours=i%24,t+=Q(i/24),d=Q(ms(t)),r+=d,t-=hs(Cr(d)),l=Q(r/12),r%=12,n.days=t,n.months=r,n.years=l,this}function ms(e){return e*4800/146097}function Cr(e){return e*146097/4800}function Dd(e){if(!this.isValid())return NaN;var t,r,n=this._milliseconds;if(e=K(e),e==="month"||e==="quarter"||e==="year")switch(t=this._days+n/864e5,r=this._months+ms(t),e){case"month":return r;case"quarter":return r/3;case"year":return r/12}else switch(t=this._days+Math.round(Cr(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 ps=ye("ms"),Nd=ye("s"),Od=ye("m"),Cd=ye("h"),Md=ye("d"),Td=ye("w"),Vd=ye("M"),Rd=ye("Q"),Bd=ye("y"),Pd=ps;function $d(){return ne(this)}function Yd(e){return e=K(e),this.isValid()?this[e+"s"]():NaN}function Oe(e){return function(){return this.isValid()?this._data[e]:NaN}}var Ad=Oe("milliseconds"),Fd=Oe("seconds"),vd=Oe("minutes"),Ld=Oe("hours"),Ud=Oe("days"),Id=Oe("months"),jd=Oe("years");function Wd(){return Q(this.days()/7)}var _e=Math.round,Fe={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Hd(e,t,r,n,s){return s.relativeTime(t||1,!!r,e,n)}function zd(e,t,r,n){var s=ne(e).abs(),a=_e(s.as("s")),i=_e(s.as("m")),l=_e(s.as("h")),d=_e(s.as("d")),c=_e(s.as("M")),u=_e(s.as("w")),m=_e(s.as("y")),w=a<=r.ss&&["s",a]||a<r.s&&["ss",a]||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&&(w=w||u<=1&&["w"]||u<r.w&&["ww",u]),w=w||c<=1&&["M"]||c<r.M&&["MM",c]||m<=1&&["y"]||["yy",m],w[2]=t,w[3]=+e>0,w[4]=n,Hd.apply(null,w)}function qd(e){return e===void 0?_e:typeof e=="function"?(_e=e,!0):!1}function Gd(e,t){return Fe[e]===void 0?!1:t===void 0?Fe[e]:(Fe[e]=t,e==="s"&&(Fe.ss=t-1),!0)}function Zd(e,t){if(!this.isValid())return this.localeData().invalidDate();var r=!1,n=Fe,s,a;return typeof e=="object"&&(t=e,e=!1),typeof e=="boolean"&&(r=e),typeof t=="object"&&(n=Object.assign({},Fe,t),t.s!=null&&t.ss==null&&(n.ss=t.s-1)),s=this.localeData(),a=zd(this,!r,n,s),r&&(a=s.pastFuture(+this,a)),s.postformat(a)}var Mr=Math.abs;function ve(e){return(e>0)-(e<0)||+e}function At(){if(!this.isValid())return this.localeData().invalidDate();var e=Mr(this._milliseconds)/1e3,t=Mr(this._days),r=Mr(this._months),n,s,a,i,l=this.asSeconds(),d,c,u,m;return l?(n=Q(e/60),s=Q(n/60),e%=60,n%=60,a=Q(r/12),r%=12,i=e?e.toFixed(3).replace(/\.?0+$/,""):"",d=l<0?"-":"",c=ve(this._months)!==ve(l)?"-":"",u=ve(this._days)!==ve(l)?"-":"",m=ve(this._milliseconds)!==ve(l)?"-":"",d+"P"+(a?c+a+"Y":"")+(r?c+r+"M":"")+(t?u+t+"D":"")+(s||n||e?"T":"")+(s?m+s+"H":"")+(n?m+n+"M":"")+(e?m+i+"S":"")):"P0D"}var T=Tt.prototype;T.isValid=Il,T.abs=kd,T.add=bd,T.subtract=Sd,T.as=Dd,T.asMilliseconds=ps,T.asSeconds=Nd,T.asMinutes=Od,T.asHours=Cd,T.asDays=Md,T.asWeeks=Td,T.asMonths=Vd,T.asQuarters=Rd,T.asYears=Bd,T.valueOf=Pd,T._bubble=Ed,T.clone=$d,T.get=Yd,T.milliseconds=Ad,T.seconds=Fd,T.minutes=vd,T.hours=Ld,T.days=Ud,T.weeks=Wd,T.months=Id,T.years=jd,T.humanize=Zd,T.toISOString=At,T.toString=At,T.toJSON=At,T.locale=ts,T.localeData=ns,T.toIsoString=J("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",At),T.lang=rs,D("X",0,0,"unix"),D("x",0,0,"valueOf"),E("x",St),E("X",yi),B("X",function(e,t,r){r._d=new Date(parseFloat(e)*1e3)}),B("x",function(e,t,r){r._d=new Date(M(e))});//! moment.js
|
|
19
|
+
S.version="2.30.1",Ja(A),S.fn=x,S.min=Fl,S.max=vl,S.now=Ll,S.utc=oe,S.unix=md,S.months=yd,S.isDate=qe,S.locale=we,S.invalid=_t,S.duration=ne,S.isMoment=te,S.weekdays=gd,S.parseZone=pd,S.localeData=me,S.isDuration=Vt,S.monthsShort=_d,S.weekdaysMin=xd,S.defineLocale=yr,S.updateLocale=pl,S.locales=yl,S.weekdaysShort=wd,S.normalizeUnits=K,S.relativeTimeRounding=qd,S.relativeTimeThreshold=Gd,S.calendarFormat=uc,S.prototype=x,S.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 Jd={class:"whitespace-nowrap"},Kd={__name:"vs-manager-table-date",props:{value:{type:String,default:()=>""}},setup(e){const t=e,r=o.computed(()=>{if(!t.value)return"-";try{const n=S(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)=>(o.openBlock(),o.createElementBlock("div",Jd,o.toDisplayString(r.value),1))}},Qd={},Xd={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 eu(e,t,r,n,s,a){return o.openBlock(),o.createElementBlock("svg",Xd,t[0]||(t[0]=[o.createElementVNode("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"},null,-1),o.createElementVNode("path",{d:"M5 12l5 5l10 -10"},null,-1)]))}const ys=I(Qd,[["render",eu]]),_s={__name:"vs-manager-table-switch",props:{value:{type:Boolean,default:()=>!1}},setup(e){return(t,r)=>(o.openBlock(),o.createElementBlock("div",{class:o.normalizeClass(["w-[20px] h-[20px] rounded-md flex items-center justify-center disabled",[e.value?"bg-blue-400":"border"]])},[o.createVNode(ys,{height:"18",width:"18",class:"text-white"})],2))}},gs={switch:_s,switcher:_s,date:Kd},tu={class:"w-full"},ru={key:0,class:"relative min-w-full divide-y-2 divide-gray-200 bg-white text-[12px]"},nu={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"},su={class:"divide-y divide-gray-200 dark:divide-neutral-700"},ou=["onClick"],au={class:"px-4 py-2 text-gray-700 max-w-[250px] admin-component-is"},iu={__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,a,i;return o.openBlock(),o.createElementBlock("div",tu,[(a=(s=e.objectData)==null?void 0:s.rows)!=null&&a.length?(o.openBlock(),o.createElementBlock("table",ru,[o.createElementVNode("thead",nu,[o.createElementVNode("tr",null,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(t,(l,d)=>o.createElementVNode("th",{key:d,class:"text-start px-4 py-2 font-medium text-gray-900 max-w-[250px]"},o.toDisplayString(l==null?void 0:l.ua),1)),64))])]),o.createElementVNode("tbody",su,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList((i=e.objectData)==null?void 0:i.rows,l=>(o.openBlock(),o.createElementBlock("tr",{class:"odd:bg-gray-50",onClick:d=>r.$router.push(`/manager-collection/${e.template}/${l==null?void 0:l.id}`)},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(t,d=>{var c;return o.createElementVNode("td",au,[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(gs)[(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:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(l==null?void 0:l[d==null?void 0:d.name]),1)]),_:2},1032,["value"]))])}),64))],8,ou))),256))])])):(o.openBlock(),o.createBlock(ze,{key:1}))])}}},lu=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("-")},cu={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},du={__name:"vs-manager-colection-table-add",props:{template:{type:String,default:()=>""}},emits:["update-list"],setup(e,{emit:t}){const r=o.getCurrentInstance().proxy.$notify,n=t,s=e,a=o.ref(!1),i=o.ref({}),l=o.ref(),d=async()=>{try{await l.value.doValidation(),i.value.url=lu(i.value.title),await C.post(`/api/cms-manager/${s.template}`,i.value),r({type:"success",title:"Успушно!",message:"Об'єкт створено успішно"}),i.value={},a.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(u,m)=>{const w=o.resolveComponent("VsForm"),k=o.resolveComponent("VsDialog");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("button",{onClick:m[0]||(m[0]=g=>a.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"}," Створити "),o.createVNode(k,{title:"Створити об'єкт",visible:a.value,"onUpdate:visible":m[3]||(m[3]=g=>a.value=g)},{footer:o.withCtx(()=>[o.createElementVNode("div",cu,[o.createElementVNode("button",{onClick:m[2]||(m[2]=g=>a.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"}," Скасувати"),o.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:o.withCtx(()=>[o.createElementVNode("div",null,[o.createVNode(w,{ref_key:"form",ref:l,scheme:c,modelValue:i.value,"onUpdate:modelValue":m[1]||(m[1]=g=>i.value=g)},null,8,["modelValue"])])]),_:1},8,["visible"])],64)}}},uu=(e,t=300)=>{let r;return function(...n){clearTimeout(r),r=setTimeout(()=>{e.apply(this,n)},t)}},fu={class:"bg-white rounded-xl p-[20px] border mt-[20px]"},hu={class:"mb-4 xl:mb-8"},mu={class:"text-lg font-semibold text-gray-800 dark:text-neutral-200"},pu={class:"text-sm text-gray-500 dark:text-neutral-500"},yu={class:"flex items-center"},_u={class:"flex justify-end ml-auto items-center"},gu={__name:"vs-manager-collection-content",props:{titles:{},titlesModifiers:{}},emits:["update:titles"],setup(e){const t=yt(),r=o.useModel(e,"titles"),n=o.computed(()=>{var l;return(l=t==null?void 0:t.params)==null?void 0:l.template}),s=o.ref(null),a=async(l=null)=>{var d;try{const{data:c}=await C.get(`/api/cms-manager/${n.value}`,{params:{search:l}});s.value=c,r.value.firstLevel=(d=c==null?void 0:c.type)==null?void 0:d.name}catch{}},i=uu(l=>a(l),300);return o.watch(n,a),o.onMounted(()=>a()),(l,d)=>{var c,u,m,w;return o.openBlock(),o.createElementBlock("div",fu,[o.createElementVNode("div",hu,[o.createElementVNode("h1",mu,o.toDisplayString((u=(c=s.value)==null?void 0:c.type)==null?void 0:u.name),1),o.createElementVNode("p",pu,o.toDisplayString((w=(m=s.value)==null?void 0:m.type)==null?void 0:w.description),1)]),o.createElementVNode("div",yu,[o.createElementVNode("input",{type:"text",onInput:d[0]||(d[0]=({target:k})=>o.unref(i)(k.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),o.createElementVNode("div",_u,[o.createVNode(du,{template:n.value,onUpdateList:a},null,8,["template"])])]),o.createVNode(iu,{objectData:s.value,template:n.value},null,8,["objectData","template"])])}}},wu={class:"flex items-center justify-between"},xu={class:"mt-[10px]"},ku={class:"font-medium text-2xl"},bu={class:"text-gray-600"},Su={class:"w-full mt-[20px] bg-white rounded-xl p-[20px] border"},Eu={__name:"vs-manager-collection-item",props:{titles:{},titlesModifiers:{}},emits:["update:titles"],setup(e){const t=o.getCurrentInstance().proxy.$notify,r=yt(),n=Jo(),s=o.computed(()=>{var g;return(g=r==null?void 0:r.params)==null?void 0:g.template}),a=o.computed(()=>{var g;return(g=r==null?void 0:r.params)==null?void 0:g.id}),i=o.ref(null),l=o.ref({}),d=o.useModel(e,"titles"),c=o.ref(1),u=async()=>{var g,_,f,p,b;try{const{data:y}=await C.get(`/api/cms-manager/${s.value}/${a.value}`);i.value=(g=y==null?void 0:y.rows)==null?void 0:g[0],l.value=(_=y==null?void 0:y.rows)==null?void 0:_[0],c.value=c.value+1,d.value.secondLevel=(p=(f=y==null?void 0:y.rows)==null?void 0:f[0])==null?void 0:p.title,d.value.firstLevel=(b=y==null?void 0:y.type)==null?void 0:b.name}catch{}},m=async()=>{try{await C.put(`/api/cms-manager/${a.value}`,l.value),await t({type:"success",title:"Успішно!",message:"Дані успішно оновлено"}),u()}catch{await t({type:"error",title:"Помилка!",message:"При спробі оновити дані виникла помилка"})}},w=async()=>{try{await C.delete(`/api/cms-manager/${a.value}`),await t({type:"success",title:"Успішно!",message:"Об'єкт видалено успішно"}),await(n==null?void 0:n.back())}catch{await t({type:"error",title:"Помилка!",message:"При спробі видалити об'єкт виникла помилка"})}};o.watch(s,u),o.onMounted(()=>u());const k={title:{ua:"Назва",type:"Text",placeholder:"Назва",validators:["required"]},body:{ua:"Контент",type:"TextEditor",validators:["required"]},enabled:{ua:"Чи увімкнений",type:"Switcher"}};return(g,_)=>{var p,b;const f=o.resolveComponent("VsForm");return o.openBlock(),o.createElementBlock(o.Fragment,null,[o.createElementVNode("div",wu,[o.createElementVNode("div",xu,[o.createElementVNode("h2",ku,o.toDisplayString((p=i.value)==null?void 0:p.title),1),o.createElementVNode("p",bu,o.toDisplayString((b=i.value)==null?void 0:b.description),1)]),o.createElementVNode("div",{class:"flex items-center gap-1"},[o.createElementVNode("button",{onClick:w,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"}," Видалити "),o.createElementVNode("button",{onClick:m,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"}," Зберегти ")])]),o.createElementVNode("div",null,[o.createElementVNode("div",Su,[(o.openBlock(),o.createBlock(f,{key:c.value,class:"w-full",scheme:k,modelValue:l.value,"onUpdate:modelValue":_[0]||(_[0]=y=>l.value=y)},null,8,["modelValue"]))])])],64)}}},Du={class:"flex items-center justify-between"},Nu={class:"mt-[10px]"},Ou={class:"font-medium text-2xl"},Cu={class:"text-gray-600"},Mu={class:"w-full mt-[20px] bg-white rounded-xl p-[20px] border"},Tu={__name:"vs-manager-single-content",setup(e){const t=yt(),r=o.computed(()=>{var c;return(c=t==null?void 0:t.params)==null?void 0:c.template}),n=o.ref(null),s=o.ref({}),a=o.ref(1),i=async()=>{var c,u;try{const{data:m}=await C.get(`/api/cms-manager/${r.value}`);n.value=(c=m==null?void 0:m.rows)==null?void 0:c[0],s.value=(u=m==null?void 0:m.rows)==null?void 0:u[0],a.value=a.value+1}catch{}},l=async()=>{var c;try{await C.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:"При спробі оновити дані виникла помилка"})}};o.watch(r,i),o.onMounted(()=>i());const d={title:{ua:"Назва",type:"Text",placeholder:"Назва"},enabled:{ua:"Чи увімкнений",type:"Switcher"}};return(c,u)=>{var w,k;const m=o.resolveComponent("VsForm");return o.openBlock(),o.createElementBlock("div",null,[o.createElementVNode("button",{onClick:u[0]||(u[0]=g=>c.$router.back()),class:"text-blue-500 flex gap-2 items-center hover:text-blue-700 duration-300"},[o.createVNode(yn,{template:r.value},null,8,["template"]),u[2]||(u[2]=o.createTextVNode(" Повернутися назад "))]),o.createElementVNode("div",Du,[o.createElementVNode("div",Nu,[o.createElementVNode("h2",Ou,o.toDisplayString((w=n.value)==null?void 0:w.title),1),o.createElementVNode("p",Cu,o.toDisplayString((k=n.value)==null?void 0:k.description),1)]),o.createElementVNode("div",{class:"flex items-center gap-1"},[o.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"}," Зберегти ")])]),o.createElementVNode("div",null,[o.createElementVNode("div",Mu,[(o.openBlock(),o.createBlock(m,{key:a.value,class:"w-full",scheme:d,modelValue:s.value,"onUpdate:modelValue":u[1]||(u[1]=g=>s.value=g)},null,8,["modelValue"]))])])])}}},Vu={},Ru={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 Bu(e,t){return o.openBlock(),o.createElementBlock("svg",Ru,t[0]||(t[0]=[o.createElementVNode("path",{d:"m3 9 9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"},null,-1),o.createElementVNode("polyline",{points:"9 22 9 12 15 12 15 22"},null,-1)]))}const Pu=I(Vu,[["render",Bu]]),$u={},Yu={"aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 6 10"};function Au(e,t){return o.openBlock(),o.createElementBlock("svg",Yu,t[0]||(t[0]=[o.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m1 9 4-4-4-4"},null,-1)]))}const ws=I($u,[["render",Au]]),Fu={components:{IconHome:Pu,IconChewronRight:ws},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)}}},vu={"aria-label":"Breadcrumb",class:"mb-4"},Lu={class:"flex items-start justify-between"},Uu={class:"flex flex-wrap items-center gap-[5px] min-h-8"},Iu={class:"flex items-center"},ju=["onClick"],Wu={key:1};function Hu(e,t,r,n,s,a){const i=o.resolveComponent("IconHome"),l=o.resolveComponent("IconChewronRight");return o.openBlock(),o.createElementBlock("nav",vu,[o.createElementVNode("div",Lu,[o.createElementVNode("ol",Uu,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.breadcrumbs,(d,c)=>(o.openBlock(),o.createElementBlock("li",{key:c,class:"whitespace-nowrap"},[o.createElementVNode("div",Iu,[o.createElementVNode("button",{onClick:u=>a.navigateTo(c),class:o.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?(o.openBlock(),o.createBlock(i,{key:0,class:"w-4 h-4"})):(o.openBlock(),o.createElementBlock("span",Wu,o.toDisplayString(d),1))],10,ju),c<s.breadcrumbs.length-1?(o.openBlock(),o.createBlock(l,{key:0,class:"text-gray-400 w-3 h-3 ml-[10px]"})):o.createCommentVNode("",!0)])]))),128))])])])}const zu=I(Fu,[["render",Hu]]),qu={},Gu={width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Zu(e,t){return o.openBlock(),o.createElementBlock("svg",Gu,t[0]||(t[0]=[o.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),o.createElementVNode("path",{d:"M12.25 12.25L9.7417 9.7417",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const Ju=I(qu,[["render",Zu]]),Ku={},Qu={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function Xu(e,t){return o.openBlock(),o.createElementBlock("svg",Qu,t[0]||(t[0]=[o.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),o.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 ef=I(Ku,[["render",Xu]]),tf={},rf={width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function nf(e,t){return o.openBlock(),o.createElementBlock("svg",rf,t[0]||(t[0]=[o.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 sf=I(tf,[["render",nf]]),of={},af={width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function lf(e,t){return o.openBlock(),o.createElementBlock("svg",af,t[0]||(t[0]=[o.createElementVNode("path",{d:"M18 6L6 18",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1),o.createElementVNode("path",{d:"M6 6L18 18",stroke:"#6B7280","stroke-linecap":"round","stroke-linejoin":"round"},null,-1)]))}const cf=I(of,[["render",lf]]),df={},uf={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 ff(e,t){return o.openBlock(),o.createElementBlock("svg",uf,t[0]||(t[0]=[o.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 hf=I(df,[["render",ff]]),mf={},pf={"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 0 16 16",width:"16",height:"16",fill:"currentColor"};function yf(e,t){return o.openBlock(),o.createElementBlock("svg",pf,t[0]||(t[0]=[o.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),o.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 _f={components:{Breadcrumb:zu,IconSearch:Ju,IconFolder:ef,IconFolder2:sf,IconClose:cf,IconImage:I(mf,[["render",yf]]),IconActions:hf,VsNotData:ze},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 C.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 C.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 C.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)}},gf={class:"w-full p-[20px] bg-gray-100 flex justify-center h-[calc(100vh-60px)]"},wf={class:"p-[20px] w-full max-w-[1640px]"},xf={class:"flex items-start justify-between"},kf={class:"flex gap-2 relative"},bf={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]"},Sf={class:"flex items-center gap-[12px]"},Ef={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"},Df={key:0,class:"flex flex-col items-center justify-center h-64 bg-gray-50 rounded-lg border text-center"},Nf={key:1},Of={class:"grid grid-cols-2 lg:grid-cols-5 gap-3 xl:gap-5"},Cf=["onClick"],Mf={class:"relative group"},Tf={class:"w-full h-36 sm:h-[170px] object-cover rounded-t-xl flex items-center justify-center"},Vf={key:0,class:"text-[#54aeff]"},Rf=["src","alt"],Bf={class:"p-3 flex items-center gap-x-3 border-t"},Pf={key:0,class:"flex shrink-0 justify-center items-center w-10 h-10 bg-white border border-solid text-gray-500 rounded-lg"},$f=["title"],Yf=["onClick"],Af={class:"block truncate text-xs text-gray-500"},Ff={class:"p-4"},vf={class:"flex justify-end"};function Lf(e,t,r,n,s,a){var f;const i=o.resolveComponent("Breadcrumb"),l=o.resolveComponent("IconSearch"),d=o.resolveComponent("IconClose"),c=o.resolveComponent("IconFolder2"),u=o.resolveComponent("VsNotData"),m=o.resolveComponent("IconFolder"),w=o.resolveComponent("IconImage"),k=o.resolveComponent("VsPagination"),g=o.resolveComponent("VsText"),_=o.resolveComponent("VsDialog");return o.openBlock(),o.createElementBlock("div",gf,[o.createElementVNode("div",wf,[o.createElementVNode("div",null,[o.createElementVNode("div",xf,[o.createVNode(i,{initialPath:a.currentDir,onUpdatePath:a.updatePath},null,8,["initialPath","onUpdatePath"]),o.createElementVNode("div",kf,[o.createElementVNode("div",bf,[o.createElementVNode("div",Sf,[o.createVNode(l),o.withDirectives(o.createElementVNode("input",{"onUpdate:modelValue":t[0]||(t[0]=p=>s.searchQuery=p),type:"text",placeholder:"Пошук за назвою...",class:"focus:outline-none"},null,512),[[o.vModelText,s.searchQuery]])]),s.searchQuery?(o.openBlock(),o.createBlock(d,{key:0,class:"w-4 h-4 cursor-pointer",onClick:a.clearSearch},null,8,["onClick"])):o.createCommentVNode("",!0)]),o.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"},[o.createVNode(c),t[7]||(t[7]=o.createTextVNode(" Додати папку "))],512),o.createElementVNode("label",Ef,[t[8]||(t[8]=o.createTextVNode(" Завантажити ")),o.createElementVNode("input",{id:"file-upload",type:"file",class:"hidden",onChange:t[2]||(t[2]=(...p)=>a.handleFileChange&&a.handleFileChange(...p))},null,32)])])]),(f=a.filteredIcons)!=null&&f.length?(o.openBlock(),o.createElementBlock("div",Nf,[o.createElementVNode("div",Of,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(a.currentIcons,p=>{var b;return o.openBlock(),o.createElementBlock("div",{key:p==null?void 0:p.id,class:o.normalizeClass(["flex flex-col bg-white border rounded-xl",{"cursor-pointer hover:border-blue-500":p.type==="dir","cursor-default":p.type!=="dir"}]),onClick:y=>p.type==="dir"?a.navigateToDir(p.name):null},[o.createElementVNode("div",Mf,[o.createElementVNode("div",Tf,[(p==null?void 0:p.type)==="dir"?(o.openBlock(),o.createElementBlock("div",Vf,[o.createVNode(m)])):(o.openBlock(),o.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:o.normalizeStyle((b=p==null?void 0:p.path)!=null&&b.includes(".svg")?"width:250px;max-height:100px":"")},null,12,Rf))])]),o.createElementVNode("div",Bf,[p.type!=="dir"?(o.openBlock(),o.createElementBlock("span",Pf,[o.createVNode(w)])):o.createCommentVNode("",!0),o.createElementVNode("div",{class:"grow truncate",title:p==null?void 0:p.name},[o.createElementVNode("p",{class:o.normalizeClass(["block truncate text-sm font-semibold text-gray-800",{"cursor-pointer":p.type!=="dir"}]),onClick:o.withModifiers(y=>p.type!=="dir"&&a.copyToClipboard(p==null?void 0:p.name),["stop"])},o.toDisplayString(p==null?void 0:p.name),11,Yf),o.createElementVNode("p",Af,o.toDisplayString(p==null?void 0:p.size),1)],8,$f)])],10,Cf)}),128))]),a.filteredIcons.length>s.iconsPerPage?(o.openBlock(),o.createBlock(k,{key:0,defaultPage:s.currentPage,class:"mt-6 focus-visible:outline-blue-500 flex !justify-center",total:a.filteredIcons.length,pageSize:s.iconsPerPage,maxPages:3,goTo:!1,onPageChange:t[3]||(t[3]=p=>s.currentPage=p)},null,8,["defaultPage","total","pageSize"])):o.createCommentVNode("",!0)])):(o.openBlock(),o.createElementBlock("div",Df,[o.createVNode(u,{text:"",class:"![&>div]:min-w-[100px] !w-auto"})]))]),o.createVNode(_,{visible:s.isAddDirModalOpen,"onUpdate:visible":t[6]||(t[6]=p=>s.isAddDirModalOpen=p),title:"Додати папку",size:"small",closeClickBack:!0,onOnClose:a.handeAddFolderClose},{default:o.withCtx(()=>[o.createElementVNode("div",Ff,[o.createVNode(g,{modelValue:s.newDirName,"onUpdate:modelValue":t[4]||(t[4]=p=>s.newDirName=p),placeholder:"Назва нової папки.."},null,8,["modelValue"]),o.createElementVNode("div",vf,[o.createElementVNode("button",{onClick:t[5]||(t[5]=(...p)=>a.addDir&&a.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 Uf=I(_f,[["render",Lf]]),If={class:"w-full bg-white p-[20px] rounded-lg mt-[20px] border"},jf={key:0,class:"relative min-w-full divide-y-2 divide-gray-200 bg-white text-[12px]"},Wf={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"},Hf={class:"divide-y divide-gray-200 dark:divide-neutral-700"},zf=["onClick"],qf={class:"px-4 py-2 text-gray-700 max-w-[250px] admin-component-is"},Gf={__name:"vs-manager-collection-list",props:{list:Object},setup(e){const t=[{ua:"Назва",name:"name",format:"Text"},{ua:"Опис",name:"description",format:"Text"},{ua:"Дата створення",name:"cdate",format:"Date"}];return(r,n)=>{var s;return o.openBlock(),o.createElementBlock("div",If,[(s=e.list)!=null&&s.length?(o.openBlock(),o.createElementBlock("table",jf,[o.createElementVNode("thead",Wf,[o.createElementVNode("tr",null,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(t,(a,i)=>o.createElementVNode("th",{key:i,class:"text-start px-4 py-2 font-medium text-gray-900 max-w-[250px]"},o.toDisplayString(a==null?void 0:a.ua),1)),64))])]),o.createElementVNode("tbody",Hf,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.list,a=>(o.openBlock(),o.createElementBlock("tr",{class:"odd:bg-gray-50",onClick:i=>r.$router.push(`/manager-collection/${a==null?void 0:a.template}`)},[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(t,i=>{var l;return o.createElementVNode("td",qf,[(o.openBlock(),o.createBlock(o.resolveDynamicComponent(o.unref(gs)[(l=i==null?void 0:i.format)==null?void 0:l.toLowerCase()]||"div"),{value:a==null?void 0:a[i==null?void 0:i.name]},{default:o.withCtx(()=>[o.createTextVNode(o.toDisplayString(a==null?void 0:a[i==null?void 0:i.name]),1)]),_:2},1032,["value"]))])}),64))],8,zf))),256))])])):(o.openBlock(),o.createBlock(ze,{key:1}))])}}},Zf={class:"flex gap-2 w-full items-center justify-between"},Jf=["checked","onChange"],Kf={__name:"vs-permissions-checkbox",props:{modelValue:{type:Array,default:()=>[]}},emits:["update:modelValue"],setup(e,{emit:t}){const r=["view","add","edit","del"],n=e,s=t,a=(i,l)=>{let d=[...n.modelValue];l?d.includes(i)||d.push(i):d=d.filter(c=>c!==i),s("update:modelValue",d)};return(i,l)=>(o.openBlock(),o.createElementBlock("div",Zf,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(r,d=>{var c,u,m;return o.createElementVNode("div",{class:"w-[120px] flex items-center justify-center",key:d},[o.createElementVNode("label",{class:o.normalizeClass(["flex h-[20px] w-[20px] items-center justify-center border text-white rounded cursor-pointer",{"bg-blue-500 border-blue-500":(c=e.modelValue)==null?void 0:c.includes(d)}])},[o.createElementVNode("input",{type:"checkbox",class:"hidden",checked:(u=e.modelValue)==null?void 0:u.includes(d),onChange:w=>a(d,w.target.checked)},null,40,Jf),(m=e.modelValue)!=null&&m.includes(d)?(o.openBlock(),o.createBlock(ys,{key:0})):o.createCommentVNode("",!0)],2)])}),64))]))}},Qf={class:"flex items-center gap-2 mb-2"},Xf={class:"w-full flex flex-col gap-2"},eh={class:"flex gap-2 items-center w-full p-3 md:gap-x-6"},th={class:"flex justify-between w-full"},rh={class:"text-xs font-medium text-start w-[80px]"},nh={class:"flex gap-2 items-center w-full p-3 bg-gray-100 rounded-lg md:gap-x-6 md:p-5"},sh={class:"font-semibold text-gray-800 dark:text-neutral-200 w-full max-w-[300px]"},oh={class:"flex justify-between w-full"},ah=["onClick"],ih={class:"flex flex-col gap-2 p-3"},lh={class:"w-full max-w-[300px]"},ch={class:"text-sm font-medium text-gray-800 dark:text-neutral-200"},dh={__name:"vs-premissions-component",props:{permissions:{},permissionsModifiers:{}},emits:["update:permissions"],setup(e){const t=o.ref(""),r=o.useModel(e,"permissions"),n=u=>o.computed(()=>{var w;const m=(w=r.value)==null?void 0:w.find(k=>(k==null?void 0:k.user_id)===u);return(m==null?void 0:m.actions)||[]}),s=(u,m)=>{r.value||(r.value=[]);const w=r.value.findIndex(k=>(k==null?void 0:k.user_id)===u);w===-1?r.value.push({user_id:u,actions:m}):r.value[w].actions=m},a=(u,m)=>{const w=i.value[u];if(!w)return;const k=[...r.value||[]],g=w.every(_=>{var p;const f=k.find(b=>(b==null?void 0:b.user_id)===(_==null?void 0:_.user_id));return(p=f==null?void 0:f.actions)==null?void 0:p.includes(m)});w.forEach(_=>{const f=k.findIndex(b=>(b==null?void 0:b.user_id)===(_==null?void 0:_.user_id));let p=[];if(f!==-1&&(p=[...k[f].actions]),g){const b=p.indexOf(m);b>-1&&p.splice(b,1)}else p.includes(m)||p.push(m);f===-1?k.push({user_id:_.user_id,actions:p}):k[f].actions=p}),r.value=k},i=o.computed(()=>{if(!r.value)return{};const u={};return r.value.forEach(m=>{const w=m==null?void 0:m.content_type_id;w&&(u[w]||(u[w]=[]),u[w].push({user_id:m.user_id,subject:m.subject,content_type_id:w,actions:m.actions||[]}))}),u}),l=()=>{},d=()=>{var u;(u=r.value)==null||u.forEach(m=>{m.actions=[]}),t.value=""},c=o.computed(()=>{const u=t.value.toLowerCase().trim();if(!u)return i.value;const m={};return Object.entries(i.value).forEach(([w,k])=>{const g=k.filter(_=>[_==null?void 0:_.subject,_==null?void 0:_.content_type_id,w].filter(Boolean).join(" ").toLowerCase().includes(u));g.length>0&&(m[w]=g)}),m});return(u,m)=>(o.openBlock(),o.createElementBlock("div",null,[o.createElementVNode("div",Qf,[o.withDirectives(o.createElementVNode("input",{type:"text",placeholder:"Пошук за назвою",class:"w-full h-[36px] border focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring rounded-md px-2","onUpdate:modelValue":m[0]||(m[0]=w=>t.value=w),onInput:l},null,544),[[o.vModelText,t.value]]),o.createElementVNode("button",{class:"text-sm border h-[36px] rounded-md px-2 hover:bg-gray-100 transition-all duration-300",onClick:d}," Скинути ")]),o.createElementVNode("div",Xf,[o.createElementVNode("div",eh,[m[1]||(m[1]=o.createElementVNode("h3",{class:"font-semibold text-gray-800 dark:text-neutral-200 w-full max-w-[300px]"}," Групи ",-1)),o.createElementVNode("div",th,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(["Перегляд","Додавання","Редагування","Видалення"],w=>o.createElementVNode("p",rh,o.toDisplayString(w),1)),64))])]),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(c.value,(w,k)=>(o.openBlock(),o.createElementBlock("div",{key:k},[o.createElementVNode("div",nh,[o.createElementVNode("h3",sh,o.toDisplayString(k),1),o.createElementVNode("div",oh,[(o.openBlock(),o.createElementBlock(o.Fragment,null,o.renderList(["view","add","edit","del"],g=>o.createElementVNode("button",{key:g,class:"text-xs font-medium text-blue-600 text-start w-[80px] decoration-2 hover:underline focus:outline-none focus:underline",onClick:_=>a(k,g)}," Вибрати всі ",8,ah)),64))])]),o.createElementVNode("div",ih,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(w,g=>(o.openBlock(),o.createElementBlock("div",{key:g.id,class:"flex gap-2 items-center w-full"},[o.createElementVNode("div",lh,[o.createElementVNode("p",ch,o.toDisplayString(g==null?void 0:g.subject),1)]),o.createVNode(Kf,{"model-value":n(g==null?void 0:g.user_id).value,"onUpdate:modelValue":_=>s(g==null?void 0:g.user_id,_),"item-id":g==null?void 0:g.user_id},null,8,["model-value","onUpdate:modelValue","item-id"])]))),128))])]))),128))])]))}},uh={class:"w-full flex justify-center bg-gray-100 h-[calc(100vh-60px)]"},fh={class:"w-full max-w-[1440px]"},hh={class:"mt-4 bg-white rounded-lg p-4 border"},mh={__name:"vs-permissions",setup(e){const t=o.getCurrentInstance().proxy.$notify,r=o.ref([]);(async()=>{try{const{data:a}=await C.get("/api/site-permissions/1");r.value=a==null?void 0:a.permissions}catch{}})();const s=async()=>{try{await C.post("/api/site-permissions/1",{permissions:r.value}),t({title:"Успішно",message:"Права збережено",type:"success"})}catch{t({title:"Помилка",text:"Помилка при збереженні прав",type:"error"})}};return(a,i)=>{var l;return o.openBlock(),o.createElementBlock("section",uh,[o.createElementVNode("div",fh,[o.createElementVNode("div",{class:"flex items-center justify-between mt-4"},[i[1]||(i[1]=o.createElementVNode("h1",{class:"text-xl font-bold"},"Permissions",-1)),o.createElementVNode("button",{onClick:s,class:"p-2 bg-blue-500 text-white rounded-md"}," Зберегти ")]),o.createElementVNode("div",hh,[(l=r.value)!=null&&l.length?(o.openBlock(),o.createBlock(dh,{key:0,permissions:r.value,"onUpdate:permissions":i[0]||(i[0]=d=>r.value=d)},null,8,["permissions"])):o.createCommentVNode("",!0)])])])}}},ph={class:"ml-5"},yh={key:0,class:"ml-1"},_h=I({__name:"vs-menu-tree-node",props:{item:{type:Object,required:!0}},emits:["item-dropped"],setup(e,{emit:t}){const r=e,n=t,s=o.ref(!1),a=o.ref(!1),i=o.ref(!1),l=o.computed(()=>r.item.children&&r.item.children.length>0),d=()=>{l.value&&(s.value=!s.value)},c=f=>{i.value=!0,f.dataTransfer.setData("application/json",JSON.stringify({id:r.item.id,title:r.item.title,url:r.item.url,children:r.item.children||[]})),f.dataTransfer.effectAllowed="move"},u=f=>{f.preventDefault(),f.dataTransfer.dropEffect="move"},m=f=>{a.value=!1,i.value=!1;try{const p=JSON.parse(f.dataTransfer.getData("application/json"));p.id!==r.item.id&&n("item-dropped",{draggedItemId:p.id,targetItemId:r.item.id,draggedItemData:p})}catch(p){console.error("Error parsing drag data:",p)}},w=f=>{a.value=!0},k=f=>{a.value=!1},g=()=>{a.value=!1,i.value=!1},_=f=>{n("item-dropped",f)};return(f,p)=>{const b=o.resolveComponent("vs-menu-tree-node",!0);return o.openBlock(),o.createElementBlock("div",ph,[o.createElementVNode("div",{class:o.normalizeClass(["draggable-item w-full",{"drag-over":a.value,dragging:i.value}]),draggable:"true",onDragstart:c,onDragover:o.withModifiers(u,["prevent"]),onDrop:o.withModifiers(m,["prevent"]),onDragenter:o.withModifiers(w,["prevent"]),onDragleave:o.withModifiers(k,["prevent"]),onDragend:g},[o.createElementVNode("button",{onClick:d,class:"text-inherit flex items-center gap-1 w-full hover:text-blue-600 p-1 px-3 rounded-lg hover:bg-gray-100"},[o.createTextVNode(o.toDisplayString(e.item.title)+" ",1),l.value?(o.openBlock(),o.createBlock(ws,{key:0,class:o.normalizeClass(["h-[8px] w-[8px] text-gray-500",{"rotate-90":s.value}])},null,8,["class"])):o.createCommentVNode("",!0)])],34),l.value&&s.value?(o.openBlock(),o.createElementBlock("div",yh,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(e.item.children,y=>(o.openBlock(),o.createBlock(b,{key:y.id,item:y,onItemDropped:_},null,8,["item"]))),128))])):o.createCommentVNode("",!0)])}}},[["__scopeId","data-v-eefd185d"]]),gh={class:"flex justify-end p-[20px] gap-[10px] border-t w-full"},wh=I({__name:"vs-menu-tree-component",setup(e){const t=o.ref(!1),r=o.ref(!1),n=o.ref(),s=o.ref([{id:1,title:"Главная",url:"/",children:[]},{id:2,title:"Блог",url:"/blog",children:[{id:3,title:"Последние посты",url:"/blog/latest",children:[{id:4,title:"Новости",url:"/blog/latest/news",children:[]},{id:5,title:"Статьи",url:"/blog/latest/articles",children:[{id:6,title:"Технологии",url:"/blog/latest/articles/tech",children:[]},{id:7,title:"Бизнес",url:"/blog/latest/articles/business",children:[]}]}]},{id:8,title:"Архив",url:"/blog/archive",children:[]}]},{id:9,title:"О нас",url:"/about",children:[{id:10,title:"Команда",url:"/about/team",children:[]},{id:11,title:"Контакты",url:"/about/contacts",children:[{id:12,title:"Офисы",url:"/about/contacts/offices",children:[]},{id:13,title:"Поддержка",url:"/about/contacts/support",children:[]}]}]},{id:14,title:"Услуги",url:"/services",children:[{id:15,title:"Веб-разработка",url:"/services/web",children:[]},{id:16,title:"Мобильные приложения",url:"/services/mobile",children:[]}]}]),a=o.computed(()=>({id:{type:"Text",validators:["required"],label:"ID"},title:{type:"Text",validators:["required"],label:"Назва"},url:{type:"Text",validators:["required"],label:"URL"},parentId:{type:"Select",label:"Родитель",options:i(s.value)}})),i=_=>{const f=[];return _.forEach(p=>{var b;f.push({text:p.title,id:p.id}),p!=null&&p.children&&((b=p==null?void 0:p.children)==null?void 0:b.length)>0&&f.push(...i(p.children))}),f},l=(_,f,p=null)=>{for(let b=0;b<_.length;b++){if(_[b].id===f)return{item:_[b],parent:p,index:b};if(_[b].children&&_[b].children.length>0){const y=l(_[b].children,f,_[b]);if(y)return y}}return null},d=({draggedItemId:_,targetItemId:f,draggedItemData:p})=>{if(_===f)return;const b=l(s.value,_),y=l(s.value,f);if(!b||!y)return;const{parent:P,index:$}=b,{item:H}=y;if(P&&P.id===f)return;const U=(Ue,bs)=>Ue.id===bs?!0:Ue.children?Ue.children.some(Sh=>U(Sh,bs)):!1;if(U(p,f))return;const Le={id:p.id,title:p.title,url:p.url,children:p.children||[]};P?P.children.splice($,1):s.value.splice($,1),H.children||(H.children=[]),H.children.push(Le)},c=(_,f)=>{for(const p of _){if(p.id===f)return p;if(p.children&&p.children.length>0){const b=c(p.children,f);if(b)return b}}return null},u=async()=>{const _={id:String(Math.random()),title:n.value.title,url:n.value.url,children:[]};if(n.value.parentId){const f=c(s.value,n.value.parentId);f&&f.children.push(_)}else s.value.push(_);t.value=!1,n.value={}},m=_=>{_.preventDefault(),_.dataTransfer.dropEffect="move"},w=_=>{r.value=!1;try{const f=JSON.parse(_.dataTransfer.getData("application/json")),p=l(s.value,f.id);if(!p)return;const{parent:b,index:y}=p,P={id:f.id,title:f.title,url:f.url,children:f.children||[]};b?b.children.splice(y,1):s.value.splice(y,1),s.value.push(P)}catch(f){console.error("Error parsing drag data:",f)}},k=_=>{r.value=!0},g=_=>{r.value=!1};return(_,f)=>{const p=o.resolveComponent("VsForm"),b=o.resolveComponent("VsDialog");return o.openBlock(),o.createElementBlock("div",null,[o.createElementVNode("div",{class:o.normalizeClass(["p-2 rounded-lg border border-dashed border-gray-200 mb-1",{"root-drag-over":r.value}]),onDragover:o.withModifiers(m,["prevent"]),onDrop:o.withModifiers(w,["prevent"]),onDragenter:o.withModifiers(k,["prevent"]),onDragleave:o.withModifiers(g,["prevent"])},f[4]||(f[4]=[o.createElementVNode("div",{class:"text-center text-gray-500 min-w-[300px]"}," Перемістити в корінь ",-1)]),34),(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(s.value,(y,P)=>(o.openBlock(),o.createBlock(_h,{key:y.id,item:y,onItemDropped:d},null,8,["item"]))),128)),o.createElementVNode("button",{class:"px-3 text-blue-500 hover:text-blue-700 duration-300 hover:underline hover:underline-2",onClick:f[0]||(f[0]=y=>t.value=!0)}," Добавить "),o.createVNode(b,{visible:t.value,"onUpdate:visible":f[3]||(f[3]=y=>t.value=y),title:"Додати елемент меню"},{footer:o.withCtx(()=>[o.createElementVNode("div",gh,[o.createElementVNode("button",{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",onClick:f[2]||(f[2]=y=>t.value=!1)}," Скасувати"),o.createElementVNode("button",{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",onClick:u}," Зберегти ")])]),default:o.withCtx(()=>[o.createVNode(p,{scheme:a.value,modelValue:n.value,"onUpdate:modelValue":f[1]||(f[1]=y=>n.value=y)},null,8,["scheme","modelValue"])]),_:1},8,["visible"])])}}},[["__scopeId","data-v-84b80de2"]]),xh={class:"w-full flex justify-center bg-gray-100 h-[calc(100vh-60px)]"},kh={class:"p-[20px] w-full max-w-[1440px]"},bh={class:"w-full bg-white rounded-lg p-[20px] border mt-[20px]"},xs={"vs-builder":Pa,"vs-builder-content":fa,"vs-manager-single":Ia,"vs-manager-single-content":Tu,"vs-manager-collection":Za,"vs-manager-collection-list":Gf,"vs-manager-collection-content":gu,"vs-manager-collection-item-content":Eu,"vs-media":Uf,"vs-permissions":mh,"vs-menu-tree":{__name:"vs-menu-tree",setup(e){return(t,r)=>(o.openBlock(),o.createElementBlock("section",xh,[o.createElementVNode("div",kh,[r[0]||(r[0]=o.createElementVNode("h1",null,"Дерево меню",-1)),o.createElementVNode("div",bh,[o.createVNode(wh)])])]))}}},ks={install:e=>{var t;(t=Object.entries(xs))==null||t.forEach(([r,n])=>e.component(r,n))},components:xs};return typeof window<"u"&&(window.v3Cms=ks),ks});
|