From 904bfa8ca2b1a3bd0aeaf75ba9e8565b5caf49f2 Mon Sep 17 00:00:00 2001 From: Horilla Date: Thu, 20 Feb 2025 12:23:04 +0530 Subject: [PATCH] [FIX] #509 --- package.json | 4 +- static/build/js/web.frontend.js | 353 +- static/build/js/web.frontend.min.js | 54494 +++++++++++++------------- 3 files changed, 27133 insertions(+), 27718 deletions(-) diff --git a/package.json b/package.json index b31e7fbc3..f3262485c 100755 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "description": "", "main": "src/index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "echo \"Error: no test specified\" && exit 1", + "dev":"npm run development", + "development":"mix" }, "repository": { "type": "git", diff --git a/static/build/js/web.frontend.js b/static/build/js/web.frontend.js index ed9fe6fab..a45877949 100644 --- a/static/build/js/web.frontend.js +++ b/static/build/js/web.frontend.js @@ -2980,10 +2980,10 @@ var module_default = src_default; /***/ }), -/***/ "./src/js/modules/dashboard/Calendar.js": -/*!**********************************************!*\ - !*** ./src/js/modules/dashboard/Calendar.js ***! - \**********************************************/ +/***/ "./static/src/js/modules/dashboard/Calendar.js": +/*!*****************************************************!*\ + !*** ./static/src/js/modules/dashboard/Calendar.js ***! + \*****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; @@ -3076,10 +3076,10 @@ var Calendar = /*#__PURE__*/function () { /***/ }), -/***/ "./src/js/modules/dashboard/Dashboard.js": -/*!***********************************************!*\ - !*** ./src/js/modules/dashboard/Dashboard.js ***! - \***********************************************/ +/***/ "./static/src/js/modules/dashboard/Dashboard.js": +/*!******************************************************!*\ + !*** ./static/src/js/modules/dashboard/Dashboard.js ***! + \******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; @@ -3190,10 +3190,10 @@ var Dashboard = /*#__PURE__*/function () { /***/ }), -/***/ "./src/js/modules/dashboard/Generic.js": -/*!*********************************************!*\ - !*** ./src/js/modules/dashboard/Generic.js ***! - \*********************************************/ +/***/ "./static/src/js/modules/dashboard/Generic.js": +/*!****************************************************!*\ + !*** ./static/src/js/modules/dashboard/Generic.js ***! + \****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; @@ -3258,10 +3258,6 @@ var Generic = /*#__PURE__*/function () { jquery__WEBPACK_IMPORTED_MODULE_0___default()("#sidebar").on("mouseover", this.sidebarReveal.bind(this)); // Navbar Toggler jquery__WEBPACK_IMPORTED_MODULE_0___default()(".oh-navbar__toggle-link").on("click", this.sidebarToggle.bind(this)); - // Navbar Toggler - jquery__WEBPACK_IMPORTED_MODULE_0___default()(".oh-onboarding-card__collapse-header").on("click", this.registrationCollapse.bind(this)); - // Toggle Dropdown - jquery__WEBPACK_IMPORTED_MODULE_0___default()(".oh-dropdown--trigger").on("click", this.dropDownTrigger.bind(this)); // Remove Keayboard jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on("keyup", this.keyboardRemove.bind(this)); @@ -3476,28 +3472,6 @@ var Generic = /*#__PURE__*/function () { sidebarContainer.addClass("oh-wrapper-main--closed"); } } - /** - * Registration Collapse - */ - }, { - key: "registrationCollapse", - value: function registrationCollapse(e) { - var collapseEl = jquery__WEBPACK_IMPORTED_MODULE_0___default()(e.target).closest(".oh-onboarding-card__collapse-header").parent(".oh-onboarding-card__collapse"); - jquery__WEBPACK_IMPORTED_MODULE_0___default()(collapseEl).toggleClass("oh-onboarding-card__collapse--show"); - } - - /** - * Toggle Dropdown - */ - }, { - key: "dropDownTrigger", - value: function dropDownTrigger(e) { - var clickedEl = jquery__WEBPACK_IMPORTED_MODULE_0___default()(e.target).closest(".oh-dropdown--trigger"); - var dropdownEl = clickedEl.children(".oh-dropdown__menu"); - if (dropdownEl && (jquery__WEBPACK_IMPORTED_MODULE_0___default()(e.target).hasClass('oh-dropdown--button') || jquery__WEBPACK_IMPORTED_MODULE_0___default()(e.target).parent().hasClass('oh-dropdown--button'))) { - dropdownEl.toggleClass("oh-dropdown__menu--hidden"); - } - } }]); return Generic; }(); @@ -3505,10 +3479,10 @@ var Generic = /*#__PURE__*/function () { /***/ }), -/***/ "./src/js/modules/dashboard/ImageSelect.js": -/*!*************************************************!*\ - !*** ./src/js/modules/dashboard/ImageSelect.js ***! - \*************************************************/ +/***/ "./static/src/js/modules/dashboard/ImageSelect.js": +/*!********************************************************!*\ + !*** ./static/src/js/modules/dashboard/ImageSelect.js ***! + \********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; @@ -3601,90 +3575,10 @@ var SelectDropDown = /*#__PURE__*/function () { /***/ }), -/***/ "./src/js/modules/dashboard/ImageUpload.js": -/*!*************************************************!*\ - !*** ./src/js/modules/dashboard/ImageUpload.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 jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); -/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } - -var ImageUpload = /*#__PURE__*/function () { - function ImageUpload() { - _classCallCheck(this, ImageUpload); - this.events(); - } - - // Events - _createClass(ImageUpload, [{ - key: "events", - value: function events() { - // Change image on upload. - jquery__WEBPACK_IMPORTED_MODULE_0___default()(".oh-upload-input").on("change", this.uploadImage.bind(this)); - // Remove uploaded image preview. - jquery__WEBPACK_IMPORTED_MODULE_0___default()(".oh-remove-image").on("click", this.removeImage.bind(this)); - } - - // Methods - - /** - * Upload Image - */ - }, { - key: "uploadImage", - value: function uploadImage(e) { - var inputEl = e.target.closest('.oh-upload-input'); - var targetSelector = inputEl.dataset.target; - this.readUploadPath(inputEl, targetSelector); - } - /** - * Read Uploaded Image Path - */ - }, { - key: "readUploadPath", - value: function readUploadPath(input, renderTarget) { - if (input.files && input.files[0]) { - var reader = new FileReader(); - reader.onload = function (e) { - jquery__WEBPACK_IMPORTED_MODULE_0___default()(renderTarget).attr("src", e.target.result); - }; - reader.readAsDataURL(input.files[0]); - } - } - /** - * Remove Uploaded Image Preview - */ - }, { - key: "removeImage", - value: function removeImage(e) { - var clickedEl = jquery__WEBPACK_IMPORTED_MODULE_0___default()(e.target).closest('.oh-remove-image'); - var targetSelector = clickedEl.data('target'); - jquery__WEBPACK_IMPORTED_MODULE_0___default()(targetSelector).attr('src', '/static/images/ui/user.jpg'); - jquery__WEBPACK_IMPORTED_MODULE_0___default()('.oh-upload-input').val(''); - } - }]); - return ImageUpload; -}(); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ImageUpload); - -/***/ }), - -/***/ "./src/js/modules/dashboard/Inputs.js": -/*!********************************************!*\ - !*** ./src/js/modules/dashboard/Inputs.js ***! - \********************************************/ +/***/ "./static/src/js/modules/dashboard/Inputs.js": +/*!***************************************************!*\ + !*** ./static/src/js/modules/dashboard/Inputs.js ***! + \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; @@ -3923,10 +3817,10 @@ var Inputs = /*#__PURE__*/function () { /***/ }), -/***/ "./src/js/modules/dashboard/Kanban.js": -/*!********************************************!*\ - !*** ./src/js/modules/dashboard/Kanban.js ***! - \********************************************/ +/***/ "./static/src/js/modules/dashboard/Kanban.js": +/*!***************************************************!*\ + !*** ./static/src/js/modules/dashboard/Kanban.js ***! + \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; @@ -4087,7 +3981,7 @@ var Kanban = /*#__PURE__*/function () { var formData = jquery__WEBPACK_IMPORTED_MODULE_0___default()(e.target).serializeArray(); jquery__WEBPACK_IMPORTED_MODULE_0___default().each(formData, function (i, field) { if (field.name === "kanban-section-name" && field.value.length > 0) { - var kanbanSection = "\n
\n
\n ").concat(field.value.trim(), "\n
\n \n \n \n
\n \n \n
\n
\n \n \n \n
\n
\n
\n
\n
\n \n
\n Cancel\n \n
\n
\n
\n
\n \n "); + var kanbanSection = "\n
\n
\n ").concat(field.value.trim(), "\n
\n \n \n \n
\n \n \n
\n
\n \n \n \n
\n
\n
\n
\n
\n \n
\n Cancel\n \n
\n
\n
\n
\n \n "); if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(".oh-kanban .oh-kanban__section:nth-last-child(2)").length > 0) { jquery__WEBPACK_IMPORTED_MODULE_0___default()(kanbanSection).insertAfter(".oh-kanban .oh-kanban__section:nth-last-child(2)"); } else { @@ -4112,11 +4006,11 @@ var Kanban = /*#__PURE__*/function () { jquery__WEBPACK_IMPORTED_MODULE_0___default().each(formData, function (i, field) { if (field.name === "kanban-card-name" && field.value) { if (type === "asset") { - var kanbanCard = "\n
\n
\n
\n ").concat(field.value.trim(), "\n
\n
\n \n \n \n \n
\n \n \n
\n
\n \n
\n
\n \n \n "); + var kanbanCard = "\n
\n
\n
\n ").concat(field.value.trim(), "\n
\n
\n \n \n \n\n
\n \n \n
\n
\n\n
\n
\n \n \n "); // Add the card to section body jquery__WEBPACK_IMPORTED_MODULE_0___default()(e.target).parents(".oh-kanban-group__body").append(kanbanCard); } else { - var _kanbanCard = "\n
\n
\n
\n
\n \n
\n ").concat(field.value.trim(), "\n
\n
\n \n \n \n \n
\n \n \n
\n
\n \n
\n
\n
\n Candidate\n
\n \n "); + var _kanbanCard = "\n
\n
\n
\n
\n \n
\n ").concat(field.value.trim(), "\n
\n
\n \n \n \n\n
\n \n \n
\n
\n\n
\n
\n
\n Candidate\n
\n \n "); // Add the card to section body jquery__WEBPACK_IMPORTED_MODULE_0___default()(e.target).parents(".oh-kanban__section-body").append(_kanbanCard); } @@ -4284,10 +4178,10 @@ var Kanban = /*#__PURE__*/function () { /***/ }), -/***/ "./src/js/modules/dashboard/LoadLayout.js": -/*!************************************************!*\ - !*** ./src/js/modules/dashboard/LoadLayout.js ***! - \************************************************/ +/***/ "./static/src/js/modules/dashboard/LoadLayout.js": +/*!*******************************************************!*\ + !*** ./static/src/js/modules/dashboard/LoadLayout.js ***! + \*******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; @@ -4335,10 +4229,10 @@ var LoadLayout = /*#__PURE__*/function () { /***/ }), -/***/ "./src/js/modules/dashboard/ModalDialog.js": -/*!*************************************************!*\ - !*** ./src/js/modules/dashboard/ModalDialog.js ***! - \*************************************************/ +/***/ "./static/src/js/modules/dashboard/ModalDialog.js": +/*!********************************************************!*\ + !*** ./static/src/js/modules/dashboard/ModalDialog.js ***! + \********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; @@ -4427,68 +4321,10 @@ var ModalDialog = /*#__PURE__*/function () { /***/ }), -/***/ "./src/js/modules/dashboard/OrgChart.js": -/*!**********************************************!*\ - !*** ./src/js/modules/dashboard/OrgChart.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 jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"); -/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__); -function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } -function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } -function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); } -function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } - -__webpack_require__(/*! orgchart */ "./node_modules/orgchart/dist/js/jquery.orgchart.min.js"); -var OrgChart = /*#__PURE__*/function () { - function OrgChart() { - _classCallCheck(this, OrgChart); - this.events(); - } - - // Events - _createClass(OrgChart, [{ - key: "events", - value: function events() { - // Trigger OrgChart initialization on window load. - jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on("load", this.initOrgChart.bind(this)); - } - - // Methods - - /** - * Initialize OrgChart - */ - }, { - key: "initOrgChart", - value: function initOrgChart() { - var chartDisplayEl = jquery__WEBPACK_IMPORTED_MODULE_0___default()("#chart-container"); - if (chartDisplayEl.length > 0) { - jquery__WEBPACK_IMPORTED_MODULE_0___default()("#chart-container").orgchart({ - data: datascource, - nodeContent: "title" - }); - } - } - }]); - return OrgChart; -}(); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (OrgChart); - -/***/ }), - -/***/ "./src/js/modules/dashboard/Recruitment.js": -/*!*************************************************!*\ - !*** ./src/js/modules/dashboard/Recruitment.js ***! - \*************************************************/ +/***/ "./static/src/js/modules/dashboard/Recruitment.js": +/*!********************************************************!*\ + !*** ./static/src/js/modules/dashboard/Recruitment.js ***! + \********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; @@ -4540,10 +4376,10 @@ var Recruitment = /*#__PURE__*/function () { /***/ }), -/***/ "./src/js/modules/dashboard/ResizeInput.js": -/*!*************************************************!*\ - !*** ./src/js/modules/dashboard/ResizeInput.js ***! - \*************************************************/ +/***/ "./static/src/js/modules/dashboard/ResizeInput.js": +/*!********************************************************!*\ + !*** ./static/src/js/modules/dashboard/ResizeInput.js ***! + \********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; @@ -4599,10 +4435,10 @@ var SelectDropDown = /*#__PURE__*/function () { /***/ }), -/***/ "./src/js/modules/dashboard/Specifics.js": -/*!***********************************************!*\ - !*** ./src/js/modules/dashboard/Specifics.js ***! - \***********************************************/ +/***/ "./static/src/js/modules/dashboard/Specifics.js": +/*!******************************************************!*\ + !*** ./static/src/js/modules/dashboard/Specifics.js ***! + \******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; @@ -4674,10 +4510,10 @@ var Specifics = /*#__PURE__*/function () { /***/ }), -/***/ "./src/js/modules/dashboard/Tables.js": -/*!********************************************!*\ - !*** ./src/js/modules/dashboard/Tables.js ***! - \********************************************/ +/***/ "./static/src/js/modules/dashboard/Tables.js": +/*!***************************************************!*\ + !*** ./static/src/js/modules/dashboard/Tables.js ***! + \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; @@ -4917,10 +4753,10 @@ var Tables = /*#__PURE__*/function () { /***/ }), -/***/ "./src/js/modules/dashboard/Tabs.js": -/*!******************************************!*\ - !*** ./src/js/modules/dashboard/Tabs.js ***! - \******************************************/ +/***/ "./static/src/js/modules/dashboard/Tabs.js": +/*!*************************************************!*\ + !*** ./static/src/js/modules/dashboard/Tabs.js ***! + \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; @@ -4935,7 +4771,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var jquery_ui_ui_widgets_sortable__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! jquery-ui/ui/widgets/sortable */ "./node_modules/jquery-ui/ui/widgets/sortable.js"); /* harmony import */ var jquery_ui_ui_widgets_sortable__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jquery_ui_ui_widgets_sortable__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! uuid */ "./node_modules/uuid/dist/esm-browser/v4.js"); -/* harmony import */ var _Tables__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Tables */ "./src/js/modules/dashboard/Tables.js"); +/* harmony import */ var _Tables__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Tables */ "./static/src/js/modules/dashboard/Tables.js"); function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } } @@ -5361,7 +5197,7 @@ var Tabs = /*#__PURE__*/function (_Tables) { if (i == 0) { tableRow += "\n
\n \n
\n
\n \"User\"\n
\n \n
\n
"); } else { - tableRow += "\n
\n \n
"); + tableRow += "\n
\n \n
"); } }); @@ -5397,10 +5233,10 @@ var Tabs = /*#__PURE__*/function (_Tables) { /***/ }), -/***/ "./src/js/modules/dashboard/Tooltip.js": -/*!*********************************************!*\ - !*** ./src/js/modules/dashboard/Tooltip.js ***! - \*********************************************/ +/***/ "./static/src/js/modules/dashboard/Tooltip.js": +/*!****************************************************!*\ + !*** ./static/src/js/modules/dashboard/Tooltip.js ***! + \****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; @@ -20826,19 +20662,6 @@ return jQuery; !function(e,t){ true?module.exports=t():0}(window,(function(){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var a=[],r=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],i=["January","February","March","April","May","June","July","August","September","October","November","December"],o={t:"top",r:"right",b:"bottom",l:"left",c:"centered"};function s(){}var l=["click","focusin","keydown","input"];function d(e){l.forEach((function(t){e.addEventListener(t,e===document?L:Y)}))}function c(e){return Array.isArray(e)?e.map(c):"[object Object]"===x(e)?Object.keys(e).reduce((function(t,n){return t[n]=c(e[n]),t}),{}):e}function u(e,t){var n=e.calendar.querySelector(".qs-overlay"),a=n&&!n.classList.contains("qs-hidden");t=t||new Date(e.currentYear,e.currentMonth),e.calendar.innerHTML=[h(t,e,a),f(t,e,a),v(e,a)].join(""),a&&window.requestAnimationFrame((function(){M(!0,e)}))}function h(e,t,n){return['
','
','
',''+t.months[e.getMonth()]+"",''+e.getFullYear()+"","
",'
',"
"].join("")}function f(e,t,n){var a=t.currentMonth,r=t.currentYear,i=t.dateSelected,o=t.maxDate,s=t.minDate,l=t.showAllDates,d=t.days,c=t.disabledDates,u=t.startDay,h=t.weekendIndices,f=t.events,v=t.getRange?t.getRange():{},m=+v.start,y=+v.end,p=g(new Date(e).setDate(1)),w=p.getDay()-u,D=w<0?7:0;p.setMonth(p.getMonth()+1),p.setDate(0);var b=p.getDate(),q=[],S=D+7*((w+b)/7|0);S+=(w+b)%7?7:0;for(var M=1;M<=S;M++){var E=(M-1)%7,x=d[E],C=M-(w>=0?w:7+w),L=new Date(r,a,C),Y=f[+L],j=C<1||C>b,O=j?C<1?-1:1:0,P=j&&!l,k=P?"":L.getDate(),N=+L==+i,_=E===h[0]||E===h[1],I=m!==y,A="qs-square "+x;Y&&!P&&(A+=" qs-event"),j&&(A+=" qs-outside-current-month"),!l&&j||(A+=" qs-num"),N&&(A+=" qs-active"),(c[+L]||t.disabler(L)||_&&t.noWeekends||s&&+L<+s||o&&+L>+o)&&!P&&(A+=" qs-disabled"),+g(new Date)==+L&&(A+=" qs-current"),+L===m&&y&&I&&(A+=" qs-range-start"),+L>m&&+L'+k+"")}var R=d.map((function(e){return'
'+e+"
"})).concat(q);return R.unshift('
'),R.push("
"),R.join("")}function v(e,t){var n=e.overlayPlaceholder,a=e.overlayButton;return['
',"
",'','
',"
",'
'+e.overlayMonths.map((function(e,t){return'
'+e+"
"})).join("")+"
",'
'+a+"
","
"].join("")}function m(e,t,n){var a=t.el,r=t.calendar.querySelector(".qs-active"),i=e.textContent,o=t.sibling;(a.disabled||a.readOnly)&&t.respectDisabledReadOnly||(t.dateSelected=n?void 0:new Date(t.currentYear,t.currentMonth,i),r&&r.classList.remove("qs-active"),n||e.classList.add("qs-active"),p(a,t,n),n||q(t),o&&(y({instance:t,deselect:n}),t.first&&!o.dateSelected&&(o.currentYear=t.currentYear,o.currentMonth=t.currentMonth,o.currentMonthName=t.currentMonthName),u(t),u(o)),t.onSelect(t,n?void 0:new Date(t.dateSelected)))}function y(e){var t=e.instance.first?e.instance:e.instance.sibling,n=t.sibling;t===e.instance?e.deselect?(t.minDate=t.originalMinDate,n.minDate=n.originalMinDate):n.minDate=t.dateSelected:e.deselect?(n.maxDate=n.originalMaxDate,t.maxDate=t.originalMaxDate):t.maxDate=n.dateSelected}function p(e,t,n){if(!t.nonInput)return n?e.value="":t.formatter!==s?t.formatter(e,t.dateSelected,t):void(e.value=t.dateSelected.toDateString())}function w(e,t,n,a){n||a?(n&&(t.currentYear=+n),a&&(t.currentMonth=+a)):(t.currentMonth+=e.contains("qs-right")?1:-1,12===t.currentMonth?(t.currentMonth=0,t.currentYear++):-1===t.currentMonth&&(t.currentMonth=11,t.currentYear--)),t.currentMonthName=t.months[t.currentMonth],u(t),t.onMonthChange(t)}function D(e){if(!e.noPosition){var t=e.position.top,n=e.position.right;if(e.position.centered)return e.calendarContainer.classList.add("qs-centered");var a=e.positionedEl.getBoundingClientRect(),r=e.el.getBoundingClientRect(),i=e.calendarContainer.getBoundingClientRect(),o=r.top-a.top+(t?-1*i.height:r.height)+"px",s=r.left-a.left+(n?r.width-i.width:0)+"px";e.calendarContainer.style.setProperty("top",o),e.calendarContainer.style.setProperty("left",s)}}function b(e){return"[object Date]"===x(e)&&"Invalid Date"!==e.toString()}function g(e){if(b(e)||"number"==typeof e&&!isNaN(e)){var t=new Date(+e);return new Date(t.getFullYear(),t.getMonth(),t.getDate())}}function q(e){e.disabled||!e.calendarContainer.classList.contains("qs-hidden")&&!e.alwaysShow&&("overlay"!==e.defaultView&&M(!0,e),e.calendarContainer.classList.add("qs-hidden"),e.onHide(e))}function S(e){e.disabled||(e.calendarContainer.classList.remove("qs-hidden"),"overlay"===e.defaultView&&M(!1,e),D(e),e.onShow(e))}function M(e,t){var n=t.calendar,a=n.querySelector(".qs-overlay"),r=a.querySelector(".qs-overlay-year"),i=n.querySelector(".qs-controls"),o=n.querySelector(".qs-squares");e?(a.classList.add("qs-hidden"),i.classList.remove("qs-blur"),o.classList.remove("qs-blur"),r.value=""):(a.classList.remove("qs-hidden"),i.classList.add("qs-blur"),o.classList.add("qs-blur"),r.focus())}function E(e,t,n,a){var r=isNaN(+(new Date).setFullYear(t.value||void 0)),i=r?null:t.value;if(13===e.which||13===e.keyCode||"click"===e.type)a?w(null,n,i,a):r||t.classList.contains("qs-disabled")||w(null,n,i);else if(n.calendar.contains(t)){n.calendar.querySelector(".qs-submit").classList[r?"add":"remove"]("qs-disabled")}}function x(e){return{}.toString.call(e)}function C(e){a.forEach((function(t){t!==e&&q(t)}))}function L(e){if(!e.__qs_shadow_dom){var t=e.which||e.keyCode,n=e.type,r=e.target,o=r.classList,s=a.filter((function(e){return e.calendar.contains(r)||e.el===r}))[0],l=s&&s.calendar.contains(r);if(!(s&&s.isMobile&&s.disableMobile))if("click"===n){if(!s)return a.forEach(q);if(s.disabled)return;var d=s.calendar,c=s.calendarContainer,h=s.disableYearOverlay,f=s.nonInput,v=d.querySelector(".qs-overlay-year"),y=!!d.querySelector(".qs-hidden"),p=d.querySelector(".qs-month-year").contains(r),D=r.dataset.monthNum;if(s.noPosition&&!l)(c.classList.contains("qs-hidden")?S:q)(s);else if(o.contains("qs-arrow"))w(o,s);else if(p||o.contains("qs-close"))h||M(!y,s);else if(D)E(e,v,s,D);else{if(o.contains("qs-disabled"))return;if(o.contains("qs-num")){var b=r.textContent,g=+r.dataset.direction,x=new Date(s.currentYear,s.currentMonth+g,b);if(g){s.currentYear=x.getFullYear(),s.currentMonth=x.getMonth(),s.currentMonthName=i[s.currentMonth],u(s);for(var L,Y=s.calendar.querySelectorAll('[data-direction="0"]'),j=0;!L;){var O=Y[j];O.textContent===b&&(L=O),j++}r=L}return void(+x==+s.dateSelected?m(r,s,!0):r.classList.contains("qs-disabled")||m(r,s))}o.contains("qs-submit")?E(e,v,s):f&&r===s.el&&(S(s),C(s))}}else if("focusin"===n&&s)S(s),C(s);else if("keydown"===n&&9===t&&s)q(s);else if("keydown"===n&&s&&!s.disabled){var P=!s.calendar.querySelector(".qs-overlay").classList.contains("qs-hidden");13===t&&P&&l?E(e,r,s):27===t&&P&&l&&M(!0,s)}else if("input"===n){if(!s||!s.calendar.contains(r))return;var k=s.calendar.querySelector(".qs-submit"),N=r.value.split("").reduce((function(e,t){return e||"0"!==t?e+(t.match(/[0-9]/)?t:""):""}),"").slice(0,4);r.value=N,k.classList[4===N.length?"remove":"add"]("qs-disabled")}}}function Y(e){L(e),e.__qs_shadow_dom=!0}function j(e,t){l.forEach((function(n){e.removeEventListener(n,t)}))}function O(){S(this)}function P(){q(this)}function k(e,t){var n=g(e),a=this.currentYear,r=this.currentMonth,i=this.sibling;if(null==e)return this.dateSelected=void 0,p(this.el,this,!0),i&&(y({instance:this,deselect:!0}),u(i)),u(this),this;if(!b(e))throw new Error("`setDate` needs a JavaScript Date object.");if(this.disabledDates[+n]||nthis.maxDate)throw new Error("You can't manually set a date that's disabled.");this.dateSelected=n,t&&(this.currentYear=n.getFullYear(),this.currentMonth=n.getMonth(),this.currentMonthName=this.months[n.getMonth()]),p(this.el,this),i&&(y({instance:this}),u(i));var o=a===n.getFullYear()&&r===n.getMonth();return o||t?u(this,n):o||u(this,new Date(a,r,1)),this}function N(e){return I(this,e,!0)}function _(e){return I(this,e)}function I(e,t,n){var a=e.dateSelected,r=e.first,i=e.sibling,o=e.minDate,s=e.maxDate,l=g(t),d=n?"Min":"Max";function c(){return"original"+d+"Date"}function h(){return d.toLowerCase()+"Date"}function f(){return"set"+d}function v(){throw new Error("Out-of-range date passed to "+f())}if(null==t)e[c()]=void 0,i?(i[c()]=void 0,n?(r&&!a||!r&&!i.dateSelected)&&(e.minDate=void 0,i.minDate=void 0):(r&&!i.dateSelected||!r&&!a)&&(e.maxDate=void 0,i.maxDate=void 0)):e[h()]=void 0;else{if(!b(t))throw new Error("Invalid date passed to "+f());i?((r&&n&&l>(a||s)||r&&!n&&l<(i.dateSelected||o)||!r&&n&&l>(i.dateSelected||s)||!r&&!n&&l<(a||o))&&v(),e[c()]=l,i[c()]=l,(n&&(r&&!a||!r&&!i.dateSelected)||!n&&(r&&!i.dateSelected||!r&&!a))&&(e[h()]=l,i[h()]=l)):((n&&l>(a||s)||!n&&l<(a||o))&&v(),e[h()]=l)}return i&&u(i),u(e),e}function A(){var e=this.first?this:this.sibling,t=e.sibling;return{start:e.dateSelected,end:t.dateSelected}}function R(){var e=this.shadowDom,t=this.positionedEl,n=this.calendarContainer,r=this.sibling,i=this;this.inlinePosition&&(a.some((function(e){return e!==i&&e.positionedEl===t}))||t.style.setProperty("position",null));n.remove(),a=a.filter((function(e){return e!==i})),r&&delete r.sibling,a.length||j(document,L);var o=a.some((function(t){return t.shadowDom===e}));for(var s in e&&!o&&j(e,Y),this)delete this[s];a.length||l.forEach((function(e){document.removeEventListener(e,L)}))}function F(e,t){var n=new Date(e);if(!b(n))throw new Error("Invalid date passed to `navigate`");this.currentYear=n.getFullYear(),this.currentMonth=n.getMonth(),u(this),t&&this.onMonthChange(this)}function B(){var e=!this.calendarContainer.classList.contains("qs-hidden"),t=!this.calendarContainer.querySelector(".qs-overlay").classList.contains("qs-hidden");e&&M(t,this)}t.default=function(e,t){var n=function(e,t){var n,l,d=function(e){var t=c(e);t.events&&(t.events=t.events.reduce((function(e,t){if(!b(t))throw new Error('"options.events" must only contain valid JavaScript Date objects.');return e[+g(t)]=!0,e}),{}));["startDate","dateSelected","minDate","maxDate"].forEach((function(e){var n=t[e];if(n&&!b(n))throw new Error('"options.'+e+'" needs to be a valid JavaScript Date object.');t[e]=g(n)}));var n=t.position,i=t.maxDate,l=t.minDate,d=t.dateSelected,u=t.overlayPlaceholder,h=t.overlayButton,f=t.startDay,v=t.id;if(t.startDate=g(t.startDate||d||new Date),t.disabledDates=(t.disabledDates||[]).reduce((function(e,t){var n=+g(t);if(!b(t))throw new Error('You supplied an invalid date to "options.disabledDates".');if(n===+g(d))throw new Error('"disabledDates" cannot contain the same date as "dateSelected".');return e[n]=1,e}),{}),t.hasOwnProperty("id")&&null==v)throw new Error("`id` cannot be `null` or `undefined`");if(null!=v){var m=a.filter((function(e){return e.id===v}));if(m.length>1)throw new Error("Only two datepickers can share an id.");m.length?(t.second=!0,t.sibling=m[0]):t.first=!0}var y=["tr","tl","br","bl","c"].some((function(e){return n===e}));if(n&&!y)throw new Error('"options.position" must be one of the following: tl, tr, bl, br, or c.');function p(e){throw new Error('"dateSelected" in options is '+(e?"less":"greater")+' than "'+(e||"max")+'Date".')}if(t.position=function(e){var t=e[0],n=e[1],a={};a[o[t]]=1,n&&(a[o[n]]=1);return a}(n||"bl"),id&&p("min"),i0&&f<7){var w=(t.customDays||r).slice(),D=w.splice(0,f);t.customDays=w.concat(D),t.startDay=+f,t.weekendIndices=[w.length-1,w.length]}else t.startDay=0,t.weekendIndices=[6,0];"string"!=typeof u&&delete t.overlayPlaceholder;"string"!=typeof h&&delete t.overlayButton;var q=t.defaultView;if(q&&"calendar"!==q&&"overlay"!==q)throw new Error('options.defaultView must either be "calendar" or "overlay".');return t.defaultView=q||"calendar",t}(t||{startDate:g(new Date),position:"bl",defaultView:"calendar"}),u=e;if("string"==typeof u)u="#"===u[0]?document.getElementById(u.slice(1)):document.querySelector(u);else{if("[object ShadowRoot]"===x(u))throw new Error("Using a shadow DOM as your selector is not supported.");for(var h,f=u.parentNode;!h;){var v=x(f);"[object HTMLDocument]"===v?h=!0:"[object ShadowRoot]"===v?(h=!0,n=f,l=f.host):f=f.parentNode}}if(!u)throw new Error("No selector / element found.");if(a.some((function(e){return e.el===u})))throw new Error("A datepicker already exists on that element.");var m=u===document.body,y=n?u.parentElement||n:m?document.body:u.parentElement,w=n?u.parentElement||l:y,D=document.createElement("div"),q=document.createElement("div");D.className="qs-datepicker-container qs-hidden",q.className="qs-datepicker";var M={shadowDom:n,customElement:l,positionedEl:w,el:u,parent:y,nonInput:"INPUT"!==u.nodeName,noPosition:m,position:!m&&d.position,startDate:d.startDate,dateSelected:d.dateSelected,disabledDates:d.disabledDates,minDate:d.minDate,maxDate:d.maxDate,noWeekends:!!d.noWeekends,weekendIndices:d.weekendIndices,calendarContainer:D,calendar:q,currentMonth:(d.startDate||d.dateSelected).getMonth(),currentMonthName:(d.months||i)[(d.startDate||d.dateSelected).getMonth()],currentYear:(d.startDate||d.dateSelected).getFullYear(),events:d.events||{},defaultView:d.defaultView,setDate:k,remove:R,setMin:N,setMax:_,show:O,hide:P,navigate:F,toggleOverlay:B,onSelect:d.onSelect,onShow:d.onShow,onHide:d.onHide,onMonthChange:d.onMonthChange,formatter:d.formatter,disabler:d.disabler,months:d.months||i,days:d.customDays||r,startDay:d.startDay,overlayMonths:d.overlayMonths||(d.months||i).map((function(e){return e.slice(0,3)})),overlayPlaceholder:d.overlayPlaceholder||"4-digit year",overlayButton:d.overlayButton||"Submit",disableYearOverlay:!!d.disableYearOverlay,disableMobile:!!d.disableMobile,isMobile:"ontouchstart"in window,alwaysShow:!!d.alwaysShow,id:d.id,showAllDates:!!d.showAllDates,respectDisabledReadOnly:!!d.respectDisabledReadOnly,first:d.first,second:d.second};if(d.sibling){var E=d.sibling,C=M,L=E.minDate||C.minDate,Y=E.maxDate||C.maxDate;C.sibling=E,E.sibling=C,E.minDate=L,E.maxDate=Y,C.minDate=L,C.maxDate=Y,E.originalMinDate=L,E.originalMaxDate=Y,C.originalMinDate=L,C.originalMaxDate=Y,E.getRange=A,C.getRange=A}d.dateSelected&&p(u,M);var j=getComputedStyle(w).position;m||j&&"static"!==j||(M.inlinePosition=!0,w.style.setProperty("position","relative"));var I=a.filter((function(e){return e.positionedEl===M.positionedEl}));I.some((function(e){return e.inlinePosition}))&&(M.inlinePosition=!0,I.forEach((function(e){e.inlinePosition=!0})));D.appendChild(q),y.appendChild(D),M.alwaysShow&&S(M);return M}(e,t);if(a.length||d(document),n.shadowDom&&(a.some((function(e){return e.shadowDom===n.shadowDom}))||d(n.shadowDom)),a.push(n),n.second){var l=n.sibling;y({instance:n,deselect:!n.dateSelected}),y({instance:l,deselect:!l.dateSelected}),u(l)}return u(n,n.startDate||n.dateSelected),n.alwaysShow&&D(n),n}}]).default})); -/***/ }), - -/***/ "./node_modules/orgchart/dist/js/jquery.orgchart.min.js": -/*!**************************************************************!*\ - !*** ./node_modules/orgchart/dist/js/jquery.orgchart.min.js ***! - \**************************************************************/ -/***/ ((module, __unused_webpack_exports, __webpack_require__) => { - -"use strict"; -!function(e){ true&&"object"==typeof module.exports?e(__webpack_require__(/*! jquery */ "./node_modules/jquery/dist/jquery.js"),window,document):e(jQuery,window,document)}(function(l,h,c,d){function t(e,t){this.$chartContainer=l(e),this.opts=t,this.defaultOptions={icons:{theme:"oci",parentNode:"oci-menu",expandToUp:"oci-chevron-up",collapseToDown:"oci-chevron-down",collapseToLeft:"oci-chevron-left",expandToRight:"oci-chevron-right",collapsed:"oci-plus-square",expanded:"oci-minus-square",spinner:"oci-spinner"},nodeTitle:"name",nodeId:"id",toggleSiblingsResp:!1,visibleLevel:999,chartClass:"",exportButton:!1,exportButtonName:"Export",exportFilename:"OrgChart",exportFileextension:"png",draggable:!1,direction:"t2b",pan:!1,zoom:!1,zoominLimit:7,zoomoutLimit:.5}}t.prototype={init:function(e){var n=this,e=(this.options=l.extend({},this.defaultOptions,this.opts,e),this.$chartContainer),t=(this.$chart&&this.$chart.remove(),this.options.data),i=this.$chart=l("
",{data:{options:this.options},class:"orgchart"+(""!==this.options.chartClass?" "+this.options.chartClass:"")+("t2b"!==this.options.direction?" "+this.options.direction:""),click:function(e){l(e.target).closest(".node").length||i.find(".node.focused").removeClass("focused")}}),s=("undefined"!=typeof MutationObserver&&this.triggerInitEvent(),i.append(l('
')).find(".hierarchy"));return"object"===l.type(t)?t instanceof l?this.buildHierarchy(s,this.buildJsonDS(t.children()),0,this.options):this.buildHierarchy(s,this.options.ajaxURL?t:this.attachRel(t,"00")):(i.append(``),l.ajax({url:t,dataType:"json"}).done(function(e,t,i){n.buildHierarchy(s,n.options.ajaxURL?e:n.attachRel(e,"00"),0,n.options)}).fail(function(e,t,i){console.log(i)}).always(function(){i.children(".spinner").remove()})),e.append(i),this.options.exportButton&&!l(".oc-export-btn").length&&this.attachExportButton(),this.options.pan&&this.bindPan(),this.options.zoom&&this.bindZoom(),this},triggerInitEvent:function(){var s=this,o=new MutationObserver(function(e){o.disconnect();e:for(var t=0;t",{class:"oc-export-btn",text:this.options.exportButtonName,click:function(e){e.preventDefault(),t.export()}});this.$chartContainer.after(e)},setOptions:function(e,t){return"string"==typeof e&&("pan"===e&&(t?this.bindPan():this.unbindPan()),"zoom"===e)&&(t?this.bindZoom():this.unbindZoom()),"object"==typeof e&&(e.data?this.init(e):(void 0!==e.pan&&(e.pan?this.bindPan():this.unbindPan()),void 0!==e.zoom&&(e.zoom?this.bindZoom():this.unbindZoom()))),this},panStartHandler:function(e){var s=l(e.delegateTarget);if(l(e.target).closest(".node").length||e.touches&&1n.zoomoutLimit&&on.zoomoutLimit&&o`).children().not(".spinner").css("opacity",.2),t.data("inAjax",!0),l(".oc-export-btn").prop("disabled",!0),!0)},endLoading:function(e){var t=e.parent();e.removeClass("hidden"),t.find(".spinner").remove(),t.children().removeAttr("style"),this.$chart.data("inAjax",!1),l(".oc-export-btn").prop("disabled",!1)},isInAction:function(t){return[this.options.icons.expandToUp,this.options.icons.collapseToDown,this.options.icons.collapseToLeft,this.options.icons.expandToRight].some(e=>-1`,a.find(".horizontalEdge").length||a.append(s),e.siblings(".nodes").append(a.closest(".hierarchy")),1===(o=a.closest(".hierarchy").siblings().find(".node:first")).length&&o.append(s)):(e.append(``).after('
    ').siblings(".nodes").append(a.find(".horizontalEdge").remove().end().closest(".hierarchy")),e.children(".title").length&&e.children(".title").prepend(``)),1===t.siblings(".nodes").children(".hierarchy").length?t.siblings(".nodes").children(".hierarchy").find(".node:first").find(".horizontalEdge").remove():0===t.siblings(".nodes").children(".hierarchy").length&&t.find(".bottomEdge, .parentNodeSymbol").remove().end().siblings(".nodes").remove()))):this.$chart.triggerHandler({type:"otherdropped.orgchart",draggedItem:a,dropZone:e})},touchstartHandler:function(e){this.touchHandled||e.touches&&1").addClass("node "+(i.className||"")+(e>n.visibleLevel?" slide-up":""))),s=(n.nodeTemplate?t.append(n.nodeTemplate(i)):t.append('
    '+i[n.nodeTitle]+"
    ").append(void 0!==n.nodeContent?'
    '+(i[n.nodeContent]||"")+"
    ":""),l.extend({},i)),s=(delete s.children,t.data("nodeData",s),i.relationship||"");return n.verticalLevel&&e>=n.verticalLevel||i.isVertical?Number(s.substr(2,1))&&t.append(``).children(".title").prepend(``):(i.isHybrid||(Number(s.substr(0,1))&&t.append(``),Number(s.substr(1,1))&&t.append(``)),Number(s.substr(2,1))&&t.append(``).children(".title").prepend(``)),t.on("mouseenter mouseleave",this.nodeEnterLeaveHandler.bind(this)),t.on("click",this.nodeClickHandler.bind(this)),t.on("click",".topEdge",this.topEdgeClickHandler.bind(this)),t.on("click",".bottomEdge",this.bottomEdgeClickHandler.bind(this)),t.on("click",".leftEdge, .rightEdge",this.hEdgeClickHandler.bind(this)),t.on("click",".toggleBtn",this.toggleVNodes.bind(this)),n.draggable&&(this.bindDragDrop(t),this.touchHandled=!1,this.touchMoved=!1,this.touchTargetNode=null),n.createNode&&n.createNode(t,i),t},buildHierarchy:function(e,t){var i,n,s=this,o=this.options,a=0,a=t.level||(t.level=e.parentsUntil(".orgchart",".nodes").length);2o.visibleLevel||t.collapsed!==d&&t.collapsed,o.verticalLevel&&a+1>=o.verticalLevel||t.isHybrid?(n=l('
      '),i&&o.verticalLevel&&a+1>=o.verticalLevel&&n.addClass("hidden"),(o.verticalLevel&&a+1===o.verticalLevel||t.isHybrid)&&!e.closest(".vertical").length?e.append(n.addClass("vertical")):e.append(n)):(n=l('
        '),2!==Object.keys(t).length&&i&&e.addClass("isChildrenCollapsed"),e.append(n)),l.each(t.children,function(){var e=l('
      • ');n.append(e),this.level=a+1,s.buildHierarchy(e,this)}))},buildChildNode:function(e,t){this.buildHierarchy(e,{children:t})},addChildren:function(e,t){this.buildChildNode(e.closest(".hierarchy"),t),e.find(".parentNodeSymbol").length||e.children(".title").prepend(``),e.closest(".nodes.vertical").length?e.children(".toggleBtn").length||e.append(``):e.children(".bottomEdge").length||e.append(``),this.isInAction(e)&&this.switchVerticalArrow(e.children(".bottomEdge"))},buildParentNode:function(e,t){t.relationship=t.relationship||"001";t=l('
        ').find(".hierarchy").append(this.createNode(t)).end();this.$chart.prepend(t).find(".hierarchy:first").append(e.closest("ul").addClass("nodes"))},addParent:function(e,t){this.buildParentNode(e,t),e.children(".topEdge").length||e.children(".title").after(``),this.isInAction(e)&&this.switchVerticalArrow(e.children(".topEdge"))},buildSiblingNode:function(e,t){var i,n=(l.isArray(t)?t:t.children).length,s=e.parent().is(".nodes")?e.siblings().length+1:1,n=s+n,n=1')).children(".hierarchy:first"),t),e.prevAll(".hierarchy").children(".nodes").children().eq(n).after(e))},addSiblings:function(e,t){this.buildSiblingNode(e.closest(".hierarchy"),t),e.closest(".nodes").data("siblingsLoaded",!0),e.children(".leftEdge").length||e.children(".topEdge").after(``),this.isInAction(e)&&(this.switchHorizontalArrow(e),e.children(".topEdge").removeClass(this.options.icons.expandToUp).addClass(this.options.icons.collapseToDown))},removeNodes:function(e){var t=e.closest(".hierarchy").parent();t.parent().is(".hierarchy")?this.getNodeState(e,"siblings").exist?(e.closest(".hierarchy").remove(),1===t.children().length&&t.find(".node:first .horizontalEdge").remove()):t.siblings(".node").find(".bottomEdge").remove().end().end().remove():t.closest(".orgchart").remove()},hideDropZones:function(){this.$chart.find(".allowedDrop").removeClass("allowedDrop")},showDropZones:function(e){this.$chart.find(".node").each(function(e,t){l(t).addClass("allowedDrop")}),this.$chart.data("dragged",l(e))},processExternalDrop:function(e,t){t&&this.$chart.data("dragged",l(t)),e.closest(".node").triggerHandler({type:"drop"})},exportPDF:function(e,t){var i={},n=Math.floor(e.width),s=Math.floor(e.height);h.jsPDF||(h.jsPDF=h.jspdf.jsPDF),(i=s'),o.find(i).attr("href",e.toDataURL())[0].click())},export:function(t,i){var n=this;if(t=void 0!==t?t:this.options.exportFilename,i=void 0!==i?i:this.options.exportFileextension,l(this).children(".spinner").length)return!1;var s=this.$chartContainer,e=s.find(".mask"),e=(e.length?e.removeClass("hidden"):s.append(`
        `),s.addClass("canvasContainer").find('.orgchart:not(".hidden")').get(0)),o="l2r"===n.options.direction||"r2l"===n.options.direction;html2canvas(e,{width:o?e.clientHeight:e.clientWidth,height:o?e.clientWidth:e.clientHeight,onclone:function(e){l(e).find(".canvasContainer").css("overflow","visible").find('.orgchart:not(".hidden"):first').css("transform","")}}).then(function(e){s.find(".mask").addClass("hidden"),"pdf"===i.toLowerCase()?n.exportPDF(e,t):n.exportPNG(e,t),s.removeClass("canvasContainer")},function(){s.removeClass("canvasContainer")})}},l.fn.orgchart=function(e){return new t(this,e).init()}}); -//# sourceMappingURL=jquery.orgchart.min.js.map - - /***/ }), /***/ "./node_modules/select2/dist/js/select2.js": @@ -27730,27 +27553,25 @@ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be in strict mode. (() => { "use strict"; -/*!*************************!*\ - !*** ./src/js/index.js ***! - \*************************/ +/*!********************************!*\ + !*** ./static/src/js/index.js ***! + \********************************/ __webpack_require__.r(__webpack_exports__); /* harmony import */ var alpinejs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! alpinejs */ "./node_modules/alpinejs/dist/module.esm.js"); -/* harmony import */ var _modules_dashboard_LoadLayout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/dashboard/LoadLayout */ "./src/js/modules/dashboard/LoadLayout.js"); -/* harmony import */ var _modules_dashboard_ModalDialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/dashboard/ModalDialog */ "./src/js/modules/dashboard/ModalDialog.js"); -/* harmony import */ var _modules_dashboard_Tables__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/dashboard/Tables */ "./src/js/modules/dashboard/Tables.js"); -/* harmony import */ var _modules_dashboard_Tooltip__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/dashboard/Tooltip */ "./src/js/modules/dashboard/Tooltip.js"); -/* harmony import */ var _modules_dashboard_Generic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modules/dashboard/Generic */ "./src/js/modules/dashboard/Generic.js"); -/* harmony import */ var _modules_dashboard_ResizeInput__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./modules/dashboard/ResizeInput */ "./src/js/modules/dashboard/ResizeInput.js"); -/* harmony import */ var _modules_dashboard_Inputs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./modules/dashboard/Inputs */ "./src/js/modules/dashboard/Inputs.js"); -/* harmony import */ var _modules_dashboard_ImageSelect__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./modules/dashboard/ImageSelect */ "./src/js/modules/dashboard/ImageSelect.js"); -/* harmony import */ var _modules_dashboard_ImageUpload__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./modules/dashboard/ImageUpload */ "./src/js/modules/dashboard/ImageUpload.js"); -/* harmony import */ var _modules_dashboard_Calendar__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./modules/dashboard/Calendar */ "./src/js/modules/dashboard/Calendar.js"); -/* harmony import */ var _modules_dashboard_Specifics__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./modules/dashboard/Specifics */ "./src/js/modules/dashboard/Specifics.js"); -/* harmony import */ var _modules_dashboard_Tabs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./modules/dashboard/Tabs */ "./src/js/modules/dashboard/Tabs.js"); -/* harmony import */ var _modules_dashboard_Recruitment__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./modules/dashboard/Recruitment */ "./src/js/modules/dashboard/Recruitment.js"); -/* harmony import */ var _modules_dashboard_Kanban__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./modules/dashboard/Kanban */ "./src/js/modules/dashboard/Kanban.js"); -/* harmony import */ var _modules_dashboard_Dashboard__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./modules/dashboard/Dashboard */ "./src/js/modules/dashboard/Dashboard.js"); -/* harmony import */ var _modules_dashboard_OrgChart__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./modules/dashboard/OrgChart */ "./src/js/modules/dashboard/OrgChart.js"); +/* harmony import */ var _modules_dashboard_LoadLayout__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/dashboard/LoadLayout */ "./static/src/js/modules/dashboard/LoadLayout.js"); +/* harmony import */ var _modules_dashboard_ModalDialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/dashboard/ModalDialog */ "./static/src/js/modules/dashboard/ModalDialog.js"); +/* harmony import */ var _modules_dashboard_Tables__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/dashboard/Tables */ "./static/src/js/modules/dashboard/Tables.js"); +/* harmony import */ var _modules_dashboard_Tooltip__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/dashboard/Tooltip */ "./static/src/js/modules/dashboard/Tooltip.js"); +/* harmony import */ var _modules_dashboard_Generic__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./modules/dashboard/Generic */ "./static/src/js/modules/dashboard/Generic.js"); +/* harmony import */ var _modules_dashboard_ResizeInput__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./modules/dashboard/ResizeInput */ "./static/src/js/modules/dashboard/ResizeInput.js"); +/* harmony import */ var _modules_dashboard_Inputs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./modules/dashboard/Inputs */ "./static/src/js/modules/dashboard/Inputs.js"); +/* harmony import */ var _modules_dashboard_ImageSelect__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./modules/dashboard/ImageSelect */ "./static/src/js/modules/dashboard/ImageSelect.js"); +/* harmony import */ var _modules_dashboard_Calendar__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./modules/dashboard/Calendar */ "./static/src/js/modules/dashboard/Calendar.js"); +/* harmony import */ var _modules_dashboard_Specifics__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./modules/dashboard/Specifics */ "./static/src/js/modules/dashboard/Specifics.js"); +/* harmony import */ var _modules_dashboard_Tabs__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./modules/dashboard/Tabs */ "./static/src/js/modules/dashboard/Tabs.js"); +/* harmony import */ var _modules_dashboard_Recruitment__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./modules/dashboard/Recruitment */ "./static/src/js/modules/dashboard/Recruitment.js"); +/* harmony import */ var _modules_dashboard_Kanban__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./modules/dashboard/Kanban */ "./static/src/js/modules/dashboard/Kanban.js"); +/* harmony import */ var _modules_dashboard_Dashboard__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./modules/dashboard/Dashboard */ "./static/src/js/modules/dashboard/Dashboard.js"); // Imports @@ -27768,9 +27589,6 @@ __webpack_require__.r(__webpack_exports__); - -// import WorkEntry from "./modules/dashboard/WorkEntry"; - // Instantiate a new objects window.Alpine = alpinejs__WEBPACK_IMPORTED_MODULE_0__["default"]; alpinejs__WEBPACK_IMPORTED_MODULE_0__["default"].start(); @@ -27782,15 +27600,12 @@ var generic = new _modules_dashboard_Generic__WEBPACK_IMPORTED_MODULE_5__["defau var resizeInput = new _modules_dashboard_ResizeInput__WEBPACK_IMPORTED_MODULE_6__["default"](); var inputs = new _modules_dashboard_Inputs__WEBPACK_IMPORTED_MODULE_7__["default"](); var imageSelect = new _modules_dashboard_ImageSelect__WEBPACK_IMPORTED_MODULE_8__["default"](); -var imageUpload = new _modules_dashboard_ImageUpload__WEBPACK_IMPORTED_MODULE_9__["default"](); -var calendar = new _modules_dashboard_Calendar__WEBPACK_IMPORTED_MODULE_10__["default"](); -var specifics = new _modules_dashboard_Specifics__WEBPACK_IMPORTED_MODULE_11__["default"](); -var tabs = new _modules_dashboard_Tabs__WEBPACK_IMPORTED_MODULE_12__["default"](); -var recruitment = new _modules_dashboard_Recruitment__WEBPACK_IMPORTED_MODULE_13__["default"](); -var kanban = new _modules_dashboard_Kanban__WEBPACK_IMPORTED_MODULE_14__["default"](); -var dashbaord = new _modules_dashboard_Dashboard__WEBPACK_IMPORTED_MODULE_15__["default"](); -var orgChart = new _modules_dashboard_OrgChart__WEBPACK_IMPORTED_MODULE_16__["default"](); -// const workEntry = new WorkEntry(); +var calendar = new _modules_dashboard_Calendar__WEBPACK_IMPORTED_MODULE_9__["default"](); +var specifics = new _modules_dashboard_Specifics__WEBPACK_IMPORTED_MODULE_10__["default"](); +var tabs = new _modules_dashboard_Tabs__WEBPACK_IMPORTED_MODULE_11__["default"](); +var recruitment = new _modules_dashboard_Recruitment__WEBPACK_IMPORTED_MODULE_12__["default"](); +var kanban = new _modules_dashboard_Kanban__WEBPACK_IMPORTED_MODULE_13__["default"](); +var dashbaord = new _modules_dashboard_Dashboard__WEBPACK_IMPORTED_MODULE_14__["default"](); })(); /******/ })() diff --git a/static/build/js/web.frontend.min.js b/static/build/js/web.frontend.min.js index 94157e5d9..a45877949 100644 --- a/static/build/js/web.frontend.min.js +++ b/static/build/js/web.frontend.min.js @@ -1,1441 +1,548 @@ /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ -/***/ "../../node_modules/alpinejs/dist/module.esm.js": -/*!******************************************************!*\ - !*** ../../node_modules/alpinejs/dist/module.esm.js ***! - \******************************************************/ +/***/ "./node_modules/alpinejs/dist/module.esm.js": +/*!**************************************************!*\ + !*** ./node_modules/alpinejs/dist/module.esm.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 */ module_default) - /* harmony export */ }); - // packages/alpinejs/src/scheduler.js - var flushPending = false; - var flushing = false; - var queue = []; - function scheduler(callback) { - queueJob(callback); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ module_default) +/* harmony export */ }); +// packages/alpinejs/src/scheduler.js +var flushPending = false; +var flushing = false; +var queue = []; +function scheduler(callback) { + queueJob(callback); +} +function queueJob(job) { + if (!queue.includes(job)) + queue.push(job); + queueFlush(); +} +function dequeueJob(job) { + let index = queue.indexOf(job); + if (index !== -1) + queue.splice(index, 1); +} +function queueFlush() { + if (!flushing && !flushPending) { + flushPending = true; + queueMicrotask(flushJobs); } - function queueJob(job) { - if (!queue.includes(job)) - queue.push(job); - queueFlush(); - } - function dequeueJob(job) { - let index = queue.indexOf(job); - if (index !== -1) - queue.splice(index, 1); - } - function queueFlush() { - if (!flushing && !flushPending) { - flushPending = true; - queueMicrotask(flushJobs); - } - } - function flushJobs() { - flushPending = false; - flushing = true; - for (let i = 0; i < queue.length; i++) { - queue[i](); - } - queue.length = 0; - flushing = false; +} +function flushJobs() { + flushPending = false; + flushing = true; + for (let i = 0; i < queue.length; i++) { + queue[i](); } + queue.length = 0; + flushing = false; +} - // packages/alpinejs/src/reactivity.js - var reactive; - var effect; - var release; - var raw; - var shouldSchedule = true; - function disableEffectScheduling(callback) { - shouldSchedule = false; - callback(); - shouldSchedule = true; - } - function setReactivityEngine(engine) { - reactive = engine.reactive; - release = engine.release; - effect = (callback) => engine.effect(callback, {scheduler: (task) => { - if (shouldSchedule) { - scheduler(task); - } else { - task(); - } - }}); - raw = engine.raw; - } - function overrideEffect(override) { - effect = override; - } - function elementBoundEffect(el) { - let cleanup2 = () => { - }; - let wrappedEffect = (callback) => { - let effectReference = effect(callback); - if (!el._x_effects) { - el._x_effects = new Set(); - el._x_runEffects = () => { - el._x_effects.forEach((i) => i()); - }; - } - el._x_effects.add(effectReference); - cleanup2 = () => { - if (effectReference === void 0) - return; - el._x_effects.delete(effectReference); - release(effectReference); - }; - return effectReference; - }; - return [wrappedEffect, () => { - cleanup2(); - }]; - } - - // packages/alpinejs/src/mutation.js - var onAttributeAddeds = []; - var onElRemoveds = []; - var onElAddeds = []; - function onElAdded(callback) { - onElAddeds.push(callback); - } - function onElRemoved(el, callback) { - if (typeof callback === "function") { - if (!el._x_cleanups) - el._x_cleanups = []; - el._x_cleanups.push(callback); +// packages/alpinejs/src/reactivity.js +var reactive; +var effect; +var release; +var raw; +var shouldSchedule = true; +function disableEffectScheduling(callback) { + shouldSchedule = false; + callback(); + shouldSchedule = true; +} +function setReactivityEngine(engine) { + reactive = engine.reactive; + release = engine.release; + effect = (callback) => engine.effect(callback, {scheduler: (task) => { + if (shouldSchedule) { + scheduler(task); } else { - callback = el; - onElRemoveds.push(callback); + task(); } - } - function onAttributesAdded(callback) { - onAttributeAddeds.push(callback); - } - function onAttributeRemoved(el, name, callback) { - if (!el._x_attributeCleanups) - el._x_attributeCleanups = {}; - if (!el._x_attributeCleanups[name]) - el._x_attributeCleanups[name] = []; - el._x_attributeCleanups[name].push(callback); - } - function cleanupAttributes(el, names) { - if (!el._x_attributeCleanups) - return; - Object.entries(el._x_attributeCleanups).forEach(([name, value]) => { - if (names === void 0 || names.includes(name)) { - value.forEach((i) => i()); - delete el._x_attributeCleanups[name]; - } - }); - } - var observer = new MutationObserver(onMutate); - var currentlyObserving = false; - function startObservingMutations() { - observer.observe(document, {subtree: true, childList: true, attributes: true, attributeOldValue: true}); - currentlyObserving = true; - } - function stopObservingMutations() { - flushObserver(); - observer.disconnect(); - currentlyObserving = false; - } - var recordQueue = []; - var willProcessRecordQueue = false; - function flushObserver() { - recordQueue = recordQueue.concat(observer.takeRecords()); - if (recordQueue.length && !willProcessRecordQueue) { - willProcessRecordQueue = true; - queueMicrotask(() => { - processRecordQueue(); - willProcessRecordQueue = false; - }); - } - } - function processRecordQueue() { - onMutate(recordQueue); - recordQueue.length = 0; - } - function mutateDom(callback) { - if (!currentlyObserving) - return callback(); - stopObservingMutations(); - let result = callback(); - startObservingMutations(); - return result; - } - var isCollecting = false; - var deferredMutations = []; - function deferMutations() { - isCollecting = true; - } - function flushAndStopDeferringMutations() { - isCollecting = false; - onMutate(deferredMutations); - deferredMutations = []; - } - function onMutate(mutations) { - if (isCollecting) { - deferredMutations = deferredMutations.concat(mutations); - return; - } - let addedNodes = []; - let removedNodes = []; - let addedAttributes = new Map(); - let removedAttributes = new Map(); - for (let i = 0; i < mutations.length; i++) { - if (mutations[i].target._x_ignoreMutationObserver) - continue; - if (mutations[i].type === "childList") { - mutations[i].addedNodes.forEach((node) => node.nodeType === 1 && addedNodes.push(node)); - mutations[i].removedNodes.forEach((node) => node.nodeType === 1 && removedNodes.push(node)); - } - if (mutations[i].type === "attributes") { - let el = mutations[i].target; - let name = mutations[i].attributeName; - let oldValue = mutations[i].oldValue; - let add2 = () => { - if (!addedAttributes.has(el)) - addedAttributes.set(el, []); - addedAttributes.get(el).push({name, value: el.getAttribute(name)}); - }; - let remove = () => { - if (!removedAttributes.has(el)) - removedAttributes.set(el, []); - removedAttributes.get(el).push(name); - }; - if (el.hasAttribute(name) && oldValue === null) { - add2(); - } else if (el.hasAttribute(name)) { - remove(); - add2(); - } else { - remove(); - } - } - } - removedAttributes.forEach((attrs, el) => { - cleanupAttributes(el, attrs); - }); - addedAttributes.forEach((attrs, el) => { - onAttributeAddeds.forEach((i) => i(el, attrs)); - }); - for (let node of removedNodes) { - if (addedNodes.includes(node)) - continue; - onElRemoveds.forEach((i) => i(node)); - if (node._x_cleanups) { - while (node._x_cleanups.length) - node._x_cleanups.pop()(); - } - } - addedNodes.forEach((node) => { - node._x_ignoreSelf = true; - node._x_ignore = true; - }); - for (let node of addedNodes) { - if (removedNodes.includes(node)) - continue; - if (!node.isConnected) - continue; - delete node._x_ignoreSelf; - delete node._x_ignore; - onElAddeds.forEach((i) => i(node)); - node._x_ignore = true; - node._x_ignoreSelf = true; - } - addedNodes.forEach((node) => { - delete node._x_ignoreSelf; - delete node._x_ignore; - }); - addedNodes = null; - removedNodes = null; - addedAttributes = null; - removedAttributes = null; - } - - // packages/alpinejs/src/scope.js - function scope(node) { - return mergeProxies(closestDataStack(node)); - } - function addScopeToNode(node, data2, referenceNode) { - node._x_dataStack = [data2, ...closestDataStack(referenceNode || node)]; - return () => { - node._x_dataStack = node._x_dataStack.filter((i) => i !== data2); - }; - } - function refreshScope(element, scope2) { - let existingScope = element._x_dataStack[0]; - Object.entries(scope2).forEach(([key, value]) => { - existingScope[key] = value; - }); - } - function closestDataStack(node) { - if (node._x_dataStack) - return node._x_dataStack; - if (typeof ShadowRoot === "function" && node instanceof ShadowRoot) { - return closestDataStack(node.host); - } - if (!node.parentNode) { - return []; - } - return closestDataStack(node.parentNode); - } - function mergeProxies(objects) { - let thisProxy = new Proxy({}, { - ownKeys: () => { - return Array.from(new Set(objects.flatMap((i) => Object.keys(i)))); - }, - has: (target, name) => { - return objects.some((obj) => obj.hasOwnProperty(name)); - }, - get: (target, name) => { - return (objects.find((obj) => { - if (obj.hasOwnProperty(name)) { - let descriptor = Object.getOwnPropertyDescriptor(obj, name); - if (descriptor.get && descriptor.get._x_alreadyBound || descriptor.set && descriptor.set._x_alreadyBound) { - return true; - } - if ((descriptor.get || descriptor.set) && descriptor.enumerable) { - let getter = descriptor.get; - let setter = descriptor.set; - let property = descriptor; - getter = getter && getter.bind(thisProxy); - setter = setter && setter.bind(thisProxy); - if (getter) - getter._x_alreadyBound = true; - if (setter) - setter._x_alreadyBound = true; - Object.defineProperty(obj, name, { - ...property, - get: getter, - set: setter - }); - } - return true; - } - return false; - }) || {})[name]; - }, - set: (target, name, value) => { - let closestObjectWithKey = objects.find((obj) => obj.hasOwnProperty(name)); - if (closestObjectWithKey) { - closestObjectWithKey[name] = value; - } else { - objects[objects.length - 1][name] = value; - } - return true; - } - }); - return thisProxy; - } - - // packages/alpinejs/src/interceptor.js - function initInterceptors(data2) { - let isObject2 = (val) => typeof val === "object" && !Array.isArray(val) && val !== null; - let recurse = (obj, basePath = "") => { - Object.entries(Object.getOwnPropertyDescriptors(obj)).forEach(([key, {value, enumerable}]) => { - if (enumerable === false || value === void 0) - return; - let path = basePath === "" ? key : `${basePath}.${key}`; - if (typeof value === "object" && value !== null && value._x_interceptor) { - obj[key] = value.initialize(data2, path, key); - } else { - if (isObject2(value) && value !== obj && !(value instanceof Element)) { - recurse(value, path); - } - } - }); - }; - return recurse(data2); - } - function interceptor(callback, mutateObj = () => { - }) { - let obj = { - initialValue: void 0, - _x_interceptor: true, - initialize(data2, path, key) { - return callback(this.initialValue, () => get(data2, path), (value) => set(data2, path, value), path, key); - } - }; - mutateObj(obj); - return (initialValue) => { - if (typeof initialValue === "object" && initialValue !== null && initialValue._x_interceptor) { - let initialize = obj.initialize.bind(obj); - obj.initialize = (data2, path, key) => { - let innerValue = initialValue.initialize(data2, path, key); - obj.initialValue = innerValue; - return initialize(data2, path, key); - }; - } else { - obj.initialValue = initialValue; - } - return obj; - }; - } - function get(obj, path) { - return path.split(".").reduce((carry, segment) => carry[segment], obj); - } - function set(obj, path, value) { - if (typeof path === "string") - path = path.split("."); - if (path.length === 1) - obj[path[0]] = value; - else if (path.length === 0) - throw error; - else { - if (obj[path[0]]) - return set(obj[path[0]], path.slice(1), value); - else { - obj[path[0]] = {}; - return set(obj[path[0]], path.slice(1), value); - } - } - } - - // packages/alpinejs/src/magics.js - var magics = {}; - function magic(name, callback) { - magics[name] = callback; - } - function injectMagics(obj, el) { - Object.entries(magics).forEach(([name, callback]) => { - Object.defineProperty(obj, `$${name}`, { - get() { - let [utilities, cleanup2] = getElementBoundUtilities(el); - utilities = {interceptor, ...utilities}; - onElRemoved(el, cleanup2); - return callback(el, utilities); - }, - enumerable: false - }); - }); - return obj; - } - - // packages/alpinejs/src/utils/error.js - function tryCatch(el, expression, callback, ...args) { - try { - return callback(...args); - } catch (e) { - handleError(e, el, expression); - } - } - function handleError(error2, el, expression = void 0) { - Object.assign(error2, {el, expression}); - console.warn(`Alpine Expression Error: ${error2.message} - - ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el); - setTimeout(() => { - throw error2; - }, 0); - } - - // packages/alpinejs/src/evaluator.js - var shouldAutoEvaluateFunctions = true; - function dontAutoEvaluateFunctions(callback) { - let cache = shouldAutoEvaluateFunctions; - shouldAutoEvaluateFunctions = false; - callback(); - shouldAutoEvaluateFunctions = cache; - } - function evaluate(el, expression, extras = {}) { - let result; - evaluateLater(el, expression)((value) => result = value, extras); - return result; - } - function evaluateLater(...args) { - return theEvaluatorFunction(...args); - } - var theEvaluatorFunction = normalEvaluator; - function setEvaluator(newEvaluator) { - theEvaluatorFunction = newEvaluator; - } - function normalEvaluator(el, expression) { - let overriddenMagics = {}; - injectMagics(overriddenMagics, el); - let dataStack = [overriddenMagics, ...closestDataStack(el)]; - if (typeof expression === "function") { - return generateEvaluatorFromFunction(dataStack, expression); - } - let evaluator = generateEvaluatorFromString(dataStack, expression, el); - return tryCatch.bind(null, el, expression, evaluator); - } - function generateEvaluatorFromFunction(dataStack, func) { - return (receiver = () => { - }, {scope: scope2 = {}, params = []} = {}) => { - let result = func.apply(mergeProxies([scope2, ...dataStack]), params); - runIfTypeOfFunction(receiver, result); - }; - } - var evaluatorMemo = {}; - function generateFunctionFromString(expression, el) { - if (evaluatorMemo[expression]) { - return evaluatorMemo[expression]; - } - let AsyncFunction = Object.getPrototypeOf(async function() { - }).constructor; - let rightSideSafeExpression = /^[\n\s]*if.*\(.*\)/.test(expression) || /^(let|const)\s/.test(expression) ? `(() => { ${expression} })()` : expression; - const safeAsyncFunction = () => { - try { - return new AsyncFunction(["__self", "scope"], `with (scope) { __self.result = ${rightSideSafeExpression} }; __self.finished = true; return __self.result;`); - } catch (error2) { - handleError(error2, el, expression); - return Promise.resolve(); - } - }; - let func = safeAsyncFunction(); - evaluatorMemo[expression] = func; - return func; - } - function generateEvaluatorFromString(dataStack, expression, el) { - let func = generateFunctionFromString(expression, el); - return (receiver = () => { - }, {scope: scope2 = {}, params = []} = {}) => { - func.result = void 0; - func.finished = false; - let completeScope = mergeProxies([scope2, ...dataStack]); - if (typeof func === "function") { - let promise = func(func, completeScope).catch((error2) => handleError(error2, el, expression)); - if (func.finished) { - runIfTypeOfFunction(receiver, func.result, completeScope, params, el); - func.result = void 0; - } else { - promise.then((result) => { - runIfTypeOfFunction(receiver, result, completeScope, params, el); - }).catch((error2) => handleError(error2, el, expression)).finally(() => func.result = void 0); - } - } - }; - } - function runIfTypeOfFunction(receiver, value, scope2, params, el) { - if (shouldAutoEvaluateFunctions && typeof value === "function") { - let result = value.apply(scope2, params); - if (result instanceof Promise) { - result.then((i) => runIfTypeOfFunction(receiver, i, scope2, params)).catch((error2) => handleError(error2, el, value)); - } else { - receiver(result); - } - } else { - receiver(value); - } - } - - // packages/alpinejs/src/directives.js - var prefixAsString = "x-"; - function prefix(subject = "") { - return prefixAsString + subject; - } - function setPrefix(newPrefix) { - prefixAsString = newPrefix; - } - var directiveHandlers = {}; - function directive(name, callback) { - directiveHandlers[name] = callback; - } - function directives(el, attributes, originalAttributeOverride) { - attributes = Array.from(attributes); - if (el._x_virtualDirectives) { - let vAttributes = Object.entries(el._x_virtualDirectives).map(([name, value]) => ({name, value})); - let staticAttributes = attributesOnly(vAttributes); - vAttributes = vAttributes.map((attribute) => { - if (staticAttributes.find((attr) => attr.name === attribute.name)) { - return { - name: `x-bind:${attribute.name}`, - value: `"${attribute.value}"` - }; - } - return attribute; - }); - attributes = attributes.concat(vAttributes); - } - let transformedAttributeMap = {}; - let directives2 = attributes.map(toTransformedAttributes((newName, oldName) => transformedAttributeMap[newName] = oldName)).filter(outNonAlpineAttributes).map(toParsedDirectives(transformedAttributeMap, originalAttributeOverride)).sort(byPriority); - return directives2.map((directive2) => { - return getDirectiveHandler(el, directive2); - }); - } - function attributesOnly(attributes) { - return Array.from(attributes).map(toTransformedAttributes()).filter((attr) => !outNonAlpineAttributes(attr)); - } - var isDeferringHandlers = false; - var directiveHandlerStacks = new Map(); - var currentHandlerStackKey = Symbol(); - function deferHandlingDirectives(callback) { - isDeferringHandlers = true; - let key = Symbol(); - currentHandlerStackKey = key; - directiveHandlerStacks.set(key, []); - let flushHandlers = () => { - while (directiveHandlerStacks.get(key).length) - directiveHandlerStacks.get(key).shift()(); - directiveHandlerStacks.delete(key); - }; - let stopDeferring = () => { - isDeferringHandlers = false; - flushHandlers(); - }; - callback(flushHandlers); - stopDeferring(); - } - function getElementBoundUtilities(el) { - let cleanups = []; - let cleanup2 = (callback) => cleanups.push(callback); - let [effect3, cleanupEffect] = elementBoundEffect(el); - cleanups.push(cleanupEffect); - let utilities = { - Alpine: alpine_default, - effect: effect3, - cleanup: cleanup2, - evaluateLater: evaluateLater.bind(evaluateLater, el), - evaluate: evaluate.bind(evaluate, el) - }; - let doCleanup = () => cleanups.forEach((i) => i()); - return [utilities, doCleanup]; - } - function getDirectiveHandler(el, directive2) { - let noop = () => { - }; - let handler3 = directiveHandlers[directive2.type] || noop; - let [utilities, cleanup2] = getElementBoundUtilities(el); - onAttributeRemoved(el, directive2.original, cleanup2); - let fullHandler = () => { - if (el._x_ignore || el._x_ignoreSelf) - return; - handler3.inline && handler3.inline(el, directive2, utilities); - handler3 = handler3.bind(handler3, el, directive2, utilities); - isDeferringHandlers ? directiveHandlerStacks.get(currentHandlerStackKey).push(handler3) : handler3(); - }; - fullHandler.runCleanups = cleanup2; - return fullHandler; - } - var startingWith = (subject, replacement) => ({name, value}) => { - if (name.startsWith(subject)) - name = name.replace(subject, replacement); - return {name, value}; + }}); + raw = engine.raw; +} +function overrideEffect(override) { + effect = override; +} +function elementBoundEffect(el) { + let cleanup2 = () => { }; - var into = (i) => i; - function toTransformedAttributes(callback = () => { - }) { - return ({name, value}) => { - let {name: newName, value: newValue} = attributeTransformers.reduce((carry, transform) => { - return transform(carry); - }, {name, value}); - if (newName !== name) - callback(newName, name); - return {name: newName, value: newValue}; - }; - } - var attributeTransformers = []; - function mapAttributes(callback) { - attributeTransformers.push(callback); - } - function outNonAlpineAttributes({name}) { - return alpineAttributeRegex().test(name); - } - var alpineAttributeRegex = () => new RegExp(`^${prefixAsString}([^:^.]+)\\b`); - function toParsedDirectives(transformedAttributeMap, originalAttributeOverride) { - return ({name, value}) => { - let typeMatch = name.match(alpineAttributeRegex()); - let valueMatch = name.match(/:([a-zA-Z0-9\-:]+)/); - let modifiers = name.match(/\.[^.\]]+(?=[^\]]*$)/g) || []; - let original = originalAttributeOverride || transformedAttributeMap[name] || name; - return { - type: typeMatch ? typeMatch[1] : null, - value: valueMatch ? valueMatch[1] : null, - modifiers: modifiers.map((i) => i.replace(".", "")), - expression: value, - original + let wrappedEffect = (callback) => { + let effectReference = effect(callback); + if (!el._x_effects) { + el._x_effects = new Set(); + el._x_runEffects = () => { + el._x_effects.forEach((i) => i()); }; - }; - } - var DEFAULT = "DEFAULT"; - var directiveOrder = [ - "ignore", - "ref", - "data", - "id", - "radio", - "tabs", - "switch", - "disclosure", - "menu", - "listbox", - "list", - "item", - "combobox", - "bind", - "init", - "for", - "mask", - "model", - "modelable", - "transition", - "show", - "if", - DEFAULT, - "teleport" - ]; - function byPriority(a, b) { - let typeA = directiveOrder.indexOf(a.type) === -1 ? DEFAULT : a.type; - let typeB = directiveOrder.indexOf(b.type) === -1 ? DEFAULT : b.type; - return directiveOrder.indexOf(typeA) - directiveOrder.indexOf(typeB); - } - - // packages/alpinejs/src/utils/dispatch.js - function dispatch(el, name, detail = {}) { - el.dispatchEvent(new CustomEvent(name, { - detail, - bubbles: true, - composed: true, - cancelable: true - })); - } - - // packages/alpinejs/src/nextTick.js - var tickStack = []; - var isHolding = false; - function nextTick(callback = () => { - }) { - queueMicrotask(() => { - isHolding || setTimeout(() => { - releaseNextTicks(); - }); - }); - return new Promise((res) => { - tickStack.push(() => { - callback(); - res(); - }); - }); - } - function releaseNextTicks() { - isHolding = false; - while (tickStack.length) - tickStack.shift()(); - } - function holdNextTicks() { - isHolding = true; - } - - // packages/alpinejs/src/utils/walk.js - function walk(el, callback) { - if (typeof ShadowRoot === "function" && el instanceof ShadowRoot) { - Array.from(el.children).forEach((el2) => walk(el2, callback)); - return; } - let skip = false; - callback(el, () => skip = true); - if (skip) - return; - let node = el.firstElementChild; - while (node) { - walk(node, callback, false); - node = node.nextElementSibling; - } - } - - // packages/alpinejs/src/utils/warn.js - function warn(message, ...args) { - console.warn(`Alpine Warning: ${message}`, ...args); - } - - // packages/alpinejs/src/lifecycle.js - function start() { - if (!document.body) - warn("Unable to initialize. Trying to load Alpine before `` is available. Did you forget to add `defer` in Alpine's `