🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

vue-tailwind-datatable

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-tailwind-datatable - npm Package Compare versions

Comparing version

to
1.0.2

@@ -1,1 +0,1 @@

var DataTable=function(e){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,s,a,i=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){return function(){return e.apply(t,arguments)}}const{toString:s}=Object.prototype,{getPrototypeOf:a}=Object,i=(l=Object.create(null),e=>{const t=s.call(e);return l[t]||(l[t]=t.slice(8,-1).toLowerCase())});var l;const c=e=>(e=e.toLowerCase(),t=>i(t)===e),u=e=>t=>typeof t===e,{isArray:d}=Array,f=u("undefined");const p=c("ArrayBuffer");const m=u("string"),h=u("function"),y=u("number"),g=e=>null!==e&&"object"==typeof e,b=e=>{if("object"!==i(e))return!1;const t=a(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},v=c("Date"),w=c("File"),E=c("Blob"),x=c("FileList"),S=c("URLSearchParams");function O(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),d(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let a;for(r=0;r<s;r++)a=o[r],t.call(null,e[a],a,e)}}function N(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,k=e=>!f(e)&&e!==A;const R=(B="undefined"!=typeof Uint8Array&&a(Uint8Array),e=>B&&e instanceof B);var B;const T=c("HTMLFormElement"),C=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),_=c("RegExp"),P=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};O(n,((n,o)=>{!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},j="abcdefghijklmnopqrstuvwxyz",D="0123456789",L={DIGIT:D,ALPHA:j,ALPHA_DIGIT:j+j.toUpperCase()+D};var V={isArray:d,isArrayBuffer:p,isBuffer:function(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&h(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{const t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||s.call(e)===t||h(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&p(e.buffer),t},isString:m,isNumber:y,isBoolean:e=>!0===e||!1===e,isObject:g,isPlainObject:b,isUndefined:f,isDate:v,isFile:w,isBlob:E,isRegExp:_,isFunction:h,isStream:e=>g(e)&&h(e.pipe),isURLSearchParams:S,isTypedArray:R,isFileList:x,forEach:O,merge:function e(){const{caseless:t}=k(this)&&this||{},n={},r=(r,o)=>{const s=t&&N(n,o)||o;b(n[s])&&b(r)?n[s]=e(n[s],r):b(r)?n[s]=e({},r):d(r)?n[s]=r.slice():n[s]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&O(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(O(t,((t,r)=>{n&&h(t)?e[r]=o(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,s,i;const l={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],r&&!r(i,e,t)||l[i]||(t[i]=e[i],l[i]=!0);e=!1!==n&&a(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:i,kindOfTest:c,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(d(e))return e;let t=e.length;if(!y(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:T,hasOwnProperty:C,hasOwnProp:C,reduceDescriptors:P,freezeMethods:e=>{P(e,((t,n)=>{if(h(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];h(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return d(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:N,global:A,isContextDefined:k,ALPHABET:L,generateString:(e=16,t=L.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&h(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(g(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=d(e)?[]:{};return O(e,((e,t)=>{const s=n(e,r+1);!f(s)&&(o[t]=s)})),t[r]=void 0,o}}return e};return n(e,0)}};function U(e,t,n,r,o){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),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}V.inherits(U,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:V.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const F=U.prototype,z={};["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=>{z[e]={value:e}})),Object.defineProperties(U,z),Object.defineProperty(F,"isAxiosError",{value:!0}),U.from=(e,t,n,r,o,s)=>{const a=Object.create(F);return V.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),U.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};function I(e){return V.isPlainObject(e)||V.isArray(e)}function M(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function q(e,t,n){return e?e.concat(t).map((function(e,t){return e=M(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const H=V.toFlatObject(V,{},null,(function(e){return/^is[A-Z]/.test(e)}));function J(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!V.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,s=n.dots,a=n.indexes,i=(n.Blob||"undefined"!=typeof Blob&&Blob)&&V.isSpecCompliantForm(t);if(!V.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(V.isDate(e))return e.toISOString();if(!i&&V.isBlob(e))throw new U("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(e)||V.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let i=e;if(e&&!o&&"object"==typeof e)if(V.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(V.isArray(e)&&function(e){return V.isArray(e)&&!e.some(I)}(e)||(V.isFileList(e)||V.endsWith(n,"[]"))&&(i=V.toArray(e)))return n=M(n),i.forEach((function(e,r){!V.isUndefined(e)&&null!==e&&t.append(!0===a?q([n],r,s):null===a?n:n+"[]",l(e))})),!1;return!!I(e)||(t.append(q(o,n,s),l(e)),!1)}const u=[],d=Object.assign(H,{defaultVisitor:c,convertValue:l,isVisitable:I});if(!V.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!V.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),V.forEach(n,(function(n,s){!0===(!(V.isUndefined(n)||null===n)&&o.call(t,n,V.isString(s)?s.trim():s,r,d))&&e(n,r?r.concat(s):[s])})),u.pop()}}(e),t}function K(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function W(e,t){this._pairs=[],e&&J(e,this,t)}const G=W.prototype;function $(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(e,t,n){if(!t)return e;const r=n&&n.encode||$,o=n&&n.serialize;let s;if(s=o?o(t,n):V.isURLSearchParams(t)?t.toString():new W(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}G.append=function(e,t){this._pairs.push([e,t])},G.toString=function(e){const t=e?function(t){return e.call(this,t,K)}:K;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Q=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){V.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Z={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Y="undefined"!=typeof URLSearchParams?URLSearchParams:W,ee=FormData;const te=(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),ne="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var re={isBrowser:!0,classes:{URLSearchParams:Y,FormData:ee,Blob:Blob},isStandardBrowserEnv:te,isStandardBrowserWebWorkerEnv:ne,protocols:["http","https","file","blob","url","data"]};function oe(e){function t(e,n,r,o){let s=e[o++];const a=Number.isFinite(+s),i=o>=e.length;if(s=!s&&V.isArray(r)?r.length:s,i)return V.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!a;r[s]&&V.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],o)&&V.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}(r[s])),!a}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,((e,r)=>{t(function(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const se={"Content-Type":void 0};const ae={transitional:Z,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=V.isObject(e);o&&V.isHTMLForm(e)&&(e=new FormData(e));if(V.isFormData(e))return r&&r?JSON.stringify(oe(e)):e;if(V.isArrayBuffer(e)||V.isBuffer(e)||V.isStream(e)||V.isFile(e)||V.isBlob(e))return e;if(V.isArrayBufferView(e))return e.buffer;if(V.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return J(e,new re.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return re.isNode&&V.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=V.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return J(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ae.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&V.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw U.from(e,U.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:re.classes.FormData,Blob:re.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};V.forEach(["delete","get","head"],(function(e){ae.headers[e]={}})),V.forEach(["post","put","patch"],(function(e){ae.headers[e]=V.merge(se)}));var ie=ae;const le=V.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"]);const ce=Symbol("internals");function ue(e){return e&&String(e).trim().toLowerCase()}function de(e){return!1===e||null==e?e:V.isArray(e)?e.map(de):String(e)}function fe(e,t,n,r){return V.isFunction(r)?r.call(this,t,n):V.isString(t)?V.isString(r)?-1!==t.indexOf(r):V.isRegExp(r)?r.test(t):void 0:void 0}class pe{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ue(t);if(!o)throw new Error("header name must be a non-empty string");const s=V.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=de(e))}const s=(e,t)=>V.forEach(e,((e,n)=>o(e,n,t)));return V.isPlainObject(e)||e instanceof this.constructor?s(e,t):V.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z]+$/.test(e.trim())?s((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&le[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=ue(e)){const n=V.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(V.isFunction(t))return t.call(this,e,n);if(V.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ue(e)){const n=V.findKey(this,e);return!(!n||void 0===this[n]||t&&!fe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ue(e)){const o=V.findKey(n,e);!o||t&&!fe(0,n[o],o,t)||(delete n[o],r=!0)}}return V.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!fe(0,this[o],o,e)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return V.forEach(this,((r,o)=>{const s=V.findKey(n,o);if(s)return t[s]=de(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete t[o],t[a]=de(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return V.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&V.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[ce]=this[ce]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ue(e);t[r]||(!function(e,t){const n=V.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return V.isArray(e)?e.forEach(r):r(e),this}}pe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.freezeMethods(pe.prototype),V.freezeMethods(pe);var me=pe;function he(e,t){const n=this||ie,r=t||n,o=me.from(r.headers);let s=r.data;return V.forEach(e,(function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function ye(e){return!(!e||!e.__CANCEL__)}function ge(e,t,n){U.call(this,null==e?"canceled":e,U.ERR_CANCELED,t,n),this.name="CanceledError"}V.inherits(ge,U,{__CANCEL__:!0});var be=re.isStandardBrowserEnv?{write:function(e,t,n,r,o,s){const a=[];a.push(e+"="+encodeURIComponent(t)),V.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),V.isString(r)&&a.push("path="+r),V.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function ve(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var we=re.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=V.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function Ee(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,a=0;return t=void 0!==t?t:1e3,function(i){const l=Date.now(),c=r[a];o||(o=l),n[s]=i,r[s]=l;let u=a,d=0;for(;u!==s;)d+=n[u++],u%=e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),l-o<t)return;const f=c&&l-c;return f?Math.round(1e3*d/f):void 0}}(50,250);return o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,i=s-n,l=r(i);n=s;const c={loaded:s,total:a,progress:a?s/a:void 0,bytes:i,rate:l||void 0,estimated:l&&a&&s<=a?(a-s)/l:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const xe={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=me.from(e.headers).normalize(),s=e.responseType;let a;function i(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}V.isFormData(r)&&(re.isStandardBrowserEnv||re.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const c=ve(e.baseURL,e.url);function u(){if(!l)return;const r=me.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new U("Request failed with status code "+n.status,[U.ERR_BAD_REQUEST,U.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),i()}),(function(e){n(e),i()}),{data:s&&"text"!==s&&"json"!==s?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),X(c,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=u:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(u)},l.onabort=function(){l&&(n(new U("Request aborted",U.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new U("Network Error",U.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||Z;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new U(t,r.clarifyTimeoutError?U.ETIMEDOUT:U.ECONNABORTED,e,l)),l=null},re.isStandardBrowserEnv){const t=(e.withCredentials||we(c))&&e.xsrfCookieName&&be.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&V.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),V.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),s&&"json"!==s&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",Ee(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Ee(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{l&&(n(!t||t.type?new ge(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const d=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(c);d&&-1===re.protocols.indexOf(d)?n(new U("Unsupported protocol "+d+":",U.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};V.forEach(xe,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var Se={getAdapter:e=>{e=V.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=V.isString(n)?xe[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new U(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(V.hasOwnProp(xe,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!V.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:xe};function Oe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ge(null,e)}function Ne(e){Oe(e),e.headers=me.from(e.headers),e.data=he.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Se.getAdapter(e.adapter||ie.adapter)(e).then((function(t){return Oe(e),t.data=he.call(e,e.transformResponse,t),t.headers=me.from(t.headers),t}),(function(t){return ye(t)||(Oe(e),t&&t.response&&(t.response.data=he.call(e,e.transformResponse,t.response),t.response.headers=me.from(t.response.headers))),Promise.reject(t)}))}const Ae=e=>e instanceof me?e.toJSON():e;function ke(e,t){t=t||{};const n={};function r(e,t,n){return V.isPlainObject(e)&&V.isPlainObject(t)?V.merge.call({caseless:n},e,t):V.isPlainObject(t)?V.merge({},t):V.isArray(t)?t.slice():t}function o(e,t,n){return V.isUndefined(t)?V.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function s(e,t){if(!V.isUndefined(t))return r(void 0,t)}function a(e,t){return V.isUndefined(t)?V.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(n,o,s){return s in t?r(n,o):s in e?r(void 0,n):void 0}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(e,t)=>o(Ae(e),Ae(t),!0)};return V.forEach(Object.keys(e).concat(Object.keys(t)),(function(r){const s=l[r]||o,a=s(e[r],t[r],r);V.isUndefined(a)&&s!==i||(n[r]=a)})),n}const Re="1.3.2",Be={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Be[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Te={};Be.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Re+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new U(r(o," has been removed"+(t?" in "+t:"")),U.ERR_DEPRECATED);return t&&!Te[o]&&(Te[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}};var Ce={assertOptions:function(e,t,n){if("object"!=typeof e)throw new U("options must be an object",U.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],a=t[s];if(a){const t=e[s],n=void 0===t||a(t,s,e);if(!0!==n)throw new U("option "+s+" must be "+n,U.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new U("Unknown option "+s,U.ERR_BAD_OPTION)}},validators:Be};const _e=Ce.validators;class Pe{constructor(e){this.defaults=e,this.interceptors={request:new Q,response:new Q}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ke(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;let s;void 0!==n&&Ce.assertOptions(n,{silentJSONParsing:_e.transitional(_e.boolean),forcedJSONParsing:_e.transitional(_e.boolean),clarifyTimeoutError:_e.transitional(_e.boolean)},!1),void 0!==r&&Ce.assertOptions(r,{encode:_e.function,serialize:_e.function},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase(),s=o&&V.merge(o.common,o[t.method]),s&&V.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=me.concat(s,o);const a=[];let i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!i){const e=[Ne.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=a.length;let f=t;for(d=0;d<u;){const e=a[d++],t=a[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{c=Ne.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return X(ve((e=ke(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}V.forEach(["delete","get","head","options"],(function(e){Pe.prototype[e]=function(t,n){return this.request(ke(n||{},{method:e,url:t,data:(n||{}).data}))}})),V.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(ke(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Pe.prototype[e]=t(),Pe.prototype[e+"Form"]=t(!0)}));var je=Pe;class De{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new ge(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new De((function(t){e=t})),cancel:e}}}var Le=De;const Ve={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(Ve).forEach((([e,t])=>{Ve[t]=e}));var Ue=Ve;const Fe=function e(t){const n=new je(t),r=o(je.prototype.request,n);return V.extend(r,je.prototype,n,{allOwnKeys:!0}),V.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(ke(t,n))},r}(ie);Fe.Axios=je,Fe.CanceledError=ge,Fe.CancelToken=Le,Fe.isCancel=ye,Fe.VERSION=Re,Fe.toFormData=J,Fe.AxiosError=U,Fe.Cancel=Fe.CanceledError,Fe.all=function(e){return Promise.all(e)},Fe.spread=function(e){return function(t){return e.apply(null,t)}},Fe.isAxiosError=function(e){return V.isObject(e)&&!0===e.isAxiosError},Fe.mergeConfig=ke,Fe.AxiosHeaders=me,Fe.formToJSON=e=>oe(V.isHTMLForm(e)?new FormData(e):e),Fe.HttpStatusCode=Ue,Fe.default=Fe;var ze=Fe,Ie={key:0,class:"block md:flex md:flex-1 md:items-center md:justify-between mb-3"},Me={key:0,class:"text-xs text-center md:text-left mb-2 md:mb-0"},qe=["value"],He=e.createElementVNode("span",{class:"text-gray-600"},"Items Per Page",-1),Je={key:1},Ke={class:"overflow-hidden shadow ring-1 ring-black ring-opacity-5 md:rounded-lg mb-3"},We={class:"min-w-full divide-y divide-gray-300"},Ge={class:"bg-gray-50"},$e=["onClick"],Xe={key:0,class:"mr-1"},Qe={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"inline-block w-4 h-4 text-gray-500"},Ze=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 4.5A.75.75 0 013 3.75h14.25a.75.75 0 010 1.5H3a.75.75 0 01-.75-.75zm14.47 3.97a.75.75 0 011.06 0l3.75 3.75a.75.75 0 11-1.06 1.06L18 10.81V21a.75.75 0 01-1.5 0V10.81l-2.47 2.47a.75.75 0 11-1.06-1.06l3.75-3.75zM2.25 9A.75.75 0 013 8.25h9.75a.75.75 0 010 1.5H3A.75.75 0 012.25 9zm0 4.5a.75.75 0 01.75-.75h5.25a.75.75 0 010 1.5H3a.75.75 0 01-.75-.75z","clip-rule":"evenodd"},null,-1)],Ye={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"inline-block w-4 h-4 text-gray-500"},et=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 4.5A.75.75 0 013 3.75h14.25a.75.75 0 010 1.5H3a.75.75 0 01-.75-.75zm0 4.5A.75.75 0 013 8.25h9.75a.75.75 0 010 1.5H3A.75.75 0 012.25 9zm15-.75A.75.75 0 0118 9v10.19l2.47-2.47a.75.75 0 111.06 1.06l-3.75 3.75a.75.75 0 01-1.06 0l-3.75-3.75a.75.75 0 111.06-1.06l2.47 2.47V9a.75.75 0 01.75-.75zm-15 5.25a.75.75 0 01.75-.75h9.75a.75.75 0 010 1.5H3a.75.75 0 01-.75-.75z","clip-rule":"evenodd"},null,-1)],tt={class:"relative divide-y divide-gray-200 bg-white"},nt={key:0},rt=["colspan"],ot=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"inline-block w-6 h-6"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})],-1),st={key:1},at=["colspan"],it={key:0},lt={key:3,class:"absolute inset-0 flex items-center justify-center bg-gray-100/70"},ct=[e.createElementVNode("svg",{class:"inline-block animate-spin -ml-1 mr-3 h-5 w-5 text-gray-600",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)],ut={class:"block md:flex md:flex-1 md:items-center md:justify-between text-center md:text-left"},dt={class:"hidden min-[420px]:block mb-2 md:mb-0"},ft={class:"text-xs lg:text-sm text-gray-700"},pt={class:"font-medium"},mt={class:"font-medium"},ht={class:"font-medium"},yt={key:0},gt={class:"font-medium"},bt={class:"isolate inline-flex -space-x-px rounded-md shadow-sm","aria-label":"Pagination"},vt=[e.createElementVNode("span",{class:"sr-only"},"Previous",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.72 12.53a.75.75 0 010-1.06l7.5-7.5a.75.75 0 111.06 1.06L9.31 12l6.97 6.97a.75.75 0 11-1.06 1.06l-7.5-7.5z","clip-rule":"evenodd"})],-1)],wt=["disabled"],Et=["value"],xt=[e.createElementVNode("span",{class:"sr-only"},"Next",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.28 11.47a.75.75 0 010 1.06l-7.5 7.5a.75.75 0 01-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 011.06-1.06l7.5 7.5z","clip-rule":"evenodd"})],-1)],St={__name:"data-table",props:{columns:{type:[Array,Object],default:function(){return[]}},data:{type:Array,default:function(){return[]}},allowedItemsPerPage:{type:Array,default:null},is_ssp_mode:{type:Boolean,default:!1},url:{type:String,default:null},is_search_enable:{type:Boolean,default:!1},defaultItemsPerPage:{type:Number,default:null},defaultSortBy:{type:[String,Number],default:null},defaultSortDesc:{type:Boolean,default:!1}},setup:function(n,r){var o=r.expose,s=n,a=e.ref(null),i=e.ref(1),l=e.ref(null),c=e.ref(null),u=e.ref(null),d=e.reactive({by:null,desc:!1}),f=e.ref(""),p=e.ref(!0),m=e.ref(!1),h=e.computed((function(){var e={start:1,end:1};return s.is_ssp_mode?null!==a.value&&(e.start=a.value.data.current_item_position_start,e.end=a.value.data.current_item_position_end):(e.start=(i.value-1)*u.value+1,e.end=i.value*u.value,e.end>c.value&&(e.end=c.value)),e})),y=e.computed((function(){var e=[];for(var n in s.columns){var r=s.columns[n];"object"!==t(r)?e.push({label:r,db:n,sortable:!0,class:[]}):(void 0===r.sortable&&(r.sortable=!0),void 0===r.class&&(r.class=[]),e.push(r))}return e})),g=e.computed((function(){var e=[];return s.is_ssp_mode?null!==a.value&&(e=a.value.data.items):(e=s.data.sort((function(e,t){var n=b.value.by;return b.value.desc?e[n]<t[n]?1:t[n]<e[n]?-1:0:e[n]>t[n]?1:t[n]>e[n]?-1:0})),f.value.length>0&&(e=e.filter((function(e){for(var t in e)if(e[t].toString().toLowerCase().search(f.value.toLowerCase())>=0)return!0;return!1})))),e})),b=e.computed((function(){var e={by:s.defaultSortBy,desc:s.defaultSortDesc};return"string"==typeof d.by?y.value.some((function(e){return e.db===d.by}))&&(e.by=d.by,e.desc=d.desc):null===e.by&&(e.by=y.value[0].db),e})),v=e.computed((function(){return null==c.value?1:Math.ceil(c.value/u.value)})),w=function(e){if(p.value)return!1;var t=i.value+e;if(t<1||t>v.value)return!1;i.value=t,E()},E=function(){s.is_ssp_mode&&x()},x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};if(!s.is_ssp_mode)return!1;if("string"!=typeof s.url)throw new Error("`url` is required.");p.value=!0,m.value=!1;var t={page:i.value,itemsPerPage:u.value,sortBy:b.value.by,sortDesc:b.value.desc?"true":"false"};f.value.length>0&&(t.search=f.value),ze.get(s.url,{params:t}).then((function(t){a.value=t.data,l.value=t.data.data.total_item_count,c.value=t.data.data.total_filtered_item_count,"function"==typeof e&&e(t)})).catch((function(e){console.log(e),m.value=!0})).then((function(){p.value=!1}))};e.watch(u,(function(){i.value>v.value&&(i.value=v.value),E()})),e.watch(d,(function(){E()}));var S=null;return e.watch(f,(function(){s.is_ssp_mode?(p.value=!0,null!==S&&clearTimeout(S),S=setTimeout((function(){i.value=1,x((function(){S=null}))}),800)):(i.value=1,c.value=g.value.length)})),e.onMounted((function(){var e,t;null===u.value&&(u.value=null!==(e=s.defaultItemsPerPage)&&void 0!==e?e:Array.isArray(s.allowedItemsPerPage)&&null!==(t=s.allowedItemsPerPage[0])&&void 0!==t?t:10),s.is_ssp_mode?x():(p.value=!1,l.value=c.value=s.data.length)})),o({fetchData:x}),function(t,r){return e.openBlock(),e.createElementBlock("div",null,[null!==n.allowedItemsPerPage||n.is_search_enable?(e.openBlock(),e.createElementBlock("div",Ie,[null!==n.allowedItemsPerPage?(e.openBlock(),e.createElementBlock("div",Me,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":r[0]||(r[0]=function(e){return u.value=e}),class:"mr-2 rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 text-xs"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.allowedItemsPerPage,(function(t,n){return e.openBlock(),e.createElementBlock("option",{value:t,key:n},e.toDisplayString(t),9,qe)})),128))],512),[[e.vModelSelect,u.value]]),He])):e.createCommentVNode("",!0),n.is_search_enable?(e.openBlock(),e.createElementBlock("div",Je,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":r[1]||(r[1]=function(e){return f.value=e}),type:"text",onKeyup:r[2]||(r[2]=e.withKeys((function(e){return E()}),["enter"])),placeholder:"Search / Filter",autocomplete:"off",class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 text-xs"},null,544),[[e.vModelText,f.value]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ke,[e.createElementVNode("table",We,[e.createElementVNode("thead",Ge,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y),(function(t){return e.openBlock(),e.createElementBlock("th",{key:t.db,scope:"col",class:e.normalizeClass(["px-3 py-3.5 text-sm font-semibold text-gray-900 text-center",{"cursor-pointer":t.sortable}]),onClick:function(e){return n=t.db,void 0!==(r=y.value.find((function(e){return e.db==n})))&&!!r.sortable&&(b.value.by==n?d.desc=!d.desc:d.desc=!1,d.by=n,!0);var n,r}},[e.unref(b).by==t.db?(e.openBlock(),e.createElementBlock("span",Xe,[!1===e.unref(b).desc?(e.openBlock(),e.createElementBlock("svg",Qe,Ze)):(e.openBlock(),e.createElementBlock("svg",Ye,et))])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.label),1)],10,$e)})),128))])]),e.createElementVNode("tbody",tt,[m.value?(e.openBlock(),e.createElementBlock("tr",nt,[e.createElementVNode("td",{class:"text-center py-6 px-2 text-red-400 bg-red-50/80",colspan:e.unref(y).length},[ot,e.createTextVNode(" Failed to load ")],8,rt)])):e.unref(g).length<=0?(e.openBlock(),e.createElementBlock("tr",st,[e.createElementVNode("td",{class:"text-center py-6 px-2 text-gray-500",colspan:e.unref(y).length}," No data ",8,at)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(e.unref(g),(function(t,r){return e.openBlock(),e.createElementBlock(e.Fragment,{key:r},[n.is_ssp_mode||r+1>=e.unref(h).start&&r<e.unref(h).end?(e.openBlock(),e.createElementBlock("tr",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y),(function(n,r){return e.openBlock(),e.createElementBlock("td",{class:e.normalizeClass(["whitespace-nowrap px-3 py-4 text-sm text-gray-500",n.class]),key:r},e.toDisplayString(t[n.db]),3)})),128))])):e.createCommentVNode("",!0)],64)})),128)),p.value?(e.openBlock(),e.createElementBlock("div",lt,ct)):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",ut,[e.createElementVNode("div",dt,[e.createElementVNode("p",ft,[e.createTextVNode(" Showing "),e.createElementVNode("span",pt,e.toDisplayString(e.unref(h).start),1),e.createTextVNode(" to "),e.createElementVNode("span",mt,e.toDisplayString(e.unref(h).end),1),e.createTextVNode(" of "),e.createElementVNode("span",ht,e.toDisplayString(c.value),1),e.createTextVNode(" results "),f.value.length>0?(e.openBlock(),e.createElementBlock("span",yt,[e.createTextVNode("(filtered from "),e.createElementVNode("span",gt,e.toDisplayString(l.value),1),e.createTextVNode(" items)")])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[e.createElementVNode("nav",bt,[e.createElementVNode("a",{onClick:r[3]||(r[3]=function(e){return w(-1)}),href:"javascript:void(0);",class:e.normalizeClass(["relative inline-flex items-center rounded-l-md border border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20",{"opacity-40 cursor-default":i.value<=1||p.value}])},vt,2),e.createElementVNode("span",null,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":r[4]||(r[4]=function(e){return i.value=e}),onChange:r[5]||(r[5]=function(e){return E()}),class:"relative inline-flex items-center border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20 appearance-none bg-none cursor-pointer text-center",disabled:e.unref(g).length<=0||p.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(v),(function(t){return e.openBlock(),e.createElementBlock("option",{key:t,value:t},e.toDisplayString(t),9,Et)})),128))],40,wt),[[e.vModelSelect,i.value]])]),e.createElementVNode("a",{onClick:r[6]||(r[6]=function(e){return w(1)}),href:"javascript:void(0);",class:e.normalizeClass(["relative inline-flex items-center rounded-r-md border border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20",{"opacity-40 cursor-default":i.value>=e.unref(v)||p.value}])},xt,2)])])])])}}},Ot=function(){var e=St;return e.install=function(t){t.component("DataTable",e)},e}(),Nt=Object.freeze({__proto__:null,default:Ot});return Object.entries(Nt).forEach((function(e){var t=n(e,2),r=t[0],o=t[1];"default"!==r&&(Ot[r]=o)})),Ot}(Vue);
var DataTable=function(e){"use strict";function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(e)}function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,s,a,i=[],l=!0,c=!1;try{if(s=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(i.push(r.value),i.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return i}}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function o(e,t){return function(){return e.apply(t,arguments)}}const{toString:s}=Object.prototype,{getPrototypeOf:a}=Object,i=(l=Object.create(null),e=>{const t=s.call(e);return l[t]||(l[t]=t.slice(8,-1).toLowerCase())});var l;const c=e=>(e=e.toLowerCase(),t=>i(t)===e),u=e=>t=>typeof t===e,{isArray:d}=Array,f=u("undefined");const p=c("ArrayBuffer");const m=u("string"),h=u("function"),y=u("number"),g=e=>null!==e&&"object"==typeof e,b=e=>{if("object"!==i(e))return!1;const t=a(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Symbol.toStringTag in e||Symbol.iterator in e)},v=c("Date"),w=c("File"),E=c("Blob"),x=c("FileList"),S=c("URLSearchParams");function O(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),d(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let a;for(r=0;r<s;r++)a=o[r],t.call(null,e[a],a,e)}}function N(e,t){t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,k=e=>!f(e)&&e!==A;const R=(B="undefined"!=typeof Uint8Array&&a(Uint8Array),e=>B&&e instanceof B);var B;const T=c("HTMLFormElement"),C=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),_=c("RegExp"),P=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};O(n,((n,o)=>{!1!==t(n,o,e)&&(r[o]=n)})),Object.defineProperties(e,r)},j="abcdefghijklmnopqrstuvwxyz",D="0123456789",L={DIGIT:D,ALPHA:j,ALPHA_DIGIT:j+j.toUpperCase()+D};var V={isArray:d,isArrayBuffer:p,isBuffer:function(e){return null!==e&&!f(e)&&null!==e.constructor&&!f(e.constructor)&&h(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{const t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||s.call(e)===t||h(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&p(e.buffer),t},isString:m,isNumber:y,isBoolean:e=>!0===e||!1===e,isObject:g,isPlainObject:b,isUndefined:f,isDate:v,isFile:w,isBlob:E,isRegExp:_,isFunction:h,isStream:e=>g(e)&&h(e.pipe),isURLSearchParams:S,isTypedArray:R,isFileList:x,forEach:O,merge:function e(){const{caseless:t}=k(this)&&this||{},n={},r=(r,o)=>{const s=t&&N(n,o)||o;b(n[s])&&b(r)?n[s]=e(n[s],r):b(r)?n[s]=e({},r):d(r)?n[s]=r.slice():n[s]=r};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&O(arguments[e],r);return n},extend:(e,t,n,{allOwnKeys:r}={})=>(O(t,((t,r)=>{n&&h(t)?e[r]=o(t,n):e[r]=t}),{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let o,s,i;const l={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],r&&!r(i,e,t)||l[i]||(t[i]=e[i],l[i]=!0);e=!1!==n&&a(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:i,kindOfTest:c,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(d(e))return e;let t=e.length;if(!y(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:T,hasOwnProperty:C,hasOwnProp:C,reduceDescriptors:P,freezeMethods:e=>{P(e,((t,n)=>{if(h(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];h(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))}))},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach((e=>{n[e]=!0}))};return d(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(e,t,n){return t.toUpperCase()+n})),noop:()=>{},toFiniteNumber:(e,t)=>(e=+e,Number.isFinite(e)?e:t),findKey:N,global:A,isContextDefined:k,ALPHABET:L,generateString:(e=16,t=L.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n},isSpecCompliantForm:function(e){return!!(e&&h(e.append)&&"FormData"===e[Symbol.toStringTag]&&e[Symbol.iterator])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(g(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[r]=e;const o=d(e)?[]:{};return O(e,((e,t)=>{const s=n(e,r+1);!f(s)&&(o[t]=s)})),t[r]=void 0,o}}return e};return n(e,0)}};function U(e,t,n,r,o){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),n&&(this.config=n),r&&(this.request=r),o&&(this.response=o)}V.inherits(U,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:V.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const F=U.prototype,z={};["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=>{z[e]={value:e}})),Object.defineProperties(U,z),Object.defineProperty(F,"isAxiosError",{value:!0}),U.from=(e,t,n,r,o,s)=>{const a=Object.create(F);return V.toFlatObject(e,a,(function(e){return e!==Error.prototype}),(e=>"isAxiosError"!==e)),U.call(a,e.message,t,n,r,o),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};function I(e){return V.isPlainObject(e)||V.isArray(e)}function M(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function q(e,t,n){return e?e.concat(t).map((function(e,t){return e=M(e),!n&&t?"["+e+"]":e})).join(n?".":""):t}const H=V.toFlatObject(V,{},null,(function(e){return/^is[A-Z]/.test(e)}));function J(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=V.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(e,t){return!V.isUndefined(t[e])}))).metaTokens,o=n.visitor||c,s=n.dots,a=n.indexes,i=(n.Blob||"undefined"!=typeof Blob&&Blob)&&V.isSpecCompliantForm(t);if(!V.isFunction(o))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(V.isDate(e))return e.toISOString();if(!i&&V.isBlob(e))throw new U("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(e)||V.isTypedArray(e)?i&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,o){let i=e;if(e&&!o&&"object"==typeof e)if(V.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(V.isArray(e)&&function(e){return V.isArray(e)&&!e.some(I)}(e)||(V.isFileList(e)||V.endsWith(n,"[]"))&&(i=V.toArray(e)))return n=M(n),i.forEach((function(e,r){!V.isUndefined(e)&&null!==e&&t.append(!0===a?q([n],r,s):null===a?n:n+"[]",l(e))})),!1;return!!I(e)||(t.append(q(o,n,s),l(e)),!1)}const u=[],d=Object.assign(H,{defaultVisitor:c,convertValue:l,isVisitable:I});if(!V.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!V.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),V.forEach(n,(function(n,s){!0===(!(V.isUndefined(n)||null===n)&&o.call(t,n,V.isString(s)?s.trim():s,r,d))&&e(n,r?r.concat(s):[s])})),u.pop()}}(e),t}function K(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,(function(e){return t[e]}))}function W(e,t){this._pairs=[],e&&J(e,this,t)}const G=W.prototype;function $(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function X(e,t,n){if(!t)return e;const r=n&&n.encode||$,o=n&&n.serialize;let s;if(s=o?o(t,n):V.isURLSearchParams(t)?t.toString():new W(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}G.append=function(e,t){this._pairs.push([e,t])},G.toString=function(e){const t=e?function(t){return e.call(this,t,K)}:K;return this._pairs.map((function(e){return t(e[0])+"="+t(e[1])}),"").join("&")};var Q=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){V.forEach(this.handlers,(function(t){null!==t&&e(t)}))}},Z={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Y="undefined"!=typeof URLSearchParams?URLSearchParams:W,ee=FormData;const te=(()=>{let e;return("undefined"==typeof navigator||"ReactNative"!==(e=navigator.product)&&"NativeScript"!==e&&"NS"!==e)&&("undefined"!=typeof window&&"undefined"!=typeof document)})(),ne="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var re={isBrowser:!0,classes:{URLSearchParams:Y,FormData:ee,Blob:Blob},isStandardBrowserEnv:te,isStandardBrowserWebWorkerEnv:ne,protocols:["http","https","file","blob","url","data"]};function oe(e){function t(e,n,r,o){let s=e[o++];const a=Number.isFinite(+s),i=o>=e.length;if(s=!s&&V.isArray(r)?r.length:s,i)return V.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!a;r[s]&&V.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],o)&&V.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}(r[s])),!a}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,((e,r)=>{t(function(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map((e=>"[]"===e[0]?"":e[1]||e[0]))}(e),r,n,0)})),n}return null}const se={"Content-Type":void 0};const ae={transitional:Z,adapter:["xhr","http"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=V.isObject(e);o&&V.isHTMLForm(e)&&(e=new FormData(e));if(V.isFormData(e))return r&&r?JSON.stringify(oe(e)):e;if(V.isArrayBuffer(e)||V.isBuffer(e)||V.isStream(e)||V.isFile(e)||V.isBlob(e))return e;if(V.isArrayBufferView(e))return e.buffer;if(V.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return J(e,new re.classes.URLSearchParams,Object.assign({visitor:function(e,t,n,r){return re.isNode&&V.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((s=V.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return J(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ae.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(e&&V.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e)}catch(e){if(n){if("SyntaxError"===e.name)throw U.from(e,U.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:re.classes.FormData,Blob:re.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};V.forEach(["delete","get","head"],(function(e){ae.headers[e]={}})),V.forEach(["post","put","patch"],(function(e){ae.headers[e]=V.merge(se)}));var ie=ae;const le=V.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"]);const ce=Symbol("internals");function ue(e){return e&&String(e).trim().toLowerCase()}function de(e){return!1===e||null==e?e:V.isArray(e)?e.map(de):String(e)}function fe(e,t,n,r){return V.isFunction(r)?r.call(this,t,n):V.isString(t)?V.isString(r)?-1!==t.indexOf(r):V.isRegExp(r)?r.test(t):void 0:void 0}class pe{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=ue(t);if(!o)throw new Error("header name must be a non-empty string");const s=V.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=de(e))}const s=(e,t)=>V.forEach(e,((e,n)=>o(e,n,t)));return V.isPlainObject(e)||e instanceof this.constructor?s(e,t):V.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z]+$/.test(e.trim())?s((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach((function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&le[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)})),t})(e),t):null!=e&&o(t,e,n),this}get(e,t){if(e=ue(e)){const n=V.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(V.isFunction(t))return t.call(this,e,n);if(V.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ue(e)){const n=V.findKey(this,e);return!(!n||void 0===this[n]||t&&!fe(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=ue(e)){const o=V.findKey(n,e);!o||t&&!fe(0,n[o],o,t)||(delete n[o],r=!0)}}return V.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!fe(0,this[o],o,e)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return V.forEach(this,((r,o)=>{const s=V.findKey(n,o);if(s)return t[s]=de(r),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((e,t,n)=>t.toUpperCase()+n))}(o):String(o).trim();a!==o&&delete t[o],t[a]=de(r),n[a]=!0})),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return V.forEach(this,((n,r)=>{null!=n&&!1!==n&&(t[r]=e&&V.isArray(n)?n.join(", "):n)})),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([e,t])=>e+": "+t)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach((e=>n.set(e))),n}static accessor(e){const t=(this[ce]=this[ce]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=ue(e);t[r]||(!function(e,t){const n=V.toCamelCase(" "+t);["get","set","has"].forEach((r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})}))}(n,e),t[r]=!0)}return V.isArray(e)?e.forEach(r):r(e),this}}pe.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.freezeMethods(pe.prototype),V.freezeMethods(pe);var me=pe;function he(e,t){const n=this||ie,r=t||n,o=me.from(r.headers);let s=r.data;return V.forEach(e,(function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)})),o.normalize(),s}function ye(e){return!(!e||!e.__CANCEL__)}function ge(e,t,n){U.call(this,null==e?"canceled":e,U.ERR_CANCELED,t,n),this.name="CanceledError"}V.inherits(ge,U,{__CANCEL__:!0});var be=re.isStandardBrowserEnv?{write:function(e,t,n,r,o,s){const a=[];a.push(e+"="+encodeURIComponent(t)),V.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),V.isString(r)&&a.push("path="+r),V.isString(o)&&a.push("domain="+o),!0===s&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}};function ve(e,t){return e&&!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}var we=re.isStandardBrowserEnv?function(){const e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let n;function r(n){let r=n;return e&&(t.setAttribute("href",r),r=t.href),t.setAttribute("href",r),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:"/"===t.pathname.charAt(0)?t.pathname:"/"+t.pathname}}return n=r(window.location.href),function(e){const t=V.isString(e)?r(e):e;return t.protocol===n.protocol&&t.host===n.host}}():function(){return!0};function Ee(e,t){let n=0;const r=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,a=0;return t=void 0!==t?t:1e3,function(i){const l=Date.now(),c=r[a];o||(o=l),n[s]=i,r[s]=l;let u=a,d=0;for(;u!==s;)d+=n[u++],u%=e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),l-o<t)return;const f=c&&l-c;return f?Math.round(1e3*d/f):void 0}}(50,250);return o=>{const s=o.loaded,a=o.lengthComputable?o.total:void 0,i=s-n,l=r(i);n=s;const c={loaded:s,total:a,progress:a?s/a:void 0,bytes:i,rate:l||void 0,estimated:l&&a&&s<=a?(a-s)/l:void 0,event:o};c[t?"download":"upload"]=!0,e(c)}}const xe={http:null,xhr:"undefined"!=typeof XMLHttpRequest&&function(e){return new Promise((function(t,n){let r=e.data;const o=me.from(e.headers).normalize(),s=e.responseType;let a;function i(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}V.isFormData(r)&&(re.isStandardBrowserEnv||re.isStandardBrowserWebWorkerEnv)&&o.setContentType(!1);let l=new XMLHttpRequest;if(e.auth){const t=e.auth.username||"",n=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(t+":"+n))}const c=ve(e.baseURL,e.url);function u(){if(!l)return;const r=me.from("getAllResponseHeaders"in l&&l.getAllResponseHeaders());!function(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new U("Request failed with status code "+n.status,[U.ERR_BAD_REQUEST,U.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}((function(e){t(e),i()}),(function(e){n(e),i()}),{data:s&&"text"!==s&&"json"!==s?l.response:l.responseText,status:l.status,statusText:l.statusText,headers:r,config:e,request:l}),l=null}if(l.open(e.method.toUpperCase(),X(c,e.params,e.paramsSerializer),!0),l.timeout=e.timeout,"onloadend"in l?l.onloadend=u:l.onreadystatechange=function(){l&&4===l.readyState&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))&&setTimeout(u)},l.onabort=function(){l&&(n(new U("Request aborted",U.ECONNABORTED,e,l)),l=null)},l.onerror=function(){n(new U("Network Error",U.ERR_NETWORK,e,l)),l=null},l.ontimeout=function(){let t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const r=e.transitional||Z;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new U(t,r.clarifyTimeoutError?U.ETIMEDOUT:U.ECONNABORTED,e,l)),l=null},re.isStandardBrowserEnv){const t=(e.withCredentials||we(c))&&e.xsrfCookieName&&be.read(e.xsrfCookieName);t&&o.set(e.xsrfHeaderName,t)}void 0===r&&o.setContentType(null),"setRequestHeader"in l&&V.forEach(o.toJSON(),(function(e,t){l.setRequestHeader(t,e)})),V.isUndefined(e.withCredentials)||(l.withCredentials=!!e.withCredentials),s&&"json"!==s&&(l.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&l.addEventListener("progress",Ee(e.onDownloadProgress,!0)),"function"==typeof e.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",Ee(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=t=>{l&&(n(!t||t.type?new ge(null,e,l):t),l.abort(),l=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const d=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(c);d&&-1===re.protocols.indexOf(d)?n(new U("Unsupported protocol "+d+":",U.ERR_BAD_REQUEST,e)):l.send(r||null)}))}};V.forEach(xe,((e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}}));var Se={getAdapter:e=>{e=V.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let o=0;o<t&&(n=e[o],!(r=V.isString(n)?xe[n.toLowerCase()]:n));o++);if(!r){if(!1===r)throw new U(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT");throw new Error(V.hasOwnProp(xe,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`)}if(!V.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:xe};function Oe(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ge(null,e)}function Ne(e){Oe(e),e.headers=me.from(e.headers),e.data=he.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Se.getAdapter(e.adapter||ie.adapter)(e).then((function(t){return Oe(e),t.data=he.call(e,e.transformResponse,t),t.headers=me.from(t.headers),t}),(function(t){return ye(t)||(Oe(e),t&&t.response&&(t.response.data=he.call(e,e.transformResponse,t.response),t.response.headers=me.from(t.response.headers))),Promise.reject(t)}))}const Ae=e=>e instanceof me?e.toJSON():e;function ke(e,t){t=t||{};const n={};function r(e,t,n){return V.isPlainObject(e)&&V.isPlainObject(t)?V.merge.call({caseless:n},e,t):V.isPlainObject(t)?V.merge({},t):V.isArray(t)?t.slice():t}function o(e,t,n){return V.isUndefined(t)?V.isUndefined(e)?void 0:r(void 0,e,n):r(e,t,n)}function s(e,t){if(!V.isUndefined(t))return r(void 0,t)}function a(e,t){return V.isUndefined(t)?V.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function i(n,o,s){return s in t?r(n,o):s in e?r(void 0,n):void 0}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:i,headers:(e,t)=>o(Ae(e),Ae(t),!0)};return V.forEach(Object.keys(e).concat(Object.keys(t)),(function(r){const s=l[r]||o,a=s(e[r],t[r],r);V.isUndefined(a)&&s!==i||(n[r]=a)})),n}const Re="1.3.2",Be={};["object","boolean","number","function","string","symbol"].forEach(((e,t)=>{Be[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));const Te={};Be.transitional=function(e,t,n){function r(e,t){return"[Axios v"+Re+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new U(r(o," has been removed"+(t?" in "+t:"")),U.ERR_DEPRECATED);return t&&!Te[o]&&(Te[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}};var Ce={assertOptions:function(e,t,n){if("object"!=typeof e)throw new U("options must be an object",U.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],a=t[s];if(a){const t=e[s],n=void 0===t||a(t,s,e);if(!0!==n)throw new U("option "+s+" must be "+n,U.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new U("Unknown option "+s,U.ERR_BAD_OPTION)}},validators:Be};const _e=Ce.validators;class Pe{constructor(e){this.defaults=e,this.interceptors={request:new Q,response:new Q}}request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=ke(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;let s;void 0!==n&&Ce.assertOptions(n,{silentJSONParsing:_e.transitional(_e.boolean),forcedJSONParsing:_e.transitional(_e.boolean),clarifyTimeoutError:_e.transitional(_e.boolean)},!1),void 0!==r&&Ce.assertOptions(r,{encode:_e.function,serialize:_e.function},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase(),s=o&&V.merge(o.common,o[t.method]),s&&V.forEach(["delete","get","head","post","put","patch","common"],(e=>{delete o[e]})),t.headers=me.concat(s,o);const a=[];let i=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,a.unshift(e.fulfilled,e.rejected))}));const l=[];let c;this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)}));let u,d=0;if(!i){const e=[Ne.bind(this),void 0];for(e.unshift.apply(e,a),e.push.apply(e,l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=a.length;let f=t;for(d=0;d<u;){const e=a[d++],t=a[d++];try{f=e(f)}catch(e){t.call(this,e);break}}try{c=Ne.call(this,f)}catch(e){return Promise.reject(e)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return X(ve((e=ke(this.defaults,e)).baseURL,e.url),e.params,e.paramsSerializer)}}V.forEach(["delete","get","head","options"],(function(e){Pe.prototype[e]=function(t,n){return this.request(ke(n||{},{method:e,url:t,data:(n||{}).data}))}})),V.forEach(["post","put","patch"],(function(e){function t(t){return function(n,r,o){return this.request(ke(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}Pe.prototype[e]=t(),Pe.prototype[e+"Form"]=t(!0)}));var je=Pe;class De{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise((function(e){t=e}));const n=this;this.promise.then((e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null})),this.promise.then=e=>{let t;const r=new Promise((e=>{n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e,r,o){n.reason||(n.reason=new ge(e,r,o),t(n.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}static source(){let e;return{token:new De((function(t){e=t})),cancel:e}}}var Le=De;const Ve={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(Ve).forEach((([e,t])=>{Ve[t]=e}));var Ue=Ve;const Fe=function e(t){const n=new je(t),r=o(je.prototype.request,n);return V.extend(r,je.prototype,n,{allOwnKeys:!0}),V.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(ke(t,n))},r}(ie);Fe.Axios=je,Fe.CanceledError=ge,Fe.CancelToken=Le,Fe.isCancel=ye,Fe.VERSION=Re,Fe.toFormData=J,Fe.AxiosError=U,Fe.Cancel=Fe.CanceledError,Fe.all=function(e){return Promise.all(e)},Fe.spread=function(e){return function(t){return e.apply(null,t)}},Fe.isAxiosError=function(e){return V.isObject(e)&&!0===e.isAxiosError},Fe.mergeConfig=ke,Fe.AxiosHeaders=me,Fe.formToJSON=e=>oe(V.isHTMLForm(e)?new FormData(e):e),Fe.HttpStatusCode=Ue,Fe.default=Fe;var ze=Fe,Ie={key:0,class:"block md:flex md:flex-1 md:items-center md:justify-between mb-3"},Me={key:0,class:"text-xs text-center md:text-left mb-2 md:mb-0"},qe=["value"],He=e.createElementVNode("span",{class:"text-gray-600"},"Items Per Page",-1),Je={key:1},Ke={class:"overflow-x-scroll shadow ring-1 ring-black ring-opacity-5 md:rounded-lg mb-3"},We={class:"min-w-full divide-y divide-gray-300"},Ge={class:"bg-gray-50"},$e=["onClick"],Xe={key:0,class:"mr-1"},Qe={key:0,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"inline-block w-4 h-4 text-gray-500"},Ze=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 4.5A.75.75 0 013 3.75h14.25a.75.75 0 010 1.5H3a.75.75 0 01-.75-.75zm14.47 3.97a.75.75 0 011.06 0l3.75 3.75a.75.75 0 11-1.06 1.06L18 10.81V21a.75.75 0 01-1.5 0V10.81l-2.47 2.47a.75.75 0 11-1.06-1.06l3.75-3.75zM2.25 9A.75.75 0 013 8.25h9.75a.75.75 0 010 1.5H3A.75.75 0 012.25 9zm0 4.5a.75.75 0 01.75-.75h5.25a.75.75 0 010 1.5H3a.75.75 0 01-.75-.75z","clip-rule":"evenodd"},null,-1)],Ye={key:1,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"inline-block w-4 h-4 text-gray-500"},et=[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M2.25 4.5A.75.75 0 013 3.75h14.25a.75.75 0 010 1.5H3a.75.75 0 01-.75-.75zm0 4.5A.75.75 0 013 8.25h9.75a.75.75 0 010 1.5H3A.75.75 0 012.25 9zm15-.75A.75.75 0 0118 9v10.19l2.47-2.47a.75.75 0 111.06 1.06l-3.75 3.75a.75.75 0 01-1.06 0l-3.75-3.75a.75.75 0 111.06-1.06l2.47 2.47V9a.75.75 0 01.75-.75zm-15 5.25a.75.75 0 01.75-.75h9.75a.75.75 0 010 1.5H3a.75.75 0 01-.75-.75z","clip-rule":"evenodd"},null,-1)],tt={class:"relative divide-y divide-gray-200 bg-white"},nt={key:0},rt=["colspan"],ot=e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor",class:"inline-block w-6 h-6"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 9v3.75m-9.303 3.376c-.866 1.5.217 3.374 1.948 3.374h14.71c1.73 0 2.813-1.874 1.948-3.374L13.949 3.378c-.866-1.5-3.032-1.5-3.898 0L2.697 16.126zM12 15.75h.007v.008H12v-.008z"})],-1),st={key:1},at=["colspan"],it={key:0},lt={key:3,class:"absolute inset-0 flex items-center justify-center bg-gray-100/70"},ct=[e.createElementVNode("svg",{class:"inline-block animate-spin -ml-1 mr-3 h-5 w-5 text-gray-600",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),e.createElementVNode("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)],ut={class:"block md:flex md:flex-1 md:items-center md:justify-between text-center md:text-left"},dt={class:"hidden min-[420px]:block mb-2 md:mb-0"},ft={class:"text-xs lg:text-sm text-gray-700"},pt={class:"font-medium"},mt={class:"font-medium"},ht={class:"font-medium"},yt={key:0},gt={class:"font-medium"},bt={class:"isolate inline-flex -space-x-px rounded-md shadow-sm","aria-label":"Pagination"},vt=[e.createElementVNode("span",{class:"sr-only"},"Previous",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M7.72 12.53a.75.75 0 010-1.06l7.5-7.5a.75.75 0 111.06 1.06L9.31 12l6.97 6.97a.75.75 0 11-1.06 1.06l-7.5-7.5z","clip-rule":"evenodd"})],-1)],wt=["disabled"],Et=["value"],xt=[e.createElementVNode("span",{class:"sr-only"},"Next",-1),e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",class:"w-5 h-5"},[e.createElementVNode("path",{"fill-rule":"evenodd",d:"M16.28 11.47a.75.75 0 010 1.06l-7.5 7.5a.75.75 0 01-1.06-1.06L14.69 12 7.72 5.03a.75.75 0 011.06-1.06l7.5 7.5z","clip-rule":"evenodd"})],-1)],St={__name:"data-table",props:{columns:{type:[Array,Object],default:function(){return[]}},data:{type:Array,default:function(){return[]}},allowedItemsPerPage:{type:Array,default:null},is_ssp_mode:{type:Boolean,default:!1},url:{type:String,default:null},is_search_enable:{type:Boolean,default:!1},defaultItemsPerPage:{type:Number,default:null},defaultSortBy:{type:[String,Number],default:null},defaultSortDesc:{type:Boolean,default:!1}},setup:function(n,r){var o=r.expose,s=n,a=e.ref(null),i=e.ref(1),l=e.ref(null),c=e.ref(null),u=e.ref(null),d=e.reactive({by:null,desc:!1}),f=e.ref(""),p=e.ref(!0),m=e.ref(!1),h=e.computed((function(){var e={start:1,end:1};return s.is_ssp_mode?null!==a.value&&(e.start=a.value.data.current_item_position_start,e.end=a.value.data.current_item_position_end):(e.start=(i.value-1)*u.value+1,e.start=e.start<0?0:e.start,e.end=i.value*u.value,e.end>c.value&&(e.end=c.value)),e})),y=e.computed((function(){var e=[];for(var n in s.columns){var r=s.columns[n];"object"!==t(r)?e.push({label:r,db:n,sortable:!0,class:[]}):(void 0===r.sortable&&(r.sortable=!0),void 0===r.class&&(r.class=[]),e.push(r))}return e})),g=e.computed((function(){var e=[];return s.is_ssp_mode?null!==a.value&&(e=a.value.data.items):(e=s.data.sort((function(e,t){var n=b.value.by;return b.value.desc?e[n]<t[n]?1:t[n]<e[n]?-1:0:e[n]>t[n]?1:t[n]>e[n]?-1:0})),f.value.length>0&&(e=e.filter((function(e){for(var t in e)if(e[t].toString().toLowerCase().search(f.value.toLowerCase())>=0)return!0;return!1})))),e})),b=e.computed((function(){var e={by:s.defaultSortBy,desc:s.defaultSortDesc};return"string"==typeof d.by?y.value.some((function(e){return e.db===d.by}))&&(e.by=d.by,e.desc=d.desc):null===e.by&&(e.by=y.value[0].db),e})),v=e.computed((function(){return null==c.value?1:Math.ceil(c.value/u.value)})),w=function(e){if(p.value)return!1;var t=i.value+e;if(t<1||t>v.value)return!1;i.value=t,E()},E=function(){s.is_ssp_mode&&x()},x=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){};if(!s.is_ssp_mode)return!1;if("string"!=typeof s.url)throw new Error("`url` is required.");p.value=!0,m.value=!1;var t={page:i.value,itemsPerPage:u.value,sortBy:b.value.by,sortDesc:b.value.desc?"true":"false"};f.value.length>0&&(t.search=f.value),ze.get(s.url,{params:t}).then((function(t){a.value=t.data,l.value=t.data.data.total_item_count,c.value=t.data.data.total_filtered_item_count,"function"==typeof e&&e(t)})).catch((function(e){console.log(e),m.value=!0})).then((function(){p.value=!1}))};e.watch(u,(function(){i.value>v.value&&(i.value=v.value),E()})),e.watch(d,(function(){E()}));var S=null;return e.watch(f,(function(){s.is_ssp_mode?(p.value=!0,null!==S&&clearTimeout(S),S=setTimeout((function(){i.value=1,x((function(){S=null}))}),800)):(i.value=1,c.value=g.value.length)})),e.onMounted((function(){var e,t;null===u.value&&(u.value=null!==(e=s.defaultItemsPerPage)&&void 0!==e?e:Array.isArray(s.allowedItemsPerPage)&&null!==(t=s.allowedItemsPerPage[0])&&void 0!==t?t:10),s.is_ssp_mode?x():(p.value=!1,l.value=c.value=s.data.length)})),o({fetchData:x}),function(t,r){return e.openBlock(),e.createElementBlock("div",null,[null!==n.allowedItemsPerPage||n.is_search_enable?(e.openBlock(),e.createElementBlock("div",Ie,[null!==n.allowedItemsPerPage?(e.openBlock(),e.createElementBlock("div",Me,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":r[0]||(r[0]=function(e){return u.value=e}),class:"mr-2 rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 text-xs"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.allowedItemsPerPage,(function(t,n){return e.openBlock(),e.createElementBlock("option",{value:t,key:n},e.toDisplayString(t),9,qe)})),128))],512),[[e.vModelSelect,u.value]]),He])):e.createCommentVNode("",!0),n.is_search_enable?(e.openBlock(),e.createElementBlock("div",Je,[e.withDirectives(e.createElementVNode("input",{"onUpdate:modelValue":r[1]||(r[1]=function(e){return f.value=e}),type:"text",onKeyup:r[2]||(r[2]=e.withKeys((function(e){return E()}),["enter"])),placeholder:"Search / Filter",autocomplete:"off",class:"mt-1 block w-full rounded-md border-gray-300 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 text-xs"},null,544),[[e.vModelText,f.value]])])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",Ke,[e.createElementVNode("table",We,[e.createElementVNode("thead",Ge,[e.createElementVNode("tr",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y),(function(t){return e.openBlock(),e.createElementBlock("th",{key:t.db,scope:"col",class:e.normalizeClass(["px-3 py-3.5 text-sm font-semibold text-gray-900 text-center",{"cursor-pointer":t.sortable}]),onClick:function(e){return n=t.db,void 0!==(r=y.value.find((function(e){return e.db==n})))&&!!r.sortable&&(b.value.by==n?d.desc=!d.desc:d.desc=!1,d.by=n,!0);var n,r}},[e.unref(b).by==t.db?(e.openBlock(),e.createElementBlock("span",Xe,[!1===e.unref(b).desc?(e.openBlock(),e.createElementBlock("svg",Qe,Ze)):(e.openBlock(),e.createElementBlock("svg",Ye,et))])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.label),1)],10,$e)})),128))])]),e.createElementVNode("tbody",tt,[m.value?(e.openBlock(),e.createElementBlock("tr",nt,[e.createElementVNode("td",{class:"text-center py-6 px-2 text-red-400 bg-red-50/80",colspan:e.unref(y).length},[ot,e.createTextVNode(" Failed to load ")],8,rt)])):e.unref(g).length<=0?(e.openBlock(),e.createElementBlock("tr",st,[e.createElementVNode("td",{class:"text-center py-6 px-2 text-gray-500",colspan:e.unref(y).length}," No data ",8,at)])):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:2},e.renderList(e.unref(g),(function(t,r){return e.openBlock(),e.createElementBlock(e.Fragment,{key:r},[n.is_ssp_mode||r+1>=e.unref(h).start&&r<e.unref(h).end?(e.openBlock(),e.createElementBlock("tr",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(y),(function(n,r){return e.openBlock(),e.createElementBlock("td",{class:e.normalizeClass(["whitespace-nowrap px-3 py-4 text-sm text-gray-500",n.class]),key:r},e.toDisplayString(t[n.db]),3)})),128))])):e.createCommentVNode("",!0)],64)})),128)),p.value?(e.openBlock(),e.createElementBlock("div",lt,ct)):e.createCommentVNode("",!0)])])]),e.createElementVNode("div",ut,[e.createElementVNode("div",dt,[e.createElementVNode("p",ft,[e.createTextVNode(" Showing "),e.createElementVNode("span",pt,e.toDisplayString(e.unref(h).start),1),e.createTextVNode(" to "),e.createElementVNode("span",mt,e.toDisplayString(e.unref(h).end),1),e.createTextVNode(" of "),e.createElementVNode("span",ht,e.toDisplayString(c.value),1),e.createTextVNode(" results "),f.value.length>0?(e.openBlock(),e.createElementBlock("span",yt,[e.createTextVNode("(filtered from "),e.createElementVNode("span",gt,e.toDisplayString(l.value),1),e.createTextVNode(" items)")])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",null,[e.createElementVNode("nav",bt,[e.createElementVNode("a",{onClick:r[3]||(r[3]=function(e){return w(-1)}),href:"javascript:void(0);",class:e.normalizeClass(["relative inline-flex items-center rounded-l-md border border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20",{"opacity-40 cursor-default":i.value<=1||p.value}])},vt,2),e.createElementVNode("span",null,[e.withDirectives(e.createElementVNode("select",{"onUpdate:modelValue":r[4]||(r[4]=function(e){return i.value=e}),onChange:r[5]||(r[5]=function(e){return E()}),class:"relative inline-flex items-center border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20 appearance-none bg-none cursor-pointer text-center",disabled:e.unref(g).length<=0||p.value},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(v),(function(t){return e.openBlock(),e.createElementBlock("option",{key:t,value:t},e.toDisplayString(t),9,Et)})),128))],40,wt),[[e.vModelSelect,i.value]])]),e.createElementVNode("a",{onClick:r[6]||(r[6]=function(e){return w(1)}),href:"javascript:void(0);",class:e.normalizeClass(["relative inline-flex items-center rounded-r-md border border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20",{"opacity-40 cursor-default":i.value>=e.unref(v)||p.value}])},xt,2)])])])])}}},Ot=function(){var e=St;return e.install=function(t){t.component("DataTable",e)},e}(),Nt=Object.freeze({__proto__:null,default:Ot});return Object.entries(Nt).forEach((function(e){var t=n(e,2),r=t[0],o=t[1];"default"!==r&&(Ot[r]=o)})),Ot}(Vue);
{
"name": "vue-tailwind-datatable",
"version": "1.0.1",
"version": "1.0.2",
"description": "DataTable component for Vue3 using TailwindCSS",

@@ -5,0 +5,0 @@ "main": "dist/data-table.ssr.js",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet