@sfgrp/distinguish 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/distinguish.es.js +1036 -1048
- package/dist/distinguish.umd.js +6 -6
- package/package.json +16 -16
- /package/dist/{style.css → distinguish.css} +0 -0
package/dist/distinguish.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(function(D,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","vue","pinia"],n):(D=typeof globalThis<"u"?globalThis:D||self,n(D.Distinguish={},D.Vue,D.Pinia))})(this,function(D,n,Y){"use strict";function xe(e,t){return function(){return e.apply(t,arguments)}}const{toString:St}=Object.prototype,{getPrototypeOf:de}=Object,Z=(e=>t=>{const r=St.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),x=e=>(e=e.toLowerCase(),t=>Z(t)===e),v=e=>t=>typeof t===e,{isArray:j}=Array,z=v("undefined");function Bt(e){return e!==null&&!z(e)&&e.constructor!==null&&!z(e.constructor)&&T(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const De=x("ArrayBuffer");function Ct(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&De(e.buffer),t}const Nt=v("string"),T=v("function"),Oe=v("number"),ee=e=>e!==null&&typeof e=="object",Rt=e=>e===!0||e===!1,te=e=>{if(Z(e)!=="object")return!1;const t=de(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Tt=x("Date"),xt=x("File"),Dt=x("Blob"),Ot=x("FileList"),Vt=e=>ee(e)&&T(e.pipe),It=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||T(e.append)&&((t=Z(e))==="formdata"||t==="object"&&T(e.toString)&&e.toString()==="[object FormData]"))},At=x("URLSearchParams"),[Lt,Ut,$t,Ft]=["ReadableStream","Request","Response","Headers"].map(x),Pt=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function K(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let o,s;if(typeof e!="object"&&(e=[e]),j(e))for(o=0,s=e.length;o<s;o++)t.call(null,e[o],o,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let c;for(o=0;o<a;o++)c=i[o],t.call(null,e[c],c,e)}}function Ve(e,t){t=t.toLowerCase();const r=Object.keys(e);let o=r.length,s;for(;o-- >0;)if(s=r[o],t===s.toLowerCase())return s;return null}const L=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ie=e=>!z(e)&&e!==L;function pe(){const{caseless:e}=Ie(this)&&this||{},t={},r=(o,s)=>{const i=e&&Ve(t,s)||s;te(t[i])&&te(o)?t[i]=pe(t[i],o):te(o)?t[i]=pe({},o):j(o)?t[i]=o.slice():t[i]=o};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&K(arguments[o],r);return t}const Mt=(e,t,r,{allOwnKeys:o}={})=>(K(t,(s,i)=>{r&&T(s)?e[i]=xe(s,r):e[i]=s},{allOwnKeys:o}),e),jt=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),qt=(e,t,r,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Ht=(e,t,r,o)=>{let s,i,a;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],(!o||o(a,e,t))&&!c[a]&&(t[a]=e[a],c[a]=!0);e=r!==!1&&de(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},zt=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const o=e.indexOf(t,r);return o!==-1&&o===r},Kt=e=>{if(!e)return null;if(j(e))return e;let t=e.length;if(!Oe(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Jt=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&de(Uint8Array)),Wt=(e,t)=>{const o=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=o.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Gt=(e,t)=>{let r;const o=[];for(;(r=e.exec(t))!==null;)o.push(r);return o},Xt=x("HTMLFormElement"),Qt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,s){return o.toUpperCase()+s}),Ae=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Yt=x("RegExp"),Le=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),o={};K(r,(s,i)=>{let a;(a=t(s,i,e))!==!1&&(o[i]=a||s)}),Object.defineProperties(e,o)},Zt=e=>{Le(e,(t,r)=>{if(T(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const o=e[r];if(T(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},vt=(e,t)=>{const r={},o=s=>{s.forEach(i=>{r[i]=!0})};return j(e)?o(e):o(String(e).split(t)),r},en=()=>{},tn=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t,ue="abcdefghijklmnopqrstuvwxyz",Ue="0123456789",$e={DIGIT:Ue,ALPHA:ue,ALPHA_DIGIT:ue+ue.toUpperCase()+Ue},nn=(e=16,t=$e.ALPHA_DIGIT)=>{let r="";const{length:o}=t;for(;e--;)r+=t[Math.random()*o|0];return r};function rn(e){return!!(e&&T(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const on=e=>{const t=new Array(10),r=(o,s)=>{if(ee(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[s]=o;const i=j(o)?[]:{};return K(o,(a,c)=>{const u=r(a,s+1);!z(u)&&(i[c]=u)}),t[s]=void 0,i}}return o};return r(e,0)},sn=x("AsyncFunction"),an=e=>e&&(ee(e)||T(e))&&T(e.then)&&T(e.catch),Fe=((e,t)=>e?setImmediate:t?((r,o)=>(L.addEventListener("message",({source:s,data:i})=>{s===L&&i===r&&o.length&&o.shift()()},!1),s=>{o.push(s),L.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",T(L.postMessage)),cn=typeof queueMicrotask<"u"?queueMicrotask.bind(L):typeof process<"u"&&process.nextTick||Fe,l={isArray:j,isArrayBuffer:De,isBuffer:Bt,isFormData:It,isArrayBufferView:Ct,isString:Nt,isNumber:Oe,isBoolean:Rt,isObject:ee,isPlainObject:te,isReadableStream:Lt,isRequest:Ut,isResponse:$t,isHeaders:Ft,isUndefined:z,isDate:Tt,isFile:xt,isBlob:Dt,isRegExp:Yt,isFunction:T,isStream:Vt,isURLSearchParams:At,isTypedArray:Jt,isFileList:Ot,forEach:K,merge:pe,extend:Mt,trim:Pt,stripBOM:jt,inherits:qt,toFlatObject:Ht,kindOf:Z,kindOfTest:x,endsWith:zt,toArray:Kt,forEachEntry:Wt,matchAll:Gt,isHTMLForm:Xt,hasOwnProperty:Ae,hasOwnProp:Ae,reduceDescriptors:Le,freezeMethods:Zt,toObjectSet:vt,toCamelCase:Qt,noop:en,toFiniteNumber:tn,findKey:Ve,global:L,isContextDefined:Ie,ALPHABET:$e,generateString:nn,isSpecCompliantForm:rn,toJSONObject:on,isAsyncFn:sn,isThenable:an,setImmediate:Fe,asap:cn};function g(e,t,r,o,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),o&&(this.request=o),s&&(this.response=s,this.status=s.status?s.status:null)}l.inherits(g,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:l.toJSONObject(this.config),code:this.code,status:this.status}}});const Pe=g.prototype,Me={};["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=>{Me[e]={value:e}}),Object.defineProperties(g,Me),Object.defineProperty(Pe,"isAxiosError",{value:!0}),g.from=(e,t,r,o,s,i)=>{const a=Object.create(Pe);return l.toFlatObject(e,a,function(u){return u!==Error.prototype},c=>c!=="isAxiosError"),g.call(a,e.message,t,r,o,s),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const ln=null;function fe(e){return l.isPlainObject(e)||l.isArray(e)}function je(e){return l.endsWith(e,"[]")?e.slice(0,-2):e}function qe(e,t,r){return e?e.concat(t).map(function(s,i){return s=je(s),!r&&i?"["+s+"]":s}).join(r?".":""):t}function dn(e){return l.isArray(e)&&!e.some(fe)}const pn=l.toFlatObject(l,{},null,function(t){return/^is[A-Z]/.test(t)});function ne(e,t,r){if(!l.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=l.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!l.isUndefined(h[y])});const o=r.metaTokens,s=r.visitor||p,i=r.dots,a=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&l.isSpecCompliantForm(t);if(!l.isFunction(s))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(l.isDate(m))return m.toISOString();if(!u&&l.isBlob(m))throw new g("Blob is not supported. Use a Buffer instead.");return l.isArrayBuffer(m)||l.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function p(m,y,h){let _=m;if(m&&!h&&typeof m=="object"){if(l.endsWith(y,"{}"))y=o?y:y.slice(0,-2),m=JSON.stringify(m);else if(l.isArray(m)&&dn(m)||(l.isFileList(m)||l.endsWith(y,"[]"))&&(_=l.toArray(m)))return y=je(y),_.forEach(function(S,V){!(l.isUndefined(S)||S===null)&&t.append(a===!0?qe([y],V,i):a===null?y:y+"[]",d(S))}),!1}return fe(m)?!0:(t.append(qe(h,y,i),d(m)),!1)}const f=[],b=Object.assign(pn,{defaultVisitor:p,convertValue:d,isVisitable:fe});function w(m,y){if(!l.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(m),l.forEach(m,function(_,E){(!(l.isUndefined(_)||_===null)&&s.call(t,_,l.isString(E)?E.trim():E,y,b))===!0&&w(_,y?y.concat(E):[E])}),f.pop()}}if(!l.isObject(e))throw new TypeError("data must be an object");return w(e),t}function He(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function me(e,t){this._pairs=[],e&&ne(e,this,t)}const ze=me.prototype;ze.append=function(t,r){this._pairs.push([t,r])},ze.toString=function(t){const r=t?function(o){return t.call(this,o,He)}:He;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function un(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Ke(e,t,r){if(!t)return e;const o=r&&r.encode||un,s=r&&r.serialize;let i;if(s?i=s(t,r):i=l.isURLSearchParams(t)?t.toString():new me(t,r).toString(o),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class Je{constructor(){this.handlers=[]}use(t,r,o){return this.handlers.push({fulfilled:t,rejected:r,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){l.forEach(this.handlers,function(o){o!==null&&t(o)})}}const We={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},fn={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:me,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},he=typeof window<"u"&&typeof document<"u",ge=typeof navigator=="object"&&navigator||void 0,mn=he&&(!ge||["ReactNative","NativeScript","NS"].indexOf(ge.product)<0),hn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",gn=he&&window.location.href||"http://localhost",C={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:he,hasStandardBrowserEnv:mn,hasStandardBrowserWebWorkerEnv:hn,navigator:ge,origin:gn},Symbol.toStringTag,{value:"Module"})),...fn};function yn(e,t){return ne(e,new C.classes.URLSearchParams,Object.assign({visitor:function(r,o,s,i){return C.isNode&&l.isBuffer(r)?(this.append(o,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function bn(e){return l.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function _n(e){const t={},r=Object.keys(e);let o;const s=r.length;let i;for(o=0;o<s;o++)i=r[o],t[i]=e[i];return t}function Ge(e){function t(r,o,s,i){let a=r[i++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),u=i>=r.length;return a=!a&&l.isArray(s)?s.length:a,u?(l.hasOwnProp(s,a)?s[a]=[s[a],o]:s[a]=o,!c):((!s[a]||!l.isObject(s[a]))&&(s[a]=[]),t(r,o,s[a],i)&&l.isArray(s[a])&&(s[a]=_n(s[a])),!c)}if(l.isFormData(e)&&l.isFunction(e.entries)){const r={};return l.forEachEntry(e,(o,s)=>{t(bn(o),s,r,0)}),r}return null}function kn(e,t,r){if(l.isString(e))try{return(t||JSON.parse)(e),l.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(0,JSON.stringify)(e)}const J={transitional:We,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const o=r.getContentType()||"",s=o.indexOf("application/json")>-1,i=l.isObject(t);if(i&&l.isHTMLForm(t)&&(t=new FormData(t)),l.isFormData(t))return s?JSON.stringify(Ge(t)):t;if(l.isArrayBuffer(t)||l.isBuffer(t)||l.isStream(t)||l.isFile(t)||l.isBlob(t)||l.isReadableStream(t))return t;if(l.isArrayBufferView(t))return t.buffer;if(l.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(i){if(o.indexOf("application/x-www-form-urlencoded")>-1)return yn(t,this.formSerializer).toString();if((c=l.isFileList(t))||o.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return ne(c?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||s?(r.setContentType("application/json",!1),kn(t)):t}],transformResponse:[function(t){const r=this.transitional||J.transitional,o=r&&r.forcedJSONParsing,s=this.responseType==="json";if(l.isResponse(t)||l.isReadableStream(t))return t;if(t&&l.isString(t)&&(o&&!this.responseType||s)){const a=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(c){if(a)throw c.name==="SyntaxError"?g.from(c,g.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:C.classes.FormData,Blob:C.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};l.forEach(["delete","get","head","post","put","patch"],e=>{J.headers[e]={}});const wn=l.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"]),En=e=>{const t={};let r,o,s;return e&&e.split(`
|
|
2
|
-
`).forEach(function(a){s=a.indexOf(":"),r=a.substring(0,s).trim().toLowerCase(),o=a.substring(s+1).trim(),!(!r||t[r]&&
|
|
3
|
-
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const o=new this(t);return r.forEach(s=>o.set(s)),o}static accessor(t){const o=(this[Xe]=this[Xe]={accessors:{}}).accessors,s=this.prototype;function i(a){const c=W(a);o[c]||(Nn(s,a),o[c]=!0)}return l.isArray(t)?t.forEach(i):i(t),this}}N.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),l.reduceDescriptors(N.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[r]=o}}}),l.freezeMethods(N);function be(e,t){const r=this||J,o=t||r,s=N.from(o.headers);let i=o.data;return l.forEach(e,function(c){i=c.call(r,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function Qe(e){return!!(e&&e.__CANCEL__)}function q(e,t,r){g.call(this,e??"canceled",g.ERR_CANCELED,t,r),this.name="CanceledError"}l.inherits(q,g,{__CANCEL__:!0});function Ye(e,t,r){const o=r.config.validateStatus;!r.status||!o||o(r.status)?e(r):t(new g("Request failed with status code "+r.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Rn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Tn(e,t){e=e||10;const r=new Array(e),o=new Array(e);let s=0,i=0,a;return t=t!==void 0?t:1e3,function(u){const d=Date.now(),p=o[i];a||(a=d),r[s]=u,o[s]=d;let f=i,b=0;for(;f!==s;)b+=r[f++],f=f%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),d-a<t)return;const w=p&&d-p;return w?Math.round(b*1e3/w):void 0}}function xn(e,t){let r=0,o=1e3/t,s,i;const a=(d,p=Date.now())=>{r=p,s=null,i&&(clearTimeout(i),i=null),e.apply(null,d)};return[(...d)=>{const p=Date.now(),f=p-r;f>=o?a(d,p):(s=d,i||(i=setTimeout(()=>{i=null,a(s)},o-f)))},()=>s&&a(s)]}const oe=(e,t,r=3)=>{let o=0;const s=Tn(50,250);return xn(i=>{const a=i.loaded,c=i.lengthComputable?i.total:void 0,u=a-o,d=s(u),p=a<=c;o=a;const f={loaded:a,total:c,progress:c?a/c:void 0,bytes:u,rate:d||void 0,estimated:d&&c&&p?(c-a)/d:void 0,event:i,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(f)},r)},Ze=(e,t)=>{const r=e!=null;return[o=>t[0]({lengthComputable:r,total:e,loaded:o}),t[1]]},ve=e=>(...t)=>l.asap(()=>e(...t)),Dn=C.hasStandardBrowserEnv?function(){const t=C.navigator&&/(msie|trident)/i.test(C.navigator.userAgent),r=document.createElement("a");let o;function s(i){let a=i;return t&&(r.setAttribute("href",a),a=r.href),r.setAttribute("href",a),{href:r.href,protocol:r.protocol?r.protocol.replace(/:$/,""):"",host:r.host,search:r.search?r.search.replace(/^\?/,""):"",hash:r.hash?r.hash.replace(/^#/,""):"",hostname:r.hostname,port:r.port,pathname:r.pathname.charAt(0)==="/"?r.pathname:"/"+r.pathname}}return o=s(window.location.href),function(a){const c=l.isString(a)?s(a):a;return c.protocol===o.protocol&&c.host===o.host}}():function(){return function(){return!0}}(),On=C.hasStandardBrowserEnv?{write(e,t,r,o,s,i){const a=[e+"="+encodeURIComponent(t)];l.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),l.isString(o)&&a.push("path="+o),l.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function Vn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function In(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function et(e,t){return e&&!Vn(t)?In(e,t):t}const tt=e=>e instanceof N?{...e}:e;function U(e,t){t=t||{};const r={};function o(d,p,f){return l.isPlainObject(d)&&l.isPlainObject(p)?l.merge.call({caseless:f},d,p):l.isPlainObject(p)?l.merge({},p):l.isArray(p)?p.slice():p}function s(d,p,f){if(l.isUndefined(p)){if(!l.isUndefined(d))return o(void 0,d,f)}else return o(d,p,f)}function i(d,p){if(!l.isUndefined(p))return o(void 0,p)}function a(d,p){if(l.isUndefined(p)){if(!l.isUndefined(d))return o(void 0,d)}else return o(void 0,p)}function c(d,p,f){if(f in t)return o(d,p);if(f in e)return o(void 0,d)}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken: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:c,headers:(d,p)=>s(tt(d),tt(p),!0)};return l.forEach(Object.keys(Object.assign({},e,t)),function(p){const f=u[p]||s,b=f(e[p],t[p],p);l.isUndefined(b)&&f!==c||(r[p]=b)}),r}const nt=e=>{const t=U({},e);let{data:r,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:c}=t;t.headers=a=N.from(a),t.url=Ke(et(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let u;if(l.isFormData(r)){if(C.hasStandardBrowserEnv||C.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[d,...p]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([d||"multipart/form-data",...p].join("; "))}}if(C.hasStandardBrowserEnv&&(o&&l.isFunction(o)&&(o=o(t)),o||o!==!1&&Dn(t.url))){const d=s&&i&&On.read(i);d&&a.set(s,d)}return t},An=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,o){const s=nt(e);let i=s.data;const a=N.from(s.headers).normalize();let{responseType:c,onUploadProgress:u,onDownloadProgress:d}=s,p,f,b,w,m;function y(){w&&w(),m&&m(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let h=new XMLHttpRequest;h.open(s.method.toUpperCase(),s.url,!0),h.timeout=s.timeout;function _(){if(!h)return;const S=N.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),R={data:!c||c==="text"||c==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:S,config:e,request:h};Ye(function(M){r(M),y()},function(M){o(M),y()},R),h=null}"onloadend"in h?h.onloadend=_:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(_)},h.onabort=function(){h&&(o(new g("Request aborted",g.ECONNABORTED,e,h)),h=null)},h.onerror=function(){o(new g("Network Error",g.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let V=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const R=s.transitional||We;s.timeoutErrorMessage&&(V=s.timeoutErrorMessage),o(new g(V,R.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,e,h)),h=null},i===void 0&&a.setContentType(null),"setRequestHeader"in h&&l.forEach(a.toJSON(),function(V,R){h.setRequestHeader(R,V)}),l.isUndefined(s.withCredentials)||(h.withCredentials=!!s.withCredentials),c&&c!=="json"&&(h.responseType=s.responseType),d&&([b,m]=oe(d,!0),h.addEventListener("progress",b)),u&&h.upload&&([f,w]=oe(u),h.upload.addEventListener("progress",f),h.upload.addEventListener("loadend",w)),(s.cancelToken||s.signal)&&(p=S=>{h&&(o(!S||S.type?new q(null,e,h):S),h.abort(),h=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const E=Rn(s.url);if(E&&C.protocols.indexOf(E)===-1){o(new g("Unsupported protocol "+E+":",g.ERR_BAD_REQUEST,e));return}h.send(i||null)})},Ln=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let o=new AbortController,s;const i=function(d){if(!s){s=!0,c();const p=d instanceof Error?d:this.reason;o.abort(p instanceof g?p:new q(p instanceof Error?p.message:p))}};let a=t&&setTimeout(()=>{a=null,i(new g(`timeout ${t} of ms exceeded`,g.ETIMEDOUT))},t);const c=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),e=null)};e.forEach(d=>d.addEventListener("abort",i));const{signal:u}=o;return u.unsubscribe=()=>l.asap(c),u}},Un=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let o=0,s;for(;o<r;)s=o+t,yield e.slice(o,s),o=s},$n=async function*(e,t){for await(const r of Fn(e))yield*Un(r,t)},Fn=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:o}=await t.read();if(r)break;yield o}}finally{await t.cancel()}},rt=(e,t,r,o)=>{const s=$n(e,t);let i=0,a,c=u=>{a||(a=!0,o&&o(u))};return new ReadableStream({async pull(u){try{const{done:d,value:p}=await s.next();if(d){c(),u.close();return}let f=p.byteLength;if(r){let b=i+=f;r(b)}u.enqueue(new Uint8Array(p))}catch(d){throw c(d),d}},cancel(u){return c(u),s.return()}},{highWaterMark:2})},se=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",ot=se&&typeof ReadableStream=="function",Pn=se&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),st=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Mn=ot&&st(()=>{let e=!1;const t=new Request(C.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),it=64*1024,_e=ot&&st(()=>l.isReadableStream(new Response("").body)),ie={stream:_e&&(e=>e.body)};se&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ie[t]&&(ie[t]=l.isFunction(e[t])?r=>r[t]():(r,o)=>{throw new g(`Response type '${t}' is not supported`,g.ERR_NOT_SUPPORT,o)})})})(new Response);const jn=async e=>{if(e==null)return 0;if(l.isBlob(e))return e.size;if(l.isSpecCompliantForm(e))return(await new Request(C.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(l.isArrayBufferView(e)||l.isArrayBuffer(e))return e.byteLength;if(l.isURLSearchParams(e)&&(e=e+""),l.isString(e))return(await Pn(e)).byteLength},qn=async(e,t)=>{const r=l.toFiniteNumber(e.getContentLength());return r??jn(t)},ke={http:ln,xhr:An,fetch:se&&(async e=>{let{url:t,method:r,data:o,signal:s,cancelToken:i,timeout:a,onDownloadProgress:c,onUploadProgress:u,responseType:d,headers:p,withCredentials:f="same-origin",fetchOptions:b}=nt(e);d=d?(d+"").toLowerCase():"text";let w=Ln([s,i&&i.toAbortSignal()],a),m;const y=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let h;try{if(u&&Mn&&r!=="get"&&r!=="head"&&(h=await qn(p,o))!==0){let R=new Request(t,{method:"POST",body:o,duplex:"half"}),A;if(l.isFormData(o)&&(A=R.headers.get("content-type"))&&p.setContentType(A),R.body){const[M,le]=Ze(h,oe(ve(u)));o=rt(R.body,it,M,le)}}l.isString(f)||(f=f?"include":"omit");const _="credentials"in Request.prototype;m=new Request(t,{...b,signal:w,method:r.toUpperCase(),headers:p.normalize().toJSON(),body:o,duplex:"half",credentials:_?f:void 0});let E=await fetch(m);const S=_e&&(d==="stream"||d==="response");if(_e&&(c||S&&y)){const R={};["status","statusText","headers"].forEach(Et=>{R[Et]=E[Et]});const A=l.toFiniteNumber(E.headers.get("content-length")),[M,le]=c&&Ze(A,oe(ve(c),!0))||[];E=new Response(rt(E.body,it,M,()=>{le&&le(),y&&y()}),R)}d=d||"text";let V=await ie[l.findKey(ie,d)||"text"](E,e);return!S&&y&&y(),await new Promise((R,A)=>{Ye(R,A,{data:V,headers:N.from(E.headers),status:E.status,statusText:E.statusText,config:e,request:m})})}catch(_){throw y&&y(),_&&_.name==="TypeError"&&/fetch/i.test(_.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,e,m),{cause:_.cause||_}):g.from(_,_&&_.code,e,m)}})};l.forEach(ke,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const at=e=>`- ${e}`,Hn=e=>l.isFunction(e)||e===null||e===!1,ct={getAdapter:e=>{e=l.isArray(e)?e:[e];const{length:t}=e;let r,o;const s={};for(let i=0;i<t;i++){r=e[i];let a;if(o=r,!Hn(r)&&(o=ke[(a=String(r)).toLowerCase()],o===void 0))throw new g(`Unknown adapter '${a}'`);if(o)break;s[a||"#"+i]=o}if(!o){const i=Object.entries(s).map(([c,u])=>`adapter ${c} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since :
|
|
4
|
-
`+i.map(
|
|
5
|
-
`):" "+
|
|
6
|
-
`+i):o.stack=i}catch{}}throw o}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=U(this.defaults,r);const{transitional:o,paramsSerializer:s,headers:i}=r;o!==void 0&&Se.assertOptions(o,{silentJSONParsing:I.transitional(I.boolean),forcedJSONParsing:I.transitional(I.boolean),clarifyTimeoutError:I.transitional(I.boolean)},!1),s!=null&&(l.isFunction(s)?r.paramsSerializer={serialize:s}:Se.assertOptions(s,{encode:I.function,serialize:I.function},!0)),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&l.merge(i.common,i[r.method]);i&&l.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),r.headers=N.concat(a,i);const c=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(u=u&&y.synchronous,c.unshift(y.fulfilled,y.rejected))});const d=[];this.interceptors.response.forEach(function(y){d.push(y.fulfilled,y.rejected)});let p,f=0,b;if(!u){const m=[lt.bind(this),void 0];for(m.unshift.apply(m,c),m.push.apply(m,d),b=m.length,p=Promise.resolve(r);f<b;)p=p.then(m[f++],m[f++]);return p}b=c.length;let w=r;for(f=0;f<b;){const m=c[f++],y=c[f++];try{w=m(w)}catch(h){y.call(this,h);break}}try{p=lt.call(this,w)}catch(m){return Promise.reject(m)}for(f=0,b=d.length;f<b;)p=p.then(d[f++],d[f++]);return p}getUri(t){t=U(this.defaults,t);const r=et(t.baseURL,t.url);return Ke(r,t.params,t.paramsSerializer)}}l.forEach(["delete","get","head","options"],function(t){$.prototype[t]=function(r,o){return this.request(U(o||{},{method:t,url:r,data:(o||{}).data}))}}),l.forEach(["post","put","patch"],function(t){function r(o){return function(i,a,c){return this.request(U(c||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}$.prototype[t]=r(),$.prototype[t+"Form"]=r(!0)});class Be{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const o=this;this.promise.then(s=>{if(!o._listeners)return;let i=o._listeners.length;for(;i-- >0;)o._listeners[i](s);o._listeners=null}),this.promise.then=s=>{let i;const a=new Promise(c=>{o.subscribe(c),i=c}).then(s);return a.cancel=function(){o.unsubscribe(i)},a},t(function(i,a,c){o.reason||(o.reason=new q(i,a,c),r(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=o=>{t.abort(o)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Be(function(s){t=s}),cancel:t}}}function Kn(e){return function(r){return e.apply(null,r)}}function Jn(e){return l.isObject(e)&&e.isAxiosError===!0}const Ce={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(Ce).forEach(([e,t])=>{Ce[t]=e});function ut(e){const t=new $(e),r=xe($.prototype.request,t);return l.extend(r,$.prototype,t,{allOwnKeys:!0}),l.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return ut(U(e,s))},r}const k=ut(J);k.Axios=$,k.CanceledError=q,k.CancelToken=Be,k.isCancel=Qe,k.VERSION=dt,k.toFormData=ne,k.AxiosError=g,k.Cancel=k.CanceledError,k.all=function(t){return Promise.all(t)},k.spread=Kn,k.isAxiosError=Jn,k.mergeConfig=U,k.AxiosHeaders=N,k.formToJSON=e=>Ge(l.isHTMLForm(e)?new FormData(e):e),k.getAdapter=ct.getAdapter,k.HttpStatusCode=Ce,k.default=k;const ft=(e={})=>{const t=F(),{baseURL:r,projectId:o,projectToken:s,userToken:i,csrfToken:a}=t.getAPIConfig,c={baseURL:r,params:{project_id:o,project_token:s,token:i},...e};return(!s||!(o&&i)&&a)&&Object.assign(c,{headers:{"X-CSRF-Token":a}}),k.create({...c})};class Wn{static key(t,r){return ft().get(`/observation_matrices/${t}/key`,r)}}const G={Used:"used",Useful:"useful",Useless:"useless"},Gn=e=>({characterStateId:e.id,depictionIds:e.depiction_ids,label:e.label,position:e.position,...mt(e)}),Xn=e=>({depictionId:e.id,caption:e.caption,figureLabel:e.figure_label,imageUrl:e.image.medium}),X={Qualitative:"Descriptor::Qualitative",Continuous:"Descriptor::Continuous",Sample:"Descriptor::Sample",PresenceAbsence:"Descriptor::PresenceAbsence"},Q=e=>({descriptorId:e.id,name:e.name,description:e.description,position:e.position,status:e.status,type:e.type,depictionIds:e.depiction_ids,usefulness:e.usefulness,weight:e.weight}),Qn=e=>({...Q(e),defaultUnit:e.default_unit,max:e.max,min:e.min}),Yn=e=>({...Q(e),defaultUnit:e.default_unit,max:e.max,min:e.min}),Zn=e=>({...Q(e),states:e.states.map(t=>mt(t))}),vn=e=>({...Q(e),characterStates:e.states.map(t=>Gn(t))}),er=e=>{switch(e.type){case X.Continuous:return Qn(e);case X.Sample:return Yn(e);case X.PresenceAbsence:return Zn(e);case X.Qualitative:return vn(e);default:return Q(e)}},tr=e=>({observationMatrixId:e.observation_matrix_id,name:e.observation_matrix.name,globalId:e.observation_matrix.global_id}),mt=e=>({name:e.name,numberOfObjects:e.number_of_objects,status:e.status}),ht=e=>({errorDescriptors:e.error_descriptors,errors:e.errors,objectLabel:e.object.object_label,objectTag:e.object.object_tag,observationObjectId:e.object.observation_object_id,observationObjectType:e.object.observation_object_type,rowId:e.object.id}),nr=e=>({keywordId:e.id,definition:e.description,name:e.name}),rr=e=>({languageId:e.id,name:e.english_name}),O=Y.defineStore("observationMatrix",{state:()=>({observationMatrix:void 0,citation:void 0,descriptors:[],eliminated:[],remaining:[],availableKeywords:[],availableLanguages:[]}),getters:{getCitation:e=>e.citation,getObservationMatrix:e=>e.observationMatrix,getDescriptors:e=>e.descriptors,getDescriptorById:e=>t=>e.descriptors.find(r=>r.descriptorId===t),getDescriptorsUsed:e=>e.descriptors.filter(t=>t.status===G.Used),getDescriptorsUseless:e=>e.descriptors.filter(t=>t.status===G.Useless),getDescriptorsUseful:e=>e.descriptors.filter(t=>t.status===G.Useful),getEliminated:e=>e.eliminated,getKeywords:e=>e.availableKeywords,getLanguages:e=>e.availableLanguages,getRemaining:e=>e.remaining},actions:{setDescriptors(e){this.descriptors=e},setEliminated(e){this.eliminated=e},setRemaining(e){this.remaining=e},setLanguages(e){this.availableLanguages=e},setKeywords(e){this.availableKeywords=e},setObservationMatrix(e){this.observationMatrix=e},async requestInteractiveKey({observationMatrixId:e,params:t={},opt:r={}}){const o=await Wn.key(e,{params:t}),{data:s}=o;return r.refreshOnlyTaxa||(this.setObservationMatrix(tr(s)),this.setDescriptors(s.list_of_descriptors.map(i=>er(i))),this.setKeywords(s.descriptor_available_keywords.map(i=>nr(i))),this.setLanguages(s.descriptor_available_languages.map(i=>rr(i)))),this.setEliminated(s.eliminated.map(i=>ht(i))),this.setRemaining(s.remaining.map(i=>ht(i))),o}}}),B=Y.defineStore("filter",{state:()=>({descriptors:{},eliminateUnknown:void 0,rowFilter:!0,errorTolerance:void 0,identifiedToRank:void 0,keywordIds:[],languageId:void 0,rowIds:[],sorting:void 0}),getters:{getKeywordIds:e=>e.keywordIds,getLanguageId:e=>e.languageId,getRowIds:e=>e.rowIds,getRowFilter:e=>e.rowFilter,getDescriptors:e=>e.descriptors,getIdentifiedToRank:e=>e.identifiedToRank,getEliminateUknown:e=>e.eliminateUnknown,getErrorTolerance:e=>e.errorTolerance,getSorting:e=>e.sorting,getDescriptorValueById:e=>t=>{const r=e.descriptors[t];return typeof r=="boolean"?r:r||""},getFilterParams:e=>({selected_descriptors:Object.entries(e.descriptors).map(([r,o])=>Array.isArray(o)?`${r}:${o.join("|")}`:`${r}:${o}`).join("||"),language_id:e.languageId,keyword_ids:e.keywordIds,sorting:e.sorting,identified_to_rank:e.identifiedToRank,error_tolerance:e.errorTolerance,eliminate_unknown:e.eliminateUnknown,row_filter:e.rowFilter?e.rowIds.join("|"):[]})},actions:{setDescriptor({descriptorId:e,value:t}){this.descriptors[e]=t},removeDescriptor(e){delete this.descriptors[e]},removeKeywordId(e){const t=this.keywordIds.findIndex(r=>r===e);t>-1&&this.keywordIds.splice(t,1)},addKeywordId(e){this.keywordIds.push(e)},setLanguageId(e){this.languageId=e},setErrorTolerance(e){this.errorTolerance=e},setEliminateUnknown(e){this.eliminateUnknown=e}}}),F=Y.defineStore("settings",{state:()=>({gridLayout:"distinguish-layout-mode-1",isLoading:!1,isRefreshing:!1,refreshOnlyTaxa:!1,shouldUpdate:!0,observationMatrixId:void 0,errorMessage:"",apiConfig:{baseURL:"",projectId:void 0,projectToken:void 0,userToken:void 0}}),getters:{getErrorMessage:e=>e.errorMessage,getIsLoading:e=>e.isLoading,getLayout:e=>e.gridLayout,getRefreshOnlyTaxa:e=>e.refreshOnlyTaxa,getShouldUpdate:e=>e.shouldUpdate,getObservationMatrixId:e=>e.observationMatrixId,getAPIConfig:e=>e.apiConfig},actions:{setObservationMatrixId(e){this.observationMatrixId=e},setShouldUpdate(e){this.shouldUpdate=e},setRefreshOnlyTaxa(e){this.refreshOnlyTaxa=e},setAPIConfig(e){this.apiConfig=e},checkUpdate(){const e=B(),t=O(),r=this.observationMatrixId;this.shouldUpdate&&r&&(this.isLoading=!0,t.requestInteractiveKey({observationMatrixId:r,params:e.getFilterParams,opt:{refreshOnlyTaxa:this.refreshOnlyTaxa}}).then(o=>this.errorMessage="").catch(o=>this.errorMessage=o.message).finally(()=>this.isLoading=!1))}}}),or=n.defineComponent({__name:"FilterEliminateUnknowns",setup(e){const t=B(),r=n.computed({get:()=>!!t.getEliminateUknown,set:o=>{t.setEliminateUnknown(o)}});return(o,s)=>(n.openBlock(),n.createElementBlock("label",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),type:"checkbox"},null,512),[[n.vModelCheckbox,r.value]]),s[1]||(s[1]=n.createTextVNode(" Eliminate unknowns "))]))}}),sr=["value"],ir=n.defineComponent({__name:"FilterErrorTolerance",setup(e){const t=[0,1,2],r=B(),o=n.computed({get:()=>r.getErrorTolerance,set:s=>{r.setErrorTolerance(s)}});return(s,i)=>(n.openBlock(),n.createElementBlock("div",null,[i[2]||(i[2]=n.createElementVNode("label",{for:"languages",class:"distinguish-input-label"}," Error tolerance ",-1)),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=a=>o.value=a),name:"languages",role:"listbox"},[i[1]||(i[1]=n.createElementVNode("option",{value:""},null,-1)),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(t,a=>n.createElementVNode("option",{key:a,value:a},n.toDisplayString(a),9,sr)),64))],512),[[n.vModelSelect,o.value]])]))}}),ar=["otu","subspecies","species","subgenus","genus","subtribe","tribe","subfamily","family"],cr=n.defineComponent({__name:"FilterRank",setup(e){const t=B(),r=n.computed({get(){return t.getIdentifiedToRank},set(o){t.$patch({identifiedToRank:o})}});return(o,s)=>(n.openBlock(),n.createElementBlock("div",null,[s[2]||(s[2]=n.createElementVNode("label",{class:"distinguish-input-label"},"Identified to rank",-1)),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i)},[s[1]||(s[1]=n.createElementVNode("option",{value:void 0},null,-1)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(ar),i=>(n.openBlock(),n.createElementBlock("option",{key:i},n.toDisplayString(i),1))),128))],512),[[n.vModelSelect,r.value]])]))}}),lr=n.defineComponent({__name:"FilterSort",setup(e){const t=["ordered","weighted","optimized"],r=B(),o=n.computed({get(){return r.getSorting},set(s){r.$patch({sorting:s})}});return(s,i)=>(n.openBlock(),n.createElementBlock("div",null,[i[2]||(i[2]=n.createElementVNode("label",{class:"distinguish-input-label"},"Descriptor sorting",-1)),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=a=>o.value=a)},[i[1]||(i[1]=n.createElementVNode("option",{value:void 0},null,-1)),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(t,a=>n.createElementVNode("option",{key:a},n.toDisplayString(a),1)),64))],512),[[n.vModelSelect,o.value]])]))}}),dr=["value"],pr=n.defineComponent({__name:"FilterLanguage",setup(e){const t=B(),r=O(),o=n.computed({get:()=>t.getLanguageId,set:s=>{t.setLanguageId(Number(s))}});return(s,i)=>(n.openBlock(),n.createElementBlock("div",null,[i[1]||(i[1]=n.createElementVNode("label",{for:"languages",class:"distinguish-input-label"}," Languages ",-1)),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=a=>o.value=a),name:"languages",role:"listbox"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(r).getLanguages,({languageId:a,name:c})=>(n.openBlock(),n.createElementBlock("option",{key:a,value:a},n.toDisplayString(c),9,dr))),128))],512),[[n.vModelSelect,o.value]])]))}}),ur=["disabled"],H=n.defineComponent({__name:"VBtn",props:{color:{default:"primary"},size:{default:"medium"},disabled:{type:Boolean}},setup(e){const t=e,r=n.computed(()=>[`distinguish-btn-${t.color}-color`,`distinguish-btn-${t.size}-size`]);return(o,s)=>(n.openBlock(),n.createElementBlock("button",{type:"button",class:n.normalizeClass(["distinguish-btn",r.value]),disabled:o.disabled},[n.renderSlot(o.$slots,"default")],10,ur))}}),fr={class:"distinguish-modal-wrapper"},mr={class:"distinguish-modal-header"},hr={class:"distinguish-modal-body"},gr={class:"distinguish-modal-footer"},Ne=n.defineComponent({__name:"VModal",props:{containerClass:{},containerStyle:{}},emits:["close"],setup(e,{emit:t}){const r=t,o=s=>{s.preventDefault(),s.key==="Escape"&&r("close")};return n.onMounted(()=>document.addEventListener("keydown",o)),n.onUnmounted(()=>document.removeEventListener("keydown",o)),(s,i)=>(n.openBlock(),n.createBlock(n.Transition,{name:"distinguish-modal"},{default:n.withCtx(()=>[n.createElementVNode("div",{class:"distinguish-modal-mask",onClick:i[2]||(i[2]=a=>r("close")),onKey:i[3]||(i[3]=a=>r("close"))},[n.createElementVNode("div",fr,[n.createElementVNode("div",{class:n.normalizeClass(["distinguish-modal-container",s.containerClass]),style:n.normalizeStyle({...s.containerStyle}),onClick:i[1]||(i[1]=n.withModifiers(()=>{},["stop"]))},[n.createElementVNode("div",mr,[n.createElementVNode("div",{class:"distinguish-modal-close",onClick:i[0]||(i[0]=a=>r("close"))}),n.renderSlot(s.$slots,"header")]),n.createElementVNode("div",hr,[n.renderSlot(s.$slots,"body")]),n.createElementVNode("div",gr,[n.renderSlot(s.$slots,"footer")])],6)])],32)]),_:3}))}}),yr={class:"distinguish-list-checkboxes"},br=["value"],_r=n.defineComponent({__name:"FilterKeywords",setup(e){const t=O(),r=B(),o=n.ref(!1),s=n.computed({get:()=>r.getKeywordIds,set:i=>{r.$patch({keywordIds:i})}});return(i,a)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(H,{color:"primary",size:"medium",disabled:!n.unref(t).getKeywords.length,title:n.unref(t).getKeywords.length?"":"No tags defined.",onClick:a[0]||(a[0]=c=>o.value=!0)},{default:n.withCtx(()=>a[3]||(a[3]=[n.createTextVNode(" Keyword ")])),_:1},8,["disabled","title"]),o.value?(n.openBlock(),n.createBlock(Ne,{key:0,onClose:a[2]||(a[2]=c=>o.value=!1)},{header:n.withCtx(()=>a[4]||(a[4]=[n.createElementVNode("h3",null,"Keywords",-1)])),body:n.withCtx(()=>[n.createElementVNode("ul",yr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(t).getKeywords,({keywordId:c,name:u})=>(n.openBlock(),n.createElementBlock("li",{key:c},[n.createElementVNode("label",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":a[1]||(a[1]=d=>s.value=d),value:c,type:"checkbox"},null,8,br),[[n.vModelCheckbox,s.value]]),n.createTextVNode(" "+n.toDisplayString(u),1)])]))),128))])]),_:1})):n.createCommentVNode("",!0)],64))}}),kr=n.defineComponent({__name:"SettingRefresh",setup(e){const t=F(),r=n.computed({get:()=>t.getRefreshOnlyTaxa,set:o=>{t.setRefreshOnlyTaxa(o)}});return(o,s)=>(n.openBlock(),n.createElementBlock("label",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),type:"checkbox"},null,512),[[n.vModelCheckbox,r.value]]),s[1]||(s[1]=n.createTextVNode(" Refresh only taxa "))]))}}),ae=(e,t)=>{const r=e.__vccOpts||e;for(const[o,s]of t)r[o]=s;return r},wr={},Er={class:"distinguish-menu-list"};function Sr(e,t){return n.openBlock(),n.createElementBlock("ul",Er,[n.renderSlot(e.$slots,"default")])}const Br=ae(wr,[["render",Sr]]),Cr={},Nr={class:"distinguish-list-item"};function Rr(e,t){return n.openBlock(),n.createElementBlock("li",Nr,[n.renderSlot(e.$slots,"default")])}const P=ae(Cr,[["render",Rr]]),gt={"distinguish-layout-mode-1":"distinguish-layout-mode-2","distinguish-layout-mode-2":"distinguish-layout-mode-1"},Tr={},xr={class:"distinguish-grid"};function Dr(e,t){return n.openBlock(),n.createElementBlock("div",xr,[n.renderSlot(e.$slots,"default")])}const yt=ae(Tr,[["render",Dr]]),Or=n.defineComponent({__name:"GridToggle",setup(e){const t=F(),r=n.computed(()=>t.getLayout),o=()=>{t.$patch({gridLayout:gt[r.value]})};return(s,i)=>(n.openBlock(),n.createBlock(H,{class:n.normalizeClass(n.unref(gt)[r.value]),onClick:o},{default:n.withCtx(()=>[n.createVNode(yt,{class:"distinguish-grid-icon"},{default:n.withCtx(()=>i[0]||(i[0]=[n.createElementVNode("div",{class:"distinguish-panel-descriptors"},null,-1),n.createElementVNode("div",{class:"distinguish-panel-remaining"},null,-1),n.createElementVNode("div",{class:"distinguish-panel-eliminated"},null,-1)])),_:1})]),_:1},8,["class"]))}}),Vr=n.defineComponent({__name:"ResetButton",setup(e){const t=B();return(r,o)=>(n.openBlock(),n.createBlock(H,{color:"primary",size:"medium",onClick:o[0]||(o[0]=s=>n.unref(t).$reset())},{default:n.withCtx(()=>o[1]||(o[1]=[n.createTextVNode(" Reset ")])),_:1}))}}),Ir={class:"distinguish-header-error-message"},Ar=n.defineComponent({__name:"ErrorMessage",setup(e){const t=F();return(r,o)=>(n.openBlock(),n.createElementBlock("span",Ir,n.toDisplayString(n.unref(t).getErrorMessage),1))}}),Lr={class:"distinguish-header-bar"},Ur={class:"distinguish-header-bar__buttons"},$r=n.defineComponent({__name:"HeaderBar",setup(e){return(t,r)=>(n.openBlock(),n.createElementBlock("div",Lr,[n.createVNode(Ar),n.createVNode(Br,null,{default:n.withCtx(()=>[n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(kr)]),_:1}),n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(or)]),_:1}),n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(ir)]),_:1}),n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(cr)]),_:1}),n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(pr)]),_:1}),n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(lr)]),_:1}),n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(_r)]),_:1})]),_:1}),n.createElementVNode("div",Ur,[n.createVNode(Vr),n.createVNode(Or)])]))}}),Fr={},Pr={class:"distinguish-panel"};function Mr(e,t){return n.openBlock(),n.createElementBlock("div",Pr,[n.renderSlot(e.$slots,"default")])}const Re=ae(Fr,[["render",Mr]]),jr=["innerHTML"],qr=n.defineComponent({__name:"PanelEliminated",props:{render:{type:Function}},setup(e){const t=O(),r=n.computed(()=>t.getEliminated);return(o,s)=>(n.openBlock(),n.createBlock(Re,{class:"distinguish-panel-eliminated"},{default:n.withCtx(()=>[n.createElementVNode("h2",null,"Eliminated ("+n.toDisplayString(r.value.length)+")",1),n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value,i=>(n.openBlock(),n.createElementBlock("li",{key:i.rowId,class:"distinguish-row-item"},[n.renderSlot(o.$slots,"default",{item:i},()=>[n.createElementVNode("span",{innerHTML:o.render?o.render(i):i.objectTag},null,8,jr)])]))),128))])]),_:3}))}}),Hr={class:"distinguish-row-filter-buttons"},zr={class:"distinguish-list-checkboxes"},Kr=["value"],Jr=n.defineComponent({__name:"FilterRow",setup(e){const t=O(),r=F(),o=B(),s=n.ref(!1),i=n.ref([]),a=n.computed(()=>{const u=o.getRowIds,d=i.value;return u.length!==d.length||!u.every(p=>d.includes(p))}),c=n.computed({get:()=>o.getRowIds,set:u=>{o.$patch({rowIds:u})}});return n.watch(s,u=>{r.setShouldUpdate(!u),!u&&a.value&&(o.rowFilter=!0,r.checkUpdate()),i.value=o.getRowIds}),(u,d)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(H,{color:"primary",size:"medium",onClick:d[0]||(d[0]=p=>s.value=!0)},{default:n.withCtx(()=>d[5]||(d[5]=[n.createTextVNode(" Select ")])),_:1}),s.value?(n.openBlock(),n.createBlock(Ne,{key:0,onClose:d[4]||(d[4]=p=>s.value=!1)},{header:n.withCtx(()=>d[6]||(d[6]=[n.createElementVNode("h3",null,"Filter row",-1)])),body:n.withCtx(()=>[n.createElementVNode("div",null,[n.createElementVNode("div",Hr,[n.unref(t).getRemaining.length!==c.value.length||c.value.length==0?(n.openBlock(),n.createBlock(H,{key:0,color:"primary",size:"medium",onClick:d[1]||(d[1]=()=>c.value=n.unref(t).getRemaining.map(p=>p.rowId))},{default:n.withCtx(()=>d[7]||(d[7]=[n.createTextVNode(" Select all ")])),_:1})):(n.openBlock(),n.createBlock(H,{key:1,color:"primary",size:"medium",onClick:d[2]||(d[2]=()=>c.value=[])},{default:n.withCtx(()=>d[8]||(d[8]=[n.createTextVNode(" Unselect all ")])),_:1}))]),n.createElementVNode("ul",zr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(t).getRemaining,p=>(n.openBlock(),n.createElementBlock("li",{key:p.rowId},[n.createElementVNode("label",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":d[3]||(d[3]=f=>c.value=f),value:p.rowId,type:"checkbox"},null,8,Kr),[[n.vModelCheckbox,c.value]]),n.createTextVNode(" "+n.toDisplayString(p.objectLabel),1)])]))),128))])])]),_:1})):n.createCommentVNode("",!0)],64))}}),Wr={class:"distinguish-title-section"},Gr=["innerHTML"],Xr=n.defineComponent({__name:"PanelRemaining",props:{render:{type:Function}},setup(e){const t=O(),r=n.computed(()=>t.getRemaining);return(o,s)=>(n.openBlock(),n.createBlock(Re,{class:"distinguish-panel-remaining"},{default:n.withCtx(()=>[n.createElementVNode("div",Wr,[n.createElementVNode("h2",null,"Remaining ("+n.toDisplayString(r.value.length)+")",1),n.createVNode(Jr)]),n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value,i=>(n.openBlock(),n.createElementBlock("li",{key:i.rowId,class:"distinguish-row-item"},[n.renderSlot(o.$slots,"default",{item:i},()=>[n.createElementVNode("span",{innerHTML:o.render?o.render(i):i.objectTag},null,8,Gr)])]))),128))])]),_:3}))}});class Qr{static find(t){return ft().get(`/depictions/${t}.json`,{params:{extend:["image"]}})}}const Yr={key:0,class:"distinguish-depiction-box"},Zr=["src"],bt=n.defineComponent({__name:"VDepiction",props:{depictionId:{}},setup(e){const t=e,r=n.ref();return Qr.find(t.depictionId).then(({data:o})=>{r.value=Xn(o)}),(o,s)=>r.value?(n.openBlock(),n.createElementBlock("div",Yr,[n.createElementVNode("img",{src:r.value.imageUrl},null,8,Zr)])):n.createCommentVNode("",!0)}}),vr={class:"distinguish-character-descriptor__cell"},eo=["value"],to=n.defineComponent({__name:"CharacterStateCell",props:{characterState:{},descriptorId:{}},setup(e){const t=e,r=B(),o=n.computed({get:()=>r.getDescriptorValueById(t.descriptorId)||[],set:s=>{s.length?r.setDescriptor({descriptorId:t.descriptorId,value:s}):r.removeDescriptor(t.descriptorId)}});return(s,i)=>(n.openBlock(),n.createElementBlock("div",vr,[n.createElementVNode("label",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.characterState.depictionIds,a=>(n.openBlock(),n.createBlock(bt,{key:a,"depiction-id":a},null,8,["depiction-id"]))),128)),n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=a=>o.value=a),value:s.characterState.characterStateId,type:"checkbox"},null,8,eo),[[n.vModelCheckbox,o.value]]),n.createTextVNode(" "+n.toDisplayString(s.characterState.name),1)])]))}}),no={class:"distinguish-character-states-grid"},ro=n.defineComponent({__name:"CharacterStateGrid",props:{descriptor:{}},setup(e){const t=e,r=B(),o=F(),s=n.ref(),i=n.computed(()=>{const a=r.getDescriptorValueById(t.descriptor.descriptorId)||[],c=s.value||[];return a.length!==c.length||!a.every(u=>c.includes(u))});return n.onMounted(()=>{o.setShouldUpdate(!1),s.value=r.getDescriptorValueById(t.descriptor.descriptorId)}),n.onUnmounted(()=>{o.setShouldUpdate(!0),i.value&&o.checkUpdate()}),(a,c)=>(n.openBlock(),n.createElementBlock("div",no,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.descriptor.characterStates,u=>(n.openBlock(),n.createBlock(to,{key:u.characterStateId,"descriptor-id":a.descriptor.descriptorId,"character-state":u},null,8,["descriptor-id","character-state"]))),128))]))}}),oo={key:0},so={key:1},io={class:"descriptor-modal__depiction"},ao=n.defineComponent({__name:"DescriptorModal",props:{descriptor:{}},setup(e){return(t,r)=>(n.openBlock(),n.createBlock(Ne,{"container-class":"distinguish-descriptor-modal"},{header:n.withCtx(()=>[n.createElementVNode("h3",null,n.toDisplayString(t.descriptor.name),1),t.descriptor.description?(n.openBlock(),n.createElementBlock("span",oo,n.toDisplayString(t.descriptor.description),1)):(n.openBlock(),n.createElementBlock("i",so," No further description available. "))]),body:n.withCtx(()=>[n.createElementVNode("div",io,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t.descriptor.depictionIds,o=>(n.openBlock(),n.createBlock(bt,{key:o,"depiction-id":o},null,8,["depiction-id"]))),128))]),r[0]||(r[0]=n.createElementVNode("hr",null,null,-1)),t.descriptor.type===n.unref(X).Qualitative?(n.openBlock(),n.createBlock(ro,{key:0,descriptor:t.descriptor},null,8,["descriptor"])):n.createCommentVNode("",!0)]),_:1}))}}),co=["id"],lo={class:"distinguish-input-label"},ce=n.defineComponent({__name:"DescriptorContainer",props:{descriptor:{}},setup(e){const t=n.ref(!1);return(r,o)=>(n.openBlock(),n.createElementBlock("div",{id:`descriptor-${r.descriptor.descriptorId}`,class:"distinguish-descriptor-container"},[n.createElementVNode("div",lo,[n.createElementVNode("span",{class:"distinguish-link",onClick:o[0]||(o[0]=s=>t.value=!0)},[n.renderSlot(r.$slots,"title",{},()=>[n.createTextVNode(n.toDisplayString(r.descriptor.name),1)])])]),n.renderSlot(r.$slots,"default"),t.value?(n.openBlock(),n.createBlock(ao,{key:0,descriptor:r.descriptor,onClose:o[1]||(o[1]=s=>t.value=!1)},null,8,["descriptor"])):n.createCommentVNode("",!0)],8,co))}}),po=n.defineComponent({__name:"DescriptorContinuous",props:{descriptor:{}},setup(e){const t=e,r=B(),o=n.ref(String(r.getDescriptorValueById(t.descriptor.descriptorId))),s=()=>{const{descriptorId:i}=t.descriptor,a=o.value.trim();a?r.setDescriptor({descriptorId:i,value:a}):r.removeDescriptor(i)};return(i,a)=>(n.openBlock(),n.createBlock(ce,{class:"distinguish-descriptor-continuous",descriptor:i.descriptor},{title:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.descriptor.name)+" ("+n.toDisplayString(i.descriptor.min)+"-"+n.toDisplayString(i.descriptor.max)+" "+n.toDisplayString(i.descriptor.defaultUnit)+") ",1)]),default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=c=>o.value=c),type:"text",onBlur:s,onKeyup:n.withKeys(s,["enter"])},null,544),[[n.vModelText,o.value]])]),_:1},8,["descriptor"]))}}),uo=["value"],fo={key:0},mo=n.defineComponent({__name:"DescriptorPresenceAbsence",props:{descriptor:{}},setup(e){const t={Presence:!0,Absent:!1},r=e,o=B(),s=n.computed({get:()=>o.getDescriptorValueById(r.descriptor.descriptorId),set:a=>{const{descriptorId:c}=r.descriptor;typeof a=="boolean"?o.setDescriptor({descriptorId:c,value:!!a}):o.removeDescriptor(c)}}),i=a=>{var u;const{states:c}=r.descriptor;return((u=c.find(d=>d.name===String(a)))==null?void 0:u.numberOfObjects)||0};return(a,c)=>(n.openBlock(),n.createBlock(ce,{class:"distinguish-descriptor-presence-absence",descriptor:a.descriptor},{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":c[0]||(c[0]=u=>s.value=u)},[c[1]||(c[1]=n.createElementVNode("option",null,null,-1)),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(t,(u,d)=>n.createElementVNode("option",{key:d,value:u},[a.descriptor.status===n.unref(G).Useless?(n.openBlock(),n.createElementBlock("span",fo,"-")):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(d)+" ("+n.toDisplayString(i(u))+") ",1)],8,uo)),64))],512),[[n.vModelSelect,s.value]])]),_:1},8,["descriptor"]))}}),ho=["value","selected"],go={key:0},yo={key:1},bo=n.defineComponent({__name:"DescriptorQualitative",props:{descriptor:{}},setup(e){const t=e,r=B(),o=i=>{const a=i.target,{descriptorId:c}=t.descriptor;a.value?r.setDescriptor({descriptorId:c,value:[Number(a.value)]}):r.removeDescriptor(c)},s=i=>r.getDescriptorValueById(t.descriptor.descriptorId).includes(i.characterStateId);return(i,a)=>(n.openBlock(),n.createBlock(ce,{class:"distinguish-descriptor-qualitative",descriptor:i.descriptor},{default:n.withCtx(()=>[n.createElementVNode("select",{name:"listbox",onChange:o},[a[0]||(a[0]=n.createElementVNode("option",{value:""},null,-1)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.descriptor.characterStates,c=>(n.openBlock(),n.createElementBlock("option",{key:c.characterStateId,value:c.characterStateId,selected:s(c)},[s(c)?(n.openBlock(),n.createElementBlock("span",go,">")):n.createCommentVNode("",!0),c.status===n.unref(G).Useless?(n.openBlock(),n.createElementBlock("span",yo,"-")):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(c.name)+" ("+n.toDisplayString(c.numberOfObjects)+") ",1)],8,ho))),128))],32)]),_:1},8,["descriptor"]))}}),_o=n.defineComponent({__name:"DescriptorSample",props:{descriptor:{}},setup(e){const t=e,r=B(),o=n.ref(String(r.getDescriptorValueById(t.descriptor.descriptorId))),s=()=>{const{descriptorId:i}=t.descriptor,a=o.value.trim();a?r.setDescriptor({descriptorId:i,value:a}):r.removeDescriptor(i)};return(i,a)=>(n.openBlock(),n.createBlock(ce,{class:"distinguish-descriptor-sample",descriptor:i.descriptor},{title:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.descriptor.name)+" ("+n.toDisplayString(i.descriptor.min)+"-"+n.toDisplayString(i.descriptor.max)+" "+n.toDisplayString(i.descriptor.defaultUnit)+") ",1)]),default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=c=>o.value=c),type:"text",onBlur:s,onKeyup:n.withKeys(s,["enter"])},null,544),[[n.vModelText,o.value]])]),_:1},8,["descriptor"]))}}),Te=n.defineComponent({__name:"DescriptorsList",props:{title:{},descriptors:{}},setup(e){const t={DescriptorContinuous:po,DescriptorPresenceAbsence:mo,DescriptorQualitative:bo,DescriptorSample:_o},r=o=>{const s=o.replace("::","");return t[s]};return(o,s)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createElementVNode("h2",null,n.toDisplayString(o.title),1),n.createElementVNode("ol",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.descriptors,i=>(n.openBlock(),n.createElementBlock("li",{key:i.descriptorId},[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(r(i.type)),{descriptor:i},null,8,["descriptor"]))]))),128))])],64))}}),ko={key:0},wo=n.defineComponent({__name:"FilterRowCheckbox",setup(e){const t=B(),r=n.computed({get:()=>t.getRowFilter,set:o=>t.$patch({rowFilter:o})});return(o,s)=>n.unref(t).rowIds.length?(n.openBlock(),n.createElementBlock("label",ko,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),type:"checkbox"},null,512),[[n.vModelCheckbox,r.value]]),s[1]||(s[1]=n.createTextVNode(" Filter "))])):n.createCommentVNode("",!0)}}),Eo=n.defineComponent({__name:"PanelDescriptors",setup(e){const t=O();return(r,o)=>(n.openBlock(),n.createBlock(Re,{class:"distinguish-panel-descriptors"},{default:n.withCtx(()=>[n.createVNode(wo),n.unref(t).getDescriptorsUsed.length?(n.openBlock(),n.createBlock(Te,{key:0,descriptors:n.unref(t).getDescriptorsUsed,title:"Used Descriptors"},null,8,["descriptors"])):n.createCommentVNode("",!0),n.unref(t).getDescriptorsUseful.length?(n.openBlock(),n.createBlock(Te,{key:1,descriptors:n.unref(t).getDescriptorsUseful,title:"Descriptors Useful for Identification"},null,8,["descriptors"])):n.createCommentVNode("",!0),n.unref(t).getDescriptorsUseless.length?(n.openBlock(),n.createBlock(Te,{key:2,descriptors:n.unref(t).getDescriptorsUseless,title:"Descriptors no longer relevant for identification"},null,8,["descriptors"])):n.createCommentVNode("",!0)]),_:1}))}}),So={class:"distinguish-spinner-container"},Bo={class:"distinguish-spinner-legend"},Co=["innerHTML"],No=n.defineComponent({__name:"VSpinner",props:{legend:{type:String,default:"Loading, please wait."}},setup(e){return(t,r)=>(n.openBlock(),n.createBlock(n.Transition,{name:"fade"},{default:n.withCtx(()=>[n.createElementVNode("div",So,[n.createElementVNode("div",null,[r[0]||(r[0]=n.createElementVNode("div",{class:"distinguish-spinner"},null,-1)),n.createElementVNode("div",Bo,[n.createElementVNode("span",{innerHTML:e.legend},null,8,Co),n.renderSlot(t.$slots,"default")])])])]),_:3}))}}),Ro={class:"distinguish-title"},To={key:0},xo=n.defineComponent({__name:"TitleMatrix",setup(e){const t=O();return(r,o)=>(n.openBlock(),n.createElementBlock("h1",Ro,[o[0]||(o[0]=n.createTextVNode(" Interactive key ")),n.unref(t).getObservationMatrix?(n.openBlock(),n.createElementBlock("span",To,"| "+n.toDisplayString(n.unref(t).getObservationMatrix.name),1)):n.createCommentVNode("",!0)]))}}),Do=["title"],Oo=n.defineComponent({__name:"TitleMatrixCitation",setup(e){const t=O(),r=n.computed(()=>{const o=t.getCitation;return Object.values(o||{}).filter(Boolean).join(", ")});return(o,s)=>(n.openBlock(),n.createElementBlock("span",{class:"distinguish-title-citation",title:r.value},n.toDisplayString(r.value),9,Do))}}),Vo={class:"distinguish-title-section"},Io=n.defineComponent({__name:"TitleKey",setup(e){return(t,r)=>(n.openBlock(),n.createElementBlock("div",Vo,[n.createVNode(xo),n.createVNode(Oo)]))}}),Ao={class:"distinguish-app-container"},_t=n.defineComponent({name:"Distinguish",__name:"App",props:{observationMatrixId:{},apiConfig:{},renderItem:{type:Function}},setup(e){const t=e,r=F(),o=B(),s=n.computed(()=>r.getIsLoading),i=n.computed(()=>r.getLayout);return(()=>{r.setAPIConfig(t.apiConfig),r.setObservationMatrixId(t.observationMatrixId),r.checkUpdate()})(),o.$subscribe(c=>{r.shouldUpdate&&r.checkUpdate()}),(c,u)=>(n.openBlock(),n.createElementBlock("div",Ao,[n.createVNode(Io),n.createVNode($r),n.createVNode(yt,{class:n.normalizeClass(i.value)},{default:n.withCtx(()=>[n.createVNode(Eo),n.createVNode(Xr,{render:t.renderItem},{default:n.withCtx(d=>[n.renderSlot(c.$slots,"remaining-item",n.normalizeProps(n.guardReactiveProps(d)))]),_:3},8,["render"]),n.createVNode(qr,{render:t.renderItem},{default:n.withCtx(d=>[n.renderSlot(c.$slots,"eliminated-item",n.normalizeProps(n.guardReactiveProps(d)))]),_:3},8,["render"])]),_:3},8,["class"]),s.value?(n.openBlock(),n.createBlock(No,{key:0,legend:"Loading interactive key..."})):n.createCommentVNode("",!0)]))}});function kt(e){const t=e||'[data-interactive-key="true"]';return[...document.querySelectorAll(t)].map(s=>wt(s,Uo(s)))}function Lo(){kt()}function Uo(e){return{observationMatrixId:Number(e.getAttribute("data-observation-matrix-id")),apiConfig:{baseURL:e.getAttribute("data-base-url")||"",projectToken:e.getAttribute("data-project-token")||void 0,projectId:Number(e.getAttribute("data-project-id"))||void 0,userToken:e.getAttribute("data-user-token")||void 0,csrfToken:e.getAttribute("data-csrf-token")||void 0}}}function wt(e,t){const{apiConfig:r,observationMatrixId:o}=t;if(!o)throw"Missing observation matrix ID";if(!r||!r.projectToken&&!r.csrfToken&&!(r.projectId&&r.userToken))throw"Missing API configuration";const s=n.createApp(_t,{observationMatrixId:o,apiConfig:r});return s.use(Y.createPinia()),s.mount(e),s}typeof window<"u"&&window.addEventListener("DOMContentLoaded",Lo),D.VueInteractiveKey=_t,D.createInteractiveKey=wt,D.discoverInteractiveKey=kt,Object.defineProperty(D,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(O,n){typeof exports=="object"&&typeof module<"u"?n(exports,require("vue"),require("pinia")):typeof define=="function"&&define.amd?define(["exports","vue","pinia"],n):(O=typeof globalThis<"u"?globalThis:O||self,n(O.Distinguish={},O.Vue,O.Pinia))})(this,function(O,n,Y){"use strict";function Re(e,t){return function(){return e.apply(t,arguments)}}const{toString:kt}=Object.prototype,{getPrototypeOf:ue}=Object,Z=(e=>t=>{const r=kt.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),T=e=>(e=e.toLowerCase(),t=>Z(t)===e),v=e=>t=>typeof t===e,{isArray:j}=Array,z=v("undefined");function wt(e){return e!==null&&!z(e)&&e.constructor!==null&&!z(e.constructor)&&x(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const xe=T("ArrayBuffer");function Et(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&xe(e.buffer),t}const St=v("string"),x=v("function"),Te=v("number"),ee=e=>e!==null&&typeof e=="object",Bt=e=>e===!0||e===!1,te=e=>{if(Z(e)!=="object")return!1;const t=ue(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Ct=T("Date"),Nt=T("File"),Rt=T("Blob"),xt=T("FileList"),Tt=e=>ee(e)&&x(e.pipe),Ot=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||x(e.append)&&((t=Z(e))==="formdata"||t==="object"&&x(e.toString)&&e.toString()==="[object FormData]"))},Dt=T("URLSearchParams"),[Vt,At,It,$t]=["ReadableStream","Request","Response","Headers"].map(T),Ut=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function K(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let o,s;if(typeof e!="object"&&(e=[e]),j(e))for(o=0,s=e.length;o<s;o++)t.call(null,e[o],o,e);else{const i=r?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length;let l;for(o=0;o<a;o++)l=i[o],t.call(null,e[l],l,e)}}function Oe(e,t){t=t.toLowerCase();const r=Object.keys(e);let o=r.length,s;for(;o-- >0;)if(s=r[o],t===s.toLowerCase())return s;return null}const $=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,De=e=>!z(e)&&e!==$;function fe(){const{caseless:e}=De(this)&&this||{},t={},r=(o,s)=>{const i=e&&Oe(t,s)||s;te(t[i])&&te(o)?t[i]=fe(t[i],o):te(o)?t[i]=fe({},o):j(o)?t[i]=o.slice():t[i]=o};for(let o=0,s=arguments.length;o<s;o++)arguments[o]&&K(arguments[o],r);return t}const Lt=(e,t,r,{allOwnKeys:o}={})=>(K(t,(s,i)=>{r&&x(s)?e[i]=Re(s,r):e[i]=s},{allOwnKeys:o}),e),Ft=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Pt=(e,t,r,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Mt=(e,t,r,o)=>{let s,i,a;const l={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)a=s[i],(!o||o(a,e,t))&&!l[a]&&(t[a]=e[a],l[a]=!0);e=r!==!1&&ue(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},jt=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const o=e.indexOf(t,r);return o!==-1&&o===r},qt=e=>{if(!e)return null;if(j(e))return e;let t=e.length;if(!Te(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Ht=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&ue(Uint8Array)),zt=(e,t)=>{const o=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=o.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},Kt=(e,t)=>{let r;const o=[];for(;(r=e.exec(t))!==null;)o.push(r);return o},Jt=T("HTMLFormElement"),Wt=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,o,s){return o.toUpperCase()+s}),Ve=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),Xt=T("RegExp"),Ae=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),o={};K(r,(s,i)=>{let a;(a=t(s,i,e))!==!1&&(o[i]=a||s)}),Object.defineProperties(e,o)},Qt=e=>{Ae(e,(t,r)=>{if(x(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const o=e[r];if(x(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},Gt=(e,t)=>{const r={},o=s=>{s.forEach(i=>{r[i]=!0})};return j(e)?o(e):o(String(e).split(t)),r},Yt=()=>{},Zt=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function vt(e){return!!(e&&x(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const en=e=>{const t=new Array(10),r=(o,s)=>{if(ee(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[s]=o;const i=j(o)?[]:{};return K(o,(a,l)=>{const u=r(a,s+1);!z(u)&&(i[l]=u)}),t[s]=void 0,i}}return o};return r(e,0)},tn=T("AsyncFunction"),nn=e=>e&&(ee(e)||x(e))&&x(e.then)&&x(e.catch),Ie=((e,t)=>e?setImmediate:t?((r,o)=>($.addEventListener("message",({source:s,data:i})=>{s===$&&i===r&&o.length&&o.shift()()},!1),s=>{o.push(s),$.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",x($.postMessage)),rn=typeof queueMicrotask<"u"?queueMicrotask.bind($):typeof process<"u"&&process.nextTick||Ie,c={isArray:j,isArrayBuffer:xe,isBuffer:wt,isFormData:Ot,isArrayBufferView:Et,isString:St,isNumber:Te,isBoolean:Bt,isObject:ee,isPlainObject:te,isReadableStream:Vt,isRequest:At,isResponse:It,isHeaders:$t,isUndefined:z,isDate:Ct,isFile:Nt,isBlob:Rt,isRegExp:Xt,isFunction:x,isStream:Tt,isURLSearchParams:Dt,isTypedArray:Ht,isFileList:xt,forEach:K,merge:fe,extend:Lt,trim:Ut,stripBOM:Ft,inherits:Pt,toFlatObject:Mt,kindOf:Z,kindOfTest:T,endsWith:jt,toArray:qt,forEachEntry:zt,matchAll:Kt,isHTMLForm:Jt,hasOwnProperty:Ve,hasOwnProp:Ve,reduceDescriptors:Ae,freezeMethods:Qt,toObjectSet:Gt,toCamelCase:Wt,noop:Yt,toFiniteNumber:Zt,findKey:Oe,global:$,isContextDefined:De,isSpecCompliantForm:vt,toJSONObject:en,isAsyncFn:tn,isThenable:nn,setImmediate:Ie,asap:rn};function g(e,t,r,o,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),o&&(this.request=o),s&&(this.response=s,this.status=s.status?s.status:null)}c.inherits(g,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:c.toJSONObject(this.config),code:this.code,status:this.status}}});const $e=g.prototype,Ue={};["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=>{Ue[e]={value:e}}),Object.defineProperties(g,Ue),Object.defineProperty($e,"isAxiosError",{value:!0}),g.from=(e,t,r,o,s,i)=>{const a=Object.create($e);return c.toFlatObject(e,a,function(u){return u!==Error.prototype},l=>l!=="isAxiosError"),g.call(a,e.message,t,r,o,s),a.cause=e,a.name=e.name,i&&Object.assign(a,i),a};const on=null;function me(e){return c.isPlainObject(e)||c.isArray(e)}function Le(e){return c.endsWith(e,"[]")?e.slice(0,-2):e}function Fe(e,t,r){return e?e.concat(t).map(function(s,i){return s=Le(s),!r&&i?"["+s+"]":s}).join(r?".":""):t}function sn(e){return c.isArray(e)&&!e.some(me)}const an=c.toFlatObject(c,{},null,function(t){return/^is[A-Z]/.test(t)});function ne(e,t,r){if(!c.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=c.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(y,h){return!c.isUndefined(h[y])});const o=r.metaTokens,s=r.visitor||p,i=r.dots,a=r.indexes,u=(r.Blob||typeof Blob<"u"&&Blob)&&c.isSpecCompliantForm(t);if(!c.isFunction(s))throw new TypeError("visitor must be a function");function d(m){if(m===null)return"";if(c.isDate(m))return m.toISOString();if(!u&&c.isBlob(m))throw new g("Blob is not supported. Use a Buffer instead.");return c.isArrayBuffer(m)||c.isTypedArray(m)?u&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function p(m,y,h){let k=m;if(m&&!h&&typeof m=="object"){if(c.endsWith(y,"{}"))y=o?y:y.slice(0,-2),m=JSON.stringify(m);else if(c.isArray(m)&&sn(m)||(c.isFileList(m)||c.endsWith(y,"[]"))&&(k=c.toArray(m)))return y=Le(y),k.forEach(function(S,A){!(c.isUndefined(S)||S===null)&&t.append(a===!0?Fe([y],A,i):a===null?y:y+"[]",d(S))}),!1}return me(m)?!0:(t.append(Fe(h,y,i),d(m)),!1)}const f=[],b=Object.assign(an,{defaultVisitor:p,convertValue:d,isVisitable:me});function w(m,y){if(!c.isUndefined(m)){if(f.indexOf(m)!==-1)throw Error("Circular reference detected in "+y.join("."));f.push(m),c.forEach(m,function(k,E){(!(c.isUndefined(k)||k===null)&&s.call(t,k,c.isString(E)?E.trim():E,y,b))===!0&&w(k,y?y.concat(E):[E])}),f.pop()}}if(!c.isObject(e))throw new TypeError("data must be an object");return w(e),t}function Pe(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function he(e,t){this._pairs=[],e&&ne(e,this,t)}const Me=he.prototype;Me.append=function(t,r){this._pairs.push([t,r])},Me.toString=function(t){const r=t?function(o){return t.call(this,o,Pe)}:Pe;return this._pairs.map(function(s){return r(s[0])+"="+r(s[1])},"").join("&")};function ln(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function je(e,t,r){if(!t)return e;const o=r&&r.encode||ln;c.isFunction(r)&&(r={serialize:r});const s=r&&r.serialize;let i;if(s?i=s(t,r):i=c.isURLSearchParams(t)?t.toString():new he(t,r).toString(o),i){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class qe{constructor(){this.handlers=[]}use(t,r,o){return this.handlers.push({fulfilled:t,rejected:r,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){c.forEach(this.handlers,function(o){o!==null&&t(o)})}}const He={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},cn={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:he,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},ge=typeof window<"u"&&typeof document<"u",ye=typeof navigator=="object"&&navigator||void 0,dn=ge&&(!ye||["ReactNative","NativeScript","NS"].indexOf(ye.product)<0),pn=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",un=ge&&window.location.href||"http://localhost",C={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:ge,hasStandardBrowserEnv:dn,hasStandardBrowserWebWorkerEnv:pn,navigator:ye,origin:un},Symbol.toStringTag,{value:"Module"})),...cn};function fn(e,t){return ne(e,new C.classes.URLSearchParams,Object.assign({visitor:function(r,o,s,i){return C.isNode&&c.isBuffer(r)?(this.append(o,r.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function mn(e){return c.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function hn(e){const t={},r=Object.keys(e);let o;const s=r.length;let i;for(o=0;o<s;o++)i=r[o],t[i]=e[i];return t}function ze(e){function t(r,o,s,i){let a=r[i++];if(a==="__proto__")return!0;const l=Number.isFinite(+a),u=i>=r.length;return a=!a&&c.isArray(s)?s.length:a,u?(c.hasOwnProp(s,a)?s[a]=[s[a],o]:s[a]=o,!l):((!s[a]||!c.isObject(s[a]))&&(s[a]=[]),t(r,o,s[a],i)&&c.isArray(s[a])&&(s[a]=hn(s[a])),!l)}if(c.isFormData(e)&&c.isFunction(e.entries)){const r={};return c.forEachEntry(e,(o,s)=>{t(mn(o),s,r,0)}),r}return null}function gn(e,t,r){if(c.isString(e))try{return(t||JSON.parse)(e),c.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(r||JSON.stringify)(e)}const J={transitional:He,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const o=r.getContentType()||"",s=o.indexOf("application/json")>-1,i=c.isObject(t);if(i&&c.isHTMLForm(t)&&(t=new FormData(t)),c.isFormData(t))return s?JSON.stringify(ze(t)):t;if(c.isArrayBuffer(t)||c.isBuffer(t)||c.isStream(t)||c.isFile(t)||c.isBlob(t)||c.isReadableStream(t))return t;if(c.isArrayBufferView(t))return t.buffer;if(c.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(i){if(o.indexOf("application/x-www-form-urlencoded")>-1)return fn(t,this.formSerializer).toString();if((l=c.isFileList(t))||o.indexOf("multipart/form-data")>-1){const u=this.env&&this.env.FormData;return ne(l?{"files[]":t}:t,u&&new u,this.formSerializer)}}return i||s?(r.setContentType("application/json",!1),gn(t)):t}],transformResponse:[function(t){const r=this.transitional||J.transitional,o=r&&r.forcedJSONParsing,s=this.responseType==="json";if(c.isResponse(t)||c.isReadableStream(t))return t;if(t&&c.isString(t)&&(o&&!this.responseType||s)){const a=!(r&&r.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(l){if(a)throw l.name==="SyntaxError"?g.from(l,g.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:C.classes.FormData,Blob:C.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};c.forEach(["delete","get","head","post","put","patch"],e=>{J.headers[e]={}});const yn=c.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"]),bn=e=>{const t={};let r,o,s;return e&&e.split(`
|
|
2
|
+
`).forEach(function(a){s=a.indexOf(":"),r=a.substring(0,s).trim().toLowerCase(),o=a.substring(s+1).trim(),!(!r||t[r]&&yn[r])&&(r==="set-cookie"?t[r]?t[r].push(o):t[r]=[o]:t[r]=t[r]?t[r]+", "+o:o)}),t},Ke=Symbol("internals");function W(e){return e&&String(e).trim().toLowerCase()}function re(e){return e===!1||e==null?e:c.isArray(e)?e.map(re):String(e)}function _n(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=r.exec(e);)t[o[1]]=o[2];return t}const kn=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function be(e,t,r,o,s){if(c.isFunction(o))return o.call(this,t,r);if(s&&(t=r),!!c.isString(t)){if(c.isString(o))return t.indexOf(o)!==-1;if(c.isRegExp(o))return o.test(t)}}function wn(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,o)=>r.toUpperCase()+o)}function En(e,t){const r=c.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+r,{value:function(s,i,a){return this[o].call(this,t,s,i,a)},configurable:!0})})}let N=class{constructor(t){t&&this.set(t)}set(t,r,o){const s=this;function i(l,u,d){const p=W(u);if(!p)throw new Error("header name must be a non-empty string");const f=c.findKey(s,p);(!f||s[f]===void 0||d===!0||d===void 0&&s[f]!==!1)&&(s[f||u]=re(l))}const a=(l,u)=>c.forEach(l,(d,p)=>i(d,p,u));if(c.isPlainObject(t)||t instanceof this.constructor)a(t,r);else if(c.isString(t)&&(t=t.trim())&&!kn(t))a(bn(t),r);else if(c.isHeaders(t))for(const[l,u]of t.entries())i(u,l,o);else t!=null&&i(r,t,o);return this}get(t,r){if(t=W(t),t){const o=c.findKey(this,t);if(o){const s=this[o];if(!r)return s;if(r===!0)return _n(s);if(c.isFunction(r))return r.call(this,s,o);if(c.isRegExp(r))return r.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=W(t),t){const o=c.findKey(this,t);return!!(o&&this[o]!==void 0&&(!r||be(this,this[o],o,r)))}return!1}delete(t,r){const o=this;let s=!1;function i(a){if(a=W(a),a){const l=c.findKey(o,a);l&&(!r||be(o,o[l],l,r))&&(delete o[l],s=!0)}}return c.isArray(t)?t.forEach(i):i(t),s}clear(t){const r=Object.keys(this);let o=r.length,s=!1;for(;o--;){const i=r[o];(!t||be(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const r=this,o={};return c.forEach(this,(s,i)=>{const a=c.findKey(o,i);if(a){r[a]=re(s),delete r[i];return}const l=t?wn(i):String(i).trim();l!==i&&delete r[i],r[l]=re(s),o[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return c.forEach(this,(o,s)=>{o!=null&&o!==!1&&(r[s]=t&&c.isArray(o)?o.join(", "):o)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
|
|
3
|
+
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const o=new this(t);return r.forEach(s=>o.set(s)),o}static accessor(t){const o=(this[Ke]=this[Ke]={accessors:{}}).accessors,s=this.prototype;function i(a){const l=W(a);o[l]||(En(s,a),o[l]=!0)}return c.isArray(t)?t.forEach(i):i(t),this}};N.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),c.reduceDescriptors(N.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[r]=o}}}),c.freezeMethods(N);function _e(e,t){const r=this||J,o=t||r,s=N.from(o.headers);let i=o.data;return c.forEach(e,function(l){i=l.call(r,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function Je(e){return!!(e&&e.__CANCEL__)}function q(e,t,r){g.call(this,e??"canceled",g.ERR_CANCELED,t,r),this.name="CanceledError"}c.inherits(q,g,{__CANCEL__:!0});function We(e,t,r){const o=r.config.validateStatus;!r.status||!o||o(r.status)?e(r):t(new g("Request failed with status code "+r.status,[g.ERR_BAD_REQUEST,g.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Sn(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Bn(e,t){e=e||10;const r=new Array(e),o=new Array(e);let s=0,i=0,a;return t=t!==void 0?t:1e3,function(u){const d=Date.now(),p=o[i];a||(a=d),r[s]=u,o[s]=d;let f=i,b=0;for(;f!==s;)b+=r[f++],f=f%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),d-a<t)return;const w=p&&d-p;return w?Math.round(b*1e3/w):void 0}}function Cn(e,t){let r=0,o=1e3/t,s,i;const a=(d,p=Date.now())=>{r=p,s=null,i&&(clearTimeout(i),i=null),e.apply(null,d)};return[(...d)=>{const p=Date.now(),f=p-r;f>=o?a(d,p):(s=d,i||(i=setTimeout(()=>{i=null,a(s)},o-f)))},()=>s&&a(s)]}const oe=(e,t,r=3)=>{let o=0;const s=Bn(50,250);return Cn(i=>{const a=i.loaded,l=i.lengthComputable?i.total:void 0,u=a-o,d=s(u),p=a<=l;o=a;const f={loaded:a,total:l,progress:l?a/l:void 0,bytes:u,rate:d||void 0,estimated:d&&l&&p?(l-a)/d:void 0,event:i,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(f)},r)},Xe=(e,t)=>{const r=e!=null;return[o=>t[0]({lengthComputable:r,total:e,loaded:o}),t[1]]},Qe=e=>(...t)=>c.asap(()=>e(...t)),Nn=C.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,C.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(C.origin),C.navigator&&/(msie|trident)/i.test(C.navigator.userAgent)):()=>!0,Rn=C.hasStandardBrowserEnv?{write(e,t,r,o,s,i){const a=[e+"="+encodeURIComponent(t)];c.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),c.isString(o)&&a.push("path="+o),c.isString(s)&&a.push("domain="+s),i===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function xn(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Tn(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Ge(e,t,r){let o=!xn(t);return e&&(o||r==!1)?Tn(e,t):t}const Ye=e=>e instanceof N?{...e}:e;function U(e,t){t=t||{};const r={};function o(d,p,f,b){return c.isPlainObject(d)&&c.isPlainObject(p)?c.merge.call({caseless:b},d,p):c.isPlainObject(p)?c.merge({},p):c.isArray(p)?p.slice():p}function s(d,p,f,b){if(c.isUndefined(p)){if(!c.isUndefined(d))return o(void 0,d,f,b)}else return o(d,p,f,b)}function i(d,p){if(!c.isUndefined(p))return o(void 0,p)}function a(d,p){if(c.isUndefined(p)){if(!c.isUndefined(d))return o(void 0,d)}else return o(void 0,p)}function l(d,p,f){if(f in t)return o(d,p);if(f in e)return o(void 0,d)}const u={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken: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:l,headers:(d,p,f)=>s(Ye(d),Ye(p),f,!0)};return c.forEach(Object.keys(Object.assign({},e,t)),function(p){const f=u[p]||s,b=f(e[p],t[p],p);c.isUndefined(b)&&f!==l||(r[p]=b)}),r}const Ze=e=>{const t=U({},e);let{data:r,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:i,headers:a,auth:l}=t;t.headers=a=N.from(a),t.url=je(Ge(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):"")));let u;if(c.isFormData(r)){if(C.hasStandardBrowserEnv||C.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((u=a.getContentType())!==!1){const[d,...p]=u?u.split(";").map(f=>f.trim()).filter(Boolean):[];a.setContentType([d||"multipart/form-data",...p].join("; "))}}if(C.hasStandardBrowserEnv&&(o&&c.isFunction(o)&&(o=o(t)),o||o!==!1&&Nn(t.url))){const d=s&&i&&Rn.read(i);d&&a.set(s,d)}return t},On=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,o){const s=Ze(e);let i=s.data;const a=N.from(s.headers).normalize();let{responseType:l,onUploadProgress:u,onDownloadProgress:d}=s,p,f,b,w,m;function y(){w&&w(),m&&m(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let h=new XMLHttpRequest;h.open(s.method.toUpperCase(),s.url,!0),h.timeout=s.timeout;function k(){if(!h)return;const S=N.from("getAllResponseHeaders"in h&&h.getAllResponseHeaders()),R={data:!l||l==="text"||l==="json"?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:S,config:e,request:h};We(function(M){r(M),y()},function(M){o(M),y()},R),h=null}"onloadend"in h?h.onloadend=k:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(k)},h.onabort=function(){h&&(o(new g("Request aborted",g.ECONNABORTED,e,h)),h=null)},h.onerror=function(){o(new g("Network Error",g.ERR_NETWORK,e,h)),h=null},h.ontimeout=function(){let A=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const R=s.transitional||He;s.timeoutErrorMessage&&(A=s.timeoutErrorMessage),o(new g(A,R.clarifyTimeoutError?g.ETIMEDOUT:g.ECONNABORTED,e,h)),h=null},i===void 0&&a.setContentType(null),"setRequestHeader"in h&&c.forEach(a.toJSON(),function(A,R){h.setRequestHeader(R,A)}),c.isUndefined(s.withCredentials)||(h.withCredentials=!!s.withCredentials),l&&l!=="json"&&(h.responseType=s.responseType),d&&([b,m]=oe(d,!0),h.addEventListener("progress",b)),u&&h.upload&&([f,w]=oe(u),h.upload.addEventListener("progress",f),h.upload.addEventListener("loadend",w)),(s.cancelToken||s.signal)&&(p=S=>{h&&(o(!S||S.type?new q(null,e,h):S),h.abort(),h=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const E=Sn(s.url);if(E&&C.protocols.indexOf(E)===-1){o(new g("Unsupported protocol "+E+":",g.ERR_BAD_REQUEST,e));return}h.send(i||null)})},Dn=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let o=new AbortController,s;const i=function(d){if(!s){s=!0,l();const p=d instanceof Error?d:this.reason;o.abort(p instanceof g?p:new q(p instanceof Error?p.message:p))}};let a=t&&setTimeout(()=>{a=null,i(new g(`timeout ${t} of ms exceeded`,g.ETIMEDOUT))},t);const l=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(i):d.removeEventListener("abort",i)}),e=null)};e.forEach(d=>d.addEventListener("abort",i));const{signal:u}=o;return u.unsubscribe=()=>c.asap(l),u}},Vn=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let o=0,s;for(;o<r;)s=o+t,yield e.slice(o,s),o=s},An=async function*(e,t){for await(const r of In(e))yield*Vn(r,t)},In=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:o}=await t.read();if(r)break;yield o}}finally{await t.cancel()}},ve=(e,t,r,o)=>{const s=An(e,t);let i=0,a,l=u=>{a||(a=!0,o&&o(u))};return new ReadableStream({async pull(u){try{const{done:d,value:p}=await s.next();if(d){l(),u.close();return}let f=p.byteLength;if(r){let b=i+=f;r(b)}u.enqueue(new Uint8Array(p))}catch(d){throw l(d),d}},cancel(u){return l(u),s.return()}},{highWaterMark:2})},se=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",et=se&&typeof ReadableStream=="function",$n=se&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),tt=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Un=et&&tt(()=>{let e=!1;const t=new Request(C.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),nt=64*1024,ke=et&&tt(()=>c.isReadableStream(new Response("").body)),ie={stream:ke&&(e=>e.body)};se&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!ie[t]&&(ie[t]=c.isFunction(e[t])?r=>r[t]():(r,o)=>{throw new g(`Response type '${t}' is not supported`,g.ERR_NOT_SUPPORT,o)})})})(new Response);const Ln=async e=>{if(e==null)return 0;if(c.isBlob(e))return e.size;if(c.isSpecCompliantForm(e))return(await new Request(C.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(c.isArrayBufferView(e)||c.isArrayBuffer(e))return e.byteLength;if(c.isURLSearchParams(e)&&(e=e+""),c.isString(e))return(await $n(e)).byteLength},Fn=async(e,t)=>{const r=c.toFiniteNumber(e.getContentLength());return r??Ln(t)},we={http:on,xhr:On,fetch:se&&(async e=>{let{url:t,method:r,data:o,signal:s,cancelToken:i,timeout:a,onDownloadProgress:l,onUploadProgress:u,responseType:d,headers:p,withCredentials:f="same-origin",fetchOptions:b}=Ze(e);d=d?(d+"").toLowerCase():"text";let w=Dn([s,i&&i.toAbortSignal()],a),m;const y=w&&w.unsubscribe&&(()=>{w.unsubscribe()});let h;try{if(u&&Un&&r!=="get"&&r!=="head"&&(h=await Fn(p,o))!==0){let R=new Request(t,{method:"POST",body:o,duplex:"half"}),I;if(c.isFormData(o)&&(I=R.headers.get("content-type"))&&p.setContentType(I),R.body){const[M,pe]=Xe(h,oe(Qe(u)));o=ve(R.body,nt,M,pe)}}c.isString(f)||(f=f?"include":"omit");const k="credentials"in Request.prototype;m=new Request(t,{...b,signal:w,method:r.toUpperCase(),headers:p.normalize().toJSON(),body:o,duplex:"half",credentials:k?f:void 0});let E=await fetch(m);const S=ke&&(d==="stream"||d==="response");if(ke&&(l||S&&y)){const R={};["status","statusText","headers"].forEach(bt=>{R[bt]=E[bt]});const I=c.toFiniteNumber(E.headers.get("content-length")),[M,pe]=l&&Xe(I,oe(Qe(l),!0))||[];E=new Response(ve(E.body,nt,M,()=>{pe&&pe(),y&&y()}),R)}d=d||"text";let A=await ie[c.findKey(ie,d)||"text"](E,e);return!S&&y&&y(),await new Promise((R,I)=>{We(R,I,{data:A,headers:N.from(E.headers),status:E.status,statusText:E.statusText,config:e,request:m})})}catch(k){throw y&&y(),k&&k.name==="TypeError"&&/fetch/i.test(k.message)?Object.assign(new g("Network Error",g.ERR_NETWORK,e,m),{cause:k.cause||k}):g.from(k,k&&k.code,e,m)}})};c.forEach(we,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const rt=e=>`- ${e}`,Pn=e=>c.isFunction(e)||e===null||e===!1,ot={getAdapter:e=>{e=c.isArray(e)?e:[e];const{length:t}=e;let r,o;const s={};for(let i=0;i<t;i++){r=e[i];let a;if(o=r,!Pn(r)&&(o=we[(a=String(r)).toLowerCase()],o===void 0))throw new g(`Unknown adapter '${a}'`);if(o)break;s[a||"#"+i]=o}if(!o){const i=Object.entries(s).map(([l,u])=>`adapter ${l} `+(u===!1?"is not supported by the environment":"is not available in the build"));let a=t?i.length>1?`since :
|
|
4
|
+
`+i.map(rt).join(`
|
|
5
|
+
`):" "+rt(i[0]):"as no adapter specified";throw new g("There is no suitable adapter to dispatch the request "+a,"ERR_NOT_SUPPORT")}return o},adapters:we};function Ee(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new q(null,e)}function st(e){return Ee(e),e.headers=N.from(e.headers),e.data=_e.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ot.getAdapter(e.adapter||J.adapter)(e).then(function(o){return Ee(e),o.data=_e.call(e,e.transformResponse,o),o.headers=N.from(o.headers),o},function(o){return Je(o)||(Ee(e),o&&o.response&&(o.response.data=_e.call(e,e.transformResponse,o.response),o.response.headers=N.from(o.response.headers))),Promise.reject(o)})}const it="1.8.4",ae={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ae[e]=function(o){return typeof o===e||"a"+(t<1?"n ":" ")+e}});const at={};ae.transitional=function(t,r,o){function s(i,a){return"[Axios v"+it+"] Transitional option '"+i+"'"+a+(o?". "+o:"")}return(i,a,l)=>{if(t===!1)throw new g(s(a," has been removed"+(r?" in "+r:"")),g.ERR_DEPRECATED);return r&&!at[a]&&(at[a]=!0,console.warn(s(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(i,a,l):!0}},ae.spelling=function(t){return(r,o)=>(console.warn(`${o} is likely a misspelling of ${t}`),!0)};function Mn(e,t,r){if(typeof e!="object")throw new g("options must be an object",g.ERR_BAD_OPTION_VALUE);const o=Object.keys(e);let s=o.length;for(;s-- >0;){const i=o[s],a=t[i];if(a){const l=e[i],u=l===void 0||a(l,i,e);if(u!==!0)throw new g("option "+i+" must be "+u,g.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new g("Unknown option "+i,g.ERR_BAD_OPTION)}}const le={assertOptions:Mn,validators:ae},D=le.validators;let L=class{constructor(t){this.defaults=t,this.interceptors={request:new qe,response:new qe}}async request(t,r){try{return await this._request(t,r)}catch(o){if(o instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{o.stack?i&&!String(o.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(o.stack+=`
|
|
6
|
+
`+i):o.stack=i}catch{}}throw o}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=U(this.defaults,r);const{transitional:o,paramsSerializer:s,headers:i}=r;o!==void 0&&le.assertOptions(o,{silentJSONParsing:D.transitional(D.boolean),forcedJSONParsing:D.transitional(D.boolean),clarifyTimeoutError:D.transitional(D.boolean)},!1),s!=null&&(c.isFunction(s)?r.paramsSerializer={serialize:s}:le.assertOptions(s,{encode:D.function,serialize:D.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),le.assertOptions(r,{baseUrl:D.spelling("baseURL"),withXsrfToken:D.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=i&&c.merge(i.common,i[r.method]);i&&c.forEach(["delete","get","head","post","put","patch","common"],m=>{delete i[m]}),r.headers=N.concat(a,i);const l=[];let u=!0;this.interceptors.request.forEach(function(y){typeof y.runWhen=="function"&&y.runWhen(r)===!1||(u=u&&y.synchronous,l.unshift(y.fulfilled,y.rejected))});const d=[];this.interceptors.response.forEach(function(y){d.push(y.fulfilled,y.rejected)});let p,f=0,b;if(!u){const m=[st.bind(this),void 0];for(m.unshift.apply(m,l),m.push.apply(m,d),b=m.length,p=Promise.resolve(r);f<b;)p=p.then(m[f++],m[f++]);return p}b=l.length;let w=r;for(f=0;f<b;){const m=l[f++],y=l[f++];try{w=m(w)}catch(h){y.call(this,h);break}}try{p=st.call(this,w)}catch(m){return Promise.reject(m)}for(f=0,b=d.length;f<b;)p=p.then(d[f++],d[f++]);return p}getUri(t){t=U(this.defaults,t);const r=Ge(t.baseURL,t.url,t.allowAbsoluteUrls);return je(r,t.params,t.paramsSerializer)}};c.forEach(["delete","get","head","options"],function(t){L.prototype[t]=function(r,o){return this.request(U(o||{},{method:t,url:r,data:(o||{}).data}))}}),c.forEach(["post","put","patch"],function(t){function r(o){return function(i,a,l){return this.request(U(l||{},{method:t,headers:o?{"Content-Type":"multipart/form-data"}:{},url:i,data:a}))}}L.prototype[t]=r(),L.prototype[t+"Form"]=r(!0)});let jn=class _t{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(i){r=i});const o=this;this.promise.then(s=>{if(!o._listeners)return;let i=o._listeners.length;for(;i-- >0;)o._listeners[i](s);o._listeners=null}),this.promise.then=s=>{let i;const a=new Promise(l=>{o.subscribe(l),i=l}).then(s);return a.cancel=function(){o.unsubscribe(i)},a},t(function(i,a,l){o.reason||(o.reason=new q(i,a,l),r(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=o=>{t.abort(o)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new _t(function(s){t=s}),cancel:t}}};function qn(e){return function(r){return e.apply(null,r)}}function Hn(e){return c.isObject(e)&&e.isAxiosError===!0}const Se={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(Se).forEach(([e,t])=>{Se[t]=e});function lt(e){const t=new L(e),r=Re(L.prototype.request,t);return c.extend(r,L.prototype,t,{allOwnKeys:!0}),c.extend(r,t,null,{allOwnKeys:!0}),r.create=function(s){return lt(U(e,s))},r}const _=lt(J);_.Axios=L,_.CanceledError=q,_.CancelToken=jn,_.isCancel=Je,_.VERSION=it,_.toFormData=ne,_.AxiosError=g,_.Cancel=_.CanceledError,_.all=function(t){return Promise.all(t)},_.spread=qn,_.isAxiosError=Hn,_.mergeConfig=U,_.AxiosHeaders=N,_.formToJSON=e=>ze(c.isHTMLForm(e)?new FormData(e):e),_.getAdapter=ot.getAdapter,_.HttpStatusCode=Se,_.default=_;const{Axios:Mo,AxiosError:jo,CanceledError:qo,isCancel:Ho,CancelToken:zo,VERSION:Ko,all:Jo,Cancel:Wo,isAxiosError:Xo,spread:Qo,toFormData:Go,AxiosHeaders:Yo,HttpStatusCode:Zo,formToJSON:vo,getAdapter:es,mergeConfig:ts}=_,ct=(e={})=>{const t=F(),{baseURL:r,projectId:o,projectToken:s,userToken:i,csrfToken:a}=t.getAPIConfig,l={baseURL:r,params:{project_id:o,project_token:s,token:i},...e};return(!s||!(o&&i)&&a)&&Object.assign(l,{headers:{"X-CSRF-Token":a}}),_.create({...l})};class zn{static key(t,r){return ct().get(`/observation_matrices/${t}/key`,r)}}const X={Used:"used",Useful:"useful",Useless:"useless"},Kn=e=>({characterStateId:e.id,depictionIds:e.depiction_ids,label:e.label,position:e.position,...dt(e)}),Jn=e=>({depictionId:e.id,caption:e.caption,figureLabel:e.figure_label,imageUrl:e.image.medium}),Q={Qualitative:"Descriptor::Qualitative",Continuous:"Descriptor::Continuous",Sample:"Descriptor::Sample",PresenceAbsence:"Descriptor::PresenceAbsence"},G=e=>({descriptorId:e.id,name:e.name,description:e.description,position:e.position,status:e.status,type:e.type,depictionIds:e.depiction_ids,usefulness:e.usefulness,weight:e.weight}),Wn=e=>({...G(e),defaultUnit:e.default_unit,max:e.max,min:e.min}),Xn=e=>({...G(e),defaultUnit:e.default_unit,max:e.max,min:e.min}),Qn=e=>({...G(e),states:e.states.map(t=>dt(t))}),Gn=e=>({...G(e),characterStates:e.states.map(t=>Kn(t))}),Yn=e=>{switch(e.type){case Q.Continuous:return Wn(e);case Q.Sample:return Xn(e);case Q.PresenceAbsence:return Qn(e);case Q.Qualitative:return Gn(e);default:return G(e)}},Zn=e=>({observationMatrixId:e.observation_matrix_id,name:e.observation_matrix.name,globalId:e.observation_matrix.global_id}),dt=e=>({name:e.name,numberOfObjects:e.number_of_objects,status:e.status}),pt=e=>({errorDescriptors:e.error_descriptors,errors:e.errors,objectLabel:e.object.object_label,objectTag:e.object.object_tag,observationObjectId:e.object.observation_object_id,observationObjectType:e.object.observation_object_type,rowId:e.object.id}),vn=e=>({keywordId:e.id,definition:e.description,name:e.name}),er=e=>({languageId:e.id,name:e.english_name}),V=Y.defineStore("observationMatrix",{state:()=>({observationMatrix:void 0,citation:void 0,descriptors:[],eliminated:[],remaining:[],availableKeywords:[],availableLanguages:[]}),getters:{getCitation:e=>e.citation,getObservationMatrix:e=>e.observationMatrix,getDescriptors:e=>e.descriptors,getDescriptorById:e=>t=>e.descriptors.find(r=>r.descriptorId===t),getDescriptorsUsed:e=>e.descriptors.filter(t=>t.status===X.Used),getDescriptorsUseless:e=>e.descriptors.filter(t=>t.status===X.Useless),getDescriptorsUseful:e=>e.descriptors.filter(t=>t.status===X.Useful),getEliminated:e=>e.eliminated,getKeywords:e=>e.availableKeywords,getLanguages:e=>e.availableLanguages,getRemaining:e=>e.remaining},actions:{setDescriptors(e){this.descriptors=e},setEliminated(e){this.eliminated=e},setRemaining(e){this.remaining=e},setLanguages(e){this.availableLanguages=e},setKeywords(e){this.availableKeywords=e},setObservationMatrix(e){this.observationMatrix=e},async requestInteractiveKey({observationMatrixId:e,params:t={},opt:r={}}){const o=await zn.key(e,{params:t}),{data:s}=o;return r.refreshOnlyTaxa||(this.setObservationMatrix(Zn(s)),this.setDescriptors(s.list_of_descriptors.map(i=>Yn(i))),this.setKeywords(s.descriptor_available_keywords.map(i=>vn(i))),this.setLanguages(s.descriptor_available_languages.map(i=>er(i)))),this.setEliminated(s.eliminated.map(i=>pt(i))),this.setRemaining(s.remaining.map(i=>pt(i))),o}}}),B=Y.defineStore("filter",{state:()=>({descriptors:{},eliminateUnknown:void 0,rowFilter:!0,errorTolerance:void 0,identifiedToRank:void 0,keywordIds:[],languageId:void 0,rowIds:[],sorting:void 0}),getters:{getKeywordIds:e=>e.keywordIds,getLanguageId:e=>e.languageId,getRowIds:e=>e.rowIds,getRowFilter:e=>e.rowFilter,getDescriptors:e=>e.descriptors,getIdentifiedToRank:e=>e.identifiedToRank,getEliminateUknown:e=>e.eliminateUnknown,getErrorTolerance:e=>e.errorTolerance,getSorting:e=>e.sorting,getDescriptorValueById:e=>t=>{const r=e.descriptors[t];return typeof r=="boolean"?r:r||""},getFilterParams:e=>({selected_descriptors:Object.entries(e.descriptors).map(([r,o])=>Array.isArray(o)?`${r}:${o.join("|")}`:`${r}:${o}`).join("||"),language_id:e.languageId,keyword_ids:e.keywordIds,sorting:e.sorting,identified_to_rank:e.identifiedToRank,error_tolerance:e.errorTolerance,eliminate_unknown:e.eliminateUnknown,row_filter:e.rowFilter?e.rowIds.join("|"):[]})},actions:{setDescriptor({descriptorId:e,value:t}){this.descriptors[e]=t},removeDescriptor(e){delete this.descriptors[e]},removeKeywordId(e){const t=this.keywordIds.findIndex(r=>r===e);t>-1&&this.keywordIds.splice(t,1)},addKeywordId(e){this.keywordIds.push(e)},setLanguageId(e){this.languageId=e},setErrorTolerance(e){this.errorTolerance=e},setEliminateUnknown(e){this.eliminateUnknown=e}}}),F=Y.defineStore("settings",{state:()=>({gridLayout:"distinguish-layout-mode-1",isLoading:!1,isRefreshing:!1,refreshOnlyTaxa:!1,shouldUpdate:!0,observationMatrixId:void 0,errorMessage:"",apiConfig:{baseURL:"",projectId:void 0,projectToken:void 0,userToken:void 0}}),getters:{getErrorMessage:e=>e.errorMessage,getIsLoading:e=>e.isLoading,getLayout:e=>e.gridLayout,getRefreshOnlyTaxa:e=>e.refreshOnlyTaxa,getShouldUpdate:e=>e.shouldUpdate,getObservationMatrixId:e=>e.observationMatrixId,getAPIConfig:e=>e.apiConfig},actions:{setObservationMatrixId(e){this.observationMatrixId=e},setShouldUpdate(e){this.shouldUpdate=e},setRefreshOnlyTaxa(e){this.refreshOnlyTaxa=e},setAPIConfig(e){this.apiConfig=e},checkUpdate(){const e=B(),t=V(),r=this.observationMatrixId;this.shouldUpdate&&r&&(this.isLoading=!0,t.requestInteractiveKey({observationMatrixId:r,params:e.getFilterParams,opt:{refreshOnlyTaxa:this.refreshOnlyTaxa}}).then(o=>this.errorMessage="").catch(o=>this.errorMessage=o.message).finally(()=>this.isLoading=!1))}}}),tr=n.defineComponent({__name:"FilterEliminateUnknowns",setup(e){const t=B(),r=n.computed({get:()=>!!t.getEliminateUknown,set:o=>{t.setEliminateUnknown(o)}});return(o,s)=>(n.openBlock(),n.createElementBlock("label",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),type:"checkbox"},null,512),[[n.vModelCheckbox,r.value]]),s[1]||(s[1]=n.createTextVNode(" Eliminate unknowns "))]))}}),nr=["value"],rr=n.defineComponent({__name:"FilterErrorTolerance",setup(e){const t=[0,1,2],r=B(),o=n.computed({get:()=>r.getErrorTolerance,set:s=>{r.setErrorTolerance(s)}});return(s,i)=>(n.openBlock(),n.createElementBlock("div",null,[i[2]||(i[2]=n.createElementVNode("label",{for:"languages",class:"distinguish-input-label"}," Error tolerance ",-1)),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=a=>o.value=a),name:"languages",role:"listbox"},[i[1]||(i[1]=n.createElementVNode("option",{value:""},null,-1)),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(t,a=>n.createElementVNode("option",{key:a,value:a},n.toDisplayString(a),9,nr)),64))],512),[[n.vModelSelect,o.value]])]))}}),or=["otu","subspecies","species","subgenus","genus","subtribe","tribe","subfamily","family"],sr=n.defineComponent({__name:"FilterRank",setup(e){const t=B(),r=n.computed({get(){return t.getIdentifiedToRank},set(o){t.$patch({identifiedToRank:o})}});return(o,s)=>(n.openBlock(),n.createElementBlock("div",null,[s[2]||(s[2]=n.createElementVNode("label",{class:"distinguish-input-label"},"Identified to rank",-1)),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i)},[s[1]||(s[1]=n.createElementVNode("option",{value:void 0},null,-1)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(or),i=>(n.openBlock(),n.createElementBlock("option",{key:i},n.toDisplayString(i),1))),128))],512),[[n.vModelSelect,r.value]])]))}}),ir=n.defineComponent({__name:"FilterSort",setup(e){const t=["ordered","weighted","optimized"],r=B(),o=n.computed({get(){return r.getSorting},set(s){r.$patch({sorting:s})}});return(s,i)=>(n.openBlock(),n.createElementBlock("div",null,[i[2]||(i[2]=n.createElementVNode("label",{class:"distinguish-input-label"},"Descriptor sorting",-1)),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=a=>o.value=a)},[i[1]||(i[1]=n.createElementVNode("option",{value:void 0},null,-1)),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(t,a=>n.createElementVNode("option",{key:a},n.toDisplayString(a),1)),64))],512),[[n.vModelSelect,o.value]])]))}}),ar=["value"],lr=n.defineComponent({__name:"FilterLanguage",setup(e){const t=B(),r=V(),o=n.computed({get:()=>t.getLanguageId,set:s=>{t.setLanguageId(Number(s))}});return(s,i)=>(n.openBlock(),n.createElementBlock("div",null,[i[1]||(i[1]=n.createElementVNode("label",{for:"languages",class:"distinguish-input-label"}," Languages ",-1)),n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":i[0]||(i[0]=a=>o.value=a),name:"languages",role:"listbox"},[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(r).getLanguages,({languageId:a,name:l})=>(n.openBlock(),n.createElementBlock("option",{key:a,value:a},n.toDisplayString(l),9,ar))),128))],512),[[n.vModelSelect,o.value]])]))}}),cr=["disabled"],H=n.defineComponent({__name:"VBtn",props:{color:{default:"primary"},size:{default:"medium"},disabled:{type:Boolean}},setup(e){const t=e,r=n.computed(()=>[`distinguish-btn-${t.color}-color`,`distinguish-btn-${t.size}-size`]);return(o,s)=>(n.openBlock(),n.createElementBlock("button",{type:"button",class:n.normalizeClass(["distinguish-btn",r.value]),disabled:o.disabled},[n.renderSlot(o.$slots,"default")],10,cr))}}),dr={class:"distinguish-modal-wrapper"},pr={class:"distinguish-modal-header"},ur={class:"distinguish-modal-body"},fr={class:"distinguish-modal-footer"},Be=n.defineComponent({__name:"VModal",props:{containerClass:{},containerStyle:{}},emits:["close"],setup(e,{emit:t}){const r=t,o=s=>{s.preventDefault(),s.key==="Escape"&&r("close")};return n.onMounted(()=>document.addEventListener("keydown",o)),n.onUnmounted(()=>document.removeEventListener("keydown",o)),(s,i)=>(n.openBlock(),n.createBlock(n.Transition,{name:"distinguish-modal"},{default:n.withCtx(()=>[n.createElementVNode("div",{class:"distinguish-modal-mask",onClick:i[2]||(i[2]=a=>r("close")),onKey:i[3]||(i[3]=a=>r("close"))},[n.createElementVNode("div",dr,[n.createElementVNode("div",{class:n.normalizeClass(["distinguish-modal-container",s.containerClass]),style:n.normalizeStyle({...s.containerStyle}),onClick:i[1]||(i[1]=n.withModifiers(()=>{},["stop"]))},[n.createElementVNode("div",pr,[n.createElementVNode("div",{class:"distinguish-modal-close",onClick:i[0]||(i[0]=a=>r("close"))}),n.renderSlot(s.$slots,"header")]),n.createElementVNode("div",ur,[n.renderSlot(s.$slots,"body")]),n.createElementVNode("div",fr,[n.renderSlot(s.$slots,"footer")])],6)])],32)]),_:3}))}}),mr={class:"distinguish-list-checkboxes"},hr=["value"],gr=n.defineComponent({__name:"FilterKeywords",setup(e){const t=V(),r=B(),o=n.ref(!1),s=n.computed({get:()=>r.getKeywordIds,set:i=>{r.$patch({keywordIds:i})}});return(i,a)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(H,{color:"primary",size:"medium",disabled:!n.unref(t).getKeywords.length,title:n.unref(t).getKeywords.length?"":"No tags defined.",onClick:a[0]||(a[0]=l=>o.value=!0)},{default:n.withCtx(()=>a[3]||(a[3]=[n.createTextVNode(" Keyword ")])),_:1},8,["disabled","title"]),o.value?(n.openBlock(),n.createBlock(Be,{key:0,onClose:a[2]||(a[2]=l=>o.value=!1)},{header:n.withCtx(()=>a[4]||(a[4]=[n.createElementVNode("h3",null,"Keywords",-1)])),body:n.withCtx(()=>[n.createElementVNode("ul",mr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(t).getKeywords,({keywordId:l,name:u})=>(n.openBlock(),n.createElementBlock("li",{key:l},[n.createElementVNode("label",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":a[1]||(a[1]=d=>s.value=d),value:l,type:"checkbox"},null,8,hr),[[n.vModelCheckbox,s.value]]),n.createTextVNode(" "+n.toDisplayString(u),1)])]))),128))])]),_:1})):n.createCommentVNode("",!0)],64))}}),yr=n.defineComponent({__name:"SettingRefresh",setup(e){const t=F(),r=n.computed({get:()=>t.getRefreshOnlyTaxa,set:o=>{t.setRefreshOnlyTaxa(o)}});return(o,s)=>(n.openBlock(),n.createElementBlock("label",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),type:"checkbox"},null,512),[[n.vModelCheckbox,r.value]]),s[1]||(s[1]=n.createTextVNode(" Refresh only taxa "))]))}}),ce=(e,t)=>{const r=e.__vccOpts||e;for(const[o,s]of t)r[o]=s;return r},br={},_r={class:"distinguish-menu-list"};function kr(e,t){return n.openBlock(),n.createElementBlock("ul",_r,[n.renderSlot(e.$slots,"default")])}const wr=ce(br,[["render",kr]]),Er={},Sr={class:"distinguish-list-item"};function Br(e,t){return n.openBlock(),n.createElementBlock("li",Sr,[n.renderSlot(e.$slots,"default")])}const P=ce(Er,[["render",Br]]),ut={"distinguish-layout-mode-1":"distinguish-layout-mode-2","distinguish-layout-mode-2":"distinguish-layout-mode-1"},Cr={},Nr={class:"distinguish-grid"};function Rr(e,t){return n.openBlock(),n.createElementBlock("div",Nr,[n.renderSlot(e.$slots,"default")])}const ft=ce(Cr,[["render",Rr]]),xr=n.defineComponent({__name:"GridToggle",setup(e){const t=F(),r=n.computed(()=>t.getLayout),o=()=>{t.$patch({gridLayout:ut[r.value]})};return(s,i)=>(n.openBlock(),n.createBlock(H,{class:n.normalizeClass(n.unref(ut)[r.value]),onClick:o},{default:n.withCtx(()=>[n.createVNode(ft,{class:"distinguish-grid-icon"},{default:n.withCtx(()=>i[0]||(i[0]=[n.createElementVNode("div",{class:"distinguish-panel-descriptors"},null,-1),n.createElementVNode("div",{class:"distinguish-panel-remaining"},null,-1),n.createElementVNode("div",{class:"distinguish-panel-eliminated"},null,-1)])),_:1})]),_:1},8,["class"]))}}),Tr=n.defineComponent({__name:"ResetButton",setup(e){const t=B();return(r,o)=>(n.openBlock(),n.createBlock(H,{color:"primary",size:"medium",onClick:o[0]||(o[0]=s=>n.unref(t).$reset())},{default:n.withCtx(()=>o[1]||(o[1]=[n.createTextVNode(" Reset ")])),_:1}))}}),Or={class:"distinguish-header-error-message"},Dr=n.defineComponent({__name:"ErrorMessage",setup(e){const t=F();return(r,o)=>(n.openBlock(),n.createElementBlock("span",Or,n.toDisplayString(n.unref(t).getErrorMessage),1))}}),Vr={class:"distinguish-header-bar"},Ar={class:"distinguish-header-bar__buttons"},Ir=n.defineComponent({__name:"HeaderBar",setup(e){return(t,r)=>(n.openBlock(),n.createElementBlock("div",Vr,[n.createVNode(Dr),n.createVNode(wr,null,{default:n.withCtx(()=>[n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(yr)]),_:1}),n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(tr)]),_:1}),n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(rr)]),_:1}),n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(sr)]),_:1}),n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(lr)]),_:1}),n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(ir)]),_:1}),n.createVNode(P,null,{default:n.withCtx(()=>[n.createVNode(gr)]),_:1})]),_:1}),n.createElementVNode("div",Ar,[n.createVNode(Tr),n.createVNode(xr)])]))}}),$r={},Ur={class:"distinguish-panel"};function Lr(e,t){return n.openBlock(),n.createElementBlock("div",Ur,[n.renderSlot(e.$slots,"default")])}const Ce=ce($r,[["render",Lr]]),Fr=["innerHTML"],Pr=n.defineComponent({__name:"PanelEliminated",props:{render:{type:Function}},setup(e){const t=V(),r=n.computed(()=>t.getEliminated);return(o,s)=>(n.openBlock(),n.createBlock(Ce,{class:"distinguish-panel-eliminated"},{default:n.withCtx(()=>[n.createElementVNode("h2",null,"Eliminated ("+n.toDisplayString(r.value.length)+")",1),n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value,i=>(n.openBlock(),n.createElementBlock("li",{key:i.rowId,class:"distinguish-row-item"},[n.renderSlot(o.$slots,"default",{item:i},()=>[n.createElementVNode("span",{innerHTML:o.render?o.render(i):i.objectTag},null,8,Fr)])]))),128))])]),_:3}))}}),Mr={class:"distinguish-row-filter-buttons"},jr={class:"distinguish-list-checkboxes"},qr=["value"],Hr=n.defineComponent({__name:"FilterRow",setup(e){const t=V(),r=F(),o=B(),s=n.ref(!1),i=n.ref([]),a=n.computed(()=>{const u=o.getRowIds,d=i.value;return u.length!==d.length||!u.every(p=>d.includes(p))}),l=n.computed({get:()=>o.getRowIds,set:u=>{o.$patch({rowIds:u})}});return n.watch(s,u=>{r.setShouldUpdate(!u),!u&&a.value&&(o.rowFilter=!0,r.checkUpdate()),i.value=o.getRowIds}),(u,d)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createVNode(H,{color:"primary",size:"medium",onClick:d[0]||(d[0]=p=>s.value=!0)},{default:n.withCtx(()=>d[5]||(d[5]=[n.createTextVNode(" Select ")])),_:1}),s.value?(n.openBlock(),n.createBlock(Be,{key:0,onClose:d[4]||(d[4]=p=>s.value=!1)},{header:n.withCtx(()=>d[6]||(d[6]=[n.createElementVNode("h3",null,"Filter row",-1)])),body:n.withCtx(()=>[n.createElementVNode("div",null,[n.createElementVNode("div",Mr,[n.unref(t).getRemaining.length!==l.value.length||l.value.length==0?(n.openBlock(),n.createBlock(H,{key:0,color:"primary",size:"medium",onClick:d[1]||(d[1]=()=>l.value=n.unref(t).getRemaining.map(p=>p.rowId))},{default:n.withCtx(()=>d[7]||(d[7]=[n.createTextVNode(" Select all ")])),_:1})):(n.openBlock(),n.createBlock(H,{key:1,color:"primary",size:"medium",onClick:d[2]||(d[2]=()=>l.value=[])},{default:n.withCtx(()=>d[8]||(d[8]=[n.createTextVNode(" Unselect all ")])),_:1}))]),n.createElementVNode("ul",jr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(n.unref(t).getRemaining,p=>(n.openBlock(),n.createElementBlock("li",{key:p.rowId},[n.createElementVNode("label",null,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":d[3]||(d[3]=f=>l.value=f),value:p.rowId,type:"checkbox"},null,8,qr),[[n.vModelCheckbox,l.value]]),n.createTextVNode(" "+n.toDisplayString(p.objectLabel),1)])]))),128))])])]),_:1})):n.createCommentVNode("",!0)],64))}}),zr={class:"distinguish-title-section"},Kr=["innerHTML"],Jr=n.defineComponent({__name:"PanelRemaining",props:{render:{type:Function}},setup(e){const t=V(),r=n.computed(()=>t.getRemaining);return(o,s)=>(n.openBlock(),n.createBlock(Ce,{class:"distinguish-panel-remaining"},{default:n.withCtx(()=>[n.createElementVNode("div",zr,[n.createElementVNode("h2",null,"Remaining ("+n.toDisplayString(r.value.length)+")",1),n.createVNode(Hr)]),n.createElementVNode("ul",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(r.value,i=>(n.openBlock(),n.createElementBlock("li",{key:i.rowId,class:"distinguish-row-item"},[n.renderSlot(o.$slots,"default",{item:i},()=>[n.createElementVNode("span",{innerHTML:o.render?o.render(i):i.objectTag},null,8,Kr)])]))),128))])]),_:3}))}});class Wr{static find(t){return ct().get(`/depictions/${t}.json`,{params:{extend:["image"]}})}}const Xr={key:0,class:"distinguish-depiction-box"},Qr=["src"],mt=n.defineComponent({__name:"VDepiction",props:{depictionId:{}},setup(e){const t=e,r=n.ref();return Wr.find(t.depictionId).then(({data:o})=>{r.value=Jn(o)}),(o,s)=>r.value?(n.openBlock(),n.createElementBlock("div",Xr,[n.createElementVNode("img",{src:r.value.imageUrl},null,8,Qr)])):n.createCommentVNode("",!0)}}),Gr={class:"distinguish-character-descriptor__cell"},Yr=["value"],Zr=n.defineComponent({__name:"CharacterStateCell",props:{characterState:{},descriptorId:{}},setup(e){const t=e,r=B(),o=n.computed({get:()=>r.getDescriptorValueById(t.descriptorId)||[],set:s=>{s.length?r.setDescriptor({descriptorId:t.descriptorId,value:s}):r.removeDescriptor(t.descriptorId)}});return(s,i)=>(n.openBlock(),n.createElementBlock("div",Gr,[n.createElementVNode("label",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(s.characterState.depictionIds,a=>(n.openBlock(),n.createBlock(mt,{key:a,"depiction-id":a},null,8,["depiction-id"]))),128)),n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":i[0]||(i[0]=a=>o.value=a),value:s.characterState.characterStateId,type:"checkbox"},null,8,Yr),[[n.vModelCheckbox,o.value]]),n.createTextVNode(" "+n.toDisplayString(s.characterState.name),1)])]))}}),vr={class:"distinguish-character-states-grid"},eo=n.defineComponent({__name:"CharacterStateGrid",props:{descriptor:{}},setup(e){const t=e,r=B(),o=F(),s=n.ref(),i=n.computed(()=>{const a=r.getDescriptorValueById(t.descriptor.descriptorId)||[],l=s.value||[];return a.length!==l.length||!a.every(u=>l.includes(u))});return n.onMounted(()=>{o.setShouldUpdate(!1),s.value=r.getDescriptorValueById(t.descriptor.descriptorId)}),n.onUnmounted(()=>{o.setShouldUpdate(!0),i.value&&o.checkUpdate()}),(a,l)=>(n.openBlock(),n.createElementBlock("div",vr,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(a.descriptor.characterStates,u=>(n.openBlock(),n.createBlock(Zr,{key:u.characterStateId,"descriptor-id":a.descriptor.descriptorId,"character-state":u},null,8,["descriptor-id","character-state"]))),128))]))}}),to={key:0},no={key:1},ro={class:"descriptor-modal__depiction"},oo=n.defineComponent({__name:"DescriptorModal",props:{descriptor:{}},setup(e){return(t,r)=>(n.openBlock(),n.createBlock(Be,{"container-class":"distinguish-descriptor-modal"},{header:n.withCtx(()=>[n.createElementVNode("h3",null,n.toDisplayString(t.descriptor.name),1),t.descriptor.description?(n.openBlock(),n.createElementBlock("span",to,n.toDisplayString(t.descriptor.description),1)):(n.openBlock(),n.createElementBlock("i",no," No further description available. "))]),body:n.withCtx(()=>[n.createElementVNode("div",ro,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(t.descriptor.depictionIds,o=>(n.openBlock(),n.createBlock(mt,{key:o,"depiction-id":o},null,8,["depiction-id"]))),128))]),r[0]||(r[0]=n.createElementVNode("hr",null,null,-1)),t.descriptor.type===n.unref(Q).Qualitative?(n.openBlock(),n.createBlock(eo,{key:0,descriptor:t.descriptor},null,8,["descriptor"])):n.createCommentVNode("",!0)]),_:1}))}}),so=["id"],io={class:"distinguish-input-label"},de=n.defineComponent({__name:"DescriptorContainer",props:{descriptor:{}},setup(e){const t=n.ref(!1);return(r,o)=>(n.openBlock(),n.createElementBlock("div",{id:`descriptor-${r.descriptor.descriptorId}`,class:"distinguish-descriptor-container"},[n.createElementVNode("div",io,[n.createElementVNode("span",{class:"distinguish-link",onClick:o[0]||(o[0]=s=>t.value=!0)},[n.renderSlot(r.$slots,"title",{},()=>[n.createTextVNode(n.toDisplayString(r.descriptor.name),1)])])]),n.renderSlot(r.$slots,"default"),t.value?(n.openBlock(),n.createBlock(oo,{key:0,descriptor:r.descriptor,onClose:o[1]||(o[1]=s=>t.value=!1)},null,8,["descriptor"])):n.createCommentVNode("",!0)],8,so))}}),ao=n.defineComponent({__name:"DescriptorContinuous",props:{descriptor:{}},setup(e){const t=e,r=B(),o=n.ref(String(r.getDescriptorValueById(t.descriptor.descriptorId))),s=()=>{const{descriptorId:i}=t.descriptor,a=o.value.trim();a?r.setDescriptor({descriptorId:i,value:a}):r.removeDescriptor(i)};return(i,a)=>(n.openBlock(),n.createBlock(de,{class:"distinguish-descriptor-continuous",descriptor:i.descriptor},{title:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.descriptor.name)+" ("+n.toDisplayString(i.descriptor.min)+"-"+n.toDisplayString(i.descriptor.max)+" "+n.toDisplayString(i.descriptor.defaultUnit)+") ",1)]),default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>o.value=l),type:"text",onBlur:s,onKeyup:n.withKeys(s,["enter"])},null,544),[[n.vModelText,o.value]])]),_:1},8,["descriptor"]))}}),lo=["value"],co={key:0},po=n.defineComponent({__name:"DescriptorPresenceAbsence",props:{descriptor:{}},setup(e){const t={Presence:!0,Absent:!1},r=e,o=B(),s=n.computed({get:()=>o.getDescriptorValueById(r.descriptor.descriptorId),set:a=>{const{descriptorId:l}=r.descriptor;typeof a=="boolean"?o.setDescriptor({descriptorId:l,value:!!a}):o.removeDescriptor(l)}}),i=a=>{var u;const{states:l}=r.descriptor;return((u=l.find(d=>d.name===String(a)))==null?void 0:u.numberOfObjects)||0};return(a,l)=>(n.openBlock(),n.createBlock(de,{class:"distinguish-descriptor-presence-absence",descriptor:a.descriptor},{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("select",{"onUpdate:modelValue":l[0]||(l[0]=u=>s.value=u)},[l[1]||(l[1]=n.createElementVNode("option",null,null,-1)),(n.openBlock(),n.createElementBlock(n.Fragment,null,n.renderList(t,(u,d)=>n.createElementVNode("option",{key:d,value:u},[a.descriptor.status===n.unref(X).Useless?(n.openBlock(),n.createElementBlock("span",co,"-")):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(d)+" ("+n.toDisplayString(i(u))+") ",1)],8,lo)),64))],512),[[n.vModelSelect,s.value]])]),_:1},8,["descriptor"]))}}),uo=["value","selected"],fo={key:0},mo={key:1},ho=n.defineComponent({__name:"DescriptorQualitative",props:{descriptor:{}},setup(e){const t=e,r=B(),o=i=>{const a=i.target,{descriptorId:l}=t.descriptor;a.value?r.setDescriptor({descriptorId:l,value:[Number(a.value)]}):r.removeDescriptor(l)},s=i=>r.getDescriptorValueById(t.descriptor.descriptorId).includes(i.characterStateId);return(i,a)=>(n.openBlock(),n.createBlock(de,{class:"distinguish-descriptor-qualitative",descriptor:i.descriptor},{default:n.withCtx(()=>[n.createElementVNode("select",{name:"listbox",onChange:o},[a[0]||(a[0]=n.createElementVNode("option",{value:""},null,-1)),(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(i.descriptor.characterStates,l=>(n.openBlock(),n.createElementBlock("option",{key:l.characterStateId,value:l.characterStateId,selected:s(l)},[s(l)?(n.openBlock(),n.createElementBlock("span",fo,">")):n.createCommentVNode("",!0),l.status===n.unref(X).Useless?(n.openBlock(),n.createElementBlock("span",mo,"-")):n.createCommentVNode("",!0),n.createTextVNode(" "+n.toDisplayString(l.name)+" ("+n.toDisplayString(l.numberOfObjects)+") ",1)],8,uo))),128))],32)]),_:1},8,["descriptor"]))}}),go=n.defineComponent({__name:"DescriptorSample",props:{descriptor:{}},setup(e){const t=e,r=B(),o=n.ref(String(r.getDescriptorValueById(t.descriptor.descriptorId))),s=()=>{const{descriptorId:i}=t.descriptor,a=o.value.trim();a?r.setDescriptor({descriptorId:i,value:a}):r.removeDescriptor(i)};return(i,a)=>(n.openBlock(),n.createBlock(de,{class:"distinguish-descriptor-sample",descriptor:i.descriptor},{title:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(i.descriptor.name)+" ("+n.toDisplayString(i.descriptor.min)+"-"+n.toDisplayString(i.descriptor.max)+" "+n.toDisplayString(i.descriptor.defaultUnit)+") ",1)]),default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":a[0]||(a[0]=l=>o.value=l),type:"text",onBlur:s,onKeyup:n.withKeys(s,["enter"])},null,544),[[n.vModelText,o.value]])]),_:1},8,["descriptor"]))}}),Ne=n.defineComponent({__name:"DescriptorsList",props:{title:{},descriptors:{}},setup(e){const t={DescriptorContinuous:ao,DescriptorPresenceAbsence:po,DescriptorQualitative:ho,DescriptorSample:go},r=o=>{const s=o.replace("::","");return t[s]};return(o,s)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[n.createElementVNode("h2",null,n.toDisplayString(o.title),1),n.createElementVNode("ol",null,[(n.openBlock(!0),n.createElementBlock(n.Fragment,null,n.renderList(o.descriptors,i=>(n.openBlock(),n.createElementBlock("li",{key:i.descriptorId},[(n.openBlock(),n.createBlock(n.resolveDynamicComponent(r(i.type)),{descriptor:i},null,8,["descriptor"]))]))),128))])],64))}}),yo={key:0},bo=n.defineComponent({__name:"FilterRowCheckbox",setup(e){const t=B(),r=n.computed({get:()=>t.getRowFilter,set:o=>t.$patch({rowFilter:o})});return(o,s)=>n.unref(t).rowIds.length?(n.openBlock(),n.createElementBlock("label",yo,[n.withDirectives(n.createElementVNode("input",{"onUpdate:modelValue":s[0]||(s[0]=i=>r.value=i),type:"checkbox"},null,512),[[n.vModelCheckbox,r.value]]),s[1]||(s[1]=n.createTextVNode(" Filter "))])):n.createCommentVNode("",!0)}}),_o=n.defineComponent({__name:"PanelDescriptors",setup(e){const t=V();return(r,o)=>(n.openBlock(),n.createBlock(Ce,{class:"distinguish-panel-descriptors"},{default:n.withCtx(()=>[n.createVNode(bo),n.unref(t).getDescriptorsUsed.length?(n.openBlock(),n.createBlock(Ne,{key:0,descriptors:n.unref(t).getDescriptorsUsed,title:"Used Descriptors"},null,8,["descriptors"])):n.createCommentVNode("",!0),n.unref(t).getDescriptorsUseful.length?(n.openBlock(),n.createBlock(Ne,{key:1,descriptors:n.unref(t).getDescriptorsUseful,title:"Descriptors Useful for Identification"},null,8,["descriptors"])):n.createCommentVNode("",!0),n.unref(t).getDescriptorsUseless.length?(n.openBlock(),n.createBlock(Ne,{key:2,descriptors:n.unref(t).getDescriptorsUseless,title:"Descriptors no longer relevant for identification"},null,8,["descriptors"])):n.createCommentVNode("",!0)]),_:1}))}}),ko={class:"distinguish-spinner-container"},wo={class:"distinguish-spinner-legend"},Eo=["innerHTML"],So=n.defineComponent({__name:"VSpinner",props:{legend:{type:String,default:"Loading, please wait."}},setup(e){return(t,r)=>(n.openBlock(),n.createBlock(n.Transition,{name:"fade"},{default:n.withCtx(()=>[n.createElementVNode("div",ko,[n.createElementVNode("div",null,[r[0]||(r[0]=n.createElementVNode("div",{class:"distinguish-spinner"},null,-1)),n.createElementVNode("div",wo,[n.createElementVNode("span",{innerHTML:e.legend},null,8,Eo),n.renderSlot(t.$slots,"default")])])])]),_:3}))}}),Bo={class:"distinguish-title"},Co={key:0},No=n.defineComponent({__name:"TitleMatrix",setup(e){const t=V();return(r,o)=>(n.openBlock(),n.createElementBlock("h1",Bo,[o[0]||(o[0]=n.createTextVNode(" Interactive key ")),n.unref(t).getObservationMatrix?(n.openBlock(),n.createElementBlock("span",Co,"| "+n.toDisplayString(n.unref(t).getObservationMatrix.name),1)):n.createCommentVNode("",!0)]))}}),Ro=["title"],xo=n.defineComponent({__name:"TitleMatrixCitation",setup(e){const t=V(),r=n.computed(()=>{const o=t.getCitation;return Object.values(o||{}).filter(Boolean).join(", ")});return(o,s)=>(n.openBlock(),n.createElementBlock("span",{class:"distinguish-title-citation",title:r.value},n.toDisplayString(r.value),9,Ro))}}),To={class:"distinguish-title-section"},Oo=n.defineComponent({__name:"TitleKey",setup(e){return(t,r)=>(n.openBlock(),n.createElementBlock("div",To,[n.createVNode(No),n.createVNode(xo)]))}}),Do={class:"distinguish-app-container"},ht=n.defineComponent({name:"Distinguish",__name:"App",props:{observationMatrixId:{},apiConfig:{},renderItem:{type:Function}},setup(e){const t=e,r=F(),o=B(),s=n.computed(()=>r.getIsLoading),i=n.computed(()=>r.getLayout);return(()=>{r.setAPIConfig(t.apiConfig),r.setObservationMatrixId(t.observationMatrixId),r.checkUpdate()})(),o.$subscribe(l=>{r.shouldUpdate&&r.checkUpdate()}),(l,u)=>(n.openBlock(),n.createElementBlock("div",Do,[n.createVNode(Oo),n.createVNode(Ir),n.createVNode(ft,{class:n.normalizeClass(i.value)},{default:n.withCtx(()=>[n.createVNode(_o),n.createVNode(Jr,{render:t.renderItem},{default:n.withCtx(d=>[n.renderSlot(l.$slots,"remaining-item",n.normalizeProps(n.guardReactiveProps(d)))]),_:3},8,["render"]),n.createVNode(Pr,{render:t.renderItem},{default:n.withCtx(d=>[n.renderSlot(l.$slots,"eliminated-item",n.normalizeProps(n.guardReactiveProps(d)))]),_:3},8,["render"])]),_:3},8,["class"]),s.value?(n.openBlock(),n.createBlock(So,{key:0,legend:"Loading interactive key..."})):n.createCommentVNode("",!0)]))}});function gt(e){const t=e||'[data-interactive-key="true"]';return[...document.querySelectorAll(t)].map(s=>yt(s,Ao(s)))}function Vo(){gt()}function Ao(e){return{observationMatrixId:Number(e.getAttribute("data-observation-matrix-id")),apiConfig:{baseURL:e.getAttribute("data-base-url")||"",projectToken:e.getAttribute("data-project-token")||void 0,projectId:Number(e.getAttribute("data-project-id"))||void 0,userToken:e.getAttribute("data-user-token")||void 0,csrfToken:e.getAttribute("data-csrf-token")||void 0}}}function yt(e,t){const{apiConfig:r,observationMatrixId:o}=t;if(!o)throw"Missing observation matrix ID";if(!r||!r.projectToken&&!r.csrfToken&&!(r.projectId&&r.userToken))throw"Missing API configuration";const s=n.createApp(ht,{observationMatrixId:o,apiConfig:r});return s.use(Y.createPinia()),s.mount(e),s}typeof window<"u"&&window.addEventListener("DOMContentLoaded",Vo),O.VueInteractiveKey=ht,O.createInteractiveKey=yt,O.discoverInteractiveKey=gt,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@sfgrp/distinguish",
|
|
3
3
|
"private": false,
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "0.4.
|
|
5
|
+
"version": "0.4.1",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist"
|
|
8
8
|
],
|
|
@@ -37,24 +37,24 @@
|
|
|
37
37
|
"coverage": "vitest run --coverage"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"axios": "^1.
|
|
41
|
-
"pinia": "^
|
|
42
|
-
"vue": "^3.5.
|
|
40
|
+
"axios": "^1.8.4",
|
|
41
|
+
"pinia": "^3.0.1",
|
|
42
|
+
"vue": "^3.5.13"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@pinia/testing": "^0.
|
|
46
|
-
"@testing-library/user-event": "^14.
|
|
45
|
+
"@pinia/testing": "^1.0.0",
|
|
46
|
+
"@testing-library/user-event": "^14.6.1",
|
|
47
47
|
"@testing-library/vue": "^8.1.0",
|
|
48
|
-
"@vitejs/plugin-vue": "^5.
|
|
49
|
-
"c8": "^10.1.
|
|
50
|
-
"eslint": "^9.
|
|
48
|
+
"@vitejs/plugin-vue": "^5.2.3",
|
|
49
|
+
"c8": "^10.1.3",
|
|
50
|
+
"eslint": "^9.23.0",
|
|
51
51
|
"eslint-plugin-vue": "^9.28.0",
|
|
52
|
-
"jsdom": "^
|
|
53
|
-
"msw": "^2.
|
|
54
|
-
"sass": "^1.
|
|
55
|
-
"typescript": "^5.
|
|
56
|
-
"vite": "^
|
|
57
|
-
"vitest": "^
|
|
58
|
-
"vue-tsc": "^2.
|
|
52
|
+
"jsdom": "^26.0.0",
|
|
53
|
+
"msw": "^2.7.3",
|
|
54
|
+
"sass": "^1.86.0",
|
|
55
|
+
"typescript": "^5.8.2",
|
|
56
|
+
"vite": "^6.2.3",
|
|
57
|
+
"vitest": "^3.0.9",
|
|
58
|
+
"vue-tsc": "^2.2.8"
|
|
59
59
|
}
|
|
60
60
|
}
|
|
File without changes
|