From 9a99d46a6a360da956889376734cbcbddcf60cd3 Mon Sep 17 00:00:00 2001 From: LaHiRu Date: Wed, 12 Jun 2024 12:32:23 +0530 Subject: [PATCH 01/10] file handling --- src/HasNovaSettings.php | 14 ------ src/Http/Controllers/SettingsController.php | 17 ++++++- src/NovaSettingsMum.php | 51 ++++++++++++++++++++- 3 files changed, 66 insertions(+), 16 deletions(-) diff --git a/src/HasNovaSettings.php b/src/HasNovaSettings.php index 07be390..073ec8e 100644 --- a/src/HasNovaSettings.php +++ b/src/HasNovaSettings.php @@ -15,18 +15,4 @@ public function getNovaSettings($key) { return $this->novaSettings()->where('key', $key)->first()?->value; } - - public function getNovaSettingsBySection($section) - { - return $this->novaSettings() - ->where('key', 'LIKE', "$section.%") - ->get() - ->map(function ($el) { - $el['key'] = str($el->key)->after('.')->toString(); - - return $el; - }) - ->pluck('value', 'key') - ->toArray(); - } } diff --git a/src/Http/Controllers/SettingsController.php b/src/Http/Controllers/SettingsController.php index afc45c6..ae249a7 100644 --- a/src/Http/Controllers/SettingsController.php +++ b/src/Http/Controllers/SettingsController.php @@ -2,6 +2,8 @@ namespace Visanduma\NovaSettings\Http\Controllers; +use Illuminate\Support\Facades\Storage; +use Laravel\Nova\Fields\Field; use Laravel\Nova\Fields\FieldCollection; use Laravel\Nova\Http\Requests\NovaRequest; use Laravel\Nova\Menu\MenuSection; @@ -66,13 +68,15 @@ public function getSectionData($section = null) { $request = resolve(NovaRequest::class); - $sections = NovaSettings::getSections(); $sections = NovaSettings::keyByUri(); $activeSection = $sections->get($section) ?? $sections->first(); $fields = FieldCollection::make($activeSection->fields()); + // fields modifications + $fields->map(fn ($field) => $this->setFieldHandlers($field)); + $currentSettings = $activeSection->getSettings($request); $fieldsWithNoPanel = $fields->filter(fn ($el) => $el->component != 'panel'); @@ -93,6 +97,17 @@ public function getSectionData($section = null) ]); } + private function setFieldHandlers(Field|Panel $field) + { + + if ($field->component() == 'file-field') { + // set default thumbnail path + $field->thumbnail(fn ($value, $disk) => Storage::disk($disk)->url($value)); + } + + return $field; + } + private function panelJsonSerializeWithFields(Panel $panel, $values) { return array_merge($panel->jsonSerialize(), [ diff --git a/src/NovaSettingsMum.php b/src/NovaSettingsMum.php index 4999e49..7bda8d4 100644 --- a/src/NovaSettingsMum.php +++ b/src/NovaSettingsMum.php @@ -2,7 +2,10 @@ namespace Visanduma\NovaSettings; +use Illuminate\Http\UploadedFile; use Illuminate\Support\Collection; +use Illuminate\Support\Facades\Storage; +use Laravel\Nova\Fields\File; use Laravel\Nova\Http\Requests\NovaRequest; use Visanduma\NovaSettings\Models\NovaSettingsModel; @@ -56,6 +59,16 @@ public function store(NovaRequest $request) $data = $this->transformInputs($request->all()); + // store files if exists + $files = $request->allFiles(); + $filePaths = []; + + foreach ($files as $index => $file) { + $filePaths[$index] = $this->uploadFile($file, $this->findField($index)); + } + + $data = array_merge($data, $filePaths); + // prepare data with section prefix $data = collect($data)->mapWithKeys(function ($value, $key) { return [ @@ -117,12 +130,48 @@ public function getSettings(NovaRequest $request) if ($this->global) { return NovaSettings::global($this->uriKey()); } else { - return $request->user()->getNovaSettingsBySection($this->uriKey()); + return $this->getUserSettings($request->user()); } } + public function getUserSettings($user) + { + return $user->novaSettings() + ->where('key', 'LIKE', "{$this->uriKey()}.%") + ->get() + ->map(function ($el) { + $key = str($el->key)->after('.')->toString(); + $field = $this->findField($key); + + // set file url value + if ($field?->component == 'file-field') { + // $el['value'] = Storage::disk($field->getStorageDisk())->url($el->value); + } + + $el['key'] = $key; + + return $el; + }) + ->pluck('value', 'key') + ->toArray(); + } + protected function afterSaved(NovaRequest $request) { // called after saved the form } + + private function uploadFile(UploadedFile $file, File $field) + { + return $file->store($field->getStoragePath(), [ + 'disk' => $field->getStorageDisk(), + ]); + } + + private function findField($name) + { + return $this->getAllFieldsWithoutPanel() + ->where('attribute', $name) + ->first(); + } } From 4aea73cc275393dc77bb9df18d8d475f2534f5b5 Mon Sep 17 00:00:00 2001 From: LaHiRu Date: Thu, 13 Jun 2024 13:55:39 +0530 Subject: [PATCH 02/10] migrations --- .../create_advance_nova_settings_table.php | 34 +++++++++++++++++++ src/ToolServiceProvider.php | 3 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 database/create_advance_nova_settings_table.php diff --git a/database/create_advance_nova_settings_table.php b/database/create_advance_nova_settings_table.php new file mode 100644 index 0000000..5dcc3bb --- /dev/null +++ b/database/create_advance_nova_settings_table.php @@ -0,0 +1,34 @@ +id(); + $table->string('key'); + $table->string('value')->nullable(); + $table->nullableMorphs('owner'); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::dropIfExists('advance_nova_settings'); + } +}; diff --git a/src/ToolServiceProvider.php b/src/ToolServiceProvider.php index b83c6ec..2f116f7 100644 --- a/src/ToolServiceProvider.php +++ b/src/ToolServiceProvider.php @@ -28,7 +28,8 @@ public function boot() $this->publishes([ __DIR__.'/nova-settings.php' => config_path('nova-settings.php'), - ], 'nova-settings.config'); + __DIR__.'/../database/create_advance_nova_settings_table.php' => database_path('/migrations/'.'2024_06_13_000000_create_advance_nova_settings_table.php'), + ], 'nova-settings'); NovaSettings::autoRegister(); From 03d66b3d34f412995b66a00f3d2dc783f9f905f3 Mon Sep 17 00:00:00 2001 From: LaHiRu Date: Thu, 13 Jun 2024 13:55:58 +0530 Subject: [PATCH 03/10] minor fixes --- dist/css/tool.css | 1 - dist/js/tool.js | 25603 +----------------------------- resources/js/pages/Settings.vue | 1 - src/NovaSettingsMum.php | 5 +- src/nova-settings.php | 1 + 5 files changed, 6 insertions(+), 25605 deletions(-) diff --git a/dist/css/tool.css b/dist/css/tool.css index c47b228..8b13789 100644 --- a/dist/css/tool.css +++ b/dist/css/tool.css @@ -1,2 +1 @@ -/* Nova Tool CSS */ diff --git a/dist/js/tool.js b/dist/js/tool.js index 7d1c151..4dbab79 100644 --- a/dist/js/tool.js +++ b/dist/js/tool.js @@ -1,25601 +1,2 @@ -/******/ (() => { // webpackBootstrap -/******/ var __webpack_modules__ = ({ - -/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/Settings.vue?vue&type=script&lang=js": -/*!*********************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/Settings.vue?vue&type=script&lang=js ***! - \*********************************************************************************************************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var laravel_nova__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! laravel-nova */ "../../vendor/laravel/nova/resources/js/mixins/packages.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - mixins: [laravel_nova__WEBPACK_IMPORTED_MODULE_0__.HandlesValidationErrors, laravel_nova__WEBPACK_IMPORTED_MODULE_0__.HandlesFormRequest, laravel_nova__WEBPACK_IMPORTED_MODULE_0__.HandlesValidationErrors, laravel_nova__WEBPACK_IMPORTED_MODULE_0__.PreventsFormAbandonment, laravel_nova__WEBPACK_IMPORTED_MODULE_0__.mapProps], - props: ["menus", "section"], - data: function data() { - return { - pageId: this.section, - validationErrors: new laravel_nova__WEBPACK_IMPORTED_MODULE_0__.Errors(), - panel: null, - panels: [], - fields: [], - loading: true, - saving: false - }; - }, - mounted: function mounted() { - this.loadFields(); - }, - methods: { - save: function save() { - var _this = this; - return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { - var formData, response; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - formData = new FormData(); - _this.panels.forEach(function (panel) { - panel.fields.forEach(function (field) { - return field.fill(formData); - }); - }); - _context.prev = 2; - _context.next = 5; - return Nova.request().post("".concat(_this.section), formData); - case 5: - response = _context.sent; - if (response.status == 204) { - Nova.success("Settings updated!"); - _this.validationErrors = new laravel_nova__WEBPACK_IMPORTED_MODULE_0__.Errors(); - } - _context.next = 13; - break; - case 9: - _context.prev = 9; - _context.t0 = _context["catch"](2); - console.log(_context.t0.response.status); - if (_context.t0 && _context.t0.response && _context.t0.response.status == 422) { - _this.validationErrors = new laravel_nova__WEBPACK_IMPORTED_MODULE_0__.Errors(_context.t0.response.data.errors); - Nova.error("There was a problem submitting the form."); - } - case 13: - case "end": - return _context.stop(); - } - }, _callee, null, [[2, 9]]); - }))(); - }, - loadFields: function loadFields() { - var _this2 = this; - return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() { - var response; - return _regeneratorRuntime().wrap(function _callee2$(_context2) { - while (1) switch (_context2.prev = _context2.next) { - case 0: - _this2.loading = true; - _context2.next = 3; - return Nova.request().get("/nova-vendor/nova-settings/section/".concat(_this2.section)); - case 3: - response = _context2.sent; - _this2.panels = response.data.panels; - _this2.loading = false; - case 6: - case "end": - return _context2.stop(); - } - }, _callee2); - }))(); - } - }, - computed: {} -}); - -/***/ }), - -/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/NoSettings.vue?vue&type=template&id=6c40e566": -/*!***************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/NoSettings.vue?vue&type=template&id=6c40e566 ***! - \***************************************************************************************************************************************************************************************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ render: () => (/* binding */ render) -/* harmony export */ }); -/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); -/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); - -var _hoisted_1 = { - "class": "flex justify-center min-h-40 mt-6" -}; -function render(_ctx, _cache) { - return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, "No settings available"); -} - -/***/ }), - -/***/ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/Settings.vue?vue&type=template&id=882405a8": -/*!*************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** ./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/Settings.vue?vue&type=template&id=882405a8 ***! - \*************************************************************************************************************************************************************************************************************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ render: () => (/* binding */ render) -/* harmony export */ }); -/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vue */ "vue"); -/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); - -var _hoisted_1 = { - "class": "flex justify-content-start gap-4" -}; -var _hoisted_2 = { - "class": "w-1/5" -}; -var _hoisted_3 = { - "class": "w-full" -}; -var _hoisted_4 = ["data-form-unique-id"]; -var _hoisted_5 = /*#__PURE__*/(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)("Save"); -function render(_ctx, _cache, $props, $setup, $data, $options) { - var _component_menu_section = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("menu-section"); - var _component_default_button = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("default-button"); - var _component_LoadingView = (0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveComponent)("LoadingView"); - return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("div", _hoisted_1, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_2, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createTextVNode)((0,vue__WEBPACK_IMPORTED_MODULE_0__.toDisplayString)(_ctx.menu) + " ", 1 /* TEXT */), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("ul", null, [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($props.menus, function (menu, index) { - return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)("li", { - key: index, - "class": "mb-2" - }, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_menu_section, { - item: menu - }, null, 8 /* PROPS */, ["item"])]); - }), 128 /* KEYED_FRAGMENT */))])]), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("div", _hoisted_3, [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_LoadingView, { - loading: $data.loading, - key: $data.pageId - }, { - "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { - return [(0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementVNode)("form", { - onSubmit: _cache[0] || (_cache[0] = (0,vue__WEBPACK_IMPORTED_MODULE_0__.withModifiers)(function () { - return $options.save && $options.save.apply($options, arguments); - }, ["prevent"])), - "data-form-unique-id": $props.section - }, [((0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(true), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createElementBlock)(vue__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,vue__WEBPACK_IMPORTED_MODULE_0__.renderList)($data.panels, function (panel) { - return (0,vue__WEBPACK_IMPORTED_MODULE_0__.openBlock)(), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createBlock)((0,vue__WEBPACK_IMPORTED_MODULE_0__.resolveDynamicComponent)("form-" + panel.component), { - panel: panel, - mode: "form", - "class": "mb-6", - "resource-name": 'nova-advance-settings', - "resource-id": $data.pageId, - fields: panel.fields, - "validation-errors": $data.validationErrors - }, null, 8 /* PROPS */, ["panel", "resource-id", "fields", "validation-errors"]); - }), 256 /* UNKEYED_FRAGMENT */)), (0,vue__WEBPACK_IMPORTED_MODULE_0__.createVNode)(_component_default_button, { - disabled: $data.saving - }, { - "default": (0,vue__WEBPACK_IMPORTED_MODULE_0__.withCtx)(function () { - return [_hoisted_5]; - }), - _: 1 /* STABLE */ - }, 8 /* PROPS */, ["disabled"])], 40 /* PROPS, HYDRATE_EVENTS */, _hoisted_4)]; - }), - _: 1 /* STABLE */ - }, 8 /* PROPS */, ["loading"])])]); -} - -/***/ }), - -/***/ "./resources/js/tool.js": -/*!******************************!*\ - !*** ./resources/js/tool.js ***! - \******************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var _pages_NoSettings__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pages/NoSettings */ "./resources/js/pages/NoSettings.vue"); -/* harmony import */ var _pages_Settings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./pages/Settings */ "./resources/js/pages/Settings.vue"); - - -Nova.booting(function (app, store) { - Nova.inertia('NovaSettings', _pages_Settings__WEBPACK_IMPORTED_MODULE_1__["default"]); - Nova.inertia('Empty', _pages_NoSettings__WEBPACK_IMPORTED_MODULE_0__["default"]); -}); - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/composables/useLocalization.js": -/*!*****************************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/composables/useLocalization.js ***! - \*****************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ useLocalization: () => (/* binding */ useLocalization) -/* harmony export */ }); -/* harmony import */ var _util_localization__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/localization */ "../../vendor/laravel/nova/resources/js/util/localization.js"); - -function useLocalization() { - return { - __: function __(key, replace) { - return (0,_util_localization__WEBPACK_IMPORTED_MODULE_0__["default"])(key, replace); - } - }; -} - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/mixins/CopiesToClipboard.js": -/*!**************************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/mixins/CopiesToClipboard.js ***! - \**************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), -/* harmony export */ useCopyValueToClipboard: () => (/* binding */ useCopyValueToClipboard) -/* harmony export */ }); -var mixin = { - methods: { - copyValueToClipboard: function copyValueToClipboard(value) { - if (navigator.clipboard) { - navigator.clipboard.writeText(value); - } else if (window.clipboardData) { - window.clipboardData.setData('Text', value); - } else { - var input = document.createElement('input'); - var _ref = [document.documentElement.scrollTop, document.documentElement.scrollLeft], - scrollTop = _ref[0], - scrollLeft = _ref[1]; - document.body.appendChild(input); - input.value = value; - input.focus(); - input.select(); - document.documentElement.scrollTop = scrollTop; - document.documentElement.scrollLeft = scrollLeft; - document.execCommand('copy'); - input.remove(); - } - } - } -}; -function useCopyValueToClipboard() { - return { - copyValueToClipboard: function copyValueToClipboard(value) { - return mixin.methods.copyValueToClipboard(value); - } - }; -} -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (mixin); - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/mixins/DependentFormField.js": -/*!***************************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/mixins/DependentFormField.js ***! - \***************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! axios */ "../../vendor/laravel/nova/node_modules/axios/index.js"); -/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/debounce */ "../../vendor/laravel/nova/node_modules/lodash/debounce.js"); -/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var lodash_forIn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/forIn */ "../../vendor/laravel/nova/node_modules/lodash/forIn.js"); -/* harmony import */ var lodash_forIn__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_forIn__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! lodash/get */ "../../vendor/laravel/nova/node_modules/lodash/get.js"); -/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var lodash_identity__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! lodash/identity */ "../../vendor/laravel/nova/node_modules/lodash/identity.js"); -/* harmony import */ var lodash_identity__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_identity__WEBPACK_IMPORTED_MODULE_3__); -/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! lodash/isEmpty */ "../../vendor/laravel/nova/node_modules/lodash/isEmpty.js"); -/* harmony import */ var lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4__); -/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! lodash/isNil */ "../../vendor/laravel/nova/node_modules/lodash/isNil.js"); -/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(lodash_isNil__WEBPACK_IMPORTED_MODULE_5__); -/* harmony import */ var lodash_pickBy__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! lodash/pickBy */ "../../vendor/laravel/nova/node_modules/lodash/pickBy.js"); -/* harmony import */ var lodash_pickBy__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(lodash_pickBy__WEBPACK_IMPORTED_MODULE_6__); -/* harmony import */ var _FormField__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./FormField */ "../../vendor/laravel/nova/resources/js/mixins/FormField.js"); -/* harmony import */ var _propTypes__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./propTypes */ "../../vendor/laravel/nova/resources/js/mixins/propTypes.js"); -/* harmony import */ var _util_filled__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../util/filled */ "../../vendor/laravel/nova/resources/js/util/filled.js"); -/* harmony import */ var _util_escapeUnicode__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../util/escapeUnicode */ "../../vendor/laravel/nova/resources/js/util/escapeUnicode.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } - - - - - - - - - - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - "extends": _FormField__WEBPACK_IMPORTED_MODULE_7__["default"], - emits: ['field-shown', 'field-hidden'], - props: _objectSpread(_objectSpread({}, (0,_propTypes__WEBPACK_IMPORTED_MODULE_8__.mapProps)(['shownViaNewRelationModal', 'field', 'viaResource', 'viaResourceId', 'viaRelationship', 'resourceName', 'resourceId', 'relatedResourceName', 'relatedResourceId'])), {}, { - syncEndpoint: { - type: String, - required: false - } - }), - data: function data() { - return { - dependentFieldDebouncer: null, - canceller: null, - watchedFields: {}, - watchedEvents: {}, - syncedField: null, - pivot: false, - editMode: 'create' - }; - }, - created: function created() { - this.dependentFieldDebouncer = lodash_debounce__WEBPACK_IMPORTED_MODULE_0___default()(function (callback) { - return callback(); - }, 50); - }, - mounted: function mounted() { - var _this = this; - if (this.relatedResourceName !== '' && !lodash_isNil__WEBPACK_IMPORTED_MODULE_5___default()(this.relatedResourceName)) { - this.pivot = true; - if (this.relatedResourceId !== '' && !lodash_isNil__WEBPACK_IMPORTED_MODULE_5___default()(this.relatedResourceId)) { - this.editMode = 'update-attached'; - } else { - this.editMode = 'attach'; - } - } else { - if (this.resourceId !== '' && !lodash_isNil__WEBPACK_IMPORTED_MODULE_5___default()(this.resourceId)) { - this.editMode = 'update'; - } - } - if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4___default()(this.dependsOn)) { - lodash_forIn__WEBPACK_IMPORTED_MODULE_1___default()(this.dependsOn, function (defaultValue, dependsOn) { - _this.watchedEvents[dependsOn] = function (value) { - _this.watchedFields[dependsOn] = value; - _this.dependentFieldDebouncer(function () { - _this.watchedFields[dependsOn] = value; - _this.syncField(); - }); - }; - _this.watchedFields[dependsOn] = defaultValue; - Nova.$on(_this.getFieldAttributeChangeEventName(dependsOn), _this.watchedEvents[dependsOn]); - }); - } - }, - beforeUnmount: function beforeUnmount() { - var _this2 = this; - if (this.canceller !== null) this.canceller(); - if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_4___default()(this.watchedEvents)) { - lodash_forIn__WEBPACK_IMPORTED_MODULE_1___default()(this.watchedEvents, function (event, dependsOn) { - Nova.$off(_this2.getFieldAttributeChangeEventName(dependsOn), event); - }); - } - }, - methods: { - /* - * Set the initial value for the field - */ - setInitialValue: function setInitialValue() { - this.value = !(this.currentField.value === undefined || this.currentField.value === null) ? this.currentField.value : this.value; - }, - /** - * Provide a function to fills FormData when field is visible. - */ - fillIfVisible: function fillIfVisible(formData, attribute, value) { - if (this.currentlyIsVisible) { - formData.append(attribute, value); - } - }, - syncField: function syncField() { - var _this3 = this; - if (this.canceller !== null) this.canceller(); - Nova.request().patch(this.syncEndpoint || this.syncFieldEndpoint, this.dependentFieldValues, { - params: lodash_pickBy__WEBPACK_IMPORTED_MODULE_6___default()({ - editing: true, - editMode: this.editMode, - viaResource: this.viaResource, - viaResourceId: this.viaResourceId, - viaRelationship: this.viaRelationship, - field: this.fieldAttribute, - component: this.field.dependentComponentKey - }, (lodash_identity__WEBPACK_IMPORTED_MODULE_3___default())), - cancelToken: new axios__WEBPACK_IMPORTED_MODULE_11__.CancelToken(function (canceller) { - _this3.canceller = canceller; - }) - }).then(function (response) { - var previousValue = _this3.currentField.value; - var wasVisible = _this3.currentlyIsVisible; - _this3.syncedField = response.data; - if (_this3.syncedField.visible !== wasVisible) { - _this3.$emit(_this3.syncedField.visible === true ? 'field-shown' : 'field-hidden', _this3.fieldAttribute); - } - if (lodash_isNil__WEBPACK_IMPORTED_MODULE_5___default()(_this3.syncedField.value)) { - _this3.syncedField.value = previousValue; - } else { - _this3.setInitialValue(); - } - var emitChangesEvent = !_this3.syncedFieldValueHasNotChanged(); - _this3.onSyncedField(); - if (_this3.syncedField.dependentShouldEmitChangesEvent && emitChangesEvent) { - _this3.emitOnSyncedFieldValueChange(); - } - })["catch"](function (e) { - if ((0,axios__WEBPACK_IMPORTED_MODULE_11__.isCancel)(e)) { - return; - } - throw e; - }); - }, - onSyncedField: function onSyncedField() { - // - }, - emitOnSyncedFieldValueChange: function emitOnSyncedFieldValueChange() { - this.emitFieldValueChange(this.field.attribute, this.currentField.value); - }, - syncedFieldValueHasNotChanged: function syncedFieldValueHasNotChanged() { - var _this$value; - var value = this.currentField.value; - if ((0,_util_filled__WEBPACK_IMPORTED_MODULE_9__["default"])(value)) { - return !(0,_util_filled__WEBPACK_IMPORTED_MODULE_9__["default"])(this.value); - } - return !lodash_isNil__WEBPACK_IMPORTED_MODULE_5___default()(value) && (value === null || value === void 0 ? void 0 : value.toString()) === ((_this$value = this.value) === null || _this$value === void 0 ? void 0 : _this$value.toString()); - } - }, - computed: { - /** - * Determine the current field - */ - currentField: function currentField() { - return this.syncedField || this.field; - }, - /** - * Determine if the field is in visible mode - */ - currentlyIsVisible: function currentlyIsVisible() { - return this.currentField.visible; - }, - /** - * Determine if the field is in readonly mode - */ - currentlyIsReadonly: function currentlyIsReadonly() { - if (this.syncedField !== null) { - return Boolean(this.syncedField.readonly || lodash_get__WEBPACK_IMPORTED_MODULE_2___default()(this.syncedField, 'extraAttributes.readonly')); - } - return Boolean(this.field.readonly || lodash_get__WEBPACK_IMPORTED_MODULE_2___default()(this.field, 'extraAttributes.readonly')); - }, - dependsOn: function dependsOn() { - return this.field.dependsOn || []; - }, - currentFieldValues: function currentFieldValues() { - return _defineProperty({}, this.fieldAttribute, this.value); - }, - dependentFieldValues: function dependentFieldValues() { - return _objectSpread(_objectSpread({}, this.currentFieldValues), this.watchedFields); - }, - encodedDependentFieldValues: function encodedDependentFieldValues() { - return btoa((0,_util_escapeUnicode__WEBPACK_IMPORTED_MODULE_10__.escapeUnicode)(JSON.stringify(this.dependentFieldValues))); - }, - syncFieldEndpoint: function syncFieldEndpoint() { - if (this.editMode === 'update-attached') { - return "/nova-api/".concat(this.resourceName, "/").concat(this.resourceId, "/update-pivot-fields/").concat(this.relatedResourceName, "/").concat(this.relatedResourceId); - } else if (this.editMode === 'attach') { - return "/nova-api/".concat(this.resourceName, "/").concat(this.resourceId, "/creation-pivot-fields/").concat(this.relatedResourceName); - } else if (this.editMode === 'update') { - return "/nova-api/".concat(this.resourceName, "/").concat(this.resourceId, "/update-fields"); - } - return "/nova-api/".concat(this.resourceName, "/creation-fields"); - } - } -}); - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/mixins/FieldValue.js": -/*!*******************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/mixins/FieldValue.js ***! - \*******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _util_filled__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/filled */ "../../vendor/laravel/nova/resources/js/util/filled.js"); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - props: ['field'], - methods: { - isEqualsToValue: function isEqualsToValue(value) { - var _this$field$value, _this$field$value2; - return Boolean(this.field.value === value || ((_this$field$value = this.field.value) === null || _this$field$value === void 0 ? void 0 : _this$field$value.toString()) === value || this.field.value === (value === null || value === void 0 ? void 0 : value.toString()) || ((_this$field$value2 = this.field.value) === null || _this$field$value2 === void 0 ? void 0 : _this$field$value2.toString()) === (value === null || value === void 0 ? void 0 : value.toString())); - } - }, - computed: { - fieldAttribute: function fieldAttribute() { - return this.field.attribute; - }, - fieldHasValue: function fieldHasValue() { - return (0,_util_filled__WEBPACK_IMPORTED_MODULE_0__["default"])(this.field.value); - }, - usesCustomizedDisplay: function usesCustomizedDisplay() { - return this.field.usesCustomizedDisplay && (0,_util_filled__WEBPACK_IMPORTED_MODULE_0__["default"])(this.field.displayedAs); - }, - fieldValue: function fieldValue() { - var _this$field$displayed; - if (!this.usesCustomizedDisplay && !this.fieldHasValue) { - return null; - } - return String((_this$field$displayed = this.field.displayedAs) !== null && _this$field$displayed !== void 0 ? _this$field$displayed : this.field.value); - }, - shouldDisplayAsHtml: function shouldDisplayAsHtml() { - return this.field.asHtml; - } - } -}); - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/mixins/FormEvents.js": -/*!*******************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/mixins/FormEvents.js ***! - \*******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isNil */ "../../vendor/laravel/nova/node_modules/lodash/isNil.js"); -/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isNil__WEBPACK_IMPORTED_MODULE_0__); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - props: { - formUniqueId: { - type: String - } - }, - methods: { - emitFieldValue: function emitFieldValue(attribute, value) { - Nova.$emit("".concat(attribute, "-value"), value); - if (this.hasFormUniqueId === true) { - Nova.$emit("".concat(this.formUniqueId, "-").concat(attribute, "-value"), value); - } - }, - emitFieldValueChange: function emitFieldValueChange(attribute, value) { - Nova.$emit("".concat(attribute, "-change"), value); - if (this.hasFormUniqueId === true) { - Nova.$emit("".concat(this.formUniqueId, "-").concat(attribute, "-change"), value); - } - }, - /** - * Get field attribute value event name. - */ - getFieldAttributeValueEventName: function getFieldAttributeValueEventName(attribute) { - return this.hasFormUniqueId === true ? "".concat(this.formUniqueId, "-").concat(attribute, "-value") : "".concat(attribute, "-value"); - }, - /** - * Get field attribue value event name. - */ - getFieldAttributeChangeEventName: function getFieldAttributeChangeEventName(attribute) { - return this.hasFormUniqueId === true ? "".concat(this.formUniqueId, "-").concat(attribute, "-change") : "".concat(attribute, "-change"); - } - }, - computed: { - /** - * Return the field attribute. - */ - fieldAttribute: function fieldAttribute() { - return this.field.attribute; - }, - /** - * Determine if the field has Form Unique ID. - */ - hasFormUniqueId: function hasFormUniqueId() { - return !lodash_isNil__WEBPACK_IMPORTED_MODULE_0___default()(this.formUniqueId) && this.formUniqueId !== ''; - }, - /** - * Get field attribue value event name. - */ - fieldAttributeValueEventName: function fieldAttributeValueEventName() { - return this.getFieldAttributeValueEventName(this.fieldAttribute); - }, - /** - * Get field attribue value event name. - */ - fieldAttributeChangeEventName: function fieldAttributeChangeEventName() { - return this.getFieldAttributeChangeEventName(this.fieldAttribute); - } - } -}); - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/mixins/FormField.js": -/*!******************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/mixins/FormField.js ***! - \******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/get */ "../../vendor/laravel/nova/node_modules/lodash/get.js"); -/* harmony import */ var lodash_get__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_get__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var _propTypes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./propTypes */ "../../vendor/laravel/nova/resources/js/mixins/propTypes.js"); -/* harmony import */ var _FormEvents__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./FormEvents */ "../../vendor/laravel/nova/resources/js/mixins/FormEvents.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - "extends": _FormEvents__WEBPACK_IMPORTED_MODULE_2__["default"], - props: _objectSpread({}, (0,_propTypes__WEBPACK_IMPORTED_MODULE_1__.mapProps)(['nested', 'shownViaNewRelationModal', 'field', 'viaResource', 'viaResourceId', 'viaRelationship', 'resourceName', 'resourceId', 'showHelpText', 'mode'])), - emits: ['field-changed'], - data: function data() { - return { - value: this.fieldDefaultValue() - }; - }, - created: function created() { - this.setInitialValue(); - }, - mounted: function mounted() { - // Add a default fill method for the field - this.field.fill = this.fill; - - // Register a global event for setting the field's value - Nova.$on(this.fieldAttributeValueEventName, this.listenToValueChanges); - }, - beforeUnmount: function beforeUnmount() { - Nova.$off(this.fieldAttributeValueEventName, this.listenToValueChanges); - }, - methods: { - /* - * Set the initial value for the field - */ - setInitialValue: function setInitialValue() { - this.value = !(this.field.value === undefined || this.field.value === null) ? this.field.value : this.fieldDefaultValue(); - }, - /** - * Return the field default value. - */ - fieldDefaultValue: function fieldDefaultValue() { - return ''; - }, - /** - * Provide a function that fills a passed FormData object with the - * field's internal value attribute - */ - fill: function fill(formData) { - this.fillIfVisible(formData, this.fieldAttribute, String(this.value)); - }, - /** - * Provide a function to fills FormData when field is visible. - */ - fillIfVisible: function fillIfVisible(formData, attribute, value) { - if (this.isVisible) { - formData.append(attribute, value); - } - }, - /** - * Update the field's internal value - */ - handleChange: function handleChange(event) { - this.value = event.target.value; - if (this.field) { - this.emitFieldValueChange(this.fieldAttribute, this.value); - this.$emit('field-changed'); - } - }, - /** - * Clean up any side-effects when removing this field dynamically (Repeater). - */ - beforeRemove: function beforeRemove() { - // - }, - listenToValueChanges: function listenToValueChanges(value) { - this.value = value; - } - }, - computed: { - /** - * Determine the current field. - */ - currentField: function currentField() { - return this.field; - }, - /** - * Determine if the field should use all the available white-space. - */ - fullWidthContent: function fullWidthContent() { - return this.currentField.fullWidth || this.field.fullWidth; - }, - /** - * Return the placeholder text for the field. - */ - placeholder: function placeholder() { - return this.currentField.placeholder || this.field.name; - }, - /** - * Determine if the field is in visible mode - */ - isVisible: function isVisible() { - return this.field.visible; - }, - /** - * Determine if the field is in readonly mode - */ - isReadonly: function isReadonly() { - return Boolean(this.field.readonly || lodash_get__WEBPACK_IMPORTED_MODULE_0___default()(this.field, 'extraAttributes.readonly')); - }, - /** - * Determine if the field is accessed from Action - */ - isActionRequest: function isActionRequest() { - return ['action-fullscreen', 'action-modal'].includes(this.mode); - } - } -}); - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/mixins/HandlesFieldAttachments.js": -/*!********************************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/mixins/HandlesFieldAttachments.js ***! - \********************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var form_backend_validation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! form-backend-validation */ "../../vendor/laravel/nova/node_modules/form-backend-validation/dist/index.js"); -/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/isNil */ "../../vendor/laravel/nova/node_modules/lodash/isNil.js"); -/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_isNil__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _propTypes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./propTypes */ "../../vendor/laravel/nova/resources/js/mixins/propTypes.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _toArray(arr) { return _arrayWithHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableRest(); } -function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; } -function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } -function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - emits: ['file-upload-started', 'file-upload-finished'], - props: (0,_propTypes__WEBPACK_IMPORTED_MODULE_2__.mapProps)(['resourceName']), - created: function created() { - var _this = this; - return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { - var _yield$Nova$request$g, draftId; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - if (!_this.field.withFiles) { - _context.next = 6; - break; - } - _context.next = 3; - return Nova.request().get("/nova-api/".concat(_this.resourceName, "/field-attachment/").concat(_this.fieldAttribute, "/draftId")); - case 3: - _yield$Nova$request$g = _context.sent; - draftId = _yield$Nova$request$g.data.draftId; - _this.draftId = draftId; - case 6: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - }, - data: function data() { - return { - draftId: null - }; - }, - methods: { - /** - * Upload an attachment - */ - uploadAttachment: function uploadAttachment(file, _ref) { - var _this2 = this; - var onUploadProgress = _ref.onUploadProgress, - onCompleted = _ref.onCompleted, - onFailure = _ref.onFailure; - var data = new FormData(); - data.append('Content-Type', file.type); - data.append('attachment', file); - data.append('draftId', this.draftId); - if (lodash_isNil__WEBPACK_IMPORTED_MODULE_1___default()(onUploadProgress)) { - onUploadProgress = function onUploadProgress() {}; - } - if (lodash_isNil__WEBPACK_IMPORTED_MODULE_1___default()(onFailure)) { - onFailure = function onFailure() {}; - } - if (lodash_isNil__WEBPACK_IMPORTED_MODULE_1___default()(onCompleted)) { - throw 'Missing onCompleted parameter'; - } - this.$emit('file-upload-started'); - Nova.request().post("/nova-api/".concat(this.resourceName, "/field-attachment/").concat(this.fieldAttribute), data, { - onUploadProgress: onUploadProgress - }).then(function (_ref2) { - var url = _ref2.data.url; - var response = onCompleted(url); - _this2.$emit('file-upload-finished'); - return response; - })["catch"](function (error) { - onFailure(error); - if (error.response.status == 422) { - var validationErrors = new form_backend_validation__WEBPACK_IMPORTED_MODULE_0__.Errors(error.response.data.errors); - Nova.error(_this2.__('An error occurred while uploading the file: :error', { - error: validationErrors.first('attachment') - })); - } else { - Nova.error(_this2.__('An error occurred while uploading the file.')); - } - }); - }, - /** - * Remove an attachment from the server - */ - removeAttachment: function removeAttachment(attachmentUrl) { - Nova.request()["delete"]("/nova-api/".concat(this.resourceName, "/field-attachment/").concat(this.fieldAttribute), { - params: { - attachmentUrl: attachmentUrl - } - }).then(function (response) {})["catch"](function (error) {}); - }, - /** - * Purge pending attachments for the draft - */ - clearAttachments: function clearAttachments() { - if (this.field.withFiles) { - Nova.request()["delete"]("/nova-api/".concat(this.resourceName, "/field-attachment/").concat(this.fieldAttribute, "/").concat(this.draftId)).then(function (response) {})["catch"](function (error) {}); - } - }, - /** - * Fill draft id for the field - */ - fillAttachmentDraftId: function fillAttachmentDraftId(formData) { - var attribute = this.fieldAttribute; - var _attribute$split = attribute.split('['), - _attribute$split2 = _toArray(_attribute$split), - name = _attribute$split2[0], - nested = _attribute$split2.slice(1); - if (!lodash_isNil__WEBPACK_IMPORTED_MODULE_1___default()(nested) && nested.length > 0) { - var last = nested.pop(); - if (nested.length > 0) { - attribute = "".concat(name, "[").concat(nested.join('['), "[").concat(last.slice(0, -1), "DraftId]"); - } else { - attribute = "".concat(name, "[").concat(last.slice(0, -1), "DraftId]"); - } - } else { - attribute = "".concat(attribute, "DraftId"); - } - this.fillIfVisible(formData, attribute, this.draftId); - } - } -}); - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/mixins/HandlesFormRequest.js": -/*!***************************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/mixins/HandlesFormRequest.js ***! - \***************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var form_backend_validation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! form-backend-validation */ "../../vendor/laravel/nova/node_modules/form-backend-validation/dist/index.js"); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - props: { - formUniqueId: { - type: String - } - }, - data: function data() { - return { - validationErrors: new form_backend_validation__WEBPACK_IMPORTED_MODULE_0__.Errors() - }; - }, - methods: { - /** - * Handle all response error. - */ - handleResponseError: function handleResponseError(error) { - if (error.response === undefined || error.response.status == 500) { - Nova.error(this.__('There was a problem submitting the form.')); - } else if (error.response.status == 422) { - this.validationErrors = new form_backend_validation__WEBPACK_IMPORTED_MODULE_0__.Errors(error.response.data.errors); - Nova.error(this.__('There was a problem submitting the form.')); - } else { - Nova.error(this.__('There was a problem submitting the form.') + ' "' + error.response.statusText + '"'); - } - }, - /** - * Handle creating response error. - */ - handleOnCreateResponseError: function handleOnCreateResponseError(error) { - this.handleResponseError(error); - }, - /** - * Handle updating response error. - */ - handleOnUpdateResponseError: function handleOnUpdateResponseError(error) { - if (error.response && error.response.status == 409) { - Nova.error(this.__('Another user has updated this resource since this page was loaded. Please refresh the page and try again.')); - } else { - this.handleResponseError(error); - } - }, - /** - * Reset validation errors. - */ - resetErrors: function resetErrors() { - this.validationErrors = new form_backend_validation__WEBPACK_IMPORTED_MODULE_0__.Errors(); - } - } -}); - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/mixins/HandlesPanelVisibility.js": -/*!*******************************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/mixins/HandlesPanelVisibility.js ***! - \*******************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var lodash_each__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/each */ "../../vendor/laravel/nova/node_modules/lodash/each.js"); -/* harmony import */ var lodash_each__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_each__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var lodash_filter__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! lodash/filter */ "../../vendor/laravel/nova/node_modules/lodash/filter.js"); -/* harmony import */ var lodash_filter__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_filter__WEBPACK_IMPORTED_MODULE_1__); - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - emits: ['field-shown', 'field-hidden'], - data: function data() { - return { - visibleFieldsForPanel: {} - }; - }, - created: function created() { - var _this = this; - lodash_each__WEBPACK_IMPORTED_MODULE_0___default()(this.panel.fields, function (field) { - _this.visibleFieldsForPanel[field.attribute] = field.visible; - }); - }, - methods: { - handleFieldShown: function handleFieldShown(field) { - this.visibleFieldsForPanel[field] = true; - this.$emit('field-shown', field); - }, - handleFieldHidden: function handleFieldHidden(field) { - this.visibleFieldsForPanel[field] = false; - this.$emit('field-hidden', field); - } - }, - computed: { - visibleFieldsCount: function visibleFieldsCount() { - return Object.entries(lodash_filter__WEBPACK_IMPORTED_MODULE_1___default()(this.visibleFieldsForPanel, function (visible) { - return visible === true; - })).length; - } - } -}); - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/mixins/HandlesUploads.js": -/*!***********************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/mixins/HandlesUploads.js ***! - \***********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - data: function data() { - return { - isWorking: false, - fileUploadsCount: 0 - }; - }, - methods: { - /** - * Handle file upload finishing - */ - handleFileUploadFinished: function handleFileUploadFinished() { - this.fileUploadsCount--; - if (this.fileUploadsCount < 1) { - this.fileUploadsCount = 0; - this.isWorking = false; - } - }, - /** - * Handle file upload starting - */ - handleFileUploadStarted: function handleFileUploadStarted() { - this.isWorking = true; - this.fileUploadsCount++; - } - } -}); - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/mixins/HandlesValidationErrors.js": -/*!********************************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/mixins/HandlesValidationErrors.js ***! - \********************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var form_backend_validation__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! form-backend-validation */ "../../vendor/laravel/nova/node_modules/form-backend-validation/dist/index.js"); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - props: { - errors: { - "default": function _default() { - return new form_backend_validation__WEBPACK_IMPORTED_MODULE_0__.Errors(); - } - } - }, - inject: { - index: { - "default": null - }, - viaParent: { - "default": null - } - }, - data: function data() { - return { - errorClass: 'form-control-bordered-error' - }; - }, - computed: { - errorClasses: function errorClasses() { - return this.hasError ? [this.errorClass] : []; - }, - fieldAttribute: function fieldAttribute() { - return this.field.attribute; - }, - validationKey: function validationKey() { - return this.nestedValidationKey || this.field.validationKey; - }, - hasError: function hasError() { - return this.errors.has(this.validationKey); - }, - firstError: function firstError() { - if (this.hasError) { - return this.errors.first(this.validationKey); - } - }, - nestedAttribute: function nestedAttribute() { - if (this.viaParent) { - return "".concat(this.viaParent, "[").concat(this.index, "][").concat(this.field.attribute, "]"); - } - }, - nestedValidationKey: function nestedValidationKey() { - if (this.viaParent) { - return "".concat(this.viaParent, ".").concat(this.index, ".fields.").concat(this.field.attribute); - } - } - } -}); - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/mixins/HasCards.js": -/*!*****************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/mixins/HasCards.js ***! - \*****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var lodash_filter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/filter */ "../../vendor/laravel/nova/node_modules/lodash/filter.js"); -/* harmony import */ var lodash_filter__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_filter__WEBPACK_IMPORTED_MODULE_0__); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; } -function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } -function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - props: { - loadCards: { - type: Boolean, - "default": true - } - }, - data: function data() { - return { - cards: [] - }; - }, - /** - * Fetch all of the metrics panels for this view - */ - created: function created() { - this.fetchCards(); - }, - watch: { - cardsEndpoint: function cardsEndpoint() { - this.fetchCards(); - } - }, - methods: { - fetchCards: function fetchCards() { - var _this = this; - return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() { - var _yield$Nova$request$g, cards; - return _regeneratorRuntime().wrap(function _callee$(_context) { - while (1) switch (_context.prev = _context.next) { - case 0: - if (!_this.loadCards) { - _context.next = 6; - break; - } - _context.next = 3; - return Nova.request().get(_this.cardsEndpoint, { - params: _this.extraCardParams - }); - case 3: - _yield$Nova$request$g = _context.sent; - cards = _yield$Nova$request$g.data; - _this.cards = cards; - case 6: - case "end": - return _context.stop(); - } - }, _callee); - }))(); - } - }, - computed: { - /** - * Determine whether we have cards to show on the Dashboard. - */ - shouldShowCards: function shouldShowCards() { - return this.cards.length > 0; - }, - /** - * Determine if the cards array contains some detail-only cards. - */ - hasDetailOnlyCards: function hasDetailOnlyCards() { - return lodash_filter__WEBPACK_IMPORTED_MODULE_0___default()(this.cards, function (c) { - return c.onlyOnDetail == true; - }).length > 0; - }, - /** - * Get the extra card params to pass to the endpoint. - */ - extraCardParams: function extraCardParams() { - return null; - } - } -}); - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/mixins/Localization.js": -/*!*********************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/mixins/Localization.js ***! - \*********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _util_localization__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../util/localization */ "../../vendor/laravel/nova/resources/js/util/localization.js"); - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - methods: { - /** - * Translate the given key. - */ - __: function __(key, replace) { - return (0,_util_localization__WEBPACK_IMPORTED_MODULE_0__["default"])(key, replace); - } - } -}); - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/mixins/MetricBehavior.js": -/*!***********************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/mixins/MetricBehavior.js ***! - \***********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - created: function created() { - Nova.$on('metric-refresh', this.fetch); - Nova.$on('resources-deleted', this.fetch); - Nova.$on('resources-detached', this.fetch); - Nova.$on('resources-restored', this.fetch); - if (this.card.refreshWhenActionRuns) { - Nova.$on('action-executed', this.fetch); - } - }, - beforeUnmount: function beforeUnmount() { - Nova.$off('metric-refresh', this.fetch); - Nova.$off('resources-deleted', this.fetch); - Nova.$off('resources-detached', this.fetch); - Nova.$off('resources-restored', this.fetch); - Nova.$off('action-executed', this.fetch); - } -}); - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/mixins/PreventsFormAbandonment.js": -/*!********************************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/mixins/PreventsFormAbandonment.js ***! - \********************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! vuex */ "../../vendor/laravel/nova/node_modules/vuex/dist/vuex.esm-bundler.js"); -/* harmony import */ var _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @inertiajs/inertia */ "../../vendor/laravel/nova/node_modules/@inertiajs/inertia/dist/index.js"); -/* harmony import */ var _util_filled__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../util/filled */ "../../vendor/laravel/nova/resources/js/util/filled.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } - - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - created: function created() { - var _this = this; - this.removeOnNavigationChangesEvent = _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_0__.Inertia.on('before', function (event) { - _this.removeOnNavigationChangesEvent(); - _this.handlePreventFormAbandonmentOnInertia(event); - }); - window.addEventListener('beforeunload', this.handlePreventFormAbandonmentOnInertia); - this.removeOnBeforeUnloadEvent = function () { - window.removeEventListener('beforeunload', _this.handlePreventFormAbandonmentOnInertia); - _this.removeOnBeforeUnloadEvent = function () {}; - }; - }, - mounted: function mounted() { - var _this2 = this; - window.onpopstate = function (event) { - _this2.handlePreventFormAbandonmentOnPopState(event); - }; - }, - beforeUnmount: function beforeUnmount() { - this.removeOnBeforeUnloadEvent(); - }, - unmounted: function unmounted() { - this.removeOnNavigationChangesEvent(); - this.resetPushState(); - }, - data: function data() { - return { - removeOnNavigationChangesEvent: null, - removeOnBeforeUnloadEvent: null, - navigateBackUsingHistory: true - }; - }, - methods: _objectSpread(_objectSpread({}, (0,vuex__WEBPACK_IMPORTED_MODULE_2__.mapMutations)(['allowLeavingForm', 'preventLeavingForm', 'triggerPushState', 'resetPushState'])), {}, { - /** - * Prevent accidental abandonment only if form was changed. - */ - updateFormStatus: function updateFormStatus() { - if (this.canLeaveForm === true) { - this.triggerPushState(); - } - this.preventLeavingForm(); - }, - enableNavigateBackUsingHistory: function enableNavigateBackUsingHistory() { - this.navigateBackUsingHistory = false; - }, - disableNavigateBackUsingHistory: function disableNavigateBackUsingHistory() { - this.navigateBackUsingHistory = false; - }, - handlePreventFormAbandonment: function handlePreventFormAbandonment(proceed, revert) { - if (this.canLeaveForm) { - proceed(); - return; - } - var answer = window.confirm(this.__('Do you really want to leave? You have unsaved changes.')); - if (answer) { - proceed(); - return; - } - revert(); - }, - handlePreventFormAbandonmentOnInertia: function handlePreventFormAbandonmentOnInertia(event) { - var _this3 = this; - this.handlePreventFormAbandonment(function () { - _this3.handleProceedingToNextPage(); - _this3.allowLeavingForm(); - }, function () { - _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_0__.Inertia.ignoreHistoryState = true; - event.preventDefault(); - event.returnValue = ''; - _this3.removeOnNavigationChangesEvent = _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_0__.Inertia.on('before', function (event) { - _this3.removeOnNavigationChangesEvent(); - _this3.handlePreventFormAbandonmentOnInertia(event); - }); - }); - }, - handlePreventFormAbandonmentOnPopState: function handlePreventFormAbandonmentOnPopState(event) { - var _this4 = this; - event.stopImmediatePropagation(); - event.stopPropagation(); - this.handlePreventFormAbandonment(function () { - _this4.handleProceedingToPreviousPage(); - _this4.allowLeavingForm(); - }, function () { - _this4.triggerPushState(); - }); - }, - handleProceedingToPreviousPage: function handleProceedingToPreviousPage() { - window.onpopstate = null; - _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_0__.Inertia.ignoreHistoryState = false; - this.removeOnBeforeUnloadEvent(); - if (!this.canLeaveFormToPreviousPage && this.navigateBackUsingHistory) { - window.history.back(); - } - }, - handleProceedingToNextPage: function handleProceedingToNextPage() { - window.onpopstate = null; - _inertiajs_inertia__WEBPACK_IMPORTED_MODULE_0__.Inertia.ignoreHistoryState = false; - this.removeOnBeforeUnloadEvent(); - }, - proceedToPreviousPage: function proceedToPreviousPage(url) { - if (this.navigateBackUsingHistory && window.history.length > 1) { - window.history.back(); - } else if (!this.navigateBackUsingHistory && (0,_util_filled__WEBPACK_IMPORTED_MODULE_1__["default"])(url)) { - Nova.visit(url, { - replace: true - }); - } else { - Nova.visit('/'); - } - } - }), - computed: _objectSpread({}, (0,vuex__WEBPACK_IMPORTED_MODULE_2__.mapGetters)(['canLeaveForm', 'canLeaveFormToPreviousPage'])) -}); - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/mixins/PreventsModalAbandonment.js": -/*!*********************************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/mixins/PreventsModalAbandonment.js ***! - \*********************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var vuex__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! vuex */ "../../vendor/laravel/nova/node_modules/vuex/dist/vuex.esm-bundler.js"); -function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); } -function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } -function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } -function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } -function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; } -function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); } - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ - props: { - show: { - type: Boolean, - "default": false - } - }, - methods: _objectSpread(_objectSpread({}, (0,vuex__WEBPACK_IMPORTED_MODULE_0__.mapMutations)(['allowLeavingModal', 'preventLeavingModal'])), {}, { - /** - * Prevent accidental abandonment only if form was changed. - */ - updateModalStatus: function updateModalStatus() { - this.preventLeavingModal(); - }, - handlePreventModalAbandonment: function handlePreventModalAbandonment(proceed, revert) { - if (this.canLeaveModal) { - proceed(); - return; - } - if (window.confirm(this.__('Do you really want to leave? You have unsaved changes.'))) { - this.allowLeavingModal(); - proceed(); - return; - } - revert(); - } - }), - computed: _objectSpread({}, (0,vuex__WEBPACK_IMPORTED_MODULE_0__.mapGetters)(['canLeaveModal'])) -}); - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/mixins/packages.js": -/*!*****************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/mixins/packages.js ***! - \*****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ CopiesToClipboard: () => (/* reexport safe */ _CopiesToClipboard__WEBPACK_IMPORTED_MODULE_1__["default"]), -/* harmony export */ DependentFormField: () => (/* reexport safe */ _DependentFormField__WEBPACK_IMPORTED_MODULE_4__["default"]), -/* harmony export */ Errors: () => (/* reexport safe */ form_backend_validation__WEBPACK_IMPORTED_MODULE_16__.Errors), -/* harmony export */ FieldValue: () => (/* reexport safe */ _FieldValue__WEBPACK_IMPORTED_MODULE_9__["default"]), -/* harmony export */ FormEvents: () => (/* reexport safe */ _FormEvents__WEBPACK_IMPORTED_MODULE_10__["default"]), -/* harmony export */ FormField: () => (/* reexport safe */ _FormField__WEBPACK_IMPORTED_MODULE_11__["default"]), -/* harmony export */ HandlesFieldAttachments: () => (/* reexport safe */ _HandlesFieldAttachments__WEBPACK_IMPORTED_MODULE_12__["default"]), -/* harmony export */ HandlesFormRequest: () => (/* reexport safe */ _HandlesFormRequest__WEBPACK_IMPORTED_MODULE_5__["default"]), -/* harmony export */ HandlesPanelVisibility: () => (/* reexport safe */ _HandlesPanelVisibility__WEBPACK_IMPORTED_MODULE_15__["default"]), -/* harmony export */ HandlesUploads: () => (/* reexport safe */ _HandlesUploads__WEBPACK_IMPORTED_MODULE_6__["default"]), -/* harmony export */ HandlesValidationErrors: () => (/* reexport safe */ _HandlesValidationErrors__WEBPACK_IMPORTED_MODULE_13__["default"]), -/* harmony export */ HasCards: () => (/* reexport safe */ _HasCards__WEBPACK_IMPORTED_MODULE_14__["default"]), -/* harmony export */ Localization: () => (/* reexport safe */ _Localization__WEBPACK_IMPORTED_MODULE_7__["default"]), -/* harmony export */ MetricBehavior: () => (/* reexport safe */ _MetricBehavior__WEBPACK_IMPORTED_MODULE_8__["default"]), -/* harmony export */ PreventsFormAbandonment: () => (/* reexport safe */ _PreventsFormAbandonment__WEBPACK_IMPORTED_MODULE_2__["default"]), -/* harmony export */ PreventsModalAbandonment: () => (/* reexport safe */ _PreventsModalAbandonment__WEBPACK_IMPORTED_MODULE_3__["default"]), -/* harmony export */ mapProps: () => (/* reexport safe */ _propTypes__WEBPACK_IMPORTED_MODULE_0__.mapProps), -/* harmony export */ useCopyValueToClipboard: () => (/* reexport safe */ _CopiesToClipboard__WEBPACK_IMPORTED_MODULE_1__.useCopyValueToClipboard), -/* harmony export */ useLocalization: () => (/* reexport safe */ _composables_useLocalization__WEBPACK_IMPORTED_MODULE_17__.useLocalization) -/* harmony export */ }); -/* harmony import */ var _propTypes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./propTypes */ "../../vendor/laravel/nova/resources/js/mixins/propTypes.js"); -/* harmony import */ var _CopiesToClipboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./CopiesToClipboard */ "../../vendor/laravel/nova/resources/js/mixins/CopiesToClipboard.js"); -/* harmony import */ var _PreventsFormAbandonment__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PreventsFormAbandonment */ "../../vendor/laravel/nova/resources/js/mixins/PreventsFormAbandonment.js"); -/* harmony import */ var _PreventsModalAbandonment__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./PreventsModalAbandonment */ "../../vendor/laravel/nova/resources/js/mixins/PreventsModalAbandonment.js"); -/* harmony import */ var _DependentFormField__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./DependentFormField */ "../../vendor/laravel/nova/resources/js/mixins/DependentFormField.js"); -/* harmony import */ var _HandlesFormRequest__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./HandlesFormRequest */ "../../vendor/laravel/nova/resources/js/mixins/HandlesFormRequest.js"); -/* harmony import */ var _HandlesUploads__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./HandlesUploads */ "../../vendor/laravel/nova/resources/js/mixins/HandlesUploads.js"); -/* harmony import */ var _Localization__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./Localization */ "../../vendor/laravel/nova/resources/js/mixins/Localization.js"); -/* harmony import */ var _MetricBehavior__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./MetricBehavior */ "../../vendor/laravel/nova/resources/js/mixins/MetricBehavior.js"); -/* harmony import */ var _FieldValue__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./FieldValue */ "../../vendor/laravel/nova/resources/js/mixins/FieldValue.js"); -/* harmony import */ var _FormEvents__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./FormEvents */ "../../vendor/laravel/nova/resources/js/mixins/FormEvents.js"); -/* harmony import */ var _FormField__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./FormField */ "../../vendor/laravel/nova/resources/js/mixins/FormField.js"); -/* harmony import */ var _HandlesFieldAttachments__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./HandlesFieldAttachments */ "../../vendor/laravel/nova/resources/js/mixins/HandlesFieldAttachments.js"); -/* harmony import */ var _HandlesValidationErrors__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./HandlesValidationErrors */ "../../vendor/laravel/nova/resources/js/mixins/HandlesValidationErrors.js"); -/* harmony import */ var _HasCards__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./HasCards */ "../../vendor/laravel/nova/resources/js/mixins/HasCards.js"); -/* harmony import */ var _HandlesPanelVisibility__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./HandlesPanelVisibility */ "../../vendor/laravel/nova/resources/js/mixins/HandlesPanelVisibility.js"); -/* harmony import */ var form_backend_validation__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! form-backend-validation */ "../../vendor/laravel/nova/node_modules/form-backend-validation/dist/index.js"); -/* harmony import */ var _composables_useLocalization__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../composables/useLocalization */ "../../vendor/laravel/nova/resources/js/composables/useLocalization.js"); - - - - - - - - - - - - - - - - - - - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/mixins/propTypes.js": -/*!******************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/mixins/propTypes.js ***! - \******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ mapProps: () => (/* binding */ mapProps) -/* harmony export */ }); -/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/pick */ "../../vendor/laravel/nova/node_modules/lodash/pick.js"); -/* harmony import */ var lodash_pick__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_pick__WEBPACK_IMPORTED_MODULE_0__); - -var propTypes = { - nested: { - type: Boolean, - "default": false - }, - preventInitialLoading: { - type: Boolean, - "default": false - }, - showHelpText: { - type: Boolean, - "default": false - }, - shownViaNewRelationModal: { - type: Boolean, - "default": false - }, - resourceId: { - type: [Number, String] - }, - resourceName: { - type: String - }, - relatedResourceId: { - type: [Number, String] - }, - relatedResourceName: { - type: String - }, - field: { - type: Object, - required: true - }, - viaResource: { - type: String, - required: false - }, - viaResourceId: { - type: [String, Number], - required: false - }, - viaRelationship: { - type: String, - required: false - }, - relationshipType: { - type: String, - "default": '' - }, - shouldOverrideMeta: { - type: Boolean, - "default": false - }, - disablePagination: { - type: Boolean, - "default": false - }, - clickAction: { - type: String, - "default": 'view', - validator: function validator(val) { - return ['edit', 'select', 'ignore', 'detail'].includes(val); - } - }, - mode: { - type: String, - "default": 'form', - validator: function validator(v) { - return ['form', 'modal', 'action-modal', 'action-fullscreen'].includes(v); - } - } -}; -function mapProps(attributes) { - return lodash_pick__WEBPACK_IMPORTED_MODULE_0___default()(propTypes, attributes); -} - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/util/escapeUnicode.js": -/*!********************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/util/escapeUnicode.js ***! - \********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ escapeUnicode: () => (/* binding */ escapeUnicode) -/* harmony export */ }); -function escapeUnicode(str) { - return str.replace(/[^\0-~]/g, function (c) { - return "\\u" + ('000' + c.charCodeAt().toString(16)).slice(-4); - }); -} - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/util/filled.js": -/*!*************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/util/filled.js ***! - \*************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ filled) -/* harmony export */ }); -/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/isNil */ "../../vendor/laravel/nova/node_modules/lodash/isNil.js"); -/* harmony import */ var lodash_isNil__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_isNil__WEBPACK_IMPORTED_MODULE_0__); - -function filled(value) { - return Boolean(!lodash_isNil__WEBPACK_IMPORTED_MODULE_0___default()(value) && value !== ''); -} - -/***/ }), - -/***/ "../../vendor/laravel/nova/resources/js/util/localization.js": -/*!*******************************************************************!*\ - !*** ../../vendor/laravel/nova/resources/js/util/localization.js ***! - \*******************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ __) -/* harmony export */ }); -/* harmony import */ var lodash_forEach__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! lodash/forEach */ "../../vendor/laravel/nova/node_modules/lodash/forEach.js"); -/* harmony import */ var lodash_forEach__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_forEach__WEBPACK_IMPORTED_MODULE_0__); - -function __(key, replace) { - var translation = Nova.config('translations')[key] ? Nova.config('translations')[key] : key; - lodash_forEach__WEBPACK_IMPORTED_MODULE_0___default()(replace, function (value, key) { - key = new String(key); - if (value === null) { - console.error("Translation '".concat(translation, "' for key '").concat(key, "' contains a null replacement.")); - return; - } - value = new String(value); - var searches = [':' + key, ':' + key.toUpperCase(), ':' + key.charAt(0).toUpperCase() + key.slice(1)]; - var replacements = [value, value.toUpperCase(), value.charAt(0).toUpperCase() + value.slice(1)]; - for (var i = searches.length - 1; i >= 0; i--) { - translation = translation.replace(searches[i], replacements[i]); - } - }); - return translation; -} - -/***/ }), - -/***/ "./resources/css/tool.css": -/*!********************************!*\ - !*** ./resources/css/tool.css ***! - \********************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -// extracted by mini-css-extract-plugin - - -/***/ }), - -/***/ "./node_modules/vue-loader/dist/exportHelper.js": -/*!******************************************************!*\ - !*** ./node_modules/vue-loader/dist/exportHelper.js ***! - \******************************************************/ -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -// runtime helper for setting properties on components -// in a tree-shakable way -exports["default"] = (sfc, props) => { - const target = sfc.__vccOpts || sfc; - for (const [key, val] of props) { - target[key] = val; - } - return target; -}; - - -/***/ }), - -/***/ "./resources/js/pages/NoSettings.vue": -/*!*******************************************!*\ - !*** ./resources/js/pages/NoSettings.vue ***! - \*******************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _NoSettings_vue_vue_type_template_id_6c40e566__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./NoSettings.vue?vue&type=template&id=6c40e566 */ "./resources/js/pages/NoSettings.vue?vue&type=template&id=6c40e566"); -/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js"); - -const script = {} - -; -const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_1__["default"])(script, [['render',_NoSettings_vue_vue_type_template_id_6c40e566__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/pages/NoSettings.vue"]]) -/* hot reload */ -if (false) {} - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__); - -/***/ }), - -/***/ "./resources/js/pages/Settings.vue": -/*!*****************************************!*\ - !*** ./resources/js/pages/Settings.vue ***! - \*****************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) -/* harmony export */ }); -/* harmony import */ var _Settings_vue_vue_type_template_id_882405a8__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Settings.vue?vue&type=template&id=882405a8 */ "./resources/js/pages/Settings.vue?vue&type=template&id=882405a8"); -/* harmony import */ var _Settings_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Settings.vue?vue&type=script&lang=js */ "./resources/js/pages/Settings.vue?vue&type=script&lang=js"); -/* harmony import */ var _node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../node_modules/vue-loader/dist/exportHelper.js */ "./node_modules/vue-loader/dist/exportHelper.js"); - - - - -; -const __exports__ = /*#__PURE__*/(0,_node_modules_vue_loader_dist_exportHelper_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_Settings_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_1__["default"], [['render',_Settings_vue_vue_type_template_id_882405a8__WEBPACK_IMPORTED_MODULE_0__.render],['__file',"resources/js/pages/Settings.vue"]]) -/* hot reload */ -if (false) {} - - -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__exports__); - -/***/ }), - -/***/ "./resources/js/pages/Settings.vue?vue&type=script&lang=js": -/*!*****************************************************************!*\ - !*** ./resources/js/pages/Settings.vue?vue&type=script&lang=js ***! - \*****************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Settings_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__["default"]) -/* harmony export */ }); -/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Settings_vue_vue_type_script_lang_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./Settings.vue?vue&type=script&lang=js */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/Settings.vue?vue&type=script&lang=js"); - - -/***/ }), - -/***/ "./resources/js/pages/NoSettings.vue?vue&type=template&id=6c40e566": -/*!*************************************************************************!*\ - !*** ./resources/js/pages/NoSettings.vue?vue&type=template&id=6c40e566 ***! - \*************************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_NoSettings_vue_vue_type_template_id_6c40e566__WEBPACK_IMPORTED_MODULE_0__.render) -/* harmony export */ }); -/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_NoSettings_vue_vue_type_template_id_6c40e566__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./NoSettings.vue?vue&type=template&id=6c40e566 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/NoSettings.vue?vue&type=template&id=6c40e566"); - - -/***/ }), - -/***/ "./resources/js/pages/Settings.vue?vue&type=template&id=882405a8": -/*!***********************************************************************!*\ - !*** ./resources/js/pages/Settings.vue?vue&type=template&id=882405a8 ***! - \***********************************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ render: () => (/* reexport safe */ _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Settings_vue_vue_type_template_id_882405a8__WEBPACK_IMPORTED_MODULE_0__.render) -/* harmony export */ }); -/* harmony import */ var _node_modules_babel_loader_lib_index_js_clonedRuleSet_5_use_0_node_modules_vue_loader_dist_templateLoader_js_ruleSet_1_rules_2_node_modules_vue_loader_dist_index_js_ruleSet_0_use_0_Settings_vue_vue_type_template_id_882405a8__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./Settings.vue?vue&type=template&id=882405a8 */ "./node_modules/babel-loader/lib/index.js??clonedRuleSet-5.use[0]!./node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!./node_modules/vue-loader/dist/index.js??ruleSet[0].use[0]!./resources/js/pages/Settings.vue?vue&type=template&id=882405a8"); - - -/***/ }), - -/***/ "../../vendor/laravel/nova/node_modules/@inertiajs/inertia/dist/index.js": -/*!*******************************************************************************!*\ - !*** ../../vendor/laravel/nova/node_modules/@inertiajs/inertia/dist/index.js ***! - \*******************************************************************************/ -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - -function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}var t=e(__webpack_require__(/*! axios */ "../../vendor/laravel/nova/node_modules/@inertiajs/inertia/node_modules/axios/index.js")),n=__webpack_require__(/*! qs */ "../../vendor/laravel/nova/node_modules/qs/lib/index.js"),i=e(__webpack_require__(/*! deepmerge */ "../../vendor/laravel/nova/node_modules/deepmerge/dist/cjs.js"));function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t0&&"back_forward"===window.performance.getEntriesByType("navigation")[0].type},n.handleBackForwardVisit=function(e){var t=this;window.history.state.version=e.version,this.setPage(window.history.state,{preserveScroll:!0,preserveState:!0}).then(function(){t.restoreScrollPositions(),m(e)})},n.locationVisit=function(e,t){try{window.sessionStorage.setItem("inertiaLocationVisit",JSON.stringify({preserveScroll:t})),window.location.href=e.href,p(window.location).href===p(e).href&&window.location.reload()}catch(e){return!1}},n.isLocationVisit=function(){try{return null!==window.sessionStorage.getItem("inertiaLocationVisit")}catch(e){return!1}},n.handleLocationVisit=function(e){var t,n,i,r,o=this,s=JSON.parse(window.sessionStorage.getItem("inertiaLocationVisit")||"");window.sessionStorage.removeItem("inertiaLocationVisit"),e.url+=window.location.hash,e.rememberedState=null!=(t=null==(n=window.history.state)?void 0:n.rememberedState)?t:{},e.scrollRegions=null!=(i=null==(r=window.history.state)?void 0:r.scrollRegions)?i:[],this.setPage(e,{preserveScroll:s.preserveScroll,preserveState:!0}).then(function(){s.preserveScroll&&o.restoreScrollPositions(),m(e)})},n.isLocationVisitResponse=function(e){return e&&409===e.status&&e.headers["x-inertia-location"]},n.isInertiaResponse=function(e){return null==e?void 0:e.headers["x-inertia"]},n.createVisitId=function(){return this.visitId={},this.visitId},n.cancelVisit=function(e,t){var n=t.cancelled,i=void 0!==n&&n,r=t.interrupted,o=void 0!==r&&r;!e||e.completed||e.cancelled||e.interrupted||(e.cancelToken.cancel(),e.onCancel(),e.completed=!1,e.cancelled=i,e.interrupted=o,v(e),e.onFinish(e))},n.finishVisit=function(e){e.cancelled||e.interrupted||(e.completed=!0,e.cancelled=!1,e.interrupted=!1,v(e),e.onFinish(e))},n.resolvePreserveOption=function(e,t){return"function"==typeof e?e(t):"errors"===e?Object.keys(t.props.errors||{}).length>0:e},n.visit=function(e,n){var i=this,o=void 0===n?{}:n,a=o.method,l=void 0===a?exports.Method.GET:a,d=o.data,v=void 0===d?{}:d,m=o.replace,g=void 0!==m&&m,w=o.preserveScroll,y=void 0!==w&&w,S=o.preserveState,b=void 0!==S&&S,E=o.only,P=void 0===E?[]:E,T=o.headers,I=void 0===T?{}:T,x=o.errorBag,V=void 0===x?"":x,L=o.forceFormData,O=void 0!==L&&L,k=o.onCancelToken,C=void 0===k?function(){}:k,M=o.onBefore,A=void 0===M?function(){}:M,j=o.onStart,F=void 0===j?function(){}:j,R=o.onProgress,D=void 0===R?function(){}:R,B=o.onFinish,q=void 0===B?function(){}:B,N=o.onCancel,H=void 0===N?function(){}:N,W=o.onSuccess,G=void 0===W?function(){}:W,U=o.onError,X=void 0===U?function(){}:U,J=o.queryStringArrayFormat,K=void 0===J?"brackets":J,_="string"==typeof e?u(e):e;if(!function e(t){return t instanceof File||t instanceof Blob||t instanceof FileList&&t.length>0||t instanceof FormData&&Array.from(t.values()).some(function(t){return e(t)})||"object"==typeof t&&null!==t&&Object.values(t).some(function(t){return e(t)})}(v)&&!O||v instanceof FormData||(v=c(v)),!(v instanceof FormData)){var z=h(l,_,v,K),Q=z[1];_=u(z[0]),v=Q}var Y={url:_,method:l,data:v,replace:g,preserveScroll:y,preserveState:b,only:P,headers:I,errorBag:V,forceFormData:O,queryStringArrayFormat:K,cancelled:!1,completed:!1,interrupted:!1};if(!1!==A(Y)&&function(e){return f("before",{cancelable:!0,detail:{visit:e}})}(Y)){this.activeVisit&&this.cancelVisit(this.activeVisit,{interrupted:!0}),this.saveScrollPositions();var Z=this.createVisitId();this.activeVisit=r({},Y,{onCancelToken:C,onBefore:A,onStart:F,onProgress:D,onFinish:q,onCancel:H,onSuccess:G,onError:X,queryStringArrayFormat:K,cancelToken:t.CancelToken.source()}),C({cancel:function(){i.activeVisit&&i.cancelVisit(i.activeVisit,{cancelled:!0})}}),function(e){f("start",{detail:{visit:e}})}(Y),F(Y),t({method:l,url:p(_).href,data:l===exports.Method.GET?{}:v,params:l===exports.Method.GET?v:{},cancelToken:this.activeVisit.cancelToken.token,headers:r({},I,{Accept:"text/html, application/xhtml+xml","X-Requested-With":"XMLHttpRequest","X-Inertia":!0},P.length?{"X-Inertia-Partial-Component":this.page.component,"X-Inertia-Partial-Data":P.join(",")}:{},V&&V.length?{"X-Inertia-Error-Bag":V}:{},this.page.version?{"X-Inertia-Version":this.page.version}:{}),onUploadProgress:function(e){v instanceof FormData&&(e.percentage=Math.round(e.loaded/e.total*100),function(e){f("progress",{detail:{progress:e}})}(e),D(e))}}).then(function(e){var t;if(!i.isInertiaResponse(e))return Promise.reject({response:e});var n=e.data;P.length&&n.component===i.page.component&&(n.props=r({},i.page.props,n.props)),y=i.resolvePreserveOption(y,n),(b=i.resolvePreserveOption(b,n))&&null!=(t=window.history.state)&&t.rememberedState&&n.component===i.page.component&&(n.rememberedState=window.history.state.rememberedState);var o=_,s=u(n.url);return o.hash&&!s.hash&&p(o).href===s.href&&(s.hash=o.hash,n.url=s.href),i.setPage(n,{visitId:Z,replace:g,preserveScroll:y,preserveState:b})}).then(function(){var e=i.page.props.errors||{};if(Object.keys(e).length>0){var t=V?e[V]?e[V]:{}:e;return function(e){f("error",{detail:{errors:e}})}(t),X(t)}return f("success",{detail:{page:i.page}}),G(i.page)}).catch(function(e){if(i.isInertiaResponse(e.response))return i.setPage(e.response.data,{visitId:Z});if(i.isLocationVisitResponse(e.response)){var t=u(e.response.headers["x-inertia-location"]),n=_;n.hash&&!t.hash&&p(n).href===t.href&&(t.hash=n.hash),i.locationVisit(t,!0===y)}else{if(!e.response)return Promise.reject(e);f("invalid",{cancelable:!0,detail:{response:e.response}})&&s.show(e.response.data)}}).then(function(){i.activeVisit&&i.finishVisit(i.activeVisit)}).catch(function(e){if(!t.isCancel(e)){var n=f("exception",{cancelable:!0,detail:{exception:e}});if(i.activeVisit&&i.finishVisit(i.activeVisit),n)return Promise.reject(e)}})}},n.setPage=function(e,t){var n=this,i=void 0===t?{}:t,r=i.visitId,o=void 0===r?this.createVisitId():r,s=i.replace,a=void 0!==s&&s,c=i.preserveScroll,l=void 0!==c&&c,d=i.preserveState,h=void 0!==d&&d;return Promise.resolve(this.resolveComponent(e.component)).then(function(t){o===n.visitId&&(e.scrollRegions=e.scrollRegions||[],e.rememberedState=e.rememberedState||{},(a=a||u(e.url).href===window.location.href)?n.replaceState(e):n.pushState(e),n.swapComponent({component:t,page:e,preserveState:h}).then(function(){l||n.resetScrollPositions(),a||m(e)}))})},n.pushState=function(e){this.page=e,window.history.pushState(e,"",e.url)},n.replaceState=function(e){this.page=e,window.history.replaceState(e,"",e.url)},n.handlePopstateEvent=function(e){var t=this;if(null!==e.state){var n=e.state,i=this.createVisitId();Promise.resolve(this.resolveComponent(n.component)).then(function(e){i===t.visitId&&(t.page=n,t.swapComponent({component:e,page:n,preserveState:!1}).then(function(){t.restoreScrollPositions(),m(n)}))})}else{var o=u(this.page.url);o.hash=window.location.hash,this.replaceState(r({},this.page,{url:o.href})),this.resetScrollPositions()}},n.get=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),this.visit(e,r({},n,{method:exports.Method.GET,data:t}))},n.reload=function(e){return void 0===e&&(e={}),this.visit(window.location.href,r({},e,{preserveScroll:!0,preserveState:!0}))},n.replace=function(e,t){var n;return void 0===t&&(t={}),console.warn("Inertia.replace() has been deprecated and will be removed in a future release. Please use Inertia."+(null!=(n=t.method)?n:"get")+"() instead."),this.visit(e,r({preserveState:!0},t,{replace:!0}))},n.post=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),this.visit(e,r({preserveState:!0},n,{method:exports.Method.POST,data:t}))},n.put=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),this.visit(e,r({preserveState:!0},n,{method:exports.Method.PUT,data:t}))},n.patch=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),this.visit(e,r({preserveState:!0},n,{method:exports.Method.PATCH,data:t}))},n.delete=function(e,t){return void 0===t&&(t={}),this.visit(e,r({preserveState:!0},t,{method:exports.Method.DELETE}))},n.remember=function(e,t){var n,i;void 0===t&&(t="default"),g||this.replaceState(r({},this.page,{rememberedState:r({},null==(n=this.page)?void 0:n.rememberedState,(i={},i[t]=e,i))}))},n.restore=function(e){var t,n;if(void 0===e&&(e="default"),!g)return null==(t=window.history.state)||null==(n=t.rememberedState)?void 0:n[e]},n.on=function(e,t){var n=function(e){var n=t(e);e.cancelable&&!e.defaultPrevented&&!1===n&&e.preventDefault()};return document.addEventListener("inertia:"+e,n),function(){return document.removeEventListener("inertia:"+e,n)}},e}(),y={buildDOMElement:function(e){var t=document.createElement("template");t.innerHTML=e;var n=t.content.firstChild;if(!e.startsWith("