From 995ee729bb92b23fc5ff19693674663a06da2daa Mon Sep 17 00:00:00 2001 From: Artem Stepanenko Date: Fri, 13 May 2022 14:02:24 +0300 Subject: [PATCH] WIP --- dist/js/field.js | 2 +- resources/js/components/DetailField.vue | 7 +++++-- resources/js/components/FormField.vue | 4 ++-- src/NovaImageTags.php | 23 ++++++++++++++++++----- 4 files changed, 26 insertions(+), 10 deletions(-) diff --git a/dist/js/field.js b/dist/js/field.js index 1bef05a..9fd02c0 100644 --- a/dist/js/field.js +++ b/dist/js/field.js @@ -1,2 +1,2 @@ /*! For license information please see field.js.LICENSE.txt */ -(()=>{var t,e={9669:(t,e,r)=>{t.exports=r(1609)},5448:(t,e,r)=>{"use strict";var n=r(4867),o=r(6026),i=r(4372),a=r(5327),s=r(4097),u=r(4109),c=r(7985),f=r(7874),l=r(2648),p=r(644),h=r(205);t.exports=function(t){return new Promise((function(e,r){var d,y=t.data,v=t.headers,g=t.responseType;function m(){t.cancelToken&&t.cancelToken.unsubscribe(d),t.signal&&t.signal.removeEventListener("abort",d)}n.isFormData(y)&&n.isStandardBrowserEnv()&&delete v["Content-Type"];var b=new XMLHttpRequest;if(t.auth){var w=t.auth.username||"",E=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";v.Authorization="Basic "+btoa(w+":"+E)}var O=s(t.baseURL,t.url);function _(){if(b){var n="getAllResponseHeaders"in b?u(b.getAllResponseHeaders()):null,i={data:g&&"text"!==g&&"json"!==g?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:n,config:t,request:b};o((function(t){e(t),m()}),(function(t){r(t),m()}),i),b=null}}if(b.open(t.method.toUpperCase(),a(O,t.params,t.paramsSerializer),!0),b.timeout=t.timeout,"onloadend"in b?b.onloadend=_:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf("file:"))&&setTimeout(_)},b.onabort=function(){b&&(r(new l("Request aborted",l.ECONNABORTED,t,b)),b=null)},b.onerror=function(){r(new l("Network Error",l.ERR_NETWORK,t,b,b)),b=null},b.ontimeout=function(){var e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded",n=t.transitional||f;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new l(e,n.clarifyTimeoutError?l.ETIMEDOUT:l.ECONNABORTED,t,b)),b=null},n.isStandardBrowserEnv()){var x=(t.withCredentials||c(O))&&t.xsrfCookieName?i.read(t.xsrfCookieName):void 0;x&&(v[t.xsrfHeaderName]=x)}"setRequestHeader"in b&&n.forEach(v,(function(t,e){void 0===y&&"content-type"===e.toLowerCase()?delete v[e]:b.setRequestHeader(e,t)})),n.isUndefined(t.withCredentials)||(b.withCredentials=!!t.withCredentials),g&&"json"!==g&&(b.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&b.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&b.upload&&b.upload.addEventListener("progress",t.onUploadProgress),(t.cancelToken||t.signal)&&(d=function(t){b&&(r(!t||t&&t.type?new p:t),b.abort(),b=null)},t.cancelToken&&t.cancelToken.subscribe(d),t.signal&&(t.signal.aborted?d():t.signal.addEventListener("abort",d))),y||(y=null);var S=h(O);S&&-1===["http","https","file"].indexOf(S)?r(new l("Unsupported protocol "+S+":",l.ERR_BAD_REQUEST,t)):b.send(y)}))}},1609:(t,e,r)=>{"use strict";var n=r(4867),o=r(1849),i=r(321),a=r(7185);var s=function t(e){var r=new i(e),s=o(i.prototype.request,r);return n.extend(s,i.prototype,r),n.extend(s,r),s.create=function(r){return t(a(e,r))},s}(r(5546));s.Axios=i,s.CanceledError=r(644),s.CancelToken=r(4972),s.isCancel=r(6502),s.VERSION=r(7288).version,s.toFormData=r(7675),s.AxiosError=r(2648),s.Cancel=s.CanceledError,s.all=function(t){return Promise.all(t)},s.spread=r(8713),s.isAxiosError=r(6268),t.exports=s,t.exports.default=s},4972:(t,e,r)=>{"use strict";var n=r(644);function o(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var e;this.promise=new Promise((function(t){e=t}));var r=this;this.promise.then((function(t){if(r._listeners){var e,n=r._listeners.length;for(e=0;e{"use strict";var n=r(2648);function o(t){n.call(this,null==t?"canceled":t,n.ERR_CANCELED),this.name="CanceledError"}r(4867).inherits(o,n,{__CANCEL__:!0}),t.exports=o},6502:t=>{"use strict";t.exports=function(t){return!(!t||!t.__CANCEL__)}},321:(t,e,r)=>{"use strict";var n=r(4867),o=r(5327),i=r(782),a=r(3572),s=r(7185),u=r(4097),c=r(4875),f=c.validators;function l(t){this.defaults=t,this.interceptors={request:new i,response:new i}}l.prototype.request=function(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var r=e.transitional;void 0!==r&&c.assertOptions(r,{silentJSONParsing:f.transitional(f.boolean),forcedJSONParsing:f.transitional(f.boolean),clarifyTimeoutError:f.transitional(f.boolean)},!1);var n=[],o=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(o=o&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,u=[];if(this.interceptors.response.forEach((function(t){u.push(t.fulfilled,t.rejected)})),!o){var l=[a,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(u),i=Promise.resolve(e);l.length;)i=i.then(l.shift(),l.shift());return i}for(var p=e;n.length;){var h=n.shift(),d=n.shift();try{p=h(p)}catch(t){d(t);break}}try{i=a(p)}catch(t){return Promise.reject(t)}for(;u.length;)i=i.then(u.shift(),u.shift());return i},l.prototype.getUri=function(t){t=s(this.defaults,t);var e=u(t.baseURL,t.url);return o(e,t.params,t.paramsSerializer)},n.forEach(["delete","get","head","options"],(function(t){l.prototype[t]=function(e,r){return this.request(s(r||{},{method:t,url:e,data:(r||{}).data}))}})),n.forEach(["post","put","patch"],(function(t){function e(e){return function(r,n,o){return this.request(s(o||{},{method:t,headers:e?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}l.prototype[t]=e(),l.prototype[t+"Form"]=e(!0)})),t.exports=l},2648:(t,e,r)=>{"use strict";var n=r(4867);function o(t,e,r,n,o){Error.call(this),this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o)}n.inherits(o,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:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var i=o.prototype,a={};["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"].forEach((function(t){a[t]={value:t}})),Object.defineProperties(o,a),Object.defineProperty(i,"isAxiosError",{value:!0}),o.from=function(t,e,r,a,s,u){var c=Object.create(i);return n.toFlatObject(t,c,(function(t){return t!==Error.prototype})),o.call(c,t.message,e,r,a,s),c.name=t.name,u&&Object.assign(c,u),c},t.exports=o},782:(t,e,r)=>{"use strict";var n=r(4867);function o(){this.handlers=[]}o.prototype.use=function(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(t){this.handlers[t]&&(this.handlers[t]=null)},o.prototype.forEach=function(t){n.forEach(this.handlers,(function(e){null!==e&&t(e)}))},t.exports=o},4097:(t,e,r)=>{"use strict";var n=r(1793),o=r(7303);t.exports=function(t,e){return t&&!n(e)?o(t,e):e}},3572:(t,e,r)=>{"use strict";var n=r(4867),o=r(8527),i=r(6502),a=r(5546),s=r(644);function u(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new s}t.exports=function(t){return u(t),t.headers=t.headers||{},t.data=o.call(t,t.data,t.headers,t.transformRequest),t.headers=n.merge(t.headers.common||{},t.headers[t.method]||{},t.headers),n.forEach(["delete","get","head","post","put","patch","common"],(function(e){delete t.headers[e]})),(t.adapter||a.adapter)(t).then((function(e){return u(t),e.data=o.call(t,e.data,e.headers,t.transformResponse),e}),(function(e){return i(e)||(u(t),e&&e.response&&(e.response.data=o.call(t,e.response.data,e.response.headers,t.transformResponse))),Promise.reject(e)}))}},7185:(t,e,r)=>{"use strict";var n=r(4867);t.exports=function(t,e){e=e||{};var r={};function o(t,e){return n.isPlainObject(t)&&n.isPlainObject(e)?n.merge(t,e):n.isPlainObject(e)?n.merge({},e):n.isArray(e)?e.slice():e}function i(r){return n.isUndefined(e[r])?n.isUndefined(t[r])?void 0:o(void 0,t[r]):o(t[r],e[r])}function a(t){if(!n.isUndefined(e[t]))return o(void 0,e[t])}function s(r){return n.isUndefined(e[r])?n.isUndefined(t[r])?void 0:o(void 0,t[r]):o(void 0,e[r])}function u(r){return r in e?o(t[r],e[r]):r in t?o(void 0,t[r]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:u};return n.forEach(Object.keys(t).concat(Object.keys(e)),(function(t){var e=c[t]||i,o=e(t);n.isUndefined(o)&&e!==u||(r[t]=o)})),r}},6026:(t,e,r)=>{"use strict";var n=r(2648);t.exports=function(t,e,r){var o=r.config.validateStatus;r.status&&o&&!o(r.status)?e(new n("Request failed with status code "+r.status,[n.ERR_BAD_REQUEST,n.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}},8527:(t,e,r)=>{"use strict";var n=r(4867),o=r(5546);t.exports=function(t,e,r){var i=this||o;return n.forEach(r,(function(r){t=r.call(i,t,e)})),t}},5546:(t,e,r)=>{"use strict";var n=r(4155),o=r(4867),i=r(6016),a=r(2648),s=r(7874),u=r(7675),c={"Content-Type":"application/x-www-form-urlencoded"};function f(t,e){!o.isUndefined(t)&&o.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var l,p={transitional:s,adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==n&&"[object process]"===Object.prototype.toString.call(n))&&(l=r(5448)),l),transformRequest:[function(t,e){if(i(e,"Accept"),i(e,"Content-Type"),o.isFormData(t)||o.isArrayBuffer(t)||o.isBuffer(t)||o.isStream(t)||o.isFile(t)||o.isBlob(t))return t;if(o.isArrayBufferView(t))return t.buffer;if(o.isURLSearchParams(t))return f(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString();var r,n=o.isObject(t),a=e&&e["Content-Type"];if((r=o.isFileList(t))||n&&"multipart/form-data"===a){var s=this.env&&this.env.FormData;return u(r?{"files[]":t}:t,s&&new s)}return n||"application/json"===a?(f(e,"application/json"),function(t,e,r){if(o.isString(t))try{return(e||JSON.parse)(t),o.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){var e=this.transitional||p.transitional,r=e&&e.silentJSONParsing,n=e&&e.forcedJSONParsing,i=!r&&"json"===this.responseType;if(i||n&&o.isString(t)&&t.length)try{return JSON.parse(t)}catch(t){if(i){if("SyntaxError"===t.name)throw a.from(t,a.ERR_BAD_RESPONSE,this,null,this.response);throw t}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:r(1623)},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};o.forEach(["delete","get","head"],(function(t){p.headers[t]={}})),o.forEach(["post","put","patch"],(function(t){p.headers[t]=o.merge(c)})),t.exports=p},7874:t=>{"use strict";t.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},7288:t=>{t.exports={version:"0.27.2"}},1849:t=>{"use strict";t.exports=function(t,e){return function(){for(var r=new Array(arguments.length),n=0;n{"use strict";var n=r(4867);function o(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,r){if(!e)return t;var i;if(r)i=r(e);else if(n.isURLSearchParams(e))i=e.toString();else{var a=[];n.forEach(e,(function(t,e){null!=t&&(n.isArray(t)?e+="[]":t=[t],n.forEach(t,(function(t){n.isDate(t)?t=t.toISOString():n.isObject(t)&&(t=JSON.stringify(t)),a.push(o(e)+"="+o(t))})))})),i=a.join("&")}if(i){var s=t.indexOf("#");-1!==s&&(t=t.slice(0,s)),t+=(-1===t.indexOf("?")?"?":"&")+i}return t}},7303:t=>{"use strict";t.exports=function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}},4372:(t,e,r)=>{"use strict";var n=r(4867);t.exports=n.isStandardBrowserEnv()?{write:function(t,e,r,o,i,a){var s=[];s.push(t+"="+encodeURIComponent(e)),n.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),n.isString(o)&&s.push("path="+o),n.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(t){var e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:t=>{"use strict";t.exports=function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}},6268:(t,e,r)=>{"use strict";var n=r(4867);t.exports=function(t){return n.isObject(t)&&!0===t.isAxiosError}},7985:(t,e,r)=>{"use strict";var n=r(4867);t.exports=n.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),r=document.createElement("a");function o(t){var n=t;return e&&(r.setAttribute("href",n),n=r.href),r.setAttribute("href",n),{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 t=o(window.location.href),function(e){var r=n.isString(e)?o(e):e;return r.protocol===t.protocol&&r.host===t.host}}():function(){return!0}},6016:(t,e,r)=>{"use strict";var n=r(4867);t.exports=function(t,e){n.forEach(t,(function(r,n){n!==e&&n.toUpperCase()===e.toUpperCase()&&(t[e]=r,delete t[n])}))}},1623:t=>{t.exports=null},4109:(t,e,r)=>{"use strict";var n=r(4867),o=["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"];t.exports=function(t){var e,r,i,a={};return t?(n.forEach(t.split("\n"),(function(t){if(i=t.indexOf(":"),e=n.trim(t.substr(0,i)).toLowerCase(),r=n.trim(t.substr(i+1)),e){if(a[e]&&o.indexOf(e)>=0)return;a[e]="set-cookie"===e?(a[e]?a[e]:[]).concat([r]):a[e]?a[e]+", "+r:r}})),a):a}},205:t=>{"use strict";t.exports=function(t){var e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}},8713:t=>{"use strict";t.exports=function(t){return function(e){return t.apply(null,e)}}},7675:(t,e,r)=>{"use strict";var n=r(8764).Buffer,o=r(4867);t.exports=function(t,e){e=e||new FormData;var r=[];function i(t){return null===t?"":o.isDate(t)?t.toISOString():o.isArrayBuffer(t)||o.isTypedArray(t)?"function"==typeof Blob?new Blob([t]):n.from(t):t}return function t(n,a){if(o.isPlainObject(n)||o.isArray(n)){if(-1!==r.indexOf(n))throw Error("Circular reference detected in "+a);r.push(n),o.forEach(n,(function(r,n){if(!o.isUndefined(r)){var s,u=a?a+"."+n:n;if(r&&!a&&"object"==typeof r)if(o.endsWith(n,"{}"))r=JSON.stringify(r);else if(o.endsWith(n,"[]")&&(s=o.toArray(r)))return void s.forEach((function(t){!o.isUndefined(t)&&e.append(u,i(t))}));t(r,u)}})),r.pop()}else e.append(a,i(n))}(t),e}},4875:(t,e,r)=>{"use strict";var n=r(7288).version,o=r(2648),i={};["object","boolean","number","function","string","symbol"].forEach((function(t,e){i[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));var a={};i.transitional=function(t,e,r){function i(t,e){return"[Axios v"+n+"] Transitional option '"+t+"'"+e+(r?". "+r:"")}return function(r,n,s){if(!1===t)throw new o(i(n," has been removed"+(e?" in "+e:"")),o.ERR_DEPRECATED);return e&&!a[n]&&(a[n]=!0,console.warn(i(n," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,n,s)}},t.exports={assertOptions:function(t,e,r){if("object"!=typeof t)throw new o("options must be an object",o.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(t),i=n.length;i-- >0;){var a=n[i],s=e[a];if(s){var u=t[a],c=void 0===u||s(u,a,t);if(!0!==c)throw new o("option "+a+" must be "+c,o.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new o("Unknown option "+a,o.ERR_BAD_OPTION)}},validators:i}},4867:(t,e,r)=>{"use strict";var n,o=r(1849),i=Object.prototype.toString,a=(n=Object.create(null),function(t){var e=i.call(t);return n[e]||(n[e]=e.slice(8,-1).toLowerCase())});function s(t){return t=t.toLowerCase(),function(e){return a(e)===t}}function u(t){return Array.isArray(t)}function c(t){return void 0===t}var f=s("ArrayBuffer");function l(t){return null!==t&&"object"==typeof t}function p(t){if("object"!==a(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}var h=s("Date"),d=s("File"),y=s("Blob"),v=s("FileList");function g(t){return"[object Function]"===i.call(t)}var m=s("URLSearchParams");function b(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),u(t))for(var r=0,n=t.length;r0;)a[i=n[o]]||(e[i]=t[i],a[i]=!0);t=Object.getPrototypeOf(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:a,kindOfTest:s,endsWith:function(t,e,r){t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;var n=t.indexOf(e,r);return-1!==n&&n===r},toArray:function(t){if(!t)return null;var e=t.length;if(c(e))return null;for(var r=new Array(e);e-- >0;)r[e]=t[e];return r},isTypedArray:E,isFileList:v}},874:(t,e,r)=>{"use strict";const n=Vue;const o={props:["resourceName","field"]};var i=r(3744);const a=(0,i.Z)(o,[["render",function(t,e,r,o,i,a){return(0,n.openBlock)(),(0,n.createElementBlock)("span",null,(0,n.toDisplayString)(r.field.value.length),1)}]]);var s={class:"relative block"},u=["src"],c=["data-tooltip"];const f={props:["index","resource","resourceName","resourceId","field"]},l=(0,i.Z)(f,[["render",function(t,e,r,o,i,a){var f=(0,n.resolveComponent)("PanelItem");return(0,n.openBlock)(),(0,n.createBlock)(f,{index:r.index,field:r.field},{value:(0,n.withCtx)((function(){return[(0,n.createElementVNode)("div",s,[(0,n.createElementVNode)("img",{class:"rounded-lg block w-full",ref:"picture",src:r.resource.fields.filter((function(t){return t.attribute===r.field.imageAttribute}))[0].value},null,8,u),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(r.field.rows,(function(e,r){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{class:"picture-tag tooltip","data-tooltip":t.__("Index")+": "+(r+1),style:(0,n.normalizeStyle)({top:e.fields.filter((function(t){return"y"===t.attribute.toLowerCase()}))[0].value+"%",left:e.fields.filter((function(t){return"x"===t.attribute.toLowerCase()}))[0].value+"%"})},null,12,c)})),256))])]})),_:1},8,["index","field"])}]]);var p={key:0,class:"text-md text-red-500 font-medium"},h={key:1,class:"relative block"},d=["src"],y=["data-tooltip","onClick"],v={class:"absolute py-2 px-1 flex flex-col mr-3 border border-gray-200 dark:border-gray-900 dark:bg-gray-900 rounded-lg",style:{right:"100%"}},g={class:"mb-2 text-center"};var m=r(8062),b=r(9584),w=r.n(b),E={preventInitialLoading:{type:Boolean,default:!1},showHelpText:{type:Boolean,default:!1},shownViaNewRelationModal:{type:Boolean,default:!1},resourceId:{type:[Number,String]},resourceName:{type:String},relatedResourceId:{type:[Number,String]},relatedResourceName:{type:String},field:{type:Object,required:!0},viaResource:{type:String,required:!1},viaResourceId:{type:[String,Number],required:!1},viaRelationship:{type:String,required:!1},relationshipType:{type:String,default:""},shouldOverrideMeta:{type:Boolean,default:!1},disablePagination:{type:Boolean,default:!1}};function O(t){return w()(E,t)}function _(){return"undefined"!=typeof navigator&&"undefined"!=typeof window?window:void 0!==r.g?r.g:{}}const x="function"==typeof Proxy;let S,A;function j(){return void 0!==S||("undefined"!=typeof window&&window.performance?(S=!0,A=window.performance):void 0!==r.g&&(null===(t=r.g.perf_hooks)||void 0===t?void 0:t.performance)?(S=!0,A=r.g.perf_hooks.performance):S=!1),S?A.now():Date.now();var t}class P{constructor(t,e){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=t,this.hook=e;const r={};if(t.settings)for(const e in t.settings){const n=t.settings[e];r[e]=n.defaultValue}const n=`__vue-devtools-plugin-settings__${t.id}`;let o=Object.assign({},r);try{const t=localStorage.getItem(n),e=JSON.parse(t);Object.assign(o,e)}catch(t){}this.fallbacks={getSettings:()=>o,setSettings(t){try{localStorage.setItem(n,JSON.stringify(t))}catch(t){}o=t},now:()=>j()},e&&e.on("plugin:settings:set",((t,e)=>{t===this.plugin.id&&this.fallbacks.setSettings(e)})),this.proxiedOn=new Proxy({},{get:(t,e)=>this.target?this.target.on[e]:(...t)=>{this.onQueue.push({method:e,args:t})}}),this.proxiedTarget=new Proxy({},{get:(t,e)=>this.target?this.target[e]:"on"===e?this.proxiedOn:Object.keys(this.fallbacks).includes(e)?(...t)=>(this.targetQueue.push({method:e,args:t,resolve:()=>{}}),this.fallbacks[e](...t)):(...t)=>new Promise((r=>{this.targetQueue.push({method:e,args:t,resolve:r})}))})}async setRealTarget(t){this.target=t;for(const t of this.onQueue)this.target.on[t.method](...t.args);for(const t of this.targetQueue)t.resolve(await this.target[t.method](...t.args))}}function R(t,e){const r=t,n=_(),o=_().__VUE_DEVTOOLS_GLOBAL_HOOK__,i=x&&r.enableEarlyProxy;if(!o||!n.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__&&i){const t=i?new P(r,o):null;(n.__VUE_DEVTOOLS_PLUGINS__=n.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:r,setupFn:e,proxy:t}),t&&e(t.proxiedTarget)}else o.emit("devtools-plugin:setup",t,e)}var T="store";function k(t,e){Object.keys(t).forEach((function(r){return e(t[r],r)}))}function C(t){return null!==t&&"object"==typeof t}function N(t,e,r){return e.indexOf(t)<0&&(r&&r.prepend?e.unshift(t):e.push(t)),function(){var r=e.indexOf(t);r>-1&&e.splice(r,1)}}function B(t,e){t._actions=Object.create(null),t._mutations=Object.create(null),t._wrappedGetters=Object.create(null),t._modulesNamespaceMap=Object.create(null);var r=t.state;U(t,r,[],t._modules.root,!0),L(t,r,e)}function L(t,e,r){var o=t._state;t.getters={},t._makeLocalGettersCache=Object.create(null);var i=t._wrappedGetters,a={};k(i,(function(e,r){a[r]=function(t,e){return function(){return t(e)}}(e,t),Object.defineProperty(t.getters,r,{get:function(){return a[r]()},enumerable:!0})})),t._state=(0,n.reactive)({data:e}),t.strict&&function(t){(0,n.watch)((function(){return t._state.data}),(function(){0}),{deep:!0,flush:"sync"})}(t),o&&r&&t._withCommit((function(){o.data=null}))}function U(t,e,r,n,o){var i=!r.length,a=t._modules.getNamespace(r);if(n.namespaced&&(t._modulesNamespaceMap[a],t._modulesNamespaceMap[a]=n),!i&&!o){var s=F(e,r.slice(0,-1)),u=r[r.length-1];t._withCommit((function(){s[u]=n.state}))}var c=n.context=function(t,e,r){var n=""===e,o={dispatch:n?t.dispatch:function(r,n,o){var i=D(r,n,o),a=i.payload,s=i.options,u=i.type;return s&&s.root||(u=e+u),t.dispatch(u,a)},commit:n?t.commit:function(r,n,o){var i=D(r,n,o),a=i.payload,s=i.options,u=i.type;s&&s.root||(u=e+u),t.commit(u,a,s)}};return Object.defineProperties(o,{getters:{get:n?function(){return t.getters}:function(){return I(t,e)}},state:{get:function(){return F(t.state,r)}}}),o}(t,a,r);n.forEachMutation((function(e,r){!function(t,e,r,n){(t._mutations[e]||(t._mutations[e]=[])).push((function(e){r.call(t,n.state,e)}))}(t,a+r,e,c)})),n.forEachAction((function(e,r){var n=e.root?r:a+r,o=e.handler||e;!function(t,e,r,n){(t._actions[e]||(t._actions[e]=[])).push((function(e){var o,i=r.call(t,{dispatch:n.dispatch,commit:n.commit,getters:n.getters,state:n.state,rootGetters:t.getters,rootState:t.state},e);return(o=i)&&"function"==typeof o.then||(i=Promise.resolve(i)),t._devtoolHook?i.catch((function(e){throw t._devtoolHook.emit("vuex:error",e),e})):i}))}(t,n,o,c)})),n.forEachGetter((function(e,r){!function(t,e,r,n){if(t._wrappedGetters[e])return void 0;t._wrappedGetters[e]=function(t){return r(n.state,n.getters,t.state,t.getters)}}(t,a+r,e,c)})),n.forEachChild((function(n,i){U(t,e,r.concat(i),n,o)}))}function I(t,e){if(!t._makeLocalGettersCache[e]){var r={},n=e.length;Object.keys(t.getters).forEach((function(o){if(o.slice(0,n)===e){var i=o.slice(n);Object.defineProperty(r,i,{get:function(){return t.getters[o]},enumerable:!0})}})),t._makeLocalGettersCache[e]=r}return t._makeLocalGettersCache[e]}function F(t,e){return e.reduce((function(t,e){return t[e]}),t)}function D(t,e,r){return C(t)&&t.type&&(r=e,e=t,t=t.type),{type:t,payload:e,options:r}}var M="vuex:mutations",V="vuex:actions",q="vuex",Y=0;function z(t,e){R({id:"org.vuejs.vuex",app:t,label:"Vuex",homepage:"https://next.vuex.vuejs.org/",logo:"https://vuejs.org/images/icons/favicon-96x96.png",packageName:"vuex",componentStateTypes:["vuex bindings"]},(function(r){r.addTimelineLayer({id:M,label:"Vuex Mutations",color:$}),r.addTimelineLayer({id:V,label:"Vuex Actions",color:$}),r.addInspector({id:q,label:"Vuex",icon:"storage",treeFilterPlaceholder:"Filter stores..."}),r.on.getInspectorTree((function(r){if(r.app===t&&r.inspectorId===q)if(r.filter){var n=[];J(n,e._modules.root,r.filter,""),r.rootNodes=n}else r.rootNodes=[G(e._modules.root,"")]})),r.on.getInspectorState((function(r){if(r.app===t&&r.inspectorId===q){var n=r.nodeId;I(e,n),r.state=function(t,e,r){e="root"===r?e:e[r];var n=Object.keys(e),o={state:Object.keys(t.state).map((function(e){return{key:e,editable:!0,value:t.state[e]}}))};if(n.length){var i=function(t){var e={};return Object.keys(t).forEach((function(r){var n=r.split("/");if(n.length>1){var o=e,i=n.pop();n.forEach((function(t){o[t]||(o[t]={_custom:{value:{},display:t,tooltip:"Module",abstract:!0}}),o=o[t]._custom.value})),o[i]=X((function(){return t[r]}))}else e[r]=X((function(){return t[r]}))})),e}(e);o.getters=Object.keys(i).map((function(t){return{key:t.endsWith("/")?H(t):t,editable:!1,value:X((function(){return i[t]}))}}))}return o}((o=e._modules,(a=(i=n).split("/").filter((function(t){return t}))).reduce((function(t,e,r){var n=t[e];if(!n)throw new Error('Missing module "'+e+'" for path "'+i+'".');return r===a.length-1?n:n._children}),"root"===i?o:o.root._children)),"root"===n?e.getters:e._makeLocalGettersCache,n)}var o,i,a})),r.on.editInspectorState((function(r){if(r.app===t&&r.inspectorId===q){var n=r.nodeId,o=r.path;"root"!==n&&(o=n.split("/").filter(Boolean).concat(o)),e._withCommit((function(){r.set(e._state.data,o,r.state.value)}))}})),e.subscribe((function(t,e){var n={};t.payload&&(n.payload=t.payload),n.state=e,r.notifyComponentUpdate(),r.sendInspectorTree(q),r.sendInspectorState(q),r.addTimelineEvent({layerId:M,event:{time:Date.now(),title:t.type,data:n}})})),e.subscribeAction({before:function(t,e){var n={};t.payload&&(n.payload=t.payload),t._id=Y++,t._time=Date.now(),n.state=e,r.addTimelineEvent({layerId:V,event:{time:t._time,title:t.type,groupId:t._id,subtitle:"start",data:n}})},after:function(t,e){var n={},o=Date.now()-t._time;n.duration={_custom:{type:"duration",display:o+"ms",tooltip:"Action duration",value:o}},t.payload&&(n.payload=t.payload),n.state=e,r.addTimelineEvent({layerId:V,event:{time:Date.now(),title:t.type,groupId:t._id,subtitle:"end",data:n}})}})}))}var $=8702998,W={label:"namespaced",textColor:16777215,backgroundColor:6710886};function H(t){return t&&"root"!==t?t.split("/").slice(-2,-1)[0]:"Root"}function G(t,e){return{id:e||"root",label:H(e),tags:t.namespaced?[W]:[],children:Object.keys(t._children).map((function(r){return G(t._children[r],e+r+"/")}))}}function J(t,e,r,n){n.includes(r)&&t.push({id:n||"root",label:n.endsWith("/")?n.slice(0,n.length-1):n||"Root",tags:e.namespaced?[W]:[]}),Object.keys(e._children).forEach((function(o){J(t,e._children[o],r,n+o+"/")}))}function X(t){try{return t()}catch(t){return t}}var Q=function(t,e){this.runtime=e,this._children=Object.create(null),this._rawModule=t;var r=t.state;this.state=("function"==typeof r?r():r)||{}},K={namespaced:{configurable:!0}};K.namespaced.get=function(){return!!this._rawModule.namespaced},Q.prototype.addChild=function(t,e){this._children[t]=e},Q.prototype.removeChild=function(t){delete this._children[t]},Q.prototype.getChild=function(t){return this._children[t]},Q.prototype.hasChild=function(t){return t in this._children},Q.prototype.update=function(t){this._rawModule.namespaced=t.namespaced,t.actions&&(this._rawModule.actions=t.actions),t.mutations&&(this._rawModule.mutations=t.mutations),t.getters&&(this._rawModule.getters=t.getters)},Q.prototype.forEachChild=function(t){k(this._children,t)},Q.prototype.forEachGetter=function(t){this._rawModule.getters&&k(this._rawModule.getters,t)},Q.prototype.forEachAction=function(t){this._rawModule.actions&&k(this._rawModule.actions,t)},Q.prototype.forEachMutation=function(t){this._rawModule.mutations&&k(this._rawModule.mutations,t)},Object.defineProperties(Q.prototype,K);var Z=function(t){this.register([],t,!1)};function tt(t,e,r){if(e.update(r),r.modules)for(var n in r.modules){if(!e.getChild(n))return void 0;tt(t.concat(n),e.getChild(n),r.modules[n])}}Z.prototype.get=function(t){return t.reduce((function(t,e){return t.getChild(e)}),this.root)},Z.prototype.getNamespace=function(t){var e=this.root;return t.reduce((function(t,r){return t+((e=e.getChild(r)).namespaced?r+"/":"")}),"")},Z.prototype.update=function(t){tt([],this.root,t)},Z.prototype.register=function(t,e,r){var n=this;void 0===r&&(r=!0);var o=new Q(e,r);0===t.length?this.root=o:this.get(t.slice(0,-1)).addChild(t[t.length-1],o);e.modules&&k(e.modules,(function(e,o){n.register(t.concat(o),e,r)}))},Z.prototype.unregister=function(t){var e=this.get(t.slice(0,-1)),r=t[t.length-1],n=e.getChild(r);n&&n.runtime&&e.removeChild(r)},Z.prototype.isRegistered=function(t){var e=this.get(t.slice(0,-1)),r=t[t.length-1];return!!e&&e.hasChild(r)};var et=function(t){var e=this;void 0===t&&(t={});var r=t.plugins;void 0===r&&(r=[]);var n=t.strict;void 0===n&&(n=!1);var o=t.devtools;this._committing=!1,this._actions=Object.create(null),this._actionSubscribers=[],this._mutations=Object.create(null),this._wrappedGetters=Object.create(null),this._modules=new Z(t),this._modulesNamespaceMap=Object.create(null),this._subscribers=[],this._makeLocalGettersCache=Object.create(null),this._devtools=o;var i=this,a=this.dispatch,s=this.commit;this.dispatch=function(t,e){return a.call(i,t,e)},this.commit=function(t,e,r){return s.call(i,t,e,r)},this.strict=n;var u=this._modules.root.state;U(this,u,[],this._modules.root),L(this,u),r.forEach((function(t){return t(e)}))},rt={state:{configurable:!0}};et.prototype.install=function(t,e){t.provide(e||T,this),t.config.globalProperties.$store=this,void 0!==this._devtools&&this._devtools&&z(t,this)},rt.state.get=function(){return this._state.data},rt.state.set=function(t){0},et.prototype.commit=function(t,e,r){var n=this,o=D(t,e,r),i=o.type,a=o.payload,s=(o.options,{type:i,payload:a}),u=this._mutations[i];u&&(this._withCommit((function(){u.forEach((function(t){t(a)}))})),this._subscribers.slice().forEach((function(t){return t(s,n.state)})))},et.prototype.dispatch=function(t,e){var r=this,n=D(t,e),o=n.type,i=n.payload,a={type:o,payload:i},s=this._actions[o];if(s){try{this._actionSubscribers.slice().filter((function(t){return t.before})).forEach((function(t){return t.before(a,r.state)}))}catch(t){0}var u=s.length>1?Promise.all(s.map((function(t){return t(i)}))):s[0](i);return new Promise((function(t,e){u.then((function(e){try{r._actionSubscribers.filter((function(t){return t.after})).forEach((function(t){return t.after(a,r.state)}))}catch(t){0}t(e)}),(function(t){try{r._actionSubscribers.filter((function(t){return t.error})).forEach((function(e){return e.error(a,r.state,t)}))}catch(t){0}e(t)}))}))}},et.prototype.subscribe=function(t,e){return N(t,this._subscribers,e)},et.prototype.subscribeAction=function(t,e){return N("function"==typeof t?{before:t}:t,this._actionSubscribers,e)},et.prototype.watch=function(t,e,r){var o=this;return(0,n.watch)((function(){return t(o.state,o.getters)}),e,Object.assign({},r))},et.prototype.replaceState=function(t){var e=this;this._withCommit((function(){e._state.data=t}))},et.prototype.registerModule=function(t,e,r){void 0===r&&(r={}),"string"==typeof t&&(t=[t]),this._modules.register(t,e),U(this,this.state,t,this._modules.get(t),r.preserveState),L(this,this.state)},et.prototype.unregisterModule=function(t){var e=this;"string"==typeof t&&(t=[t]),this._modules.unregister(t),this._withCommit((function(){delete F(e.state,t.slice(0,-1))[t[t.length-1]]})),B(this)},et.prototype.hasModule=function(t){return"string"==typeof t&&(t=[t]),this._modules.isRegistered(t)},et.prototype.hotUpdate=function(t){this._modules.update(t),B(this,!0)},et.prototype._withCommit=function(t){var e=this._committing;this._committing=!0,t(),this._committing=e},Object.defineProperties(et.prototype,rt);at((function(t,e){var r={};return it(e).forEach((function(e){var n=e.key,o=e.val;r[n]=function(){var e=this.$store.state,r=this.$store.getters;if(t){var n=st(this.$store,"mapState",t);if(!n)return;e=n.context.state,r=n.context.getters}return"function"==typeof o?o.call(this,e,r):e[o]},r[n].vuex=!0})),r}));var nt=at((function(t,e){var r={};return it(e).forEach((function(e){var n=e.key,o=e.val;r[n]=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];var n=this.$store.commit;if(t){var i=st(this.$store,"mapMutations",t);if(!i)return;n=i.context.commit}return"function"==typeof o?o.apply(this,[n].concat(e)):n.apply(this.$store,[o].concat(e))}})),r})),ot=at((function(t,e){var r={};return it(e).forEach((function(e){var n=e.key,o=e.val;o=t+o,r[n]=function(){if(!t||st(this.$store,"mapGetters",t))return this.$store.getters[o]},r[n].vuex=!0})),r}));at((function(t,e){var r={};return it(e).forEach((function(e){var n=e.key,o=e.val;r[n]=function(){for(var e=[],r=arguments.length;r--;)e[r]=arguments[r];var n=this.$store.dispatch;if(t){var i=st(this.$store,"mapActions",t);if(!i)return;n=i.context.dispatch}return"function"==typeof o?o.apply(this,[n].concat(e)):n.apply(this.$store,[o].concat(e))}})),r}));function it(t){return function(t){return Array.isArray(t)||C(t)}(t)?Array.isArray(t)?t.map((function(t){return{key:t,val:t}})):Object.keys(t).map((function(e){return{key:e,val:t[e]}})):[]}function at(t){return function(e,r){return"string"!=typeof e?(r=e,e=""):"/"!==e.charAt(e.length-1)&&(e+="/"),t(e,r)}}function st(t,e,r){return t._modulesNamespaceMap[r]}var ut=r(8982);function ct(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function ft(t){for(var e=1;e=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw i}}}}function Mt(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r1&&void 0!==arguments[1]?arguments[1]:void 0;return r||(r=this.rows.length),t.map((function(t){var n="".concat(e.field.attribute,"---").concat(t.attribute,"---").concat(r),o=null;return"translatable-field"===t.component&&(o=e.getFieldLocales(t)),It(It({},t),{},{originalAttribute:t.attribute,validationKey:n,attribute:n,formattedLocales:o})}))},getFieldLocales:function(t){var e=Object.keys(t.translatable.locales);return t.translatable.prioritize_nova_locale&&(e=e.sort((function(t,e){return t===Nova.config.locale&&e!==Nova.config.locale?-1:t!==Nova.config.locale&&e===Nova.config.locale?1:0}))),e.map((function(e){return{key:e,name:t.translatable.locales[e]}}))},setAllLocales:function(t,e){Nova.$emit(this.getAllLocalesEventName(t),e)},setActiveLocale:function(t){this.activeLocale=t},getAllLocalesEventName:function(t){var e=null!=t?t:void 0;return void 0!==e?"nova-translatable-".concat(e,"@setAllLocale"):"nova-translatable@setAllLocale"},getUniqueId:function(t,e){var r=e.originalAttribute||e.attribute;return"translatable-field"===e.component?"sr-".concat(t.attribute,"-").concat(r):void 0}},computed:{fields:function(){return(this.rows[0]||[]).filter((function(t){return"hidden-field"!==t.component}))}}}],data:function(){return{loading:!0,loadingError:!1,image:null}},methods:{addRow:function(t){if(this.canAddRows){var e={};if(!this.loading&&!this.loadingError){var r=this.$refs.picture.getBoundingClientRect(),n=t.clientX-r.left,o=t.clientY-r.top;e={x:(n/r.width*100).toFixed(2),y:(o/r.height*100).toFixed(2)}}var i=this.copyFields(this.currentField.fields,this.rows.length);i.map((function(t){return e.hasOwnProperty(t.originalAttribute.toLowerCase())&&(t.value=e[t.originalAttribute.toLowerCase()]),t})),this.rows.push(i)}},deleteRow:function(t){this.canDeleteRows&&this.rows.splice(t,1)},changeField:function(t,e,r){this.rows[e][r].value=t},onSyncedField:function(){var t=this;this.loading=!0,this.loadingError=!1,this.toDataURL(this.currentField.dependsOn[this.currentField.imageAttribute]).then((function(e){e&&-1!==e.indexOf("image/")?(t.loadingError=!1,t.image=t.currentField.dependsOn[t.currentField.imageAttribute]):(t.loadingError=!0,t.image=null),t.loading=!1}))},toDataURL:function(t){return fetch(t).then((function(t){return t.blob()})).then((function(t){return new Promise((function(e,r){var n=new FileReader;n.onloadend=function(){return e(n.result)},n.onerror=r,n.readAsDataURL(t)}))}))},fill:function(t){console.log(3,t);var e,r=[],n=Dt(this.rows);try{var o=function(){var t=e.value,n=new FormData,o={};t.forEach((function(t){return t.fill(n)}));var i,a=Dt(n);try{for(a.s();!(i=a.n()).done;){var s=i.value,u=null,c=s[0];3===c.split("---").length&&(c=c.split("---").slice(1).join("---"));var f=!!(c=c.replace(/---\d+/,"")).match(/\[\d+\]$/g);if(f){var l=/\[\d+\]$/g.exec(c);c="".concat(c.slice(0,l.index)).concat(c.slice(l.index+l[0].length))}try{u=JSON.parse(s[1])}catch(t){u=s[1]}f?(o[c]||(o[c]=[]),o[c].push(u)):o[c]=u}}catch(t){a.e(t)}finally{a.f()}r.push(o)};for(n.s();!(e=n.n()).done;)o()}catch(t){n.e(t)}finally{n.f()}console.log(JSON.stringify(r)),t.append(this.currentField.attribute,JSON.stringify(r))}},mounted:function(){this.onSyncedField()},computed:{repeatableValidation:function(){var t,e=this.fields,r=this.errors.errors,n=this.currentField.attribute,o=this.currentField.attribute.replace(/.{16}__/,""),i={},a={},s=Dt(e);try{var u=function(){var e=t.value,s=e.originalAttribute,u=Object.keys(r).filter((function(t){return!!t.match(new RegExp("^".concat(o,".\\d+.").concat(s)))})),c="translatable-field"===e.component;if(c){var f=u.map((function(t){return t.split(".").slice(-1)})).flat();i[s]=f}u.forEach((function(t){var o=t.split(".")[1],i="".concat(n,"---").concat(e.originalAttribute,"---").concat(o);if(c){var s=t.split(".").slice(-1)[0];i="".concat(i,".").concat(s)}a[i]=r[t]}))};for(s.s();!(t=s.n()).done;)u()}catch(t){s.e(t)}finally{s.f()}return{errors:new m.D1(a),locales:i}},canAddRows:function(){return!!this.currentField.canAddRows&&(!this.currentField.maxRows||this.rows.lengththis.currentField.minRows)}}};var qt=r(3379),Yt=r.n(qt),zt=r(9170),$t={insert:"head",singleton:!1};Yt()(zt.Z,$t);zt.Z.locals;const Wt=(0,i.Z)(Vt,[["render",function(t,e,r,o,i,a){var s=(0,n.resolveComponent)("Loader"),u=(0,n.resolveComponent)("Icon"),c=(0,n.resolveComponent)("DefaultField");return(0,n.openBlock)(),(0,n.createBlock)(c,{field:t.currentField,errors:t.errors,"show-help-text":t.showHelpText},{field:(0,n.withCtx)((function(){return[t.loading?((0,n.openBlock)(),(0,n.createBlock)(s,{key:0})):((0,n.openBlock)(),(0,n.createElementBlock)(n.Fragment,{key:1},[t.loadingError?((0,n.openBlock)(),(0,n.createElementBlock)("div",p," Dependent Image Loading Error ")):((0,n.openBlock)(),(0,n.createElementBlock)("div",h,[(0,n.createElementVNode)("img",{class:"rounded-lg block w-full",ref:"picture",src:t.image,onClick:e[0]||(e[0]=function(){return a.addRow&&a.addRow.apply(a,arguments)})},null,8,d),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(t.rows,(function(e,r){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{class:"picture-tag tooltip","data-tooltip":t.__("Index")+": "+(r+1)+(a.canDeleteRows?" / "+t.__("Delete"):""),onClick:function(t){return a.deleteRow(r)},style:(0,n.normalizeStyle)({top:e.filter((function(t){return"y"===t.originalAttribute.toLowerCase()}))[0].value+"%",left:e.filter((function(t){return"x"===t.originalAttribute.toLowerCase()}))[0].value+"%"})},null,12,y)})),256))]))],64)),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(t.rows,(function(e,r){return(0,n.openBlock)(),(0,n.createElementBlock)("div",{key:e[0].attribute,class:"flex flex-col mt-3 border border-gray-200 dark:border-gray-900 dark:bg-gray-900 relative rounded-lg",style:{"margin-left":"42px"}},[(0,n.createElementVNode)("div",v,[(0,n.createElementVNode)("b",g,(0,n.toDisplayString)(r+1),1),(0,n.createVNode)(u,{class:"hover:opacity-50 text-danger-500 cursor-pointer",type:"trash",width:"22",height:"22",onClick:function(t){return a.deleteRow(r)}},null,8,["onClick"])]),((0,n.openBlock)(!0),(0,n.createElementBlock)(n.Fragment,null,(0,n.renderList)(e,(function(e,o){return(0,n.openBlock)(),(0,n.createBlock)((0,n.resolveDynamicComponent)("form-".concat(e.component)),{key:o,field:e,errors:a.repeatableValidation.errors,"unique-id":t.getUniqueId(t.field,e),class:"mr-3",onChange:function(t){return a.changeField(t.target.value,r,o)}},null,8,["field","errors","unique-id","onChange"])})),128))])})),128))]})),_:1},8,["field","errors","show-help-text"])}]]);Nova.booting((function(t,e){t.component("index-nova-image-tags",a),t.component("detail-nova-image-tags",l),t.component("form-nova-image-tags",Wt)}))},9742:(t,e)=>{"use strict";e.byteLength=function(t){var e=u(t),r=e[0],n=e[1];return 3*(r+n)/4-n},e.toByteArray=function(t){var e,r,i=u(t),a=i[0],s=i[1],c=new o(function(t,e,r){return 3*(e+r)/4-r}(0,a,s)),f=0,l=s>0?a-4:a;for(r=0;r>16&255,c[f++]=e>>8&255,c[f++]=255&e;2===s&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,c[f++]=255&e);1===s&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,c[f++]=e>>8&255,c[f++]=255&e);return c},e.fromByteArray=function(t){for(var e,n=t.length,o=n%3,i=[],a=16383,s=0,u=n-o;su?u:s+a));1===o?(e=t[n-1],i.push(r[e>>2]+r[e<<4&63]+"==")):2===o&&(e=(t[n-2]<<8)+t[n-1],i.push(r[e>>10]+r[e>>4&63]+r[e<<2&63]+"="));return i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,s=i.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function c(t,e,n){for(var o,i,a=[],s=e;s>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8764:(t,e,r)=>{"use strict";var n=r(9742),o=r(645),i=r(5826);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,e){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|t}function d(t,e){if(u.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(t).length;default:if(n)return V(t).length;e=(""+e).toLowerCase(),n=!0}}function y(t,e,r){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return T(this,e,r);case"utf8":case"utf-8":return A(this,e,r);case"ascii":return P(this,e,r);case"latin1":case"binary":return R(this,e,r);case"base64":return S(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,r);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function v(t,e,r){var n=t[e];t[e]=t[r],t[r]=n}function g(t,e,r,n,o){if(0===t.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=o?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(o)return-1;r=t.length-1}else if(r<0){if(!o)return-1;r=0}if("string"==typeof e&&(e=u.from(e,n)),u.isBuffer(e))return 0===e.length?-1:m(t,e,r,n,o);if("number"==typeof e)return e&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):m(t,[e],r,n,o);throw new TypeError("val must be string, number or Buffer")}function m(t,e,r,n,o){var i,a=1,s=t.length,u=e.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}if(o){var f=-1;for(i=r;is&&(r=s-u),i=r;i>=0;i--){for(var l=!0,p=0;po&&(n=o):n=o;var i=e.length;if(i%2!=0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a>8,o=r%256,i.push(o),i.push(n);return i}(e,t.length-r),t,r,n)}function S(t,e,r){return 0===e&&r===t.length?n.fromByteArray(t):n.fromByteArray(t.slice(e,r))}function A(t,e,r){r=Math.min(t.length,r);for(var n=[],o=e;o239?4:c>223?3:c>191?2:1;if(o+l<=r)switch(l){case 1:c<128&&(f=c);break;case 2:128==(192&(i=t[o+1]))&&(u=(31&c)<<6|63&i)>127&&(f=u);break;case 3:i=t[o+1],a=t[o+2],128==(192&i)&&128==(192&a)&&(u=(15&c)<<12|(63&i)<<6|63&a)>2047&&(u<55296||u>57343)&&(f=u);break;case 4:i=t[o+1],a=t[o+2],s=t[o+3],128==(192&i)&&128==(192&a)&&128==(192&s)&&(u=(15&c)<<18|(63&i)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(f=u)}null===f?(f=65533,l=1):f>65535&&(f-=65536,n.push(f>>>10&1023|55296),f=56320|1023&f),n.push(f),o+=l}return function(t){var e=t.length;if(e<=j)return String.fromCharCode.apply(String,t);var r="",n=0;for(;n0&&(t=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(t+=" ... ")),""},u.prototype.compare=function(t,e,r,n,o){if(!u.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),e<0||r>t.length||n<0||o>this.length)throw new RangeError("out of range index");if(n>=o&&e>=r)return 0;if(n>=o)return-1;if(e>=r)return 1;if(this===t)return 0;for(var i=(o>>>=0)-(n>>>=0),a=(r>>>=0)-(e>>>=0),s=Math.min(i,a),c=this.slice(n,o),f=t.slice(e,r),l=0;lo)&&(r=o),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return b(this,t,e,r);case"utf8":case"utf-8":return w(this,t,e,r);case"ascii":return E(this,t,e,r);case"latin1":case"binary":return O(this,t,e,r);case"base64":return _(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var j=4096;function P(t,e,r){var n="";r=Math.min(t.length,r);for(var o=e;on)&&(r=n);for(var o="",i=e;ir)throw new RangeError("Trying to access beyond buffer length")}function N(t,e,r,n,o,i){if(!u.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>o||et.length)throw new RangeError("Index out of range")}function B(t,e,r,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-r,2);o>>8*(n?o:1-o)}function L(t,e,r,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-r,4);o>>8*(n?o:3-o)&255}function U(t,e,r,n,o,i){if(r+n>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function I(t,e,r,n,i){return i||U(t,0,r,4),o.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,i){return i||U(t,0,r,8),o.write(t,e,r,n,52,8),r+8}u.prototype.slice=function(t,e){var r,n=this.length;if((t=~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),(e=void 0===e?n:~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),e0&&(o*=256);)n+=this[t+--e]*o;return n},u.prototype.readUInt8=function(t,e){return e||C(t,1,this.length),this[t]},u.prototype.readUInt16LE=function(t,e){return e||C(t,2,this.length),this[t]|this[t+1]<<8},u.prototype.readUInt16BE=function(t,e){return e||C(t,2,this.length),this[t]<<8|this[t+1]},u.prototype.readUInt32LE=function(t,e){return e||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},u.prototype.readUInt32BE=function(t,e){return e||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},u.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=this[t],o=1,i=0;++i=(o*=128)&&(n-=Math.pow(2,8*e)),n},u.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||C(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*e)),i},u.prototype.readInt8=function(t,e){return e||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},u.prototype.readInt16LE=function(t,e){e||C(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(t,e){e||C(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(t,e){return e||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},u.prototype.readInt32BE=function(t,e){return e||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},u.prototype.readFloatLE=function(t,e){return e||C(t,4,this.length),o.read(this,t,!0,23,4)},u.prototype.readFloatBE=function(t,e){return e||C(t,4,this.length),o.read(this,t,!1,23,4)},u.prototype.readDoubleLE=function(t,e){return e||C(t,8,this.length),o.read(this,t,!0,52,8)},u.prototype.readDoubleBE=function(t,e){return e||C(t,8,this.length),o.read(this,t,!1,52,8)},u.prototype.writeUIntLE=function(t,e,r,n){(t=+t,e|=0,r|=0,n)||N(this,t,e,r,Math.pow(2,8*r)-1,0);var o=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+o]=t/i&255;return e+r},u.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,1,255,0),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},u.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},u.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},u.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):L(this,t,e,!0),e+4},u.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},u.prototype.writeIntLE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);N(this,t,e,r,o-1,-o)}var i=0,a=1,s=0;for(this[e]=255&t;++i>0)-s&255;return e+r},u.prototype.writeIntBE=function(t,e,r,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*r-1);N(this,t,e,r,o-1,-o)}var i=r-1,a=1,s=0;for(this[e+i]=255&t;--i>=0&&(a*=256);)t<0&&0===s&&0!==this[e+i+1]&&(s=1),this[e+i]=(t/a>>0)-s&255;return e+r},u.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,1,127,-128),u.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},u.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):B(this,t,e,!0),e+2},u.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):B(this,t,e,!1),e+2},u.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):L(this,t,e,!0),e+4},u.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||N(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),u.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):L(this,t,e,!1),e+4},u.prototype.writeFloatLE=function(t,e,r){return I(this,t,e,!0,r)},u.prototype.writeFloatBE=function(t,e,r){return I(this,t,e,!1,r)},u.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},u.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},u.prototype.copy=function(t,e,r,n){if(r||(r=0),n||0===n||(n=this.length),e>=t.length&&(e=t.length),e||(e=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else if(i<1e3||!u.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(i=e;i55295&&r<57344){if(!o){if(r>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(e-=3)>-1&&i.push(239,191,189),o=r;continue}r=65536+(o-55296<<10|r-56320)}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((e-=1)<0)break;i.push(r)}else if(r<2048){if((e-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function q(t){return n.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(D,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function Y(t,e,r,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+r]=t[o];return o}},9170:(t,e,r)=>{"use strict";r.d(e,{Z:()=>i});var n=r(3645),o=r.n(n)()((function(t){return t[1]}));o.push([t.id,'.picture-tag{align-items:center;background:rgba(0,0,0,.2);border:2px solid transparent;cursor:pointer;display:flex;height:32px;justify-content:center;transform:translate3d(-50%,-50%,0);transition:border-color .3s;width:32px}.picture-tag,.picture-tag:after{border-radius:9999px;position:absolute}.picture-tag:after{background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.55);content:"";height:12px;transition:transform .3s;width:12px}.picture-tag:hover{border-color:hsla(0,0%,100%,.5)}.picture-tag:hover:after{transform:scale(.667)}.tooltip:before{background:rgba(0,0,0,.55);border-radius:8px;bottom:100%;color:#fff;content:attr(data-tooltip);left:50%;opacity:0;padding:4px 8px;pointer-events:none;position:absolute;text-align:center;transform:translate3d(-50%,-8px,0);transition:opacity .3s;white-space:nowrap}.tooltip:hover:before{opacity:1}',""]);const i=o},3645:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var r=t(e);return e[2]?"@media ".concat(e[2]," {").concat(r,"}"):r})).join("")},e.i=function(t,r,n){"string"==typeof t&&(t=[[null,t,""]]);var o={};if(n)for(var i=0;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};n(this,t),this.record(e)}return r(t,[{key:"all",value:function(){return this.errors}},{key:"has",value:function(t){var e=this.errors.hasOwnProperty(t);e||(e=Object.keys(this.errors).filter((function(e){return e.startsWith(t+".")||e.startsWith(t+"[")})).length>0);return e}},{key:"first",value:function(t){return this.get(t)[0]}},{key:"get",value:function(t){return this.errors[t]||[]}},{key:"any",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(0===e.length)return Object.keys(this.errors).length>0;var r={};return e.forEach((function(e){return r[e]=t.get(e)})),r}},{key:"record",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.errors=t}},{key:"clear",value:function(t){if(t){var e=Object.assign({},this.errors);Object.keys(e).filter((function(e){return e===t||e.startsWith(t+".")||e.startsWith(t+"[")})).forEach((function(t){return delete e[t]})),this.errors=e}else this.errors={}}}]),t}();e.default=o},4365:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n,o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=function(){function t(t,e){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};c(this,t),this.processing=!1,this.successful=!1,this.withData(e).withOptions(r).withErrors({})}return i(t,[{key:"withData",value:function(t){for(var e in(0,u.isArray)(t)&&(t=t.reduce((function(t,e){return t[e]="",t}),{})),this.setInitialValues(t),this.errors=new s.default,this.processing=!1,this.successful=!1,t)(0,u.guardAgainstReservedFieldName)(e),this[e]=t[e];return this}},{key:"withErrors",value:function(t){return this.errors=new s.default(t),this}},{key:"withOptions",value:function(t){this.__options={resetOnSuccess:!0},t.hasOwnProperty("resetOnSuccess")&&(this.__options.resetOnSuccess=t.resetOnSuccess),t.hasOwnProperty("onSuccess")&&(this.onSuccess=t.onSuccess),t.hasOwnProperty("onFail")&&(this.onFail=t.onFail);var e="undefined"!=typeof window&&window.axios;if(this.__http=t.http||e||r(9669),!this.__http)throw new Error("No http library provided. Either pass an http option, or install axios.");return this}},{key:"data",value:function(){var t={};for(var e in this.initial)t[e]=this[e];return t}},{key:"only",value:function(t){var e=this;return t.reduce((function(t,r){return t[r]=e[r],t}),{})}},{key:"reset",value:function(){(0,u.merge)(this,this.initial),this.errors.clear()}},{key:"setInitialValues",value:function(t){this.initial={},(0,u.merge)(this.initial,t)}},{key:"populate",value:function(t){var e=this;return Object.keys(t).forEach((function(r){(0,u.guardAgainstReservedFieldName)(r),e.hasOwnProperty(r)&&(0,u.merge)(e,function(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}({},r,t[r]))})),this}},{key:"clear",value:function(){for(var t in this.initial)this[t]="";this.errors.clear()}},{key:"post",value:function(t){return this.submit("post",t)}},{key:"put",value:function(t){return this.submit("put",t)}},{key:"patch",value:function(t){return this.submit("patch",t)}},{key:"delete",value:function(t){return this.submit("delete",t)}},{key:"submit",value:function(t,e){var r=this;return this.__validateRequestType(t),this.errors.clear(),this.processing=!0,this.successful=!1,new Promise((function(n,o){r.__http[t](e,r.hasFiles()?(0,u.objectToFormData)(r.data()):r.data()).then((function(t){r.processing=!1,r.onSuccess(t.data),n(t.data)})).catch((function(t){r.processing=!1,r.onFail(t),o(t)}))}))}},{key:"hasFiles",value:function(){for(var t in this.initial)if(this.hasFilesDeep(this[t]))return!0;return!1}},{key:"hasFilesDeep",value:function(t){if(null===t)return!1;if("object"===(void 0===t?"undefined":o(t)))for(var e in t)if(t.hasOwnProperty(e)&&this.hasFilesDeep(t[e]))return!0;if(Array.isArray(t))for(var r in t)if(t.hasOwnProperty(r))return this.hasFilesDeep(t[r]);return(0,u.isFile)(t)}},{key:"onSuccess",value:function(t){this.successful=!0,this.__options.resetOnSuccess&&this.reset()}},{key:"onFail",value:function(t){this.successful=!1,t.response&&t.response.data.errors&&this.errors.record(t.response.data.errors)}},{key:"hasError",value:function(t){return this.errors.has(t)}},{key:"getError",value:function(t){return this.errors.first(t)}},{key:"getErrors",value:function(t){return this.errors.get(t)}},{key:"__validateRequestType",value:function(t){var e=["get","delete","head","post","put","patch"];if(-1===e.indexOf(t))throw new Error("`"+t+"` is not a valid request type, must be one of: `"+e.join("`, `")+"`.")}}],[{key:"create",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(new t).withData(e)}}]),t}();e.default=f},8062:(t,e,r)=>{"use strict";var n=r(4365);var o=r(1528);function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"D1",{enumerable:!0,get:function(){return i(o).default}})},9924:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.guardAgainstReservedFieldName=function(t){if(-1!==r.indexOf(t))throw new Error("Field name "+t+" isn't allowed to be used in a Form or Errors instance.")};var r=e.reservedFieldNames=["__http","__options","__validateRequestType","clear","data","delete","errors","getError","getErrors","hasError","initial","onFail","only","onSuccess","patch","populate","post","processing","successful","put","reset","submit","withData","withErrors","withOptions"]},7823:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new FormData,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(null===t||"undefined"===t||0===t.length)return e.append(r,t);for(var n in t)t.hasOwnProperty(n)&&i(e,o(r,n),t[n]);return e}function o(t,e){return t?t+"["+e+"]":e}function i(t,e,o){return o instanceof Date?t.append(e,o.toISOString()):o instanceof File?t.append(e,o,o.name):"boolean"==typeof o?t.append(e,o?"1":"0"):null===o?t.append(e,""):"object"!==(void 0===o?"undefined":r(o))?t.append(e,o):void n(o,t,e)}e.objectToFormData=n},7019:(t,e,r)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=r(933);Object.keys(n).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return n[t]}})}));var o=r(7823);Object.keys(o).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return o[t]}})}));var i=r(9924);Object.keys(i).forEach((function(t){"default"!==t&&"__esModule"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return i[t]}})}))},933:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function n(t){return t instanceof File||t instanceof FileList}function o(t){if(null===t)return null;if(n(t))return t;if(Array.isArray(t)){var e=[];for(var i in t)t.hasOwnProperty(i)&&(e[i]=o(t[i]));return e}if("object"===(void 0===t?"undefined":r(t))){var a={};for(var s in t)t.hasOwnProperty(s)&&(a[s]=o(t[s]));return a}return t}e.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},e.isFile=n,e.merge=function(t,e){for(var r in e)t[r]=o(e[r])},e.cloneDeep=o},645:(t,e)=>{e.read=function(t,e,r,n,o){var i,a,s=8*o-n-1,u=(1<>1,f=-7,l=r?o-1:0,p=r?-1:1,h=t[e+l];for(l+=p,i=h&(1<<-f)-1,h>>=-f,f+=s;f>0;i=256*i+t[e+l],l+=p,f-=8);for(a=i&(1<<-f)-1,i>>=-f,f+=n;f>0;a=256*a+t[e+l],l+=p,f-=8);if(0===i)i=1-c;else{if(i===u)return a?NaN:1/0*(h?-1:1);a+=Math.pow(2,n),i-=c}return(h?-1:1)*a*Math.pow(2,i-n)},e.write=function(t,e,r,n,o,i){var a,s,u,c=8*i-o-1,f=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:i-1,d=n?1:-1,y=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=f):(a=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-a))<1&&(a--,u*=2),(e+=a+l>=1?p/u:p*Math.pow(2,1-l))*u>=2&&(a++,u/=2),a+l>=f?(s=0,a=f):a+l>=1?(s=(e*u-1)*Math.pow(2,o),a+=l):(s=e*Math.pow(2,l-1)*Math.pow(2,o),a=0));o>=8;t[r+h]=255&s,h+=d,s/=256,o-=8);for(a=a<0;t[r+h]=255&a,h+=d,a/=256,c-=8);t[r+h-d]|=128*y}},5826:t=>{var e={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==e.call(t)}},6381:()=>{},4155:t=>{var e,r,n=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(t){if(e===setTimeout)return setTimeout(t,0);if((e===o||!e)&&setTimeout)return e=setTimeout,setTimeout(t,0);try{return e(t,0)}catch(r){try{return e.call(null,t,0)}catch(r){return e.call(this,t,0)}}}!function(){try{e="function"==typeof setTimeout?setTimeout:o}catch(t){e=o}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(t){r=i}}();var s,u=[],c=!1,f=-1;function l(){c&&s&&(c=!1,s.length?u=s.concat(u):f=-1,u.length&&p())}function p(){if(!c){var t=a(l);c=!0;for(var e=u.length;e;){for(s=u,u=[];++f1)for(var r=1;r{"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},i=function(){var t={};return function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}t[e]=r}return t[e]}}(),a=[];function s(t){for(var e=-1,r=0;r{"use strict";e.Z=(t,e)=>{const r=t.__vccOpts||t;for(const[t,n]of e)r[t]=n;return r}},3101:(t,e,r)=>{t.exports=r(7263)},8982:(t,e,r)=>{function n(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var o=n(r(1494)),i=r(5814),a=n(r(4306));function s(){return(s=Object.assign||function(t){for(var e=1;e0&&"back_forward"===window.performance.getEntriesByType("navigation")[0].type},r.handleBackForwardVisit=function(t){var e=this;window.history.state.version=t.version,this.setPage(window.history.state,{preserveScroll:!0,preserveState:!0}).then((function(){e.restoreScrollPositions(),b(t)}))},r.locationVisit=function(t,e){try{window.sessionStorage.setItem("inertiaLocationVisit",JSON.stringify({preserveScroll:e})),window.location.href=t.href,v(window.location).href===v(t).href&&window.location.reload()}catch(t){return!1}},r.isLocationVisit=function(){try{return null!==window.sessionStorage.getItem("inertiaLocationVisit")}catch(t){return!1}},r.handleLocationVisit=function(t){var e,r,n,o,i=this,a=JSON.parse(window.sessionStorage.getItem("inertiaLocationVisit")||"");window.sessionStorage.removeItem("inertiaLocationVisit"),t.url+=window.location.hash,t.rememberedState=null!=(e=null==(r=window.history.state)?void 0:r.rememberedState)?e:{},t.scrollRegions=null!=(n=null==(o=window.history.state)?void 0:o.scrollRegions)?n:[],this.setPage(t,{preserveScroll:a.preserveScroll,preserveState:!0}).then((function(){a.preserveScroll&&i.restoreScrollPositions(),b(t)}))},r.isLocationVisitResponse=function(t){return t&&409===t.status&&t.headers["x-inertia-location"]},r.isInertiaResponse=function(t){return null==t?void 0:t.headers["x-inertia"]},r.createVisitId=function(){return this.visitId={},this.visitId},r.cancelVisit=function(t,e){var r=e.cancelled,n=void 0!==r&&r,o=e.interrupted,i=void 0!==o&&o;!t||t.completed||t.cancelled||t.interrupted||(t.cancelToken.cancel(),t.onCancel(),t.completed=!1,t.cancelled=n,t.interrupted=i,m(t),t.onFinish(t))},r.finishVisit=function(t){t.cancelled||t.interrupted||(t.completed=!0,t.cancelled=!1,t.interrupted=!1,m(t),t.onFinish(t))},r.resolvePreserveOption=function(t,e){return"function"==typeof t?t(e):"errors"===t?Object.keys(e.props.errors||{}).length>0:t},r.visit=function(t,r){var n=this,i=void 0===r?{}:r,a=i.method,u=void 0===a?e.n$.GET:a,f=i.data,p=void 0===f?{}:f,h=i.replace,m=void 0!==h&&h,b=i.preserveScroll,w=void 0!==b&&b,E=i.preserveState,O=void 0!==E&&E,_=i.only,x=void 0===_?[]:_,S=i.headers,A=void 0===S?{}:S,j=i.errorBag,P=void 0===j?"":j,R=i.forceFormData,T=void 0!==R&&R,k=i.onCancelToken,C=void 0===k?function(){}:k,N=i.onBefore,B=void 0===N?function(){}:N,L=i.onStart,U=void 0===L?function(){}:L,I=i.onProgress,F=void 0===I?function(){}:I,D=i.onFinish,M=void 0===D?function(){}:D,V=i.onCancel,q=void 0===V?function(){}:V,Y=i.onSuccess,z=void 0===Y?function(){}:Y,$=i.onError,W=void 0===$?function(){}:$,H=i.queryStringArrayFormat,G=void 0===H?"brackets":H,J="string"==typeof t?d(t):t;if(!function t(e){return e instanceof File||e instanceof Blob||e instanceof FileList&&e.length>0||e instanceof FormData&&Array.from(e.values()).some((function(e){return t(e)}))||"object"==typeof e&&null!==e&&Object.values(e).some((function(e){return t(e)}))}(p)&&!T||p instanceof FormData||(p=l(p)),!(p instanceof FormData)){var X=y(u,J,p,G),Q=X[1];J=d(X[0]),p=Q}var K={url:J,method:u,data:p,replace:m,preserveScroll:w,preserveState:O,only:x,headers:A,errorBag:P,forceFormData:T,queryStringArrayFormat:G,cancelled:!1,completed:!1,interrupted:!1};if(!1!==B(K)&&function(t){return g("before",{cancelable:!0,detail:{visit:t}})}(K)){this.activeVisit&&this.cancelVisit(this.activeVisit,{interrupted:!0}),this.saveScrollPositions();var Z=this.createVisitId();this.activeVisit=s({},K,{onCancelToken:C,onBefore:B,onStart:U,onProgress:F,onFinish:M,onCancel:q,onSuccess:z,onError:W,queryStringArrayFormat:G,cancelToken:o.CancelToken.source()}),C({cancel:function(){n.activeVisit&&n.cancelVisit(n.activeVisit,{cancelled:!0})}}),function(t){g("start",{detail:{visit:t}})}(K),U(K),o({method:u,url:v(J).href,data:u===e.n$.GET?{}:p,params:u===e.n$.GET?p:{},cancelToken:this.activeVisit.cancelToken.token,headers:s({},A,{Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0},x.length?{"X-Inertia-Partial-Component":this.page.component,"X-Inertia-Partial-Data":x.join(",")}:{},P&&P.length?{"X-Inertia-Error-Bag":P}:{},this.page.version?{"X-Inertia-Version":this.page.version}:{}),onUploadProgress:function(t){p instanceof FormData&&(t.percentage=Math.round(t.loaded/t.total*100),function(t){g("progress",{detail:{progress:t}})}(t),F(t))}}).then((function(t){var e;if(!n.isInertiaResponse(t))return Promise.reject({response:t});var r=t.data;x.length&&r.component===n.page.component&&(r.props=s({},n.page.props,r.props)),w=n.resolvePreserveOption(w,r),(O=n.resolvePreserveOption(O,r))&&null!=(e=window.history.state)&&e.rememberedState&&r.component===n.page.component&&(r.rememberedState=window.history.state.rememberedState);var o=J,i=d(r.url);return o.hash&&!i.hash&&v(o).href===i.href&&(i.hash=o.hash,r.url=i.href),n.setPage(r,{visitId:Z,replace:m,preserveScroll:w,preserveState:O})})).then((function(){var t=n.page.props.errors||{};if(Object.keys(t).length>0){var e=P?t[P]?t[P]:{}:t;return function(t){g("error",{detail:{errors:t}})}(e),W(e)}return g("success",{detail:{page:n.page}}),z(n.page)})).catch((function(t){if(n.isInertiaResponse(t.response))return n.setPage(t.response.data,{visitId:Z});if(n.isLocationVisitResponse(t.response)){var e=d(t.response.headers["x-inertia-location"]),r=J;r.hash&&!e.hash&&v(r).href===e.href&&(e.hash=r.hash),n.locationVisit(e,!0===w)}else{if(!t.response)return Promise.reject(t);g("invalid",{cancelable:!0,detail:{response:t.response}})&&c.show(t.response.data)}})).then((function(){n.activeVisit&&n.finishVisit(n.activeVisit)})).catch((function(t){if(!o.isCancel(t)){var e=g("exception",{cancelable:!0,detail:{exception:t}});if(n.activeVisit&&n.finishVisit(n.activeVisit),e)return Promise.reject(t)}}))}},r.setPage=function(t,e){var r=this,n=void 0===e?{}:e,o=n.visitId,i=void 0===o?this.createVisitId():o,a=n.replace,s=void 0!==a&&a,u=n.preserveScroll,c=void 0!==u&&u,f=n.preserveState,l=void 0!==f&&f;return Promise.resolve(this.resolveComponent(t.component)).then((function(e){i===r.visitId&&(t.scrollRegions=t.scrollRegions||[],t.rememberedState=t.rememberedState||{},(s=s||d(t.url).href===window.location.href)?r.replaceState(t):r.pushState(t),r.swapComponent({component:e,page:t,preserveState:l}).then((function(){c||r.resetScrollPositions(),s||b(t)})))}))},r.pushState=function(t){this.page=t,window.history.pushState(t,"",t.url)},r.replaceState=function(t){this.page=t,window.history.replaceState(t,"",t.url)},r.handlePopstateEvent=function(t){var e=this;if(null!==t.state){var r=t.state,n=this.createVisitId();Promise.resolve(this.resolveComponent(r.component)).then((function(t){n===e.visitId&&(e.page=r,e.swapComponent({component:t,page:r,preserveState:!1}).then((function(){e.restoreScrollPositions(),b(r)})))}))}else{var o=d(this.page.url);o.hash=window.location.hash,this.replaceState(s({},this.page,{url:o.href})),this.resetScrollPositions()}},r.get=function(t,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),this.visit(t,s({},n,{method:e.n$.GET,data:r}))},r.reload=function(t){return void 0===t&&(t={}),this.visit(window.location.href,s({},t,{preserveScroll:!0,preserveState:!0}))},r.replace=function(t,e){var r;return void 0===e&&(e={}),console.warn("Inertia.replace() has been deprecated and will be removed in a future release. Please use Inertia."+(null!=(r=e.method)?r:"get")+"() instead."),this.visit(t,s({preserveState:!0},e,{replace:!0}))},r.post=function(t,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),this.visit(t,s({preserveState:!0},n,{method:e.n$.POST,data:r}))},r.put=function(t,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),this.visit(t,s({preserveState:!0},n,{method:e.n$.PUT,data:r}))},r.patch=function(t,r,n){return void 0===r&&(r={}),void 0===n&&(n={}),this.visit(t,s({preserveState:!0},n,{method:e.n$.PATCH,data:r}))},r.delete=function(t,r){return void 0===r&&(r={}),this.visit(t,s({preserveState:!0},r,{method:e.n$.DELETE}))},r.remember=function(t,e){var r,n;void 0===e&&(e="default"),w||this.replaceState(s({},this.page,{rememberedState:s({},null==(r=this.page)?void 0:r.rememberedState,(n={},n[e]=t,n))}))},r.restore=function(t){var e,r;if(void 0===t&&(t="default"),!w)return null==(e=window.history.state)||null==(r=e.rememberedState)?void 0:r[t]},r.on=function(t,e){var r=function(t){var r=e(t);t.cancelable&&!t.defaultPrevented&&!1===r&&t.preventDefault()};return document.addEventListener("inertia:"+t,r),function(){return document.removeEventListener("inertia:"+t,r)}},t}(),O={buildDOMElement:function(t){var e=document.createElement("template");e.innerHTML=t;var r=e.content.firstChild;if(!t.startsWith("