@kong-ui-public/core 1.1.0 → 1.1.2-pr.618.1de3214.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -5
- package/dist/core.es.js +566 -974
- package/dist/core.umd.js +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/types/useSwrvRequest/index.d.ts +0 -13
- package/dist/types/useSwrvRequest/index.d.ts.map +0 -1
package/dist/core.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(p,w){typeof exports=="object"&&typeof module<"u"?w(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],w):(p=typeof globalThis<"u"?globalThis:p||self,w(p["kong-ui-core"]={},p.Vue))})(this,function(p,w){"use strict";function j(r){"@babel/helpers - typeof";return j=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(r)}function W(r){if(r===null||r===!0||r===!1)return NaN;var e=Number(r);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function S(r,e){if(e.length<r)throw new TypeError(r+" argument"+(r>1?"s":"")+" required, but only "+e.length+" present")}function M(r){S(1,arguments);var e=Object.prototype.toString.call(r);return r instanceof Date||j(r)==="object"&&e==="[object Date]"?new Date(r.getTime()):typeof r=="number"||e==="[object Number]"?new Date(r):((typeof r=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function be(r,e){S(2,arguments);var t=M(r).getTime(),n=W(e);return new Date(t+n)}var ye={};function B(){return ye}function Te(r){var e=new Date(Date.UTC(r.getFullYear(),r.getMonth(),r.getDate(),r.getHours(),r.getMinutes(),r.getSeconds(),r.getMilliseconds()));return e.setUTCFullYear(r.getFullYear()),r.getTime()-e.getTime()}function pe(r){return S(1,arguments),r instanceof Date||j(r)==="object"&&Object.prototype.toString.call(r)==="[object Date]"}function Se(r){if(S(1,arguments),!pe(r)&&typeof r!="number")return!1;var e=M(r);return!isNaN(Number(e))}function Ce(r,e){S(2,arguments);var t=W(e);return be(r,-t)}var De=864e5;function Oe(r){S(1,arguments);var e=M(r),t=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var n=e.getTime(),a=t-n;return Math.floor(a/De)+1}function X(r){S(1,arguments);var e=1,t=M(r),n=t.getUTCDay(),a=(n<e?7:0)+n-e;return t.setUTCDate(t.getUTCDate()-a),t.setUTCHours(0,0,0,0),t}function ie(r){S(1,arguments);var e=M(r),t=e.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(t+1,0,4),n.setUTCHours(0,0,0,0);var a=X(n),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var o=X(i);return e.getTime()>=a.getTime()?t+1:e.getTime()>=o.getTime()?t:t-1}function Ee(r){S(1,arguments);var e=ie(r),t=new Date(0);t.setUTCFullYear(e,0,4),t.setUTCHours(0,0,0,0);var n=X(t);return n}var Pe=6048e5;function Me(r){S(1,arguments);var e=M(r),t=X(e).getTime()-Ee(e).getTime();return Math.round(t/Pe)+1}function Q(r,e){var t,n,a,i,o,s,l,u;S(1,arguments);var c=B(),h=W((t=(n=(a=(i=e==null?void 0:e.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:c.weekStartsOn)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&t!==void 0?t:0);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var d=M(r),f=d.getUTCDay(),g=(f<h?7:0)+f-h;return d.setUTCDate(d.getUTCDate()-g),d.setUTCHours(0,0,0,0),d}function oe(r,e){var t,n,a,i,o,s,l,u;S(1,arguments);var c=M(r),h=c.getUTCFullYear(),d=B(),f=W((t=(n=(a=(i=e==null?void 0:e.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:d.firstWeekContainsDate)!==null&&n!==void 0?n:(l=d.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var g=new Date(0);g.setUTCFullYear(h+1,0,f),g.setUTCHours(0,0,0,0);var y=Q(g,e),C=new Date(0);C.setUTCFullYear(h,0,f),C.setUTCHours(0,0,0,0);var L=Q(C,e);return c.getTime()>=y.getTime()?h+1:c.getTime()>=L.getTime()?h:h-1}function ke(r,e){var t,n,a,i,o,s,l,u;S(1,arguments);var c=B(),h=W((t=(n=(a=(i=e==null?void 0:e.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(s=o.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:c.firstWeekContainsDate)!==null&&n!==void 0?n:(l=c.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&t!==void 0?t:1),d=oe(r,e),f=new Date(0);f.setUTCFullYear(d,0,h),f.setUTCHours(0,0,0,0);var g=Q(f,e);return g}var _e=6048e5;function Re(r,e){S(1,arguments);var t=M(r),n=Q(t,e).getTime()-ke(t,e).getTime();return Math.round(n/_e)+1}function v(r,e){for(var t=r<0?"-":"",n=Math.abs(r).toString();n.length<e;)n="0"+n;return t+n}var xe={y:function(e,t){var n=e.getUTCFullYear(),a=n>0?n:1-n;return v(t==="yy"?a%100:a,t.length)},M:function(e,t){var n=e.getUTCMonth();return t==="M"?String(n+1):v(n+1,2)},d:function(e,t){return v(e.getUTCDate(),t.length)},a:function(e,t){var n=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(e,t){return v(e.getUTCHours()%12||12,t.length)},H:function(e,t){return v(e.getUTCHours(),t.length)},m:function(e,t){return v(e.getUTCMinutes(),t.length)},s:function(e,t){return v(e.getUTCSeconds(),t.length)},S:function(e,t){var n=t.length,a=e.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,n-3));return v(i,t.length)}};const x=xe;var Y={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ue={G:function(e,t,n){var a=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){var a=e.getUTCFullYear(),i=a>0?a:1-a;return n.ordinalNumber(i,{unit:"year"})}return x.y(e,t)},Y:function(e,t,n,a){var i=oe(e,a),o=i>0?i:1-i;if(t==="YY"){var s=o%100;return v(s,2)}return t==="Yo"?n.ordinalNumber(o,{unit:"year"}):v(o,t.length)},R:function(e,t){var n=ie(e);return v(n,t.length)},u:function(e,t){var n=e.getUTCFullYear();return v(n,t.length)},Q:function(e,t,n){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return v(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(e,t,n){var a=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return v(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(e,t,n){var a=e.getUTCMonth();switch(t){case"M":case"MM":return x.M(e,t);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(e,t,n){var a=e.getUTCMonth();switch(t){case"L":return String(a+1);case"LL":return v(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(e,t,n,a){var i=Re(e,a);return t==="wo"?n.ordinalNumber(i,{unit:"week"}):v(i,t.length)},I:function(e,t,n){var a=Me(e);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):v(a,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getUTCDate(),{unit:"date"}):x.d(e,t)},D:function(e,t,n){var a=Oe(e);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):v(a,t.length)},E:function(e,t,n){var a=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(e,t,n,a){var i=e.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return v(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,n,a){var i=e.getUTCDay(),o=(i-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return v(o,t.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,n){var a=e.getUTCDay(),i=a===0?7:a;switch(t){case"i":return String(i);case"ii":return v(i,t.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(e,t,n){var a=e.getUTCHours(),i=a/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,n){var a=e.getUTCHours(),i;switch(a===12?i=Y.noon:a===0?i=Y.midnight:i=a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,n){var a=e.getUTCHours(),i;switch(a>=17?i=Y.evening:a>=12?i=Y.afternoon:a>=4?i=Y.morning:i=Y.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){var a=e.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return x.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getUTCHours(),{unit:"hour"}):x.H(e,t)},K:function(e,t,n){var a=e.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):v(a,t.length)},k:function(e,t,n){var a=e.getUTCHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):v(a,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):x.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):x.s(e,t)},S:function(e,t){return x.S(e,t)},X:function(e,t,n,a){var i=a._originalDate||e,o=i.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return le(o);case"XXXX":case"XX":return A(o);case"XXXXX":case"XXX":default:return A(o,":")}},x:function(e,t,n,a){var i=a._originalDate||e,o=i.getTimezoneOffset();switch(t){case"x":return le(o);case"xxxx":case"xx":return A(o);case"xxxxx":case"xxx":default:return A(o,":")}},O:function(e,t,n,a){var i=a._originalDate||e,o=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ue(o,":");case"OOOO":default:return"GMT"+A(o,":")}},z:function(e,t,n,a){var i=a._originalDate||e,o=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ue(o,":");case"zzzz":default:return"GMT"+A(o,":")}},t:function(e,t,n,a){var i=a._originalDate||e,o=Math.floor(i.getTime()/1e3);return v(o,t.length)},T:function(e,t,n,a){var i=a._originalDate||e,o=i.getTime();return v(o,t.length)}};function ue(r,e){var t=r>0?"-":"+",n=Math.abs(r),a=Math.floor(n/60),i=n%60;if(i===0)return t+String(a);var o=e||"";return t+String(a)+o+v(i,2)}function le(r,e){if(r%60===0){var t=r>0?"-":"+";return t+v(Math.abs(r)/60,2)}return A(r,e)}function A(r,e){var t=e||"",n=r>0?"-":"+",a=Math.abs(r),i=v(Math.floor(a/60),2),o=v(a%60,2);return n+i+t+o}const We=Ue;var se=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},ce=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Ae=function(e,t){var n=e.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return se(e,t);var o;switch(a){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",se(a,t)).replace("{{time}}",ce(i,t))},Le={p:ce,P:Ae};const Ne=Le;var Ye=["D","DD"],Ie=["YY","YYYY"];function Fe(r){return Ye.indexOf(r)!==-1}function $e(r){return Ie.indexOf(r)!==-1}function de(r,e,t){if(r==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(r==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(r==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(r==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var He={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Ve=function(e,t,n){var a,i=He[e];return typeof i=="string"?a=i:t===1?a=i.one:a=i.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};const qe=Ve;function ee(r){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.width?String(e.width):r.defaultWidth,n=r.formats[t]||r.formats[r.defaultWidth];return n}}var Ge={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},je={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Be={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Xe={date:ee({formats:Ge,defaultWidth:"full"}),time:ee({formats:je,defaultWidth:"full"}),dateTime:ee({formats:Be,defaultWidth:"full"})};const Qe=Xe;var Je={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ke=function(e,t,n,a){return Je[e]};const ze=Ke;function V(r){return function(e,t){var n=t!=null&&t.context?String(t.context):"standalone",a;if(n==="formatting"&&r.formattingValues){var i=r.defaultFormattingWidth||r.defaultWidth,o=t!=null&&t.width?String(t.width):i;a=r.formattingValues[o]||r.formattingValues[i]}else{var s=r.defaultWidth,l=t!=null&&t.width?String(t.width):r.defaultWidth;a=r.values[l]||r.values[s]}var u=r.argumentCallback?r.argumentCallback(e):e;return a[u]}}var Ze={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},et={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},tt={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},rt={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},nt={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},at={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},it=function(e,t){var n=Number(e),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ot={ordinalNumber:it,era:V({values:Ze,defaultWidth:"wide"}),quarter:V({values:et,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:V({values:tt,defaultWidth:"wide"}),day:V({values:rt,defaultWidth:"wide"}),dayPeriod:V({values:nt,defaultWidth:"wide",formattingValues:at,defaultFormattingWidth:"wide"})};const ut=ot;function q(r){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,a=n&&r.matchPatterns[n]||r.matchPatterns[r.defaultMatchWidth],i=e.match(a);if(!i)return null;var o=i[0],s=n&&r.parsePatterns[n]||r.parsePatterns[r.defaultParseWidth],l=Array.isArray(s)?st(s,function(h){return h.test(o)}):lt(s,function(h){return h.test(o)}),u;u=r.valueCallback?r.valueCallback(l):l,u=t.valueCallback?t.valueCallback(u):u;var c=e.slice(o.length);return{value:u,rest:c}}}function lt(r,e){for(var t in r)if(r.hasOwnProperty(t)&&e(r[t]))return t}function st(r,e){for(var t=0;t<r.length;t++)if(e(r[t]))return t}function ct(r){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=e.match(r.matchPattern);if(!n)return null;var a=n[0],i=e.match(r.parsePattern);if(!i)return null;var o=r.valueCallback?r.valueCallback(i[0]):i[0];o=t.valueCallback?t.valueCallback(o):o;var s=e.slice(a.length);return{value:o,rest:s}}}var dt=/^(\d+)(th|st|nd|rd)?/i,ft=/\d+/i,ht={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},vt={any:[/^b/i,/^(a|c)/i]},mt={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},gt={any:[/1/i,/2/i,/3/i,/4/i]},wt={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},bt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},yt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Tt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},pt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},St={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ct={ordinalNumber:ct({matchPattern:dt,parsePattern:ft,valueCallback:function(e){return parseInt(e,10)}}),era:q({matchPatterns:ht,defaultMatchWidth:"wide",parsePatterns:vt,defaultParseWidth:"any"}),quarter:q({matchPatterns:mt,defaultMatchWidth:"wide",parsePatterns:gt,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:q({matchPatterns:wt,defaultMatchWidth:"wide",parsePatterns:bt,defaultParseWidth:"any"}),day:q({matchPatterns:yt,defaultMatchWidth:"wide",parsePatterns:Tt,defaultParseWidth:"any"}),dayPeriod:q({matchPatterns:pt,defaultMatchWidth:"any",parsePatterns:St,defaultParseWidth:"any"})},Dt={code:"en-US",formatDistance:qe,formatLong:Qe,formatRelative:ze,localize:ut,match:Ct,options:{weekStartsOn:0,firstWeekContainsDate:1}};const Ot=Dt;var Et=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Pt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Mt=/^'([^]*?)'?$/,kt=/''/g,_t=/[a-zA-Z]/;function Rt(r,e,t){var n,a,i,o,s,l,u,c,h,d,f,g,y,C,L,b,m,$;S(2,arguments);var D=String(e),O=B(),E=(n=(a=t==null?void 0:t.locale)!==null&&a!==void 0?a:O.locale)!==null&&n!==void 0?n:Ot,N=W((i=(o=(s=(l=t==null?void 0:t.firstWeekContainsDate)!==null&&l!==void 0?l:t==null||(u=t.locale)===null||u===void 0||(c=u.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&s!==void 0?s:O.firstWeekContainsDate)!==null&&o!==void 0?o:(h=O.locale)===null||h===void 0||(d=h.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(N>=1&&N<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var H=W((f=(g=(y=(C=t==null?void 0:t.weekStartsOn)!==null&&C!==void 0?C:t==null||(L=t.locale)===null||L===void 0||(b=L.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&y!==void 0?y:O.weekStartsOn)!==null&&g!==void 0?g:(m=O.locale)===null||m===void 0||($=m.options)===null||$===void 0?void 0:$.weekStartsOn)!==null&&f!==void 0?f:0);if(!(H>=0&&H<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!E.localize)throw new RangeError("locale must contain localize property");if(!E.formatLong)throw new RangeError("locale must contain formatLong property");var U=M(r);if(!Se(U))throw new RangeError("Invalid time value");var z=Te(U),G=Ce(U,z),_={firstWeekContainsDate:N,weekStartsOn:H,locale:E,_originalDate:U},Z=D.match(Pt).map(function(T){var P=T[0];if(P==="p"||P==="P"){var R=Ne[P];return R(T,E.formatLong)}return T}).join("").match(Et).map(function(T){if(T==="''")return"'";var P=T[0];if(P==="'")return xt(T);var R=We[P];if(R)return!(t!=null&&t.useAdditionalWeekYearTokens)&&$e(T)&&de(T,e,String(r)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&Fe(T)&&de(T,e,String(r)),R(G,T,E.localize,_);if(P.match(_t))throw new RangeError("Format string contains an unescaped latin alphabet character `"+P+"`");return T}).join("");return Z}function xt(r){var e=r.match(Mt);return e?e[1].replace(kt,"'"):r}function Ut(){return{formatDateBy:(t,n={})=>{if(isNaN(t))return null;try{return new Date(t*1e3).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",weekday:"short",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,...n})}catch{return null}},formatUnixToDate:(t,n)=>{if(!t)return"";const a=n?"yyyy-MM-dd HH:mm:ss":"yyyy-MM-dd HH:mm:ss XX";try{const i=new Date(t*1e3);return Rt(i,a)}catch{return""}}}}function Wt(){return{debounce:(e,t)=>{let n;return(...a)=>{clearTimeout(n),n=window==null?void 0:window.setTimeout(()=>{e(...a)},t)}}}}function At({script:r,styles:e,onReady:t}){const n=w.ref(!0),a=w.ref(!0),i=async()=>{const{libName:l,url:u,type:c}=r;if((c!==void 0&&["umd","es"].includes(c)?c:"umd")==="es"){await import(u),typeof t=="function"&&await t();return}const d=l.startsWith("kong-ui-")?l:`kong-ui-${l}`;return window[d]||(window[d]=await new Promise((f,g)=>{const y=document.createElement("script");y.async=!0,y.addEventListener("load",async()=>{typeof t=="function"&&await t(),n.value=!1,f(window[d])}),y.addEventListener("error",()=>{g(new Error(`Could not load '${d}' from ${u}`))}),y.src=u,document.head.appendChild(y)})),window[d]},o=async(l,u)=>{var c;for(const h of l){const d=document.createElement("link");d.type="text/css",d.rel="stylesheet",d.href=h;const f=u?document.querySelector(u):null,g=u?(c=f==null?void 0:f.shadowRoot)==null?void 0:c.children[0]:null;if(f&&g)try{g.appendChild(d)}catch{document.head.appendChild(d)}else document.head.appendChild(d)}};return{importPackage:async()=>{var u,c;if(!r||!r.url||typeof window>"u"||typeof document>"u")return;const l=w.computed(()=>!!(e&&(e!=null&&e.urls)&&(e!=null&&e.urls.length)&&e.shadowRoot));if((!e||!(e!=null&&e.urls)||!((u=e==null?void 0:e.urls)!=null&&u.length))&&(a.value=!1),e!=null&&e.urls&&((c=e==null?void 0:e.urls)!=null&&c.length)&&!l.value&&(await o(e.urls),a.value=!1),(!r.type||r.type==="umd")&&!l.value)return await i();await i(),await w.nextTick(),n.value=!1,e!=null&&e.urls&&l.value&&(await o(e.urls,e==null?void 0:e.shadowRoot),await w.nextTick(),a.value=!1)},loadingPackage:w.readonly(n),loadingStyles:w.readonly(a)}}var te=new WeakMap,fe=0;function Lt(r){if(!r.length)return"";for(var e="arg",t=0;t<r.length;++t){var n=void 0;r[t]===null||typeof r[t]!="object"&&typeof r[t]!="function"?typeof r[t]=="string"?n='"'+r[t]+'"':n=String(r[t]):te.has(r[t])?n=te.get(r[t]):(n=fe,te.set(r[t],fe++)),e+="@"+n}return e}function Nt(r){if(typeof r=="function")try{r=r()}catch{r=""}return Array.isArray(r)?r=Lt(r):r=String(r||""),r}var re=function(){function r(e){e===void 0&&(e=0),this.items=new Map,this.ttl=e}return r.prototype.serializeKey=function(e){return Nt(e)},r.prototype.get=function(e){var t=this.serializeKey(e);return this.items.get(t)},r.prototype.set=function(e,t,n){var a=this.serializeKey(e),i=n||this.ttl,o=Date.now(),s={data:t,createdAt:o,expiresAt:i?o+i:1/0};this.dispatchExpire(i,s,a),this.items.set(a,s)},r.prototype.dispatchExpire=function(e,t,n){var a=this;e&&setTimeout(function(){var i=Date.now(),o=i>=t.expiresAt;o&&a.delete(n)},e)},r.prototype.delete=function(e){this.items.delete(e)},r}();function Yt(){return typeof navigator.onLine<"u"?navigator.onLine:!0}function It(){return typeof document<"u"&&typeof document.visibilityState<"u"?document.visibilityState!=="hidden":!0}var Ft=function(r){return fetch(r).then(function(e){return e.json()})};const ne={isOnline:Yt,isDocumentVisible:It,fetcher:Ft};var k=globalThis&&globalThis.__assign||function(){return k=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++){e=arguments[t];for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a])}return r},k.apply(this,arguments)},I=globalThis&&globalThis.__awaiter||function(r,e,t,n){function a(i){return i instanceof t?i:new t(function(o){o(i)})}return new(t||(t=Promise))(function(i,o){function s(c){try{u(n.next(c))}catch(h){o(h)}}function l(c){try{u(n.throw(c))}catch(h){o(h)}}function u(c){c.done?i(c.value):a(c.value).then(s,l)}u((n=n.apply(r,e||[])).next())})},F=globalThis&&globalThis.__generator||function(r,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},n,a,i,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function s(u){return function(c){return l([u,c])}}function l(u){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,a&&(i=u[0]&2?a.return:u[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,u[1])).done)return i;switch(a=0,i&&(u=[u[0]&2,i.value]),u[0]){case 0:case 1:i=u;break;case 4:return t.label++,{value:u[1],done:!1};case 5:t.label++,a=u[1],u=[0];continue;case 7:u=t.ops.pop(),t.trys.pop();continue;default:if(i=t.trys,!(i=i.length>0&&i[i.length-1])&&(u[0]===6||u[0]===2)){t=0;continue}if(u[0]===3&&(!i||u[1]>i[0]&&u[1]<i[3])){t.label=u[1];break}if(u[0]===6&&t.label<i[1]){t.label=i[1],i=u;break}if(i&&t.label<i[2]){t.label=i[2],t.ops.push(u);break}i[2]&&t.ops.pop(),t.trys.pop();continue}u=e.call(r,t)}catch(c){u=[6,c],a=0}finally{n=i=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},$t=globalThis&&globalThis.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),a,i=[],o;try{for(;(e===void 0||e-- >0)&&!(a=n.next()).done;)i.push(a.value)}catch(s){o={error:s}}finally{try{a&&!a.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return i},Ht=globalThis&&globalThis.__spreadArray||function(r,e,t){if(t||arguments.length===2)for(var n=0,a=e.length,i;n<a;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return r.concat(i||Array.prototype.slice.call(e))},he=new re,J=new re,ae=new re,ve={cache:he,refreshInterval:0,ttl:0,serverTTL:1e3,dedupingInterval:2e3,revalidateOnFocus:!0,revalidateDebounce:0,shouldRetryOnError:!0,errorRetryInterval:5e3,errorRetryCount:5,fetcher:ne.fetcher,isOnline:ne.isOnline,isDocumentVisible:ne.isDocumentVisible};function Vt(r,e,t){var n=J.get(r);if(n)n.data.push(e);else{var a=5e3;J.set(r,[e],t>0?t+a:t)}}function qt(r,e,t){if(t.isDocumentVisible()&&!(t.errorRetryCount!==void 0&&e>t.errorRetryCount)){var n=Math.min(e||0,t.errorRetryCount),a=n*t.errorRetryInterval;setTimeout(function(){r(null,{errorRetryCount:n+1,shouldRetryOnError:!0})},a)}}var me=function(r,e,t,n){return t===void 0&&(t=he),n===void 0&&(n=ve.ttl),I(void 0,void 0,void 0,function(){var a,i,o,s,l,u,c;return F(this,function(h){switch(h.label){case 0:if(!jt(e))return[3,5];h.label=1;case 1:return h.trys.push([1,3,,4]),[4,e];case 2:return a=h.sent(),[3,4];case 3:return s=h.sent(),i=s,[3,4];case 4:return[3,6];case 5:a=e,h.label=6;case 6:if(o=!1,l={data:a,error:i,isValidating:o},typeof a<"u")try{t.set(r,l,n)}catch(d){console.error("swrv(mutate): failed to set cache",d)}return u=J.get(r),u&&u.data.length&&(c=u.data.filter(function(d){return d.key===r}),c.forEach(function(d,f){typeof l.data<"u"&&(d.data=l.data),d.error=l.error,d.isValidating=l.isValidating;var g=f===c.length-1;g||delete c[f]}),c=c.filter(Boolean)),[2,l]}})})};function Gt(){for(var r=this,e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n,a,i=k({},ve),o=!1,s=!1,l=w.getCurrentInstance(),u=(l==null?void 0:l.proxy)||l;if(!u)return console.error("Could not get current instance, check to make sure that `useSwrv` is declared in the top level of the setup function."),null;var c=(u==null?void 0:u.$isServer)||!1;e.length>=1&&(n=e[0]),e.length>=2&&(a=e[1]),e.length>2&&(i=k(k({},i),e[2]));var h=c?i.serverTTL:i.ttl,d=typeof n=="function"?n:w.ref(n);typeof a>"u"&&(a=i.fetcher);var f=null;f||(f=w.reactive({data:void 0,error:void 0,isValidating:!0,key:null}));var g=function(b,m){return I(r,void 0,void 0,function(){var $,D,O,E,N,H,U,z=this;return F(this,function(G){switch(G.label){case 0:return $=f.data===void 0,D=d.value,D?(O=i.cache.get(D),E=O&&O.data,f.isValidating=!0,E&&(f.data=E.data,f.error=E.error),N=b||a,!N||!i.isDocumentVisible()&&!$||(m==null?void 0:m.forceRevalidate)!==void 0&&!(m!=null&&m.forceRevalidate)?(f.isValidating=!1,[2]):O&&(H=!!(Date.now()-O.createdAt>=i.dedupingInterval||m!=null&&m.forceRevalidate),!H)?(f.isValidating=!1,[2]):(U=function(){return I(z,void 0,void 0,function(){var _,Z,T,P;return F(this,function(R){switch(R.label){case 0:return _=ae.get(D),_?[3,2]:(Z=Array.isArray(D)?D:[D],T=N.apply(void 0,Ht([],$t(Z),!1)),ae.set(D,T,i.dedupingInterval),[4,me(D,T,i.cache,h)]);case 1:return R.sent(),[3,4];case 2:return[4,me(D,_.data,i.cache,h)];case 3:R.sent(),R.label=4;case 4:return f.isValidating=!1,ae.delete(D),f.error!==void 0&&(P=!o&&i.shouldRetryOnError&&(m?m.shouldRetryOnError:!0),P&&qt(g,m?m.errorRetryCount:1,i)),[2]}})})},E&&i.revalidateDebounce?(setTimeout(function(){return I(z,void 0,void 0,function(){return F(this,function(_){switch(_.label){case 0:return o?[3,2]:[4,U()];case 1:_.sent(),_.label=2;case 2:return[2]}})})},i.revalidateDebounce),[3,3]):[3,1])):[2];case 1:return[4,U()];case 2:G.sent(),G.label=3;case 3:return[2]}})})},y=function(){return I(r,void 0,void 0,function(){return F(this,function(b){return[2,g(null,{shouldRetryOnError:!1})]})})},C=null;w.onMounted(function(){var b=function(){return I(r,void 0,void 0,function(){return F(this,function(m){switch(m.label){case 0:return!f.error&&i.isOnline()?[4,g()]:[3,2];case 1:return m.sent(),[3,3];case 2:C&&clearTimeout(C),m.label=3;case 3:return i.refreshInterval&&!o&&(C=setTimeout(b,i.refreshInterval)),[2]}})})};i.refreshInterval&&(C=setTimeout(b,i.refreshInterval)),i.revalidateOnFocus&&(document.addEventListener("visibilitychange",y,!1),window.addEventListener("focus",y,!1))}),w.onUnmounted(function(){o=!0,C&&clearTimeout(C),i.revalidateOnFocus&&(document.removeEventListener("visibilitychange",y,!1),window.removeEventListener("focus",y,!1));var b=J.get(d.value);b&&(b.data=b.data.filter(function(m){return m!==f}))});try{w.watch(d,function(b){w.isReadonly(d)||(d.value=b),f.key=b,f.isValidating=!!b,Vt(d.value,f,h),!c&&!s&&d.value&&g(),s=!1},{immediate:!0})}catch{}var L=k(k({},w.toRefs(f)),{mutate:function(b,m){return g(b,k(k({},m),{forceRevalidate:!0}))}});return L}function jt(r){return r!==null&&typeof r=="object"&&typeof r.then=="function"}function Bt(r,e,t){const{data:n,error:a,isValidating:i,mutate:o}=Gt(r,e,{revalidateDebounce:500,revalidateOnFocus:!1,dedupingInterval:100,...t});return{data:w.computed(()=>{var l;return(l=n.value)==null?void 0:l.data}),response:n,error:a,isValidating:i,revalidate:o}}var ge=(r=>(r.VALIDATING="VALIDATING",r.VALIDATING_HAS_DATA="VALIDATING_HAS_DATA",r.PENDING="PENDING",r.SUCCESS="SUCCESS",r.SUCCESS_HAS_DATA="SUCCESS_HAS_DATA",r.ERROR="ERROR",r.STALE_IF_ERROR="STALE_IF_ERROR",r))(ge||{});const Xt=r=>{var e,t,n,a,i;return r?!!((e=Object.keys(r))!=null&&e.length||(t=r.data)!=null&&t.length||(a=(n=r.data)==null?void 0:n.data)!=null&&a.length||!((i=r.data)!=null&&i.data)&&typeof r.data=="object"&&Object.keys(r==null?void 0:r.data).length):!1};function Qt(r=w.ref({}),e,t,n=Xt){const a=w.ref("PENDING");return w.watchEffect(()=>{const i=n(r.value);if(r.value&&i&&t.value){a.value="VALIDATING_HAS_DATA";return}if(r.value&&t.value){a.value="VALIDATING";return}if(r.value&&e.value){a.value="STALE_IF_ERROR";return}if(r.value===void 0&&!e.value){a.value="PENDING";return}if(r.value&&!e.value&&i){a.value="SUCCESS_HAS_DATA";return}if(r.value&&!e.value){a.value="SUCCESS";return}r.value===void 0&&e&&(a.value="ERROR")}),{state:a,swrvState:ge}}const K="khcp-user-table-preferences",we={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function Jt(){const r=i=>{if(typeof i=="string")try{return JSON.parse(i)}catch(o){console.error("useTablePreferences(tryParseJson)",o);return}},e=()=>{const i=r(localStorage.getItem(K));return!i||!Object.keys(i).length?new Map:new Map(Object.entries(i))};return{setTablePreferences:(i,o)=>{try{const s=e();s.set(i,o),localStorage.setItem(K,JSON.stringify(Object.fromEntries(s.entries())))}catch(s){console.error("useTablePreferences(setTablePreferences)",s)}},getTablePreferences:i=>{const o=e();return(o==null?void 0:o.get(i))||void 0||we},deleteAllTablePreferences:()=>{localStorage.removeItem(K)}}}function Kt(){const r=()=>{var l;return((l=window==null?void 0:window.location)==null?void 0:l.search)||""};return{getLocationSearch:r,getLocationHostname:()=>{var l;return((l=window==null?void 0:window.location)==null?void 0:l.hostname)||""},getLocationHref:()=>{var l;return((l=window==null?void 0:window.location)==null?void 0:l.href)||""},getLocationPathname:()=>{var l;return((l=window==null?void 0:window.location)==null?void 0:l.pathname)||""},getLocationOrigin:()=>{var l;return((l=window==null?void 0:window.location)==null?void 0:l.origin)||""},getUrlSearchParams:()=>new URLSearchParams(r()),setLocationAssign:l=>{window.location.assign(l)},setLocationReplace:l=>{window.location.replace(l)}}}p.DEFAULT_USER_TABLE_PREFERENCES=we,p.USER_TABLE_PREFERENCES_LOCAL_STORAGE_KEY=K,p.useDate=Ut,p.useDebounce=Wt,p.usePackage=At,p.useSwrvRequest=Bt,p.useSwrvState=Qt,p.useTablePreferences=Jt,p.useWindow=Kt,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(w,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],b):(w=typeof globalThis<"u"?globalThis:w||self,b(w["kong-ui-core"]={},w.Vue))})(this,function(w,b){"use strict";function x(a){"@babel/helpers - typeof";return x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(a)}function D(a){if(a===null||a===!0||a===!1)return NaN;var e=Number(a);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function g(a,e){if(e.length<a)throw new TypeError(a+" argument"+(a>1?"s":"")+" required, but only "+e.length+" present")}function p(a){g(1,arguments);var e=Object.prototype.toString.call(a);return a instanceof Date||x(a)==="object"&&e==="[object Date]"?new Date(a.getTime()):typeof a=="number"||e==="[object Number]"?new Date(a):((typeof a=="string"||e==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function te(a,e){g(2,arguments);var t=p(a).getTime(),r=D(e);return new Date(t+r)}var ae={};function L(){return ae}function re(a){var e=new Date(Date.UTC(a.getFullYear(),a.getMonth(),a.getDate(),a.getHours(),a.getMinutes(),a.getSeconds(),a.getMilliseconds()));return e.setUTCFullYear(a.getFullYear()),a.getTime()-e.getTime()}function ne(a){return g(1,arguments),a instanceof Date||x(a)==="object"&&Object.prototype.toString.call(a)==="[object Date]"}function ie(a){if(g(1,arguments),!ne(a)&&typeof a!="number")return!1;var e=p(a);return!isNaN(Number(e))}function oe(a,e){g(2,arguments);var t=D(e);return te(a,-t)}var ue=864e5;function de(a){g(1,arguments);var e=p(a),t=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=e.getTime(),n=t-r;return Math.floor(n/ue)+1}function N(a){g(1,arguments);var e=1,t=p(a),r=t.getUTCDay(),n=(r<e?7:0)+r-e;return t.setUTCDate(t.getUTCDate()-n),t.setUTCHours(0,0,0,0),t}function X(a){g(1,arguments);var e=p(a),t=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(t+1,0,4),r.setUTCHours(0,0,0,0);var n=N(r),i=new Date(0);i.setUTCFullYear(t,0,4),i.setUTCHours(0,0,0,0);var o=N(i);return e.getTime()>=n.getTime()?t+1:e.getTime()>=o.getTime()?t:t-1}function ce(a){g(1,arguments);var e=X(a),t=new Date(0);t.setUTCFullYear(e,0,4),t.setUTCHours(0,0,0,0);var r=N(t);return r}var se=6048e5;function le(a){g(1,arguments);var e=p(a),t=N(e).getTime()-ce(e).getTime();return Math.round(t/se)+1}function Y(a,e){var t,r,n,i,o,c,u,d;g(1,arguments);var f=L(),m=D((t=(r=(n=(i=e==null?void 0:e.weekStartsOn)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(c=o.options)===null||c===void 0?void 0:c.weekStartsOn)!==null&&n!==void 0?n:f.weekStartsOn)!==null&&r!==void 0?r:(u=f.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var l=p(a),h=l.getUTCDay(),v=(h<m?7:0)+h-m;return l.setUTCDate(l.getUTCDate()-v),l.setUTCHours(0,0,0,0),l}function Q(a,e){var t,r,n,i,o,c,u,d;g(1,arguments);var f=p(a),m=f.getUTCFullYear(),l=L(),h=D((t=(r=(n=(i=e==null?void 0:e.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(c=o.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:l.firstWeekContainsDate)!==null&&r!==void 0?r:(u=l.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(h>=1&&h<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(m+1,0,h),v.setUTCHours(0,0,0,0);var T=Y(v,e),O=new Date(0);O.setUTCFullYear(m,0,h),O.setUTCHours(0,0,0,0);var _=Y(O,e);return f.getTime()>=T.getTime()?m+1:f.getTime()>=_.getTime()?m:m-1}function fe(a,e){var t,r,n,i,o,c,u,d;g(1,arguments);var f=L(),m=D((t=(r=(n=(i=e==null?void 0:e.firstWeekContainsDate)!==null&&i!==void 0?i:e==null||(o=e.locale)===null||o===void 0||(c=o.options)===null||c===void 0?void 0:c.firstWeekContainsDate)!==null&&n!==void 0?n:f.firstWeekContainsDate)!==null&&r!==void 0?r:(u=f.locale)===null||u===void 0||(d=u.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1),l=Q(a,e),h=new Date(0);h.setUTCFullYear(l,0,m),h.setUTCHours(0,0,0,0);var v=Y(h,e);return v}var me=6048e5;function he(a,e){g(1,arguments);var t=p(a),r=Y(t,e).getTime()-fe(t,e).getTime();return Math.round(r/me)+1}function s(a,e){for(var t=a<0?"-":"",r=Math.abs(a).toString();r.length<e;)r="0"+r;return t+r}var ve={y:function(e,t){var r=e.getUTCFullYear(),n=r>0?r:1-r;return s(t==="yy"?n%100:n,t.length)},M:function(e,t){var r=e.getUTCMonth();return t==="M"?String(r+1):s(r+1,2)},d:function(e,t){return s(e.getUTCDate(),t.length)},a:function(e,t){var r=e.getUTCHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.toUpperCase();case"aaa":return r;case"aaaaa":return r[0];case"aaaa":default:return r==="am"?"a.m.":"p.m."}},h:function(e,t){return s(e.getUTCHours()%12||12,t.length)},H:function(e,t){return s(e.getUTCHours(),t.length)},m:function(e,t){return s(e.getUTCMinutes(),t.length)},s:function(e,t){return s(e.getUTCSeconds(),t.length)},S:function(e,t){var r=t.length,n=e.getUTCMilliseconds(),i=Math.floor(n*Math.pow(10,r-3));return s(i,t.length)}};const S=ve;var E={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ge={G:function(e,t,r){var n=e.getUTCFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return r.era(n,{width:"abbreviated"});case"GGGGG":return r.era(n,{width:"narrow"});case"GGGG":default:return r.era(n,{width:"wide"})}},y:function(e,t,r){if(t==="yo"){var n=e.getUTCFullYear(),i=n>0?n:1-n;return r.ordinalNumber(i,{unit:"year"})}return S.y(e,t)},Y:function(e,t,r,n){var i=Q(e,n),o=i>0?i:1-i;if(t==="YY"){var c=o%100;return s(c,2)}return t==="Yo"?r.ordinalNumber(o,{unit:"year"}):s(o,t.length)},R:function(e,t){var r=X(e);return s(r,t.length)},u:function(e,t){var r=e.getUTCFullYear();return s(r,t.length)},Q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"Q":return String(n);case"QQ":return s(n,2);case"Qo":return r.ordinalNumber(n,{unit:"quarter"});case"QQQ":return r.quarter(n,{width:"abbreviated",context:"formatting"});case"QQQQQ":return r.quarter(n,{width:"narrow",context:"formatting"});case"QQQQ":default:return r.quarter(n,{width:"wide",context:"formatting"})}},q:function(e,t,r){var n=Math.ceil((e.getUTCMonth()+1)/3);switch(t){case"q":return String(n);case"qq":return s(n,2);case"qo":return r.ordinalNumber(n,{unit:"quarter"});case"qqq":return r.quarter(n,{width:"abbreviated",context:"standalone"});case"qqqqq":return r.quarter(n,{width:"narrow",context:"standalone"});case"qqqq":default:return r.quarter(n,{width:"wide",context:"standalone"})}},M:function(e,t,r){var n=e.getUTCMonth();switch(t){case"M":case"MM":return S.M(e,t);case"Mo":return r.ordinalNumber(n+1,{unit:"month"});case"MMM":return r.month(n,{width:"abbreviated",context:"formatting"});case"MMMMM":return r.month(n,{width:"narrow",context:"formatting"});case"MMMM":default:return r.month(n,{width:"wide",context:"formatting"})}},L:function(e,t,r){var n=e.getUTCMonth();switch(t){case"L":return String(n+1);case"LL":return s(n+1,2);case"Lo":return r.ordinalNumber(n+1,{unit:"month"});case"LLL":return r.month(n,{width:"abbreviated",context:"standalone"});case"LLLLL":return r.month(n,{width:"narrow",context:"standalone"});case"LLLL":default:return r.month(n,{width:"wide",context:"standalone"})}},w:function(e,t,r,n){var i=he(e,n);return t==="wo"?r.ordinalNumber(i,{unit:"week"}):s(i,t.length)},I:function(e,t,r){var n=le(e);return t==="Io"?r.ordinalNumber(n,{unit:"week"}):s(n,t.length)},d:function(e,t,r){return t==="do"?r.ordinalNumber(e.getUTCDate(),{unit:"date"}):S.d(e,t)},D:function(e,t,r){var n=de(e);return t==="Do"?r.ordinalNumber(n,{unit:"dayOfYear"}):s(n,t.length)},E:function(e,t,r){var n=e.getUTCDay();switch(t){case"E":case"EE":case"EEE":return r.day(n,{width:"abbreviated",context:"formatting"});case"EEEEE":return r.day(n,{width:"narrow",context:"formatting"});case"EEEEEE":return r.day(n,{width:"short",context:"formatting"});case"EEEE":default:return r.day(n,{width:"wide",context:"formatting"})}},e:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"e":return String(o);case"ee":return s(o,2);case"eo":return r.ordinalNumber(o,{unit:"day"});case"eee":return r.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return r.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return r.day(i,{width:"short",context:"formatting"});case"eeee":default:return r.day(i,{width:"wide",context:"formatting"})}},c:function(e,t,r,n){var i=e.getUTCDay(),o=(i-n.weekStartsOn+8)%7||7;switch(t){case"c":return String(o);case"cc":return s(o,t.length);case"co":return r.ordinalNumber(o,{unit:"day"});case"ccc":return r.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return r.day(i,{width:"narrow",context:"standalone"});case"cccccc":return r.day(i,{width:"short",context:"standalone"});case"cccc":default:return r.day(i,{width:"wide",context:"standalone"})}},i:function(e,t,r){var n=e.getUTCDay(),i=n===0?7:n;switch(t){case"i":return String(i);case"ii":return s(i,t.length);case"io":return r.ordinalNumber(i,{unit:"day"});case"iii":return r.day(n,{width:"abbreviated",context:"formatting"});case"iiiii":return r.day(n,{width:"narrow",context:"formatting"});case"iiiiii":return r.day(n,{width:"short",context:"formatting"});case"iiii":default:return r.day(n,{width:"wide",context:"formatting"})}},a:function(e,t,r){var n=e.getUTCHours(),i=n/12>=1?"pm":"am";switch(t){case"a":case"aa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(e,t,r){var n=e.getUTCHours(),i;switch(n===12?i=E.noon:n===0?i=E.midnight:i=n/12>=1?"pm":"am",t){case"b":case"bb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(e,t,r){var n=e.getUTCHours(),i;switch(n>=17?i=E.evening:n>=12?i=E.afternoon:n>=4?i=E.morning:i=E.night,t){case"B":case"BB":case"BBB":return r.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return r.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return r.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(e,t,r){if(t==="ho"){var n=e.getUTCHours()%12;return n===0&&(n=12),r.ordinalNumber(n,{unit:"hour"})}return S.h(e,t)},H:function(e,t,r){return t==="Ho"?r.ordinalNumber(e.getUTCHours(),{unit:"hour"}):S.H(e,t)},K:function(e,t,r){var n=e.getUTCHours()%12;return t==="Ko"?r.ordinalNumber(n,{unit:"hour"}):s(n,t.length)},k:function(e,t,r){var n=e.getUTCHours();return n===0&&(n=24),t==="ko"?r.ordinalNumber(n,{unit:"hour"}):s(n,t.length)},m:function(e,t,r){return t==="mo"?r.ordinalNumber(e.getUTCMinutes(),{unit:"minute"}):S.m(e,t)},s:function(e,t,r){return t==="so"?r.ordinalNumber(e.getUTCSeconds(),{unit:"second"}):S.s(e,t)},S:function(e,t){return S.S(e,t)},X:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();if(o===0)return"Z";switch(t){case"X":return V(o);case"XXXX":case"XX":return P(o);case"XXXXX":case"XXX":default:return P(o,":")}},x:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"x":return V(o);case"xxxx":case"xx":return P(o);case"xxxxx":case"xxx":default:return P(o,":")}},O:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+j(o,":");case"OOOO":default:return"GMT"+P(o,":")}},z:function(e,t,r,n){var i=n._originalDate||e,o=i.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+j(o,":");case"zzzz":default:return"GMT"+P(o,":")}},t:function(e,t,r,n){var i=n._originalDate||e,o=Math.floor(i.getTime()/1e3);return s(o,t.length)},T:function(e,t,r,n){var i=n._originalDate||e,o=i.getTime();return s(o,t.length)}};function j(a,e){var t=a>0?"-":"+",r=Math.abs(a),n=Math.floor(r/60),i=r%60;if(i===0)return t+String(n);var o=e||"";return t+String(n)+o+s(i,2)}function V(a,e){if(a%60===0){var t=a>0?"-":"+";return t+s(Math.abs(a)/60,2)}return P(a,e)}function P(a,e){var t=e||"",r=a>0?"-":"+",n=Math.abs(a),i=s(Math.floor(n/60),2),o=s(n%60,2);return r+i+t+o}const we=ge;var J=function(e,t){switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},K=function(e,t){switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},be=function(e,t){var r=e.match(/(P+)(p+)?/)||[],n=r[1],i=r[2];if(!i)return J(e,t);var o;switch(n){case"P":o=t.dateTime({width:"short"});break;case"PP":o=t.dateTime({width:"medium"});break;case"PPP":o=t.dateTime({width:"long"});break;case"PPPP":default:o=t.dateTime({width:"full"});break}return o.replace("{{date}}",J(n,t)).replace("{{time}}",K(i,t))},ye={p:K,P:be};const Te=ye;var pe=["D","DD"],Se=["YY","YYYY"];function Ce(a){return pe.indexOf(a)!==-1}function De(a){return Se.indexOf(a)!==-1}function z(a,e,t){if(a==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(a==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Pe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Oe=function(e,t,r){var n,i=Pe[e];return typeof i=="string"?n=i:t===1?n=i.one:n=i.other.replace("{{count}}",t.toString()),r!=null&&r.addSuffix?r.comparison&&r.comparison>0?"in "+n:n+" ago":n};const Ee=Oe;function $(a){return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.width?String(e.width):a.defaultWidth,r=a.formats[t]||a.formats[a.defaultWidth];return r}}var Me={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ke={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},_e={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ue={date:$({formats:Me,defaultWidth:"full"}),time:$({formats:ke,defaultWidth:"full"}),dateTime:$({formats:_e,defaultWidth:"full"})};const We=Ue;var xe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Le=function(e,t,r,n){return xe[e]};const Ne=Le;function M(a){return function(e,t){var r=t!=null&&t.context?String(t.context):"standalone",n;if(r==="formatting"&&a.formattingValues){var i=a.defaultFormattingWidth||a.defaultWidth,o=t!=null&&t.width?String(t.width):i;n=a.formattingValues[o]||a.formattingValues[i]}else{var c=a.defaultWidth,u=t!=null&&t.width?String(t.width):a.defaultWidth;n=a.values[u]||a.values[c]}var d=a.argumentCallback?a.argumentCallback(e):e;return n[d]}}var Ye={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ae={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Re={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Fe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},$e={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Ie={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},He=function(e,t){var r=Number(e),n=r%100;if(n>20||n<10)switch(n%10){case 1:return r+"st";case 2:return r+"nd";case 3:return r+"rd"}return r+"th"},qe={ordinalNumber:He,era:M({values:Ye,defaultWidth:"wide"}),quarter:M({values:Ae,defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:M({values:Re,defaultWidth:"wide"}),day:M({values:Fe,defaultWidth:"wide"}),dayPeriod:M({values:$e,defaultWidth:"wide",formattingValues:Ie,defaultFormattingWidth:"wide"})};const Ge=qe;function k(a){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.width,n=r&&a.matchPatterns[r]||a.matchPatterns[a.defaultMatchWidth],i=e.match(n);if(!i)return null;var o=i[0],c=r&&a.parsePatterns[r]||a.parsePatterns[a.defaultParseWidth],u=Array.isArray(c)?Xe(c,function(m){return m.test(o)}):Be(c,function(m){return m.test(o)}),d;d=a.valueCallback?a.valueCallback(u):u,d=t.valueCallback?t.valueCallback(d):d;var f=e.slice(o.length);return{value:d,rest:f}}}function Be(a,e){for(var t in a)if(a.hasOwnProperty(t)&&e(a[t]))return t}function Xe(a,e){for(var t=0;t<a.length;t++)if(e(a[t]))return t}function Qe(a){return function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=e.match(a.matchPattern);if(!r)return null;var n=r[0],i=e.match(a.parsePattern);if(!i)return null;var o=a.valueCallback?a.valueCallback(i[0]):i[0];o=t.valueCallback?t.valueCallback(o):o;var c=e.slice(n.length);return{value:o,rest:c}}}var je=/^(\d+)(th|st|nd|rd)?/i,Ve=/\d+/i,Je={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ke={any:[/^b/i,/^(a|c)/i]},ze={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Ze={any:[/1/i,/2/i,/3/i,/4/i]},et={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},tt={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},at={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},rt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},nt={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},it={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ot={ordinalNumber:Qe({matchPattern:je,parsePattern:Ve,valueCallback:function(e){return parseInt(e,10)}}),era:k({matchPatterns:Je,defaultMatchWidth:"wide",parsePatterns:Ke,defaultParseWidth:"any"}),quarter:k({matchPatterns:ze,defaultMatchWidth:"wide",parsePatterns:Ze,defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:k({matchPatterns:et,defaultMatchWidth:"wide",parsePatterns:tt,defaultParseWidth:"any"}),day:k({matchPatterns:at,defaultMatchWidth:"wide",parsePatterns:rt,defaultParseWidth:"any"}),dayPeriod:k({matchPatterns:nt,defaultMatchWidth:"any",parsePatterns:it,defaultParseWidth:"any"})},ut={code:"en-US",formatDistance:Ee,formatLong:We,formatRelative:Ne,localize:Ge,match:ot,options:{weekStartsOn:0,firstWeekContainsDate:1}};const dt=ut;var ct=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,st=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lt=/^'([^]*?)'?$/,ft=/''/g,mt=/[a-zA-Z]/;function ht(a,e,t){var r,n,i,o,c,u,d,f,m,l,h,v,T,O,_,I,H,q;g(2,arguments);var Ct=String(e),U=L(),W=(r=(n=t==null?void 0:t.locale)!==null&&n!==void 0?n:U.locale)!==null&&r!==void 0?r:dt,G=D((i=(o=(c=(u=t==null?void 0:t.firstWeekContainsDate)!==null&&u!==void 0?u:t==null||(d=t.locale)===null||d===void 0||(f=d.options)===null||f===void 0?void 0:f.firstWeekContainsDate)!==null&&c!==void 0?c:U.firstWeekContainsDate)!==null&&o!==void 0?o:(m=U.locale)===null||m===void 0||(l=m.options)===null||l===void 0?void 0:l.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(G>=1&&G<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var B=D((h=(v=(T=(O=t==null?void 0:t.weekStartsOn)!==null&&O!==void 0?O:t==null||(_=t.locale)===null||_===void 0||(I=_.options)===null||I===void 0?void 0:I.weekStartsOn)!==null&&T!==void 0?T:U.weekStartsOn)!==null&&v!==void 0?v:(H=U.locale)===null||H===void 0||(q=H.options)===null||q===void 0?void 0:q.weekStartsOn)!==null&&h!==void 0?h:0);if(!(B>=0&&B<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!W.localize)throw new RangeError("locale must contain localize property");if(!W.formatLong)throw new RangeError("locale must contain formatLong property");var R=p(a);if(!ie(R))throw new RangeError("Invalid time value");var Dt=re(R),Pt=oe(R,Dt),Ot={firstWeekContainsDate:G,weekStartsOn:B,locale:W,_originalDate:R},Et=Ct.match(st).map(function(y){var C=y[0];if(C==="p"||C==="P"){var F=Te[C];return F(y,W.formatLong)}return y}).join("").match(ct).map(function(y){if(y==="''")return"'";var C=y[0];if(C==="'")return vt(y);var F=we[C];if(F)return!(t!=null&&t.useAdditionalWeekYearTokens)&&De(y)&&z(y,e,String(a)),!(t!=null&&t.useAdditionalDayOfYearTokens)&&Ce(y)&&z(y,e,String(a)),F(Pt,y,W.localize,Ot);if(C.match(mt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return y}).join("");return Et}function vt(a){var e=a.match(lt);return e?e[1].replace(ft,"'"):a}function gt(){return{formatDateBy:(t,r={})=>{if(isNaN(t))return null;try{return new Date(t*1e3).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",weekday:"short",hour:"numeric",minute:"numeric",second:"numeric",hour12:!1,...r})}catch{return null}},formatUnixToDate:(t,r)=>{if(!t)return"";const n=r?"yyyy-MM-dd HH:mm:ss":"yyyy-MM-dd HH:mm:ss XX";try{const i=new Date(t*1e3);return ht(i,n)}catch{return""}}}}function wt(){return{debounce:(e,t)=>{let r;return(...n)=>{clearTimeout(r),r=window==null?void 0:window.setTimeout(()=>{e(...n)},t)}}}}function bt({script:a,styles:e,onReady:t}){const r=b.ref(!0),n=b.ref(!0),i=async()=>{const{libName:u,url:d,type:f}=a;if((f!==void 0&&["umd","es"].includes(f)?f:"umd")==="es"){await import(d),typeof t=="function"&&await t();return}const l=u.startsWith("kong-ui-")?u:`kong-ui-${u}`;return window[l]||(window[l]=await new Promise((h,v)=>{const T=document.createElement("script");T.async=!0,T.addEventListener("load",async()=>{typeof t=="function"&&await t(),r.value=!1,h(window[l])}),T.addEventListener("error",()=>{v(new Error(`Could not load '${l}' from ${d}`))}),T.src=d,document.head.appendChild(T)})),window[l]},o=async(u,d)=>{var f;for(const m of u){const l=document.createElement("link");l.type="text/css",l.rel="stylesheet",l.href=m;const h=d?document.querySelector(d):null,v=d?(f=h==null?void 0:h.shadowRoot)==null?void 0:f.children[0]:null;if(h&&v)try{v.appendChild(l)}catch{document.head.appendChild(l)}else document.head.appendChild(l)}};return{importPackage:async()=>{var d,f;if(!a||!a.url||typeof window>"u"||typeof document>"u")return;const u=b.computed(()=>!!(e&&(e!=null&&e.urls)&&(e!=null&&e.urls.length)&&e.shadowRoot));if((!e||!(e!=null&&e.urls)||!((d=e==null?void 0:e.urls)!=null&&d.length))&&(n.value=!1),e!=null&&e.urls&&((f=e==null?void 0:e.urls)!=null&&f.length)&&!u.value&&(await o(e.urls),n.value=!1),(!a.type||a.type==="umd")&&!u.value)return await i();await i(),await b.nextTick(),r.value=!1,e!=null&&e.urls&&u.value&&(await o(e.urls,e==null?void 0:e.shadowRoot),await b.nextTick(),n.value=!1)},loadingPackage:b.readonly(r),loadingStyles:b.readonly(n)}}var Z=(a=>(a.VALIDATING="VALIDATING",a.VALIDATING_HAS_DATA="VALIDATING_HAS_DATA",a.PENDING="PENDING",a.SUCCESS="SUCCESS",a.SUCCESS_HAS_DATA="SUCCESS_HAS_DATA",a.ERROR="ERROR",a.STALE_IF_ERROR="STALE_IF_ERROR",a))(Z||{});const yt=a=>{var e,t,r,n,i;return a?!!((e=Object.keys(a))!=null&&e.length||(t=a.data)!=null&&t.length||(n=(r=a.data)==null?void 0:r.data)!=null&&n.length||!((i=a.data)!=null&&i.data)&&typeof a.data=="object"&&Object.keys(a==null?void 0:a.data).length):!1};function Tt(a=b.ref({}),e,t,r=yt){const n=b.ref("PENDING");return b.watchEffect(()=>{const i=r(a.value);if(a.value&&i&&t.value){n.value="VALIDATING_HAS_DATA";return}if(a.value&&t.value){n.value="VALIDATING";return}if(a.value&&e.value){n.value="STALE_IF_ERROR";return}if(a.value===void 0&&!e.value){n.value="PENDING";return}if(a.value&&!e.value&&i){n.value="SUCCESS_HAS_DATA";return}if(a.value&&!e.value){n.value="SUCCESS";return}a.value===void 0&&e&&(n.value="ERROR")}),{state:n,swrvState:Z}}const A="khcp-user-table-preferences",ee={pageSize:30,sortColumnKey:void 0,sortColumnOrder:void 0};function pt(){const a=i=>{if(typeof i=="string")try{return JSON.parse(i)}catch(o){console.error("useTablePreferences(tryParseJson)",o);return}},e=()=>{const i=a(localStorage.getItem(A));return!i||!Object.keys(i).length?new Map:new Map(Object.entries(i))};return{setTablePreferences:(i,o)=>{try{const c=e();c.set(i,o),localStorage.setItem(A,JSON.stringify(Object.fromEntries(c.entries())))}catch(c){console.error("useTablePreferences(setTablePreferences)",c)}},getTablePreferences:i=>{const o=e();return(o==null?void 0:o.get(i))||void 0||ee},deleteAllTablePreferences:()=>{localStorage.removeItem(A)}}}function St(){const a=()=>{var u;return((u=window==null?void 0:window.location)==null?void 0:u.search)||""};return{getLocationSearch:a,getLocationHostname:()=>{var u;return((u=window==null?void 0:window.location)==null?void 0:u.hostname)||""},getLocationHref:()=>{var u;return((u=window==null?void 0:window.location)==null?void 0:u.href)||""},getLocationPathname:()=>{var u;return((u=window==null?void 0:window.location)==null?void 0:u.pathname)||""},getLocationOrigin:()=>{var u;return((u=window==null?void 0:window.location)==null?void 0:u.origin)||""},getUrlSearchParams:()=>new URLSearchParams(a()),setLocationAssign:u=>{window.location.assign(u)},setLocationReplace:u=>{window.location.replace(u)}}}w.DEFAULT_USER_TABLE_PREFERENCES=ee,w.USER_TABLE_PREFERENCES_LOCAL_STORAGE_KEY=A,w.useDate=gt,w.useDebounce=wt,w.usePackage=bt,w.useSwrvState=Tt,w.useTablePreferences=pt,w.useWindow=St,Object.defineProperty(w,Symbol.toStringTag,{value:"Module"})});
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export { default as useDate } from './useDate';
|
|
2
2
|
export { default as useDebounce } from './useDebounce';
|
|
3
3
|
export { default as usePackage } from './usePackage';
|
|
4
|
-
export { default as useSwrvRequest } from './useSwrvRequest';
|
|
5
4
|
export { default as useSwrvState } from './useSwrvState';
|
|
6
5
|
export { default as useTablePreferences } from './useTablePreferences';
|
|
7
6
|
export { default as useWindow } from './useWindow';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAA;AACxD,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AACtE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAA;AAGlD,cAAc,oBAAoB,CAAA;AAClC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,mBAAmB,CAAA;AAGjC,cAAc,aAAa,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kong-ui-public/core",
|
|
3
|
-
"version": "1.1.0",
|
|
3
|
+
"version": "1.1.2-pr.618.1de3214.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/core.umd.js",
|
|
6
6
|
"module": "./dist/core.es.js",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"axios": "^1.4.0",
|
|
38
38
|
"swrv": "^1.0.4",
|
|
39
|
-
"vue": "^3.
|
|
39
|
+
"vue": "^3.3.4"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"date-fns": "^2.30.0"
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { IConfig } from 'swrv';
|
|
2
|
-
import { AxiosResponse, AxiosError } from 'axios';
|
|
3
|
-
import { IKey, fetcherFn } from 'swrv/dist/types';
|
|
4
|
-
export default function useSwrvRequest<Data = unknown, Error = {
|
|
5
|
-
message: string;
|
|
6
|
-
}>(key: IKey, fn?: fetcherFn<AxiosResponse<Data>>, config?: IConfig): {
|
|
7
|
-
data: import("vue").ComputedRef<Data | undefined>;
|
|
8
|
-
response: import("vue").Ref<AxiosResponse<Data, any> | undefined>;
|
|
9
|
-
error: import("vue").Ref<AxiosError<Error, any> | undefined>;
|
|
10
|
-
isValidating: import("vue").Ref<boolean>;
|
|
11
|
-
revalidate: (data?: fetcherFn<AxiosResponse<Data, any>> | undefined, opts?: import("swrv/dist/types").revalidateOptions | undefined) => Promise<void>;
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/useSwrvRequest/index.ts"],"names":[],"mappings":"AAAA,OAAgB,EAAE,OAAO,EAAE,MAAM,MAAM,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAGjD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,IAAI,GAAG,OAAO,EAAE,KAAK,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,EAAE,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,EAAE,OAAO;;;;;;EAsBnJ"}
|