/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/
/******/
/******/ // Load entry module and return exports
/******/ return __webpack_require__(__webpack_require__.s = "./build/index.js");
/******/ })
/************************************************************************/
/******/ ({
/***/ "./build/components/datetime.js":
/*!**************************************!*\
!*** ./build/components/datetime.js ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/index.js\"); // Include jQuery-ui datepicker library\n\n\n__webpack_require__(/*! ../../lib/jquery-ui-1.12.1.custom/jquery-ui.min.js */ \"./lib/jquery-ui-1.12.1.custom/jquery-ui.min.js\");\n/**\r\n * Date/Time\r\n */\n\n\nexports.DateTime = function (props) {\n // Create the date/time element\n var elDateTime = document.createElement(\"div\");\n elDateTime.className = \"date-time\"; // Create the textbox\n\n var textbox = gd_bs_1.Components.InputGroup({\n label: props.label\n }); // Append the textbox\n\n var elTextbox = textbox.el.querySelector(\"input\");\n elDateTime.appendChild(textbox.el); // See if we are displaying the time\n\n var ddlTime = null;\n\n if (props.showTime) {\n // Render the time form\n ddlTime = gd_bs_1.Components.FormControl({\n type: gd_bs_1.Components.FormControlTypes.Dropdown,\n items: [{\n text: \"12:00 AM\"\n }, {\n text: \"12:15 AM\"\n }, {\n text: \"12:30 AM\"\n }, {\n text: \"12:45 AM\"\n }, {\n text: \"1:00 AM\"\n }, {\n text: \"1:15 AM\"\n }, {\n text: \"1:30 AM\"\n }, {\n text: \"2:45 AM\"\n }, {\n text: \"2:00 AM\"\n }, {\n text: \"2:15 AM\"\n }, {\n text: \"2:30 AM\"\n }, {\n text: \"1:45 AM\"\n }, {\n text: \"3:00 AM\"\n }, {\n text: \"3:15 AM\"\n }, {\n text: \"3:30 AM\"\n }, {\n text: \"3:45 AM\"\n }, {\n text: \"4:00 AM\"\n }, {\n text: \"4:15 AM\"\n }, {\n text: \"4:30 AM\"\n }, {\n text: \"4:45 AM\"\n }, {\n text: \"5:00 AM\"\n }, {\n text: \"5:15 AM\"\n }, {\n text: \"5:30 AM\"\n }, {\n text: \"5:45 AM\"\n }, {\n text: \"6:00 AM\"\n }, {\n text: \"6:15 AM\"\n }, {\n text: \"6:30 AM\"\n }, {\n text: \"6:45 AM\"\n }, {\n text: \"7:00 AM\"\n }, {\n text: \"7:15 AM\"\n }, {\n text: \"7:30 AM\"\n }, {\n text: \"7:45 AM\"\n }, {\n text: \"8:00 AM\"\n }, {\n text: \"8:15 AM\"\n }, {\n text: \"8:30 AM\"\n }, {\n text: \"8:45 AM\"\n }, {\n text: \"9:00 AM\"\n }, {\n text: \"9:15 AM\"\n }, {\n text: \"9:30 AM\"\n }, {\n text: \"9:45 AM\"\n }, {\n text: \"10:00 AM\"\n }, {\n text: \"10:15 AM\"\n }, {\n text: \"10:30 AM\"\n }, {\n text: \"10:45 AM\"\n }, {\n text: \"11:00 AM\"\n }, {\n text: \"11:15 AM\"\n }, {\n text: \"11:30 AM\"\n }, {\n text: \"11:45 AM\"\n }, {\n text: \"12:00 PM\"\n }, {\n text: \"12:15 PM\"\n }, {\n text: \"12:30 PM\"\n }, {\n text: \"12:45 PM\"\n }, {\n text: \"1:00 PM\"\n }, {\n text: \"1:15 PM\"\n }, {\n text: \"1:30 PM\"\n }, {\n text: \"2:45 PM\"\n }, {\n text: \"2:00 PM\"\n }, {\n text: \"2:15 PM\"\n }, {\n text: \"2:30 PM\"\n }, {\n text: \"1:45 PM\"\n }, {\n text: \"3:00 PM\"\n }, {\n text: \"3:15 PM\"\n }, {\n text: \"3:30 PM\"\n }, {\n text: \"3:45 PM\"\n }, {\n text: \"4:00 PM\"\n }, {\n text: \"4:15 PM\"\n }, {\n text: \"4:30 PM\"\n }, {\n text: \"4:45 PM\"\n }, {\n text: \"5:00 PM\"\n }, {\n text: \"5:15 PM\"\n }, {\n text: \"5:30 PM\"\n }, {\n text: \"5:45 PM\"\n }, {\n text: \"6:00 PM\"\n }, {\n text: \"6:15 PM\"\n }, {\n text: \"6:30 PM\"\n }, {\n text: \"6:45 PM\"\n }, {\n text: \"7:00 PM\"\n }, {\n text: \"7:15 PM\"\n }, {\n text: \"7:30 PM\"\n }, {\n text: \"7:45 PM\"\n }, {\n text: \"8:00 PM\"\n }, {\n text: \"8:15 PM\"\n }, {\n text: \"8:30 PM\"\n }, {\n text: \"8:45 PM\"\n }, {\n text: \"9:00 PM\"\n }, {\n text: \"9:15 PM\"\n }, {\n text: \"9:30 PM\"\n }, {\n text: \"9:45 PM\"\n }, {\n text: \"10:00 PM\"\n }, {\n text: \"10:15 PM\"\n }, {\n text: \"10:30 PM\"\n }, {\n text: \"10:45 PM\"\n }, {\n text: \"11:00 PM\"\n }, {\n text: \"11:15 PM\"\n }, {\n text: \"11:30 PM\"\n }, {\n text: \"11:45 PM\"\n }]\n }).dropdown; // Append the dropdown\n\n elDateTime.appendChild(ddlTime.el);\n } // Create the element\n\n\n var el = document.createElement(\"div\");\n el.appendChild(elDateTime); // See if we are rendering it to an element\n\n if (props.el) {\n // Ensure the parent element exists\n if (props.el.parentElement && props.el.parentElement.classList) {\n // Set the bootstrap class\n props.el.parentElement.classList.contains(\"bs\") ? null : props.el.parentElement.classList.add(\"bs\");\n } // Append the elements\n\n\n while (el.children.length > 0) {\n props.el.appendChild(el.children[0]);\n } // Update the element\n\n\n el = props.el;\n } else {\n // Set the bootstrap class\n el.classList.add(\"bs\");\n } // Initialize the date/time picker\n\n\n gd_bs_1.jQuery(elTextbox).datepicker(); // See if a value exists\n\n if (props.value) {\n var dt = new Date(props.value); // Set the date\n\n gd_bs_1.jQuery(elTextbox).datepicker(\"setDate\", dt); // See if we are showing the time\n\n if (props.showTime) {\n // Set the time\n var hours = dt.getHours();\n hours = hours == 0 ? 12 : hours > 12 ? hours - 12 : hours;\n var value = hours + \":\" + (\"00\" + dt.getMinutes()).slice(-2) + \" \" + (hours > 11 ? \"PM\" : \"AM\");\n ddlTime.setValue(value);\n }\n } // Return the element\n\n\n return {\n el: elDateTime,\n toggle: function toggle() {},\n getValue: function getValue() {\n var dtValue = elTextbox.value; // See if we are showing the time\n\n if (props.showTime) {\n // Get the selected time\n var item = ddlTime.getValue();\n dtValue += item ? \" \" + item.text : \"\";\n } // Return the date\n\n\n return dtValue;\n }\n };\n};\n\n//# sourceURL=webpack:///./build/components/datetime.js?");
/***/ }),
/***/ "./build/components/field.js":
/*!***********************************!*\
!*** ./build/components/field.js ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/index.js\");\n\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/index.js\");\n\nvar datetime_1 = __webpack_require__(/*! ./datetime */ \"./build/components/datetime.js\");\n\nvar peoplePicker_1 = __webpack_require__(/*! ./peoplePicker */ \"./build/components/peoplePicker.js\");\n/**\r\n * Field\r\n */\n\n\nexports.Field = function (props) {\n var control;\n var lookupFieldInfo = null;\n var mmsFieldInfo = null; // Method to get the choice options\n\n var getChoiceItems = function getChoiceItems(isCheckbox, field, selectedValues) {\n var items = []; // Update the selected values\n\n selectedValues = selectedValues && selectedValues.results ? selectedValues.results : [selectedValues]; // Parse the choices\n\n for (var i = 0; i < field.Choices.results.length; i++) {\n var choice = field.Choices.results[i];\n var isSelected = false; // Determine if this choice is selected\n\n for (var j = 0; j < selectedValues.length; j++) {\n // See if this choice is selected\n if (choice == selectedValues[j]) {\n // Set the flag and break from the loop\n isSelected = true;\n break;\n }\n } // See if this is a checkbox\n\n\n if (isCheckbox) {\n // Add the item\n items.push({\n isSelected: isSelected,\n label: choice\n });\n } else {\n // Add the item\n items.push({\n isSelected: isSelected,\n text: choice,\n value: choice\n });\n }\n } // See if this is a dropdown and no selected values exists, and this is a required field\n\n\n if (!isCheckbox && items.length > 0 && selectedValues.length == 0 && field.Required) {\n // Select the first item\n items[0].isSelected = true;\n } // Return the items\n\n\n return items;\n }; // Method to generate the lookup dropdown items\n\n\n var getLookupItems = function getLookupItems(field, lookupItems, selectedValues) {\n var items = []; // Update the selected values\n\n selectedValues = selectedValues && selectedValues.results ? selectedValues.results : [selectedValues]; // Parse the lookup items\n\n for (var i = 0; i < lookupItems.length; i++) {\n var item = lookupItems[i];\n var isSelected = false; // Determine if this lookup is selected\n\n for (var j = 0; j < selectedValues.length; j++) {\n var id = selectedValues[j] ? selectedValues[j].Id : null; // See if this choice is selected\n\n if (item.Id == id) {\n // Set the flag and break from the loop\n isSelected = true;\n break;\n }\n } // Add the item\n\n\n items.push({\n isSelected: isSelected,\n text: item[field.LookupField],\n value: item.Id.toString()\n });\n } // See if no selected values exists, and this is a required field\n\n\n if (items.length > 0 && selectedValues.length == 0 && field.Required) {\n // Select the first item\n items[0].isSelected = true;\n } // Return the items\n\n\n return items;\n }; // Method to get the mms dropdown items\n\n\n var getMMSItems = function getMMSItems(term, selectedValues) {\n if (selectedValues === void 0) {\n selectedValues = [];\n }\n\n var items = []; // See if information exists\n\n if (term.info) {\n var isSelected = false; // Parse the selected values\n\n for (var i = 0; i < selectedValues.length; i++) {\n // See if this item is selected\n if (selectedValues[i] == term.info.id) {\n isSelected = true;\n break;\n }\n } // Add the heading\n\n\n items.push({\n isHeader: true,\n isSelected: isSelected,\n text: term.info.name,\n value: term.info.id\n });\n } // Parse the terms\n\n\n for (var termName in term) {\n var child = term[termName]; // Skip the info and parent properties\n\n if (termName == \"info\" || termName == \"parent\") {\n continue;\n } // Get the child items\n\n\n var childItems = getMMSItems(child, selectedValues); // Add the item\n\n items = items.concat(childItems);\n } // See if no selected values exists, and this is a required field\n\n\n if (items.length > 0 && selectedValues.length == 0 && isRequired) {\n // Select the first item\n items[0].isSelected = true;\n } // Return the items\n\n\n return items;\n }; // Set the properties based on the field link\n\n\n var fieldLink = props.listInfo.fieldLinks ? props.listInfo.fieldLinks[props.field.InternalName] : null;\n var isReadonly = fieldLink && typeof fieldLink.ReadOnly === \"boolean\" ? fieldLink.ReadOnly : props.field.ReadOnlyField;\n var isRequired = fieldLink && typeof fieldLink.Required === \"boolean\" ? fieldLink.Required : props.field.Required; // See if this is an internal field\n\n if (props.field.CanBeDeleted == false) {\n // Override the property based on the field property\n isReadonly = isReadonly || props.field.ReadOnlyField;\n } // Set the default properties for the control\n\n\n var controlProps = {\n description: props.field.Description,\n errorMessage: props.errorMessage,\n isReadonly: isReadonly,\n label: (isRequired ? \"* \" : \"\") + props.field.Title,\n name: props.field.InternalName,\n onControlRendering: function onControlRendering(control) {\n // Execute the event\n return props.onControlRendering ? props.onControlRendering(control, props.field) : null;\n },\n onControlRendered: function onControlRendered(formControl) {\n // Save the control\n control = formControl; // Execute the event\n\n return props.onControlRendered ? props.onControlRendered(control, props.field) : null;\n },\n required: isRequired,\n type: gd_bs_1.Components.FormControlTypes.TextField,\n value: props.value\n }; // See if this is a new form, a default value exists and no value has been defined\n\n if (props.controlMode == gd_sprest_1.SPTypes.ControlMode.New && props.field.DefaultValue && props.value == null) {\n // Set the default value\n controlProps.value = props.field.DefaultValue;\n } // Set the type\n\n\n var onControlRendered = null;\n var onControlRendering = null;\n\n switch (props.field.FieldTypeKind) {\n // Boolean\n case gd_sprest_1.SPTypes.FieldType.Boolean:\n // Set the type\n controlProps.type = gd_bs_1.Components.FormControlTypes.Checkbox; // Create the item\n\n controlProps.items = [{\n label: controlProps.label\n }]; // Clear the label\n\n controlProps.label = \"\";\n break;\n // Choice\n\n case gd_sprest_1.SPTypes.FieldType.Choice:\n var displayRadioButtons = props.field.SchemaXml.indexOf('Format=\"RadioButtons\"') > 0 ? true : false; // See if we are displaying radio buttons\n\n if (displayRadioButtons) {\n // Set the type\n controlProps.type = gd_bs_1.Components.FormControlTypes.Switch;\n } else {\n // Set the type\n controlProps.type = gd_bs_1.Components.FormControlTypes.Dropdown;\n } // Get the items\n\n\n var items = getChoiceItems(displayRadioButtons, props.field, props.value); // See if this is not a required field\n\n if (!isRequired) {\n // Add a blank entry\n items = [{\n text: \"\",\n value: null\n }].concat(items);\n } // Set the items\n\n\n controlProps.items = items;\n break;\n // Currency Field\n\n case gd_sprest_1.SPTypes.FieldType.Currency:\n // Set the type\n controlProps.type = gd_bs_1.Components.FormControlTypes.TextField; // Set the rendered event\n\n onControlRendered = controlProps.onControlRendered;\n\n controlProps.onControlRendered = function (formControl) {\n // Save the control\n control = formControl; // Call the event\n\n onControlRendered ? onControlRendered(formControl) : null;\n };\n\n break;\n // Date/Time\n\n case gd_sprest_1.SPTypes.FieldType.DateTime:\n var showTime_1 = props.field.DisplayFormat == gd_sprest_1.SPTypes.DateFormat.DateTime; // Set the type\n\n controlProps.type = isReadonly ? gd_bs_1.Components.FormControlTypes.Readonly : null; // Set the rendered event\n\n onControlRendered = controlProps.onControlRendered;\n\n controlProps.onControlRendered = function (formControl) {\n // Save the control\n control = formControl; // See if this field is readonly and a value exists\n\n if (props.value && isReadonly) {\n // Set the class name\n control.el.classList.add(\"form-control\");\n control.el.style.backgroundColor = \"#e9ecef\"; // Override the html rendered\n\n control.el.innerHTML = props.listInfo.fieldValuesAsHtml[props.field.InternalName];\n } else {\n // Render a date picker\n var dt_1 = datetime_1.DateTime({\n el: control.el,\n showTime: showTime_1,\n value: control.props.value\n }); // Set the get value event\n\n control.props.onGetValue = function () {\n // Return the value\n return dt_1.getValue();\n };\n } // Call the event\n\n\n onControlRendered ? onControlRendered(formControl) : null;\n };\n\n break;\n // Lookup\n\n case gd_sprest_1.SPTypes.FieldType.Lookup:\n // See if this field is readonly and a value exists\n if (isReadonly) {\n // Update the value\n controlProps.type = gd_bs_1.Components.FormControlTypes.Readonly; // Ensure a value exists\n\n if (props.value) {\n // Set the rendered event\n onControlRendered = controlProps.onControlRendered;\n\n controlProps.onControlRendered = function (formControl) {\n // Set the class name\n control.el.classList.add(\"form-control\");\n control.el.style.backgroundColor = \"#e9ecef\"; // Override the html rendered\n\n control.el.innerHTML = props.listInfo.fieldValuesAsHtml[props.field.InternalName];\n };\n }\n } else {\n // Set the rendering event\n onControlRendering = controlProps.onControlRendering;\n\n controlProps.onControlRendering = function (newProps) {\n // Update the control properties\n controlProps = newProps; // Display a loading message\n\n controlProps.loadingMessage = \"Loading the Lookup Data\"; // Return a promise\n\n return new Promise(function (resolve, reject) {\n // Load the field information\n gd_sprest_1.Helper.ListFormField.create({\n field: props.field,\n listName: props.listInfo.list.Title,\n name: props.field.InternalName,\n webUrl: props.listInfo.webUrl\n }).then( // Success\n function (fieldInfo) {\n // Save the field information\n lookupFieldInfo = fieldInfo; // Update the multi property\n\n controlProps.multi = lookupFieldInfo.multi; // Get the drop down information\n\n gd_sprest_1.Helper.ListFormField.loadLookupData(lookupFieldInfo, 500).then( // Success\n function (items) {\n // Set the type\n controlProps.type = lookupFieldInfo.multi ? gd_bs_1.Components.FormControlTypes.MultiDropdown : gd_bs_1.Components.FormControlTypes.Dropdown; // Get the dropdown items\n\n var ddlItems = getLookupItems(props.field, items, props.value); // See if this is not a required field and not a multi-select\n\n if (!isRequired && !lookupFieldInfo.multi) {\n // Add a blank entry\n ddlItems = [{\n text: \"\",\n value: null\n }].concat(ddlItems);\n } // Set the items\n\n\n controlProps.items = ddlItems; // Clear the element\n\n controlProps.el ? controlProps.el.innerHTML = \"\" : null; // Call the event\n\n var returnVal = onControlRendering ? onControlRendering(controlProps) : null;\n\n if (returnVal && returnVal.then) {\n // Wait for the promise to complete\n returnVal.then(function (props) {\n // Resolve the promise\n resolve(props || controlProps);\n });\n } else {\n // Resolve the promise\n resolve(controlProps);\n }\n }, // Error\n function (msg) {\n // Set the error message\n var errorMessage = \"Error loading the lookup field values for '\" + props.field.InternalName + \"'.\"; // Display an error message\n\n gd_bs_1.Components.Alert({\n el: controlProps.el,\n content: errorMessage,\n type: gd_bs_1.Components.AlertTypes.Danger\n }); // Call the error event\n\n props.onError ? props.onError(errorMessage) : null;\n });\n }, // Error\n function (msg) {\n // Set the error message\n var errorMessage = \"Error loading the field information for field '\" + props.field.InternalName + \"'.\"; // Display an error message\n\n controlProps.el.innerHTML = \"\";\n gd_bs_1.Components.Alert({\n el: controlProps.el,\n content: \"Error loading the lookup field information.\",\n type: gd_bs_1.Components.AlertTypes.Danger\n }); // Call the error event\n\n props.onError ? props.onError(errorMessage) : null; // Reject the request\n\n reject(msg);\n });\n });\n };\n }\n\n break;\n // Multi-Choice\n\n case gd_sprest_1.SPTypes.FieldType.MultiChoice:\n var isChoice = props.field.SchemaXml.indexOf('Format=\"RadioButtons\"') > 0 ? true : false; // See if we are displaying radio buttons\n\n if (isChoice) {\n // Update the properties\n controlProps.multi = true;\n controlProps.type = gd_bs_1.Components.FormControlTypes.Switch;\n } else {\n // Set the type\n controlProps.type = gd_bs_1.Components.FormControlTypes.MultiDropdown;\n } // Update the value\n\n\n controlProps.value = (props.value ? props.value.results : null) || props.value; // Set the items\n\n controlProps.items = getChoiceItems(isChoice, props.field, props.value);\n break;\n // Note\n\n case gd_sprest_1.SPTypes.FieldType.Note:\n // Set the properties\n controlProps.type = gd_bs_1.Components.FormControlTypes.TextArea;\n controlProps.rows = props.field.NumberOfLines;\n break;\n // Number Field\n\n case gd_sprest_1.SPTypes.FieldType.Number:\n var numberField = props.field;\n var numberProps = controlProps; // See if this is a percentage\n\n if (numberField.ShowAsPercentage) {\n // Set the type\n numberProps.type = gd_bs_1.Components.FormControlTypes.Range; // Set the max value\n\n numberProps.max = numberField.MaximumValue == Number.MAX_VALUE ? 100 : numberField.MaximumValue; // Set the min value\n\n numberProps.min = numberField.MinimumValue == -1.7976931348623157e+308 ? 0 : numberField.MinimumValue; // Set the value\n\n numberProps.value = numberProps.value == null || numberProps.value == Number.MIN_VALUE ? 0 : numberProps.value;\n } // Else, see if the min/max values are defined\n else if (typeof numberField.MaximumValue == \"number\" && typeof numberField.MinimumValue == \"number\") {\n // Update the properties to display a range\n numberProps.type = gd_bs_1.Components.FormControlTypes.Range;\n numberProps.max = numberField.MaximumValue;\n numberProps.min = numberField.MinimumValue;\n numberProps.value = typeof numberProps.value == \"number\" ? numberProps.value : numberProps.min;\n } else {\n // Set the type\n numberProps.type = gd_bs_1.Components.FormControlTypes.TextField;\n }\n\n break;\n // URL\n\n case gd_sprest_1.SPTypes.FieldType.URL:\n var desc_1 = null;\n var url_1 = null;\n var value_1 = props.value; // See if a value exists\n\n if (props.value) {\n // Update the value\n controlProps.value = props.value.Url;\n } // Set the render event\n\n\n onControlRendered = controlProps.onControlRendered;\n\n controlProps.onControlRendered = function (formControl) {\n // Save the control\n control = formControl; // Clear the element\n\n control.el.innerHTML = \"\"; // Render the description\n\n desc_1 = gd_bs_1.Components.FormControl({\n className: \"mb-1\",\n el: control.el,\n placeholder: \"Description\",\n type: gd_bs_1.Components.FormControlTypes.TextField,\n value: value_1 ? value_1.Description : null\n }); // Render the url\n\n url_1 = gd_bs_1.Components.FormControl({\n el: control.el,\n placeholder: \"Url\",\n type: gd_bs_1.Components.FormControlTypes.TextField,\n value: value_1 ? value_1.Url : null\n }); // Set the get value event\n\n control.props.onGetValue = function (controlProps) {\n // Return the value\n return {\n Description: desc_1.getValue(),\n Url: url_1.getValue()\n };\n }; // Call the event\n\n\n onControlRendered ? onControlRendered(formControl) : null;\n }; // Set the validate event\n\n\n controlProps.onValidate = function (control) {\n var descValid,\n urlValid = false; // Get the form control elements\n\n var elFormControl = control.el.querySelectorAll(\".form-control\");\n var elDesc = elFormControl[0];\n var elUrl = elFormControl[1]; // See if the description exists\n\n if (elDesc) {\n // Clear the classes\n elDesc.classList.remove(\"is-invalid\");\n elDesc.classList.remove(\"is-valid\"); // Set the flag\n\n descValid = control.required ? desc_1.getValue() ? true : false : true; // Set the class\n\n elDesc.classList.add(descValid ? \"is-valid\" : \"is-invalid\");\n } // See if the url exists\n\n\n if (elUrl) {\n // Clear the classes\n elUrl.classList.remove(\"is-invalid\");\n elUrl.classList.remove(\"is-valid\"); // Set the flag\n\n urlValid = control.required ? url_1.getValue() ? true : false : true; // Set the class\n\n elUrl.classList.add(urlValid ? \"is-valid\" : \"is-invalid\");\n } // Return the flag if this field is required\n\n\n return descValid && urlValid;\n };\n\n break;\n // User\n\n case gd_sprest_1.SPTypes.FieldType.User:\n // Set the type\n controlProps.type = isReadonly ? gd_bs_1.Components.FormControlTypes.Readonly : peoplePicker_1.PeoplePickerControlType; // Set the rendered event\n\n onControlRendered = controlProps.onControlRendered;\n\n controlProps.onControlRendered = function (formControl) {\n // Save the control\n control = formControl; // See if this field is readonly and a value exists\n\n if (props.value && isReadonly) {\n // Set the class name\n control.el.classList.add(\"form-control\");\n control.el.style.backgroundColor = \"#e9ecef\"; // Override the html rendered\n\n control.el.innerHTML = props.listInfo.fieldValuesAsHtml[props.field.InternalName];\n } // Call the event\n\n\n onControlRendered ? onControlRendered(formControl) : null;\n };\n\n break;\n } // See if this is a taxonomy field\n\n\n if (/^TaxonomyFieldType/.test(props.field.TypeAsString)) {\n // Set the type\n controlProps.type = gd_bs_1.Components.FormControlTypes.Dropdown; // Set a render event\n\n onControlRendering = controlProps.onControlRendering;\n\n controlProps.onControlRendering = function (newProps) {\n // Update the control properties\n controlProps = newProps; // Return a promise\n\n return new Promise(function (resolve, reject) {\n // Display a loading message\n controlProps.loadingMessage = \"Loading the MMS Data\"; // Load the field information\n\n gd_sprest_1.Helper.ListFormField.create({\n field: props.field,\n listName: props.listInfo.list.Title,\n name: props.field.InternalName,\n webUrl: props.listInfo.webUrl\n }).then( // Success\n function (fieldInfo) {\n // Save the field information\n mmsFieldInfo = fieldInfo; // Set the type\n\n controlProps.type = mmsFieldInfo.multi ? gd_bs_1.Components.FormControlTypes.MultiDropdown : gd_bs_1.Components.FormControlTypes.Dropdown; // Load the value field\n\n gd_sprest_1.Helper.ListFormField.loadMMSValueField(mmsFieldInfo).then( // Success\n function (valueField) {\n // Set the value field\n mmsFieldInfo.valueField = valueField; // See if this is a new form\n\n if (props.controlMode == gd_sprest_1.SPTypes.ControlMode.New) {\n var fieldValue = []; // Get the default values\n\n var values = (props.field.DefaultValue || \"\").split(\";#\");\n\n for (var i = 0; i < values.length; i++) {\n var value = values[i].split(\"|\");\n\n if (value.length == 2) {\n // Add the term id\n fieldValue.push(value[1]);\n }\n } // Update the field value\n\n\n controlProps.value = fieldValue;\n } else {\n var fieldValue = props.value; // Get the field value\n\n var values = fieldValue && fieldValue.results ? fieldValue.results : [fieldValue]; // Clear the field values\n\n fieldValue = []; // Parse the values\n\n for (var i = 0; i < values.length; i++) {\n // Ensure the value exists\n if (values[i] && values[i].TermGuid) {\n // Add the value\n fieldValue.push(values[i].TermGuid);\n }\n } // Update the field value\n\n\n controlProps.value = fieldValue;\n } // Load the terms\n\n\n gd_sprest_1.Helper.ListFormField.loadMMSData(mmsFieldInfo).then( // Success\n function (terms) {\n // Get the items\n var items = getMMSItems(gd_sprest_1.Helper.Taxonomy.toObject(terms), controlProps.value); // See if this is not a required field and not a multi-select\n\n if (!isRequired && !mmsFieldInfo.multi) {\n // Add a blank entry\n items = [{\n text: \"\",\n value: null\n }].concat(items);\n } // Set the items\n\n\n controlProps.items = items; // Clear the element\n\n controlProps.el ? controlProps.el.innerHTML = \"\" : null; // Call the event\n\n var returnVal = onControlRendering ? onControlRendering(controlProps) : null;\n\n if (returnVal && returnVal.then) {\n // Wait for the promise to complete\n returnVal.then(function (props) {\n // Resolve the promise\n resolve(props || controlProps);\n });\n } else {\n // Resolve the promise\n resolve(controlProps);\n }\n }, // Error\n function (msg) {\n // Set the error message\n var errorMessage = \"Error loading the mms terms for '\" + props.field.InternalName + \"'.\"; // Display an error message\n\n gd_bs_1.Components.Alert({\n el: controlProps.el,\n content: errorMessage,\n type: gd_bs_1.Components.AlertTypes.Danger\n }); // Call the error event\n\n props.onError ? props.onError(errorMessage) : null;\n });\n }, // Error\n function (msg) {\n // Set the error message\n var errorMessage = \"Error loading the mms value field for '\" + props.field.InternalName + \"'.\"; // Display an error message\n\n gd_bs_1.Components.Alert({\n el: controlProps.el,\n content: errorMessage,\n type: gd_bs_1.Components.AlertTypes.Danger\n }); // Call the error event\n\n props.onError ? props.onError(errorMessage) : null; // Reject the request\n\n reject(msg);\n });\n }, function (msg) {\n // Display an error message\n gd_bs_1.Components.Alert({\n el: controlProps.el,\n content: msg,\n type: gd_bs_1.Components.AlertTypes.Danger\n }); // Call the error event\n\n props.onError ? props.onError(msg) : null;\n });\n });\n };\n } // Return the field\n\n\n return {\n control: control,\n controlProps: controlProps,\n getValue: function getValue() {\n var fieldValue = {\n name: props.field.InternalName,\n value: control ? control.getValue() : null\n }; // Update the field name/value, based on the type\n\n switch (props.field.FieldTypeKind) {\n // Boolean\n case gd_sprest_1.SPTypes.FieldType.Boolean:\n // Update the value\n fieldValue.value = fieldValue.value ? true : false;\n break;\n // Choice\n\n case gd_sprest_1.SPTypes.FieldType.Choice:\n // See if this is a dropdown\n if (controlProps.type == gd_bs_1.Components.FormControlTypes.Dropdown) {\n // See if there is a value\n var ddlValue = fieldValue.value;\n\n if (ddlValue) {\n // Update the field value\n fieldValue.value = ddlValue.value || ddlValue.text;\n }\n } else {\n // See if there is a value\n var cbValue = fieldValue.value;\n\n if (cbValue) {\n // Update the field value\n fieldValue.value = cbValue.label;\n }\n }\n\n break;\n // Number Field\n\n case gd_sprest_1.SPTypes.FieldType.Currency:\n // Ensure a value exists, otherwise null\n fieldValue.value = fieldValue.value || null;\n break;\n // Date/Time\n\n case gd_sprest_1.SPTypes.FieldType.DateTime:\n // Ensure a value exists, otherwise null\n fieldValue.value = fieldValue.value ? new Date(fieldValue.value).toISOString() : null;\n break;\n // Lookup\n\n case gd_sprest_1.SPTypes.FieldType.Lookup:\n // Append 'Id' to the field name\n fieldValue.name += fieldValue.name.lastIndexOf(\"Id\") == fieldValue.name.length - 2 ? \"\" : \"Id\"; // See if this is a multi-value field\n\n if (lookupFieldInfo.multi) {\n var values_1 = fieldValue.value || [];\n fieldValue.value = {\n results: []\n }; // Parse the values\n\n for (var j = 0; j < values_1.length; j++) {\n // Add the value\n fieldValue.value.results.push(values_1[j].value || values_1[j].text);\n }\n } else {\n // Update the field value\n fieldValue.value = fieldValue.value ? fieldValue.value.value || fieldValue.value.text : null; // Ensure a value exists, otherwise null\n\n fieldValue.value = fieldValue.value || null;\n }\n\n break;\n // Multi-Choice\n\n case gd_sprest_1.SPTypes.FieldType.MultiChoice:\n var values = fieldValue.value || [];\n fieldValue.value = {\n results: []\n }; // Parse the values\n\n for (var j = 0; j < values.length; j++) {\n // See if this is a dropdown\n if (controlProps.type == gd_bs_1.Components.FormControlTypes.MultiDropdown) {\n // See if there is a value\n var ddlValue = values[j]; // Add the values\n\n fieldValue.value.results.push(ddlValue.value || ddlValue.text);\n } else {\n // See if there is a value\n var cbValue = values[j]; // Add the values\n\n fieldValue.value.results.push(cbValue.label);\n }\n }\n\n break;\n // Number Field\n\n case gd_sprest_1.SPTypes.FieldType.Number:\n var numberField = props.field; // Ensure a field value exists\n\n if (fieldValue.value) {\n // See if this is a percentage\n if (numberField.ShowAsPercentage) {\n // Update the value\n fieldValue.value = fieldValue.value / 100;\n }\n } else {\n // Ensure the value is null\n fieldValue.value = null;\n }\n\n break;\n // URL\n\n case gd_sprest_1.SPTypes.FieldType.URL:\n // See if the field value exists\n if (fieldValue.value && fieldValue.value.Url) {\n // Set the url, and validate the format\n var url = fieldValue.value.Url;\n\n if (url && /^http/.test(url.toLowerCase()) == false) {\n // Update the url, otherwise the request will fail\n url = \"https://\" + url;\n } // Add the metadata\n\n\n fieldValue.value = {\n __metadata: {\n type: \"Types.SP.FieldUrlValue\"\n },\n Description: fieldValue.value.Description || \"\",\n Url: url\n };\n } else {\n // Ensure the value is null\n fieldValue.value = null;\n }\n\n break;\n // User\n\n case gd_sprest_1.SPTypes.FieldType.User:\n // Append 'Id' to the field name\n fieldValue.name += fieldValue.name.lastIndexOf(\"Id\") == fieldValue.name.length - 2 ? \"\" : \"Id\"; // See if this is a multi-value field\n\n if (props.field.AllowMultipleValues) {\n var values_2 = fieldValue.value || []; // Default the value\n\n fieldValue.value = {\n results: []\n }; // Parse the options\n\n for (var j = 0; j < values_2.length; j++) {\n var userValue = values_2[j]; // Add the field value\n\n userValue.Id ? fieldValue.value.results.push(userValue.Id) : null;\n }\n } else {\n var userValue = fieldValue.value ? fieldValue.value[0] : null; // Set the field value\n\n fieldValue.value = userValue.Id ? userValue.Id : null;\n }\n\n break;\n // MMS\n\n default:\n // See if this is a MMS field\n if (mmsFieldInfo) {\n // See if this is a multi field\n if (mmsFieldInfo.multi) {\n // Update the field name to the value field\n fieldValue.name = mmsFieldInfo ? mmsFieldInfo.valueField.InternalName : fieldValue.name + \"_0\"; // Parse the field values\n\n var fieldValues = fieldValue.value || [];\n fieldValue.value = [];\n\n for (var j = 0; j < fieldValues.length; j++) {\n var termInfo = fieldValues[j]; // Add the field value\n\n fieldValue.value.push(-1 + \";#\" + termInfo.text + \"|\" + termInfo.value);\n } // Set the field value\n\n\n fieldValue.value = fieldValue.value.join(\";#\");\n } else {\n // Update the value\n fieldValue.value = fieldValue.value && fieldValue.value.value ? {\n __metadata: {\n type: \"Types.SP.Taxonomy.TaxonomyFieldValue\"\n },\n Label: fieldValue.value.text,\n TermGuid: fieldValue.value.value,\n WssId: -1\n } : null;\n }\n }\n\n break;\n } // Return the field value\n\n\n return fieldValue;\n },\n isValid: function isValid() {\n // Validate the control\n var isValid = control ? control.isValid : false; // Call the event\n\n isValid = props.onValidate ? props.onValidate(props.field, control) : isValid; // Return the flag\n\n return isValid;\n }\n };\n};\n\n//# sourceURL=webpack:///./build/components/field.js?");
/***/ }),
/***/ "./build/components/index.js":
/*!***********************************!*\
!*** ./build/components/index.js ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/index.js\");\n\nvar datetime_1 = __webpack_require__(/*! ./datetime */ \"./build/components/datetime.js\");\n\nvar field_1 = __webpack_require__(/*! ./field */ \"./build/components/field.js\");\n\nvar listForm_1 = __webpack_require__(/*! ./listForm */ \"./build/components/listForm.js\");\n\nvar listFormDialog_1 = __webpack_require__(/*! ./listFormDialog */ \"./build/components/listFormDialog.js\");\n\nvar peoplePicker_1 = __webpack_require__(/*! ./peoplePicker */ \"./build/components/peoplePicker.js\"); // Extend the components\n\n\ngd_bs_1.Components[\"DateTime\"] = datetime_1.DateTime;\ngd_bs_1.Components[\"Field\"] = field_1.Field;\ngd_bs_1.Components[\"ListForm\"] = listForm_1.ListForm;\ngd_bs_1.Components[\"ListFormDialog\"] = listFormDialog_1.ListFormDialog;\ngd_bs_1.Components[\"PeoplePicker\"] = peoplePicker_1.PeoplePicker; // Export the components\n\nexports[\"default\"] = gd_bs_1.Components;\n\n//# sourceURL=webpack:///./build/components/index.js?");
/***/ }),
/***/ "./build/components/listForm.js":
/*!**************************************!*\
!*** ./build/components/listForm.js ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/index.js\");\n\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/index.js\");\n\nvar field_1 = __webpack_require__(/*! ./field */ \"./build/components/field.js\"); // Extend the list form\n\n\nexports.ListForm = gd_sprest_1.Helper.ListForm; // Method to get the fields to render\n\nvar getFieldsToRender = function getFieldsToRender(props) {\n var fieldNames = []; // See if the \"include\" fields property is defined\n\n if (props.includeFields) {\n // Set the field names\n fieldNames = props.includeFields;\n } else {\n // Parse the fields\n for (var fieldName in props.info.fields) {\n // See if the \"exclude\" property is set\n if (props.excludeFields) {\n var renderFl = true; // Parse the fields\n\n for (var i = 0; i < props.excludeFields.length; i++) {\n // See if we are excluding this field\n if (props.excludeFields[i] == fieldName) {\n // Set the flag\n renderFl = false;\n break;\n }\n } // Skip this field, if we are not rendering it\n\n\n if (!renderFl) {\n continue;\n }\n } // Add the field name\n\n\n fieldNames.push(fieldName);\n }\n } // Return the field names\n\n\n return fieldNames;\n}; // Method to render a display form for an item\n\n\nexports.ListForm.renderDisplayForm = function (props) {\n var form = null; // Render a loading message\n\n var progress = gd_bs_1.Components.Progress({\n el: props.el,\n isAnimated: true,\n isStriped: true,\n label: \"Loading the Form\",\n size: 100\n });\n var hasUserField = false;\n var mapper = {};\n var rows = []; // See if we are rendering attachments\n\n if (props.info.attachments) {\n // Render the attachments\n rows.push({\n columns: [{\n control: {\n label: \"Attachments\",\n name: \"Attachments\",\n onControlRendered: function onControlRendered(control) {\n var items = []; // Parse the attachments\n\n for (var i = 0; i < props.info.attachments.length; i++) {\n var attachment = props.info.attachments[i]; // Add the item\n\n items.push({\n buttons: [{\n className: \"mr-1\",\n href: attachment.ServerRelativeUrl,\n isSmall: true,\n text: attachment.FileName\n }]\n });\n } // Render a toolbar\n\n\n gd_bs_1.Components.Toolbar({\n el: control.el,\n items: items\n });\n }\n }\n }]\n });\n } // Parse the fields to render\n\n\n var fieldNames = getFieldsToRender(props);\n\n for (var i = 0; i < fieldNames.length; i++) {\n var fieldName = fieldNames[i];\n var field = props.info.fields[fieldName];\n var html = props.info.fieldValuesAsHtml[fieldName] || props.info.fieldValuesAsHtml[fieldName.replace(/\\_/g, \"_x005f_\")] || \"\"; // Ensure the field exists\n\n if (field == null) {\n // Log\n console.error(\"[List Form] Field '\" + fieldName + \"' does not exist. Check the list or query.\");\n continue;\n } // See if this is a note field\n\n\n if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Note) {\n // Update the html\n html = html.replace(/\\r?\\n/g, ' ');\n } // Else, see if this is a user field\n else if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.User) {\n // Set the flag\n hasUserField = true;\n } // Set the control\n\n\n mapper[fieldName] = {\n data: html,\n description: field.Description,\n isReadonly: true,\n label: field.Title,\n name: field.InternalName,\n type: gd_bs_1.Components.FormControlTypes.TextField,\n value: html\n }; // Update the type, based on the field\n\n switch (field.FieldTypeKind) {\n case gd_sprest_1.SPTypes.FieldType.Note:\n mapper[fieldName].type = gd_bs_1.Components.FormControlTypes.TextArea;\n break;\n } // Detect html\n\n\n if (/<*>/g.test(html)) {\n // Update the control to be read-only\n mapper[fieldName].type = gd_bs_1.Components.FormControlTypes.Readonly; // Set the rendered event\n\n mapper[fieldName].onControlRendered = function (control) {\n // Set the class name\n control.el.classList.add(\"form-control\");\n control.el.style.backgroundColor = \"#e9ecef\"; // Override the html rendered\n\n control.el.innerHTML = control.props.data;\n };\n } // Add the row\n\n\n rows.push({\n columns: [{\n control: mapper[fieldName]\n }]\n });\n } // See if there is a template\n\n\n if (props.template) {\n var updateControl = function updateControl(refControl) {\n // Get the control from the mapper\n var control = refControl ? mapper[refControl.name] : null; // Ensure the controls exists\n\n if (control && refControl) {\n // Parse the control keys\n for (var key in control) {\n // Skip if a value is already defined\n if (refControl[key]) {\n continue;\n } // Update the property\n\n\n refControl[key] = control[key];\n }\n }\n }; // Parse the template\n\n\n for (var i = 0; i < props.template.length; i++) {\n var row = props.template[i]; // Parse the columns if there are columns\n\n var columns = row.columns || [];\n\n for (var j = 0; j < columns.length; j++) {\n var column = columns[j]; // Update the control\n\n updateControl(column.control);\n }\n }\n } // Remove the progress bar\n\n\n progress.el.parentElement ? progress.el.parentElement.removeChild(progress.el) : null; // Render the form\n\n form = gd_bs_1.Components.Form({\n el: props.el,\n onControlRendered: function onControlRendered(control) {\n return props.onControlRendered ? props.onControlRendered(control, props.info.fields[control.props.name]) : null;\n },\n onControlRendering: function onControlRendering(control) {\n return props.onControlRendering ? props.onControlRendering(control, props.info.fields[control.name]) : null;\n },\n rows: props.template || rows\n }); // See if we are displaying a user field\n\n if (hasUserField) {\n // Enable the persona\n window[\"ProcessImn\"]();\n } // Return the form informaiton\n\n\n return {\n get el() {\n return form ? form.el : null;\n }\n\n };\n}; // Render the edit form\n\n\nexports.ListForm.renderEditForm = function (props) {\n var mapper = {};\n var rows = [];\n var value = {};\n var attachments = {\n \"delete\": [],\n \"new\": []\n }; // Method to add a refresh alert\n\n var addRefreshLink = function addRefreshLink() {\n // Ensure the link doesn't already exist\n if (props.el.querySelector(\".refresh-btn\")) {\n return;\n } // Create the refresh button\n\n\n var alert = gd_bs_1.Components.ButtonGroup({\n className: \"refresh-btn\",\n buttonType: gd_bs_1.Components.ButtonTypes.Danger,\n buttons: [{\n text: \"Refresh Form\",\n onClick: function onClick() {\n // Clear the element and reload the form\n props.el.innerHTML = \"\"; // Render the form\n\n exports.ListForm.renderEditForm(props);\n }\n }, {\n text: \"Refresh Page\",\n onClick: function onClick() {\n // Refresh the page\n document.location.href = document.location.href;\n }\n }]\n }); // Add the element at the top\n\n props.el.insertBefore(alert.el, props.el.children[0]);\n }; // Method to remove the attachments\n\n\n var removeAttachments = function removeAttachments(info) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Ensure attachments exists\n if (attachments[\"delete\"].length == 0) {\n resolve();\n return;\n } // Get the web\n\n\n props.info.list.ParentWeb().execute(function (web) {\n // Parse the attachments\n gd_sprest_1.Helper.Executor(attachments[\"delete\"], function (attachment) {\n // Get the attachment file\n web.getFileByServerRelativeUrl(attachment.ServerRelativeUrl)[\"delete\"]().execute(); // Parse the attachments\n\n for (var i = 0; i < props.info.attachments.length; i++) {\n // See if this is the target attachment\n if (props.info.attachments[i].ServerRelativeUrl == attachment.ServerRelativeUrl) {\n // Remove this item\n props.info.attachments.splice(i, 1);\n break;\n }\n }\n }).then(function () {\n // Wait for the files to be deleted\n web.done(function () {\n // Clear the attachments\n attachments[\"delete\"] = []; // Resolve the promise\n\n resolve();\n });\n });\n });\n });\n }; // Method to save the attachments\n\n\n var saveAttachments = function saveAttachments(info) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Ensure attachments exists\n if (attachments[\"new\"].length == 0) {\n resolve();\n return;\n } // Parse the attachments\n\n\n gd_sprest_1.Helper.Executor(attachments[\"new\"], function (attachment) {\n // Get the item's attachments\n props.info.list.Items(info.item.Id).AttachmentFiles() // Add the file\n .add(attachment.name, attachment.data) // Execute the request\n .execute(function (attachment) {\n // Ensure attachments exist\n info.attachments = info.attachments || []; // Append the attachment\n\n info.attachments.push(attachment);\n });\n }).then(function () {\n // Wait for the files to upload\n props.info.list.done(function () {\n // Clear the attachments\n attachments[\"new\"] = []; // Resolve the promise\n\n resolve();\n });\n });\n });\n }; // Render a loading message\n\n\n var progress = gd_bs_1.Components.Progress({\n el: props.el,\n isAnimated: true,\n isStriped: true,\n label: \"Loading the Form\",\n size: 100\n }); // See if we are rendering attachments\n\n if (props.info.attachments) {\n // Render the attachments\n rows.push({\n columns: [{\n control: {\n label: \"Attachments\",\n name: \"Attachments\",\n onControlRendered: function onControlRendered(control) {\n // Render a toolbar\n var toolbar = gd_bs_1.Components.Toolbar({\n el: control.el,\n items: [{\n buttons: [{\n className: \"upload-btn mr-1\",\n isSmall: true,\n text: \"Upload\",\n type: gd_bs_1.Components.ButtonTypes.Secondary,\n onClick: function onClick(btn, ev) {\n var elUpload = ev.currentTarget; // Display an upload dialog\n\n gd_sprest_1.Helper.ListForm.showFileDialog().then(function (fileInfo) {\n // Get the buttons and remove any duplicates\n var buttons = elUpload.parentElement.querySelectorAll(\".btn\");\n\n for (var i = 0; i < buttons.length; i++) {\n var button = buttons[i]; // See if this is the associated button\n\n if (button.innerText.replace(/X$/, '') == fileInfo.name) {\n // Get the badge\n var badge = button.querySelector(\".badge\");\n\n if (badge) {\n // Remove the button\n badge.click();\n }\n\n break;\n }\n } // Save the file information\n\n\n attachments[\"new\"].push(fileInfo); // Append the attachment\n\n elUpload.parentElement.appendChild(gd_bs_1.Components.Popover({\n isDismissible: true,\n type: gd_bs_1.Components.PopoverTypes.Bottom,\n btnProps: {\n className: \"mr-1\",\n isSmall: true,\n text: fileInfo.name\n },\n options: {\n html: true,\n content: gd_bs_1.Components.Button({\n data: fileInfo,\n isSmall: true,\n text: \"Remove\",\n type: gd_bs_1.Components.ButtonTypes.Danger,\n onClick: function onClick(btn, ev) {\n var fileName = btn.data.name; // Parse the array\n\n for (var i = 0; i < attachments[\"new\"].length; i++) {\n // See if this is the target attachment\n if (attachments[\"new\"][i].name == fileName) {\n // Remove this attachment\n attachments[\"new\"].splice(i, 1);\n break;\n }\n } // Get the files\n\n\n var files = btnGroup.querySelectorAll(\".btn[data-toggle='popover']\");\n\n for (var i = 0; i < files.length; i++) {\n var file = files[i]; // See if this is the target button\n\n if (file.innerText == fileName) {\n // Remove this popover\n file.parentElement.removeChild(file);\n break;\n }\n }\n }\n }).el\n }\n }).el);\n });\n }\n }]\n }]\n }); // Get the button group\n\n var btnGroup = toolbar.el.querySelector(\".btn-group\");\n\n if (btnGroup) {\n // Parse the attachments\n for (var i = 0; i < props.info.attachments.length; i++) {\n var attachment = props.info.attachments[i]; // Add the attachment\n\n btnGroup.appendChild(gd_bs_1.Components.Popover({\n isDismissible: true,\n type: gd_bs_1.Components.PopoverTypes.Bottom,\n btnProps: {\n className: \"mr-1\",\n isSmall: true,\n text: attachment.FileName\n },\n options: {\n html: true,\n content: gd_bs_1.Components.Button({\n data: attachment,\n isSmall: true,\n text: \"Remove\",\n type: gd_bs_1.Components.ButtonTypes.Danger,\n onClick: function onClick(btn, ev) {\n var attachment = btn.data; // Add this file for deletion\n\n attachments[\"delete\"].push(attachment); // Get the files\n\n var files = btnGroup.querySelectorAll(\".btn[data-toggle='popover']\");\n\n for (var i_1 = 0; i_1 < files.length; i_1++) {\n var file = files[i_1]; // See if this is the target button\n\n if (file.innerText == attachment.FileName) {\n // Remove this popover\n file.parentElement.removeChild(file);\n break;\n }\n }\n }\n }).el\n }\n }).el);\n }\n }\n }\n }\n }]\n });\n } // Parse the fields to render\n\n\n var fieldNames = getFieldsToRender(props);\n\n for (var i = 0; i < fieldNames.length; i++) {\n var fieldName = fieldNames[i];\n var field = props.info.fields[fieldName]; // Ensure the field exists\n\n if (field == null) {\n // Log\n console.error(\"[List Form] Field '\" + fieldName + \"' does not exist. Check the list or query.\");\n continue;\n } // See if the item exists\n\n\n value[fieldName] = null;\n\n if (props.info.item) {\n // Set the value\n value[fieldName] = props.info.item[fieldName]; // See if this is a lookup or user field\n\n if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Lookup || field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.User) {\n // Update the value\n value[fieldName] = value[fieldName + \"Id\"] || (value[fieldName] ? value[fieldName].Id : null) || value[fieldName];\n }\n } // See if this is an edit form\n\n\n if (props.controlMode == gd_sprest_1.SPTypes.ControlMode.Edit) {\n // See if we are hiding the field\n if (field.SchemaXml.indexOf('ShowInEditForm=\"FALSE\"') > 0) {\n continue;\n }\n } // See if this is a display form\n\n\n if (props.controlMode == gd_sprest_1.SPTypes.ControlMode.Display) {\n // See if we are hiding the field\n if (field.SchemaXml.indexOf('ShowInDisplayForm=\"FALSE\"') > 0) {\n continue;\n }\n } // See if this is a new form\n\n\n if (props.controlMode == gd_sprest_1.SPTypes.ControlMode.New) {\n // See if we are hiding the field\n if (field.SchemaXml.indexOf('ShowInNewForm=\"FALSE\"') > 0) {\n continue;\n }\n } // See if this is a read-only field\n\n\n if (field.ReadOnlyField) {\n // Do not render in the new form\n if (props.controlMode == gd_sprest_1.SPTypes.ControlMode.New) {\n continue;\n }\n } // Do not render a hidden taxonomy field\n\n\n if (field.Hidden && field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Note && /_0$/.test(field.Title)) {\n continue;\n } // See if this is an invalid field type\n\n\n if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Invalid) {\n // Ensure it's not a taxonomy field\n if (!/^TaxonomyFieldType/.test(field.TypeAsString)) {\n continue;\n }\n } // Else, see if this is a calculated column\n else if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.Calculated) {\n // Do not render in the new/edit forms\n if (props.controlMode != gd_sprest_1.SPTypes.ControlMode.Display) {\n continue;\n }\n } // Create the control\n\n\n var fieldControl = field_1.Field({\n controlMode: props.controlMode,\n field: field,\n listInfo: props.info,\n value: value[fieldName],\n onControlRendered: function onControlRendered(control, field) {\n // Update the mapper\n mapper[field.InternalName].control = control;\n },\n onValidate: props.onValidate,\n onError: function onError(msg) {\n // Add the refresh link\n addRefreshLink(); // Call the event\n\n props.onError ? props.onError(msg) : null;\n }\n }); // Update the mapper\n\n mapper[fieldName] = fieldControl; // Add the row\n\n rows.push({\n columns: [{\n control: fieldControl.controlProps\n }]\n });\n } // See if there is a template\n\n\n if (props.template) {\n var updateControl = function updateControl(refControl) {\n // Get the control from the mapper\n var control = refControl && mapper[refControl.name] ? mapper[refControl.name].controlProps : null; // Ensure the controls exists\n\n if (control && refControl) {\n // Parse the control keys\n for (var key in control) {\n // Skip if a value is already defined\n if (refControl[key]) {\n continue;\n } // Update the property\n\n\n refControl[key] = control[key];\n }\n }\n }; // Parse the template\n\n\n for (var i = 0; i < props.template.length; i++) {\n var row = props.template[i]; // Parse the columns if there are columns\n\n var columns = row.columns || [];\n\n for (var j = 0; j < columns.length; j++) {\n var column = columns[j]; // Update the control\n\n updateControl(column.control);\n }\n }\n } // Remove the progress bar\n\n\n progress.el.parentElement ? progress.el.parentElement.removeChild(progress.el) : null; // Render the form\n\n var form = gd_bs_1.Components.Form({\n el: props.el,\n onControlRendered: function onControlRendered(control) {\n return props.onControlRendered ? props.onControlRendered(control, props.info.fields[control.props.name]) : null;\n },\n onControlRendering: function onControlRendering(control) {\n var updateReadOnly = function updateReadOnly(control) {\n // See if this control is readonly\n if (control.isReadonly) {\n var html_1 = props.info.fieldValuesAsHtml[field.InternalName]; // Update the control properties\n\n control.type = gd_bs_1.Components.FormControlTypes.Readonly; // Detect html\n\n if (/<*>/g.test(html_1)) {\n // Update the control properties\n control.data = html_1;\n } // Set the rendered event\n\n\n control.onControlRendered = function (control) {\n // Set the class name\n control.el.classList.add(\"form-control\");\n control.el.style.backgroundColor = \"#e9ecef\"; // Override the html rendered\n\n control.el.innerHTML = html_1 || control.props.value;\n }; // See if this is a user field\n\n\n if (field.FieldTypeKind == gd_sprest_1.SPTypes.FieldType.User && window[\"ProcessImn\"]) {\n // Enable the persona\n window[\"ProcessImn\"]();\n }\n }\n }; // Execute the rendering event\n\n\n var field = props.info.fields[control.name];\n var returnVal = props.onControlRendering ? props.onControlRendering(control, field) : null;\n\n if (returnVal && returnVal.then) {\n // Wait for the event to complete\n returnVal.then(function (ctrlProps) {\n // Update the properties\n updateReadOnly(ctrlProps || control);\n });\n } else {\n // Update the properties\n updateReadOnly(control);\n }\n },\n rows: props.template || rows,\n value: value\n }); // Method to get the values\n\n var getValues = function getValues() {\n var values = {}; // Parse the fields\n\n for (var fieldName in props.info.fields) {\n // Get the form field and skip readonly fields\n var formField = mapper[fieldName];\n\n if (formField == null || formField.controlProps.isReadonly) {\n continue;\n } // Get the field value\n\n\n var fieldValue = formField.getValue(); // Set the item value\n\n values[fieldValue.name] = fieldValue.value;\n } // Return the form values\n\n\n return values;\n }; // Return the form\n\n\n return {\n appendControls: function appendControls(controls) {\n form.appendControls(controls);\n },\n appendRows: function appendRows(rows) {\n form.appendRows(rows);\n },\n el: form.el,\n getControl: function getControl(fieldName) {\n return mapper[fieldName] ? mapper[fieldName].control : null;\n },\n getValues: getValues,\n isValid: function isValid() {\n var isValid = true; // Parse the fields\n\n for (var fieldName in props.info.fields) {\n // Skip readonly fields\n var formField = mapper[fieldName];\n\n if (formField == null || formField.controlProps.isReadonly) {\n continue;\n } // Validate the form field and update the status flag\n\n\n isValid = isValid && formField.isValid();\n } // Return the flag\n\n\n return isValid;\n },\n save: function save() {\n var onSaving = function onSaving(values) {\n return new Promise(function (resolve) {\n // See if a save event exists\n var returnVal = props.onSaving ? props.onSaving(values) : null;\n\n if (returnVal && returnVal.then) {\n // Wait for the promise to complete\n returnVal.then(function (newValues) {\n // Resolve the promise\n resolve(newValues || values);\n });\n } else {\n // Resolve the promise\n resolve(values);\n }\n });\n }; // Return a promise\n\n\n return new Promise(function (resolve, reject) {\n // Call the saving event\n onSaving(getValues()).then(function (values) {\n // Update the item\n exports.ListForm.saveItem(props.info, values).then(function (info) {\n // Remove the attachments\n removeAttachments(info).then(function () {\n // Save the attachments\n saveAttachments(info).then(function () {\n // Update the info\n props.info = info; // Resolve the promise\n\n resolve(props.info.item);\n });\n });\n }, reject);\n });\n });\n }\n };\n};\n\n//# sourceURL=webpack:///./build/components/listForm.js?");
/***/ }),
/***/ "./build/components/listFormDialog.js":
/*!********************************************!*\
!*** ./build/components/listFormDialog.js ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/index.js\");\n\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/index.js\");\n\nvar listForm_1 = __webpack_require__(/*! ./listForm */ \"./build/components/listForm.js\");\n/**\r\n * List Form Dialog\r\n */\n\n\nexports.ListFormDialog = function (props) {\n var form = null;\n var modalProps = props.modalProps || {}; // Method to save the form\n\n var saveForm = function saveForm() {\n // Hide the form\n form.el.classList.add(\"d-none\"); // Hide the footer\n\n elFooter.classList.add(\"d-none\"); // Add a progress\n\n var progress = gd_bs_1.Components.Progress({\n el: form.el.parentElement,\n isAnimated: true,\n isStriped: true,\n size: 100\n }).el; // Return a promise\n\n return new Promise(function (resolve, reject) {\n // Ensure the form is valid\n if (!form.isValid()) {\n // Remove the progress\n form.el.parentElement.removeChild(progress); // Show the form\n\n form.el.classList.remove(\"d-none\"); // Show the footer\n\n elFooter.classList.remove(\"d-none\"); // Reject the promise\n\n reject(\"Form is invalid\"); // Return\n\n return;\n } // Save the form\n\n\n form.save().then(function (item) {\n // Remove the progress\n form.el.parentElement.removeChild(progress); // Show the form\n\n form.el.classList.remove(\"d-none\"); // Show the footer\n\n elFooter.classList.remove(\"d-none\"); // Call the save event\n\n props.onSaved ? props.onSaved(item) : null; // Resolve the promise\n\n resolve(item);\n }, reject);\n });\n }; // Update the properties\n\n\n modalProps.el = modalProps.el || props.el;\n modalProps.title = modalProps.title || props.listName;\n modalProps.body = gd_bs_1.Components.Progress({\n isAnimated: true,\n isStriped: true,\n label: \"Loading the Form...\",\n size: 100\n }).el.outerHTML; // Set the on render event\n\n modalProps.onRenderBody = function (el) {\n // Create an instance of the list form\n listForm_1.ListForm.create({\n excludeFields: props.excludeFields,\n fields: props.fields,\n item: props.item,\n itemId: props.itemId,\n listName: props.listName,\n loadAttachments: props.loadAttachments,\n query: props.query,\n webUrl: props.webUrl\n }).then( // Success\n function (info) {\n // Clear the modal body\n el.innerHTML = \"\"; // Ensure the item exists, otherwise default to the new form\n\n var controlMode = props.item || props.itemId > 0 ? props.controlMode : gd_sprest_1.SPTypes.ControlMode.New; // Check the control mode\n\n switch (controlMode) {\n // Edit Form\n case gd_sprest_1.SPTypes.ControlMode.Edit:\n case gd_sprest_1.SPTypes.ControlMode.New:\n // Render the list form\n form = listForm_1.ListForm.renderEditForm({\n controlMode: props.controlMode,\n el: el,\n onControlRendered: props.onControlRendered,\n onControlRendering: props.onControlRendering,\n onSaving: props.onSaving,\n info: info,\n template: props.template\n });\n break;\n // Default - Display Form\n\n default:\n // Render the list form\n listForm_1.ListForm.renderDisplayForm({\n el: el,\n info: info,\n onControlRendered: props.onControlRendered,\n onControlRendering: props.onControlRendering,\n template: props.template\n });\n break;\n } // Display the actions\n\n\n elFooter.classList.remove(\"d-none\");\n }, // Error\n function () {\n // Log the error\n console.error(\"Error loading the list form information.\"); // Clear the modal\n\n el.innerHTML = \"\"; // Display an error message\n\n gd_bs_1.Components.Alert({\n el: el,\n content: \"Error loading the list form information.\",\n type: gd_bs_1.Components.AlertTypes.Danger\n });\n });\n }; // Set the render footer event\n\n\n modalProps.onRenderFooter = function (el) {\n // Parse the actions\n var actions = props.actions || null;\n\n if (actions == null) {\n // Default the actions based on the control mode\n switch (props.controlMode) {\n // Edit\n case gd_sprest_1.SPTypes.ControlMode.Edit:\n // Set the actions\n actions = {\n spacing: 3,\n items: [{\n buttons: [{\n text: \"Close\",\n onClick: function onClick() {\n dialog.hide();\n }\n }]\n }, {\n buttons: [{\n text: \"Update\",\n onClick: saveForm\n }]\n }]\n };\n break;\n // New\n\n case gd_sprest_1.SPTypes.ControlMode.New:\n // Set the actions\n actions = {\n spacing: 3,\n items: [{\n buttons: [{\n text: \"Close\",\n onClick: function onClick() {\n dialog.hide();\n }\n }]\n }, {\n buttons: [{\n text: \"Save\",\n onClick: saveForm\n }]\n }]\n };\n break;\n // Default - Display\n\n default:\n actions = {\n spacing: 3,\n items: [{\n buttons: [{\n text: \"Close\",\n onClick: function onClick() {\n dialog.hide();\n }\n }]\n }]\n };\n break;\n }\n } // Set the element\n\n\n actions.el = el; // Render the toolbar\n\n gd_bs_1.Components.Toolbar(actions);\n }; // Create the dialog\n\n\n var dialog = gd_bs_1.Components.Modal(modalProps); // Hide the actions\n\n var elFooter = dialog.el.querySelector(\".modal-footer\");\n elFooter.classList.add(\"d-none\"); // Add the class name\n\n dialog.el.classList.add(\"listformdialog\"); // Set the save method\n\n form == null ? null : dialog.saveForm = saveForm; // See if we are displaying it by default\n\n if (props.visible) {\n // Display the dialog\n dialog.show();\n } // Return the dialog\n\n\n return dialog;\n};\n\n//# sourceURL=webpack:///./build/components/listFormDialog.js?");
/***/ }),
/***/ "./build/components/peoplePicker.js":
/*!******************************************!*\
!*** ./build/components/peoplePicker.js ***!
\******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/index.js\");\n\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/index.js\");\n/**\r\n * People Picker\r\n */\n\n\nexports.PeoplePicker = function (props) {\n var _filterText = null;\n var _users = []; // Method to add a user\n\n var addUser = function addUser(userInfo) {\n var user = typeof userInfo === \"string\" ? JSON.parse(userInfo) : userInfo; // Adds the button\n\n var addButton = function addButton(userInfo) {\n // See if the picker is read only\n if (props.readOnly) {\n // Render a button\n gd_bs_1.Components.Button({\n el: elSelectedUsers,\n className: \"mr-1 mb-1\",\n isSmall: true,\n text: userInfo.Title\n });\n } else {\n // Render a popover button\n var btnUser_1 = gd_bs_1.Components.Popover({\n el: elSelectedUsers,\n isDismissible: true,\n type: gd_bs_1.Components.PopoverTypes.Bottom,\n btnProps: {\n className: \"mr-1\",\n isSmall: true,\n text: userInfo.Title\n },\n options: {\n html: true,\n content: gd_bs_1.Components.Button({\n data: userInfo,\n isSmall: true,\n text: \"Remove\",\n type: gd_bs_1.Components.ButtonTypes.Danger,\n onClick: function onClick(btn) {\n // Remove the button\n elSelectedUsers.removeChild(btnUser_1.el);\n }\n }).el\n }\n }); // Set the data attribute\n\n btnUser_1.el.setAttribute(\"data-user\", JSON.stringify(userInfo.stringify()));\n }\n }; // See if we are allowing multiple users\n\n\n var allowMultple = typeof props.multi == \"boolean\" ? props.multi : false;\n\n if (!allowMultple) {\n // Remove existing users\n while (elSelectedUsers.firstChild) {\n elSelectedUsers.removeChild(elSelectedUsers.firstChild);\n }\n } // Ensure this is a user object\n\n\n if (user.EntityData) {\n // Ensure the group or user id is set\n if (user.EntityData.SPGroupID) {\n // Find the user by id\n gd_sprest_1.Web().SiteGroups(parseInt(user.EntityData.SPGroupID)).execute(function (group) {\n // Add the button\n addButton(group);\n });\n } else if (user.EntityData.SPUserID) {\n // Find the user by id\n gd_sprest_1.Web().getUserById(parseInt(user.EntityData.SPUserID)).execute(function (userInfo) {\n // Add the button\n addButton(userInfo);\n });\n } else {\n // Find the user\n gd_sprest_1.Web().ensureUser(user.Key).execute(function (userInfo) {\n // Add the button\n addButton(userInfo);\n }, addButton);\n }\n } else {\n // Find the user by id\n gd_sprest_1.Web().getUserById(user).execute(function (userInfo) {\n // Add the button\n addButton(userInfo);\n });\n }\n }; // Method to search for the users\n\n\n var searchUsers = function searchUsers(el, searchText, searchAll) {\n if (searchAll === void 0) {\n searchAll = true;\n } // Ensure 3 characters exist\n\n\n if (_filterText.length > 2) {\n // Search for the user\n gd_sprest_1.PeoplePicker().clientPeoplePickerSearchUser({\n MaximumEntitySuggestions: 15,\n PrincipalSource: searchAll ? gd_sprest_1.SPTypes.PrincipalSources.All : gd_sprest_1.SPTypes.PrincipalSources.UserInfoList,\n PrincipalType: props.allowGroups ? gd_sprest_1.SPTypes.PrincipalTypes.All : gd_sprest_1.SPTypes.PrincipalTypes.User,\n QueryString: _filterText\n }).execute(function (search) {\n // Ensure the search text matches\n if (_filterText != searchText) {\n return;\n } // Clear the users results\n\n\n _users = []; // Set the menu header\n\n el.innerHTML = '
Search Results for \"' + searchText + '\"
';\n el.innerHTML += ''; // See if no users were found\n\n if (search.ClientPeoplePickerSearchUser.length == 0) {\n // Add a message\n el.innerHTML += '
No results were found...
';\n return;\n } // Parse the users\n\n\n for (var i = 0; i < search.ClientPeoplePickerSearchUser.length; i++) {\n var exists = false;\n var user = search.ClientPeoplePickerSearchUser[i]; // Save the user\n\n _users.push(user); // Parse the selected users\n\n\n for (var j = 0; j < elSelectedUsers.children.length; j++) {\n var userInfo = JSON.parse(elSelectedUsers.children[j].getAttribute(\"data-user\")); // See if this user is already selected\n\n if (exists = user.Key == userInfo.Key) {\n break;\n }\n } // Ensure the user isn't already selected\n\n\n if (exists) {\n continue;\n } // Create the item\n\n\n var elItem = document.createElement(\"a\");\n elItem.className = \"dropdown-item\";\n elItem.href = \"#\";\n elItem.innerHTML = user.DisplayText;\n elItem.setAttribute(\"data-user\", JSON.stringify(user));\n el.appendChild(elItem); // Set the click event\n\n elItem.addEventListener(\"click\", function (ev) {\n var userInfo = ev.currentTarget.getAttribute(\"data-user\"); // Add the user\n\n addUser(userInfo); // Hide the menu\n\n elMenu.classList.remove(\"show\"); // Clear the search text\n\n elTextbox.querySelector(\"input\").value = \"\";\n });\n }\n });\n }\n }; // Method to set the value\n\n\n var setValue = function setValue(selectedUsers) {\n if (selectedUsers === void 0) {\n selectedUsers = [];\n } // Clear the selected users\n\n\n elSelectedUsers.innerHTML = \"\"; // Parse the selected users\n\n for (var i = 0; i < selectedUsers.length; i++) {\n // Add the user\n addUser(selectedUsers[i]);\n }\n }; // Create the people picker\n\n\n var elPeoplePicker = document.createElement(\"div\");\n elPeoplePicker.className = \"people-picker\"; // Create the textbox\n\n var elTextbox = gd_bs_1.Components.InputGroup({\n onChange: function onChange(searchText) {\n // See if a value exists\n if (searchText) {\n // Set the filter text\n _filterText = searchText; // Set the header\n\n elMenu.innerHTML = ['
'].join('\\n'); // Show the dropdown\n\n if (!elMenu.classList.contains(\"show\")) {\n elMenu.classList.add(\"show\");\n } // Wait 500ms before searching\n\n\n setTimeout(function () {\n // Ensure the filters match\n if (searchText == _filterText) {\n // Search for the users\n searchUsers(elMenu, searchText, props.searchLocal ? false : true);\n }\n }, 500);\n } else {\n // Hide the dropdown\n if (elMenu.classList.contains(\"show\")) {\n elMenu.classList.remove(\"show\");\n }\n }\n }\n }).el;\n props.readOnly ? elTextbox.classList.add(\"d-none\") : null;\n elPeoplePicker.appendChild(elTextbox); // Add the dropdown menu\n\n var elMenu = document.createElement(\"div\");\n elMenu.className = \"dropdown-menu\";\n elMenu.style.position = \"relative\";\n elPeoplePicker.appendChild(elMenu); // Add the selected users\n\n var elSelectedUsers = document.createElement(\"div\");\n elSelectedUsers.style.position = \"relative\";\n elPeoplePicker.appendChild(elSelectedUsers); // Set the value and ensure it's a \n\n var value = props.value || [];\n\n if (_typeof(props.value) != \"object\") {\n // Set the default selected users\n setValue([value]);\n } else {\n // See if this is a user object\n var userValue = value;\n\n if (userValue.EntityData) {\n // Set the value\n value = userValue.EntityData.SPGroupID || userValue.EntityData.SPUserID; // Set the default selected users\n\n setValue([value]);\n } else {\n // Set the default selected users\n setValue(value);\n }\n } // Create the element\n\n\n var el = document.createElement(\"div\");\n el.appendChild(elPeoplePicker); // See if we are rendering it to an element\n\n if (props.el) {\n // Ensure the parent element exists\n if (props.el.parentElement && props.el.parentElement.classList) {\n // Set the bootstrap class\n props.el.parentElement.classList.contains(\"bs\") ? null : props.el.parentElement.classList.add(\"bs\");\n } // Append the elements\n\n\n while (el.children.length > 0) {\n props.el.appendChild(el.children[0]);\n } // Update the element\n\n\n el = props.el;\n } else {\n // Set the bootstrap class\n el.classList.add(\"bs\");\n } // Return the people picker\n\n\n return {\n el: elPeoplePicker,\n getValue: function getValue() {\n var selectedUsers = []; // Parse the selected users\n\n for (var i = 0; i < elSelectedUsers.children.length; i++) {\n var userInfo = JSON.parse(elSelectedUsers.children[i].getAttribute(\"data-user\"));\n var user = gd_sprest_1.Helper.parse(userInfo); // Add this user\n\n selectedUsers.push(user);\n } // Return the value\n\n\n return selectedUsers;\n },\n setValue: setValue\n };\n}; // Customize the form control\n\n\nexports.PeoplePickerControlType = 100;\ngd_bs_1.Components.FormControlTypes[\"PeoplePicker\"] = exports.PeoplePickerControlType;\ngd_bs_1.Components.CustomControls.registerType(exports.PeoplePickerControlType, function (props) {\n var picker = null; // Set the created method\n\n var onRendered = props.onControlRendered;\n\n props.onControlRendered = function (ctrl) {\n // Render a people picker\n picker = exports.PeoplePicker({\n allowGroups: props.allowGroups,\n className: props.className,\n el: ctrl.el,\n label: props.label,\n multi: props.multi,\n readOnly: props.isReadonly,\n searchLocal: props.searchLocal,\n value: props.value\n }); // Call the custom render event\n\n onRendered ? onRendered(ctrl) : null;\n }; // Register a people picker\n\n\n props.onGetValue = function () {\n // Return the value\n return picker.getValue();\n };\n});\n\n//# sourceURL=webpack:///./build/components/peoplePicker.js?");
/***/ }),
/***/ "./build/index.js":
/*!************************!*\
!*** ./build/index.js ***!
\************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nfunction __export(m) {\n for (var p in m) {\n if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n}\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n}); // The bootstrap library\n\n__export(__webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/index.js\")); // The SharePoint library\n\n\n__export(__webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/index.js\")); // SharePoint bootstrap components/webparts\n\n\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/index.js\");\n\nexports.Icons = gd_bs_1.Icons;\nexports.IconTypes = gd_bs_1.IconTypes;\n\nvar components_1 = __webpack_require__(/*! ./components */ \"./build/components/index.js\");\n\nexports.Components = components_1[\"default\"];\n\nvar WebParts = __webpack_require__(/*! ./webparts */ \"./build/webparts/index.js\");\n\nexports.WebParts = WebParts; // Styling\n\n__webpack_require__(/*! ./styles */ \"./build/styles.js\"); // Ensure the global variable exists\n\n\nvar $REST = window && window[\"$REST\"];\n\nif ($REST) {\n // Update the $REST global variable\n $REST.Components = components_1[\"default\"];\n $REST.jQuery = gd_bs_1.jQuery;\n $REST.IconTypes = gd_bs_1.IconTypes;\n $REST.Icons = gd_bs_1.Icons;\n $REST.WebParts = WebParts;\n} // Ensure the SP library exists\n\n\nif (window[\"SP\"] && window[\"SP\"].SOD) {\n // Notify waiting scripts\n window[\"SP\"] ? window[\"SP\"].SOD.notifyScriptLoadedAndExecuteWaitingJobs(\"gd-sprest-bs\") : null;\n window[\"SP\"] ? window[\"SP\"].SOD.notifyScriptLoadedAndExecuteWaitingJobs(\"gd-sprest-bs.js\") : null;\n}\n\n//# sourceURL=webpack:///./build/index.js?");
/***/ }),
/***/ "./build/styles.js":
/*!*************************!*\
!*** ./build/styles.js ***!
\*************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n!function (e) {\n var t = {};\n\n function i(r) {\n if (t[r]) return t[r].exports;\n var n = t[r] = {\n i: r,\n l: !1,\n exports: {}\n };\n return e[r].call(n.exports, n, n.exports, i), n.l = !0, n.exports;\n }\n\n i.m = e, i.c = t, i.d = function (e, t, r) {\n i.o(e, t) || Object.defineProperty(e, t, {\n enumerable: !0,\n get: r\n });\n }, i.r = function (e) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(e, \"__esModule\", {\n value: !0\n });\n }, i.t = function (e, t) {\n if (1 & t && (e = i(e)), 8 & t) return e;\n if (4 & t && \"object\" == _typeof(e) && e && e.__esModule) return e;\n var r = Object.create(null);\n if (i.r(r), Object.defineProperty(r, \"default\", {\n enumerable: !0,\n value: e\n }), 2 & t && \"string\" != typeof e) for (var n in e) {\n i.d(r, n, function (t) {\n return e[t];\n }.bind(null, n));\n }\n return r;\n }, i.n = function (e) {\n var t = e && e.__esModule ? function () {\n return e[\"default\"];\n } : function () {\n return e;\n };\n return i.d(t, \"a\", t), t;\n }, i.o = function (e, t) {\n return Object.prototype.hasOwnProperty.call(e, t);\n }, i.p = \"\", i(i.s = 1);\n}([function (e, t, i) {\n \"use strict\";\n\n e.exports = function (e) {\n var t = [];\n return t.toString = function () {\n return this.map(function (t) {\n var i = function (e, t) {\n var i = e[1] || \"\",\n r = e[3];\n if (!r) return i;\n\n if (t && \"function\" == typeof btoa) {\n var n = (o = r, d = btoa(unescape(encodeURIComponent(JSON.stringify(o)))), p = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(d), \"/*# \".concat(p, \" */\")),\n a = r.sources.map(function (e) {\n return \"/*# sourceURL=\".concat(r.sourceRoot || \"\").concat(e, \" */\");\n });\n return [i].concat(a).concat([n]).join(\"\\n\");\n }\n\n var o, d, p;\n return [i].join(\"\\n\");\n }(t, e);\n\n return t[2] ? \"@media \".concat(t[2], \" {\").concat(i, \"}\") : i;\n }).join(\"\");\n }, t.i = function (e, i, r) {\n \"string\" == typeof e && (e = [[null, e, \"\"]]);\n var n = {};\n if (r) for (var a = 0; a < this.length; a++) {\n var o = this[a][0];\n null != o && (n[o] = !0);\n }\n\n for (var d = 0; d < e.length; d++) {\n var p = [].concat(e[d]);\n r && n[p[0]] || (i && (p[2] ? p[2] = \"\".concat(i, \" and \").concat(p[2]) : p[2] = i), t.push(p));\n }\n }, t;\n };\n}, function (e, t, i) {\n var r = i(2),\n n = i(3);\n \"string\" == typeof (n = n.__esModule ? n[\"default\"] : n) && (n = [[e.i, n, \"\"]]);\n var a = {\n insert: \"head\",\n singleton: !1\n };\n r(n, a);\n e.exports = n.locals || {};\n}, function (e, t, i) {\n \"use strict\";\n\n var r,\n n = function n() {\n return void 0 === r && (r = Boolean(window && document && document.all && !window.atob)), r;\n },\n a = function () {\n var e = {};\n return function (t) {\n if (void 0 === e[t]) {\n var i = document.querySelector(t);\n if (window.HTMLIFrameElement && i instanceof window.HTMLIFrameElement) try {\n i = i.contentDocument.head;\n } catch (e) {\n i = null;\n }\n e[t] = i;\n }\n\n return e[t];\n };\n }(),\n o = [];\n\n function d(e) {\n for (var t = -1, i = 0; i < o.length; i++) {\n if (o[i].identifier === e) {\n t = i;\n break;\n }\n }\n\n return t;\n }\n\n function p(e, t) {\n for (var i = {}, r = [], n = 0; n < e.length; n++) {\n var a = e[n],\n p = t.base ? a[0] + t.base : a[0],\n u = i[p] || 0,\n c = \"\".concat(p, \" \").concat(u);\n i[p] = u + 1;\n var l = d(c),\n s = {\n css: a[1],\n media: a[2],\n sourceMap: a[3]\n };\n -1 !== l ? (o[l].references++, o[l].updater(s)) : o.push({\n identifier: c,\n updater: k(s, t),\n references: 1\n }), r.push(c);\n }\n\n return r;\n }\n\n function u(e) {\n var t = document.createElement(\"style\"),\n r = e.attributes || {};\n\n if (void 0 === r.nonce) {\n var n = i.nc;\n n && (r.nonce = n);\n }\n\n if (Object.keys(r).forEach(function (e) {\n t.setAttribute(e, r[e]);\n }), \"function\" == typeof e.insert) e.insert(t);else {\n var o = a(e.insert || \"head\");\n if (!o) throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n o.appendChild(t);\n }\n return t;\n }\n\n var c,\n l = (c = [], function (e, t) {\n return c[e] = t, c.filter(Boolean).join(\"\\n\");\n });\n\n function s(e, t, i, r) {\n var n = i ? \"\" : r.media ? \"@media \".concat(r.media, \" {\").concat(r.css, \"}\") : r.css;\n if (e.styleSheet) e.styleSheet.cssText = l(t, n);else {\n var a = document.createTextNode(n),\n o = e.childNodes;\n o[t] && e.removeChild(o[t]), o.length ? e.insertBefore(a, o[t]) : e.appendChild(a);\n }\n }\n\n function f(e, t, i) {\n var r = i.css,\n n = i.media,\n a = i.sourceMap;\n if (n ? e.setAttribute(\"media\", n) : e.removeAttribute(\"media\"), a && btoa && (r += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a)))), \" */\")), e.styleSheet) e.styleSheet.cssText = r;else {\n for (; e.firstChild;) {\n e.removeChild(e.firstChild);\n }\n\n e.appendChild(document.createTextNode(r));\n }\n }\n\n var h = null,\n m = 0;\n\n function k(e, t) {\n var i, r, n;\n\n if (t.singleton) {\n var a = m++;\n i = h || (h = u(t)), r = s.bind(null, i, a, !1), n = s.bind(null, i, a, !0);\n } else i = u(t), r = f.bind(null, i, t), n = function n() {\n !function (e) {\n if (null === e.parentNode) return !1;\n e.parentNode.removeChild(e);\n }(i);\n };\n\n return r(e), function (t) {\n if (t) {\n if (t.css === e.css && t.media === e.media && t.sourceMap === e.sourceMap) return;\n r(e = t);\n } else n();\n };\n }\n\n e.exports = function (e, t) {\n (t = t || {}).singleton || \"boolean\" == typeof t.singleton || (t.singleton = n());\n var i = p(e = e || [], t);\n return function (e) {\n if (e = e || [], \"[object Array]\" === Object.prototype.toString.call(e)) {\n for (var r = 0; r < i.length; r++) {\n var n = d(i[r]);\n o[n].references--;\n }\n\n for (var a = p(e, t), u = 0; u < i.length; u++) {\n var c = d(i[u]);\n 0 === o[c].references && (o[c].updater(), o.splice(c, 1));\n }\n\n i = a;\n }\n };\n };\n}, function (e, t, i) {\n var r = i(0),\n n = i(4);\n (t = r(!1)).i(n), t.push([e.i, \".wp-tabs .nav>.nav-item{cursor:pointer}.wp-tabs>.is-hidden,.wp-tabs .ms-rte-wpbox.is-hidden{left:-1000vw;position:absolute;overflow:hidden}.wp-tabs{border-spacing:0px}.wp-tabs .ms-webpart-chrome-title{display:none}.wp-tabs .wp-tab{margin-bottom:0px;margin-top:0px;padding-bottom:0px;padding-top:0px}.wp-tabs .wp-tab .ms-PartSpacingVertical{display:none}.bs .date-time{width:100%}.ui-datepicker{background-color:white;z-index:2000 !important}.ui-datepicker .ui-icon{cursor:pointer;text-indent:0px}.listformdialog .modal-dialog{max-width:60vw}.listformdialog .modal-dialog .modal-body{max-height:75vh;overflow-y:auto}#calendarFields.dropdown-menu{display:block;max-height:250px;position:relative;overflow-y:auto}#selectedFields.dropdown-menu{border:none;display:block;position:relative}\\n\", \"\"]), e.exports = t;\n}, function (e, t, i) {\n (t = i(0)(!1)).push([e.i, '/*! jQuery UI - v1.12.1 - 2018-09-12\\r\\n* http://jqueryui.com\\r\\n* Includes: core.css, datepicker.css\\r\\n* Copyright jQuery Foundation and other contributors; Licensed MIT */\\r\\n\\r\\n.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:\"\";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-prev,.ui-datepicker .ui-datepicker-next{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-prev-hover,.ui-datepicker .ui-datepicker-next-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepicker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-prev span,.ui-datepicker .ui-datepicker-next span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:45%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:bold;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td span,.ui-datepicker td a{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em .6em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%;font-size:0}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepicker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker .ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat;left:.5em;top:.3em}', \"\"]), e.exports = t;\n}]);\n\n//# sourceURL=webpack:///./build/styles.js?");
/***/ }),
/***/ "./build/webparts/base/helper.js":
/*!***************************************!*\
!*** ./build/webparts/base/helper.js ***!
\***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/index.js\");\n\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/index.js\");\n/**\r\n * Helper Methods\r\n */\n\n\nexports.Helper = {\n // Method to get the webpart\n getWebPart: function getWebPart(wpId) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Get the current context\n var context = SP.ClientContext.get_current(); // Get the webpart from the current page\n\n var page = context.get_web().getFileByServerRelativeUrl(gd_sprest_1.ContextInfo.serverRequestPath);\n var wpMgr = page.getLimitedWebPartManager(SP.WebParts.PersonalizationScope.shared);\n var wpDef = wpMgr.get_webParts().getById(wpId);\n var wp = wpDef.get_webPart();\n context.load(wp, \"Properties\"); // Execute the request\n\n context.executeQueryAsync( // Success\n function () {\n // Resolve the promise\n resolve({\n Context: context,\n Properties: wp.get_properties(),\n WebPart: wp,\n WebPartDefinition: wpDef\n });\n }, // Error\n function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n } // Reject the promise\n\n\n reject(args[1] ? args[1].get_message() : \"\");\n });\n });\n },\n // Method to get the webpart id for a specified element\n getWebPartId: function getWebPartId(el) {\n // Loop until we find the webpart id\n while (el) {\n // See if this element contains the webpart id\n var wpId = el.getAttribute(\"webpartid\");\n\n if (wpId) {\n // Return the webpart id\n return wpId;\n } // Check the parent\n\n\n el = el.parentElement;\n } // Unable to detect\n\n\n return \"\";\n },\n // Method to render the edit form\n renderEditForm: function renderEditForm(wpInfo, formControls) {\n if (formControls === void 0) {\n formControls = [];\n }\n\n var rows = []; // Parse the controls\n\n for (var i = 0; i < formControls.length; i++) {\n // Add the control\n rows.push({\n columns: [{\n control: formControls[i]\n }]\n });\n } // Render the form\n\n\n return gd_bs_1.Components.Form({\n el: wpInfo.el.querySelector(\".wp-cfg-form\"),\n rows: rows,\n value: wpInfo.cfg\n });\n },\n // Method to save the webpart configuration\n saveConfiguration: function saveConfiguration(wpId, cfgId, wpCfg) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Update the webpart content elements\n if (exports.Helper.updateWebPartContentElements(wpId, cfgId, wpCfg)) {\n // Wiki page detected, resolve the promise and do nothing\n resolve();\n return;\n } // Get the target webpart\n\n\n exports.Helper.getWebPart(wpId).then(function (wpInfo) {\n // Get the content\n var content = wpInfo && wpInfo.Properties.get_fieldValues()[\"Content\"];\n\n if (content) {\n // Create an element so we can update the configuration\n var el = document.createElement(\"div\");\n el.innerHTML = content; // Get the configuration element and update it\n\n var elCfg = el.querySelector(\"#\" + cfgId);\n elCfg ? elCfg.innerText = JSON.stringify(wpCfg) : null; // Update the webpart\n\n wpInfo.Properties.set_item(\"Content\", el.innerHTML);\n wpInfo.WebPartDefinition.saveWebPartChanges();\n wpInfo.Context.load(wpInfo.WebPartDefinition); // Execute the request\n\n wpInfo.Context.executeQueryAsync( // Success\n function () {\n // Disable the edit page warning\n if (SP && SP.Ribbon && SP.Ribbon.PageState && SP.Ribbon.PageState.PageStateHandler) {\n SP.Ribbon.PageState.PageStateHandler.ignoreNextUnload = true;\n } // Refresh the page\n\n\n window.location.href = window.location.pathname + \"?DisplayMode=Design\"; // Resolve the promise\n\n resolve();\n }, // Error\n function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n\n var message = args[1].get_message(); // Log\n\n console.error(\"[gd-sprest] Error saving the configuration. \" + message); // Reject the promise\n\n reject(message);\n });\n }\n });\n });\n },\n // Method to update the configuration element\n updateConfigurationInElement: function updateConfigurationInElement(cfgId, elTarget, wpCfg) {\n // Create an element so we can update the configuration\n var el = document.createElement(\"div\");\n el.innerHTML = elTarget.value; // Get the configuration element and update it\n\n var cfg = el.querySelector(\"#\" + cfgId);\n cfg ? cfg.innerText = JSON.stringify(wpCfg) : null; // Update the value\n\n elTarget.value = el.innerHTML;\n },\n // Method to update the webpart content elements\n updateWebPartContentElements: function updateWebPartContentElements(wpId, cfgId, wpCfg) {\n // Get the webpart element\n var elWebPart = document.querySelector(\"div[webpartid='\" + wpId + \"']\");\n\n if (elWebPart) {\n var wpContent = null;\n var wpPageContent = null; // Get the associated webpart id\n\n var wpId2 = elWebPart.getAttribute(\"webpartid2\"); // Update the configuration\n\n var elCfg = elWebPart.querySelector(\"#\" + cfgId);\n elCfg ? elCfg.innerText = JSON.stringify(wpCfg) : null; // Parse the hidden elements on the page\n\n var hiddenElements = document.querySelectorAll(\"input[type='hidden']\");\n\n for (var i = 0; i < hiddenElements.length; i++) {\n var elHidden = hiddenElements[i]; // See if we have found the webpart content and page content hidden elements\n\n if (wpContent && wpPageContent) {\n continue;\n } // See if this is a hidden webpart content element\n\n\n if (elHidden.name && elHidden.name.indexOf(\"scriptcontent\") == elHidden.name.length - 13) {\n // See if it's for this webpart\n if (elHidden.name.indexOf(wpId2) == 0) {\n // Set the webpart content element\n wpContent = elHidden; // Update the configuration in the webpart content element\n\n exports.Helper.updateConfigurationInElement(cfgId, wpContent, wpCfg);\n } // Continue the loop\n\n\n continue;\n } // Create an element and set the inner html to the value\n\n\n var el = document.createElement(\"div\");\n el.innerHTML = elHidden.value; // See if this is a hidden field element\n\n if (el.querySelector(\"#\" + cfgId)) {\n // Set the webpart page content\n wpPageContent = elHidden; // Update the configuration in the webpart content element\n\n exports.Helper.updateConfigurationInElement(cfgId, wpPageContent, wpCfg); // Continue the loop\n\n continue;\n }\n } // Return true, if the page content exists\n\n\n return wpPageContent != null;\n } // Webpart is not in a content field\n\n\n return false;\n }\n};\n\n//# sourceURL=webpack:///./build/webparts/base/helper.js?");
/***/ }),
/***/ "./build/webparts/base/index.js":
/*!**************************************!*\
!*** ./build/webparts/base/index.js ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nfunction __export(m) {\n for (var p in m) {\n if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n}\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n__export(__webpack_require__(/*! ./helper */ \"./build/webparts/base/helper.js\"));\n\n__export(__webpack_require__(/*! ./wp */ \"./build/webparts/base/wp.js\"));\n\n__export(__webpack_require__(/*! ./wpCfg */ \"./build/webparts/base/wpCfg.js\"));\n\n//# sourceURL=webpack:///./build/webparts/base/index.js?");
/***/ }),
/***/ "./build/webparts/base/wp.js":
/*!***********************************!*\
!*** ./build/webparts/base/wp.js ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/index.js\");\n\nvar wpCfg_1 = __webpack_require__(/*! ./wpCfg */ \"./build/webparts/base/wpCfg.js\");\n/**\r\n * Web Part\r\n */\n\n\nexports.WebPart = function (props) {\n var _cfg = {};\n var _wp = null;\n /**\r\n * Method to add the help link to a script part editor.\r\n * @wpId - The webpart id.\r\n */\n\n var addHelpLink = function addHelpLink() {\n // Ensure the help properties exist\n if (props.helpProps) {\n // Get the webpart's \"Snippet\"\n var link = document.querySelector(\"div[webpartid='\" + _wp.wpId + \"'] a[title='Edit Snippet']\");\n\n if (link) {\n // Create the help link\n var helpLink = document.createElement(\"a\");\n helpLink.href = props.helpProps.url || \"#\";\n helpLink.style.paddingLeft = \"10px\";\n helpLink.setAttribute(\"role\", \"button\");\n helpLink.title = props.helpProps.title || \"Help\";\n helpLink.innerHTML = \"\" + helpLink.title + \"\";\n helpLink.target = \"_blank\"; // Append the link\n\n link.parentElement.appendChild(helpLink);\n }\n }\n };\n /**\r\n * Method to get the webpart id for a specified element\r\n * @param el - The target element.\r\n */\n\n\n var getWebPartId = function getWebPartId(el) {\n // Loop until we find the webpart id\n while (el) {\n // See if this element contains the webpart id\n var wpId = el.getAttribute(\"webpartid\");\n\n if (wpId) {\n // Return the webpart id\n return wpId;\n } // Check the parent\n\n\n el = el.parentElement;\n } // Unable to detect\n\n\n return \"\";\n };\n /**\r\n * Method to get the webpart information\r\n */\n\n\n var getWebPartInfo = function getWebPartInfo() {\n var targetInfo = {\n cfg: null,\n el: null,\n wpId: null\n }; // Ensure the element id exists\n\n if (props.elementId) {\n // Get the webpart elements\n var elements = document.querySelectorAll(\"#\" + props.elementId);\n\n for (var i = 0; i < elements.length; i++) {\n var elWebPart = elements[i]; // See if we have already configured this element\n\n if (elWebPart.getAttribute(\"data-isConfigured\")) {\n continue;\n } // Get the webpart id\n\n\n var wpId = getWebPartId(elWebPart);\n\n if (wpId) {\n // See if the configuration element exists\n var elCfg = elWebPart.parentElement.querySelector(\"#\" + props.cfgElementId);\n\n if (elCfg) {\n try {\n // Parse the configuration\n var data = elCfg.innerText.trim();\n var cfg = data.length > 0 ? JSON.parse(data) : null; // See if the webaprt id exists\n\n if (cfg && cfg.WebPartId) {\n // See if it's for this webpart\n if (cfg.WebPartId == wpId) {\n // Set the target information\n targetInfo = {\n cfg: cfg,\n el: elWebPart,\n wpId: wpId\n };\n break;\n }\n } else {\n // Set the target information\n targetInfo = {\n cfg: {\n WebPartId: wpId\n },\n el: elWebPart,\n wpId: wpId\n };\n break;\n }\n } catch (ex) {\n // Set the target information\n targetInfo = {\n cfg: {\n WebPartId: wpId\n },\n el: elWebPart,\n wpId: wpId\n }; // Log\n\n console.log(\"[bs-webpart] Error parsing the configuration for the webpart element '\" + props.cfgElementId + \"'.\");\n } // Break from the loop\n\n\n break;\n } else {\n // Set the target information\n targetInfo = {\n cfg: {\n WebPartId: wpId\n },\n el: elWebPart,\n wpId: wpId\n };\n break;\n }\n }\n } // Ensure elements were found\n\n\n if (elements.length == 0) {\n // Log\n console.log(\"[bs-webpart] Error - Unable to find the webpart element with id '\" + props.elementId + \"'.\");\n }\n } else {\n // Log\n console.log(\"[bs-webpart] The target element id is not defined.\");\n } // Ensure the target element exists\n\n\n if (targetInfo.el) {\n // Set the configuration flag\n targetInfo.el.setAttribute(\"data-isConfigured\", \"true\");\n } // Return the target information\n\n\n return targetInfo;\n };\n /**\r\n * Method to render the webpart\r\n */\n\n\n var render = function render() {\n // Get the webpart information\n _wp = getWebPartInfo();\n\n if (_wp == null || _wp.el == null) {\n // Log\n console.log(\"[bs-webpart] The target webpart element '\" + props.elementId + \"' was not found.\");\n return;\n } // Set the configuration\n\n\n _cfg = _wp.cfg; // Get the webpart element\n\n var elWebPart = _wp.wpId ? document.querySelector(\"div[webpartid='\" + _wp.wpId + \"']\") : null;\n\n if (elWebPart) {\n // Add the default bootstrap class name\n elWebPart.className += \" bs \" + (props.wpClassName || \"\");\n } // See if a class name exists\n\n\n if (props.className && _wp.el.className.indexOf(props.className) < 0) {\n // Set the class name\n _wp.el.className += \" \" + props.className;\n } // See if the page is being edited\n\n\n var returnVal = null;\n\n if (gd_sprest_1.Helper.WebPart.isEditMode()) {\n // Add the help link\n addHelpLink(); // Add the edit class name\n\n _wp.el.classList.add(\"is-edit\"); // Call the render event\n\n\n if (props.onRenderEdit) {\n // Execute the render edit event\n returnVal = props.onRenderEdit(_wp);\n } // See if we are displaying the default edit form\n else if (props.editForm) {\n // Display the edit form\n wpCfg_1.WPCfg(_cfg, _wp, props);\n }\n } else {\n // See if the configuration is defined, but has no value\n if (_wp.cfg || (props.cfgElementId || \"\").length == 0) {\n // Execute the render edit event\n returnVal = props.onRenderDisplay(_wp);\n } else {\n // Render a message\n _wp.el.innerHTML = '
Please edit the page and configure the webpart.
';\n }\n } // See if a promise was returned\n\n\n if (returnVal && returnVal.then) {\n // Wait for the request to complete\n returnVal.then(function () {\n var args = [];\n\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n } // Execute the post render event\n\n\n props.onPostRender ? props.onPostRender(_wp) : null;\n });\n } else {\n // Execute the post render event\n props.onPostRender ? props.onPostRender(_wp) : null;\n }\n }; // Add a load event\n\n\n window.addEventListener(\"load\", function () {\n // Render the component\n render();\n }); // Return the webpart\n\n return {\n cfg: _cfg,\n info: _wp\n };\n};\n\n//# sourceURL=webpack:///./build/webparts/base/wp.js?");
/***/ }),
/***/ "./build/webparts/base/wpCfg.js":
/*!**************************************!*\
!*** ./build/webparts/base/wpCfg.js ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/index.js\");\n\nvar helper_1 = __webpack_require__(/*! ./helper */ \"./build/webparts/base/helper.js\");\n/**\r\n * WebPart Configuration\r\n */\n\n\nexports.WPCfg = function (cfg, wp, props) {\n var _editForm = props.editForm || {}; // Method to detect if the wiki page is being edited\n\n\n var isWikiPageInEdit = function isWikiPageInEdit() {\n var wikiPageMode = null; // Get the form\n\n var form = document.forms[MSOWebPartPageFormName];\n\n if (form) {\n // Get the wiki page mode\n wikiPageMode = form._wikiPageMode ? form._wikiPageMode.value : null;\n } // Determine if this wiki page is being edited\n\n\n return wikiPageMode == \"Edit\";\n }; // The default render method when the page is edited\n\n\n var render = function render() {\n var form = null; // Ensure we need to render this\n\n if (_editForm == null) {\n return;\n } // Render the template\n\n\n wp.el.innerHTML = ['', ''].join('\\n'); // Render the button to toggle the modal\n\n gd_bs_1.Components.Button({\n el: wp.el.children[0],\n text: \"Configure WebPart\",\n type: gd_bs_1.Components.ButtonTypes.Secondary,\n onClick: function onClick() {\n modal.show();\n }\n }); // Render the modal\n\n var modal = gd_bs_1.Components.Modal({\n el: wp.el.children[1],\n id: (wp.cfg.WebPartId || \"\") + \"_modal\",\n isCentered: true,\n isLarge: true,\n title: \"Configuration Panel\",\n onRenderBody: function onRenderBody(el) {\n var formControls = null; // Set the class name\n\n el.classList.add(\"wp-cfg-form\"); // See if the render form event exists\n\n if (_editForm.onRenderForm) {\n // Call the event\n formControls = _editForm.onRenderForm(wp) || [];\n } // See if there is a promise\n\n\n if (formControls.then) {\n // Wait for the promise to be resolved\n formControls.then(function (formControls) {\n // Render the edit form\n form = helper_1.Helper.renderEditForm(wp, formControls);\n });\n } // Else, render the edit form\n else {\n form = helper_1.Helper.renderEditForm(wp, formControls);\n }\n },\n onRenderFooter: function onRenderFooter(el) {\n var actionButtons = []; // See if this is a wiki page\n\n var disableSaveButton = isWikiPageInEdit();\n\n if (disableSaveButton) {\n // Get the webpart manager key name\n var elWPMgrKeyName = document.getElementById(\"MSOSPWebPartManager_OldSelectedStorageKeyName\"); // Set the flag\n\n disableSaveButton = elWPMgrKeyName == null || elWPMgrKeyName.value.indexOf(cfg.WebPartId) < 0;\n\n if (disableSaveButton) {\n // Show a message\n el.innerHTML = \"\";\n return;\n }\n } // See if we are adding the save button\n\n\n if (_editForm.showSaveButton != false) {\n // Add the save button\n actionButtons.push({\n isDisabled: disableSaveButton,\n text: \"Save\",\n onClick: function onClick(ev) {\n // Call the save event and set the configuration\n var cfg = _editForm.onSave ? _editForm.onSave(wp.cfg, form) : null;\n cfg = cfg ? cfg : wp.cfg; // Save the configuration\n\n helper_1.Helper.saveConfiguration(wp.wpId, props.cfgElementId, cfg).then(function () {\n // Close the modal\n modal.toggle();\n });\n }\n });\n } // See if custom actions exist\n\n\n if (_editForm.actions) {\n // Add the buttons\n actionButtons = actionButtons.concat(_editForm.actions);\n } // Render the menu buttons\n\n\n gd_bs_1.Components.ButtonGroup({\n buttons: actionButtons,\n buttonType: gd_bs_1.Components.ButtonTypes.Secondary,\n el: el,\n isSmall: true\n });\n }\n });\n }; // Render the webpart configuration\n\n\n render();\n};\n\n//# sourceURL=webpack:///./build/webparts/base/wpCfg.js?");
/***/ }),
/***/ "./build/webparts/index.js":
/*!*********************************!*\
!*** ./build/webparts/index.js ***!
\*********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nfunction __export(m) {\n for (var p in m) {\n if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n}\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n__export(__webpack_require__(/*! ./base */ \"./build/webparts/base/index.js\"));\n\n__export(__webpack_require__(/*! ./list */ \"./build/webparts/list/index.js\"));\n\n__export(__webpack_require__(/*! ./listFields */ \"./build/webparts/listFields/index.js\"));\n\n__export(__webpack_require__(/*! ./search */ \"./build/webparts/search/index.js\"));\n\n__export(__webpack_require__(/*! ./tabs */ \"./build/webparts/tabs/index.js\"));\n\n__export(__webpack_require__(/*! ./taxonomy */ \"./build/webparts/taxonomy/index.js\"));\n\n//# sourceURL=webpack:///./build/webparts/index.js?");
/***/ }),
/***/ "./build/webparts/list/index.js":
/*!**************************************!*\
!*** ./build/webparts/list/index.js ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nfunction __export(m) {\n for (var p in m) {\n if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n}\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n__export(__webpack_require__(/*! ./wp */ \"./build/webparts/list/wp.js\"));\n\n__export(__webpack_require__(/*! ./wpCfg */ \"./build/webparts/list/wpCfg.js\"));\n\n//# sourceURL=webpack:///./build/webparts/list/index.js?");
/***/ }),
/***/ "./build/webparts/list/wp.js":
/*!***********************************!*\
!*** ./build/webparts/list/wp.js ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/index.js\");\n\nvar wp_1 = __webpack_require__(/*! ../base/wp */ \"./build/webparts/base/wp.js\");\n\nvar wpCfg_1 = __webpack_require__(/*! ./wpCfg */ \"./build/webparts/list/wpCfg.js\");\n/**\r\n * List WebPart\r\n */\n\n\nexports.WPList = function (props) {\n var _wpInfo = null; // Method to load the items using a CAML query\n\n var loadCAML = function loadCAML(caml) {\n if (caml === void 0) {\n caml = \"\";\n } // Call the load caml query event\n\n\n caml = (props.onExecutingCAMLQuery ? props.onExecutingCAMLQuery(_wpInfo, caml) : null) || caml; // See if we are targeting a different web\n\n var webUrl = _wpInfo.cfg.WebUrl;\n\n if (webUrl) {\n // Get the context information for the destination web\n // Note - Since we are using a POST request, this would be required for cross-site collection requests\n gd_sprest_1.ContextInfo.getWeb(webUrl).execute(function (contextInfo) {\n // Get the web\n gd_sprest_1.Web(webUrl, {\n requestDigest: contextInfo.GetContextWebInformation.FormDigestValue\n }) // Get the list\n .Lists(_wpInfo.cfg.ListName) // Query the items\n .getItemsByQuery(caml) // Execute the request\n .execute(function (items) {\n // Render the items\n props.onRenderItems ? props.onRenderItems(_wpInfo, items.results) : null;\n });\n });\n } else {\n // Get the web\n gd_sprest_1.Web(webUrl) // Get the list\n .Lists(_wpInfo.cfg.ListName) // Query the items\n .getItemsByQuery(caml) // Execute the request\n .execute(function (items) {\n // Render the items\n props.onRenderItems ? props.onRenderItems(_wpInfo, items.results) : null;\n });\n }\n }; // Method to load the items using an ODATA query\n\n\n var loadODATA = function loadODATA(query) {\n if (query === void 0) {\n query = {};\n } // Call the load caml query event\n\n\n query = (props.onExecutingODATAQuery ? props.onExecutingODATAQuery(_wpInfo, query) : null) || query; // Get the web\n\n gd_sprest_1.Web(_wpInfo.cfg.WebUrl) // Get the list\n .Lists(_wpInfo.cfg.ListName) // Get the items\n .Items() // Query the list\n .query(query) // Execute the request\n .execute(function (items) {\n // Render the items\n props.onRenderItems ? props.onRenderItems(_wpInfo, items.results) : null;\n });\n }; // Create the webpart and return it\n\n\n return wp_1.WebPart({\n cfgElementId: props.cfgElementId,\n className: props.className,\n editForm: wpCfg_1.WPListEditForm(props.editForm),\n elementId: props.elementId,\n wpClassName: props.wpClassName,\n onRenderDisplay: function onRenderDisplay(wpInfo) {\n // Save the information\n _wpInfo = wpInfo; // Call the render event\n\n props.onRenderDisplay ? props.onRenderDisplay(_wpInfo) : null; // See if there is a render items event and a list is defined\n\n if (props.onRenderItems && _wpInfo.cfg.ListName) {\n // See if we are using the CAML query\n if (props.camlQuery || props.onExecutingCAMLQuery) {\n loadCAML(props.camlQuery);\n } // Else, load using the ODATA query\n else {\n loadODATA(props.odataQuery);\n }\n }\n }\n });\n};\n\n//# sourceURL=webpack:///./build/webparts/list/wp.js?");
/***/ }),
/***/ "./build/webparts/list/wpCfg.js":
/*!**************************************!*\
!*** ./build/webparts/list/wpCfg.js ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/index.js\");\n\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/index.js\");\n/**\r\n * List WebPart Edit Form\r\n */\n\n\nexports.WPListEditForm = function (props) {\n if (props === void 0) {\n props = {};\n }\n\n var _ddlList = null;\n var _lists = null;\n var _loadingMessage = null;\n var _wpInfo = null; // Method to load the lists\n\n var loadLists = function loadLists(webUrl) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Set the query\n var query = props.listQuery || {}; // Get the web\n\n gd_sprest_1.Web(webUrl) // Get the lists\n .Lists() // Include the fields\n .query(query) // Execute the request\n .execute(function (lists) {\n var items = [{\n text: \"\",\n value: \"\"\n }]; // Call the list loaded event\n\n _lists = (props.onListsLoaded ? props.onListsLoaded(_wpInfo, lists.results) : null) || lists.results; // Parse the lists\n\n for (var i = 0; i < _lists.length; i++) {\n var list = _lists[i]; // Add the item\n\n items.push({\n text: list.Title,\n value: list.Title\n });\n } // Resolve the promise\n\n\n resolve(items);\n }, reject);\n });\n }; // Method to render the form controls\n\n\n var renderFormControls = function renderFormControls(items, webUrl) {\n var controls = []; // Add the web url\n\n controls.push({\n label: \"Relative Web Url:\",\n description: \"The web containing the list. If blank, the current web is used.\",\n name: \"WebUrl\",\n type: gd_bs_1.Components.FormControlTypes.TextField,\n value: webUrl,\n onChange: function onChange(value) {\n // Update the configuration\n _wpInfo.cfg.WebUrl = value;\n }\n }); // Add the dropdown\n\n controls.push({\n label: \"List:\",\n name: \"ListName\",\n items: items,\n type: gd_bs_1.Components.FormControlTypes.Dropdown,\n value: _wpInfo && _wpInfo.cfg ? _wpInfo.cfg.ListName : null,\n onControlRendered: function onControlRendered(control) {\n // Save a reference to the dropdown list\n _ddlList = control.dropdown;\n },\n onChange: function onChange(item) {\n if (item) {\n // See if this is a blank item\n if (item.text == \"\") {\n // Call the change event\n props.onListChanged ? props.onListChanged(_wpInfo) : null;\n return;\n } // Parse the list\n\n\n for (var i = 0; i < _lists.length; i++) {\n var list = _lists[i]; // See if this is the target list\n\n if (list.Title == item.text) {\n // Update the configuration\n _wpInfo.cfg.ListName = item.value; // Call the change event\n\n props.onListChanged ? props.onListChanged(_wpInfo, list) : null;\n break;\n }\n }\n }\n }\n }); // Return the controls\n\n return controls;\n }; // Create the form action buttons\n\n\n var actionButtons = [{\n text: \"Refresh\",\n onClick: function onClick() {\n // Clear the dropdown\n _ddlList.setItems([{\n isHeader: true,\n text: \"Loading the Lists\",\n isSelected: true\n }]); // Load the lists\n\n\n loadLists(_wpInfo.cfg.WebUrl).then(function (items) {\n // Set the dropdown items\n _ddlList.setItems(items);\n });\n }\n }]; // See if custom actions exist\n\n if (props.actions) {\n // Add the custom commands\n actionButtons = actionButtons.concat(props.actions);\n } // Return the edit panel\n\n\n return {\n actions: actionButtons,\n showSaveButton: props.showSaveButton,\n onRenderForm: function onRenderForm(wpInfo) {\n // Save the webpart information\n _wpInfo = wpInfo; // Render a loading message\n\n _loadingMessage = gd_bs_1.Components.Progress({\n el: _wpInfo.el,\n isAnimated: true,\n isStriped: true,\n label: \"Loading the List Information\",\n size: 100\n }).el; // Return a promise\n\n return new Promise(function (resolve, reject) {\n // Load the lists\n loadLists(_wpInfo && _wpInfo.cfg ? _wpInfo.cfg.WebUrl : \"\").then(function (items) {\n // Render the form controls\n var controls = renderFormControls(items); // Parse the lists\n\n var selectedList = null;\n\n for (var i = 0; i < _lists.length; i++) {\n var list = _lists[i]; // See if this is the selected list\n\n if (list.Title == _wpInfo.cfg.ListName) {\n // Select this list\n selectedList = list;\n }\n } // Call the render form event\n\n\n var returnVal = props.onRenderForm ? props.onRenderForm(_wpInfo, selectedList) : null;\n\n if (returnVal) {\n // See if this is a promise\n if (returnVal.then) {\n // Wait for the promise to complete\n returnVal.then(function (formControls) {\n if (formControls === void 0) {\n formControls = [];\n } // Add the form controls\n\n\n controls = controls.concat(formControls); // Resolve the promise\n\n resolve(controls);\n });\n } // Else, see if the form controls exist\n else if (returnVal.length > 0) {\n // Add the form controls\n controls = controls.concat(returnVal); // Resolve the promise\n\n resolve(controls);\n } // Else, resolve the promise\n else {\n resolve(controls);\n }\n } // Else, resolve the promise\n else {\n resolve(controls);\n } // Remove the loading message\n\n\n _wpInfo.el.removeChild(_loadingMessage);\n });\n });\n },\n onSave: function onSave(cfg, form) {\n // Update the configuration\n cfg.ListName = _wpInfo.cfg.ListName;\n cfg.WebUrl = _wpInfo.cfg.WebUrl; // Return the configuration\n\n return props.onSave ? props.onSave(_wpInfo.cfg, form) : _wpInfo.cfg;\n }\n };\n};\n\n//# sourceURL=webpack:///./build/webparts/list/wpCfg.js?");
/***/ }),
/***/ "./build/webparts/listFields/index.js":
/*!********************************************!*\
!*** ./build/webparts/listFields/index.js ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nfunction __export(m) {\n for (var p in m) {\n if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n}\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n__export(__webpack_require__(/*! ./wp */ \"./build/webparts/listFields/wp.js\"));\n\n__export(__webpack_require__(/*! ./wpCfg */ \"./build/webparts/listFields/wpCfg.js\"));\n\n//# sourceURL=webpack:///./build/webparts/listFields/index.js?");
/***/ }),
/***/ "./build/webparts/listFields/wp.js":
/*!*****************************************!*\
!*** ./build/webparts/listFields/wp.js ***!
\*****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar list_1 = __webpack_require__(/*! ../list */ \"./build/webparts/list/index.js\");\n\nvar wpCfg_1 = __webpack_require__(/*! ./wpCfg */ \"./build/webparts/listFields/wpCfg.js\");\n/**\r\n * List Fields WebPart\r\n */\n\n\nexports.WPListFields = function (props) {\n // Set the edit form\n props ? props.editForm = wpCfg_1.WPListFieldsEditForm(props.editForm) : null; // Create the webpart and return it\n\n return list_1.WPList(props);\n};\n\n//# sourceURL=webpack:///./build/webparts/listFields/wp.js?");
/***/ }),
/***/ "./build/webparts/listFields/wpCfg.js":
/*!********************************************!*\
!*** ./build/webparts/listFields/wpCfg.js ***!
\********************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/index.js\");\n/**\r\n * List Fields WebPart Edit Form\r\n */\n\n\nexports.WPListFieldsEditForm = function (props) {\n if (props === void 0) {\n props = {};\n }\n\n var _ddlFields = null;\n var _ddlSelectedFields = null;\n var _selectedFields = null;\n var _tbFilter = null;\n var _wpInfo = null; // Adds a selected field\n\n var addField = function addField(field) {\n // Add the selected field\n _selectedFields.push({\n text: field.text,\n value: field.value,\n onRender: function onRender(el) {\n // Set the styling\n el.classList.add(\"d-flex\");\n el.classList.add(\"justify-content-between\"); // Append an icon to remove the field\n\n var closeIcon = gd_bs_1.Icons(gd_bs_1.IconTypes.X, 16, 16);\n el.appendChild(closeIcon); // Set the click event\n\n el.addEventListener(\"click\", function () {\n // Remove this field\n removeField(field);\n }); // Clear the filter\n\n _tbFilter.setValue(\"\");\n }\n }); // Render the fields\n\n\n _ddlSelectedFields.setItems(_selectedFields);\n }; // Filters the fields dropdown items\n\n\n var filterFields = function filterFields(filter) {\n // Parse the items\n var items = _ddlFields.el.querySelectorAll(\".dropdown-item\");\n\n for (var i = 0; i < items.length; i++) {\n var item = items[i];\n var field = (item.innerText || \"\").toLowerCase(); // See if the field contains this value\n\n if (filter == \"\" || field.indexOf(filter) >= 0) {\n // Show this element\n item.classList.remove(\"d-none\");\n } else {\n // Hide this element\n item.classList.add(\"d-none\");\n }\n }\n }; // Gets the selected field values\n\n\n var getSelectedFields = function getSelectedFields() {\n var fields = []; // Get the selected fields\n\n for (var i = 0; i < _selectedFields.length; i++) {\n var field = _selectedFields[i]; // Ensure this is a field\n\n if (field.text && field.value) {\n // Save the field\n fields.push({\n Name: field.value,\n Title: field.text\n });\n }\n } // Return the fields\n\n\n return fields;\n }; // Removes a selected field\n\n\n var removeField = function removeField(field) {\n // Parse the selected fields\n for (var i = 0; i < _selectedFields.length; i++) {\n var selectedField = _selectedFields[i]; // See if this is the target field\n\n if (selectedField.value == field.value) {\n // Remove this field\n _selectedFields.splice(i, 1); // Render the items\n\n\n _ddlSelectedFields.setItems(_selectedFields); // Stop the loop\n\n\n break;\n }\n }\n }; // Renders the fields control\n\n\n var renderFields = function renderFields(el, fields) {\n var filter = \"\"; // Create the dropdown menu\n\n _ddlFields = gd_bs_1.Components.Dropdown({\n id: \"calendarFields\",\n menuOnly: true,\n onChange: function onChange(item) {\n // Close the popover\n popover.hide(); // Clear the filter\n\n filterFields(\"\"); // Add the selected field\n\n addField(item);\n }\n }); // Render the textfield\n\n _tbFilter = gd_bs_1.Components.InputGroup({\n el: el,\n placeholder: \"Select a Field...\",\n onChange: function onChange(value) {\n // Set the filter\n filter = value; // Wait for the user to stop typing\n\n setTimeout(function () {\n // Ensure the value hasn't changed\n if (value != filter) {\n return;\n } // Filter the fields\n\n\n filterFields(filter.toLowerCase()); // Display the popover\n\n popover.show();\n }, 250);\n }\n }); // Render the selected fields\n\n _ddlSelectedFields = gd_bs_1.Components.Dropdown({\n el: el,\n id: \"selectedFields\",\n menuOnly: true\n }); // Add a click event to display the popover\n\n _tbFilter.el.addEventListener(\"click\", function () {\n // Display the popover\n popover.show();\n }); // Create a popover\n\n\n var popover = gd_bs_1.Components.Popover({\n el: el,\n target: _tbFilter.el,\n type: gd_bs_1.Components.PopoverTypes.Auto,\n options: {\n html: true,\n trigger: \"manual\",\n content: function content() {\n // Return the dropdown menu\n return _ddlFields.el;\n }\n }\n });\n }; // Updates the fields\n\n\n var setItems = function setItems(fields, selectedFields) {\n if (selectedFields === void 0) {\n selectedFields = [];\n } // Update the dropdown\n\n\n _ddlFields.setItems(fields); // Parse the selected fields\n\n\n for (var i = 0; i < selectedFields.length; i++) {\n var fieldInfo = selectedFields[i]; // Parse the fields\n\n for (var j = 0; j < fields.length; j++) {\n var field = fields[j]; // See if this is the target field\n\n if (field.value == fieldInfo.Name) {\n // Add this field\n addField(field);\n break;\n }\n }\n }\n }; // Updates the fields dropdown in the edit panel\n\n\n var updateFieldsDDL = function updateFieldsDDL(list, selectedFields) {\n if (selectedFields === void 0) {\n selectedFields = [];\n }\n\n var items = []; // Clear the dropdown\n\n setItems([{\n isHeader: true,\n text: list ? \"Loading the Fields\" : \"Select a List\"\n }]); // Ensure the list exists\n\n if (list) {\n // Get the fields\n list.Fields().query({\n OrderBy: [\"Title\"]\n }).execute(function (fields) {\n // Parse the fields\n for (var i = 0; i < fields.results.length; i++) {\n var field = fields.results[i]; // Skip the title fields\n\n if (field.InternalName == \"LinkTitle\" || field.InternalName == \"LinkTitleNoMenu\") {\n continue;\n } // Skip hidden fields\n\n\n if (field.Hidden) {\n continue;\n } // Set the dropdown value\n\n\n items.push({\n text: field.Title,\n value: field.InternalName\n });\n } // Update the dropdown values\n\n\n setItems(items, selectedFields);\n });\n }\n }; // Return the edit panel\n\n\n return {\n actions: props.actions,\n showSaveButton: props.showSaveButton,\n onListChanged: function onListChanged(wpInfo, list) {\n // Update the fields dropdown\n updateFieldsDDL(list);\n },\n onRenderForm: function onRenderForm(wpInfo, list) {\n // Save the webpart information\n _wpInfo = wpInfo; // Clear the selected fields\n\n _selectedFields = []; // Set the default control\n\n var controls = [{\n name: \"Fields\",\n label: \"Fields\",\n onControlRendered: function onControlRendered(ctrl) {\n // Render the fields control\n renderFields(ctrl.el, wpInfo.cfg.Fields); // Update the fields dropdown\n\n updateFieldsDDL(list, wpInfo.cfg.Fields);\n }\n }]; // Call the render form event\n\n var returnVal = props.onRenderForm ? props.onRenderForm(_wpInfo, list) : null;\n\n if (returnVal) {\n // See if this is a promise\n if (returnVal.then) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Wait for the promise to complete\n returnVal.then(function (formControls) {\n if (formControls === void 0) {\n formControls = [];\n } // Add the form controls\n\n\n controls = controls.concat(formControls); // Resolve the promise\n\n resolve(controls);\n });\n });\n } // Add the form controls\n\n\n controls = controls.concat(returnVal);\n } // Return the custom properties\n\n\n return controls;\n },\n onSave: function onSave(cfg, form) {\n // Update the configuration\n cfg.Fields = getSelectedFields(); // Return the configuration\n\n return props.onSave ? props.onSave(_wpInfo.cfg, form) : _wpInfo.cfg;\n }\n };\n};\n\n//# sourceURL=webpack:///./build/webparts/listFields/wpCfg.js?");
/***/ }),
/***/ "./build/webparts/search/index.js":
/*!****************************************!*\
!*** ./build/webparts/search/index.js ***!
\****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nfunction __export(m) {\n for (var p in m) {\n if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n}\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n__export(__webpack_require__(/*! ./wp */ \"./build/webparts/search/wp.js\"));\n\n__export(__webpack_require__(/*! ./wpCfg */ \"./build/webparts/search/wpCfg.js\"));\n\n//# sourceURL=webpack:///./build/webparts/search/index.js?");
/***/ }),
/***/ "./build/webparts/search/wp.js":
/*!*************************************!*\
!*** ./build/webparts/search/wp.js ***!
\*************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar wp_1 = __webpack_require__(/*! ../list/wp */ \"./build/webparts/list/wp.js\");\n\nvar wpCfg_1 = __webpack_require__(/*! ./wpCfg */ \"./build/webparts/search/wpCfg.js\");\n/**\r\n * Search WebPart\r\n */\n\n\nexports.WPSearch = function (props) {\n var _items = [];\n\n var _wpInfo; // Create the webpart and return it\n\n\n var _wp = wp_1.WPList({\n camlQuery: props.camlQuery,\n cfgElementId: props.cfgElementId,\n className: props.className,\n editForm: wpCfg_1.WPSearchEditForm(props.editForm),\n elementId: props.elementId,\n helpProps: props.helpProps,\n odataQuery: props.odataQuery,\n wpClassName: props.wpClassName,\n onExecutingODATAQuery: function onExecutingODATAQuery(wpInfo, query) {\n // Default the query\n query = (props.onExecutingODATAQuery ? props.onExecutingODATAQuery(wpInfo, query) : query) || {};\n query.Expand = query.Expand || [];\n query.Select = query.Select || [\"*\"]; // Ensure the configuration exists\n\n if (wpInfo.cfg) {\n var hasTaxonomyField = false; // Parse the fields\n\n var fields = (wpInfo.cfg.Fields || []).concat(props.searchFields || []);\n\n for (var i = 0; i < fields.length; i++) {\n var field = fields[i]; // Add the field, based on the type\n\n switch (field.type) {\n // Lookup\n case \"Lookup\":\n case \"LookupMulti\":\n // Add the field\n query.Expand.push(field.name);\n query.Select.push(field.name + \"/Title\");\n break;\n // Taxonomy\n\n case \"TaxonomyFieldType\":\n case \"TaxonomyFieldTypeMulti\":\n // Set the flag\n hasTaxonomyField = true; // Add the field\n\n query.Select.push(field.name);\n break;\n // User\n\n case \"User\":\n // Add the field\n query.Expand.push(field.name);\n query.Select.push(field.name + \"/Title\");\n break;\n // Default\n\n default:\n query.Select.push(field.name);\n break;\n }\n } // See if there is a taxonomy field\n\n\n if (hasTaxonomyField) {\n // Get the taxonomy field values\n query.Expand.push(\"TaxCatchAll\");\n query.Select.push(\"TaxCatchAll/ID\", \"TaxCatchAll/Term\");\n }\n } // Return the query\n\n\n return query;\n },\n onRenderItems: function onRenderItems(wpInfo, items) {\n // Save the wpinfo and items\n _wpInfo = wpInfo;\n _items = items; // Call the custom event\n\n props.onRenderItems ? props.onRenderItems(wpInfo, items) : null;\n }\n }); // Set the filter method\n\n\n _wp.filterItems = function (filterText) {\n var results = []; // Ensure the filter exists\n\n if (filterText && filterText.length > 0) {\n // Update the filter\n filterText = filterText.toLowerCase();\n var fields = ((_wpInfo.cfg ? _wpInfo.cfg.Fields : null) || []).concat(props.searchFields || []); // Parse the items\n\n for (var i = 0; i < _items.length; i++) {\n var item = _items[i];\n var addToResults = false; // Set the taxonomy mapper\n\n var mapper = item[\"TaxCatchAll\"];\n mapper = (mapper ? mapper.results : null) || []; // Parse the fields\n\n for (var j = 0; j < fields.length; j++) {\n var field = fields[j]; // Get the field value(s)\n\n var fieldValues = item[field.name];\n\n if (fieldValues) {\n fieldValues = fieldValues.results ? fieldValues.results : [fieldValues]; // Parse the field values\n\n for (var k = 0; k < fieldValues.length; k++) {\n var fieldValue = fieldValues[k]; // Ensure the field value exists\n\n if (fieldValue) {\n // Update the value, based on the type\n switch (field.type) {\n // Lookup\n case \"Lookup\":\n case \"LookupMulti\":\n // Set the value\n fieldValue = fieldValue.Title;\n break;\n // Taxonomy\n\n case \"TaxonomyFieldType\":\n case \"TaxonomyFieldTypeMulti\":\n // Parse the mapper\n for (var i_1 = 0; i_1 < mapper.length; i_1++) {\n // See if this is the target id\n if (mapper[i_1].ID == fieldValue.WssId) {\n // Set the value\n fieldValue = mapper[i_1].Term;\n }\n }\n\n break;\n // URL\n\n case \"URL\":\n // Set the value\n fieldValue = fieldValue.Description;\n break;\n // User\n\n case \"User\":\n // Set the value\n fieldValue = fieldValue.Title;\n break;\n } // See if the item contains the filter\n\n\n if (fieldValue && fieldValue.toLowerCase().indexOf(filterText) >= 0) {\n // Set the flag\n addToResults = true;\n break;\n }\n }\n } // See if we are adding this item to the results\n\n\n if (addToResults) {\n // Add the item\n results.push(item); // Break from the loop\n\n break;\n }\n }\n }\n }\n } else {\n // Copy the items\n results = _items;\n } // Return the results\n\n\n return results;\n }; // Return the webpart\n\n\n return _wp;\n};\n\n//# sourceURL=webpack:///./build/webparts/search/wp.js?");
/***/ }),
/***/ "./build/webparts/search/wpCfg.js":
/*!****************************************!*\
!*** ./build/webparts/search/wpCfg.js ***!
\****************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/index.js\");\n\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/index.js\");\n/**\r\n * Search WebPart Edit Form\r\n */\n\n\nexports.WPSearchEditForm = function (props) {\n if (props === void 0) {\n props = {};\n }\n\n var _wpInfo = null; // Method to render the fields\n\n var loadFields = function loadFields(list) {\n var formControls = [];\n var items = []; // Ensure the list exists\n\n if (list == null) {\n return formControls;\n } // Parse the fields\n\n\n var fields = (list.Fields ? list.Fields.results : null) || [];\n\n for (var i = 0; i < fields.length; i++) {\n var addField = false;\n var field = fields[i]; // Add the field, based on the type\n\n switch (field.FieldTypeKind) {\n // Searchable Fields\n case gd_sprest_1.SPTypes.FieldType.Choice:\n case gd_sprest_1.SPTypes.FieldType.MultiChoice:\n case gd_sprest_1.SPTypes.FieldType.Lookup:\n case gd_sprest_1.SPTypes.FieldType.Text:\n case gd_sprest_1.SPTypes.FieldType.URL:\n case gd_sprest_1.SPTypes.FieldType.User:\n addField = true;\n break;\n\n default:\n // Allow managed metadata fields\n addField = /^TaxonomyFieldType/.test(field.TypeAsString);\n break;\n } // See if we are adding the field\n\n\n if (addField) {\n items.push({\n data: field.TypeAsString,\n text: field.Title + \" [\" + field.InternalName + \"]\",\n value: field.InternalName\n });\n }\n } // Sort the options\n\n\n items = items.sort(function (a, b) {\n if (a.text < b.text) {\n return -1;\n }\n\n if (a.text > b.text) {\n return 1;\n }\n\n return 0;\n }); // See if fields exist\n\n var value = [];\n\n if (_wpInfo.cfg && _wpInfo.cfg.Fields) {\n // Parse the fields\n for (var i = 0; i < _wpInfo.cfg.Fields.length; i++) {\n // Add the field\n value.push(_wpInfo.cfg.Fields[i].name);\n }\n } // Add the form dropdown\n\n\n formControls.push({\n label: \"Filter Field(s):\",\n items: items,\n type: gd_bs_1.Components.FormControlTypes.MultiDropdown,\n onChange: function onChange(items) {\n // Clear the fields\n _wpInfo.cfg.Fields = []; // Parse the options\n\n for (var i = 0; i < items.length; i++) {\n var item = items[i]; // Add the field\n\n _wpInfo.cfg.Fields.push({\n name: item.value,\n type: item.data\n });\n }\n }\n }); // Return the form controls\n\n return formControls;\n }; // Set the list query\n\n\n var listQuery = props.listQuery || {};\n listQuery.Expand = listQuery.Expand || [];\n listQuery.Expand.push(\"Fields\"); // Return the edit panel\n\n return {\n actions: props.actions,\n listQuery: listQuery,\n onListsLoaded: props.onListsLoaded,\n onRenderForm: function onRenderForm(wpInfo, list) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Save the webpart information\n _wpInfo = wpInfo; // Load the fields\n\n var formControls = loadFields(list); // Call the render form event\n\n var returnVal = props.onRenderForm ? props.onRenderForm(_wpInfo) : null;\n\n if (returnVal) {\n // See if this is a promise\n if (returnVal.then) {\n // Wait for the promise to complete\n returnVal.then(function (controls) {\n if (controls === void 0) {\n controls = [];\n } // Add the form controls\n\n\n formControls = formControls.concat(controls); // Resolve the promise\n\n resolve(formControls);\n });\n } // Else, see if the form controls exist\n else if (returnVal.length > 0) {\n // Add the form controls\n formControls = formControls.concat(returnVal); // Resolve the promise\n\n resolve(formControls);\n } // Else, resolve the promise\n else {\n resolve(formControls);\n }\n } // Else, resolve the promise\n else {\n resolve(formControls);\n }\n });\n },\n showSaveButton: props.showSaveButton,\n onListChanged: function onListChanged(wpInfo, list) {\n // Render the fields\n return loadFields(list);\n },\n onSave: function onSave(cfg, form) {\n // Update the configuration\n cfg.Fields = _wpInfo.cfg.Fields || []; // Return the configuration\n\n return props.onSave ? props.onSave(_wpInfo.cfg, form) : _wpInfo.cfg;\n }\n };\n};\n\n//# sourceURL=webpack:///./build/webparts/search/wpCfg.js?");
/***/ }),
/***/ "./build/webparts/tabs/index.js":
/*!**************************************!*\
!*** ./build/webparts/tabs/index.js ***!
\**************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nfunction __export(m) {\n for (var p in m) {\n if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n}\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n__export(__webpack_require__(/*! ./wp */ \"./build/webparts/tabs/wp.js\"));\n\n//# sourceURL=webpack:///./build/webparts/tabs/index.js?");
/***/ }),
/***/ "./build/webparts/tabs/wp.js":
/*!***********************************!*\
!*** ./build/webparts/tabs/wp.js ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/index.js\");\n\nvar base_1 = __webpack_require__(/*! ../base */ \"./build/webparts/base/index.js\");\n/**\r\n * Web Part Tab Types\r\n */\n\n\nvar WPTabTypes;\n\n(function (WPTabTypes) {\n WPTabTypes[WPTabTypes[\"Pillars\"] = 1] = \"Pillars\";\n WPTabTypes[WPTabTypes[\"Tabs\"] = 2] = \"Tabs\";\n})(WPTabTypes = exports.WPTabTypes || (exports.WPTabTypes = {}));\n/**\r\n * Web Part Tabs\r\n */\n\n\nexports.WPTabs = function (props) {\n var _elWebPart = null;\n var _isContentZone = false;\n var _nav = null; // Method to get the webparts\n\n var getWebParts = function getWebParts(wpInfo) {\n var wps = []; // Get the webpart element and zone\n\n var elWebPart = document.querySelector(\"div[webpartid='\" + wpInfo.cfg.WebPartId + \"']\");\n var elWebPartZone = elWebPart ? getWebPartZone(elWebPart) : null;\n\n if (elWebPart && elWebPartZone) {\n // Add a class name to the webpart zone\n elWebPartZone.className += \" wp-tabs\"; // Remove the empty elements\n\n removeEmptyElements(elWebPartZone); // Parse the webparts in this zone\n\n var webparts = elWebPartZone.querySelectorAll(\".ms-webpartzone-cell[id^='MSOZoneCell_WebPart']\");\n\n for (var i = 0; i < webparts.length; i++) {\n var webpart = webparts[i]; // See if it's this webpart\n\n if (webpart.querySelector(\"div[webpartid='\" + wpInfo.cfg.WebPartId + \"']\")) {\n // Save a reference\n _elWebPart = webpart; // Set the class\n\n _elWebPart.className += \" wp-tab\"; // Skip this webpart\n\n continue;\n } // Skip hidden webparts\n\n\n var wpTitle = (webpart.querySelector(\".ms-webpart-titleText\") || {}).innerText || \"\";\n var isHidden = webpart.firstElementChild && webpart.firstElementChild.classList.contains(\"ms-hide\");\n isHidden = isHidden || /^\\(Hidden\\)/.test(wpTitle);\n\n if (isHidden) {\n continue;\n } // See if this is within a content zone\n\n\n if (_isContentZone) {\n // Get the parent webpart box\n while (webpart.parentNode) {\n // See if this is the webpart box element\n if (webpart.classList.contains(\"ms-rte-wpbox\")) {\n // Find the div containing the webpart id\n var wpElement = webpart.querySelector(\"div[webpartid*='-']\");\n\n if (wpElement) {\n // Set the webpart id attribute\n webpart.setAttribute(\"wpid\", wpElement.getAttribute(\"webpartid\"));\n } // Add this webpart and break from the loop\n\n\n wps.push(webpart);\n break;\n } // Check the parent element\n\n\n webpart = webpart.parentNode;\n }\n } else {\n // Add the webpart\n wps.push(webpart);\n }\n }\n } // Return the webparts\n\n\n return wps;\n }; // Method to get the webpart zone\n\n\n var getWebPartZone = function getWebPartZone(el) {\n // Ensure the element exists\n if (el && el.classList) {\n // See if this is the webpart zone element\n if (el.classList.contains(\"ms-webpart-zone\")) {\n // Return it\n return el;\n } // See if this is the inner page zone\n\n\n if (el.classList.contains(\"ms-rte-layoutszone-inner\") || el.classList.contains(\"ms-rtestate-field\")) {\n // Set the flag\n _isContentZone = true; // Return it\n\n return el;\n } // Check the parent element\n\n\n return getWebPartZone(el.parentNode);\n } // Return nothing\n\n\n return null;\n }; // Method to remove empty paragraph or new lines for webparts w/in content zones\n\n\n var removeEmptyElements = function removeEmptyElements(elWebPartZone) {\n var elChildren = []; // See if this webpart is within a layout zone or rich html field\n\n if (elWebPartZone.className.indexOf(\"ms-rte-layoutszone-inner\") >= 0 || elWebPartZone.className.indexOf(\"ms-rtestate-field\") >= 0) {\n // Set the children elements\n elChildren = elWebPartZone.children;\n } // Parse the children elements\n\n\n for (var i = 0; i < elChildren.length; i++) {\n var elChild = elWebPartZone.children[i]; // See if the last element is a new line\n\n var elBreakLine = elChild.children[elChild.children.length - 1];\n\n if (elBreakLine && elBreakLine.nodeName == \"BR\") {\n // Remove the element\n elChild.removeChild(elBreakLine);\n } // See if this is an empty paragraph tag\n\n\n if (elChild.nodeName == \"P\") {\n var removeElement = false;\n var content = elChild.innerHTML.trim(); // See if this is an empty element\n\n if (content.length == 0) {\n // Set the flag\n removeElement = true;\n } // Else, see if this is a line break\n else if (content.length == 1 && content.charCodeAt(0) == 8203) {\n // Set the flag\n removeElement = true;\n } // Remove the element\n\n\n removeElement ? elWebPartZone.removeChild(elChild) : null;\n }\n }\n }; // Method to update the visibility of the webparts\n\n\n var updateWebParts = function updateWebParts(tab, ev) {\n var selectedTabId = 0; // See if the tab exists\n\n if (tab) {\n // Parse the webparts\n for (var i = 0; i < _webparts.length; i++) {\n // Get the webpart\n var wpTitle = _webparts[i].querySelector(\".ms-webpart-titleText\");\n\n if (wpTitle && wpTitle.innerText == tab.title) {\n // Update the selected tab id\n selectedTabId = i;\n break;\n }\n }\n } // Else, default the selected tab to the first visible webpart\n else {\n // Parse the webparts\n for (selectedTabId = 0; selectedTabId < _webparts.length; selectedTabId++) {\n // Break if this webpart has a title\n if (_webparts[selectedTabId].querySelector(\".ms-webpart-titleText\")) {\n break;\n }\n }\n } // Parse the webparts\n\n\n for (var i = 0; i < _webparts.length; i++) {\n var wp_1 = _webparts[i]; // Determine the query selector\n\n var selector = wp_1.id ? \"#\" + wp_1.id : \".ms-rte-wpbox[wpid='\" + wp_1.getAttribute(\"wpid\") + \"']\"; // Get the webpart\n\n var webpart = document.querySelector(selector);\n\n if (webpart) {\n // See if we are displaying this webpart\n if (i == selectedTabId) {\n // Display the webpart\n webpart.className = webpart.className.replace(\" is-hidden\", \"\"); // See if this tab contains a calendar webpart\n\n if (webpart.querySelector(\".ms-acal-rootdiv\")) {\n var ev_1 = null; // Create the resize event\n\n try {\n ev_1 = new Event(\"resize\");\n } // This will fail for IE\n catch (e) {\n // Create the event\n ev_1 = document.createEvent(\"Event\");\n ev_1.initEvent(\"resize\", true, false);\n } finally {\n // Call the window resize event to fix the events\n ev_1 ? window.dispatchEvent(ev_1) : null;\n }\n } // Call the click if it exists\n\n\n props.onClick ? props.onClick(webpart) : null;\n } // Ensure the webpart is hidden\n else if (webpart.classList.contains(\"is-hidden\") == false) {\n // Hide the webpart\n webpart.classList.add(\"is-hidden\");\n }\n }\n }\n };\n /**\r\n * Main\r\n */\n\n\n var _webparts = []; // Return the webpart\n\n var wp = base_1.WebPart({\n className: props.className,\n cfgElementId: props.cfgElementId,\n editForm: props.editForm,\n elementId: props.elementId,\n helpProps: props.helpProps,\n onPostRender: props.onPostRender,\n onRenderEdit: props.onRenderEdit,\n wpClassName: [\"wp-tabs-main\", props.wpClassName || \"\"].join(' ').trim(),\n onRenderDisplay: function onRenderDisplay(wpInfo) {\n // Set the webparts\n _webparts = getWebParts(wpInfo); // Parse the webparts\n\n var items = [];\n\n for (var i = 0; i < _webparts.length; i++) {\n // Ensure a title exists\n var wpTitle = _webparts[i].querySelector(\".ms-webpart-titleText\");\n\n if (wpTitle) {\n // Add the tab\n items.push({\n isActive: i == 0,\n title: wpTitle.innerText,\n onClick: updateWebParts\n });\n }\n } // Render the navigation\n\n\n _nav = gd_bs_1.Components.Nav({\n className: props.className,\n el: wpInfo.el,\n isPills: props.type == WPTabTypes.Pillars,\n isTabs: props.type != WPTabTypes.Pillars,\n items: items\n }); // Update the webparts\n\n updateWebParts(); // See if a custom event exists\n\n props.onRenderDisplay ? props.onRenderDisplay(wpInfo) : null;\n }\n }); // Add the custom methods\n\n wp.getNav = function () {\n return _nav;\n };\n\n wp.getTabs = function () {\n return _webparts;\n }; // Return the webpart\n\n\n return wp;\n};\n\n//# sourceURL=webpack:///./build/webparts/tabs/wp.js?");
/***/ }),
/***/ "./build/webparts/taxonomy/index.js":
/*!******************************************!*\
!*** ./build/webparts/taxonomy/index.js ***!
\******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nfunction __export(m) {\n for (var p in m) {\n if (!exports.hasOwnProperty(p)) exports[p] = m[p];\n }\n}\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\n__export(__webpack_require__(/*! ./wp */ \"./build/webparts/taxonomy/wp.js\"));\n\n__export(__webpack_require__(/*! ./wpCfg */ \"./build/webparts/taxonomy/wpCfg.js\"));\n\n//# sourceURL=webpack:///./build/webparts/taxonomy/index.js?");
/***/ }),
/***/ "./build/webparts/taxonomy/wp.js":
/*!***************************************!*\
!*** ./build/webparts/taxonomy/wp.js ***!
\***************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/index.js\");\n\nvar wp_1 = __webpack_require__(/*! ../base/wp */ \"./build/webparts/base/wp.js\");\n\nvar wpCfg_1 = __webpack_require__(/*! ./wpCfg */ \"./build/webparts/taxonomy/wpCfg.js\");\n/**\r\n * Taxonomy WebPart\r\n */\n\n\nexports.WPTaxonomy = function (props) {\n // Create an instance of the webpart\n wp_1.WebPart({\n cfgElementId: props.cfgElementId,\n className: props.className,\n editForm: wpCfg_1.WPTaxonomyEditForm(props.editForm || {}),\n elementId: props.elementId,\n helpProps: props.helpProps,\n onPostRender: props.onPostRender,\n onRenderEdit: props.onRenderEdit,\n wpClassName: props.wpClassName,\n onRenderDisplay: function onRenderDisplay(wpInfo) {\n // See if the render term sets event exists\n if (props.onRenderTermSets && wpInfo.cfg.TermGroupName) {\n // Load the term group information\n gd_sprest_1.Helper.Taxonomy.getTermSets(wpInfo.cfg.TermGroupName).then(function (termSets) {\n // Call the render event\n props.onRenderTermSets(wpInfo, termSets);\n });\n } // See if the term group and term set names exist\n\n\n if (wpInfo.cfg.TermGroupName && wpInfo.cfg.TermSetName) {\n // See if the render term set events exists\n if (props.onRenderTermSet || props.onRenderTermSetTerms) {\n // Load the term set information\n gd_sprest_1.Helper.Taxonomy.getTermSetByGroupName(wpInfo.cfg.TermSetName, wpInfo.cfg.TermGroupName).then(function (termSet) {\n // Call the term set render event\n props.onRenderTermSet ? props.onRenderTermSet(wpInfo, termSet) : null; // See if we are rendering term set terms\n\n if (props.onRenderTermSetTerms) {\n // See if a term set id exists\n if (wpInfo.cfg.TermSetTermId) {\n // Load the term set terms\n var term = gd_sprest_1.Helper.Taxonomy.findById(termSet, wpInfo.cfg.TermSetTermId); // Call the term set terms render event\n\n props.onRenderTermSetTerms(wpInfo, term ? gd_sprest_1.Helper.Taxonomy.toArray(term) : []);\n } else {\n // Call the term set terms render event\n props.onRenderTermSetTerms(wpInfo, gd_sprest_1.Helper.Taxonomy.toArray(termSet));\n }\n }\n });\n }\n }\n }\n });\n};\n\n//# sourceURL=webpack:///./build/webparts/taxonomy/wp.js?");
/***/ }),
/***/ "./build/webparts/taxonomy/wpCfg.js":
/*!******************************************!*\
!*** ./build/webparts/taxonomy/wpCfg.js ***!
\******************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar gd_bs_1 = __webpack_require__(/*! gd-bs */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/index.js\");\n\nvar gd_sprest_1 = __webpack_require__(/*! gd-sprest */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/index.js\");\n/**\r\n * Taxonomy WebPart Edit Form\r\n */\n\n\nexports.WPTaxonomyEditForm = function (props) {\n if (props === void 0) {\n props = {};\n }\n\n var _ddlTermSet;\n\n var _ddlTerm;\n\n var _termGroupItems = [];\n var _termSetItems = [];\n var _termSetTermsItems = [];\n var _wpInfo = null; // Method to generate the form controls\n\n var generateFormControls = function generateFormControls() {\n var formControls = []; // Add the term groups dropdown\n\n formControls.push({\n label: \"Select the Term Group:\",\n items: _termGroupItems,\n name: \"TermGroupId\",\n type: gd_bs_1.Components.FormControlTypes.Dropdown,\n value: _wpInfo.cfg.TermGroupId,\n onChange: function onChange(option) {\n // Clear the dropdowns\n _termSetItems = [];\n _termSetTermsItems = [];\n\n _ddlTermSet.setItems([]);\n\n _ddlTerm ? _ddlTerm.setItems([]) : null; // Update the configuration\n\n _wpInfo.cfg.TermGroupId = option ? option.value : \"\";\n _wpInfo.cfg.TermGroupName = option ? option.text : \"\";\n _wpInfo.cfg.TermSetId = \"\";\n _wpInfo.cfg.TermSetName = \"\";\n _wpInfo.cfg.TermSetTermId = \"\";\n _wpInfo.cfg.TermSetTermName = \"\"; // Call the change event\n\n props.onTermGroupChanged ? props.onTermGroupChanged(_wpInfo, {\n id: _wpInfo.cfg.TermGroupId,\n name: _wpInfo.cfg.TermGroupName\n }) : null; // Load the term sets\n\n loadTermSets().then(function () {\n // Render the child dropdowns\n _ddlTermSet.setItems(_termSetItems);\n });\n }\n }); // Add the term sets dropdown\n\n formControls.push({\n label: \"Select a Term Set:\",\n items: _termSetItems,\n name: \"TermSetId\",\n type: gd_bs_1.Components.FormControlTypes.Dropdown,\n value: _wpInfo.cfg.TermSetId,\n onControlRendered: function onControlRendered(control) {\n // Save a reference to the dropdown\n _ddlTermSet = control.dropdown;\n },\n onChange: function onChange(option) {\n // Clear the dropdown\n _termSetTermsItems = [];\n _ddlTerm ? _ddlTerm.setItems([]) : null; // Update the configuration\n\n _wpInfo.cfg.TermSetId = option ? option.value : \"\";\n _wpInfo.cfg.TermSetName = option ? option.text : \"\";\n _wpInfo.cfg.TermSetTermId = \"\";\n _wpInfo.cfg.TermSetTermName = \"\"; // Call the change event\n\n props.onTermSetChanged ? props.onTermSetChanged(_wpInfo, {\n id: _wpInfo.cfg.TermSetId,\n name: _wpInfo.cfg.TermSetName\n }) : null; // See if we are loading the terms\n\n if (props.showTermSetTerms) {\n // Load the term set terms\n loadTermSetTerms().then(function () {\n // Render the child dropdowns\n _ddlTerm.setItems(_termSetTermsItems);\n });\n }\n }\n }); // Ensure we are rendering the term set terms\n\n if (props.showTermSetTerms) {\n // Add the term set terms dropdown\n formControls.push({\n label: \"Select a Term Set Term:\",\n items: _termSetTermsItems,\n name: \"TermSetTermId\",\n type: gd_bs_1.Components.FormControlTypes.Dropdown,\n value: _wpInfo.cfg.TermSetTermId,\n onControlRendered: function onControlRendered(control) {\n // Save a reference to the dropdown\n _ddlTerm = control.dropdown;\n },\n onChange: function onChange(option) {\n // Update the configuration\n _wpInfo.cfg.TermSetTermId = option ? option.value : \"\";\n _wpInfo.cfg.TermSetTermName = option ? option.text : \"\"; // Call the change event\n\n props.onTermSetTermChanged ? props.onTermSetTermChanged(_wpInfo, {\n id: _wpInfo.cfg.TermSetTermId,\n name: _wpInfo.cfg.TermSetTermName\n }) : null;\n }\n });\n } // Return the form controls\n\n\n return formControls;\n }; // Method to load the term groups\n\n\n var loadTermGroups = function loadTermGroups() {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Load the term groups\n gd_sprest_1.Helper.Taxonomy.getTermGroups().then(function (groups) {\n _termGroupItems = [{\n text: \"\",\n value: \"\"\n }]; // Parse the groups\n\n for (var i = 0; i < groups.length; i++) {\n // Add the item\n _termGroupItems.push({\n text: groups[i].name,\n value: groups[i].id\n });\n } // Load the term sets\n\n\n loadTermSets().then(function () {\n // Execute the term groups loaded event\n _termGroupItems = props.onTermGroupsLoaded ? props.onTermGroupsLoaded(_wpInfo, _termGroupItems) : _termGroupItems; // Resolve the promise\n\n resolve(generateFormControls());\n });\n });\n });\n }; // Method to load the term sets\n\n\n var loadTermSets = function loadTermSets() {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // See if a term group exists\n if (_wpInfo.cfg.TermGroupName) {\n // Load the term sets\n gd_sprest_1.Helper.Taxonomy.getTermSets(_wpInfo.cfg.TermGroupName).then(function (termSets) {\n _termSetItems = [{\n text: \"\",\n value: \"\"\n }]; // Parse the term sets\n\n for (var i = 0; i < termSets.length; i++) {\n // Add the item\n _termSetItems.push({\n text: termSets[i].name,\n value: termSets[i].id\n });\n } // Load the term set terms and resolve the promise\n\n\n loadTermSetTerms().then(function () {\n // Execute the term sets loaded event\n _termSetItems = props.onTermSetsLoaded ? props.onTermSetsLoaded(_wpInfo, _termSetItems) : _termSetItems; // Resolve the promise\n\n resolve();\n });\n });\n } else {\n // Resolve the promise\n resolve();\n }\n });\n }; // Method to load the term set terms\n\n\n var loadTermSetTerms = function loadTermSetTerms() {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Ensure we are displaying term set terms and a term set is selected\n if (props.showTermSetTerms && _wpInfo.cfg.TermSetId) {\n // Load the term set terms\n gd_sprest_1.Helper.Taxonomy.getTermSetByGroupName(_wpInfo.cfg.TermSetName, _wpInfo.cfg.TermGroupName).then(function (termSet) {\n _termSetTermsItems = [{\n text: \"\",\n value: \"\"\n }]; // Get the term set terms\n\n var terms = gd_sprest_1.Helper.Taxonomy.toArray(termSet).sort(function (a, b) {\n if (a.name < b.name) {\n return -1;\n }\n\n if (a.name > b.name) {\n return 1;\n }\n\n return 0;\n }); // Parse the term set terms\n\n for (var i = 0; i < terms.length; i++) {\n // Add the item\n _termSetTermsItems.push({\n text: terms[i].name,\n value: terms[i].id\n });\n } // Execute the term sets loaded event\n\n\n _termSetTermsItems = props.onTermSetTermsLoaded ? props.onTermSetTermsLoaded(_wpInfo, _termSetTermsItems) : _termSetTermsItems; // Resolve the promise\n\n resolve();\n });\n } else {\n // Resolve the promise\n resolve();\n }\n });\n }; // Return the edit panel\n\n\n return {\n actions: props.actions,\n onRenderForm: function onRenderForm(wpInfo) {\n // Return a promise\n return new Promise(function (resolve, reject) {\n // Save the webpart information\n _wpInfo = wpInfo; // Load the term groups\n\n loadTermGroups().then(function (formControls) {\n // Call the render form event\n var returnVal = props.onRenderForm ? props.onRenderForm(_wpInfo) : null;\n\n if (returnVal) {\n // See if this is a promise\n if (returnVal.then) {\n // Wait for the promise to complete\n returnVal.then(function (controls) {\n if (controls === void 0) {\n controls = [];\n } // Add the form controls\n\n\n formControls = formControls.concat(controls); // Resolve the promise\n\n resolve(formControls);\n });\n } // Else, see if the form controls exist\n else if (returnVal.length > 0) {\n // Add the form controls\n formControls = formControls.concat(returnVal); // Resolve the promise\n\n resolve(formControls);\n } // Else, resolve the promise\n else {\n resolve(formControls);\n }\n } // Else, resolve the promise\n else {\n resolve(formControls);\n }\n });\n });\n },\n onSave: function onSave(cfg, form) {\n // Update the configuration\n cfg.TermGroupId = _wpInfo.cfg.TermGroupId;\n cfg.TermGroupName = _wpInfo.cfg.TermGroupName;\n cfg.TermSetId = _wpInfo.cfg.TermSetId;\n cfg.TermSetName = _wpInfo.cfg.TermSetName;\n cfg.TermSetTermId = _wpInfo.cfg.TermSetTermId;\n cfg.TermSetTermName = _wpInfo.cfg.TermSetTermName; // Return the configuration\n\n return props.onSave ? props.onSave(_wpInfo.cfg, form) : _wpInfo.cfg;\n }\n };\n};\n\n//# sourceURL=webpack:///./build/webparts/taxonomy/wpCfg.js?");
/***/ }),
/***/ "./lib/jquery-ui-1.12.1.custom/jquery-ui.min.js":
/*!******************************************************!*\
!*** ./lib/jquery-ui-1.12.1.custom/jquery-ui.min.js ***!
\******************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("function _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\n/*! jQuery UI - v1.12.1 - 2018-09-12\r\n* http://jqueryui.com\r\n* Includes: keycode.js, widgets/datepicker.js\r\n* Copyright jQuery Foundation and other contributors; Licensed MIT */\n(function (t) {\n t(GD.jQuery);\n})(function (t) {\n function e(t) {\n for (var e, i; t.length && t[0] !== document;) {\n if (e = t.css(\"position\"), (\"absolute\" === e || \"relative\" === e || \"fixed\" === e) && (i = parseInt(t.css(\"zIndex\"), 10), !isNaN(i) && 0 !== i)) return i;\n t = t.parent();\n }\n\n return 0;\n }\n\n function i() {\n this._curInst = null, this._keyEvent = !1, this._disabledInputs = [], this._datepickerShowing = !1, this._inDialog = !1, this._mainDivId = \"ui-datepicker-div\", this._inlineClass = \"ui-datepicker-inline\", this._appendClass = \"ui-datepicker-append\", this._triggerClass = \"ui-datepicker-trigger\", this._dialogClass = \"ui-datepicker-dialog\", this._disableClass = \"ui-datepicker-disabled\", this._unselectableClass = \"ui-datepicker-unselectable\", this._currentClass = \"ui-datepicker-current-day\", this._dayOverClass = \"ui-datepicker-days-cell-over\", this.regional = [], this.regional[\"\"] = {\n closeText: \"Done\",\n prevText: \"Prev\",\n nextText: \"Next\",\n currentText: \"Today\",\n monthNames: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n monthNamesShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"],\n dayNames: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n dayNamesShort: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n dayNamesMin: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n weekHeader: \"Wk\",\n dateFormat: \"mm/dd/yy\",\n firstDay: 0,\n isRTL: !1,\n showMonthAfterYear: !1,\n yearSuffix: \"\"\n }, this._defaults = {\n showOn: \"focus\",\n showAnim: \"fadeIn\",\n showOptions: {},\n defaultDate: null,\n appendText: \"\",\n buttonText: \"...\",\n buttonImage: \"\",\n buttonImageOnly: !1,\n hideIfNoPrevNext: !1,\n navigationAsDateFormat: !1,\n gotoCurrent: !1,\n changeMonth: !1,\n changeYear: !1,\n yearRange: \"c-10:c+10\",\n showOtherMonths: !1,\n selectOtherMonths: !1,\n showWeek: !1,\n calculateWeek: this.iso8601Week,\n shortYearCutoff: \"+10\",\n minDate: null,\n maxDate: null,\n duration: \"fast\",\n beforeShowDay: null,\n beforeShow: null,\n onSelect: null,\n onChangeMonthYear: null,\n onClose: null,\n numberOfMonths: 1,\n showCurrentAtPos: 0,\n stepMonths: 1,\n stepBigMonths: 12,\n altField: \"\",\n altFormat: \"\",\n constrainInput: !0,\n showButtonPanel: !1,\n autoSize: !1,\n disabled: !1\n }, t.extend(this._defaults, this.regional[\"\"]), this.regional.en = t.extend(!0, {}, this.regional[\"\"]), this.regional[\"en-US\"] = t.extend(!0, {}, this.regional.en), this.dpDiv = s(t(\"\"));\n }\n\n function s(e) {\n var i = \"button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a\";\n return e.on(\"mouseout\", i, function () {\n t(this).removeClass(\"ui-state-hover\"), -1 !== this.className.indexOf(\"ui-datepicker-prev\") && t(this).removeClass(\"ui-datepicker-prev-hover\"), -1 !== this.className.indexOf(\"ui-datepicker-next\") && t(this).removeClass(\"ui-datepicker-next-hover\");\n }).on(\"mouseover\", i, n);\n }\n\n function n() {\n t.datepicker._isDisabledDatepicker(a.inline ? a.dpDiv.parent()[0] : a.input[0]) || (t(this).parents(\".ui-datepicker-calendar\").find(\"a\").removeClass(\"ui-state-hover\"), t(this).addClass(\"ui-state-hover\"), -1 !== this.className.indexOf(\"ui-datepicker-prev\") && t(this).addClass(\"ui-datepicker-prev-hover\"), -1 !== this.className.indexOf(\"ui-datepicker-next\") && t(this).addClass(\"ui-datepicker-next-hover\"));\n }\n\n function o(e, i) {\n t.extend(e, i);\n\n for (var s in i) {\n null == i[s] && (e[s] = i[s]);\n }\n\n return e;\n }\n\n t.ui = t.ui || {}, t.ui.version = \"1.12.1\", t.ui.keyCode = {\n BACKSPACE: 8,\n COMMA: 188,\n DELETE: 46,\n DOWN: 40,\n END: 35,\n ENTER: 13,\n ESCAPE: 27,\n HOME: 36,\n LEFT: 37,\n PAGE_DOWN: 34,\n PAGE_UP: 33,\n PERIOD: 190,\n RIGHT: 39,\n SPACE: 32,\n TAB: 9,\n UP: 38\n }, t.extend(t.ui, {\n datepicker: {\n version: \"1.12.1\"\n }\n });\n var a;\n t.extend(i.prototype, {\n markerClassName: \"hasDatepicker\",\n maxRows: 4,\n _widgetDatepicker: function _widgetDatepicker() {\n return this.dpDiv;\n },\n setDefaults: function setDefaults(t) {\n return o(this._defaults, t || {}), this;\n },\n _attachDatepicker: function _attachDatepicker(e, i) {\n var s, n, o;\n s = e.nodeName.toLowerCase(), n = \"div\" === s || \"span\" === s, e.id || (this.uuid += 1, e.id = \"dp\" + this.uuid), o = this._newInst(t(e), n), o.settings = t.extend({}, i || {}), \"input\" === s ? this._connectDatepicker(e, o) : n && this._inlineDatepicker(e, o);\n },\n _newInst: function _newInst(e, i) {\n var n = e[0].id.replace(/([^A-Za-z0-9_\\-])/g, \"\\\\\\\\$1\");\n return {\n id: n,\n input: e,\n selectedDay: 0,\n selectedMonth: 0,\n selectedYear: 0,\n drawMonth: 0,\n drawYear: 0,\n inline: i,\n dpDiv: i ? s(t(\"\")) : this.dpDiv\n };\n },\n _connectDatepicker: function _connectDatepicker(e, i) {\n var s = t(e);\n i.append = t([]), i.trigger = t([]), s.hasClass(this.markerClassName) || (this._attachments(s, i), s.addClass(this.markerClassName).on(\"keydown\", this._doKeyDown).on(\"keypress\", this._doKeyPress).on(\"keyup\", this._doKeyUp), this._autoSize(i), t.data(e, \"datepicker\", i), i.settings.disabled && this._disableDatepicker(e));\n },\n _attachments: function _attachments(e, i) {\n var s,\n n,\n o,\n a = this._get(i, \"appendText\"),\n r = this._get(i, \"isRTL\");\n\n i.append && i.append.remove(), a && (i.append = t(\"\" + a + \"\"), e[r ? \"before\" : \"after\"](i.append)), e.off(\"focus\", this._showDatepicker), i.trigger && i.trigger.remove(), s = this._get(i, \"showOn\"), (\"focus\" === s || \"both\" === s) && e.on(\"focus\", this._showDatepicker), (\"button\" === s || \"both\" === s) && (n = this._get(i, \"buttonText\"), o = this._get(i, \"buttonImage\"), i.trigger = t(this._get(i, \"buttonImageOnly\") ? t(\"\").addClass(this._triggerClass).attr({\n src: o,\n alt: n,\n title: n\n }) : t(\"\").addClass(this._triggerClass).html(o ? t(\"\").attr({\n src: o,\n alt: n,\n title: n\n }) : n)), e[r ? \"before\" : \"after\"](i.trigger), i.trigger.on(\"click\", function () {\n return t.datepicker._datepickerShowing && t.datepicker._lastInput === e[0] ? t.datepicker._hideDatepicker() : t.datepicker._datepickerShowing && t.datepicker._lastInput !== e[0] ? (t.datepicker._hideDatepicker(), t.datepicker._showDatepicker(e[0])) : t.datepicker._showDatepicker(e[0]), !1;\n }));\n },\n _autoSize: function _autoSize(t) {\n if (this._get(t, \"autoSize\") && !t.inline) {\n var e,\n i,\n s,\n n,\n o = new Date(2009, 11, 20),\n a = this._get(t, \"dateFormat\");\n\n a.match(/[DM]/) && (e = function e(t) {\n for (i = 0, s = 0, n = 0; t.length > n; n++) {\n t[n].length > i && (i = t[n].length, s = n);\n }\n\n return s;\n }, o.setMonth(e(this._get(t, a.match(/MM/) ? \"monthNames\" : \"monthNamesShort\"))), o.setDate(e(this._get(t, a.match(/DD/) ? \"dayNames\" : \"dayNamesShort\")) + 20 - o.getDay())), t.input.attr(\"size\", this._formatDate(t, o).length);\n }\n },\n _inlineDatepicker: function _inlineDatepicker(e, i) {\n var s = t(e);\n s.hasClass(this.markerClassName) || (s.addClass(this.markerClassName).append(i.dpDiv), t.data(e, \"datepicker\", i), this._setDate(i, this._getDefaultDate(i), !0), this._updateDatepicker(i), this._updateAlternate(i), i.settings.disabled && this._disableDatepicker(e), i.dpDiv.css(\"display\", \"block\"));\n },\n _dialogDatepicker: function _dialogDatepicker(e, i, s, n, a) {\n var r,\n l,\n h,\n c,\n u,\n d = this._dialogInst;\n return d || (this.uuid += 1, r = \"dp\" + this.uuid, this._dialogInput = t(\"\"), this._dialogInput.on(\"keydown\", this._doKeyDown), t(\"body\").append(this._dialogInput), d = this._dialogInst = this._newInst(this._dialogInput, !1), d.settings = {}, t.data(this._dialogInput[0], \"datepicker\", d)), o(d.settings, n || {}), i = i && i.constructor === Date ? this._formatDate(d, i) : i, this._dialogInput.val(i), this._pos = a ? a.length ? a : [a.pageX, a.pageY] : null, this._pos || (l = document.documentElement.clientWidth, h = document.documentElement.clientHeight, c = document.documentElement.scrollLeft || document.body.scrollLeft, u = document.documentElement.scrollTop || document.body.scrollTop, this._pos = [l / 2 - 100 + c, h / 2 - 150 + u]), this._dialogInput.css(\"left\", this._pos[0] + 20 + \"px\").css(\"top\", this._pos[1] + \"px\"), d.settings.onSelect = s, this._inDialog = !0, this.dpDiv.addClass(this._dialogClass), this._showDatepicker(this._dialogInput[0]), t.blockUI && t.blockUI(this.dpDiv), t.data(this._dialogInput[0], \"datepicker\", d), this;\n },\n _destroyDatepicker: function _destroyDatepicker(e) {\n var i,\n s = t(e),\n n = t.data(e, \"datepicker\");\n s.hasClass(this.markerClassName) && (i = e.nodeName.toLowerCase(), t.removeData(e, \"datepicker\"), \"input\" === i ? (n.append.remove(), n.trigger.remove(), s.removeClass(this.markerClassName).off(\"focus\", this._showDatepicker).off(\"keydown\", this._doKeyDown).off(\"keypress\", this._doKeyPress).off(\"keyup\", this._doKeyUp)) : (\"div\" === i || \"span\" === i) && s.removeClass(this.markerClassName).empty(), a === n && (a = null));\n },\n _enableDatepicker: function _enableDatepicker(e) {\n var i,\n s,\n n = t(e),\n o = t.data(e, \"datepicker\");\n n.hasClass(this.markerClassName) && (i = e.nodeName.toLowerCase(), \"input\" === i ? (e.disabled = !1, o.trigger.filter(\"button\").each(function () {\n this.disabled = !1;\n }).end().filter(\"img\").css({\n opacity: \"1.0\",\n cursor: \"\"\n })) : (\"div\" === i || \"span\" === i) && (s = n.children(\".\" + this._inlineClass), s.children().removeClass(\"ui-state-disabled\"), s.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").prop(\"disabled\", !1)), this._disabledInputs = t.map(this._disabledInputs, function (t) {\n return t === e ? null : t;\n }));\n },\n _disableDatepicker: function _disableDatepicker(e) {\n var i,\n s,\n n = t(e),\n o = t.data(e, \"datepicker\");\n n.hasClass(this.markerClassName) && (i = e.nodeName.toLowerCase(), \"input\" === i ? (e.disabled = !0, o.trigger.filter(\"button\").each(function () {\n this.disabled = !0;\n }).end().filter(\"img\").css({\n opacity: \"0.5\",\n cursor: \"default\"\n })) : (\"div\" === i || \"span\" === i) && (s = n.children(\".\" + this._inlineClass), s.children().addClass(\"ui-state-disabled\"), s.find(\"select.ui-datepicker-month, select.ui-datepicker-year\").prop(\"disabled\", !0)), this._disabledInputs = t.map(this._disabledInputs, function (t) {\n return t === e ? null : t;\n }), this._disabledInputs[this._disabledInputs.length] = e);\n },\n _isDisabledDatepicker: function _isDisabledDatepicker(t) {\n if (!t) return !1;\n\n for (var e = 0; this._disabledInputs.length > e; e++) {\n if (this._disabledInputs[e] === t) return !0;\n }\n\n return !1;\n },\n _getInst: function _getInst(e) {\n try {\n return t.data(e, \"datepicker\");\n } catch (i) {\n throw \"Missing instance data for this datepicker\";\n }\n },\n _optionDatepicker: function _optionDatepicker(e, i, s) {\n var n,\n a,\n r,\n l,\n h = this._getInst(e);\n\n return 2 === arguments.length && \"string\" == typeof i ? \"defaults\" === i ? t.extend({}, t.datepicker._defaults) : h ? \"all\" === i ? t.extend({}, h.settings) : this._get(h, i) : null : (n = i || {}, \"string\" == typeof i && (n = {}, n[i] = s), h && (this._curInst === h && this._hideDatepicker(), a = this._getDateDatepicker(e, !0), r = this._getMinMaxDate(h, \"min\"), l = this._getMinMaxDate(h, \"max\"), o(h.settings, n), null !== r && void 0 !== n.dateFormat && void 0 === n.minDate && (h.settings.minDate = this._formatDate(h, r)), null !== l && void 0 !== n.dateFormat && void 0 === n.maxDate && (h.settings.maxDate = this._formatDate(h, l)), \"disabled\" in n && (n.disabled ? this._disableDatepicker(e) : this._enableDatepicker(e)), this._attachments(t(e), h), this._autoSize(h), this._setDate(h, a), this._updateAlternate(h), this._updateDatepicker(h)), void 0);\n },\n _changeDatepicker: function _changeDatepicker(t, e, i) {\n this._optionDatepicker(t, e, i);\n },\n _refreshDatepicker: function _refreshDatepicker(t) {\n var e = this._getInst(t);\n\n e && this._updateDatepicker(e);\n },\n _setDateDatepicker: function _setDateDatepicker(t, e) {\n var i = this._getInst(t);\n\n i && (this._setDate(i, e), this._updateDatepicker(i), this._updateAlternate(i));\n },\n _getDateDatepicker: function _getDateDatepicker(t, e) {\n var i = this._getInst(t);\n\n return i && !i.inline && this._setDateFromField(i, e), i ? this._getDate(i) : null;\n },\n _doKeyDown: function _doKeyDown(e) {\n var i,\n s,\n n,\n o = t.datepicker._getInst(e.target),\n a = !0,\n r = o.dpDiv.is(\".ui-datepicker-rtl\");\n\n if (o._keyEvent = !0, t.datepicker._datepickerShowing) switch (e.keyCode) {\n case 9:\n t.datepicker._hideDatepicker(), a = !1;\n break;\n\n case 13:\n return n = t(\"td.\" + t.datepicker._dayOverClass + \":not(.\" + t.datepicker._currentClass + \")\", o.dpDiv), n[0] && t.datepicker._selectDay(e.target, o.selectedMonth, o.selectedYear, n[0]), i = t.datepicker._get(o, \"onSelect\"), i ? (s = t.datepicker._formatDate(o), i.apply(o.input ? o.input[0] : null, [s, o])) : t.datepicker._hideDatepicker(), !1;\n\n case 27:\n t.datepicker._hideDatepicker();\n\n break;\n\n case 33:\n t.datepicker._adjustDate(e.target, e.ctrlKey ? -t.datepicker._get(o, \"stepBigMonths\") : -t.datepicker._get(o, \"stepMonths\"), \"M\");\n\n break;\n\n case 34:\n t.datepicker._adjustDate(e.target, e.ctrlKey ? +t.datepicker._get(o, \"stepBigMonths\") : +t.datepicker._get(o, \"stepMonths\"), \"M\");\n\n break;\n\n case 35:\n (e.ctrlKey || e.metaKey) && t.datepicker._clearDate(e.target), a = e.ctrlKey || e.metaKey;\n break;\n\n case 36:\n (e.ctrlKey || e.metaKey) && t.datepicker._gotoToday(e.target), a = e.ctrlKey || e.metaKey;\n break;\n\n case 37:\n (e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, r ? 1 : -1, \"D\"), a = e.ctrlKey || e.metaKey, e.originalEvent.altKey && t.datepicker._adjustDate(e.target, e.ctrlKey ? -t.datepicker._get(o, \"stepBigMonths\") : -t.datepicker._get(o, \"stepMonths\"), \"M\");\n break;\n\n case 38:\n (e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, -7, \"D\"), a = e.ctrlKey || e.metaKey;\n break;\n\n case 39:\n (e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, r ? -1 : 1, \"D\"), a = e.ctrlKey || e.metaKey, e.originalEvent.altKey && t.datepicker._adjustDate(e.target, e.ctrlKey ? +t.datepicker._get(o, \"stepBigMonths\") : +t.datepicker._get(o, \"stepMonths\"), \"M\");\n break;\n\n case 40:\n (e.ctrlKey || e.metaKey) && t.datepicker._adjustDate(e.target, 7, \"D\"), a = e.ctrlKey || e.metaKey;\n break;\n\n default:\n a = !1;\n } else 36 === e.keyCode && e.ctrlKey ? t.datepicker._showDatepicker(this) : a = !1;\n a && (e.preventDefault(), e.stopPropagation());\n },\n _doKeyPress: function _doKeyPress(e) {\n var i,\n s,\n n = t.datepicker._getInst(e.target);\n\n return t.datepicker._get(n, \"constrainInput\") ? (i = t.datepicker._possibleChars(t.datepicker._get(n, \"dateFormat\")), s = String.fromCharCode(null == e.charCode ? e.keyCode : e.charCode), e.ctrlKey || e.metaKey || \" \" > s || !i || i.indexOf(s) > -1) : void 0;\n },\n _doKeyUp: function _doKeyUp(e) {\n var i,\n s = t.datepicker._getInst(e.target);\n\n if (s.input.val() !== s.lastVal) try {\n i = t.datepicker.parseDate(t.datepicker._get(s, \"dateFormat\"), s.input ? s.input.val() : null, t.datepicker._getFormatConfig(s)), i && (t.datepicker._setDateFromField(s), t.datepicker._updateAlternate(s), t.datepicker._updateDatepicker(s));\n } catch (n) {}\n return !0;\n },\n _showDatepicker: function _showDatepicker(i) {\n if (i = i.target || i, \"input\" !== i.nodeName.toLowerCase() && (i = t(\"input\", i.parentNode)[0]), !t.datepicker._isDisabledDatepicker(i) && t.datepicker._lastInput !== i) {\n var s, n, a, r, l, h, c;\n s = t.datepicker._getInst(i), t.datepicker._curInst && t.datepicker._curInst !== s && (t.datepicker._curInst.dpDiv.stop(!0, !0), s && t.datepicker._datepickerShowing && t.datepicker._hideDatepicker(t.datepicker._curInst.input[0])), n = t.datepicker._get(s, \"beforeShow\"), a = n ? n.apply(i, [i, s]) : {}, a !== !1 && (o(s.settings, a), s.lastVal = null, t.datepicker._lastInput = i, t.datepicker._setDateFromField(s), t.datepicker._inDialog && (i.value = \"\"), t.datepicker._pos || (t.datepicker._pos = t.datepicker._findPos(i), t.datepicker._pos[1] += i.offsetHeight), r = !1, t(i).parents().each(function () {\n return r |= \"fixed\" === t(this).css(\"position\"), !r;\n }), l = {\n left: t.datepicker._pos[0],\n top: t.datepicker._pos[1]\n }, t.datepicker._pos = null, s.dpDiv.empty(), s.dpDiv.css({\n position: \"absolute\",\n display: \"block\",\n top: \"-1000px\"\n }), t.datepicker._updateDatepicker(s), l = t.datepicker._checkOffset(s, l, r), s.dpDiv.css({\n position: t.datepicker._inDialog && t.blockUI ? \"static\" : r ? \"fixed\" : \"absolute\",\n display: \"none\",\n left: l.left + \"px\",\n top: l.top + \"px\"\n }), s.inline || (h = t.datepicker._get(s, \"showAnim\"), c = t.datepicker._get(s, \"duration\"), s.dpDiv.css(\"z-index\", e(t(i)) + 1), t.datepicker._datepickerShowing = !0, t.effects && t.effects.effect[h] ? s.dpDiv.show(h, t.datepicker._get(s, \"showOptions\"), c) : s.dpDiv[h || \"show\"](h ? c : null), t.datepicker._shouldFocusInput(s) && s.input.trigger(\"focus\"), t.datepicker._curInst = s));\n }\n },\n _updateDatepicker: function _updateDatepicker(e) {\n this.maxRows = 4, a = e, e.dpDiv.empty().append(this._generateHTML(e)), this._attachHandlers(e);\n\n var i,\n s = this._getNumberOfMonths(e),\n o = s[1],\n r = 17,\n l = e.dpDiv.find(\".\" + this._dayOverClass + \" a\");\n\n l.length > 0 && n.apply(l.get(0)), e.dpDiv.removeClass(\"ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4\").width(\"\"), o > 1 && e.dpDiv.addClass(\"ui-datepicker-multi-\" + o).css(\"width\", r * o + \"em\"), e.dpDiv[(1 !== s[0] || 1 !== s[1] ? \"add\" : \"remove\") + \"Class\"](\"ui-datepicker-multi\"), e.dpDiv[(this._get(e, \"isRTL\") ? \"add\" : \"remove\") + \"Class\"](\"ui-datepicker-rtl\"), e === t.datepicker._curInst && t.datepicker._datepickerShowing && t.datepicker._shouldFocusInput(e) && e.input.trigger(\"focus\"), e.yearshtml && (i = e.yearshtml, setTimeout(function () {\n i === e.yearshtml && e.yearshtml && e.dpDiv.find(\"select.ui-datepicker-year:first\").replaceWith(e.yearshtml), i = e.yearshtml = null;\n }, 0));\n },\n _shouldFocusInput: function _shouldFocusInput(t) {\n return t.input && t.input.is(\":visible\") && !t.input.is(\":disabled\") && !t.input.is(\":focus\");\n },\n _checkOffset: function _checkOffset(e, i, s) {\n var n = e.dpDiv.outerWidth(),\n o = e.dpDiv.outerHeight(),\n a = e.input ? e.input.outerWidth() : 0,\n r = e.input ? e.input.outerHeight() : 0,\n l = document.documentElement.clientWidth + (s ? 0 : t(document).scrollLeft()),\n h = document.documentElement.clientHeight + (s ? 0 : t(document).scrollTop());\n return i.left -= this._get(e, \"isRTL\") ? n - a : 0, i.left -= s && i.left === e.input.offset().left ? t(document).scrollLeft() : 0, i.top -= s && i.top === e.input.offset().top + r ? t(document).scrollTop() : 0, i.left -= Math.min(i.left, i.left + n > l && l > n ? Math.abs(i.left + n - l) : 0), i.top -= Math.min(i.top, i.top + o > h && h > o ? Math.abs(o + r) : 0), i;\n },\n _findPos: function _findPos(e) {\n for (var i, s = this._getInst(e), n = this._get(s, \"isRTL\"); e && (\"hidden\" === e.type || 1 !== e.nodeType || t.expr.filters.hidden(e));) {\n e = e[n ? \"previousSibling\" : \"nextSibling\"];\n }\n\n return i = t(e).offset(), [i.left, i.top];\n },\n _hideDatepicker: function _hideDatepicker(e) {\n var i,\n s,\n n,\n o,\n a = this._curInst;\n !a || e && a !== t.data(e, \"datepicker\") || this._datepickerShowing && (i = this._get(a, \"showAnim\"), s = this._get(a, \"duration\"), n = function n() {\n t.datepicker._tidyDialog(a);\n }, t.effects && (t.effects.effect[i] || t.effects[i]) ? a.dpDiv.hide(i, t.datepicker._get(a, \"showOptions\"), s, n) : a.dpDiv[\"slideDown\" === i ? \"slideUp\" : \"fadeIn\" === i ? \"fadeOut\" : \"hide\"](i ? s : null, n), i || n(), this._datepickerShowing = !1, o = this._get(a, \"onClose\"), o && o.apply(a.input ? a.input[0] : null, [a.input ? a.input.val() : \"\", a]), this._lastInput = null, this._inDialog && (this._dialogInput.css({\n position: \"absolute\",\n left: \"0\",\n top: \"-100px\"\n }), t.blockUI && (t.unblockUI(), t(\"body\").append(this.dpDiv))), this._inDialog = !1);\n },\n _tidyDialog: function _tidyDialog(t) {\n t.dpDiv.removeClass(this._dialogClass).off(\".ui-datepicker-calendar\");\n },\n _checkExternalClick: function _checkExternalClick(e) {\n if (t.datepicker._curInst) {\n var i = t(e.target),\n s = t.datepicker._getInst(i[0]);\n\n (i[0].id !== t.datepicker._mainDivId && 0 === i.parents(\"#\" + t.datepicker._mainDivId).length && !i.hasClass(t.datepicker.markerClassName) && !i.closest(\".\" + t.datepicker._triggerClass).length && t.datepicker._datepickerShowing && (!t.datepicker._inDialog || !t.blockUI) || i.hasClass(t.datepicker.markerClassName) && t.datepicker._curInst !== s) && t.datepicker._hideDatepicker();\n }\n },\n _adjustDate: function _adjustDate(e, i, s) {\n var n = t(e),\n o = this._getInst(n[0]);\n\n this._isDisabledDatepicker(n[0]) || (this._adjustInstDate(o, i + (\"M\" === s ? this._get(o, \"showCurrentAtPos\") : 0), s), this._updateDatepicker(o));\n },\n _gotoToday: function _gotoToday(e) {\n var i,\n s = t(e),\n n = this._getInst(s[0]);\n\n this._get(n, \"gotoCurrent\") && n.currentDay ? (n.selectedDay = n.currentDay, n.drawMonth = n.selectedMonth = n.currentMonth, n.drawYear = n.selectedYear = n.currentYear) : (i = new Date(), n.selectedDay = i.getDate(), n.drawMonth = n.selectedMonth = i.getMonth(), n.drawYear = n.selectedYear = i.getFullYear()), this._notifyChange(n), this._adjustDate(s);\n },\n _selectMonthYear: function _selectMonthYear(e, i, s) {\n var n = t(e),\n o = this._getInst(n[0]);\n\n o[\"selected\" + (\"M\" === s ? \"Month\" : \"Year\")] = o[\"draw\" + (\"M\" === s ? \"Month\" : \"Year\")] = parseInt(i.options[i.selectedIndex].value, 10), this._notifyChange(o), this._adjustDate(n);\n },\n _selectDay: function _selectDay(e, i, s, n) {\n var o,\n a = t(e);\n t(n).hasClass(this._unselectableClass) || this._isDisabledDatepicker(a[0]) || (o = this._getInst(a[0]), o.selectedDay = o.currentDay = t(\"a\", n).html(), o.selectedMonth = o.currentMonth = i, o.selectedYear = o.currentYear = s, this._selectDate(e, this._formatDate(o, o.currentDay, o.currentMonth, o.currentYear)));\n },\n _clearDate: function _clearDate(e) {\n var i = t(e);\n\n this._selectDate(i, \"\");\n },\n _selectDate: function _selectDate(e, i) {\n var s,\n n = t(e),\n o = this._getInst(n[0]);\n\n i = null != i ? i : this._formatDate(o), o.input && o.input.val(i), this._updateAlternate(o), s = this._get(o, \"onSelect\"), s ? s.apply(o.input ? o.input[0] : null, [i, o]) : o.input && o.input.trigger(\"change\"), o.inline ? this._updateDatepicker(o) : (this._hideDatepicker(), this._lastInput = o.input[0], \"object\" != _typeof(o.input[0]) && o.input.trigger(\"focus\"), this._lastInput = null);\n },\n _updateAlternate: function _updateAlternate(e) {\n var i,\n s,\n n,\n o = this._get(e, \"altField\");\n\n o && (i = this._get(e, \"altFormat\") || this._get(e, \"dateFormat\"), s = this._getDate(e), n = this.formatDate(i, s, this._getFormatConfig(e)), t(o).val(n));\n },\n noWeekends: function noWeekends(t) {\n var e = t.getDay();\n return [e > 0 && 6 > e, \"\"];\n },\n iso8601Week: function iso8601Week(t) {\n var e,\n i = new Date(t.getTime());\n return i.setDate(i.getDate() + 4 - (i.getDay() || 7)), e = i.getTime(), i.setMonth(0), i.setDate(1), Math.floor(Math.round((e - i) / 864e5) / 7) + 1;\n },\n parseDate: function parseDate(e, i, s) {\n if (null == e || null == i) throw \"Invalid arguments\";\n if (i = \"object\" == _typeof(i) ? \"\" + i : i + \"\", \"\" === i) return null;\n\n var n,\n o,\n a,\n r,\n l = 0,\n h = (s ? s.shortYearCutoff : null) || this._defaults.shortYearCutoff,\n c = \"string\" != typeof h ? h : new Date().getFullYear() % 100 + parseInt(h, 10),\n u = (s ? s.dayNamesShort : null) || this._defaults.dayNamesShort,\n d = (s ? s.dayNames : null) || this._defaults.dayNames,\n p = (s ? s.monthNamesShort : null) || this._defaults.monthNamesShort,\n f = (s ? s.monthNames : null) || this._defaults.monthNames,\n g = -1,\n m = -1,\n _ = -1,\n v = -1,\n b = !1,\n y = function y(t) {\n var i = e.length > n + 1 && e.charAt(n + 1) === t;\n return i && n++, i;\n },\n w = function w(t) {\n var e = y(t),\n s = \"@\" === t ? 14 : \"!\" === t ? 20 : \"y\" === t && e ? 4 : \"o\" === t ? 3 : 2,\n n = \"y\" === t ? s : 1,\n o = RegExp(\"^\\\\d{\" + n + \",\" + s + \"}\"),\n a = i.substring(l).match(o);\n if (!a) throw \"Missing number at position \" + l;\n return l += a[0].length, parseInt(a[0], 10);\n },\n k = function k(e, s, n) {\n var o = -1,\n a = t.map(y(e) ? n : s, function (t, e) {\n return [[e, t]];\n }).sort(function (t, e) {\n return -(t[1].length - e[1].length);\n });\n if (t.each(a, function (t, e) {\n var s = e[1];\n return i.substr(l, s.length).toLowerCase() === s.toLowerCase() ? (o = e[0], l += s.length, !1) : void 0;\n }), -1 !== o) return o + 1;\n throw \"Unknown name at position \" + l;\n },\n x = function x() {\n if (i.charAt(l) !== e.charAt(n)) throw \"Unexpected literal at position \" + l;\n l++;\n };\n\n for (n = 0; e.length > n; n++) {\n if (b) \"'\" !== e.charAt(n) || y(\"'\") ? x() : b = !1;else switch (e.charAt(n)) {\n case \"d\":\n _ = w(\"d\");\n break;\n\n case \"D\":\n k(\"D\", u, d);\n break;\n\n case \"o\":\n v = w(\"o\");\n break;\n\n case \"m\":\n m = w(\"m\");\n break;\n\n case \"M\":\n m = k(\"M\", p, f);\n break;\n\n case \"y\":\n g = w(\"y\");\n break;\n\n case \"@\":\n r = new Date(w(\"@\")), g = r.getFullYear(), m = r.getMonth() + 1, _ = r.getDate();\n break;\n\n case \"!\":\n r = new Date((w(\"!\") - this._ticksTo1970) / 1e4), g = r.getFullYear(), m = r.getMonth() + 1, _ = r.getDate();\n break;\n\n case \"'\":\n y(\"'\") ? x() : b = !0;\n break;\n\n default:\n x();\n }\n }\n\n if (i.length > l && (a = i.substr(l), !/^\\s+/.test(a))) throw \"Extra/unparsed characters found in date: \" + a;\n if (-1 === g ? g = new Date().getFullYear() : 100 > g && (g += new Date().getFullYear() - new Date().getFullYear() % 100 + (c >= g ? 0 : -100)), v > -1) for (m = 1, _ = v;;) {\n if (o = this._getDaysInMonth(g, m - 1), o >= _) break;\n m++, _ -= o;\n }\n if (r = this._daylightSavingAdjust(new Date(g, m - 1, _)), r.getFullYear() !== g || r.getMonth() + 1 !== m || r.getDate() !== _) throw \"Invalid date\";\n return r;\n },\n ATOM: \"yy-mm-dd\",\n COOKIE: \"D, dd M yy\",\n ISO_8601: \"yy-mm-dd\",\n RFC_822: \"D, d M y\",\n RFC_850: \"DD, dd-M-y\",\n RFC_1036: \"D, d M y\",\n RFC_1123: \"D, d M yy\",\n RFC_2822: \"D, d M yy\",\n RSS: \"D, d M y\",\n TICKS: \"!\",\n TIMESTAMP: \"@\",\n W3C: \"yy-mm-dd\",\n _ticksTo1970: 1e7 * 60 * 60 * 24 * (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)),\n formatDate: function formatDate(t, e, i) {\n if (!e) return \"\";\n\n var s,\n n = (i ? i.dayNamesShort : null) || this._defaults.dayNamesShort,\n o = (i ? i.dayNames : null) || this._defaults.dayNames,\n a = (i ? i.monthNamesShort : null) || this._defaults.monthNamesShort,\n r = (i ? i.monthNames : null) || this._defaults.monthNames,\n l = function l(e) {\n var i = t.length > s + 1 && t.charAt(s + 1) === e;\n return i && s++, i;\n },\n h = function h(t, e, i) {\n var s = \"\" + e;\n if (l(t)) for (; i > s.length;) {\n s = \"0\" + s;\n }\n return s;\n },\n c = function c(t, e, i, s) {\n return l(t) ? s[e] : i[e];\n },\n u = \"\",\n d = !1;\n\n if (e) for (s = 0; t.length > s; s++) {\n if (d) \"'\" !== t.charAt(s) || l(\"'\") ? u += t.charAt(s) : d = !1;else switch (t.charAt(s)) {\n case \"d\":\n u += h(\"d\", e.getDate(), 2);\n break;\n\n case \"D\":\n u += c(\"D\", e.getDay(), n, o);\n break;\n\n case \"o\":\n u += h(\"o\", Math.round((new Date(e.getFullYear(), e.getMonth(), e.getDate()).getTime() - new Date(e.getFullYear(), 0, 0).getTime()) / 864e5), 3);\n break;\n\n case \"m\":\n u += h(\"m\", e.getMonth() + 1, 2);\n break;\n\n case \"M\":\n u += c(\"M\", e.getMonth(), a, r);\n break;\n\n case \"y\":\n u += l(\"y\") ? e.getFullYear() : (10 > e.getFullYear() % 100 ? \"0\" : \"\") + e.getFullYear() % 100;\n break;\n\n case \"@\":\n u += e.getTime();\n break;\n\n case \"!\":\n u += 1e4 * e.getTime() + this._ticksTo1970;\n break;\n\n case \"'\":\n l(\"'\") ? u += \"'\" : d = !0;\n break;\n\n default:\n u += t.charAt(s);\n }\n }\n return u;\n },\n _possibleChars: function _possibleChars(t) {\n var e,\n i = \"\",\n s = !1,\n n = function n(i) {\n var s = t.length > e + 1 && t.charAt(e + 1) === i;\n return s && e++, s;\n };\n\n for (e = 0; t.length > e; e++) {\n if (s) \"'\" !== t.charAt(e) || n(\"'\") ? i += t.charAt(e) : s = !1;else switch (t.charAt(e)) {\n case \"d\":\n case \"m\":\n case \"y\":\n case \"@\":\n i += \"0123456789\";\n break;\n\n case \"D\":\n case \"M\":\n return null;\n\n case \"'\":\n n(\"'\") ? i += \"'\" : s = !0;\n break;\n\n default:\n i += t.charAt(e);\n }\n }\n\n return i;\n },\n _get: function _get(t, e) {\n return void 0 !== t.settings[e] ? t.settings[e] : this._defaults[e];\n },\n _setDateFromField: function _setDateFromField(t, e) {\n if (t.input.val() !== t.lastVal) {\n var i = this._get(t, \"dateFormat\"),\n s = t.lastVal = t.input ? t.input.val() : null,\n n = this._getDefaultDate(t),\n o = n,\n a = this._getFormatConfig(t);\n\n try {\n o = this.parseDate(i, s, a) || n;\n } catch (r) {\n s = e ? \"\" : s;\n }\n\n t.selectedDay = o.getDate(), t.drawMonth = t.selectedMonth = o.getMonth(), t.drawYear = t.selectedYear = o.getFullYear(), t.currentDay = s ? o.getDate() : 0, t.currentMonth = s ? o.getMonth() : 0, t.currentYear = s ? o.getFullYear() : 0, this._adjustInstDate(t);\n }\n },\n _getDefaultDate: function _getDefaultDate(t) {\n return this._restrictMinMax(t, this._determineDate(t, this._get(t, \"defaultDate\"), new Date()));\n },\n _determineDate: function _determineDate(e, i, s) {\n var n = function n(t) {\n var e = new Date();\n return e.setDate(e.getDate() + t), e;\n },\n o = function o(i) {\n try {\n return t.datepicker.parseDate(t.datepicker._get(e, \"dateFormat\"), i, t.datepicker._getFormatConfig(e));\n } catch (s) {}\n\n for (var n = (i.toLowerCase().match(/^c/) ? t.datepicker._getDate(e) : null) || new Date(), o = n.getFullYear(), a = n.getMonth(), r = n.getDate(), l = /([+\\-]?[0-9]+)\\s*(d|D|w|W|m|M|y|Y)?/g, h = l.exec(i); h;) {\n switch (h[2] || \"d\") {\n case \"d\":\n case \"D\":\n r += parseInt(h[1], 10);\n break;\n\n case \"w\":\n case \"W\":\n r += 7 * parseInt(h[1], 10);\n break;\n\n case \"m\":\n case \"M\":\n a += parseInt(h[1], 10), r = Math.min(r, t.datepicker._getDaysInMonth(o, a));\n break;\n\n case \"y\":\n case \"Y\":\n o += parseInt(h[1], 10), r = Math.min(r, t.datepicker._getDaysInMonth(o, a));\n }\n\n h = l.exec(i);\n }\n\n return new Date(o, a, r);\n },\n a = null == i || \"\" === i ? s : \"string\" == typeof i ? o(i) : \"number\" == typeof i ? isNaN(i) ? s : n(i) : new Date(i.getTime());\n\n return a = a && \"Invalid Date\" == \"\" + a ? s : a, a && (a.setHours(0), a.setMinutes(0), a.setSeconds(0), a.setMilliseconds(0)), this._daylightSavingAdjust(a);\n },\n _daylightSavingAdjust: function _daylightSavingAdjust(t) {\n return t ? (t.setHours(t.getHours() > 12 ? t.getHours() + 2 : 0), t) : null;\n },\n _setDate: function _setDate(t, e, i) {\n var s = !e,\n n = t.selectedMonth,\n o = t.selectedYear,\n a = this._restrictMinMax(t, this._determineDate(t, e, new Date()));\n\n t.selectedDay = t.currentDay = a.getDate(), t.drawMonth = t.selectedMonth = t.currentMonth = a.getMonth(), t.drawYear = t.selectedYear = t.currentYear = a.getFullYear(), n === t.selectedMonth && o === t.selectedYear || i || this._notifyChange(t), this._adjustInstDate(t), t.input && t.input.val(s ? \"\" : this._formatDate(t));\n },\n _getDate: function _getDate(t) {\n var e = !t.currentYear || t.input && \"\" === t.input.val() ? null : this._daylightSavingAdjust(new Date(t.currentYear, t.currentMonth, t.currentDay));\n return e;\n },\n _attachHandlers: function _attachHandlers(e) {\n var i = this._get(e, \"stepMonths\"),\n s = \"#\" + e.id.replace(/\\\\\\\\/g, \"\\\\\");\n\n e.dpDiv.find(\"[data-handler]\").map(function () {\n var e = {\n prev: function prev() {\n t.datepicker._adjustDate(s, -i, \"M\");\n },\n next: function next() {\n t.datepicker._adjustDate(s, +i, \"M\");\n },\n hide: function hide() {\n t.datepicker._hideDatepicker();\n },\n today: function today() {\n t.datepicker._gotoToday(s);\n },\n selectDay: function selectDay() {\n return t.datepicker._selectDay(s, +this.getAttribute(\"data-month\"), +this.getAttribute(\"data-year\"), this), !1;\n },\n selectMonth: function selectMonth() {\n return t.datepicker._selectMonthYear(s, this, \"M\"), !1;\n },\n selectYear: function selectYear() {\n return t.datepicker._selectMonthYear(s, this, \"Y\"), !1;\n }\n };\n t(this).on(this.getAttribute(\"data-event\"), e[this.getAttribute(\"data-handler\")]);\n });\n },\n _generateHTML: function _generateHTML(t) {\n var e,\n i,\n s,\n n,\n o,\n a,\n r,\n l,\n h,\n c,\n u,\n d,\n p,\n f,\n g,\n m,\n _,\n v,\n b,\n y,\n w,\n k,\n x,\n C,\n D,\n T,\n I,\n M,\n P,\n S,\n N,\n H,\n A,\n z,\n O,\n E,\n W,\n F,\n L,\n R = new Date(),\n Y = this._daylightSavingAdjust(new Date(R.getFullYear(), R.getMonth(), R.getDate())),\n B = this._get(t, \"isRTL\"),\n j = this._get(t, \"showButtonPanel\"),\n q = this._get(t, \"hideIfNoPrevNext\"),\n K = this._get(t, \"navigationAsDateFormat\"),\n U = this._getNumberOfMonths(t),\n V = this._get(t, \"showCurrentAtPos\"),\n X = this._get(t, \"stepMonths\"),\n $ = 1 !== U[0] || 1 !== U[1],\n G = this._daylightSavingAdjust(t.currentDay ? new Date(t.currentYear, t.currentMonth, t.currentDay) : new Date(9999, 9, 9)),\n J = this._getMinMaxDate(t, \"min\"),\n Q = this._getMinMaxDate(t, \"max\"),\n Z = t.drawMonth - V,\n te = t.drawYear;\n\n if (0 > Z && (Z += 12, te--), Q) for (e = this._daylightSavingAdjust(new Date(Q.getFullYear(), Q.getMonth() - U[0] * U[1] + 1, Q.getDate())), e = J && J > e ? J : e; this._daylightSavingAdjust(new Date(te, Z, 1)) > e;) {\n Z--, 0 > Z && (Z = 11, te--);\n }\n\n for (t.drawMonth = Z, t.drawYear = te, i = this._get(t, \"prevText\"), i = K ? this.formatDate(i, this._daylightSavingAdjust(new Date(te, Z - X, 1)), this._getFormatConfig(t)) : i, s = this._canAdjustMonth(t, -1, te, Z) ? \"\" + i + \"\" : q ? \"\" : \"\" + i + \"\", n = this._get(t, \"nextText\"), n = K ? this.formatDate(n, this._daylightSavingAdjust(new Date(te, Z + X, 1)), this._getFormatConfig(t)) : n, o = this._canAdjustMonth(t, 1, te, Z) ? \"\" + n + \"\" : q ? \"\" : \"\" + n + \"\", a = this._get(t, \"currentText\"), r = this._get(t, \"gotoCurrent\") && t.currentDay ? G : Y, a = K ? this.formatDate(a, r, this._getFormatConfig(t)) : a, l = t.inline ? \"\" : \"\", h = j ? \"
\" : \"\", c = parseInt(this._get(t, \"firstDay\"), 10), c = isNaN(c) ? 0 : c, u = this._get(t, \"showWeek\"), d = this._get(t, \"dayNames\"), p = this._get(t, \"dayNamesMin\"), f = this._get(t, \"monthNames\"), g = this._get(t, \"monthNamesShort\"), m = this._get(t, \"beforeShowDay\"), _ = this._get(t, \"showOtherMonths\"), v = this._get(t, \"selectOtherMonths\"), b = this._getDefaultDate(t), y = \"\", k = 0; U[0] > k; k++) {\n for (x = \"\", this.maxRows = 4, C = 0; U[1] > C; C++) {\n if (D = this._daylightSavingAdjust(new Date(te, Z, t.selectedDay)), T = \" ui-corner-all\", I = \"\", $) {\n if (I += \"
\";\n }\n\n for (I += \"
\" + (/all|left/.test(T) && 0 === k ? B ? o : s : \"\") + (/all|right/.test(T) && 0 === k ? B ? s : o : \"\") + this._generateMonthYearHeader(t, Z, te, J, Q, k > 0 || C > 0, f, g) + \"
\" + \"
\", M = u ? \"
\" + this._get(t, \"weekHeader\") + \"
\" : \"\", w = 0; 7 > w; w++) {\n P = (w + c) % 7, M += \"
\", S = this._getDaysInMonth(te, Z), te === t.selectedYear && Z === t.selectedMonth && (t.selectedDay = Math.min(t.selectedDay, S)), N = (this._getFirstDayOfMonth(te, Z) - c + 7) % 7, H = Math.ceil((N + S) / 7), A = $ ? this.maxRows > H ? this.maxRows : H : H, this.maxRows = A, z = this._daylightSavingAdjust(new Date(te, Z, 1 - N)), O = 0; A > O; O++) {\n for (I += \"
\", E = u ? \"
\" + this._get(t, \"calculateWeek\")(z) + \"
\" : \"\", w = 0; 7 > w; w++) {\n W = m ? m.apply(t.input ? t.input[0] : null, [z]) : [!0, \"\"], F = z.getMonth() !== Z, L = F && !v || !W[0] || J && J > z || Q && z > Q, E += \"
\", z.setDate(z.getDate() + 1), z = this._daylightSavingAdjust(z);\n }\n\n I += E + \"
\";\n }\n\n Z++, Z > 11 && (Z = 0, te++), I += \"
\" + ($ ? \"
\" + (U[0] > 0 && C === U[1] - 1 ? \"\" : \"\") : \"\"), x += I;\n }\n\n y += x;\n }\n\n return y += h, t._keyEvent = !1, y;\n },\n _generateMonthYearHeader: function _generateMonthYearHeader(t, e, i, s, n, o, a, r) {\n var l,\n h,\n c,\n u,\n d,\n p,\n f,\n g,\n m = this._get(t, \"changeMonth\"),\n _ = this._get(t, \"changeYear\"),\n v = this._get(t, \"showMonthAfterYear\"),\n b = \"
\",\n y = \"\";\n\n if (o || !m) y += \"\" + a[e] + \"\";else {\n for (l = s && s.getFullYear() === i, h = n && n.getFullYear() === i, y += \"\";\n }\n if (v || (b += y + (!o && m && _ ? \"\" : \" \")), !t.yearshtml) if (t.yearshtml = \"\", o || !_) b += \"\" + i + \"\";else {\n for (u = this._get(t, \"yearRange\").split(\":\"), d = new Date().getFullYear(), p = function p(t) {\n var e = t.match(/c[+\\-].*/) ? i + parseInt(t.substring(1), 10) : t.match(/[+\\-].*/) ? d + parseInt(t, 10) : parseInt(t, 10);\n return isNaN(e) ? d : e;\n }, f = p(u[0]), g = Math.max(f, p(u[1] || \"\")), f = s ? Math.max(f, s.getFullYear()) : f, g = n ? Math.min(g, n.getFullYear()) : g, t.yearshtml += \"\", b += t.yearshtml, t.yearshtml = null;\n }\n return b += this._get(t, \"yearSuffix\"), v && (b += (!o && m && _ ? \"\" : \" \") + y), b += \"
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/checkboxGroup/switch.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/classNames.js":
/*!*************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/classNames.js ***!
\*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Class Names\r\n */\r\nvar ClassNames = /** @class */ (function () {\r\n // Constructor\r\n function ClassNames(items) {\r\n this._items = null;\r\n // Set the items\r\n this._items = items || [];\r\n }\r\n // Gets a class name by type\r\n // The enumerator value is equal to the index + 1\r\n ClassNames.prototype.getByType = function (type) { return this._items[type - 1]; };\r\n // Parse the class names\r\n ClassNames.prototype.parse = function (callback) {\r\n // Parse the items\r\n for (var i = 0; i < this._items.length; i++) {\r\n // Call the callback\r\n callback(this._items[i]);\r\n }\r\n };\r\n return ClassNames;\r\n}());\r\nexports.ClassNames = ClassNames;\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/classNames.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/collapse/index.html.js":
/*!**********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/collapse/index.html.js ***!
\**********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\r\n \r\n
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/collapse/index.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/collapse/index.js":
/*!*****************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/collapse/index.js ***!
\*****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n__webpack_require__(/*! bootstrap/js/dist/collapse */ \"./node_modules/.pnpm/registry.npmjs.org/bootstrap/4.5.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/collapse.js\");\r\nvar core_1 = __webpack_require__(/*! ../../core */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/core.js\");\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar HTML = __webpack_require__(/*! ./index.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/collapse/index.html.js\");\r\n/**\r\n * Collapse\r\n */\r\nvar _Collapse = /** @class */ (function (_super) {\r\n __extends(_Collapse, _super);\r\n // Constructor\r\n function _Collapse(props) {\r\n var _this = _super.call(this, HTML, props) || this;\r\n // Configure the collapse\r\n _this.configure();\r\n // Configure the parent\r\n _this.configureParent();\r\n // Create the collapse\r\n _this._bootstrapObj = core_1.jQuery ? core_1.jQuery(_this.el).collapse(_this.props.options || {}) : null;\r\n return _this;\r\n }\r\n // Configure the card group\r\n _Collapse.prototype.configure = function () {\r\n // Set the attributes\r\n this.props.id ? this.el.id = this.props.id : null;\r\n this.props.isMulti ? this.el.classList.add(\"multi-collapse\") : null;\r\n // Set the content\r\n var content = this.props.content || \"\";\r\n var body = this.el.querySelector(\".card\");\r\n if (typeof (content) === \"string\") {\r\n // Set the html\r\n body.innerHTML = content;\r\n }\r\n else {\r\n // Append the element\r\n body.appendChild(content);\r\n }\r\n // Execute the render event\r\n this.props.onRender ? this.props.onRender(this.props, body) : null;\r\n };\r\n /**\r\n * Bootstrap\r\n */\r\n // Disposes the collapse\r\n _Collapse.prototype.dispose = function () { this._bootstrapObj ? this._bootstrapObj.collapse(\"dispose\") : null; };\r\n // Toggles the component\r\n _Collapse.prototype.toggle = function () { this._bootstrapObj ? this._bootstrapObj.collapse(\"toggle\") : null; };\r\n return _Collapse;\r\n}(base_1.Base));\r\nexports.Collapse = function (props) { return new _Collapse(props); };\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/collapse/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/form.html.js":
/*!*********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/form.html.js ***!
\*********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\r\n \r\n \r\n
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/form.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/formItem.js":
/*!********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/formItem.js ***!
\********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Dropdown Form Item\r\n */\r\nvar DropdownFormItem = /** @class */ (function () {\r\n // Constructor\r\n function DropdownFormItem(props, parent) {\r\n this._el = null;\r\n this._isSelected = false;\r\n this._parent = null;\r\n this._props = null;\r\n // Save the properties\r\n this._parent = parent;\r\n this._props = props;\r\n // Configure the item\r\n this.configure();\r\n }\r\n // Configures the item\r\n DropdownFormItem.prototype.configure = function () {\r\n // See if this is a divider\r\n if (this._props.isDivider) {\r\n // Create the divider\r\n this._el = document.createElement(\"optgroup\");\r\n this._el.className = this._props.className || \"\";\r\n this._el.classList.add(\"dropdown-divider\");\r\n }\r\n // Else, see if this is a header\r\n else if (this._props.isHeader) {\r\n // Create the header\r\n this._el = document.createElement(\"optgroup\");\r\n this._el.className = this._props.className || \"\";\r\n this._el.classList.add(\"dropdown-header\");\r\n this._el.label = this._props.text == null ? \"\" : this._props.text;\r\n }\r\n else {\r\n // Create the option\r\n this._el = document.createElement(\"option\");\r\n this._el.className = this._props.className || \"\";\r\n this._el.disabled = this._props.isDisabled ? true : false;\r\n this._el.innerHTML = this._props.text == null ? \"\" : this._props.text;\r\n // See if the item is selected\r\n if (this._props.isSelected) {\r\n // Select the option\r\n this._el.selected = true;\r\n }\r\n // Else, see if a value exists\r\n else if (typeof (this._parent.value) !== \"undefined\") {\r\n // Ensure it's an array\r\n var values = this._parent.value && this._parent.value.length && typeof (this._parent.value) !== \"string\" ? this._parent.value : [this._parent.value];\r\n // Parse the values\r\n for (var i = 0; i < values.length; i++) {\r\n var value = typeof (this._props.value) === \"undefined\" ? this._props.text : this._props.value;\r\n // See if this item is selected\r\n if (value == values[i]) {\r\n // Select the option\r\n this._el.selected = true;\r\n break;\r\n }\r\n }\r\n }\r\n // Set the flag\r\n this._isSelected = this._el.selected;\r\n }\r\n };\r\n Object.defineProperty(DropdownFormItem.prototype, \"el\", {\r\n /**\r\n * Public Interface\r\n */\r\n // The component HTML element\r\n get: function () { return this._el; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DropdownFormItem.prototype, \"isSelected\", {\r\n // Returns true if the item is selected\r\n get: function () { return this._isSelected; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DropdownFormItem.prototype, \"props\", {\r\n // The component properties\r\n get: function () { return this._props; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n // Toggles the item selection\r\n DropdownFormItem.prototype.toggle = function () {\r\n // Skip the dividers, headers\r\n if (this._props.isDivider || this._props.isHeader) {\r\n return;\r\n }\r\n // Update the selected flag\r\n this._isSelected = !this._isSelected;\r\n var option = this._el;\r\n // See if the value needs to be updated\r\n if (option.selected != this._isSelected) {\r\n // Update the option\r\n option.selected = this._isSelected;\r\n }\r\n };\r\n return DropdownFormItem;\r\n}());\r\nexports.DropdownFormItem = DropdownFormItem;\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/formItem.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/index.html.js":
/*!**********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/index.html.js ***!
\**********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\r\n \r\n \r\n
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/index.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/index.js":
/*!*****************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/index.js ***!
\*****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n__webpack_require__(/*! bootstrap/js/dist/dropdown */ \"./node_modules/.pnpm/registry.npmjs.org/bootstrap/4.5.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/dropdown.js\");\r\n__webpack_require__(/*! popper.js */ \"./node_modules/.pnpm/registry.npmjs.org/popper.js/1.16.1/node_modules/popper.js/dist/esm/popper.js\");\r\nvar core_1 = __webpack_require__(/*! ../../core */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/core.js\");\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar button_1 = __webpack_require__(/*! ../button */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/button/index.js\");\r\nvar formItem_1 = __webpack_require__(/*! ./formItem */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/formItem.js\");\r\nvar item_1 = __webpack_require__(/*! ./item */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/item.js\");\r\nvar HTML = __webpack_require__(/*! ./index.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/index.html.js\");\r\nvar HTMLForm = __webpack_require__(/*! ./form.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/form.html.js\");\r\nvar HTMLNav = __webpack_require__(/*! ./nav.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/nav.html.js\");\r\nvar HTMLSplit = __webpack_require__(/*! ./split.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/split.html.js\");\r\n/**\r\n * Dropdown Types\r\n */\r\nvar DropdownTypes;\r\n(function (DropdownTypes) {\r\n DropdownTypes[DropdownTypes[\"Danger\"] = 1] = \"Danger\";\r\n DropdownTypes[DropdownTypes[\"Info\"] = 2] = \"Info\";\r\n DropdownTypes[DropdownTypes[\"Primary\"] = 3] = \"Primary\";\r\n DropdownTypes[DropdownTypes[\"Secondary\"] = 4] = \"Secondary\";\r\n DropdownTypes[DropdownTypes[\"Success\"] = 5] = \"Success\";\r\n DropdownTypes[DropdownTypes[\"Warning\"] = 6] = \"Warning\";\r\n})(DropdownTypes = exports.DropdownTypes || (exports.DropdownTypes = {}));\r\n// Gets the template\r\nvar GetHTML = function (props) {\r\n // See if we are rendering items for a form\r\n if (props.formFl) {\r\n return HTMLForm;\r\n }\r\n // See if we are rendering for a nav bar\r\n if (props.navFl) {\r\n return HTMLNav;\r\n }\r\n // See if we are rendering a split button dropdown\r\n if (props.isSplit) {\r\n return HTMLSplit;\r\n }\r\n // Return the default template\r\n return HTML;\r\n};\r\n/**\r\n * Dropdown\r\n * @property props - The dropdown properties.\r\n */\r\nvar _Dropdown = /** @class */ (function (_super) {\r\n __extends(_Dropdown, _super);\r\n // Constructor\r\n function _Dropdown(props) {\r\n var _this = _super.call(this, GetHTML(props), props) || this;\r\n _this._items = null;\r\n // Configure the dropdown\r\n _this.configure();\r\n // Configure the events\r\n _this.configureEvents();\r\n // Configure the parent\r\n _this.configureParent();\r\n // Create the bootstrap object\r\n _this._bootstrapObj = core_1.jQuery ? core_1.jQuery(_this.el) : null;\r\n return _this;\r\n }\r\n // Configure the card group\r\n _Dropdown.prototype.configure = function () {\r\n // See if this is for a form\r\n if (this.props.formFl) {\r\n // Configure the dropdown for a form\r\n this.configureForm();\r\n }\r\n // Else, see if this is for a nav bar\r\n else if (this.props.navFl) {\r\n // Configure the dropdown for a nav bar\r\n this.configureNavBar();\r\n }\r\n else {\r\n // Configure the dropdown\r\n this.configureDefault();\r\n }\r\n // Render the items\r\n this.renderItems();\r\n // See if we are only rendering a menu\r\n if (this.props.menuOnly) {\r\n // Update the element\r\n this.el = this.el.querySelector(\".dropdown-menu\");\r\n }\r\n };\r\n // Configures the dropdown\r\n _Dropdown.prototype.configureDefault = function () {\r\n // Set the attributes\r\n this.el.title = this.props.title == null ? \"\" : this.props.title;\r\n this.props.dropLeft ? this.el.classList.add(\"dropleft\") : null;\r\n this.props.dropRight ? this.el.classList.add(\"dropright\") : null;\r\n this.props.dropUp ? this.el.classList.add(\"dropup\") : null;\r\n // Set the type\r\n var btnType = button_1.ButtonClassNames.getByType(this.props.type) || button_1.ButtonClassNames.getByType(button_1.ButtonTypes.Primary);\r\n // See if this is a split button\r\n if (this.props.isSplit) {\r\n // Update a label\r\n var label = this.el.querySelector(\"button\");\r\n label.classList.add(btnType);\r\n label.disabled = this.props.isReadonly ? true : false;\r\n label.innerHTML = this.props.label == null ? \"\" : this.props.label;\r\n // Set the click event to disable the postback\r\n label.addEventListener(\"click\", function (ev) { ev.preventDefault(); });\r\n }\r\n else {\r\n // Update the label\r\n var label = this.el.querySelector(\".dropdown-toggle\");\r\n label.innerHTML = this.props.label == null ? \"\" : this.props.label;\r\n }\r\n // Update the dropdown\r\n var dropdown = this.el.querySelector(\".dropdown-toggle\");\r\n dropdown.classList.add(btnType);\r\n dropdown.disabled = this.props.isReadonly ? true : false;\r\n // See if we are rendering the menu only\r\n var menu = this.el.querySelector(\".dropdown-menu\");\r\n if (this.props.menuOnly) {\r\n // Update the menu\r\n this.props.id ? menu.id = this.props.id : null;\r\n menu.className = this.props.className ? this.props.className : \"\";\r\n menu.classList.add(\"dropdown-menu\");\r\n }\r\n else {\r\n // Update the menu\r\n this.props.id ? menu.setAttribute(\"aria-labelledby\", this.props.id) : null;\r\n }\r\n };\r\n // Configure the events\r\n _Dropdown.prototype.configureEvents = function () {\r\n var _this = this;\r\n // See if this is a select element and a change event exists\r\n var menu = this.el.querySelector(\"select\");\r\n if (menu) {\r\n // See if multiple options are allowed\r\n if (this.props.multi == true) {\r\n // Add a scroll event\r\n menu.addEventListener(\"click\", function (ev) {\r\n var selectedIdx = -1;\r\n // Get the mouse position\r\n var xPos = ev.clientX;\r\n var yPos = ev.clientY;\r\n // Parse the items\r\n for (var i = 0; i < _this._items.length; i++) {\r\n var item = _this._items[i];\r\n var itemPos = item.el.getBoundingClientRect();\r\n // See if this item was selected\r\n if (xPos >= itemPos.left && xPos <= itemPos.right &&\r\n yPos >= itemPos.top && yPos <= itemPos.bottom) {\r\n // Set the index\r\n selectedIdx = i;\r\n // Toggle the item\r\n item.toggle();\r\n // Break from the loop\r\n break;\r\n }\r\n }\r\n // See if an item was selected\r\n if (selectedIdx >= 0) {\r\n // Parse the items\r\n for (var i = 0; i < _this._items.length; i++) {\r\n var item = _this._items[i];\r\n // Skip the selected item\r\n if (selectedIdx == i) {\r\n continue;\r\n }\r\n // See if this item was selected\r\n if (item.isSelected) {\r\n // Ensure the element is still selected\r\n item.el.selected = true;\r\n }\r\n }\r\n // Call the change event\r\n _this.props.onChange ? _this.props.onChange(_this.getValue(), ev) : null;\r\n }\r\n });\r\n }\r\n else {\r\n // Add a change event\r\n menu.addEventListener(\"change\", function (ev) {\r\n // Parse the items\r\n for (var i = 0; i < _this._items.length; i++) {\r\n var item = _this._items[i];\r\n // See if this item was selected\r\n if (ev.target.value == item.props.text) {\r\n // Ensure this item is selected\r\n if (!item.isSelected) {\r\n item.toggle();\r\n }\r\n // Call the change event\r\n _this.props.onChange ? _this.props.onChange(item.props, ev) : null;\r\n }\r\n else {\r\n // Unselect the other values\r\n if (item.isSelected) {\r\n item.toggle();\r\n }\r\n }\r\n }\r\n });\r\n }\r\n }\r\n };\r\n // Configures the dropdown for a form\r\n _Dropdown.prototype.configureForm = function () {\r\n // Configure the label\r\n var elLabel = this.el.querySelector(\"label\");\r\n var label = this.props.label == null ? \"\" : this.props.label;\r\n if (label) {\r\n // Set the label\r\n elLabel.innerHTML = label;\r\n }\r\n else {\r\n // Remove the label\r\n elLabel.remove();\r\n }\r\n // Update the dropdown\r\n var dropdown = this.el.querySelector(\"select\");\r\n dropdown.className = this.props.className || \"\";\r\n dropdown.classList.add(\"form-control\");\r\n dropdown.disabled = this.props.isReadonly ? true : false;\r\n dropdown.multiple = this.props.multi ? true : false;\r\n dropdown.title = this.props.title == null ? \"\" : this.props.title;\r\n };\r\n // Configure the item events\r\n _Dropdown.prototype.configureItemEvents = function (item) {\r\n var _this = this;\r\n // Ensure this isn't a header/divider\r\n if (item.props.isDivider || item.props.isHeader) {\r\n return;\r\n }\r\n // See if multi selections is not allowed\r\n if (this.props.multi != true) {\r\n // Add a click event\r\n item.el.addEventListener(\"click\", function (ev) {\r\n // Parse the items\r\n for (var i = 0; i < _this._items.length; i++) {\r\n var selectedItem = _this._items[i];\r\n // Skip this item\r\n if (item.el.innerHTML == selectedItem.el.innerHTML) {\r\n continue;\r\n }\r\n // Ensure this item is selected\r\n if (selectedItem.isSelected) {\r\n // Unselect the item\r\n selectedItem.toggle();\r\n }\r\n }\r\n });\r\n }\r\n // See if there is a change event\r\n if (this.props.onChange) {\r\n // Add a click event\r\n item.el.addEventListener(\"click\", function (ev) {\r\n // Execute the event\r\n _this.props.onChange(_this.getValue(), ev);\r\n });\r\n }\r\n };\r\n // Configures the dropdown for a nav bar\r\n _Dropdown.prototype.configureNavBar = function () {\r\n // Update the link\r\n var link = this.el.querySelector(\"a\");\r\n link.id = \"navbarDDL_\" + (this.props.label == null ? \"\" : this.props.label);\r\n link.title = this.props.title == null ? \"\" : this.props.title;\r\n this.props.isReadonly ? link.setAttribute(\"aria-disabled\", \"true\") : null;\r\n link.innerHTML = this.props.label == null ? \"\" : this.props.label;\r\n // See if we are rendering the menu only\r\n var menu = this.el.querySelector(\".dropdown-menu\");\r\n if (this.props.menuOnly) {\r\n // Update the menu\r\n this.props.id ? menu.id = this.props.id : null;\r\n menu.className = this.props.className ? this.props.className : \"\";\r\n menu.classList.add(\"dropdown-menu\");\r\n }\r\n else {\r\n // Update the menu\r\n this.props.id ? menu.setAttribute(\"aria-labelledby\", this.props.id) : null;\r\n }\r\n };\r\n // Renders the items\r\n _Dropdown.prototype.renderItems = function () {\r\n // Clear the items\r\n this._items = [];\r\n // Get the menu\r\n var menu = this.el.querySelector(\".dropdown-menu\") || this.el.querySelector(\"select\");\r\n var isForm = menu.nodeName == \"SELECT\";\r\n // Parse the items\r\n var items = this.props.items || [];\r\n for (var i = 0; i < items.length; i++) {\r\n // Create the item\r\n var item = isForm ? new formItem_1.DropdownFormItem(items[i], this.props) : new item_1.DropdownItem(items[i], this.props);\r\n this._items.push(item);\r\n // See if this isn't for a form\r\n if (!isForm) {\r\n // Configure the item events\r\n this.configureItemEvents(item);\r\n }\r\n // Add the item to the menu\r\n menu.appendChild(item.el);\r\n }\r\n // See if this is a form\r\n if (isForm) {\r\n // Ensure the selected values match the index\r\n var idx = menu.selectedIndex;\r\n if (this._items[idx] && this._items[idx].isSelected == false) {\r\n // Select the item\r\n this._items[idx].toggle();\r\n }\r\n }\r\n };\r\n /**\r\n * Bootstrap\r\n */\r\n // Disposes the dropdown\r\n _Dropdown.prototype.dispose = function () { this._bootstrapObj ? this._bootstrapObj.dropdown(\"dispose\") : null; };\r\n // Toggles the menu\r\n _Dropdown.prototype.toggle = function () { this._bootstrapObj ? this._bootstrapObj.dropdown(\"toggle\") : null; };\r\n // Updates the dropdown\r\n _Dropdown.prototype.update = function () { this._bootstrapObj ? this._bootstrapObj.dropdown(\"update\") : null; };\r\n /**\r\n * Public Interface\r\n */\r\n // Gets the value\r\n _Dropdown.prototype.getValue = function () {\r\n var values = [];\r\n // Parse the items\r\n for (var i = 0; i < this._items.length; i++) {\r\n var item = this._items[i];\r\n // See if this item is selected\r\n if (item.isSelected) {\r\n // Add the value\r\n values.push(item.props);\r\n }\r\n }\r\n // Return the value\r\n return this.props.multi ? values : values[0];\r\n };\r\n Object.defineProperty(_Dropdown.prototype, \"isMulti\", {\r\n // Returns true if the dropdown allows multiple selections\r\n get: function () { return this.props.multi; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n // Sets the dropdown items\r\n _Dropdown.prototype.setItems = function (newItems) {\r\n if (newItems === void 0) { newItems = []; }\r\n // Update the properties\r\n this.props.items = newItems;\r\n // Get the menu\r\n var menu = this.el.querySelector(\".dropdown-menu\") || this.el.querySelector(\"select\");\r\n // Clear the menu\r\n while (menu.firstChild) {\r\n menu.removeChild(menu.firstChild);\r\n }\r\n // Render the items\r\n this.renderItems();\r\n };\r\n // Sets the dropdown value\r\n _Dropdown.prototype.setValue = function (value) {\r\n // Ensure it's an array\r\n var values = value == null ? [] : (typeof (value.length) === \"number\" && typeof (value) !== \"string\" ? value : [value]);\r\n // Parse the items\r\n for (var i = 0; i < this._items.length; i++) {\r\n var item = this._items[i];\r\n // Toggle checked items\r\n item.isSelected ? item.toggle() : null;\r\n }\r\n // Parse the values\r\n for (var i = 0; i < values.length; i++) {\r\n var value_1 = values[i];\r\n var ddlText = value_1 ? value_1.text || value_1 : null;\r\n var ddlValue = value_1 ? value_1.value || value_1 : null;\r\n // Parse the items\r\n for (var j = 0; j < this._items.length; j++) {\r\n var item = this._items[j];\r\n // See if this is the target item\r\n if (typeof (item.props.value) === \"undefined\") {\r\n // Select this item if the text matches\r\n item.props.text == ddlText ? item.toggle() : null;\r\n }\r\n else {\r\n // Select this item if the value matches\r\n item.props.value == ddlValue ? item.toggle() : null;\r\n }\r\n }\r\n }\r\n // See if this is a form\r\n var ddl = this.el.querySelector(\"select\");\r\n if (ddl) {\r\n // Ensure the selected values match the index\r\n if (this._items[ddl.selectedIndex] && this._items[ddl.selectedIndex].isSelected == false) {\r\n // Select the item\r\n this._items[ddl.selectedIndex].toggle();\r\n }\r\n }\r\n };\r\n return _Dropdown;\r\n}(base_1.Base));\r\nexports.Dropdown = function (props) { return new _Dropdown(props); };\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/item.js":
/*!****************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/item.js ***!
\****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Dropdown Item\r\n */\r\nvar DropdownItem = /** @class */ (function () {\r\n // Constructor\r\n function DropdownItem(props, parent) {\r\n this._el = null;\r\n this._isSelected = false;\r\n this._parent = null;\r\n this._props = null;\r\n // Save the properties\r\n this._parent = parent;\r\n this._props = props;\r\n // Configure the item\r\n this.configure();\r\n // Configure the events\r\n this.configureEvents();\r\n }\r\n // Configures the item\r\n DropdownItem.prototype.configure = function () {\r\n // See if this is a divider\r\n if (this._props.isDivider) {\r\n // Add the divider\r\n this._el = document.createElement(\"div\");\r\n this._el.className = this._props.className || \"\";\r\n this._el.classList.add(\"dropdown-divider\");\r\n this._props.isDisabled ? this._el.classList.add(\"disabled\") : null;\r\n }\r\n // Else, see if this is a header\r\n else if (this._props.isHeader) {\r\n // Add the header\r\n this._el = document.createElement(\"h6\");\r\n this._el.className = this._props.className || \"\";\r\n this._el.classList.add(\"dropdown-header\");\r\n this._props.isDisabled ? this._el.classList.add(\"disabled\") : null;\r\n this._el.innerHTML = this._props.text == null ? \"\" : this._props.text;\r\n }\r\n else {\r\n // See if we are rendering this in a nav bar\r\n if (this._parent.navFl) {\r\n // Add the item\r\n this._el = document.createElement(\"a\");\r\n this._el.className = this._props.className || \"\";\r\n this._el.classList.add(\"dropdown-item\");\r\n this._props.isDisabled ? this._el.classList.add(\"disabled\") : null;\r\n this._el.href = this._props.href || \"#\";\r\n this._el.innerHTML = this._props.text == null ? \"\" : this._props.text;\r\n }\r\n else {\r\n // Create the item\r\n this._el = document.createElement(\"a\");\r\n this._el.className = this._props.className || \"\";\r\n this._el.classList.add(\"dropdown-item\");\r\n this._props.isDisabled ? this._el.classList.add(\"disabled\") : null;\r\n this._el.href = this._props.href || \"#\";\r\n this._el.innerHTML = this._props.text == null ? \"\" : this._props.text;\r\n // See if this item is selected\r\n if (this._props.isSelected) {\r\n // Select the item\r\n this._el.classList.add(\"active\");\r\n }\r\n // Else, see if a value exists\r\n else if (typeof (this._parent.value) !== \"undefined\") {\r\n // Ensure it's an array\r\n var values = this._parent.value && this._parent.value.length && typeof (this._parent.value) !== \"string\" ? this._parent.value : [this._parent.value];\r\n // Parse the values\r\n for (var j = 0; j < values.length; j++) {\r\n var value = typeof (this._props.value) === \"undefined\" ? this._props.text : this._props.value;\r\n // See if this item is selected\r\n if (value == values[j]) {\r\n // Select the item\r\n this._el.classList.add(\"active\");\r\n break;\r\n }\r\n }\r\n }\r\n // Set the flag\r\n this._isSelected = this._el.classList.contains(\"active\");\r\n }\r\n }\r\n };\r\n // Configures the events\r\n DropdownItem.prototype.configureEvents = function () {\r\n var _this = this;\r\n // Set the click event\r\n this._el.addEventListener(\"click\", function (ev) {\r\n // Toggle the item\r\n _this.toggle();\r\n // See if there is a click event defined\r\n if (_this._props.onClick) {\r\n // Execute the event\r\n _this._props.onClick(_this._props, ev);\r\n }\r\n });\r\n };\r\n Object.defineProperty(DropdownItem.prototype, \"el\", {\r\n /**\r\n * Public Interface\r\n */\r\n // The component HTML element\r\n get: function () { return this._el; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DropdownItem.prototype, \"isSelected\", {\r\n // Returns true if the item is selected\r\n get: function () { return this._isSelected; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(DropdownItem.prototype, \"props\", {\r\n // The component properties\r\n get: function () { return this._props; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n // Toggles the item selection\r\n DropdownItem.prototype.toggle = function () {\r\n // Skip the dividers, headers and nav items\r\n if (this._props.isDivider || this._props.isHeader || this._parent.navFl) {\r\n return;\r\n }\r\n // Update the selected flag\r\n this._isSelected = !this._isSelected;\r\n // Update the class\r\n if (this._isSelected) {\r\n // Add the active class\r\n this._el.classList.add(\"active\");\r\n }\r\n else {\r\n // Remove the active class\r\n this._el.classList.remove(\"active\");\r\n }\r\n };\r\n return DropdownItem;\r\n}());\r\nexports.DropdownItem = DropdownItem;\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/item.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/nav.html.js":
/*!********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/nav.html.js ***!
\********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/split.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/control.js":
/*!***************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/control.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar checkboxGroup_1 = __webpack_require__(/*! ../checkboxGroup */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/checkboxGroup/index.js\");\r\nvar custom_1 = __webpack_require__(/*! ./custom */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/custom.js\");\r\nvar dropdown_1 = __webpack_require__(/*! ../dropdown */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/index.js\");\r\nvar inputGroup_1 = __webpack_require__(/*! ../inputGroup */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/inputGroup/index.js\");\r\nvar listBox_1 = __webpack_require__(/*! ../listBox */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listBox/index.js\");\r\nvar _1 = __webpack_require__(/*! . */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/index.js\");\r\n/**\r\n * Form Control\r\n */\r\nvar FormControl = /** @class */ (function () {\r\n // Constructor\r\n function FormControl(props, elLabel) {\r\n this._cb = null;\r\n this._el = null;\r\n this._elLabel = null;\r\n this._ddl = null;\r\n this._lb = null;\r\n this._tb = null;\r\n // Save the parameters\r\n this._props = props;\r\n this._elLabel = elLabel;\r\n // Create the control\r\n this.create();\r\n // Configure the control\r\n this.configure();\r\n }\r\n // Configure the control\r\n FormControl.prototype.configure = function () {\r\n // Ensure a control was created\r\n if (this.control) {\r\n // Set the element\r\n this._el = this.control.el;\r\n // See if an error message exists\r\n if (this._props.errorMessage) {\r\n // Get the group\r\n var elGroup = this._el.querySelector(\".input-group\") || this._el.querySelector(\".form-check:last-child\");\r\n if (elGroup) {\r\n // Add the error message\r\n var elErrorMessage = document.createElement(\"div\");\r\n elErrorMessage.className = \"invalid-feedback\";\r\n elErrorMessage.innerHTML = this._props.errorMessage;\r\n elGroup.appendChild(elErrorMessage);\r\n }\r\n }\r\n // See if an element was defined to render to\r\n if (this._props.el) {\r\n // Append the control to the element\r\n this._props.el.appendChild(this._el);\r\n }\r\n }\r\n };\r\n // Creates the control\r\n FormControl.prototype.create = function () {\r\n // Parse the custom classes to add\r\n var className = [(this._props.className || \"\"), (this._props.controlClassName || \"\")].join(\" \").trim();\r\n // Render the control based on the type\r\n switch (this._props.type) {\r\n // Checkbox\r\n case _1.FormControlTypes.Checkbox:\r\n var cbProps = this._props;\r\n // Add the checkbox group\r\n this._cb = checkboxGroup_1.CheckboxGroup({\r\n className: className,\r\n hideLabel: true,\r\n isInline: cbProps.isInline,\r\n isReadonly: this._props.isReadonly,\r\n items: cbProps.items,\r\n multi: cbProps.multi,\r\n onChange: cbProps.onChange,\r\n title: this._props.title,\r\n type: checkboxGroup_1.CheckboxGroupTypes.Checkbox,\r\n value: this._props.value\r\n });\r\n break;\r\n // Dropdown\r\n case _1.FormControlTypes.Dropdown:\r\n // Add the dropdown\r\n this._ddl = dropdown_1.Dropdown({\r\n className: className,\r\n formFl: true,\r\n isReadonly: this._props.isReadonly,\r\n items: this._props.items,\r\n onChange: this._props.onChange,\r\n title: this._props.title,\r\n value: this._props.value\r\n });\r\n break;\r\n // Email\r\n case _1.FormControlTypes.Email:\r\n // Add the input\r\n this._tb = inputGroup_1.InputGroup({\r\n className: className,\r\n isPlainText: this._props.isPlainText,\r\n isReadonly: this._props.isReadonly,\r\n onChange: this._props.onChange,\r\n placeholder: this._props.placeholder,\r\n title: this._props.title,\r\n type: inputGroup_1.InputGroupTypes.Email,\r\n value: this._props.value\r\n });\r\n break;\r\n // File\r\n case _1.FormControlTypes.File:\r\n // Add the input\r\n this._tb = inputGroup_1.InputGroup({\r\n className: className,\r\n isPlainText: this._props.isPlainText,\r\n isReadonly: this._props.isReadonly,\r\n onChange: this._props.onChange,\r\n placeholder: this._props.placeholder,\r\n title: this._props.title,\r\n type: inputGroup_1.InputGroupTypes.File,\r\n value: this._props.value\r\n });\r\n break;\r\n // List Box\r\n case _1.FormControlTypes.ListBox:\r\n // Add the list box\r\n this._lb = listBox_1.ListBox({\r\n items: this._props.items,\r\n multi: this._props.multi,\r\n onChange: this._props.onChange,\r\n placeholder: this._props.placeholder,\r\n value: this._props.value\r\n });\r\n break;\r\n // Multi-Dropdown\r\n case _1.FormControlTypes.MultiDropdown:\r\n // Add the dropdown\r\n this._ddl = dropdown_1.Dropdown({\r\n className: className,\r\n formFl: true,\r\n isReadonly: this._props.isReadonly,\r\n items: this._props.items,\r\n multi: true,\r\n onChange: this._props.onChange,\r\n title: this._props.title,\r\n value: this._props.value\r\n });\r\n break;\r\n // Password\r\n case _1.FormControlTypes.Password:\r\n // Add the input\r\n this._tb = inputGroup_1.InputGroup({\r\n className: className,\r\n isPlainText: this._props.isPlainText,\r\n isReadonly: this._props.isReadonly,\r\n onChange: this._props.onChange,\r\n placeholder: this._props.placeholder,\r\n title: this._props.title,\r\n type: inputGroup_1.InputGroupTypes.Password,\r\n value: this._props.value\r\n });\r\n break;\r\n // Radio\r\n case _1.FormControlTypes.Radio:\r\n // Add the checkbox group\r\n this._cb = checkboxGroup_1.CheckboxGroup({\r\n className: className,\r\n hideLabel: true,\r\n isReadonly: this._props.isReadonly,\r\n items: this._props.items,\r\n multi: this._props.multi,\r\n onChange: this._props.onChange,\r\n title: this._props.title,\r\n type: checkboxGroup_1.CheckboxGroupTypes.Radio,\r\n value: this._props.value\r\n });\r\n break;\r\n // Range\r\n case _1.FormControlTypes.Range:\r\n // Add the input\r\n this._tb = inputGroup_1.InputGroup({\r\n className: className,\r\n isPlainText: this._props.isPlainText,\r\n isReadonly: this._props.isReadonly,\r\n min: this._props.min || 0,\r\n max: this._props.max || 100,\r\n onChange: this._props.onChange,\r\n placeholder: this._props.placeholder,\r\n step: this._props.step,\r\n title: this._props.title,\r\n type: inputGroup_1.InputGroupTypes.Range,\r\n value: this._props.value\r\n });\r\n break;\r\n // Read Only\r\n case _1.FormControlTypes.Readonly:\r\n // Add the input\r\n this._tb = inputGroup_1.InputGroup({\r\n className: className,\r\n isPlainText: this._props.isPlainText,\r\n isReadonly: true,\r\n onChange: this._props.onChange,\r\n placeholder: this._props.placeholder,\r\n title: this._props.title,\r\n type: inputGroup_1.InputGroupTypes.TextField,\r\n value: this._props.value\r\n });\r\n break;\r\n // Switch\r\n case _1.FormControlTypes.Switch:\r\n // Add the checkbox group\r\n this._cb = checkboxGroup_1.CheckboxGroup({\r\n className: className,\r\n hideLabel: true,\r\n isReadonly: this._props.isReadonly,\r\n items: this._props.items,\r\n multi: this._props.multi,\r\n onChange: this._props.onChange,\r\n title: this._props.title,\r\n type: checkboxGroup_1.CheckboxGroupTypes.Switch,\r\n value: this._props.value\r\n });\r\n break;\r\n // Text Area\r\n case _1.FormControlTypes.TextArea:\r\n // Add the input\r\n this._tb = inputGroup_1.InputGroup({\r\n className: className,\r\n isPlainText: this._props.isPlainText,\r\n isReadonly: this._props.isReadonly,\r\n onChange: this._props.onChange,\r\n placeholder: this._props.placeholder,\r\n rows: this._props.rows,\r\n title: this._props.title,\r\n type: inputGroup_1.InputGroupTypes.TextArea,\r\n value: this._props.value\r\n });\r\n break;\r\n // Text Field\r\n case _1.FormControlTypes.TextField:\r\n // Add the input\r\n this._tb = inputGroup_1.InputGroup({\r\n className: className,\r\n isPlainText: this._props.isPlainText,\r\n isReadonly: this._props.isReadonly,\r\n onChange: this._props.onChange,\r\n placeholder: this._props.placeholder,\r\n title: this._props.title,\r\n type: inputGroup_1.InputGroupTypes.TextField,\r\n value: this._props.value\r\n });\r\n break;\r\n // Custom Type\r\n default:\r\n // Create the default element\r\n this._el = document.createElement(\"div\");\r\n // See if there is a custom type\r\n var custom = custom_1.CustomControls.getByType(this._props.type);\r\n if (custom && typeof (custom) === \"function\") {\r\n // Execute the event\r\n custom(this._props);\r\n }\r\n break;\r\n }\r\n };\r\n Object.defineProperty(FormControl.prototype, \"el\", {\r\n /**\r\n * Public Interface\r\n */\r\n get: function () { return this._el; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(FormControl.prototype, \"checkbox\", {\r\n // The checkbox control\r\n get: function () { return this._cb; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(FormControl.prototype, \"dropdown\", {\r\n // The dropdown control\r\n get: function () { return this._ddl; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(FormControl.prototype, \"control\", {\r\n // The textbox control\r\n get: function () { return this._cb || this._ddl || this._lb || this._tb; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(FormControl.prototype, \"listbox\", {\r\n // The listbox control\r\n get: function () { return this._lb; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(FormControl.prototype, \"textbox\", {\r\n // The textbox control\r\n get: function () { return this._tb; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n // Method to get the form control value\r\n FormControl.prototype.getValue = function () {\r\n // See if there is an override event\r\n if (this._props.onGetValue) {\r\n return this._props.onGetValue(this._props);\r\n }\r\n // See if this is a checkbox\r\n if (this._cb) {\r\n // See if the items were defined\r\n if (this._props.items) {\r\n // Return the value(s)\r\n return this._cb.getValue();\r\n }\r\n // Return the value\r\n return this._cb.getValue() ? true : false;\r\n }\r\n // See if this is a dropdown\r\n if (this._ddl) {\r\n // Return the value\r\n return this._ddl.getValue();\r\n }\r\n // See if this is a list box\r\n if (this._lb) {\r\n // Return the value\r\n return this._lb.getValue();\r\n }\r\n // See if this is a textbox\r\n if (this._tb) {\r\n // Return the value\r\n return this._tb.getValue();\r\n }\r\n };\r\n Object.defineProperty(FormControl.prototype, \"isValid\", {\r\n // Validates the control\r\n get: function () {\r\n var validation = { isValid: true };\r\n // Get the element and value\r\n var elControl = (this._cb || this._ddl || this._lb || this._tb) ? (this._cb || this._ddl || this._lb || this._tb).el : this._el;\r\n var value = this.getValue();\r\n // See if this control is required\r\n if (this._props.required) {\r\n // See if a value doesn't exists\r\n if (value == null) {\r\n // Set the flag\r\n validation.isValid = false;\r\n }\r\n // Else, see if the value is an array\r\n else if (typeof (value.length) === \"number\") {\r\n // Set the flag\r\n validation.isValid = value.length > 0;\r\n }\r\n }\r\n // See if an event exists\r\n if (this._props.onValidate) {\r\n // Call the event\r\n var returnValue = this._props.onValidate(this._props, value);\r\n if (typeof (returnValue) === \"boolean\") {\r\n // Set the flag\r\n validation.isValid = returnValue;\r\n }\r\n // Else, ensure it exists\r\n else if (returnValue) {\r\n // Set the validation\r\n validation = returnValue;\r\n }\r\n }\r\n // Get the form control\r\n var elFormControl = elControl.querySelector(\".form-control\");\r\n if (elFormControl) {\r\n // Clear the invalid/valid classes\r\n elFormControl.classList.remove(\"is-invalid\");\r\n elFormControl.classList.remove(\"is-valid\");\r\n // Set the class\r\n elFormControl.classList.add(validation.isValid ? \"is-valid\" : \"is-invalid\");\r\n }\r\n else {\r\n var validateControls = function (controls) {\r\n // Parse the controls\r\n for (var i = 0; i < controls.length; i++) {\r\n var control = controls[i];\r\n // Clear the invalid/valid classes\r\n control.classList.remove(\"is-invalid\");\r\n control.classList.remove(\"is-valid\");\r\n // Set the class\r\n control.classList.add(validation.isValid ? \"is-valid\" : \"is-invalid\");\r\n }\r\n };\r\n // Get the checkboxes\r\n var elCheckboxes = elControl.querySelectorAll(\".form-check-input\");\r\n if (elCheckboxes.length > 0) {\r\n // Validate the controls\r\n validateControls(elCheckboxes);\r\n // Set the form control\r\n elFormControl = elCheckboxes.length > 0 ? elCheckboxes[elCheckboxes.length - 1] : elFormControl;\r\n }\r\n // Get the custom controls\r\n var elCustomControls = elControl.querySelectorAll(\".custom-control-input\");\r\n if (elCustomControls.length > 0) {\r\n // Validate the controls\r\n validateControls(elCustomControls);\r\n // Set the form control\r\n elFormControl = elCustomControls.length > 0 ? elCustomControls[elCustomControls.length - 1] : elFormControl;\r\n }\r\n }\r\n // Ensure the form control exists\r\n if (elFormControl) {\r\n // See if there is invalid feedback\r\n if (validation.invalidMessage || this._props.errorMessage) {\r\n // Get the element\r\n var elMessage = elControl.querySelector(\".invalid-feedback\");\r\n if (elMessage == null) {\r\n // Create the element\r\n elMessage = document.createElement(\"div\");\r\n elMessage.className = \"invalid-feedback\";\r\n elFormControl.parentElement.appendChild(elMessage);\r\n }\r\n // Set the message\r\n elMessage.innerHTML = validation.invalidMessage || this._props.errorMessage;\r\n }\r\n // See if there is valid feedback\r\n if (validation.validMessage) {\r\n // Get the element\r\n var elMessage = elControl.querySelector(\".valid-feedback\");\r\n if (elMessage == null) {\r\n // Create the element\r\n elMessage = document.createElement(\"div\");\r\n elMessage.className = \"valid-feedback\";\r\n elFormControl.parentElement.appendChild(elMessage);\r\n }\r\n // Set the message\r\n elMessage.innerHTML = validation.validMessage;\r\n }\r\n }\r\n // Return the flag\r\n return validation.isValid;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(FormControl.prototype, \"props\", {\r\n // The form control properties\r\n get: function () { return this._props; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n // Sets the form control label\r\n FormControl.prototype.setLabel = function (value) {\r\n // Update the label\r\n this._elLabel ? this._elLabel.innerHTML = value || \"\" : null;\r\n };\r\n // Sets the form control value\r\n FormControl.prototype.setValue = function (value) {\r\n // Set the value\r\n this.control ? this.control.setValue(value) : null;\r\n };\r\n return FormControl;\r\n}());\r\nexports.FormControl = FormControl;\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/control.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/custom.js":
/*!**************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/custom.js ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Custom Controls\r\n */\r\nvar CustomControls = /** @class */ (function () {\r\n function CustomControls() {\r\n }\r\n // Gets the event by type\r\n CustomControls.getByType = function (key) { return this._customTypes[key]; };\r\n // Registers a custom control type\r\n CustomControls.registerType = function (key, event) { this._customTypes[key] = event; };\r\n CustomControls._customTypes = {};\r\n return CustomControls;\r\n}());\r\nexports.CustomControls = CustomControls;\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/custom.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/group.html.js":
/*!******************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/group.html.js ***!
\******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\r\n \r\n
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/group.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/group.js":
/*!*************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/group.js ***!
\*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar control_1 = __webpack_require__(/*! ./control */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/control.js\");\r\nvar HTML = __webpack_require__(/*! ./group.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/group.html.js\");\r\n/**\r\n * Form Group\r\n */\r\nvar FormGroup = /** @class */ (function () {\r\n // Constructor\r\n function FormGroup(props, formProps) {\r\n this._control = null;\r\n this._el = null;\r\n this._props = null;\r\n this._formProps = null;\r\n // Save the properties\r\n this._props = props;\r\n this._formProps = formProps;\r\n // Create the element\r\n var el = document.createElement(\"div\");\r\n el.innerHTML = HTML.trim();\r\n this._el = el.firstChild;\r\n // Configure the control\r\n this.configure();\r\n }\r\n // Configure the row\r\n FormGroup.prototype.configure = function () {\r\n var _this = this;\r\n // Execute the rendering event\r\n this.configureEvents(this._props.onControlRendering).then(function () {\r\n // Execute the parent rendering event\r\n _this.configureEvents(_this._formProps.onControlRendering).then(function () {\r\n // Render the control\r\n _this.render();\r\n });\r\n });\r\n };\r\n // Configure the events\r\n FormGroup.prototype.configureEvents = function (event) {\r\n var _this = this;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Execute the rendering event\r\n var returnVal = event ? event(_this._props) : null;\r\n if (returnVal && returnVal.then) {\r\n // Wait for the event to complete\r\n returnVal.then(function (props) {\r\n // Update the properties\r\n _this._props = props;\r\n // Resolve the promise\r\n resolve();\r\n }, reject);\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve();\r\n }\r\n });\r\n };\r\n // Executes after the control is rendered\r\n FormGroup.prototype.onRendered = function () {\r\n // Execute the rendered events\r\n this._props.onControlRendered ? this._props.onControlRendered(this._control) : null;\r\n this._formProps.onControlRendered ? this._formProps.onControlRendered(this._control) : null;\r\n };\r\n // Renders the control\r\n FormGroup.prototype.render = function () {\r\n // Update the label\r\n var elLabel = this._el.querySelector(\"label\");\r\n var label = this._props.label || (this._control && this._control.props.label);\r\n if (label) {\r\n // Set the text\r\n elLabel.innerHTML = label;\r\n }\r\n else {\r\n // Remove the label\r\n this._el.removeChild(elLabel);\r\n }\r\n // Create the control\r\n this._control = new control_1.FormControl(this._props, elLabel);\r\n this._el.appendChild(this._control.el);\r\n // Execute the rendered event\r\n this.onRendered();\r\n };\r\n Object.defineProperty(FormGroup.prototype, \"control\", {\r\n /**\r\n * Public Interface\r\n */\r\n get: function () { return this._control; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(FormGroup.prototype, \"el\", {\r\n get: function () { return this._el; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return FormGroup;\r\n}());\r\nexports.FormGroup = FormGroup;\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/group.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/index.html.js":
/*!******************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/index.html.js ***!
\******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/index.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/index.js":
/*!*************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/index.js ***!
\*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nfunction __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar control_1 = __webpack_require__(/*! ./control */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/control.js\");\r\nvar group_1 = __webpack_require__(/*! ./group */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/group.js\");\r\nvar row_1 = __webpack_require__(/*! ./row */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/row.js\");\r\nvar HTML = __webpack_require__(/*! ./index.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/index.html.js\");\r\n__export(__webpack_require__(/*! ./custom */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/custom.js\"));\r\n/**\r\n * Form\r\n * @property props - The form properties.\r\n */\r\nvar _Form = /** @class */ (function (_super) {\r\n __extends(_Form, _super);\r\n // Constructor\r\n function _Form(props) {\r\n var _this = _super.call(this, HTML, props) || this;\r\n _this._groups = null;\r\n _this._rows = null;\r\n // Configure the form\r\n _this.configure();\r\n // Configure the events\r\n _this.configureEvents();\r\n // Configure the parent\r\n _this.configureParent();\r\n return _this;\r\n }\r\n // Configure the form\r\n _Form.prototype.configure = function () {\r\n // Clear the groups and rows\r\n this._groups = [];\r\n this._rows = [];\r\n // Append the controls\r\n this.appendControls(this.props.controls);\r\n // Append the rows\r\n this.appendRows(this.props.rows);\r\n };\r\n // Configure the events\r\n _Form.prototype.configureEvents = function () {\r\n var _this = this;\r\n // Wait before executing the rendered event, otherwise the controls will be null\r\n setTimeout(function () {\r\n // Execute the event\r\n _this.props.onRendered ? _this.props.onRendered(_this.controls) : null;\r\n }, 10);\r\n };\r\n /**\r\n * Public Interface\r\n */\r\n // Append controls to the form\r\n _Form.prototype.appendControls = function (controls) {\r\n if (controls === void 0) { controls = []; }\r\n // Parse the controls\r\n for (var i = 0; i < controls.length; i++) {\r\n // Create the group\r\n var group = new group_1.FormGroup(controls[i], this.props);\r\n this._groups.push(group);\r\n this.el.appendChild(group.el);\r\n }\r\n };\r\n // Append rows to the form\r\n _Form.prototype.appendRows = function (rows) {\r\n if (rows === void 0) { rows = []; }\r\n // Parse the rows\r\n for (var i = 0; i < rows.length; i++) {\r\n // Create the row\r\n var row = new row_1.FormRow(rows[i], this.props);\r\n this._rows.push(row);\r\n this.el.appendChild(row.el);\r\n }\r\n };\r\n Object.defineProperty(_Form.prototype, \"controls\", {\r\n // The forms controls\r\n get: function () {\r\n var controls = [];\r\n // Parse the groups\r\n for (var i = 0; i < this._groups.length; i++) {\r\n // Add the control\r\n controls.push(this._groups[i].control);\r\n }\r\n // Parse the rows\r\n for (var i = 0; i < this._rows.length; i++) {\r\n // Add the controls\r\n controls = controls.concat(this._rows[i].controls);\r\n }\r\n // Return the controls\r\n return controls;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n // Gets a form control by its name\r\n _Form.prototype.getControl = function (name) {\r\n // Parse the controls\r\n var controls = this.controls;\r\n for (var i = 0; i < controls.length; i++) {\r\n var control = controls[i];\r\n // See if this is the control we are looking for\r\n if (control.props.name == name) {\r\n // Return the control\r\n return control;\r\n }\r\n }\r\n // Control not found\r\n return null;\r\n };\r\n // Gets the form values\r\n _Form.prototype.getValues = function () {\r\n var values = {};\r\n // Parse the controls\r\n var controls = this.controls;\r\n for (var i = 0; i < controls.length; i++) {\r\n var control = controls[i];\r\n if (control.props.name) {\r\n // Set the value\r\n values[control.props.name] = control.getValue();\r\n }\r\n }\r\n // Return the values\r\n return values;\r\n };\r\n // Validates the form\r\n _Form.prototype.isValid = function () {\r\n var isValid = true;\r\n // Parse the controls\r\n var controls = this.controls;\r\n for (var i = 0; i < controls.length; i++) {\r\n // See if this control is valid\r\n if (controls[i].isValid == false) {\r\n // Set the flag\r\n isValid = false;\r\n }\r\n }\r\n // Return the flag\r\n return isValid;\r\n };\r\n return _Form;\r\n}(base_1.Base));\r\nexports.Form = function (props) { return new _Form(props); };\r\n/**\r\n * Form Control\r\n */\r\nexports.FormControl = function (props) { return new control_1.FormControl(props); };\r\n/**\r\n * Form Control Types\r\n */\r\nvar FormControlTypes;\r\n(function (FormControlTypes) {\r\n FormControlTypes[FormControlTypes[\"Checkbox\"] = 1] = \"Checkbox\";\r\n FormControlTypes[FormControlTypes[\"Email\"] = 2] = \"Email\";\r\n FormControlTypes[FormControlTypes[\"Dropdown\"] = 3] = \"Dropdown\";\r\n FormControlTypes[FormControlTypes[\"File\"] = 4] = \"File\";\r\n FormControlTypes[FormControlTypes[\"ListBox\"] = 5] = \"ListBox\";\r\n FormControlTypes[FormControlTypes[\"MultiDropdown\"] = 6] = \"MultiDropdown\";\r\n FormControlTypes[FormControlTypes[\"Password\"] = 7] = \"Password\";\r\n FormControlTypes[FormControlTypes[\"Radio\"] = 8] = \"Radio\";\r\n FormControlTypes[FormControlTypes[\"Range\"] = 9] = \"Range\";\r\n FormControlTypes[FormControlTypes[\"Readonly\"] = 10] = \"Readonly\";\r\n FormControlTypes[FormControlTypes[\"Switch\"] = 11] = \"Switch\";\r\n FormControlTypes[FormControlTypes[\"TextArea\"] = 12] = \"TextArea\";\r\n FormControlTypes[FormControlTypes[\"TextField\"] = 13] = \"TextField\";\r\n})(FormControlTypes = exports.FormControlTypes || (exports.FormControlTypes = {}));\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/row.html.js":
/*!****************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/row.html.js ***!
\****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/row.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/row.js":
/*!***********************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/row.js ***!
\***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar group_1 = __webpack_require__(/*! ./group */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/group.js\");\r\nvar HTML = __webpack_require__(/*! ./row.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/row.html.js\");\r\n/**\r\n * Form Row\r\n */\r\nvar FormRow = /** @class */ (function () {\r\n // Constructor\r\n function FormRow(props, parent) {\r\n this._columns = null;\r\n this._el = null;\r\n this._parent = null;\r\n this._props = null;\r\n // Save the parameters\r\n this._parent = parent;\r\n this._props = props;\r\n // Create the element\r\n var el = document.createElement(\"div\");\r\n el.innerHTML = HTML.trim();\r\n this._el = el.firstChild;\r\n // Configure the row\r\n this.configure();\r\n }\r\n // Configure the row\r\n FormRow.prototype.configure = function () {\r\n // Set the attributes\r\n this._props.isCentered ? this._el.classList.add(\"align-items-center\") : null;\r\n // Set the class name\r\n var classNames = this._parent.rowClassName ? this._parent.rowClassName.split(' ') : [];\r\n classNames = this._props.className ? classNames.concat(this._props.className.split(' ')) : classNames;\r\n for (var i = 0; i < classNames.length; i++) {\r\n this._el.classList.add(classNames[i]);\r\n }\r\n // Clear the columns and group\r\n this._columns = [];\r\n // Render the columns\r\n this.renderColumns();\r\n };\r\n // Render the columns\r\n FormRow.prototype.renderColumns = function () {\r\n // Parse the columns\r\n var columns = this._props.columns || [];\r\n for (var i = 0; i < columns.length; i++) {\r\n var columnProps = columns[i];\r\n // Set the value\r\n var value = columnProps.control.value;\r\n if (this._parent.value) {\r\n // Set the value\r\n value = this._parent.value[columnProps.control.name] || value;\r\n }\r\n columnProps.control.value = value;\r\n // Create the column\r\n var column = new group_1.FormGroup(columnProps.control, this._parent);\r\n this._columns.push(column);\r\n this._el.appendChild(column.el);\r\n // Create the column\r\n var colSize = columnProps.size > 0 && columnProps.size < 13 ? columnProps.size : 0;\r\n // See if this column is auto sized\r\n if (columnProps.isAutoSized || this.props.isAutoSized || this.props.isCentered) {\r\n // Add the class name\r\n column.el.classList.add(\"col-auto\");\r\n }\r\n // Else, see if a size is defined\r\n else if (colSize > 0 && colSize < 13) {\r\n // Add the class name based on the size\r\n column.el.classList.add(\"col-\" + colSize);\r\n }\r\n else {\r\n // Default the size\r\n column.el.classList.add(\"col\");\r\n }\r\n }\r\n };\r\n Object.defineProperty(FormRow.prototype, \"el\", {\r\n /**\r\n * Public Interface\r\n */\r\n // The component HTML element\r\n get: function () { return this._el; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(FormRow.prototype, \"controls\", {\r\n // The form controls\r\n get: function () {\r\n var controls = [];\r\n // Parse the columns\r\n for (var i = 0; i < this._columns.length; i++) {\r\n // Add the control\r\n controls.push(this._columns[i].control);\r\n }\r\n // Return the controls\r\n return controls;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(FormRow.prototype, \"props\", {\r\n // The component properties\r\n get: function () { return this._props; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return FormRow;\r\n}());\r\nexports.FormRow = FormRow;\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/row.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/index.js":
/*!********************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/index.js ***!
\********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nfunction __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n__export(__webpack_require__(/*! ./accordion */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/accordion/index.js\"));\r\n__export(__webpack_require__(/*! ./alert */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/alert/index.js\"));\r\n__export(__webpack_require__(/*! ./badge */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/badge/index.js\"));\r\n__export(__webpack_require__(/*! ./breadcrumb */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/breadcrumb/index.js\"));\r\n__export(__webpack_require__(/*! ./button */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/button/index.js\"));\r\n__export(__webpack_require__(/*! ./buttonGroup */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/buttonGroup/index.js\"));\r\n__export(__webpack_require__(/*! ./card */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/card/index.js\"));\r\n__export(__webpack_require__(/*! ./cardGroup */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/cardGroup/index.js\"));\r\n__export(__webpack_require__(/*! ./carousel */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/carousel/index.js\"));\r\n__export(__webpack_require__(/*! ./checkboxGroup */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/checkboxGroup/index.js\"));\r\n__export(__webpack_require__(/*! ./collapse */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/collapse/index.js\"));\r\n__export(__webpack_require__(/*! ./dropdown */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/index.js\"));\r\n__export(__webpack_require__(/*! ./form */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/index.js\"));\r\n__export(__webpack_require__(/*! ./inputGroup */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/inputGroup/index.js\"));\r\n__export(__webpack_require__(/*! ./jumbotron */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/jumbotron/index.js\"));\r\n__export(__webpack_require__(/*! ./listBox */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listBox/index.js\"));\r\n__export(__webpack_require__(/*! ./listGroup */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/index.js\"));\r\n__export(__webpack_require__(/*! ./media */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/media/index.js\"));\r\n__export(__webpack_require__(/*! ./mediaList */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/mediaList/index.js\"));\r\n__export(__webpack_require__(/*! ./modal */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/modal/index.js\"));\r\n__export(__webpack_require__(/*! ./nav */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/index.js\"));\r\n__export(__webpack_require__(/*! ./navbar */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/navbar/index.js\"));\r\n__export(__webpack_require__(/*! ./pagination */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/pagination/index.js\"));\r\n__export(__webpack_require__(/*! ./panel */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/panel/index.js\"));\r\n__export(__webpack_require__(/*! ./popover */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/popover/index.js\"));\r\n__export(__webpack_require__(/*! ./progress */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/progress/index.js\"));\r\n__export(__webpack_require__(/*! ./progressGroup */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/progressGroup/index.js\"));\r\n__export(__webpack_require__(/*! ./spinner */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/spinner/index.js\"));\r\n__export(__webpack_require__(/*! ./table */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/table/index.js\"));\r\n__export(__webpack_require__(/*! ./toast */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/toast/index.js\"));\r\n__export(__webpack_require__(/*! ./toolbar */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/toolbar/index.js\"));\r\n__export(__webpack_require__(/*! ./tooltip */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/tooltip/index.js\"));\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/inputGroup/index.html.js":
/*!************************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/inputGroup/index.html.js ***!
\************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n
\r\n \r\n
\r\n \r\n
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/inputGroup/index.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/inputGroup/index.js":
/*!*******************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/inputGroup/index.js ***!
\*******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar button_1 = __webpack_require__(/*! ../button */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/button/index.js\");\r\nvar HTML = __webpack_require__(/*! ./index.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/inputGroup/index.html.js\");\r\n/**\r\n * Input Group Types\r\n */\r\nvar InputGroupTypes;\r\n(function (InputGroupTypes) {\r\n InputGroupTypes[InputGroupTypes[\"Email\"] = 1] = \"Email\";\r\n InputGroupTypes[InputGroupTypes[\"File\"] = 2] = \"File\";\r\n InputGroupTypes[InputGroupTypes[\"Password\"] = 3] = \"Password\";\r\n InputGroupTypes[InputGroupTypes[\"Range\"] = 4] = \"Range\";\r\n InputGroupTypes[InputGroupTypes[\"Search\"] = 5] = \"Search\";\r\n InputGroupTypes[InputGroupTypes[\"TextArea\"] = 6] = \"TextArea\";\r\n InputGroupTypes[InputGroupTypes[\"TextField\"] = 7] = \"TextField\";\r\n})(InputGroupTypes = exports.InputGroupTypes || (exports.InputGroupTypes = {}));\r\n/**\r\n * Input Group\r\n * @param props The input group properties.\r\n */\r\nvar _InputGroup = /** @class */ (function (_super) {\r\n __extends(_InputGroup, _super);\r\n // Constructor\r\n function _InputGroup(props) {\r\n var _this = _super.call(this, HTML, props) || this;\r\n // Configure the collapse\r\n _this.configure();\r\n // Configure the textbox\r\n _this.configureTextbox();\r\n // Configure the events\r\n _this.configureEvents();\r\n // Configure the parent\r\n _this.configureParent();\r\n return _this;\r\n }\r\n // Configure the card group\r\n _InputGroup.prototype.configure = function () {\r\n // Set the class names\r\n this.props.isLarge ? this.el.classList.add(\"input-group-lg\") : null;\r\n this.props.isSmall ? this.el.classList.add(\"input-group-sm\") : null;\r\n // See if a label exists\r\n var label = this.el.querySelector(\"label\");\r\n if (this.props.label) {\r\n // Update the label\r\n this.props.id ? label.setAttribute(\"for\", this.props.id) : null;\r\n label.innerHTML = this.props.label;\r\n }\r\n else {\r\n // Remove the label\r\n this.el.removeChild(label);\r\n }\r\n // See if we are pre-pending a label or buttons\r\n var prepend = this.el.querySelector(\".input-group-prepend\");\r\n if (this.props.prependedButtons || this.props.prependedLabel) {\r\n // See if the label exists\r\n var label_1 = prepend.querySelector(\"span\");\r\n if (this.props.appendedLabel) {\r\n // Add the label\r\n label_1.innerHTML = this.props.prependedLabel;\r\n }\r\n else {\r\n // Remove the label\r\n prepend.removeChild(label_1);\r\n }\r\n // Parse the buttons\r\n var buttons = this.props.prependedButtons || [];\r\n for (var i = 0; i < buttons.length; i++) {\r\n // Add the button\r\n prepend.appendChild(button_1.Button(buttons[i]).el);\r\n }\r\n }\r\n else {\r\n // Remove the element\r\n this.el.removeChild(prepend);\r\n }\r\n // Default the appended buttons\r\n var appendedButtons = this.props.appendedButtons || [];\r\n if (this.props.type == InputGroupTypes.Range) {\r\n // Add the button\r\n appendedButtons.push({\r\n id: \"range-value\",\r\n text: this.props.value == null ? \"\" : this.props.value\r\n });\r\n }\r\n // See if we are appending a label or buttons\r\n var append = this.el.querySelector(\".input-group-append\");\r\n if (appendedButtons.length > 0 || this.props.appendedLabel) {\r\n // See if the label exists\r\n var label_2 = append.querySelector(\"span\");\r\n if (this.props.appendedLabel) {\r\n // Add the label\r\n label_2.innerHTML = this.props.appendedLabel;\r\n }\r\n else {\r\n // Remove the label\r\n append.removeChild(label_2);\r\n }\r\n // Parse the buttons\r\n for (var i = 0; i < appendedButtons.length; i++) {\r\n // Add the button\r\n append.appendChild(button_1.Button(appendedButtons[i]).el);\r\n }\r\n }\r\n else {\r\n // Remove the element\r\n this.el.removeChild(append);\r\n }\r\n // See if there is a description\r\n var description = this.el.querySelector(\"small.text-muted\");\r\n if (this.props.description) {\r\n // Add the description\r\n description.innerHTML = this.props.description;\r\n }\r\n else {\r\n // Remove the description\r\n this.el.removeChild(description);\r\n }\r\n };\r\n // Configure the events\r\n _InputGroup.prototype.configureEvents = function () {\r\n var _this = this;\r\n var isMultiLine = this.props.type == InputGroupTypes.TextArea;\r\n var elInput = this.el.querySelector(\"input\") || this.el.querySelector(\"textarea\");\r\n // See if a change event exists\r\n var callbackValue = null;\r\n if (this.props.onChange) {\r\n // Add an input event\r\n elInput.addEventListener(\"input\", function (ev) {\r\n // See if we have already executed the change event\r\n if (callbackValue != elInput.value) {\r\n // Set the value\r\n callbackValue = elInput.value;\r\n // Call the change event\r\n _this.props.onChange(callbackValue, ev);\r\n }\r\n });\r\n }\r\n // See if this is a range\r\n if (this.props.type == InputGroupTypes.Range) {\r\n // Add a change event\r\n elInput.addEventListener(\"input\", function () {\r\n // Get the button\r\n var btn = _this.el.querySelector(\"#range-value\");\r\n if (btn) {\r\n // Update the value\r\n btn.innerHTML = elInput.value;\r\n }\r\n });\r\n }\r\n // See if this is not a multi-line\r\n if (!isMultiLine) {\r\n // Add a mouse up event to detect the clear event\r\n elInput.addEventListener(\"mouseup\", function (ev) {\r\n // Get the current value\r\n var el = ev.currentTarget;\r\n var oldValue = el.value;\r\n // Wait for the user to stop updating the value\r\n setTimeout(function () {\r\n // Get the current value\r\n var currentValue = el.value;\r\n // See if the values have changed\r\n if (currentValue != oldValue) {\r\n // See if we have already executed the change event\r\n if (callbackValue != currentValue) {\r\n // Set the value\r\n callbackValue = currentValue;\r\n // Call the events\r\n _this.props.onChange ? _this.props.onChange(callbackValue, ev) : null;\r\n _this.props.onClear && callbackValue == \"\" ? _this.props.onClear() : null;\r\n }\r\n }\r\n }, 1);\r\n });\r\n }\r\n };\r\n // Configures the text box\r\n _InputGroup.prototype.configureTextbox = function () {\r\n var isTextArea = this.props.type == InputGroupTypes.TextArea;\r\n var input = this.el.querySelector(\"input\");\r\n var textarea = this.el.querySelector(\"textarea\");\r\n // See if this is a text area\r\n if (isTextArea) {\r\n // Remove the input\r\n this.el.removeChild(input);\r\n // Update the textbox\r\n this.props.id ? textarea.id = this.props.id : null;\r\n this.props.placeholder ? textarea.placeholder = this.props.placeholder : null;\r\n textarea.readOnly = this.props.isReadonly ? true : false;\r\n textarea.rows = this.props.rows;\r\n this.props.title ? textarea.title = this.props.title : null;\r\n }\r\n else {\r\n // Remove the textarea\r\n this.el.removeChild(textarea);\r\n // Update the textbox\r\n this.props.id ? input.id = this.props.id : null;\r\n this.props.placeholder ? input.placeholder = this.props.placeholder : null;\r\n input.readOnly = this.props.isReadonly ? true : false;\r\n this.props.title ? input.title = this.props.title : null;\r\n typeof (this.props.min) === \"number\" ? input.min = this.props.min + \"\" : null;\r\n typeof (this.props.max) === \"number\" ? input.max = this.props.max + \"\" : null;\r\n typeof (this.props.step) === \"number\" ? input.step = this.props.step + \"\" : null;\r\n // See if this is plain text\r\n if (this.props.isPlainText) {\r\n // Update the class names\r\n this.el.classList.remove(\"form-control\");\r\n this.el.classList.add(\"form-control-plaintext\");\r\n }\r\n // Update the type\r\n switch (this.props.type) {\r\n // Email\r\n case InputGroupTypes.Email:\r\n input.type = \"email\";\r\n break;\r\n // File\r\n case InputGroupTypes.File:\r\n input.type = \"file\";\r\n break;\r\n // Password\r\n case InputGroupTypes.Password:\r\n input.type = \"password\";\r\n break;\r\n // Range\r\n case InputGroupTypes.Range:\r\n input.type = \"range\";\r\n break;\r\n // Search\r\n case InputGroupTypes.Search:\r\n input.type = \"search\";\r\n input.setAttribute(\"aria-label\", \"Search\");\r\n break;\r\n }\r\n }\r\n // Set the default value\r\n this.setValue(this.props.value);\r\n };\r\n /**\r\n * Public Interface\r\n */\r\n _InputGroup.prototype.getValue = function () { return this.textbox.value; };\r\n // Method to set the value\r\n _InputGroup.prototype.setValue = function (value) {\r\n if (value === void 0) { value = \"\"; }\r\n this.textbox.value = value;\r\n };\r\n Object.defineProperty(_InputGroup.prototype, \"textbox\", {\r\n // Returns the textbox\r\n get: function () { return this.el.querySelector(\"input\") || this.el.querySelector(\"textarea\"); },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return _InputGroup;\r\n}(base_1.Base));\r\nexports.InputGroup = function (props) { return new _InputGroup(props); };\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/inputGroup/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/jumbotron/index.html.js":
/*!***********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/jumbotron/index.html.js ***!
\***********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\r\n \r\n \r\n
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/jumbotron/index.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/jumbotron/index.js":
/*!******************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/jumbotron/index.js ***!
\******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar HTML = __webpack_require__(/*! ./index.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/jumbotron/index.html.js\");\r\n/**\r\n * Jumbotron\r\n */\r\nvar _Jumbotron = /** @class */ (function (_super) {\r\n __extends(_Jumbotron, _super);\r\n // Constructor\r\n function _Jumbotron(props) {\r\n var _this = _super.call(this, HTML, props) || this;\r\n // Configure the collapse\r\n _this.configure();\r\n // Configure the events\r\n _this.configureEvents();\r\n // Configure the parent\r\n _this.configureParent();\r\n return _this;\r\n }\r\n // Configure the card group\r\n _Jumbotron.prototype.configure = function () {\r\n // Set the class names\r\n this.props.isFluid ? this.el.classList.add(\"jumbotron-fluid\") : null;\r\n // Set the title\r\n var title = this.el.querySelector(\"h1\");\r\n if (this.props.title) {\r\n // Set the title\r\n title.innerHTML = this.props.title;\r\n }\r\n else {\r\n // Remove the title\r\n this.el.removeChild(title);\r\n }\r\n // Set the lead\r\n var lead = this.el.querySelector(\"p\");\r\n if (this.props.lead) {\r\n // Set the lead\r\n lead.innerHTML = this.props.lead;\r\n }\r\n else {\r\n // Remove the lead\r\n this.el.removeChild(lead);\r\n }\r\n // Set the content\r\n var content = this.props.content || \"\";\r\n if (typeof (content) === \"string\") {\r\n // Set the html\r\n this.el.innerHTML += content;\r\n }\r\n else {\r\n // Append the element\r\n this.el.appendChild(content);\r\n }\r\n };\r\n // Configures the events\r\n _Jumbotron.prototype.configureEvents = function () {\r\n // Call the render event\r\n this.props.onRenderContent ? this.props.onRenderContent(this.el) : null;\r\n };\r\n return _Jumbotron;\r\n}(base_1.Base));\r\nexports.Jumbotron = function (props) { return new _Jumbotron(props); };\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/jumbotron/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listBox/index.html.js":
/*!*********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listBox/index.html.js ***!
\*********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listBox/index.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listBox/index.js":
/*!****************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listBox/index.js ***!
\****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar form_1 = __webpack_require__(/*! ../form */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/form/index.js\");\r\nvar HTML = __webpack_require__(/*! ./index.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listBox/index.html.js\");\r\n/**\r\n * TODO - Figure out how to remove a selected item\r\n */\r\n/**\r\n * List Box\r\n * @property props - The list box properties.\r\n */\r\nvar _ListBox = /** @class */ (function (_super) {\r\n __extends(_ListBox, _super);\r\n // Constructor\r\n function _ListBox(props) {\r\n var _this = _super.call(this, HTML, props) || this;\r\n _this._ddlItems = null;\r\n _this._ddlValues = null;\r\n // Configure the list box\r\n _this.configure();\r\n // Configure the parent\r\n _this.configureParent();\r\n return _this;\r\n }\r\n // Configures the list box\r\n _ListBox.prototype.configure = function () {\r\n var _this = this;\r\n // Set the placeholder\r\n var placeholder = typeof (this.props.placeholder) === \"undefined\" ? \"Search\" : this.props.placeholder;\r\n // Render a form to this element\r\n form_1.Form({\r\n el: this.el,\r\n rows: [\r\n {\r\n columns: [{\r\n control: {\r\n label: this.props.label,\r\n placeholder: placeholder,\r\n type: form_1.FormControlTypes.TextField,\r\n onChange: function (value) {\r\n // Filter the items\r\n _this.filterItems(value);\r\n }\r\n }\r\n }]\r\n },\r\n {\r\n columns: [\r\n {\r\n control: {\r\n items: this.props.items,\r\n type: form_1.FormControlTypes.MultiDropdown,\r\n onChange: function (items) {\r\n // See if we are allowing multiple values\r\n if (_this.props.multi) {\r\n // Get the items and sort them\r\n var allItems_1 = _this._ddlValues.getValue().concat(items).sort(function (a, b) {\r\n if (a.text < b.text) {\r\n return -1;\r\n }\r\n if (a.text > b.text) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n // Remove any duplicates and update the values dropdown\r\n _this.configureValuesDDL(allItems_1.filter(function (item, idx) {\r\n return allItems_1.indexOf(item) === idx;\r\n }));\r\n }\r\n else {\r\n // Set the values\r\n _this.configureValuesDDL([items[0]]);\r\n }\r\n // Clear this dropdown\r\n _this._ddlItems.setValue([]);\r\n // Call the change event\r\n _this.props.onChange ? _this.props.onChange(items) : null;\r\n },\r\n onControlRendered: function (ctrl) {\r\n // Set the dropdown\r\n _this._ddlItems = ctrl.dropdown;\r\n }\r\n }\r\n },\r\n {\r\n control: {\r\n type: form_1.FormControlTypes.MultiDropdown,\r\n isReadonly: true,\r\n onControlRendered: function (ctrl) {\r\n // Set the dropdown\r\n _this._ddlValues = ctrl.dropdown;\r\n }\r\n }\r\n }\r\n ]\r\n }\r\n ],\r\n onRendered: function () {\r\n // Get the selected items\r\n _this._ddlItems.setValue(_this.props.value);\r\n var items = _this._ddlItems.getValue();\r\n _this._ddlItems.setValue([]);\r\n // Configure the values dropdown\r\n _this.configureValuesDDL(items);\r\n }\r\n });\r\n };\r\n // Configures the values dropdown\r\n _ListBox.prototype.configureValuesDDL = function (items) {\r\n var _this = this;\r\n // Update the dropdown\r\n this._ddlValues.setItems(items);\r\n this._ddlValues.setValue(items);\r\n // Parse the options\r\n var options = this._ddlValues.el.querySelectorAll(\"option\");\r\n for (var i = 0; i < options.length; i++) {\r\n var option = options[i];\r\n // Add a click event\r\n option.setAttribute(\"data-idx\", i.toString());\r\n option.addEventListener(\"mouseup\", function (ev) {\r\n var idx = parseInt(ev.currentTarget.getAttribute(\"data-idx\"));\r\n // Remove the item\r\n items.splice(idx, 1);\r\n // Update the values\r\n _this.configureValuesDDL(items);\r\n });\r\n }\r\n };\r\n // Filters the dropdown menu items\r\n _ListBox.prototype.filterItems = function (filter) {\r\n var filterValue = filter.toLowerCase();\r\n // Parse the items\r\n var elItems = this._ddlItems.el.querySelectorAll(\"option\");\r\n for (var i = 0; i < elItems.length; i++) {\r\n var elItem = elItems[i];\r\n // See if the filter exists\r\n if (filterValue) {\r\n // See if this value contains the filter\r\n if (elItem.innerText.toLowerCase().indexOf(filterValue) >= 0) {\r\n // Show the item\r\n elItem.classList.remove(\"d-none\");\r\n }\r\n else {\r\n // Hide the item\r\n elItem.classList.add(\"d-none\");\r\n }\r\n }\r\n else {\r\n // Show the item\r\n elItem.classList.remove(\"d-none\");\r\n }\r\n }\r\n };\r\n /**\r\n * Public Interface\r\n */\r\n _ListBox.prototype.getValue = function () { return this._ddlValues.getValue(); };\r\n _ListBox.prototype.setValue = function (value) {\r\n // Get the items\r\n this._ddlItems.setValue(value);\r\n var items = this._ddlItems.getValue();\r\n // Set the value\r\n this.configureValuesDDL(items);\r\n // Clear the items\r\n this._ddlItems.setValue();\r\n };\r\n return _ListBox;\r\n}(base_1.Base));\r\nexports.ListBox = function (props) { return new _ListBox(props); };\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listBox/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/index.html.js":
/*!***********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/index.html.js ***!
\***********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/index.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/index.js":
/*!******************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/index.js ***!
\******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n__webpack_require__(/*! bootstrap/js/dist/tab */ \"./node_modules/.pnpm/registry.npmjs.org/bootstrap/4.5.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/tab.js\");\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar classNames_1 = __webpack_require__(/*! ../classNames */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/classNames.js\");\r\nvar item_1 = __webpack_require__(/*! ./item */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/item.js\");\r\nvar HTML = __webpack_require__(/*! ./index.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/index.html.js\");\r\nvar HTMLTabs = __webpack_require__(/*! ./tabs.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/tabs.html.js\");\r\n/**\r\n * List Group Item Types\r\n */\r\nvar ListGroupItemTypes;\r\n(function (ListGroupItemTypes) {\r\n ListGroupItemTypes[ListGroupItemTypes[\"Danger\"] = 1] = \"Danger\";\r\n ListGroupItemTypes[ListGroupItemTypes[\"Dark\"] = 2] = \"Dark\";\r\n ListGroupItemTypes[ListGroupItemTypes[\"Info\"] = 3] = \"Info\";\r\n ListGroupItemTypes[ListGroupItemTypes[\"Light\"] = 4] = \"Light\";\r\n ListGroupItemTypes[ListGroupItemTypes[\"Primary\"] = 5] = \"Primary\";\r\n ListGroupItemTypes[ListGroupItemTypes[\"Secondary\"] = 6] = \"Secondary\";\r\n ListGroupItemTypes[ListGroupItemTypes[\"Success\"] = 7] = \"Success\";\r\n ListGroupItemTypes[ListGroupItemTypes[\"Warning\"] = 8] = \"Warning\";\r\n})(ListGroupItemTypes = exports.ListGroupItemTypes || (exports.ListGroupItemTypes = {}));\r\n/**\r\n * List Group Classes\r\n */\r\nexports.ListGroupClassNames = new classNames_1.ClassNames([\r\n \"list-group-item-danger\",\r\n \"list-group-item-dark\",\r\n \"list-group-item-info\",\r\n \"list-group-item-light\",\r\n \"list-group-item-primary\",\r\n \"list-group-item-secondary\",\r\n \"list-group-item-success\",\r\n \"list-group-item-warning\"\r\n]);\r\n/**\r\n * List Group\r\n * @param props The list group properties.\r\n */\r\nvar _ListGroup = /** @class */ (function (_super) {\r\n __extends(_ListGroup, _super);\r\n // Constructor\r\n function _ListGroup(props) {\r\n var _this = _super.call(this, props.isTabs && props.colWidth > 0 && props.colWidth < 12 ? HTMLTabs : HTML, props) || this;\r\n _this._items = null;\r\n // Configure the collapse\r\n _this.configure();\r\n // Configure the parent\r\n _this.configureParent();\r\n return _this;\r\n }\r\n // Configure the card group\r\n _ListGroup.prototype.configure = function () {\r\n // Update the list group\r\n var listGroup = this.el.querySelector(\".list-group\") || this.el;\r\n this.props.isFlush ? listGroup.classList.add(\"list-group-flush\") : null;\r\n this.props.isHorizontal ? listGroup.classList.add(\"list-group-horizontal\") : null;\r\n this.props.isTabs ? listGroup.setAttribute(\"role\", \"tablist\") : null;\r\n // See if the column width is defined\r\n var column = this.el.querySelector(\".col\");\r\n if (column) {\r\n // Update the width\r\n column.className = \"col-\" + this.props.colWidth;\r\n }\r\n // Render the items\r\n this.renderItems(listGroup);\r\n };\r\n // Render the items\r\n _ListGroup.prototype.renderItems = function (listGroup) {\r\n // Clear the items\r\n this._items = [];\r\n // Get the tab content element\r\n var tabs = this.el.querySelector(\".tab-content\");\r\n // Parse the items\r\n var items = this.props.items || [];\r\n for (var i = 0; i < items.length; i++) {\r\n // Create the item\r\n var item = new item_1.ListGroupItem(items[i], tabs ? true : false);\r\n this._items.push(item);\r\n listGroup.appendChild(item.el);\r\n // See if we are rendering tabs\r\n if (tabs) {\r\n // Add the tab content\r\n tabs.appendChild(item.elTab);\r\n // See if the fade option is enabled\r\n if (this.props.fadeTabs) {\r\n // Set the class name\r\n item.elTab.classList.add(\"fade\");\r\n // See if the tab is active\r\n if (item.props.isActive) {\r\n // Set the class name\r\n item.elTab.classList.add(\"show\");\r\n }\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Public Interface\r\n */\r\n _ListGroup.prototype.showTab = function (tabId) {\r\n // Parse the tabs\r\n for (var i = 0; i < this._items.length; i++) {\r\n var item = this._items[i];\r\n // See if this is the target tab\r\n if (tabId === i + 1 || item.elTab.id == tabId) {\r\n // Toggle it if it's not visible\r\n item.isVisible ? null : item.toggle(this.props.fadeTabs);\r\n }\r\n // Else, see if it's visible\r\n else if (item.isVisible) {\r\n // Toggle it\r\n item.toggle(this.props.fadeTabs);\r\n }\r\n }\r\n };\r\n return _ListGroup;\r\n}(base_1.Base));\r\nexports.ListGroup = function (props) { return new _ListGroup(props); };\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/item.html.js":
/*!**********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/item.html.js ***!
\**********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/item.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/item.js":
/*!*****************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/item.js ***!
\*****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar badge_1 = __webpack_require__(/*! ../badge */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/badge/index.js\");\r\nvar _1 = __webpack_require__(/*! . */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/index.js\");\r\nvar HTML = __webpack_require__(/*! ./item.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/item.html.js\");\r\nvar HTMLTab = __webpack_require__(/*! ./tab.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/tab.html.js\");\r\n/**\r\n * List Group Item\r\n */\r\nvar ListGroupItem = /** @class */ (function (_super) {\r\n __extends(ListGroupItem, _super);\r\n // Constructor\r\n function ListGroupItem(props, isTab) {\r\n if (isTab === void 0) { isTab = false; }\r\n var _this = _super.call(this, HTML, props) || this;\r\n _this._elTab = null;\r\n // See if this is for a tab\r\n if (isTab) {\r\n // Create the tab element\r\n var el = document.createElement(\"div\");\r\n el.innerHTML = HTMLTab.trim();\r\n _this._elTab = el.firstChild;\r\n }\r\n // Configure the item\r\n _this.configure();\r\n // Configure the events\r\n _this.configureEvents();\r\n return _this;\r\n }\r\n // Configure the item\r\n ListGroupItem.prototype.configure = function () {\r\n // Set the class name\r\n this.props.badge ? this.el.classList.add(\"d-flex\") : null;\r\n this.props.badge ? this.el.classList.add(\"justify-content-between\") : null;\r\n this.props.isActive ? this.el.classList.add(\"active\") : null;\r\n this.props.isDisabled ? this.el.classList.add(\"disabled\") : null;\r\n // Set the class name\r\n var className = _1.ListGroupClassNames.getByType(this.props.type);\r\n className ? this.el.classList.add(className) : null;\r\n // See if this is a tab\r\n if (this._elTab) {\r\n var tabId = this.props.tabName.replace(/[^a-zA-Z0-9]/, \"\");\r\n // Set the properties\r\n this.el.setAttribute(\"href\", \"#\" + tabId);\r\n this.el.setAttribute(\"data-toggle\", \"list\");\r\n this.el.setAttribute(\"aria-controls\", tabId);\r\n this.el.innerHTML = this.props.tabName;\r\n // Update the tab\r\n this._elTab.id = tabId;\r\n this._elTab.setAttribute(\"aria-labelledby\", tabId);\r\n this.props.isActive ? this._elTab.classList.add(\"active\") : null;\r\n }\r\n else {\r\n // Set the properties\r\n this.el.setAttribute(\"href\", this.props.href || \"#\");\r\n }\r\n // See if there is a badge\r\n if (this.props.badge) {\r\n // Append a badge\r\n this.el.appendChild(badge_1.Badge(this.props.badge).el);\r\n }\r\n // Set the content\r\n var content = this.props.content || \"\";\r\n var elContent = this._elTab || this.el;\r\n if (typeof (content) === \"string\") {\r\n // Set the html\r\n elContent.innerHTML = content;\r\n }\r\n else {\r\n // Append the element\r\n elContent.appendChild(content);\r\n }\r\n };\r\n // Configures the events\r\n ListGroupItem.prototype.configureEvents = function () {\r\n var _this = this;\r\n // See if there is a click event\r\n if (this.props.onClick) {\r\n // Add a click event\r\n this.el.addEventListener(\"click\", function (ev) {\r\n // Execute the event\r\n _this.props.onClick(_this.el, _this.props);\r\n });\r\n }\r\n // See if there is a render event\r\n if (this.props.onRender) {\r\n // Execute the render event\r\n this.props.onRender(this._elTab || this.el, this.props);\r\n }\r\n };\r\n Object.defineProperty(ListGroupItem.prototype, \"elTab\", {\r\n /**\r\n * Public Interface\r\n */\r\n // The HTML tab element\r\n get: function () { return this._elTab; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(ListGroupItem.prototype, \"isVisible\", {\r\n // Returns true if the link is visible\r\n get: function () { return this.el.classList.contains(\"active\"); },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n // Toggles a link\r\n ListGroupItem.prototype.toggle = function (fadeTabs) {\r\n // See if this item is currently active\r\n if (this.isVisible) {\r\n // Hide this link and tab\r\n this.el.classList.remove(\"active\");\r\n this._elTab.classList.remove(\"active\");\r\n this._elTab.classList.remove(\"show\");\r\n }\r\n else {\r\n // Show this link and tab\r\n this.el.classList.add(\"active\");\r\n this._elTab.classList.add(\"active\");\r\n fadeTabs ? this._elTab.classList.add(\"show\") : null;\r\n }\r\n };\r\n return ListGroupItem;\r\n}(base_1.Base));\r\nexports.ListGroupItem = ListGroupItem;\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/item.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/tab.html.js":
/*!*********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/tab.html.js ***!
\*********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/tab.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/tabs.html.js":
/*!**********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/tabs.html.js ***!
\**********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\r\n
\r\n \r\n
\r\n
\r\n \r\n
\r\n
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/listGroup/tabs.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/media/index.html.js":
/*!*******************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/media/index.html.js ***!
\*******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/media/index.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/media/index.js":
/*!**************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/media/index.js ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar classNames_1 = __webpack_require__(/*! ../classNames */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/classNames.js\");\r\nvar HTML = __webpack_require__(/*! ./index.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/media/index.html.js\");\r\n/**\r\n * Media Images Types\r\n */\r\nvar MediaImageTypes;\r\n(function (MediaImageTypes) {\r\n MediaImageTypes[MediaImageTypes[\"Bottom\"] = 1] = \"Bottom\";\r\n MediaImageTypes[MediaImageTypes[\"Center\"] = 2] = \"Center\";\r\n MediaImageTypes[MediaImageTypes[\"Top\"] = 3] = \"Top\";\r\n})(MediaImageTypes = exports.MediaImageTypes || (exports.MediaImageTypes = {}));\r\n/**\r\n * Media Images Class Names\r\n */\r\nvar MediaImagesClassNames = new classNames_1.ClassNames([\r\n \"align-self-end\",\r\n \"align-self-center\",\r\n \"align-self-start\"\r\n]);\r\n/**\r\n * Media Order Types\r\n */\r\nvar MediaOrderTypes;\r\n(function (MediaOrderTypes) {\r\n MediaOrderTypes[MediaOrderTypes[\"Left\"] = 1] = \"Left\";\r\n MediaOrderTypes[MediaOrderTypes[\"Right\"] = 2] = \"Right\";\r\n})(MediaOrderTypes = exports.MediaOrderTypes || (exports.MediaOrderTypes = {}));\r\n/**\r\n * Media\r\n */\r\nvar _Media = /** @class */ (function (_super) {\r\n __extends(_Media, _super);\r\n // Constructor\r\n function _Media(props) {\r\n var _this = _super.call(this, HTML, props) || this;\r\n // Configure the collapse\r\n _this.configure();\r\n // Configure the parent\r\n _this.configureParent();\r\n return _this;\r\n }\r\n // Configure the card group\r\n _Media.prototype.configure = function () {\r\n // See if we are rendering the body first\r\n if (this.props.order == MediaOrderTypes.Right) {\r\n // Render the components\r\n this.renderBody();\r\n this.renderIcon();\r\n this.renderImage();\r\n }\r\n else {\r\n // Render the components\r\n this.renderIcon();\r\n this.renderImage();\r\n this.renderBody();\r\n }\r\n };\r\n // Method to render the body\r\n _Media.prototype.renderBody = function () {\r\n // Create the element\r\n var body = document.createElement(\"div\");\r\n body.classList.add(\"media-body\");\r\n this.el.appendChild(body);\r\n // Set the body content\r\n var content = this.props.body || \"\";\r\n if (typeof (content) === \"string\") {\r\n // Set the html\r\n body.innerHTML = content;\r\n }\r\n else {\r\n // Append the element\r\n body.appendChild(content);\r\n }\r\n // Parse the items\r\n var items = this.props.items || [];\r\n for (var i = 0; i < items.length; i++) {\r\n // Append the media object\r\n body.appendChild(exports.Media(items[i]).el);\r\n }\r\n // Call the render event\r\n this.props.onRenderBody ? this.props.onRenderBody(body) : null;\r\n };\r\n // Method to render the icon\r\n _Media.prototype.renderIcon = function () {\r\n // See if the icon properties exist\r\n if (this.props.icon) {\r\n // Create the icon\r\n var icon = GD.Icons ? GD.Icons(this.props.icon.icon, this.props.icon.height, this.props.icon.width) : null;\r\n if (icon) {\r\n // Parse the class names\r\n var classNames = (this.props.icon.className || \"\").trim().split(' ');\r\n for (var i = 0; i < classNames.length; i++) {\r\n var className_1 = classNames[i];\r\n // Add the class name\r\n className_1 ? icon.classList.add(className_1) : null;\r\n }\r\n // Get the icon type\r\n var className = MediaImagesClassNames.getByType(this.props.icon.type);\r\n if (className) {\r\n icon.classList.add(className);\r\n }\r\n // See if this is a link\r\n if (this.props.icon.url) {\r\n // Create a link\r\n var link = document.createElement(\"a\");\r\n link.href = this.props.image.url;\r\n link.appendChild(icon);\r\n this.el.appendChild(link);\r\n // See if a click event exists\r\n if (this.props.icon.onClick) {\r\n // Add the click event\r\n link.addEventListener(\"click\", this.props.icon.onClick);\r\n }\r\n }\r\n else {\r\n // Add the icon\r\n this.el.appendChild(icon);\r\n // See if a click event exists\r\n if (this.props.icon.onClick) {\r\n // Add the click event\r\n icon.addEventListener(\"click\", this.props.icon.onClick);\r\n }\r\n }\r\n }\r\n }\r\n };\r\n // Method to render the image\r\n _Media.prototype.renderImage = function () {\r\n // Create the image\r\n var image = this.props.image ? document.createElement(\"img\") : null;\r\n if (image) {\r\n // Set the properties\r\n image.alt = this.props.image.alt;\r\n image.className = this.props.image.className || \"\";\r\n image.src = this.props.image.src == null ? \"\" : this.props.image.src;\r\n // Get the image type\r\n var className = MediaImagesClassNames.getByType(this.props.icon.type);\r\n if (className) {\r\n image.classList.add(className);\r\n }\r\n // See if this is a link\r\n if (this.props.image.url) {\r\n // Create a link\r\n var link = document.createElement(\"a\");\r\n link.href = this.props.image.url;\r\n link.appendChild(image);\r\n this.el.insertBefore(link, this.el.firstChild);\r\n // See if a click event exists\r\n if (this.props.icon.onClick) {\r\n // Add the click event\r\n link.addEventListener(\"click\", this.props.icon.onClick);\r\n }\r\n }\r\n else {\r\n // Add the image\r\n this.el.appendChild(image);\r\n // See if a click event exists\r\n if (this.props.icon.onClick) {\r\n // Add the click event\r\n image.addEventListener(\"click\", this.props.icon.onClick);\r\n }\r\n }\r\n }\r\n };\r\n return _Media;\r\n}(base_1.Base));\r\nexports.Media = function (props) { return new _Media(props); };\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/media/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/mediaList/index.html.js":
/*!***********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/mediaList/index.html.js ***!
\***********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/mediaList/index.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/mediaList/index.js":
/*!******************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/mediaList/index.js ***!
\******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar media_1 = __webpack_require__(/*! ../media */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/media/index.js\");\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar HTML = __webpack_require__(/*! ./index.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/mediaList/index.html.js\");\r\n/**\r\n * Media List\r\n */\r\nvar _MediaList = /** @class */ (function (_super) {\r\n __extends(_MediaList, _super);\r\n // Constructor\r\n function _MediaList(props) {\r\n var _this = _super.call(this, HTML, props) || this;\r\n // Configure the collapse\r\n _this.configure();\r\n // Configure the parent\r\n _this.configureParent();\r\n return _this;\r\n }\r\n // Configure the card group\r\n _MediaList.prototype.configure = function () {\r\n // Render the items\r\n this.renderItems();\r\n };\r\n // Renders the items\r\n _MediaList.prototype.renderItems = function () {\r\n // Parse the items\r\n var items = this.props.items || [];\r\n for (var i = 0; i < items.length; i++) {\r\n // Render the media object\r\n var mediaObj = media_1.Media(items[i]);\r\n // Create the list item\r\n var item = document.createElement(\"li\");\r\n item.className = mediaObj.el.className;\r\n this.el.appendChild(item);\r\n // Move the media elements to the item\r\n while (mediaObj.el.firstChild) {\r\n // Move the element\r\n item.appendChild(mediaObj.el.firstChild);\r\n }\r\n }\r\n };\r\n return _MediaList;\r\n}(base_1.Base));\r\nexports.MediaList = function (props) { return new _MediaList(props); };\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/mediaList/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/modal/index.html.js":
/*!*******************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/modal/index.html.js ***!
\*******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\r\n
\r\n
\r\n
\r\n \r\n \r\n
\r\n \r\n \r\n
\r\n
\r\n
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/modal/index.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/modal/index.js":
/*!**************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/modal/index.js ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n__webpack_require__(/*! bootstrap/js/dist/modal */ \"./node_modules/.pnpm/registry.npmjs.org/bootstrap/4.5.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/modal.js\");\r\nvar core_1 = __webpack_require__(/*! ../../core */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/core.js\");\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar HTML = __webpack_require__(/*! ./index.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/modal/index.html.js\");\r\n/**\r\n * Modal\r\n * @param props The modal properties.\r\n */\r\nvar _Modal = /** @class */ (function (_super) {\r\n __extends(_Modal, _super);\r\n // Constructor\r\n function _Modal(props) {\r\n var _this = _super.call(this, HTML, props) || this;\r\n // Configure the collapse\r\n _this.configure();\r\n // Configure the events\r\n _this.configureEvents();\r\n // Configure the parent\r\n _this.configureParent();\r\n return _this;\r\n }\r\n // Configure the card group\r\n _Modal.prototype.configure = function () {\r\n // Set the modal attributes\r\n this.props.id ? this.el.id = this.props.id : null;\r\n this.props.disableFade ? null : this.el.classList.add(\"fade\");\r\n this.props.isStatic ? this.el.setAttribute(\"data-backdrop\", \"static\") : null;\r\n // Update the dialog\r\n var dialog = this.el.querySelector(\".modal-dialog\");\r\n this.props.isCentered ? dialog.classList.add(\"modal-dialog-centered\") : null;\r\n this.props.isLarge ? dialog.classList.add(\"modal-lg\") : null;\r\n this.props.isSmall ? dialog.classList.add(\"modal-sm\") : null;\r\n // Update the title\r\n this.setTitle(this.props.title);\r\n // See if we are hiding the close button\r\n if (this.props.hideCloseButton) {\r\n // Remove the close button\r\n dialog.querySelector(\"button.close\").remove();\r\n }\r\n // Update the body\r\n var body = this.el.querySelector(\".modal-body\");\r\n var content = this.props.body || \"\";\r\n if (typeof (content) === \"string\") {\r\n // Set the HTML\r\n body.innerHTML = content;\r\n }\r\n else {\r\n // Append the element\r\n body.appendChild(content);\r\n }\r\n // Update the footer\r\n var footer = this.el.querySelector(\".modal-footer\");\r\n content = this.props.footer || \"\";\r\n if (typeof (content) === \"string\") {\r\n // Set the HTML\r\n footer.innerHTML = content;\r\n }\r\n else {\r\n // Append the element\r\n footer.appendChild(content);\r\n }\r\n // Get the modal options and default the show flag\r\n var options = this.props.options || {};\r\n if (typeof (options.show) !== \"boolean\") {\r\n // Default the property\r\n options.show = false;\r\n }\r\n // Create the modal\r\n this._bootstrapObj = core_1.jQuery ? core_1.jQuery(this.el).modal(options) : null;\r\n };\r\n // Configure the events\r\n _Modal.prototype.configureEvents = function () {\r\n var _this = this;\r\n // Execute the events\r\n this.props.onRenderBody ? this.props.onRenderBody(this.el.querySelector(\".modal-body\")) : null;\r\n this.props.onRenderFooter ? this.props.onRenderFooter(this.el.querySelector(\".modal-footer\")) : null;\r\n // Get the close button\r\n var elClose = this.el.querySelector(\"button.close\");\r\n if (elClose) {\r\n // Add a click event\r\n elClose.addEventListener(\"click\", function () {\r\n // Hide the modal\r\n _this.hide();\r\n });\r\n }\r\n // See if there is a close event\r\n if (this.props.onClose) {\r\n // Add a hidden event\r\n this._bootstrapObj ? this._bootstrapObj.on(\"hidden.bs.modal\", function () {\r\n // Call the event\r\n _this.props.onClose(_this.el);\r\n }) : null;\r\n }\r\n };\r\n /**\r\n * Bootstrap\r\n */\r\n // Disposes the modal\r\n _Modal.prototype.dispose = function () { this._bootstrapObj ? this._bootstrapObj.modal(\"dispose\") : null; };\r\n // Updates the modal\r\n _Modal.prototype.handleUpdate = function () { this._bootstrapObj ? this._bootstrapObj.modal(\"handleUpdate\") : null; };\r\n // Hides the modal\r\n _Modal.prototype.hide = function () {\r\n // hide the modal\r\n this._bootstrapObj ? this._bootstrapObj.modal(\"hide\") : null;\r\n };\r\n // Shows the modal\r\n _Modal.prototype.show = function () {\r\n // Show the modal\r\n this._bootstrapObj ? this._bootstrapObj.modal(\"show\") : null;\r\n };\r\n // Toggles the modal\r\n _Modal.prototype.toggle = function () {\r\n // Toggle the modal\r\n this._bootstrapObj ? this._bootstrapObj.modal(\"toggle\") : null;\r\n };\r\n Object.defineProperty(_Modal.prototype, \"isVisible\", {\r\n /**\r\n * Public Interface\r\n */\r\n // Returns true if the modal is visible\r\n get: function () { return this.el.classList.contains(\"show\"); },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n // Updates the title\r\n _Modal.prototype.setTitle = function (title) {\r\n // Get the title\r\n var elTitle = this.el.querySelector(\".modal-title\");\r\n // Set the text\r\n elTitle.innerHTML = title == null ? \"\" : title;\r\n };\r\n return _Modal;\r\n}(base_1.Base));\r\nexports.Modal = function (props) { return new _Modal(props); };\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/modal/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/index.html.js":
/*!*****************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/index.html.js ***!
\*****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/index.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/index.js":
/*!************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/index.js ***!
\************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n__webpack_require__(/*! bootstrap/js/dist/tab */ \"./node_modules/.pnpm/registry.npmjs.org/bootstrap/4.5.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/tab.js\");\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar link_1 = __webpack_require__(/*! ./link */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/link.js\");\r\nvar HTML = __webpack_require__(/*! ./index.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/index.html.js\");\r\nvar HTMLTabs = __webpack_require__(/*! ./tabs.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/tabs.html.js\");\r\nvar HTMLVerticalTabs = __webpack_require__(/*! ./tabsVertical.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/tabsVertical.html.js\");\r\n/**\r\n * Navigation\r\n * @param props - The navigation properties.\r\n */\r\nvar _Nav = /** @class */ (function (_super) {\r\n __extends(_Nav, _super);\r\n // Constructor\r\n function _Nav(props) {\r\n var _this = _super.call(this, props.isTabs ? (props.isVertical ? HTMLVerticalTabs : HTMLTabs) : HTML, props) || this;\r\n _this._links = null;\r\n // Configure the collapse\r\n _this.configure();\r\n // Configure the parent\r\n _this.configureParent();\r\n return _this;\r\n }\r\n // Configure the card group\r\n _Nav.prototype.configure = function () {\r\n // Update the navigation\r\n var nav = this.el.querySelector(\".nav\");\r\n this.props.id ? nav.id = this.props.id : null;\r\n this.props.enableFill ? this.el.classList.add(\"nav-fill\") : null;\r\n this.props.isJustified ? this.el.classList.add(\"nav-justified\") : null;\r\n this.props.isPills ? this.el.classList.add(\"nav-pills\") : null;\r\n this.props.isTabs ? this.el.classList.add(\"nav-tabs\") : null;\r\n this.props.isVertical ? this.el.classList.add(\"flex-column\") : null;\r\n // Render the nav links\r\n this.renderItems();\r\n };\r\n // Renders the links\r\n _Nav.prototype.renderItems = function () {\r\n // Clear the links\r\n this._links = [];\r\n // Get the nav and tab elements\r\n var nav = this.el.querySelector(\".nav\") || this.el;\r\n var tabs = this.el.querySelector(\".tab-content\");\r\n // Parse the navigation items\r\n var links = this.props.items || [];\r\n for (var i = 0; i < links.length; i++) {\r\n // Create the link\r\n var link = new link_1.NavLink(links[i], tabs ? true : false);\r\n nav.appendChild(link.el);\r\n this._links.push(link);\r\n // See if we are rendering tabs\r\n if (tabs) {\r\n // Add the tab content\r\n tabs.appendChild(link.elTab);\r\n // See if the fade option is enabled\r\n if (this.props.fadeTabs) {\r\n // Set the class name\r\n link.elTab.classList.add(\"fade\");\r\n // See if the tab is active\r\n if (link.props.isActive) {\r\n // Set the class name\r\n link.elTab.classList.add(\"show\");\r\n }\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Public Interface\r\n */\r\n // Shows a tab\r\n _Nav.prototype.showTab = function (tabId) {\r\n // Ensure tabs exist\r\n if (this.props.isTabs) {\r\n // Parse the tabs\r\n for (var i = 0; i < this._links.length; i++) {\r\n var link = this._links[i];\r\n // See if this is the target tab\r\n if (tabId === i + 1 || link.elTab.id == tabId) {\r\n // Toggle it if it's not visible\r\n link.isVisible ? null : link.toggle(this.props.fadeTabs);\r\n }\r\n // Else, see if it's visible\r\n else if (link.isVisible) {\r\n // Toggle it\r\n link.toggle(this.props.fadeTabs);\r\n }\r\n }\r\n }\r\n };\r\n return _Nav;\r\n}(base_1.Base));\r\nexports.Nav = function (props) { return new _Nav(props); };\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/link.html.js":
/*!****************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/link.html.js ***!
\****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\r\n \r\n
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/link.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/link.js":
/*!***********************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/link.js ***!
\***********************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar HTML = __webpack_require__(/*! ./link.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/link.html.js\");\r\nvar HTMLTab = __webpack_require__(/*! ./tab.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/tab.html.js\");\r\n/**\r\n * Nav Link\r\n */\r\nvar NavLink = /** @class */ (function (_super) {\r\n __extends(NavLink, _super);\r\n // Constructor\r\n function NavLink(props, isTab) {\r\n var _this = _super.call(this, HTML, props) || this;\r\n _this._elLink = null;\r\n _this._elTab = null;\r\n // See if this is for a tab\r\n if (isTab) {\r\n // Create the tab element\r\n var el = document.createElement(\"div\");\r\n el.innerHTML = HTMLTab.trim();\r\n _this._elTab = el.firstChild;\r\n }\r\n // Configure the item\r\n _this.configure();\r\n // Configure the events\r\n _this.configureEvents();\r\n return _this;\r\n }\r\n // Configure the item\r\n NavLink.prototype.configure = function () {\r\n // Update the link\r\n this._elLink = this.el.querySelector(\"a.nav-link\");\r\n this.props.isActive ? this._elLink.classList.add(\"active\") : null;\r\n this.props.isDisabled ? this._elLink.classList.add(\"disabled\") : null;\r\n this._elLink.innerHTML = this.props.title == null ? \"\" : this.props.title;\r\n // See if this is a tab\r\n if (this._elTab) {\r\n var tabId = this.props.title.replace(/[^a-zA-Z0-9]/, \"\");\r\n // Set the properties\r\n this._elLink.setAttribute(\"href\", \"#\" + tabId);\r\n this._elLink.setAttribute(\"data-toggle\", \"tab\");\r\n this._elLink.setAttribute(\"aria-controls\", tabId);\r\n this._elLink.innerHTML = this.props.title == null ? \"\" : this.props.title;\r\n // Update the tab\r\n this._elTab.id = tabId;\r\n this._elTab.setAttribute(\"aria-labelledby\", tabId);\r\n // See if this tab is active\r\n if (this.props.isActive) {\r\n // Update the classes\r\n this._elTab.classList.add(\"active\");\r\n }\r\n // Set the content\r\n var content = this.props.tabContent || \"\";\r\n if (typeof (content) === \"string\") {\r\n // Set the html\r\n this._elTab.innerHTML = content;\r\n }\r\n else {\r\n // Append the element\r\n this._elTab.appendChild(content);\r\n }\r\n }\r\n else {\r\n // Set the properties\r\n this._elLink.setAttribute(\"href\", this.props.href || \"#\");\r\n }\r\n };\r\n // Configures the events\r\n NavLink.prototype.configureEvents = function () {\r\n var _this = this;\r\n // See if there is a click event\r\n if (this.props.onClick) {\r\n // Add a click event\r\n this.el.addEventListener(\"click\", function (ev) {\r\n // Execute the event\r\n _this.props.onClick(_this.props, ev);\r\n });\r\n }\r\n // Execute the tab render event\r\n this._elTab && this.props.onRenderTab ? this.props.onRenderTab(this.props, this._elTab) : null;\r\n };\r\n Object.defineProperty(NavLink.prototype, \"elTab\", {\r\n /**\r\n * Public Interface\r\n */\r\n // The HTML tab element\r\n get: function () { return this._elTab; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n Object.defineProperty(NavLink.prototype, \"isVisible\", {\r\n // Returns true if the link is visible\r\n get: function () { return this._elLink.classList.contains(\"active\"); },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n // Toggles a link\r\n NavLink.prototype.toggle = function (fadeTabs) {\r\n // See if this item is currently active\r\n if (this.isVisible) {\r\n // Hide this link and tab\r\n this._elLink.classList.remove(\"active\");\r\n this._elTab.classList.remove(\"active\");\r\n this._elTab.classList.remove(\"show\");\r\n }\r\n else {\r\n // Show this link and tab\r\n this._elLink.classList.add(\"active\");\r\n this._elTab.classList.add(\"active\");\r\n fadeTabs ? this._elTab.classList.add(\"show\") : null;\r\n }\r\n };\r\n return NavLink;\r\n}(base_1.Base));\r\nexports.NavLink = NavLink;\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/link.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/tab.html.js":
/*!***************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/tab.html.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/tab.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/tabs.html.js":
/*!****************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/tabs.html.js ***!
\****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/nav/tabsVertical.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/navbar/index.html.js":
/*!********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/navbar/index.html.js ***!
\********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/navbar/index.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/navbar/index.js":
/*!***************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/navbar/index.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar button_1 = __webpack_require__(/*! ../button */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/button/index.js\");\r\nvar item_1 = __webpack_require__(/*! ./item */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/navbar/item.js\");\r\nvar HTML = __webpack_require__(/*! ./index.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/navbar/index.html.js\");\r\n/**\r\n * Navbar Types\r\n */\r\nvar NavbarTypes;\r\n(function (NavbarTypes) {\r\n NavbarTypes[NavbarTypes[\"Dark\"] = 1] = \"Dark\";\r\n NavbarTypes[NavbarTypes[\"Light\"] = 2] = \"Light\";\r\n NavbarTypes[NavbarTypes[\"Primary\"] = 3] = \"Primary\";\r\n})(NavbarTypes = exports.NavbarTypes || (exports.NavbarTypes = {}));\r\n/**\r\n * Navbar\r\n */\r\nvar _Navbar = /** @class */ (function (_super) {\r\n __extends(_Navbar, _super);\r\n // Constructor\r\n function _Navbar(props) {\r\n var _this = _super.call(this, HTML, props) || this;\r\n _this._items = null;\r\n // Configure the collapse\r\n _this.configure();\r\n // Configure search\r\n _this.configureSearch();\r\n // Configure the events\r\n _this.configureEvents();\r\n // Configure the parent\r\n _this.configureParent();\r\n return _this;\r\n }\r\n // Configure the card group\r\n _Navbar.prototype.configure = function () {\r\n // See if there is a brand\r\n var brand = this.el.querySelector(\".navbar-brand\");\r\n if (this.props.brand) {\r\n // Update the brand\r\n this.props.brandUrl ? brand.href = this.props.brandUrl : null;\r\n brand.innerHTML = this.props.brand == null ? \"\" : this.props.brand;\r\n }\r\n else {\r\n // Remove the brand\r\n this.el.removeChild(brand);\r\n }\r\n // Update the nav bar\r\n var navbar = this.el.querySelector(\".navbar-collapse\");\r\n navbar.id = this.props.id || \"navbar_content\";\r\n // Set the toggle\r\n var toggler = this.el.querySelector(\".navbar-toggler\");\r\n toggler.setAttribute(\"aria-controls\", navbar.id);\r\n toggler.setAttribute(\"data-target\", \"#\" + navbar.id);\r\n // Add the classes based on the type\r\n var btnSearch = this.el.querySelector(\"button[type='submit']\");\r\n switch (this.props.type) {\r\n // Dark\r\n case NavbarTypes.Dark:\r\n // Add the class\r\n this.el.classList.add(\"navbar-dark\");\r\n this.el.classList.add(\"bg-dark\");\r\n btnSearch.classList.add(\"btn-outline-info\");\r\n break;\r\n // Primary\r\n case NavbarTypes.Primary:\r\n // Add the class\r\n this.el.classList.add(\"navbar-dark\");\r\n this.el.classList.add(\"bg-primary\");\r\n btnSearch.classList.add(\"btn-outline-light\");\r\n break;\r\n // Default - Light\r\n default:\r\n // Add the class\r\n this.el.classList.add(\"navbar-light\");\r\n this.el.classList.add(\"bg-light\");\r\n btnSearch.classList.add(\"btn-outline-primary\");\r\n break;\r\n }\r\n // Render the items\r\n this.renderItems();\r\n };\r\n // Configure the events\r\n _Navbar.prototype.configureEvents = function () {\r\n var props = this.props.searchBox || {};\r\n // See if search events exist\r\n var searchbox = this.el.querySelector(\"form input\");\r\n if (searchbox) {\r\n // Set a keydown event to catch the \"Enter\" key being pressed\r\n searchbox.addEventListener(\"keydown\", function (ev) {\r\n // See if the \"Enter\" key was pressed\r\n if (ev.keyCode == 13) {\r\n // Disable the postback\r\n ev.preventDefault();\r\n // See if there is a search event\r\n if (props.onSearch) {\r\n // Call the event\r\n props.onSearch(searchbox.value);\r\n }\r\n }\r\n });\r\n // See if a change event exists\r\n if (props.onChange) {\r\n // Add an input event\r\n searchbox.addEventListener(\"input\", function (ev) {\r\n // Call the event\r\n props.onChange(searchbox.value);\r\n });\r\n // Add a clear event\r\n searchbox.addEventListener(\"clear\", function (ev) {\r\n // Call the event\r\n props.onChange(searchbox.value);\r\n });\r\n // Edge has a bug where the clear event isn't triggered\r\n // See if this is the Edge browser\r\n if (window.navigator.userAgent.indexOf(\"Edge\") > 0) {\r\n // Detect the mouse click event\r\n searchbox.addEventListener(\"mouseup\", function () {\r\n var currentValue = searchbox.value;\r\n // Set a timeout to see if the value is cleared\r\n setTimeout(function () {\r\n // Compare the values\r\n if (currentValue != searchbox.value) {\r\n // Call the event\r\n props.onChange(searchbox.value);\r\n }\r\n }, 1);\r\n });\r\n }\r\n }\r\n }\r\n // See if a search event exists\r\n var button = this.el.querySelector(\"form button\");\r\n if (button && props.onSearch) {\r\n // Add a click event\r\n button.addEventListener(\"click\", function (ev) {\r\n // Prevent the page from moving to the top\r\n ev.preventDefault();\r\n // Call the event\r\n props.onSearch(searchbox.value);\r\n });\r\n }\r\n };\r\n // Configures search\r\n _Navbar.prototype.configureSearch = function () {\r\n // See if we are rendering a search box\r\n var search = this.el.querySelector(\"form\");\r\n if (this.props.enableSearch || this.props.searchBox) {\r\n var props = this.props.searchBox || {};\r\n // Update the searchbox\r\n var searchbox = search.querySelector(\"input\");\r\n searchbox.placeholder = props.placeholder || searchbox.placeholder;\r\n props.btnText ? searchbox.setAttribute(\"aria-label\", props.btnText) : null;\r\n // See if we are rendering a button\r\n var button = search.querySelector(\"button\");\r\n if (props.hideButton == true) {\r\n // Remove the button\r\n search.removeChild(button);\r\n }\r\n else {\r\n // Set the button type class name\r\n var className = button_1.ButtonClassNames.getByType(props.btnType);\r\n className ? button.classList.add(className) : null;\r\n }\r\n }\r\n else {\r\n // Remove the searchbox\r\n search.remove();\r\n }\r\n };\r\n // Render the items\r\n _Navbar.prototype.renderItems = function () {\r\n // Clear the list\r\n this._items = [];\r\n // Create the navbar list\r\n var list = this.el.querySelector(\"ul.navbar-nav\");\r\n // Parse the items\r\n var items = this.props.items || [];\r\n for (var i = 0; i < items.length; i++) {\r\n // Create the item\r\n var item = new item_1.NavbarItem(items[i], this.props);\r\n this._items.push(item);\r\n list.appendChild(item.el);\r\n }\r\n };\r\n return _Navbar;\r\n}(base_1.Base));\r\nexports.Navbar = function (props) { return new _Navbar(props); };\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/navbar/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/navbar/item.html.js":
/*!*******************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/navbar/item.html.js ***!
\*******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/navbar/item.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/navbar/item.js":
/*!**************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/navbar/item.js ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar dropdown_1 = __webpack_require__(/*! ../dropdown */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/dropdown/index.js\");\r\nvar HTML = __webpack_require__(/*! ./item.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/navbar/item.html.js\");\r\n/**\r\n * Navbar Item\r\n */\r\nvar NavbarItem = /** @class */ (function () {\r\n // Constructor\r\n function NavbarItem(props, parent) {\r\n this._el = null;\r\n this._parent = null;\r\n this._props = null;\r\n // Save the properties\r\n this._parent = parent;\r\n this._props = props;\r\n // Create the item\r\n var el = document.createElement(\"div\");\r\n el.innerHTML = HTML.trim();\r\n this._el = el.firstChild;\r\n // Configure the item\r\n this.configure();\r\n // Configure the events\r\n this.configureEvents();\r\n }\r\n // Configures the item\r\n NavbarItem.prototype.configure = function () {\r\n // See if this is a dropdown\r\n if (this._props.items) {\r\n // Render a dropdown\r\n this._el = dropdown_1.Dropdown({\r\n isReadonly: this._props.isDisabled,\r\n items: this._props.items,\r\n label: this._props.text,\r\n navFl: true,\r\n onChange: function (item, ev) {\r\n // Prevent the page from moving to the top\r\n ev.preventDefault();\r\n }\r\n }).el;\r\n // Update the link\r\n var link = this._el.querySelector(\".nav-link\");\r\n this._props.isActive ? link.classList.add(\"active\") : null;\r\n this._props.isDisabled ? link.classList.add(\"disabled\") : null;\r\n }\r\n // Else, ensure there is text\r\n else if (this._props.text) {\r\n // Update the link\r\n var link = this._el.querySelector(\"a\");\r\n this._props.isActive ? link.classList.add(\"active\") : link.removeChild(link.querySelector('span'));\r\n this._props.isDisabled ? link.classList.add(\"disabled\") : null;\r\n link.innerHTML = this._props.text == null ? \"\" : this._props.text;\r\n }\r\n };\r\n // Configures the events\r\n NavbarItem.prototype.configureEvents = function () {\r\n var _this = this;\r\n // Ensure it's not disabled\r\n if (this._props.isDisabled) {\r\n return;\r\n }\r\n // Add a click event\r\n this._el.addEventListener(\"click\", function (ev) {\r\n // Prevent the page from moving to the top\r\n ev.preventDefault();\r\n // Call the events\r\n _this._props.onClick ? _this._props.onClick(_this._props, ev) : null;\r\n _this._parent.onClick ? _this._parent.onClick(_this._props, ev) : null;\r\n });\r\n };\r\n Object.defineProperty(NavbarItem.prototype, \"el\", {\r\n /**\r\n * Public Interface\r\n */\r\n get: function () { return this._el; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return NavbarItem;\r\n}());\r\nexports.NavbarItem = NavbarItem;\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/navbar/item.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/pagination/index.html.js":
/*!************************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/pagination/index.html.js ***!
\************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/pagination/index.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/pagination/index.js":
/*!*******************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/pagination/index.js ***!
\*******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar HTML = __webpack_require__(/*! ./index.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/pagination/index.html.js\");\r\nvar HTMLItem = __webpack_require__(/*! ./item.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/pagination/item.html.js\");\r\n/**\r\n * Pagination Alignment\r\n */\r\nvar PaginationAlignment;\r\n(function (PaginationAlignment) {\r\n PaginationAlignment[PaginationAlignment[\"Center\"] = 1] = \"Center\";\r\n PaginationAlignment[PaginationAlignment[\"Left\"] = 2] = \"Left\";\r\n PaginationAlignment[PaginationAlignment[\"Right\"] = 3] = \"Right\";\r\n})(PaginationAlignment = exports.PaginationAlignment || (exports.PaginationAlignment = {}));\r\n/**\r\n * Pagination\r\n */\r\nvar _Pagination = /** @class */ (function (_super) {\r\n __extends(_Pagination, _super);\r\n // Constructor\r\n function _Pagination(props) {\r\n var _this = _super.call(this, HTML, props) || this;\r\n _this._items = null;\r\n // Configure the collapse\r\n _this.configure();\r\n // Configure the parent\r\n _this.configureParent();\r\n return _this;\r\n }\r\n // Configure the card group\r\n _Pagination.prototype.configure = function () {\r\n // Update the nav properties\r\n this.props.label ? this.el.setAttribute(\"aria-label\", this.props.label) : null;\r\n // Update the list\r\n var list = this.el.querySelector(\"ul\");\r\n this.props.isLarge ? list.classList.add(\"pagination-lg\") : null;\r\n this.props.isSmall ? list.classList.add(\"pagination-sm\") : null;\r\n // Read the alignment\r\n switch (this.props.alignment) {\r\n // Danger\r\n case PaginationAlignment.Center:\r\n list.classList.add(\"justify-content-center\");\r\n break;\r\n // Dark\r\n case PaginationAlignment.Right:\r\n list.classList.add(\"justify-content-end\");\r\n break;\r\n }\r\n // Render the page numbers\r\n this.renderPageNumbers(list);\r\n };\r\n // Configures the next/previous buttons, based on the active index\r\n _Pagination.prototype.configureNextPrevButtons = function (activePage) {\r\n // Update the previous button\r\n var prevItem = this._items[0];\r\n if (activePage == 1) {\r\n // Ensure the previous item is disabled\r\n prevItem.classList.add(\"disabled\");\r\n }\r\n else {\r\n // Ensure the previous item is enabled\r\n prevItem.classList.remove(\"disabled\");\r\n }\r\n // Update the next button\r\n var nextItem = this._items[this._items.length - 1];\r\n if (activePage == this._items.length - 2) {\r\n // Ensure the previous item is disabled\r\n nextItem.classList.add(\"disabled\");\r\n }\r\n else {\r\n // Ensure the previous item is enabled\r\n nextItem.classList.remove(\"disabled\");\r\n }\r\n };\r\n // Configure the events\r\n _Pagination.prototype.configureEvents = function (item) {\r\n var _this = this;\r\n // See if this is the next or previous item and skip it\r\n var link = item.querySelector(\"a\").getAttribute(\"aria-label\");\r\n if (link == \"Previous\" || link == \"Next\") {\r\n var isPrevious_1 = link == \"Previous\";\r\n // Add a click event\r\n item.addEventListener(\"click\", function (ev) {\r\n // Prevent the page from moving to the top\r\n ev.preventDefault();\r\n // Do nothing if it's disabled\r\n if (item.classList.contains(\"disabled\")) {\r\n return;\r\n }\r\n // Parse the items, excluding the next/previous items\r\n for (var i = 1; i < _this._items.length - 1; i++) {\r\n var item_1 = _this._items[i];\r\n // See if this item is active\r\n if (item_1.classList.contains(\"active\")) {\r\n // See if the previous button was clicked\r\n if (isPrevious_1) {\r\n // Click the previous item if it's available\r\n i - 1 > 0 ? _this._items[i - 1].click() : null;\r\n }\r\n else {\r\n // Click the next item if it's available\r\n i < _this._items.length - 2 ? _this._items[i + 1].click() : null;\r\n }\r\n // Break from the loop\r\n break;\r\n }\r\n }\r\n });\r\n }\r\n else {\r\n var pageNumber_1 = parseInt(link);\r\n // Add a click event\r\n item.addEventListener(\"click\", function (ev) {\r\n // Prevent the page from moving to the top\r\n ev.preventDefault();\r\n // Parse the active items\r\n var activeItems = _this.el.querySelectorAll(\".page-item.active\");\r\n for (var i = 0; i < activeItems.length; i++) {\r\n var item_2 = activeItems[i];\r\n // Clear the active class\r\n item_2.classList.remove(\"active\");\r\n // Remove the active span\r\n var span_1 = item_2.querySelector(\"span\");\r\n span_1 ? span_1.remove() : null;\r\n }\r\n // Make this item active\r\n item.classList.add(\"active\");\r\n // Add the span\r\n var span = document.createElement(\"span\");\r\n span.classList.add(\"sr-only\");\r\n span.innerHTML = \"(current)\";\r\n item.appendChild(span);\r\n // Configure the next/previous buttons\r\n _this.configureNextPrevButtons(pageNumber_1);\r\n // Class the click event\r\n _this.props.onClick ? _this.props.onClick(parseInt(item.innerHTML), ev) : null;\r\n });\r\n }\r\n };\r\n // Creates an page number item\r\n _Pagination.prototype.createItem = function (text) {\r\n // Create the item\r\n var el = document.createElement(\"div\");\r\n el.innerHTML = HTMLItem.trim();\r\n var item = el.firstChild;\r\n this._items.push(item);\r\n // Update the link\r\n var link = item.querySelector(\"a\");\r\n link.innerHTML = text;\r\n link.setAttribute(\"aria-label\", link.innerHTML);\r\n // Configure the events\r\n this.configureEvents(item);\r\n // Return the item\r\n return item;\r\n };\r\n // Renders the page numbers\r\n _Pagination.prototype.renderPageNumbers = function (list) {\r\n // Clear the items\r\n this._items = [];\r\n // Create the previous link\r\n var item = this.createItem(\"Previous\");\r\n list.appendChild(item);\r\n // Loop for the number of pages to create\r\n // Parse the number of pages\r\n var pages = this.props.numberOfPages || 1;\r\n for (var i = 1; i <= pages; i++) {\r\n // Create a link\r\n item = this.createItem(i.toString());\r\n list.appendChild(item);\r\n }\r\n // Create the next link\r\n item = this.createItem(\"Next\");\r\n list.appendChild(item);\r\n // Set the first page number as active\r\n this._items[1].click();\r\n };\r\n return _Pagination;\r\n}(base_1.Base));\r\nexports.Pagination = function (props) { return new _Pagination(props); };\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/pagination/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/pagination/item.html.js":
/*!***********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/pagination/item.html.js ***!
\***********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/pagination/item.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/panel/index.html.js":
/*!*******************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/panel/index.html.js ***!
\*******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/panel/index.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/panel/index.js":
/*!**************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/panel/index.js ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar modal_1 = __webpack_require__(/*! ../modal */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/modal/index.js\");\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar HTML = __webpack_require__(/*! ./index.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/panel/index.html.js\");\r\n/**\r\n * Panel Types\r\n */\r\nvar PanelTypes;\r\n(function (PanelTypes) {\r\n PanelTypes[PanelTypes[\"Full\"] = 1] = \"Full\";\r\n PanelTypes[PanelTypes[\"Large\"] = 2] = \"Large\";\r\n PanelTypes[PanelTypes[\"Medium\"] = 3] = \"Medium\";\r\n PanelTypes[PanelTypes[\"Small\"] = 4] = \"Small\";\r\n PanelTypes[PanelTypes[\"XLarge\"] = 5] = \"XLarge\";\r\n})(PanelTypes = exports.PanelTypes || (exports.PanelTypes = {}));\r\n/**\r\n * Panel\r\n */\r\nvar _Panel = /** @class */ (function (_super) {\r\n __extends(_Panel, _super);\r\n // Constructor\r\n function _Panel(props) {\r\n var _this = _super.call(this, HTML, props) || this;\r\n _this._modal = null;\r\n // Configure the collapse\r\n _this.configure();\r\n // Configure the parent\r\n _this.configureParent();\r\n return _this;\r\n }\r\n // Configure the card group\r\n _Panel.prototype.configure = function () {\r\n // Create the modal\r\n var modalProps = this.props.modalProps || {};\r\n modalProps.el = modalProps.el || this.el;\r\n this._modal = modal_1.Modal(modalProps);\r\n // Set the panel type\r\n switch (this.props.type) {\r\n // Full\r\n case PanelTypes.Full:\r\n // Add the class name\r\n this._modal.el.classList.add(\"panel-full\");\r\n break;\r\n // Large\r\n case PanelTypes.Large:\r\n // Add the class name\r\n this._modal.el.classList.add(\"panel-lg\");\r\n break;\r\n // Small\r\n case PanelTypes.Small:\r\n // Add the class name\r\n this._modal.el.classList.add(\"panel-sm\");\r\n break;\r\n // Extra Large\r\n case PanelTypes.XLarge:\r\n // Add the class name\r\n this._modal.el.classList.add(\"panel-xl\");\r\n break;\r\n // Default - Medium\r\n default:\r\n // Add the class name\r\n this._modal.el.classList.add(\"panel-md\");\r\n break;\r\n }\r\n };\r\n /**\r\n * Public Interface\r\n */\r\n // Disposes the modal\r\n _Panel.prototype.dispose = function () { this._modal.dispose(); };\r\n // Hides the modal\r\n _Panel.prototype.hide = function () { return this._modal.hide(); };\r\n Object.defineProperty(_Panel.prototype, \"modal\", {\r\n // Returns the modal\r\n get: function () { return this._modal; },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n // Shows the modal\r\n _Panel.prototype.show = function () { return this._modal.show(); };\r\n // Toggles the modal\r\n _Panel.prototype.toggle = function () { return this._modal.toggle(); };\r\n return _Panel;\r\n}(base_1.Base));\r\nexports.Panel = function (props) { return new _Panel(props); };\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/panel/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/popover/index.js":
/*!****************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/popover/index.js ***!
\****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n__webpack_require__(/*! bootstrap/js/dist/popover */ \"./node_modules/.pnpm/registry.npmjs.org/bootstrap/4.5.0_jquery@3.5.1+popper.js@1.16.1/node_modules/bootstrap/js/dist/popover.js\");\r\n__webpack_require__(/*! popper.js */ \"./node_modules/.pnpm/registry.npmjs.org/popper.js/1.16.1/node_modules/popper.js/dist/esm/popper.js\");\r\nvar core_1 = __webpack_require__(/*! ../../core */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/core.js\");\r\nvar button_1 = __webpack_require__(/*! ../button */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/button/index.js\");\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\n/**\r\n * Popover Types\r\n */\r\nvar PopoverTypes;\r\n(function (PopoverTypes) {\r\n PopoverTypes[PopoverTypes[\"Auto\"] = 1] = \"Auto\";\r\n PopoverTypes[PopoverTypes[\"Bottom\"] = 2] = \"Bottom\";\r\n PopoverTypes[PopoverTypes[\"Left\"] = 3] = \"Left\";\r\n PopoverTypes[PopoverTypes[\"Right\"] = 4] = \"Right\";\r\n PopoverTypes[PopoverTypes[\"Top\"] = 5] = \"Top\";\r\n})(PopoverTypes = exports.PopoverTypes || (exports.PopoverTypes = {}));\r\n/**\r\n * Popover\r\n */\r\nvar _Popover = /** @class */ (function (_super) {\r\n __extends(_Popover, _super);\r\n // Constructor\r\n function _Popover(props) {\r\n var _this = _super.call(this, \"\", props) || this;\r\n _this._popovers = null;\r\n // Configure the collapse\r\n _this.configure();\r\n // Configure the events\r\n _this.configureEvents();\r\n // Configure the parent, if the target wasn't specified\r\n _this.props.target ? null : _this.configureParent();\r\n return _this;\r\n }\r\n // Configure the card group\r\n _Popover.prototype.configure = function () {\r\n // Ensure the main popover element exists\r\n // This will ensure the popovers are wrapped with a parent element with the \"bs\" class applied to it.\r\n this._popovers = document.querySelector(\"#bs-popovers\");\r\n if (this._popovers == null) {\r\n // Create the main element\r\n this._popovers = document.createElement(\"div\");\r\n this._popovers.classList.add(\"bs\");\r\n this._popovers.id = \"bs-popovers\";\r\n // Add it to the page\r\n document.body.appendChild(this._popovers);\r\n }\r\n // Set the options to target the main popover element\r\n var options = this.props.options || {};\r\n options.container = \"#bs-popovers\";\r\n // See if the placement needs to be set\r\n if (options.placement == null) {\r\n // Set the type\r\n switch (this.props.type) {\r\n // Auto\r\n case PopoverTypes.Auto:\r\n options.placement = \"auto\";\r\n break;\r\n // Bottom\r\n case PopoverTypes.Bottom:\r\n options.placement = \"bottom\";\r\n break;\r\n // Left\r\n case PopoverTypes.Left:\r\n options.placement = \"left\";\r\n break;\r\n // Right\r\n case PopoverTypes.Right:\r\n options.placement = \"right\";\r\n break;\r\n // Top\r\n case PopoverTypes.Top:\r\n options.placement = \"top\";\r\n break;\r\n }\r\n }\r\n // See if we are targeting an element\r\n var popover = null;\r\n if (this.props.target) {\r\n // Set the popover to the target element\r\n popover = this.props.target;\r\n // Ensure the attributes are set in the target element\r\n popover.setAttribute(\"tabindex\", \"0\");\r\n popover.setAttribute(\"toggle\", \"popover\");\r\n popover.setAttribute(\"trigger\", \"focus\");\r\n // Update this element\r\n this.el = popover;\r\n }\r\n else {\r\n // Create the button\r\n var btnProps = this.props.btnProps || {};\r\n btnProps.isLink = this.props.isDismissible ? true : false;\r\n btnProps.toggle = \"popover\";\r\n this.props.isDismissible ? btnProps.trigger = \"focus\" : null;\r\n var button = button_1.Button(btnProps);\r\n // Update this element\r\n this.el = button.el;\r\n // Set the popover title and content\r\n typeof (options.title) === \"string\" ? this.el.setAttribute(\"title\", options.title) : null;\r\n typeof (options.content) === \"string\" ? this.el.setAttribute(\"data-content\", options.content) : null;\r\n }\r\n // Create the popover\r\n this._bootstrapObj = core_1.jQuery ? core_1.jQuery(this.el).popover(options) : null;\r\n };\r\n // Configures the events\r\n _Popover.prototype.configureEvents = function () {\r\n // Set a click event\r\n this.el.addEventListener(\"click\", function (ev) {\r\n // Prevent the page from moving to the top\r\n ev.preventDefault();\r\n });\r\n };\r\n /**\r\n * Bootstrap\r\n */\r\n // Disposes the popover\r\n _Popover.prototype.dispose = function () { this._bootstrapObj ? this._bootstrapObj.popover(\"dispose\") : null; };\r\n // Disables the popover\r\n _Popover.prototype.disable = function () { this._bootstrapObj ? this._bootstrapObj.popover(\"disable\") : null; };\r\n // Enables the popover\r\n _Popover.prototype.enable = function () { this._bootstrapObj ? this._bootstrapObj.popover(\"enable\") : null; };\r\n // Hides the popover\r\n _Popover.prototype.hide = function () { this._bootstrapObj ? this._bootstrapObj.popover(\"hide\") : null; };\r\n // Shows the popover\r\n _Popover.prototype.show = function () { this._bootstrapObj ? this._bootstrapObj.popover(\"show\") : null; };\r\n // Toggles the popover\r\n _Popover.prototype.toggle = function () { this._bootstrapObj ? this._bootstrapObj.popover(\"toggle\") : null; };\r\n // Enables toggling \r\n _Popover.prototype.toggleEnabled = function () { this._bootstrapObj ? this._bootstrapObj.popover(\"toggleEnabled\") : null; };\r\n // Updates the popover\r\n _Popover.prototype.update = function () { this._bootstrapObj ? this._bootstrapObj.popover(\"update\") : null; };\r\n return _Popover;\r\n}(base_1.Base));\r\nexports.Popover = function (props) { return new _Popover(props); };\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/popover/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/progress/index.html.js":
/*!**********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/progress/index.html.js ***!
\**********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\r\n \r\n
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/progress/index.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/progress/index.js":
/*!*****************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/progress/index.js ***!
\*****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar HTML = __webpack_require__(/*! ./index.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/progress/index.html.js\");\r\n/**\r\n * Progress\r\n */\r\nvar _Progress = /** @class */ (function (_super) {\r\n __extends(_Progress, _super);\r\n // Constructor\r\n function _Progress(props) {\r\n var _this = _super.call(this, HTML, props) || this;\r\n // Configure the collapse\r\n _this.configure();\r\n // Configure the parent\r\n _this.configureParent();\r\n return _this;\r\n }\r\n // Configure the card group\r\n _Progress.prototype.configure = function () {\r\n // Set the default values\r\n var maxValue = typeof (this.props.max) === \"number\" ? this.props.max : 100;\r\n var minValue = typeof (this.props.min) === \"number\" ? this.props.min : 0;\r\n var size = typeof (this.props.size) === \"number\" ? this.props.size : 0;\r\n // Update the progress bar\r\n var progressBar = this.el.querySelector(\".progress-bar\");\r\n progressBar.style.width = size + \"%\";\r\n progressBar.setAttribute(\"aria-valuenow\", size.toString());\r\n progressBar.setAttribute(\"aria-valuemin\", minValue.toString());\r\n progressBar.setAttribute(\"aria-valuemax\", maxValue.toString());\r\n this.props.isAnimated ? progressBar.classList.add(\"progress-bar-animated\") : null;\r\n this.props.isStriped ? progressBar.classList.add(\"progress-bar-striped\") : null;\r\n this.props.label ? progressBar.innerHTML = this.props.label : null;\r\n };\r\n Object.defineProperty(_Progress.prototype, \"progressBar\", {\r\n /**\r\n * Public Interface\r\n */\r\n // Return the progress bar element\r\n get: function () { return this.el.querySelector(\".progress-bar\"); },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n return _Progress;\r\n}(base_1.Base));\r\nexports.Progress = function (props) { return new _Progress(props); };\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/progress/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/progressGroup/index.html.js":
/*!***************************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/progressGroup/index.html.js ***!
\***************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/progressGroup/index.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/progressGroup/index.js":
/*!**********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/progressGroup/index.js ***!
\**********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar progress_1 = __webpack_require__(/*! ../progress */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/progress/index.js\");\r\nvar HTML = __webpack_require__(/*! ./index.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/progressGroup/index.html.js\");\r\n/**\r\n * Progress Group\r\n * @param props The progress group properties.\r\n */\r\nvar _ProgressGroup = /** @class */ (function (_super) {\r\n __extends(_ProgressGroup, _super);\r\n // Constructor\r\n function _ProgressGroup(props) {\r\n var _this = _super.call(this, HTML, props) || this;\r\n // Configure the collapse\r\n _this.configure();\r\n // Configure the parent\r\n _this.configureParent();\r\n return _this;\r\n }\r\n // Configure the card group\r\n _ProgressGroup.prototype.configure = function () {\r\n // Parse the progress bars\r\n var progressbars = this.props.progressbars || [];\r\n for (var i = 0; i < progressbars.length; i++) {\r\n // Add the progress bar\r\n this.el.appendChild(progress_1.Progress(progressbars[i]).progressBar);\r\n }\r\n };\r\n return _ProgressGroup;\r\n}(base_1.Base));\r\nexports.ProgressGroup = function (props) { return new _ProgressGroup(props); };\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/progressGroup/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/spinner/index.html.js":
/*!*********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/spinner/index.html.js ***!
\*********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\r\n Loading...\r\n
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/spinner/index.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/spinner/index.js":
/*!****************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/spinner/index.js ***!
\****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar classNames_1 = __webpack_require__(/*! ../classNames */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/classNames.js\");\r\nvar HTML = __webpack_require__(/*! ./index.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/spinner/index.html.js\");\r\n/**\r\n * Spinner Types\r\n */\r\nvar SpinnerTypes;\r\n(function (SpinnerTypes) {\r\n SpinnerTypes[SpinnerTypes[\"Danger\"] = 1] = \"Danger\";\r\n SpinnerTypes[SpinnerTypes[\"Dark\"] = 2] = \"Dark\";\r\n SpinnerTypes[SpinnerTypes[\"Info\"] = 3] = \"Info\";\r\n SpinnerTypes[SpinnerTypes[\"Light\"] = 4] = \"Light\";\r\n SpinnerTypes[SpinnerTypes[\"Primary\"] = 5] = \"Primary\";\r\n SpinnerTypes[SpinnerTypes[\"Secondary\"] = 6] = \"Secondary\";\r\n SpinnerTypes[SpinnerTypes[\"Success\"] = 7] = \"Success\";\r\n SpinnerTypes[SpinnerTypes[\"Warning\"] = 8] = \"Warning\";\r\n})(SpinnerTypes = exports.SpinnerTypes || (exports.SpinnerTypes = {}));\r\n/**\r\n * Spinner Class Names\r\n */\r\nexports.SpinnerClassNames = new classNames_1.ClassNames([\r\n \"text-danger\",\r\n \"text-dark\",\r\n \"text-info\",\r\n \"text-light\",\r\n \"text-primary\",\r\n \"text-secondary\",\r\n \"text-success\",\r\n \"text-warning\"\r\n]);\r\n/**\r\n * Spinner\r\n * @param props The spinner properties.\r\n */\r\nvar _Spinner = /** @class */ (function (_super) {\r\n __extends(_Spinner, _super);\r\n // Constructor\r\n function _Spinner(props) {\r\n var _this = _super.call(this, HTML, props) || this;\r\n // Configure the collapse\r\n _this.configure();\r\n // Configure the parent\r\n _this.configureParent();\r\n return _this;\r\n }\r\n // Configure the card group\r\n _Spinner.prototype.configure = function () {\r\n // Set the class name\r\n if (this.props.isGrowing) {\r\n // Set the class\r\n this.el.classList.add(\"spinner-grow\" + (this.props.isSmall ? \"-sm\" : \"\"));\r\n }\r\n else {\r\n // Set the class\r\n this.el.classList.add(\"spinner-border\" + (this.props.isSmall ? \"-sm\" : \"\"));\r\n }\r\n // Set the class name\r\n this.el.classList.add(exports.SpinnerClassNames.getByType(this.props.type) || exports.SpinnerClassNames.getByType(SpinnerTypes.Primary));\r\n // See if text is defined\r\n if (this.props.text) {\r\n // Update the text\r\n this.el.querySelector(\"span\").innerHTML = this.props.text;\r\n }\r\n };\r\n return _Spinner;\r\n}(base_1.Base));\r\nexports.Spinner = function (props) { return new _Spinner(props); };\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/spinner/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/table/index.html.js":
/*!*******************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/table/index.html.js ***!
\*******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\r\n \r\n \r\n
\n`;\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/table/index.html.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/table/index.js":
/*!**************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/table/index.js ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nvar __extends = (this && this.__extends) || (function () {\r\n var extendStatics = function (d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar base_1 = __webpack_require__(/*! ../base */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/base.js\");\r\nvar HTML = __webpack_require__(/*! ./index.html */ \"./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/table/index.html.js\");\r\n/**\r\n * Table\r\n */\r\nvar _Table = /** @class */ (function (_super) {\r\n __extends(_Table, _super);\r\n // Constructor\r\n function _Table(props) {\r\n var _this = _super.call(this, HTML, props) || this;\r\n // Configure the collapse\r\n _this.configure();\r\n // Configure the parent\r\n _this.configureParent();\r\n return _this;\r\n }\r\n // Configure the card group\r\n _Table.prototype.configure = function () {\r\n // See if columns are defined\r\n var head = this.el.querySelector(\"thead\");\r\n if (this.props.columns) {\r\n // Append the row\r\n var row = document.createElement(\"tr\");\r\n head.appendChild(row);\r\n // Parse the columns\r\n for (var i = 0; i < this.props.columns.length; i++) {\r\n // Append the column\r\n var column = document.createElement(\"th\");\r\n row.appendChild(column);\r\n // Render the column\r\n this.renderColumn(i, column, this.props.columns[i]);\r\n }\r\n // See if there is an event\r\n if (this.props.onRenderHeaderRow) {\r\n // Call the event\r\n this.props.onRenderHeaderRow(row);\r\n }\r\n }\r\n // Add the rows\r\n this.addRows(this.props.rows);\r\n };\r\n // Renders a column\r\n _Table.prototype.renderColumn = function (colIdx, column, props) {\r\n var _this = this;\r\n column.innerHTML = props.isHidden ? \"\" : props.title || props.name;\r\n column.setAttribute(\"scope\", \"col\");\r\n // See if there is an event for this column\r\n if (props.onRenderHeader) {\r\n // Call the event\r\n props.onRenderHeader(column, props);\r\n }\r\n // See if there is an event for this component\r\n if (this.props.onRenderHeaderCell) {\r\n // Call the event\r\n this.props.onRenderHeaderCell(column, props);\r\n }\r\n // See if we are sorting this column\r\n if (props.enableSort) {\r\n // Add a click event\r\n column.addEventListener(\"click\", function (ev) {\r\n // Sort the table data\r\n _this.sortTable(colIdx, column, props);\r\n });\r\n }\r\n // See if there is a click event\r\n if (props.onClickHeader || this.props.onClickHeader) {\r\n // Add the click event\r\n column.addEventListener(\"click\", function (ev) {\r\n // Call the event\r\n props.onClickHeader ? props.onClickHeader(column, props) : null;\r\n _this.props.onClickHeader ? _this.props.onClickHeader(column, props) : null;\r\n });\r\n }\r\n };\r\n // Renders a cell\r\n _Table.prototype.renderCell = function (row, props, data) {\r\n var _this = this;\r\n // Create the cell\r\n var cell = document.createElement(\"td\");\r\n cell.className = props.className || \"\";\r\n cell.innerHTML = data[props.name] == null ? \"\" : data[props.name];\r\n row.appendChild(cell);\r\n // See if there is a scope\r\n if (props.scope) {\r\n // Set the scope\r\n cell.setAttribute(\"scope\", props.scope);\r\n }\r\n // See if there is an event for this column\r\n if (props.onRenderCell) {\r\n // Call the event\r\n props.onRenderCell(cell, props, data);\r\n }\r\n // See if there is an event for this component\r\n if (this.props.onRenderCell) {\r\n // Call the event\r\n this.props.onRenderCell(cell, props, data);\r\n }\r\n // See if there is a click event\r\n if (props.onClickCell || this.props.onClickCell) {\r\n // Add the click event\r\n cell.addEventListener(\"click\", function (ev) {\r\n // Call the event\r\n props.onClickCell ? props.onClickCell(cell, props, data) : null;\r\n _this.props.onClickCell ? _this.props.onClickCell(cell, props, data) : null;\r\n });\r\n }\r\n };\r\n // Renders a row\r\n _Table.prototype.renderRow = function (row, data) {\r\n // See if columns\r\n for (var i = 0; i < this.props.columns.length; i++) {\r\n // Create the cell\r\n this.renderCell(row, this.props.columns[i], data);\r\n }\r\n // See if there is an event\r\n if (this.props.onRenderRow) {\r\n // Call the event\r\n this.props.onRenderRow(row, data);\r\n }\r\n };\r\n // Sorts the table\r\n _Table.prototype.sortTable = function (colIdx, column, props) {\r\n var sortAscending = true;\r\n // Get the sort icon\r\n var head = this.el.querySelector(\"thead\");\r\n var elIcon = head.querySelector(\".sort-icon\");\r\n if (elIcon) {\r\n // Remove the sort icon\r\n elIcon.parentElement.removeChild(elIcon);\r\n }\r\n // Get the sort attribute\r\n if (column.hasAttribute(\"data-sort-asc\")) {\r\n // Set the flag\r\n sortAscending = false;\r\n // Remove the attribute\r\n column.removeAttribute(\"data-sort-asc\");\r\n }\r\n else {\r\n // Add the attribute\r\n column.setAttribute(\"data-sort-asc\", \"true\");\r\n }\r\n // Create the icon\r\n elIcon = document.createElement(\"i\");\r\n elIcon.className = \"ml-1 sort-icon\";\r\n elIcon.innerHTML = sortAscending ? \"↑\" : \"↓\";\r\n column.appendChild(elIcon);\r\n // Parse the table rows\r\n var idx = -1;\r\n var body = this.el.querySelector(\"tbody\");\r\n while (++idx < body.children.length) {\r\n var elRow = body.children[idx];\r\n var text = elRow.children[colIdx].innerText;\r\n var value = (text == null ? \"\" : text).toString().toLowerCase();\r\n // Loop through the previous items\r\n var counter = idx;\r\n while (--counter >= 0) {\r\n var elPreviousRow = body.children[counter];\r\n var elPreviousCol = elPreviousRow.children[colIdx];\r\n var prevValue = (elPreviousCol ? elPreviousCol.innerText : \"\").toLowerCase();\r\n // Compare the values\r\n if (sortAscending ? value < prevValue : value > prevValue) {\r\n // Switch the values\r\n body.insertBefore(elRow, elPreviousRow);\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Public Interface\r\n */\r\n // Method to add the rows\r\n _Table.prototype.addRows = function (rows) {\r\n if (rows === void 0) { rows = []; }\r\n var tbody = this.el.querySelector(\"tbody\");\r\n // Parse the rows\r\n for (var i = 0; i < rows.length; i++) {\r\n // Create the row\r\n var row = document.createElement(\"tr\");\r\n tbody.appendChild(row);\r\n // Render the row\r\n this.renderRow(row, rows[i]);\r\n }\r\n };\r\n return _Table;\r\n}(base_1.Base));\r\nexports.Table = function (props) { return new _Table(props); };\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/table/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/toast/index.html.js":
/*!*******************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-bs/2.5.7/node_modules/gd-bs/build/components/toast/index.html.js ***!
\*******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports) {
eval("module.exports = `\n
\";\r\n break;\r\n case \"User\":\r\n case \"UserMulti\":\r\n for (var i = 0; i < ctx.CurrentFieldValue.length; i++) {\r\n var userValue = ctx.CurrentFieldValue[i];\r\n // Add the user value\r\n fieldValue +=\r\n // User Lookup ID\r\n userValue.EntityData.SPUserID +\r\n // Delimiter\r\n sptypes_1.SPTypes.ClientTemplatesUtility.UserLookupDelimitString +\r\n // User Lookup Value\r\n userValue.DisplayText +\r\n // Optional Delimiter\r\n ((i == ctx.CurrentFieldValue.length - 1 ? \"\" : sptypes_1.SPTypes.ClientTemplatesUtility.UserLookupDelimitString));\r\n }\r\n break;\r\n }\r\n ;\r\n // Update the current field value\r\n ctx.CurrentFieldValue = fieldValue;\r\n }\r\n // Determine the control mode\r\n var controlMode = sptypes_1.SPTypes.ControlMode.Display;\r\n if (requireValueFl && (fieldValue == null || fieldValue == \"\")) {\r\n // Inherit the control mode\r\n controlMode = ctx.ControlMode;\r\n }\r\n // Return the display value of the field\r\n return exports.JSLink.renderField(ctx, field, controlMode);\r\n },\r\n /**\r\n * Disable quick edit for the specified field.\r\n * @param ctx - The client context.\r\n * @param field - The field to disable edit.\r\n */\r\n disableQuickEdit: function (ctx, field) {\r\n // Ensure we are in grid edit mode\r\n if (ctx.inGridMode) {\r\n // Disable editing for this field\r\n field.AllowGridEditing = false;\r\n return \"\";\r\n }\r\n // Return the default field value html\r\n return exports.JSLink.renderField(ctx, field);\r\n },\r\n /**\r\n * Returns the list view.\r\n * @param ctx - The client context.\r\n */\r\n getListView: function (ctx) {\r\n // Get the webpart\r\n var wp = exports.JSLink.getWebPart(ctx);\r\n if (wp) {\r\n // Find the list form table\r\n wp = wp.querySelector(\".ms-formtable\");\r\n }\r\n // Return the list view\r\n return wp;\r\n },\r\n /**\r\n * Returns the list view items.\r\n * @param ctx - The client context.\r\n */\r\n getListViewItems: function (ctx) {\r\n // Return the list view items\r\n return ctx.ListData ? ctx.ListData.Row : [];\r\n },\r\n /**\r\n * Returns the selected list view items\r\n */\r\n getListViewSelectedItems: function () {\r\n // Return the selected items\r\n return lib_1.ContextInfo.window[\"SP\"].ListOperation.Selection.getSelectedItems();\r\n },\r\n /**\r\n * Returns the webpart containing the JSLink field/form/view.\r\n * @param ctx - The client context.\r\n */\r\n getWebPart: function (ctx) {\r\n // Return the webpart\r\n return lib_1.ContextInfo.document.querySelector(\"#WebPart\" + (ctx.FormUniqueId || ctx.wpq));\r\n },\r\n /**\r\n * Hides the specified field.\r\n * @param ctx - The client context.\r\n * @param field - The field to hide.\r\n */\r\n hideField: function (ctx, field) {\r\n // Ensure the hide event has been created\r\n if (!exports.JSLink._hideEventFl) {\r\n // Set the flag\r\n exports.JSLink._hideEventFl = true;\r\n // Create the event\r\n lib_1.ContextInfo.window.addEventListener(\"load\", function () {\r\n // Query for the elements to hide\r\n var fieldElements = lib_1.ContextInfo.document.querySelectorAll(\".hide-field\");\r\n for (var _i = 0, fieldElements_1 = fieldElements; _i < fieldElements_1.length; _i++) {\r\n var fieldElement = fieldElements_1[_i];\r\n // Get the parent row\r\n var parentRow = fieldElement.parentNode && fieldElement.parentNode.parentNode ? fieldElement.parentNode.parentNode : null;\r\n if (parentRow) {\r\n // Ensure the parent row exists\r\n if (fieldElement.parentNode.getAttribute(\"data-field-name\") != parentRow.getAttribute(\"data-field-name\")) {\r\n // Find the parent row\r\n while (parentRow && parentRow.nodeName.toLowerCase() != \"tr\") {\r\n // Update the parent node\r\n parentRow = parentRow.parentNode;\r\n }\r\n }\r\n // Hide the parent row\r\n if (parentRow) {\r\n parentRow.style.display = \"none\";\r\n }\r\n }\r\n }\r\n });\r\n }\r\n },\r\n /**\r\n * Registers the JSLink configuration\r\n * @param cfg - The JSLink configuration.\r\n */\r\n register: function (cfg) {\r\n // Ensure a configuration exists\r\n if (cfg) {\r\n // Get the template manager\r\n var templateManager = lib_1.ContextInfo.window.SPClientTemplates;\r\n templateManager = templateManager ? templateManager.TemplateManager : null;\r\n // Ensure it exists\r\n if (templateManager) {\r\n // Apply the customization\r\n templateManager.RegisterTemplateOverrides(cfg);\r\n }\r\n }\r\n },\r\n /**\r\n * Removes the field and html from the page.\r\n * @param ctx - The client context.\r\n * @param field - The field to remove.\r\n */\r\n removeField: function (ctx, field) {\r\n // Hide the field\r\n exports.JSLink.hideField(ctx, field);\r\n // Return an empty element\r\n return \"\";\r\n },\r\n /**\r\n * Method to render the default html for a field.\r\n * @param ctx - The client context.\r\n * @param field - The form field.\r\n * @param formType - The form type. (Display, Edit, New or View)\r\n */\r\n renderField: function (ctx, field, formType) {\r\n // Determine the field type\r\n var fieldType = field ? field.Type : (ctx.CurrentFieldSchema ? ctx.CurrentFieldSchema.Type : null);\r\n // Ensure the form type is set\r\n formType = formType ? formType : ctx.ControlMode;\r\n // Ensure a field to method mapper exists\r\n if (exports.JSLink._fieldToMethodMapper[fieldType] && exports.JSLink._fieldToMethodMapper[fieldType][formType]) {\r\n // Return the default html for this field\r\n var defaultHtml = exports.JSLink._fieldToMethodMapper[fieldType][formType](ctx);\r\n if (defaultHtml) {\r\n return defaultHtml;\r\n }\r\n }\r\n // Set the field renderer based on the field type\r\n var field = ctx.CurrentFieldSchema;\r\n var fieldRenderer = null;\r\n switch (field.Type) {\r\n case \"AllDayEvent\":\r\n fieldRenderer = new lib_1.ContextInfo.window[\"AllDayEventFieldRenderer\"](field.Name);\r\n break;\r\n case \"Attachments\":\r\n fieldRenderer = new lib_1.ContextInfo.window[\"AttachmentFieldRenderer\"](field.Name);\r\n break;\r\n case \"BusinessData\":\r\n fieldRenderer = new lib_1.ContextInfo.window[\"BusinessDataFieldRenderer\"](field.Name);\r\n break;\r\n case \"Computed\":\r\n fieldRenderer = new lib_1.ContextInfo.window[\"ComputedFieldRenderer\"](field.Name);\r\n break;\r\n case \"CrossProjectLink\":\r\n fieldRenderer = new lib_1.ContextInfo.window[\"ProjectLinkFieldRenderer\"](field.Name);\r\n break;\r\n case \"Currency\":\r\n fieldRenderer = new lib_1.ContextInfo.window[\"NumberFieldRenderer\"](field.Name);\r\n break;\r\n case \"DateTime\":\r\n fieldRenderer = new lib_1.ContextInfo.window[\"DateTimeFieldRenderer\"](field.Name);\r\n break;\r\n case \"Lookup\":\r\n fieldRenderer = new lib_1.ContextInfo.window[\"LookupFieldRenderer\"](field.Name);\r\n break;\r\n case \"LookupMulti\":\r\n fieldRenderer = new lib_1.ContextInfo.window[\"LookupFieldRenderer\"](field.Name);\r\n break;\r\n case \"Note\":\r\n fieldRenderer = new lib_1.ContextInfo.window[\"NoteFieldRenderer\"](field.Name);\r\n break;\r\n case \"Number\":\r\n fieldRenderer = new lib_1.ContextInfo.window[\"NumberFieldRenderer\"](field.Name);\r\n break;\r\n case \"Recurrence\":\r\n fieldRenderer = new lib_1.ContextInfo.window[\"RecurrenceFieldRenderer\"](field.Name);\r\n break;\r\n case \"Text\":\r\n fieldRenderer = new lib_1.ContextInfo.window[\"TextFieldRenderer\"](field.Name);\r\n break;\r\n case \"URL\":\r\n fieldRenderer = new lib_1.ContextInfo.window[\"UrlFieldRenderer\"](field.Name);\r\n break;\r\n case \"User\":\r\n fieldRenderer = new lib_1.ContextInfo.window[\"UserFieldRenderer\"](field.Name);\r\n break;\r\n case \"UserMulti\":\r\n fieldRenderer = new lib_1.ContextInfo.window[\"UserFieldRenderer\"](field.Name);\r\n break;\r\n case \"WorkflowStatus\":\r\n fieldRenderer = new lib_1.ContextInfo.window[\"RawFieldRenderer\"](field.Name);\r\n break;\r\n }\r\n ;\r\n // Get the current item\r\n var currentItem = ctx.CurrentItem || ctx.ListData.Items[0];\r\n // Return the item's field value html\r\n return fieldRenderer ? fieldRenderer.RenderField(ctx, field, currentItem, ctx.ListSchema) : currentItem[field.Name];\r\n }\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/jslink.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/listForm.js":
/*!***************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/listForm.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar __1 = __webpack_require__(/*! .. */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/index.js\");\r\n/**\r\n * List Form\r\n */\r\nexports.ListForm = {\r\n // Method to create an instance of the list form\r\n create: function (props) {\r\n var _info = null;\r\n var _props = null;\r\n var _reject = null;\r\n var _resolve = null;\r\n // Save the properties\r\n _props = props || {};\r\n _props.fields = _props.fields;\r\n // Method to load the list data\r\n var load = function () {\r\n // Clear the information\r\n _info = {\r\n item: _props.item,\r\n query: _props.query || {}\r\n };\r\n // Load the list data\r\n loadListData().then(\r\n // Success\r\n function () {\r\n // See if the fields have been defined\r\n if (_props.fields) {\r\n // Process the fields\r\n processFields();\r\n // Load the item data\r\n loadItem();\r\n }\r\n else {\r\n // Load the content type\r\n loadContentType();\r\n }\r\n }, \r\n // Reject\r\n _reject);\r\n };\r\n // Method to load a content type for the associated fields\r\n var loadContentType = function () {\r\n // Load the content types\r\n _info.list.ContentTypes()\r\n // Query for the default content type and expand the field links\r\n .query({\r\n Filter: _props.contentType ? \"Name eq '\" + _props.contentType + \"'\" : null,\r\n Expand: [\"FieldLinks\"],\r\n Select: [\"*\", \"FieldLinks/DisplayName\", \"FieldLinks/Hidden\", \"FieldLinks/Name\", \"FieldLinks/ReadOnly\", \"FieldLinks/Required\"],\r\n Top: 1\r\n })\r\n // Execute the request, but wait for the previous one to be completed\r\n .execute(function (ct) {\r\n // Resolve the promise\r\n loadDefaultFields(ct.results[0]);\r\n }, _reject);\r\n };\r\n // Method to load the default fields\r\n var loadDefaultFields = function (ct) {\r\n var fields = ct ? ct.FieldLinks.results : [];\r\n var formFields = {};\r\n var formLinks = {};\r\n // Parse the field links\r\n for (var i = 0; i < fields.length; i++) {\r\n var fieldLink = fields[i];\r\n // Get the field\r\n var field = _info.fields[fieldLink.Name];\r\n if (field) {\r\n // Skip the content type field\r\n if (field.InternalName == \"ContentType\") {\r\n continue;\r\n }\r\n // Skip hidden fields\r\n if (field.Hidden || fieldLink.Hidden) {\r\n continue;\r\n }\r\n // Save the form field and link\r\n formFields[field.InternalName] = field;\r\n formLinks[field.InternalName] = fieldLink;\r\n }\r\n }\r\n // Update the fields\r\n _info.contentType = ct;\r\n _info.fields = formFields;\r\n _info.fieldLinks = formLinks;\r\n // Load the item data\r\n loadItem();\r\n };\r\n // Method to load the field data\r\n var loadFieldData = function (fields) {\r\n // Clear the fields\r\n _info.fields = {};\r\n // Parse the fields\r\n for (var i = 0; i < fields.results.length; i++) {\r\n var field = fields.results[i];\r\n // See if the exclude fields is defined\r\n if (_props.excludeFields) {\r\n var excludeField = false;\r\n // Parse the fields to exclude\r\n for (var j = 0; j < _props.excludeFields.length; j++) {\r\n // See if we are excluding this field\r\n if (_props.excludeFields[j] == field.InternalName) {\r\n // Set the flag\r\n excludeField = true;\r\n break;\r\n }\r\n }\r\n // See if we are excluding the field\r\n if (excludeField) {\r\n continue;\r\n }\r\n }\r\n // Save the field\r\n _info.fields[field.InternalName] = field;\r\n }\r\n };\r\n // Method to load the item\r\n var loadItem = function () {\r\n var reloadItem = false;\r\n // See if the item already exist\r\n if (_info.item) {\r\n // Parse the fields\r\n for (var fieldName in _info.fields) {\r\n var field = _info.fields[fieldName];\r\n // See what type of field this is\r\n switch (field.FieldTypeKind) {\r\n // Lookup or User Field\r\n case __1.SPTypes.FieldType.Lookup:\r\n case __1.SPTypes.FieldType.User:\r\n var fieldValue = _info.item[fieldName + \"Id\"];\r\n // Ensure the value exists\r\n if (fieldValue) {\r\n // See if a value exists\r\n if (fieldValue.results ? fieldValue.results.length > 0 : fieldValue > 0) {\r\n // Ensure the field data has been loaded\r\n if (_info.item[fieldName] == null) {\r\n // Set the flag\r\n reloadItem = true;\r\n }\r\n }\r\n }\r\n break;\r\n // Default\r\n default:\r\n // See if this is an taxonomy field\r\n if (field.TypeAsString.indexOf(\"TaxonomyFieldType\") == 0) {\r\n var fieldValue_1 = _info.item[fieldName + \"Id\"];\r\n // Ensure the value exists\r\n if (fieldValue_1) {\r\n // See if a field value exists\r\n if (fieldValue_1.results ? fieldValue_1.results.length > 0 : fieldValue_1 != null) {\r\n // Parse the fields\r\n for (var fieldName_1 in _info.fields) {\r\n var valueField = _info.fields[fieldName_1];\r\n // See if this is the value field\r\n if (valueField.InternalName == field.InternalName + \"_0\" || valueField.Title == field.InternalName + \"_0\") {\r\n // Ensure the value field is loaded\r\n if (_info.item[valueField.InternalName] == null) {\r\n // Set the flag\r\n reloadItem = true;\r\n }\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n // See if we are reloading the item\r\n if (reloadItem) {\r\n break;\r\n }\r\n }\r\n }\r\n // See if the item exists\r\n if (_info.item && !reloadItem) {\r\n // See if we are loading attachments\r\n if (_props.loadAttachments && _info.attachments == null) {\r\n // Load the attachments\r\n exports.ListForm.loadAttachments(_props).then(function (attachments) {\r\n // Set the attachments\r\n _info.attachments = attachments;\r\n // Resolve the promise\r\n _resolve(_info);\r\n }, _reject);\r\n }\r\n else {\r\n // Resolve the promise\r\n _resolve(_info);\r\n }\r\n }\r\n // Else, see if we are loading the list item\r\n else if (reloadItem || _props.itemId > 0) {\r\n // Update the item query\r\n _info.query = exports.ListForm.generateODataQuery(_info, _props.loadAttachments);\r\n // Get the list item\r\n _info.list.Items(reloadItem ? _props.item.Id : _props.itemId)\r\n // Set the query\r\n .query(_info.query)\r\n // Execute the request\r\n .execute(function (item) {\r\n // Save the attachments\r\n _info.attachments = item.AttachmentFiles.results;\r\n // Save the item\r\n _info.item = item;\r\n // Refresh the item\r\n exports.ListForm.refreshItem(_info).then(function (info) {\r\n // Update the info\r\n _info = info;\r\n // Resolve the promise\r\n _resolve(_info);\r\n }, _reject);\r\n }, _reject);\r\n }\r\n else {\r\n // Resolve the promise\r\n _resolve(_info);\r\n }\r\n };\r\n // Method to load the list data\r\n var loadListData = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the list & fields already exist\r\n if (_info.list && _info.fields) {\r\n // Resolve the promise\r\n resolve();\r\n return;\r\n }\r\n // Get the web\r\n __1.Web(_props.webUrl)\r\n // Get the list\r\n .Lists(_props.listName)\r\n // Execute the request\r\n .execute(function (list) {\r\n // Save the list and web url\r\n _info.list = list;\r\n _info.webUrl = _props.webUrl;\r\n }, reject)\r\n // Load the fields\r\n .Fields()\r\n // Execute the request\r\n .execute(function (fields) {\r\n // Load the field data\r\n loadFieldData(fields);\r\n // Resolve the promise\r\n resolve();\r\n }, reject, true);\r\n });\r\n };\r\n // Method to process the fields\r\n var processFields = function () {\r\n var formFields = {};\r\n // Parse the fields provided\r\n for (var i = 0; i < _props.fields.length; i++) {\r\n var field = _info.fields[_props.fields[i]];\r\n // Ensure the field exists\r\n if (field) {\r\n // Save the field\r\n formFields[field.InternalName] = field;\r\n // See if this is a taxonomy field\r\n if (field.TypeAsString.indexOf(\"TaxonomyFieldType\") == 0) {\r\n // Parse the list fields\r\n for (var fieldName in _info.fields) {\r\n var valueField = _info.fields[fieldName];\r\n // See if this is a value field\r\n if (valueField.InternalName == field.InternalName + \"_0\" || valueField.Title == field.InternalName + \"_0\") {\r\n // Include this field\r\n formFields[valueField.InternalName] = valueField;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n // Update the fields\r\n _info.fields = formFields;\r\n };\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Save the methods\r\n _reject = reject;\r\n _resolve = resolve;\r\n // Load the list data\r\n load();\r\n });\r\n },\r\n // Method to generate the odata query\r\n generateODataQuery: function (info, loadAttachments) {\r\n if (loadAttachments === void 0) { loadAttachments = false; }\r\n var query = info.query || {};\r\n // Default the select query to get all the fields by default\r\n query.Select = query.Select || [\"*\"];\r\n query.Expand = query.Expand || [];\r\n // See if we are loading the attachments\r\n if (loadAttachments) {\r\n // Expand the attachment files collection\r\n query.Expand.push(\"AttachmentFiles\");\r\n // Select the attachment files\r\n query.Select.push(\"Attachments\");\r\n query.Select.push(\"AttachmentFiles\");\r\n }\r\n // Parse the fields\r\n for (var fieldName in info.fields) {\r\n var field = info.fields[fieldName];\r\n // Update the query, based on the type\r\n switch (field.FieldTypeKind) {\r\n // Lookup Field\r\n case __1.SPTypes.FieldType.Lookup:\r\n // Expand the field\r\n query.Expand.push(field.InternalName);\r\n // Select the fields\r\n query.Select.push(field.InternalName + \"/Id\");\r\n query.Select.push(field.InternalName + \"/\" + field.LookupField);\r\n break;\r\n // User Field\r\n case __1.SPTypes.FieldType.User:\r\n // Expand the field\r\n query.Expand.push(field.InternalName);\r\n // Select the fields\r\n query.Select.push(field.InternalName + \"/Id\");\r\n query.Select.push(field.InternalName + \"/Title\");\r\n break;\r\n // Default\r\n default:\r\n // See if this is an taxonomy field\r\n if (field.TypeAsString.indexOf(\"TaxonomyFieldType\") == 0) {\r\n // Parse the fields\r\n for (var fieldName_2 in info.fields) {\r\n var valueField = info.fields[fieldName_2];\r\n // See if this is the value field\r\n if (valueField.InternalName == field.InternalName + \"_0\" || valueField.Title == field.InternalName + \"_0\") {\r\n // Include the value field\r\n query.Select.push(valueField.InternalName);\r\n break;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n }\r\n // Return the query\r\n return query;\r\n },\r\n // Method to load the item attachments\r\n loadAttachments: function (info) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure the item id exists\r\n var itemId = info.item ? info.item.Id : info.itemId;\r\n if (itemId > 0) {\r\n // Get the web\r\n __1.Web(info.webUrl)\r\n // Get the list\r\n .Lists(info.listName)\r\n // Get the item\r\n .Items(itemId)\r\n // Get the attachment files\r\n .AttachmentFiles()\r\n // Execute the request\r\n .execute(function (attachments) {\r\n // Ensure the attachments exist\r\n if (!attachments.existsFl) {\r\n // Reject the promise\r\n reject(attachments.response);\r\n return;\r\n }\r\n // Resolve the promise\r\n resolve(attachments.results || []);\r\n }, reject);\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve([]);\r\n }\r\n });\r\n },\r\n // Method to refresh an item\r\n refreshItem: function (info) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Update the query\r\n info.query = exports.ListForm.generateODataQuery(info, true);\r\n // Get the item\r\n info.list.Items(info.item.Id).query(info.query).execute(function (item) {\r\n // Update the item\r\n info.item = item;\r\n // Get the item values\r\n info.list.Items(item.Id).query({\r\n Expand: [\"FieldValuesAsText\"]\r\n }).execute(function (item) {\r\n // Set the values\r\n info.fieldValuesAsText = item.FieldValuesAsText;\r\n });\r\n // Get the html values for this item\r\n // This is needed for complex field values\r\n info.list.Items(item.Id).FieldValuesAsHtml().execute(function (values) {\r\n // Set the values\r\n info.fieldValuesAsHtml = values;\r\n // Resolve the promise\r\n resolve(info);\r\n }, true);\r\n }, reject);\r\n });\r\n },\r\n // Method to remove attachments from an item\r\n removeAttachment: function (info, fileName) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure attachments exist\r\n if (info.attachments) {\r\n // Parse the attachments\r\n for (var i = 0; i < info.attachments.length; i++) {\r\n // See if this is the target attachment\r\n var attachment = info.attachments[i];\r\n if (attachment.FileName == fileName) {\r\n // Get the web\r\n __1.Web(info.webUrl)\r\n // Get the file\r\n .getFileByServerRelativeUrl(attachment.ServerRelativeUrl)\r\n // Delete the file\r\n .delete()\r\n // Execute the request\r\n .execute(function () {\r\n // Resolve the promise\r\n resolve(info);\r\n }, reject);\r\n // Attachment found\r\n return;\r\n }\r\n // Attachment not found\r\n reject(\"Attachment '\" + fileName + \"' was not found.\");\r\n }\r\n }\r\n else {\r\n // Attachments not loaded\r\n reject(\"Attachment '\" + fileName + \"' was not found.\");\r\n }\r\n });\r\n },\r\n // Method to save attachments to an existing item\r\n saveAttachments: function (info, attachmentInfo) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n var itemId = info.item ? info.item.Id : info.itemId;\r\n if (itemId > 0) {\r\n // Get the web\r\n var attachments = __1.Web(info.webUrl)\r\n // Get the lists\r\n .Lists(info.listName)\r\n // Get the item\r\n .Items(itemId)\r\n // Get the attachment files\r\n .AttachmentFiles();\r\n // Parse the attachment information\r\n for (var i = 0; i < attachmentInfo.length; i++) {\r\n var attachment = attachmentInfo[i];\r\n // Add the attachment\r\n attachments.add(attachment.name, attachment.data).execute(true);\r\n }\r\n // Wait for the requests to complete\r\n attachments.done(function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // Resolve the promise\r\n resolve.apply(args);\r\n });\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve();\r\n }\r\n });\r\n },\r\n // Method to save a new or existing item\r\n saveItem: function (info, formValues) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if this is an existing item\r\n if (info.item && info.item.update) {\r\n // Update the item\r\n info.item.update(formValues).execute(function (response) {\r\n // Refresh the item\r\n exports.ListForm.refreshItem(info).then(function (info) {\r\n // Resolve the promise\r\n resolve(info);\r\n }, reject);\r\n });\r\n }\r\n else {\r\n // Set the metadata type\r\n formValues[\"__metadata\"] = { type: info.list.ListItemEntityTypeFullName };\r\n // Add the item\r\n info.list.Items().add(formValues)\r\n // Execute the request\r\n .execute(function (item) {\r\n // Update the info\r\n info.item = item;\r\n // Refresh the item\r\n exports.ListForm.refreshItem(info).then(function (info) {\r\n // Resolve the promise\r\n resolve(info);\r\n });\r\n }, reject);\r\n }\r\n });\r\n },\r\n // Method to show a file dialog\r\n showFileDialog: function (info, onSave) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Method to add an attachment\r\n var addAttachment = function (name, data) {\r\n // Call the save event\r\n onSave ? onSave({ name: name, data: data }) : null;\r\n // Get the list\r\n info.list\r\n // Get the item\r\n .Items(info.item.Id)\r\n // Get the attachments\r\n .AttachmentFiles()\r\n // Add the file\r\n .add(name, data)\r\n // Execute the request\r\n .execute(function () {\r\n // Refresh the item\r\n exports.ListForm.refreshItem(info).then(function (info) {\r\n // Remove the element\r\n document.body.removeChild(el);\r\n // Resolve the promise\r\n resolve(info);\r\n });\r\n }, reject);\r\n };\r\n // Method to read the file\r\n var readFile = function (ev) {\r\n // Get the source file\r\n var srcFile = ev.target[\"files\"][0];\r\n if (srcFile) {\r\n var reader = new FileReader();\r\n // Set the file loaded event\r\n reader.onloadend = function (ev) {\r\n var attachment = null;\r\n var ext = srcFile.name.split(\".\");\r\n ext = ext[ext.length - 1].toLowerCase();\r\n // See if the info exists\r\n if (info) {\r\n // Add the attachment\r\n addAttachment(srcFile.name, ev.target.result);\r\n }\r\n else {\r\n // Remove the element\r\n document.body.removeChild(el);\r\n // Resolve the promise with the file information\r\n resolve({\r\n data: ev.target.result,\r\n name: srcFile.name\r\n });\r\n }\r\n };\r\n // Set the error\r\n reader.onerror = function (ev) {\r\n // Remove the element\r\n document.body.removeChild(el);\r\n // Reject the promise\r\n reject(ev.target.error);\r\n };\r\n // Read the file\r\n reader.readAsArrayBuffer(srcFile);\r\n }\r\n };\r\n // Create the file element\r\n var el = document.body.querySelector(\"#listform-attachment\");\r\n if (el == null) {\r\n el = document.createElement(\"input\");\r\n // Set the properties\r\n el.id = \"listform-attachment\";\r\n el.type = \"file\";\r\n el.hidden = true;\r\n el.onchange = readFile;\r\n // Add the element to the body\r\n document.body.appendChild(el);\r\n }\r\n // Show the dialog\r\n el.click();\r\n });\r\n }\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/listForm.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/listFormField.js":
/*!********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/listFormField.js ***!
\********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar __1 = __webpack_require__(/*! .. */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/index.js\");\r\n/**\r\n * List Form Field\r\n */\r\nexports.ListFormField = {\r\n // Method to create an instance of the list form field\r\n create: function (props) {\r\n var _fieldInfo = props || {};\r\n var _reject = null;\r\n var _resolve = null;\r\n // Load the field\r\n var load = function () {\r\n // See if the field exists\r\n if (_fieldInfo.field) {\r\n // Process the field\r\n processField();\r\n }\r\n // Else, load the field from the information provided\r\n else {\r\n // Get the web\r\n __1.Web(_fieldInfo.webUrl)\r\n // Get the list\r\n .Lists(_fieldInfo.listName)\r\n // Get the fields\r\n .Fields()\r\n // Get the field by its internal name\r\n .getByInternalNameOrTitle(_fieldInfo.name)\r\n // Execute the request\r\n .execute(function (field) {\r\n // Save the field\r\n _fieldInfo.field = field;\r\n // Process the field\r\n processField();\r\n }, _reject);\r\n }\r\n };\r\n // Method to proces the field and save its information\r\n var processField = function () {\r\n // Update the field information\r\n _fieldInfo.defaultValue = _fieldInfo.field.DefaultValue;\r\n _fieldInfo.readOnly = _fieldInfo.field.ReadOnlyField;\r\n _fieldInfo.required = _fieldInfo.field.Required ? true : false;\r\n _fieldInfo.title = _fieldInfo.field.Title;\r\n _fieldInfo.type = _fieldInfo.field.FieldTypeKind;\r\n _fieldInfo.typeAsString = _fieldInfo.field.TypeAsString;\r\n // Update the field info, based on the type\r\n switch (_fieldInfo.type) {\r\n // Choice\r\n case __1.SPTypes.FieldType.Choice:\r\n case __1.SPTypes.FieldType.MultiChoice:\r\n var choices = _fieldInfo.field.Choices;\r\n _fieldInfo.choices = (choices ? choices[\"results\"] : null) || [];\r\n _fieldInfo.multi = _fieldInfo.type == __1.SPTypes.FieldType.MultiChoice;\r\n break;\r\n // Date/Time\r\n case __1.SPTypes.FieldType.DateTime:\r\n var fldDate = _fieldInfo.field;\r\n _fieldInfo.showTime = fldDate.DisplayFormat == __1.SPTypes.DateFormat.DateTime;\r\n break;\r\n // Lookup\r\n case __1.SPTypes.FieldType.Lookup:\r\n var fldLookup = _fieldInfo.field;\r\n _fieldInfo.lookupField = fldLookup.LookupField;\r\n _fieldInfo.lookupListId = fldLookup.LookupList;\r\n _fieldInfo.lookupWebId = fldLookup.LookupWebId;\r\n _fieldInfo.multi = fldLookup.AllowMultipleValues;\r\n break;\r\n // Number\r\n case __1.SPTypes.FieldType.Number:\r\n var fldNumber = _fieldInfo.field;\r\n var startIdx = fldNumber.SchemaXml.indexOf('Decimals=\"') + 10;\r\n _fieldInfo.decimals = startIdx > 10 ? parseInt(fldNumber.SchemaXml.substr(startIdx, fldNumber.SchemaXml.substr(startIdx).indexOf('\"'))) : 0;\r\n _fieldInfo.maxValue = fldNumber.MaximumValue;\r\n _fieldInfo.minValue = fldNumber.MinimumValue;\r\n _fieldInfo.showAsPercentage = fldNumber.SchemaXml.indexOf('Percentage=\"TRUE\"') > 0;\r\n break;\r\n // Note\r\n case __1.SPTypes.FieldType.Note:\r\n var fldNote = _fieldInfo.field;\r\n _fieldInfo.multiline = true;\r\n _fieldInfo.richText = fldNote.RichText;\r\n _fieldInfo.rows = fldNote.NumberOfLines;\r\n break;\r\n // Text\r\n case __1.SPTypes.FieldType.Text:\r\n _fieldInfo.multiline = false;\r\n _fieldInfo.richText = false;\r\n _fieldInfo.rows = 1;\r\n break;\r\n // User\r\n case __1.SPTypes.FieldType.User:\r\n var fldUser = _fieldInfo.field;\r\n _fieldInfo.allowGroups = fldUser.SelectionMode == __1.SPTypes.FieldUserSelectionType.PeopleAndGroups;\r\n _fieldInfo.multi = fldUser.AllowMultipleValues;\r\n break;\r\n // Default\r\n default:\r\n // See if this is an MMS field\r\n if (_fieldInfo.typeAsString.indexOf(\"TaxonomyFieldType\") == 0) {\r\n var fldMMS = _fieldInfo.field;\r\n _fieldInfo.multi = fldMMS.AllowMultipleValues;\r\n _fieldInfo.termId = fldMMS.IsAnchorValid ? fldMMS.AnchorId : fldMMS.TermSetId;\r\n _fieldInfo.termSetId = fldMMS.TermSetId;\r\n _fieldInfo.termStoreId = fldMMS.SspId;\r\n }\r\n break;\r\n }\r\n // Resolve the promise\r\n _resolve(_fieldInfo);\r\n };\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Save the methods\r\n _resolve = resolve;\r\n _reject = reject;\r\n // See if the field exists\r\n if (_fieldInfo.field) {\r\n // Process the field\r\n processField();\r\n }\r\n else {\r\n // Load the field\r\n load();\r\n }\r\n });\r\n },\r\n // Method to load the lookup data\r\n loadLookupData: function (info, queryTop) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Get the current site collection\r\n __1.Site()\r\n // Get the web containing the lookup list\r\n .openWebById(info.lookupWebId)\r\n // Execute the request\r\n .execute(function (web) {\r\n // Get the list\r\n web.Lists()\r\n // Get the list by id\r\n .getById(info.lookupListId)\r\n // Get the items\r\n .Items()\r\n // Set the query\r\n .query({\r\n GetAllItems: true,\r\n Select: [\"ID\", info.lookupField],\r\n Top: queryTop > 0 && queryTop <= 5000 ? queryTop : 500\r\n })\r\n // Execute the request\r\n .execute(function (items) {\r\n // Resolve the promise\r\n resolve(items.results);\r\n }, reject);\r\n }, reject);\r\n });\r\n },\r\n // Method to load the mms data\r\n loadMMSData: function (info) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the term set\r\n __1.Helper.Taxonomy.getTermSetById(info.termStoreId, info.termSetId).then(function (termSet) {\r\n // Get the target root term\r\n var root = __1.Helper.Taxonomy.findById(termSet, info.termId);\r\n // See if the root node doesn't exist\r\n if (root == null) {\r\n // Set the root to the term set\r\n root = __1.Helper.Taxonomy.findById(termSet, info.termSetId);\r\n }\r\n // Resolve the request\r\n resolve(__1.Helper.Taxonomy.toArray(root));\r\n }, reject);\r\n });\r\n },\r\n // Method to load the mms value field\r\n loadMMSValueField: function (info) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Get the web\r\n __1.Web(info.webUrl)\r\n // Get the list\r\n .Lists(info.listName)\r\n // Get the fields\r\n .Fields()\r\n // Get the hidden field\r\n .getByInternalNameOrTitle(info.name + \"_0\")\r\n // Execute the request\r\n .execute(\r\n // Success\r\n function (field) {\r\n // Resolve the promise\r\n resolve(field);\r\n }, \r\n // Error\r\n function () {\r\n // Reject w/ a message\r\n reject(\"Unable to find the hidden value field for '\" + info.name + \"'.\");\r\n });\r\n });\r\n }\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/listFormField.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/addContentEditorWebPart.js":
/*!**************************************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/addContentEditorWebPart.js ***!
\**************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar webpart_1 = __webpack_require__(/*! ../webpart */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/webpart.js\");\r\n// Method to add a script editor webpart to the page\r\nexports.addContentEditorWebPart = function (url, wpProps) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Get the current context\r\n var context = SP.ClientContext.get_current();\r\n // Get the webpart manager for the page\r\n var page = context.get_web().getFileByServerRelativeUrl(url);\r\n var wpMgr = page.getLimitedWebPartManager(SP.WebParts.PersonalizationScope.shared);\r\n // Create the webpart\r\n var wp = wpMgr.importWebPart(webpart_1.WebPart.generateContentEditorXML(wpProps)).get_webPart();\r\n // Add the webpart to the page\r\n wpMgr.addWebPart(wp, wpProps.zone || \"\", wpProps.index || 0);\r\n // Save the page\r\n context.load(wp);\r\n context.executeQueryAsync(\r\n // Success\r\n function () {\r\n // Resolve the promise\r\n resolve();\r\n }, \r\n // Error\r\n function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // Reject the promise\r\n reject(args[1] ? args[1].get_message() : \"\");\r\n });\r\n });\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/addContentEditorWebPart.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/addScriptEditorWebPart.js":
/*!*************************************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/addScriptEditorWebPart.js ***!
\*************************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar webpart_1 = __webpack_require__(/*! ../webpart */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/webpart.js\");\r\n// Method to add a script editor webpart to the page\r\nexports.addScriptEditorWebPart = function (url, wpProps) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Get the current context\r\n var context = SP.ClientContext.get_current();\r\n // Get the webpart manager for the page\r\n var page = context.get_web().getFileByServerRelativeUrl(url);\r\n var wpMgr = page.getLimitedWebPartManager(SP.WebParts.PersonalizationScope.shared);\r\n // Create the webpart\r\n var wp = wpMgr.importWebPart(webpart_1.WebPart.generateScriptEditorXML(wpProps)).get_webPart();\r\n // Add the webpart to the page\r\n wpMgr.addWebPart(wp, wpProps.zone || \"\", wpProps.index || 0);\r\n // Save the page\r\n context.load(wp);\r\n context.executeQueryAsync(\r\n // Success\r\n function () {\r\n // Resolve the promise\r\n resolve();\r\n }, \r\n // Error\r\n function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // Reject the promise\r\n reject(args[1] ? args[1].get_message() : \"\");\r\n });\r\n });\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/addScriptEditorWebPart.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/createContentType.js":
/*!********************************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/createContentType.js ***!
\********************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar lib_1 = __webpack_require__(/*! ../../lib */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/lib/index.js\");\r\n/**\r\n * Creates a content type in a web or specified list.\r\n * @param ctInfo - The content type information.\r\n * @param parentInfo - The parent content type id and url containing it.\r\n * @param webUrl - The relative url to create the content type in.\r\n * @param listName - The list name to add the content type to.\r\n */\r\nexports.createContentType = function (ctInfo, parentInfo, webUrl, listName) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Set the context\r\n var ctx = webUrl ? new SP.ClientContext(webUrl) : SP.ClientContext.get_current();\r\n // Get the parent content type\r\n var parentContentType = (parentInfo.Url ? ctx.get_site().openWeb(parentInfo.Url) : ctx.get_web()).get_contentTypes().getById(parentInfo.Id);\r\n // Create the content type\r\n var ct = new SP.ContentTypeCreationInformation();\r\n ctInfo.Description != null ? ct.set_description(ctInfo.Description) : null;\r\n ctInfo.Group != null ? ct.set_group(ctInfo.Group) : null;\r\n ct.set_name(ctInfo.Name);\r\n ct.set_parentContentType(parentContentType);\r\n // Add the content type\r\n var src = listName ? ctx.get_web().get_lists().getByTitle(listName) : ctx.get_web();\r\n var contentTypes = src.get_contentTypes();\r\n contentTypes.add(ct);\r\n ctx.load(contentTypes);\r\n // Execute the request\r\n ctx.executeQueryAsync(\r\n // Success\r\n function () {\r\n // Set the content type collection\r\n var cts = (listName ? lib_1.Web().Lists(listName) : lib_1.Web()).ContentTypes();\r\n // Find the content type\r\n cts.query({ Filter: \"Name eq '\" + ctInfo.Name + \"'\" }).execute(function (cts) {\r\n // Resolve the request\r\n resolve(cts.results[0]);\r\n });\r\n }, \r\n // Error\r\n function (sender, args) {\r\n // Log\r\n console.log(\"[gd-sprest][Create Content Type] Error adding the content type.\", ctInfo.Name);\r\n // Reject the request\r\n reject(args.get_message());\r\n });\r\n });\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/createContentType.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/createDocSet.js":
/*!***************************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/createDocSet.js ***!
\***************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar lib_1 = __webpack_require__(/*! ../../lib */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/lib/index.js\");\r\nvar request_1 = __webpack_require__(/*! ./request */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/request.js\");\r\n/**\r\n * Creates a document set item.\r\n * @param name - The name of the document set folder to create.\r\n * @param listName - The name of the document set library.\r\n * @param webUrl - The url of the web containing the document set library.\r\n */\r\nexports.createDocSet = function (name, listName, webUrl) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Get the document set's root folder\r\n lib_1.Web(webUrl).Lists(listName).query({ Expand: [\"ContentTypes\", \"ParentWeb\", \"RootFolder\"] }).execute(function (list) {\r\n // Parse the content types\r\n var ctId = \"0x0120D520\";\r\n for (var i = 0; i < list.ContentTypes.results.length; i++) {\r\n // See if this is the document set content type\r\n if (list.ContentTypes.results[i].StringId.indexOf(ctId) == 0) {\r\n // Set the content type id\r\n ctId = list.ContentTypes.results[i].StringId;\r\n break;\r\n }\r\n }\r\n // Create the document set item\r\n request_1.request({\r\n method: \"POST\",\r\n url: list.ParentWebUrl + \"/_vti_bin/listdata.svc/\" + list.Title.replace(/ /g, \"\"),\r\n headers: {\r\n Accept: \"application/json;odata=verbose\",\r\n \"Content-Type\": \"application/json;odata=verbose\",\r\n Slug: list.RootFolder.ServerRelativeUrl + \"/\" + name + \"|\" + ctId,\r\n \"X-Requested-With\": \"XMLHttpRequest\"\r\n },\r\n data: {\r\n Title: name,\r\n Path: list.RootFolder.ServerRelativeUrl\r\n }\r\n }).then(function (response) {\r\n // See if the request was successful\r\n if (response.d && response.d.Id > 0) {\r\n // Get the document set item and resolve the promise\r\n lib_1.Web(webUrl).Lists(listName).Items(response.d.Id).execute(resolve);\r\n }\r\n else {\r\n // Reject the promise\r\n reject(response[\"response\"]);\r\n }\r\n });\r\n }, reject);\r\n });\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/createDocSet.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/hasPermissions.js":
/*!*****************************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/hasPermissions.js ***!
\*****************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Determines if the user has permissions, based on the permission kind value\r\n */\r\nexports.hasPermissions = function (permissionMask, permissions) {\r\n if (permissions === void 0) { permissions = []; }\r\n var hasPermissions = false;\r\n // Set the permissions\r\n var requestedPermissions = typeof (permissions) === \"number\" ? [permissions] : permissions;\r\n // Ensure the base permissions exist\r\n if (SP && SP.BasePermissions) {\r\n // Initialize the base permissions from the value\r\n var basePermissions = new SP.BasePermissions();\r\n basePermissions.initPropertiesFromJson(permissionMask);\r\n // Default the permission flag\r\n hasPermissions = true;\r\n // Parse the requested permissions\r\n for (var i = 0; i < requestedPermissions.length; i++) {\r\n // See if the user has permissions\r\n if (!basePermissions.has(requestedPermissions[i])) {\r\n // Set the flag and break from the loop\r\n hasPermissions = false;\r\n break;\r\n }\r\n }\r\n }\r\n else {\r\n // Log\r\n console.info(\"[gd-sprest] The 'SP' core library is not available.\");\r\n }\r\n // Return the value\r\n return hasPermissions;\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/hasPermissions.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/index.js":
/*!********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/index.js ***!
\********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nfunction __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n__export(__webpack_require__(/*! ./addContentEditorWebPart */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/addContentEditorWebPart.js\"));\r\n__export(__webpack_require__(/*! ./addScriptEditorWebPart */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/addScriptEditorWebPart.js\"));\r\n__export(__webpack_require__(/*! ./createContentType */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/createContentType.js\"));\r\n__export(__webpack_require__(/*! ./createDocSet */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/createDocSet.js\"));\r\n__export(__webpack_require__(/*! ./hasPermissions */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/hasPermissions.js\"));\r\n__export(__webpack_require__(/*! ./parse */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/parse.js\"));\r\n__export(__webpack_require__(/*! ./request */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/request.js\"));\r\n__export(__webpack_require__(/*! ./setContentTypeFields */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/setContentTypeFields.js\"));\r\n__export(__webpack_require__(/*! ./setGroupOwner */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/setGroupOwner.js\"));\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/parse.js":
/*!********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/parse.js ***!
\********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar utils_1 = __webpack_require__(/*! ../../utils */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/utils/index.js\");\r\n/**\r\n * Convert a JSON string to a base object\r\n */\r\nexports.parse = function (jsonString) {\r\n // Try to parse the string\r\n try {\r\n var obj = JSON.parse(jsonString);\r\n // Create a base object\r\n var base = new utils_1.Base(obj.props);\r\n // Set the properties\r\n base.response = obj.response;\r\n base.status = obj.status;\r\n base.targetInfo = obj.targetInfo;\r\n // Update the object\r\n utils_1.Request.updateDataObject(base, false);\r\n // Return the base object\r\n return base;\r\n }\r\n catch (_a) { }\r\n return null;\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/parse.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/request.js":
/*!**********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/request.js ***!
\**********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar utils_1 = __webpack_require__(/*! ../../utils */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/utils/index.js\");\r\n/**\r\n * XML HTTP Request\r\n */\r\nexports.request = function (props) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Execute the request and resolve the promise\r\n (new utils_1.Base({\r\n method: props.method || \"GET\",\r\n url: props.url,\r\n requestHeader: props.headers,\r\n data: props.data\r\n })).execute(resolve, reject);\r\n });\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/request.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/setContentTypeFields.js":
/*!***********************************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/setContentTypeFields.js ***!
\***********************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar lib_1 = __webpack_require__(/*! ../../lib */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/lib/index.js\");\r\n/**\r\n * Sets the field links associated with a content type.\r\n * @param ctInfo - The content type information\r\n */\r\nexports.setContentTypeFields = function (ctInfo) {\r\n // Clears the content type field links\r\n var clearLinks = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Get the links\r\n getLinks().then(function (fieldLinks) {\r\n var skipFields = [];\r\n // See if we need to remove any fields\r\n if (fieldLinks.length > 0) {\r\n var updateFl = false;\r\n // Set the context\r\n var ctx = ctInfo.webUrl ? new SP.ClientContext(ctInfo.webUrl) : new SP.ClientContext(lib_1.ContextInfo.webServerRelativeUrl);\r\n // Get the source\r\n var src = ctInfo.listName ? ctx.get_web().get_lists().getByTitle(ctInfo.listName) : ctx.get_web();\r\n // Get the content type\r\n var contentType = src.get_contentTypes().getById(ctInfo.id);\r\n // Parse the content type field links\r\n for (var i = 0; i < fieldLinks.length; i++) {\r\n var fieldLink = fieldLinks[i];\r\n var removeFl = true;\r\n var _loop_1 = function (j) {\r\n var field = ctInfo.fields[j];\r\n var fieldName = typeof (field) === \"string\" ? field : field.Name || field.FieldInternalName;\r\n // See if we are keeping this field\r\n if (fieldName == fieldLink.Name) {\r\n var propUpdateFl_1 = false;\r\n // Checks if an update is needed\r\n var updateField = function (oldValue, newValue) {\r\n // Ensure a value exists\r\n if (newValue == null) {\r\n return;\r\n }\r\n // See if an update is needed\r\n if (oldValue == newValue) {\r\n return;\r\n }\r\n // Set the flag\r\n propUpdateFl_1 = true;\r\n };\r\n // Update the properties\r\n updateField(fieldLink.DisplayName, field.DisplayName);\r\n updateField(fieldLink.Hidden, field.Hidden);\r\n updateField(fieldLink.ReadOnly, field.ReadOnly);\r\n updateField(fieldLink.Required, field.Required);\r\n updateField(fieldLink.ShowInDisplayForm, field.ShowInDisplayForm);\r\n // See if an update to the property is needed\r\n if (!propUpdateFl_1) {\r\n // Set the flag to not remove this field reference\r\n removeFl = false;\r\n // Add the field to skip\r\n skipFields.push(fieldLink);\r\n }\r\n return \"break\";\r\n }\r\n };\r\n // Parse the fields to add\r\n for (var j = 0; j < ctInfo.fields.length; j++) {\r\n var state_1 = _loop_1(j);\r\n if (state_1 === \"break\")\r\n break;\r\n }\r\n // See if we are removing the field\r\n if (removeFl) {\r\n // Remove the field link\r\n contentType.get_fieldLinks().getById(fieldLink.Id).deleteObject();\r\n // Set the flag\r\n updateFl = true;\r\n // Log\r\n console.log(\"[gd-sprest][Set Content Type Fields] Removing the field link: \" + fieldLink.Name);\r\n }\r\n }\r\n // See if an update is required\r\n if (updateFl) {\r\n // Update the content type\r\n contentType.update(false);\r\n // Execute the request\r\n ctx.executeQueryAsync(\r\n // Success\r\n function () {\r\n // Log\r\n console.log(\"[gd-sprest][Set Content Type Fields] Removed the field links successfully.\");\r\n // Resolve the request\r\n resolve(skipFields);\r\n }, \r\n // Error\r\n function (sender, args) {\r\n // Log\r\n console.log(\"[gd-sprest][Set Content Type Fields] Error removing the field links.\");\r\n // Reject the request\r\n reject();\r\n });\r\n }\r\n else {\r\n // Log\r\n console.log(\"[gd-sprest][Set Content Type Fields] No fields need to be removed.\");\r\n // Resolve the request\r\n resolve(skipFields);\r\n }\r\n }\r\n else {\r\n // Resolve the request\r\n resolve(skipFields);\r\n }\r\n }, reject);\r\n });\r\n };\r\n // Creates the field links\r\n var createLinks = function (skipFields) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Set the context\r\n var ctx = ctInfo.webUrl ? new SP.ClientContext(ctInfo.webUrl) : new SP.ClientContext(lib_1.ContextInfo.webServerRelativeUrl);\r\n // Get the source\r\n var src = ctInfo.listName ? ctx.get_web().get_lists().getByTitle(ctInfo.listName) : ctx.get_web();\r\n var skipField = function (fieldName, fields) {\r\n for (var i = 0; i < fields.length; i++) {\r\n // See if we are skipping this field\r\n if (fields[i].Name == fieldName) {\r\n return true;\r\n }\r\n }\r\n };\r\n // Parse the fields to add\r\n var fields = [];\r\n for (var i = 0; i < ctInfo.fields.length; i++) {\r\n var fieldInfo = ctInfo.fields[i];\r\n var fieldName = typeof (fieldInfo) === \"string\" ? fieldInfo : fieldInfo.Name || fieldInfo.FieldInternalName;\r\n // See if we are skipping this field\r\n if (skipField(fieldName, skipFields)) {\r\n continue;\r\n }\r\n // Load the field\r\n var field = src.get_fields().getByInternalNameOrTitle(fieldName);\r\n ctx.load(field);\r\n // Log\r\n console.log(\"[gd-sprest][Set Content Type Fields] Adding the field link: \" + fieldName);\r\n // Save a reference to this field\r\n fields.push({ ref: field, info: fieldInfo });\r\n }\r\n // See if an update is needed\r\n if (fields.length > 0) {\r\n // Execute the request\r\n ctx.executeQueryAsync(function () {\r\n // Get the content type\r\n var contentType = src.get_contentTypes().getById(ctInfo.id);\r\n ctx.load(contentType);\r\n // Parse the fields\r\n for (var i = 0; i < fields.length; i++) {\r\n var field = fields[i];\r\n /**\r\n * The field link set_[property] methods don't seem to work. Setting the field information seems to be the only way.\r\n * The read only property is the only one that doesn't seem to work.\r\n */\r\n // See if the field ref has properties to update\r\n if (typeof (field.info) !== \"string\") {\r\n // Update the field properties\r\n field.info.DisplayName != null ? field.ref.set_title(field.info.DisplayName) : null;\r\n field.info.Hidden != null ? field.ref.set_hidden(field.info.Hidden) : null;\r\n field.info.ReadOnly != null ? field.ref.set_readOnlyField(field.info.ReadOnly) : null;\r\n field.info.Required != null ? field.ref.set_required(field.info.Required) : null;\r\n field.info.ShowInDisplayForm != null ? field.ref.setShowInDisplayForm(field.info.ShowInDisplayForm) : null;\r\n }\r\n // Create the field link\r\n var fieldLink = new SP.FieldLinkCreationInformation();\r\n fieldLink.set_field(field.ref);\r\n // Add the field link to the content type\r\n contentType.get_fieldLinks().add(fieldLink);\r\n }\r\n // Update the content type\r\n contentType.update(false);\r\n // Execute the request\r\n ctx.executeQueryAsync(\r\n // Success\r\n function () {\r\n // Log\r\n console.log(\"[gd-sprest][Set Content Type Fields] Added the field links successfully.\");\r\n // Resolve the request\r\n resolve();\r\n }, \r\n // Error\r\n function (sender, args) {\r\n // Log\r\n console.log(\"[gd-sprest][Set Content Type Fields] Error adding field references.\", args.get_message());\r\n // Reject the request\r\n reject();\r\n });\r\n }, function (sender, args) {\r\n // Log\r\n console.log(\"[gd-sprest][Set Content Type Fields] Error getting field references.\", args.get_message());\r\n // Resolve the request\r\n resolve();\r\n });\r\n }\r\n else {\r\n // Log\r\n console.log(\"[gd-sprest][Set Content Type Fields] No fields need to be added.\");\r\n // Resolve the request\r\n resolve();\r\n }\r\n });\r\n };\r\n // Gets the content type field links\r\n var getLinks = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n var ct = null;\r\n // See if list name exists\r\n if (ctInfo.listName) {\r\n // Get the list content type\r\n ct = lib_1.Web(ctInfo.webUrl).Lists(ctInfo.listName).ContentTypes(ctInfo.id);\r\n }\r\n else {\r\n // Get the content type\r\n ct = lib_1.Web(ctInfo.webUrl).ContentTypes(ctInfo.id);\r\n }\r\n // Query the field links\r\n ct.FieldLinks().query({\r\n Select: [\"DisplayName\", \"Id\", \"Name\", \"Required\", \"ReadOnly\", \"ShowInDisplayForm\"]\r\n }).execute(function (fieldLinks) {\r\n // Resolve the request\r\n resolve(fieldLinks.results);\r\n }, reject);\r\n });\r\n };\r\n // Set the order of the field references\r\n var setOrder = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Set the context\r\n var ctx = ctInfo.webUrl ? new SP.ClientContext(ctInfo.webUrl) : new SP.ClientContext(lib_1.ContextInfo.webServerRelativeUrl);\r\n // Get the source\r\n var src = ctInfo.listName ? ctx.get_web().get_lists().getByTitle(ctInfo.listName) : ctx.get_web();\r\n // Get the content type\r\n var contentType = src.get_contentTypes().getById(ctInfo.id);\r\n // Parse the fields to add\r\n var fieldNames = [];\r\n for (var i = 0; i < ctInfo.fields.length; i++) {\r\n var fieldInfo = ctInfo.fields[i];\r\n var fieldName = typeof (fieldInfo) === \"string\" ? fieldInfo : fieldInfo.Name || fieldInfo.FieldInternalName;\r\n // Add the field name\r\n fieldNames.push(fieldName);\r\n }\r\n // Reorder the content type\r\n contentType.get_fieldLinks().reorder(fieldNames);\r\n // Update the content type\r\n contentType.update(ctInfo.listName ? false : true);\r\n // Execute the request\r\n ctx.executeQueryAsync(\r\n // Success\r\n function () {\r\n // Log\r\n console.log(\"[gd-sprest][Set Content Type Fields] Updated the field order successfully.\");\r\n // Resolve the request\r\n resolve();\r\n }, \r\n // Error\r\n function (sender, args) {\r\n // Log\r\n console.log(\"[gd-sprest][Set Content Type Fields] Error updating the field order.\", args.get_message());\r\n // Reject the request\r\n reject();\r\n });\r\n });\r\n };\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure fields exist\r\n if (ctInfo.fields) {\r\n // Clear the links\r\n clearLinks().then(function (skipFields) {\r\n // Create the links\r\n createLinks(skipFields).then(function () {\r\n // Set the field order\r\n setOrder().then(resolve, reject);\r\n }, reject);\r\n }, reject);\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve();\r\n }\r\n });\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/setContentTypeFields.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/setGroupOwner.js":
/*!****************************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/setGroupOwner.js ***!
\****************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Sets the group owner\r\n * This uses JSOM to set a site group owner's property to another group. You can only set the owner to a user, using the REST API.\r\n */\r\nexports.setGroupOwner = function (groupName, ownerName) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Get the site groups\r\n var context = new SP.ClientContext();\r\n var siteGroups = context.get_web().get_siteGroups();\r\n // Get the groups\r\n var group = siteGroups.getByName(groupName);\r\n var owner = siteGroups.getByName(ownerName);\r\n // Set the owner\r\n group.set_owner(owner);\r\n // Save the changes\r\n group.update();\r\n // Execute the request\r\n context.executeQueryAsync(resolve, reject);\r\n });\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/methods/setGroupOwner.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/ribbonLink.js":
/*!*****************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/ribbonLink.js ***!
\*****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Ribbon Link\r\n */\r\nexports.RibbonLink = function (props) {\r\n // Creates the ribbon link\r\n var create = function () {\r\n var link = null;\r\n // Default the append flag\r\n var appendFl = typeof (props.appendFl) === \"boolean\" ? props.appendFl : false;\r\n // Get the link\r\n link = _elTopBar.querySelector(\"#\" + props.id);\r\n if (link == null) {\r\n // Create the link\r\n link = document.createElement(\"a\");\r\n link.className = \"ms-promotedActionButton \" + (props.className || \"\");\r\n link.href = props.href ? props.href : \"javascript:void()\";\r\n link.innerHTML = \"\" + props.title + \"\";\r\n link.id = props.id;\r\n link.onclick = props.onClick;\r\n // Add the link\r\n appendFl ? _elTopBar.appendChild(link) : _elTopBar.insertBefore(link, _elTopBar.firstChild);\r\n }\r\n // Return the link\r\n return link;\r\n };\r\n // Gets the top bar element\r\n var _elTopBar = null;\r\n var getTopBar = function () {\r\n // See if the bar exists\r\n if (_elTopBar == null) {\r\n // Set the element\r\n _elTopBar = document.querySelector(\"#RibbonContainer-TabRowRight\");\r\n }\r\n // Return the element\r\n return _elTopBar;\r\n };\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the top bar exists\r\n if (getTopBar()) {\r\n // Create the link\r\n var el = create();\r\n if (el) {\r\n // Resolve the promise\r\n resolve(el);\r\n }\r\n }\r\n else if (window) {\r\n // Wait for the window to be loaded\r\n window.addEventListener(\"load\", function () {\r\n // See if the top bar exists\r\n if (getTopBar()) {\r\n // Create the link\r\n var el = create();\r\n if (el) {\r\n // Resolve the promise\r\n resolve(el);\r\n }\r\n }\r\n });\r\n }\r\n });\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/ribbonLink.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sbLink.js":
/*!*************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sbLink.js ***!
\*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Suite Bar Link\r\n */\r\nexports.SuiteBarLink = function (props) {\r\n // Creates the ribbon link\r\n var create = function () {\r\n // Default the append flag\r\n var appendFl = typeof (props.appendFl) === \"boolean\" ? props.appendFl : true;\r\n // Query for the link, and ensure it exists\r\n var link = _elTopLinks.querySelector(\"#\" + props.id);\r\n if (link == null) {\r\n // Create a list link\r\n link = document.createElement(\"a\");\r\n link.className = \"ms-core-suiteLink-a \" + (props.className || \"\");\r\n link.href = props.href ? props.href : \"javascript:void()\";\r\n link.id = props.id;\r\n link.innerHTML = props.title;\r\n link.onclick = props.onClick;\r\n // Create the suite bar link\r\n var sbLink = document.createElement(\"li\");\r\n sbLink.className = \"ms-core-suiteLink\";\r\n sbLink.appendChild(link);\r\n // Append the item to the list\r\n appendFl ? _elTopLinks.appendChild(sbLink) : _elTopLinks.insertBefore(sbLink, _elTopLinks.firstChild);\r\n }\r\n // Return the link\r\n return link;\r\n };\r\n // Gets the top links element\r\n var _elTopLinks = null;\r\n var getTopLinks = function () {\r\n // See if the bar exists\r\n if (_elTopLinks == null) {\r\n // Set the element\r\n _elTopLinks = document.querySelector(\"#suiteLinksBox > ul\");\r\n }\r\n // Return the element\r\n return _elTopLinks;\r\n };\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the top links exists\r\n if (getTopLinks()) {\r\n // Create the link\r\n var el = create();\r\n if (el) {\r\n // Resolve the promise\r\n resolve(el);\r\n }\r\n }\r\n else if (window) {\r\n // Wait for the window to be loaded\r\n window.addEventListener(\"load\", function () {\r\n // See if the top links exists\r\n if (getTopLinks()) {\r\n // Create the link\r\n var el = create();\r\n if (el) {\r\n // Resolve the promise\r\n resolve(el);\r\n }\r\n }\r\n });\r\n }\r\n });\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sbLink.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/calloutManager.js":
/*!************************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/calloutManager.js ***!
\************************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Callout Manager\r\n */\r\nexports.CalloutManager = (function () {\r\n // Return the callout manager\r\n return {\r\n /** Closes all callouts on the page. */\r\n closeAll: function () {\r\n // Load the library and call the method\r\n return window[\"CalloutManager\"].closeAll();\r\n },\r\n /** Returns true if the associated callout is open. */\r\n containsOneCalloutOpen: function (el) {\r\n // Load the library and call the method\r\n return window[\"CalloutManager\"].containsOneCalloutOpen(el);\r\n },\r\n /** Returns an callout action entry. */\r\n createAction: function (options) {\r\n // Create the callout action options entry\r\n var caOptions = new window[\"CalloutActionOptions\"]();\r\n // Update the options\r\n for (var key in options) {\r\n // Set the option\r\n caOptions[key] = options[key];\r\n }\r\n // Create the action\r\n return new window[\"CalloutAction\"](caOptions);\r\n },\r\n /** Returns an callout action menu entries. */\r\n createMenuEntries: function (entries) {\r\n var menuEntries = [];\r\n // Parse the action options\r\n for (var i = 0; i < entries.length; i++) {\r\n var entry = entries[i];\r\n // Add the action\r\n menuEntries.push(new window[\"CalloutActionMenuEntry\"](entry.text, entry.onClickCallback, entry.iconUrl));\r\n }\r\n // Return the action menu entries\r\n return menuEntries;\r\n },\r\n /** Creates a new callout. */\r\n createNew: function (options) {\r\n // Load the library and call the method\r\n return window[\"CalloutManager\"].createNew(options);\r\n },\r\n /** Checks if the callout id exists, before creating it. */\r\n createNewIfNecessary: function (options) {\r\n // Load the library and call the method\r\n return window[\"CalloutManager\"].createNewIfNecessary(options);\r\n },\r\n /** Performs an action on each callout on the page. */\r\n forEach: function (callback) {\r\n // Load the library and call the method\r\n return window[\"CalloutManager\"].forEach(callback);\r\n },\r\n /** Finds the closest launch point and returns the callout associated with it. */\r\n getFromCalloutDescendant: function (descendant) {\r\n return window[\"CalloutManager\"].getFromCalloutDescendant(descendant);\r\n },\r\n /** Returns the callout from the specified launch point. */\r\n getFromLaunchPoint: function (launchPoint) {\r\n return window[\"CalloutManager\"].getFromLaunchPoint(launchPoint);\r\n },\r\n /** Returns the callout for the specified launch point, null if it doesn't exist. */\r\n getFromLaunchPointIfExists: function (launchPoint) {\r\n return window[\"CalloutManager\"].getFromLaunchPointIfExists(launchPoint);\r\n },\r\n /** Returns true if at least one callout is defined on the page is opened or opening. */\r\n isAtLeastOneCalloutOn: function () {\r\n return window[\"CalloutManager\"].isAtLeastOneCalloutOn();\r\n },\r\n /** Returns true if at least one callout is opened on the page. */\r\n isAtLeastOneCalloutOpen: function () {\r\n return window[\"CalloutManager\"].isAtLeastOneCalloutOpen();\r\n },\r\n // Ensures the core library is loaded\r\n init: function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the class exists\r\n if (window[\"CalloutManager\"]) {\r\n resolve();\r\n }\r\n else {\r\n // Wait for the core script to be loaded\r\n window[\"SP\"].SOD.executeFunc(\"callout.js\", \"Callout\", function () {\r\n // Resolve the promise\r\n resolve();\r\n });\r\n }\r\n });\r\n },\r\n /** Removes the callout and destroys it. */\r\n remove: function (callout) {\r\n // Load the library and call the method\r\n return window[\"CalloutManager\"].remove(callout);\r\n }\r\n };\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/calloutManager.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/index.js":
/*!***************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/index.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar calloutManager_1 = __webpack_require__(/*! ./calloutManager */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/calloutManager.js\");\r\nvar modalDialog_1 = __webpack_require__(/*! ./modalDialog */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/modalDialog.js\");\r\nvar notify_1 = __webpack_require__(/*! ./notify */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/notify.js\");\r\nvar sod_1 = __webpack_require__(/*! ./sod */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/sod.js\");\r\nvar status_1 = __webpack_require__(/*! ./status */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/status.js\");\r\nexports.SP = {\r\n CalloutManager: calloutManager_1.CalloutManager,\r\n ModalDialog: modalDialog_1.ModalDialog,\r\n Notify: notify_1.Notify,\r\n SOD: sod_1.SOD,\r\n Status: status_1.Status\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/index.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/modalDialog.js":
/*!*********************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/modalDialog.js ***!
\*********************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Modal Dialog\r\n */\r\nexports.ModalDialog = (function () {\r\n // Adds the custom methods to the dialog\r\n var getDialog = function (dialog) {\r\n // Shows the dialog\r\n dialog.show = function () {\r\n // Get the modal dialog element\r\n var el = dialog.get_dialogElement();\r\n if (el) {\r\n // Show the dialog\r\n el.style.display = \"\";\r\n }\r\n // Get the iframe element\r\n el = dialog.get_frameElement();\r\n if (el) {\r\n // Show the dialog\r\n el.style.display = \"\";\r\n }\r\n };\r\n // Updates the title\r\n dialog.setTitle = function (value) {\r\n // Get the title element\r\n var elDlg = dialog.get_dialogElement();\r\n var elTitle = elDlg ? elDlg.querySelector(\".ms-dlgLoadingTextDiv .ms-core-pageTitle\") : null;\r\n if (elTitle) {\r\n // Update the title\r\n elTitle.innerHTML = value;\r\n }\r\n };\r\n // Updates the sub-title\r\n dialog.setSubTitle = function (value) {\r\n // Get the sub-title element\r\n var elDlg = dialog.get_dialogElement();\r\n var elSubTitle = elDlg ? elDlg.querySelector(\".ms-dlgLoadingTextDiv ~ div\") : null;\r\n if (elSubTitle) {\r\n // Update the sub-title\r\n elSubTitle.innerHTML = value;\r\n }\r\n };\r\n // Return the dialog\r\n return dialog;\r\n };\r\n // Return the modal dialog\r\n return {\r\n // Close the dialog\r\n commonModalDialogClose: function (dialogResult, returnVal) {\r\n // Load the library and call the method\r\n exports.ModalDialog.load().then(function () { window[\"SP\"].UI.ModalDialog.commonModalDialogClose(dialogResult, returnVal); });\r\n },\r\n // Open a dialog\r\n commonModalDialogOpen: function (url, options, callback, args) {\r\n // Load the library and call the method\r\n exports.ModalDialog.load().then(function () { window[\"SP\"].UI.ModalDialog.commonModalDialogOpen(url, options, callback, args); });\r\n },\r\n // Method to ensure the core library is loaded\r\n load: function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the class exists\r\n if (window[\"SP\"] && window[\"SP\"].UI && window[\"SP\"].UI.ModalDialog) {\r\n resolve();\r\n }\r\n else {\r\n // Wait for the core script to be loaded\r\n window[\"SP\"].SOD.executeFunc(\"sp.js\", \"SP.UI.ModalDialog\", function () {\r\n // Resolve the promise\r\n resolve();\r\n });\r\n }\r\n });\r\n },\r\n // Opens a pop-up page\r\n OpenPopUpPage: function (url, callback, width, height) {\r\n // Load the library and call the method\r\n exports.ModalDialog.load().then(function () { window[\"SP\"].UI.ModalDialog.OpenPopUpPage(url, callback, width, height); });\r\n },\r\n // Refreshes the page\r\n RefreshPage: function (dialogResult) {\r\n // Load the library and call the method\r\n exports.ModalDialog.load().then(function () { window[\"SP\"].UI.ModalDialog.RefreshPage(dialogResult); });\r\n },\r\n // Shows a modal dialog\r\n showModalDialog: function (options) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Load the library and call the method\r\n exports.ModalDialog.load().then(function () {\r\n // Resolve the promise\r\n resolve(getDialog(window[\"SP\"].UI.ModalDialog.showModalDialog(options)));\r\n });\r\n });\r\n },\r\n // Shows a pop-up dialog\r\n ShowPopupDialog: function (url) {\r\n // Load the library and call the method\r\n exports.ModalDialog.load().then(function () { window[\"SP\"].UI.ModalDialog.ShowPopupDialog(url); });\r\n },\r\n // Shows a wait screen\r\n showWaitScreenSize: function (title, message, callback, height, width) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Load the library and call the method\r\n exports.ModalDialog.load().then(function () {\r\n // Resolve the promise\r\n resolve(getDialog(window[\"SP\"].UI.ModalDialog.showWaitScreenSize(title, message, callback, height, width)));\r\n });\r\n });\r\n },\r\n // Shows a wait screen w/ no close button\r\n showWaitScreenWithNoClose: function (title, message, height, width) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Load the library and call the method\r\n exports.ModalDialog.load().then(function () {\r\n // Resolve the promise\r\n resolve(getDialog(window[\"SP\"].UI.ModalDialog.showWaitScreenWithNoClose(title, message, height, width)));\r\n });\r\n });\r\n }\r\n };\r\n})();\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/modalDialog.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/notify.js":
/*!****************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/notify.js ***!
\****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Notification\r\n */\r\nexports.Notify = {\r\n // Adds a notification\r\n addNotification: function (html, sticky) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the library and call the method\r\n exports.Notify.load().then(function () { resolve(window[\"SP\"].UI.Notify.addNotification(html, sticky)); });\r\n });\r\n },\r\n // Method to ensure the core library is loaded\r\n load: function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the class exists\r\n if (window[\"SP\"] && window[\"SP\"].UI && window[\"SP\"].UI.Notify) {\r\n resolve();\r\n }\r\n else {\r\n // Wait for the core script to be loaded\r\n window[\"SP\"].SOD.executeFunc(\"sp.js\", \"SP.UI.Notify\", function () {\r\n // Resolve the promise\r\n resolve();\r\n });\r\n }\r\n });\r\n },\r\n // Removes a notification\r\n removeNotification: function (id) {\r\n // Load the library and call the method\r\n exports.Notify.load().then(function () { window[\"SP\"].UI.Notify.removeNotification(id); });\r\n }\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/notify.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/sod.js":
/*!*************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/sod.js ***!
\*************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Script on Demand (SOD)\r\n */\r\nexports.SOD = {\r\n // Executes the specified function in the specified file with the optional arguments.\r\n execute: function (key, functionName) {\r\n var args = [];\r\n for (var _i = 2; _i < arguments.length; _i++) {\r\n args[_i - 2] = arguments[_i];\r\n }\r\n window[\"SP\"] ? window[\"SP\"].SOD.execute(key, functionName, args) : null;\r\n },\r\n // Ensures that the specified file that contains the specified function is loaded and then runs the specified callback function.\r\n executeFunc: function (key, functionName, fn) { window[\"SP\"] ? window[\"SP\"].SOD.executeFunc(key, functionName, fn) : null; },\r\n // Executes the specified function if the specified event has occurred; otherwise, adds the function to the pending job queue.\r\n executeOrDelayUntilEventNotified: function (func, eventName) { window[\"SP\"] ? window[\"SP\"].SOD.executeOrDelayUntilEventNotified(func, eventName) : null; },\r\n // Executes the specified function if the file containing it is loaded; otherwise, adds it to the pending job queue.\r\n executeOrDelayUntilScriptLoaded: function (func, depScriptFileName) { window[\"SP\"] ? window[\"SP\"].SOD.executeOrDelayUntilScriptLoaded(func, depScriptFileName) : null; },\r\n // Records the event and executes any jobs in the pending job queue that are waiting on the event.\r\n notifyEventAndExecuteWaitingJobs: function (eventName) { window[\"SP\"] ? window[\"SP\"].SOD.notifyEventAndExecuteWaitingJobs(eventName) : null; },\r\n // Records that the script file is loaded and executes any jobs in the pending job queue that are waiting for the script file to be loaded.\r\n notifyScriptLoadedAndExecuteWaitingJobs: function (scriptFileName) { window[\"SP\"] ? window[\"SP\"].SOD.notifyScriptLoadedAndExecuteWaitingJobs(scriptFileName) : null; },\r\n // Registers the specified file at the specified URL.\r\n registerSod: function (key, url) { window[\"SP\"] ? window[\"SP\"].SOD.registerSod(key, url) : null; },\r\n // Registers the specified file as a dependency of another file.\r\n registerSodDep: function (key, dep) { window[\"SP\"] ? window[\"SP\"].SOD.registerSodDep(key, dep) : null; },\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/sod.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/status.js":
/*!****************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/status.js ***!
\****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Status\r\n */\r\nexports.Status = {\r\n // Adds a status\r\n addStatus: function (title, html, prepend) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the library\r\n exports.Status.load().then(function () {\r\n // Add the status and resolve the promise\r\n resolve(window[\"SP\"].UI.Status.addStatus(title, html, prepend));\r\n });\r\n });\r\n },\r\n // Appends a status\r\n appendStatus: function (id, title, html) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the library\r\n exports.Status.load().then(function () {\r\n // Add the status and resolve the promise\r\n resolve(window[\"SP\"].UI.Status.appendStatus(id, title, html));\r\n });\r\n });\r\n },\r\n // Method to ensure the core library is loaded\r\n load: function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the class exists\r\n if (window[\"SP\"] && window[\"SP\"].UI && window[\"SP\"].UI.Status) {\r\n resolve();\r\n }\r\n else {\r\n // Wait for the core script to be loaded\r\n window[\"SP\"].SOD.executeFunc(\"sp.js\", \"SP.UI.Status\", function () {\r\n // Resolve the promise\r\n resolve();\r\n });\r\n }\r\n });\r\n },\r\n // Removes all status messages\r\n removeAllStatus: function (hide) {\r\n // Load the library and call the method\r\n exports.Status.load().then(function () { window[\"SP\"].UI.Status.removeAllStatus(hide); });\r\n },\r\n // Removes a status\r\n removeStatus: function (id) {\r\n // Load the library and call the method\r\n exports.Status.load().then(function () { window[\"SP\"].UI.Status.removeStatus(id); });\r\n },\r\n // Sets the status color\r\n setStatusPriColor: function (id, color) {\r\n // Load the library and call the method\r\n exports.Status.load().then(function () { window[\"SP\"].UI.Status.setStatusPriColor(id, color); });\r\n },\r\n // Updates the status\r\n updateStatus: function (id, html) {\r\n // Load the library and call the method\r\n exports.Status.load().then(function () { window[\"SP\"].UI.Status.updateStatus(id, html); });\r\n }\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/sp/status.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/spCfg.js":
/*!************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/spCfg.js ***!
\************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nfunction __export(m) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\nvar lib_1 = __webpack_require__(/*! ../lib */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/lib/index.js\");\r\nvar __1 = __webpack_require__(/*! .. */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/index.js\");\r\nvar _1 = __webpack_require__(/*! . */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/index.js\");\r\n__export(__webpack_require__(/*! ./spCfgTypes */ \"./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/spCfgTypes.js\"));\r\n/**\r\n * SharePoint Configuration\r\n */\r\nexports.SPConfig = function (cfg, webUrl) {\r\n // The selected configuration type to install\r\n var _cfgType;\r\n // The request digest\r\n var _requestDigest = null;\r\n // The target name to install/uninstall\r\n var _targetName;\r\n /**\r\n * Methods\r\n */\r\n // Method to create the content types\r\n var createContentTypes = function (contentTypes, cfgContentTypes, list) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure fields exist\r\n if (cfgContentTypes == null || cfgContentTypes.length == 0) {\r\n // Resolve the promise\r\n resolve();\r\n return;\r\n }\r\n // Method to get the parent content type\r\n var getParentCT = function (ctName, url) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Get the web containing the parent content type\r\n lib_1.Web(url)\r\n // Get the content types\r\n .ContentTypes()\r\n // Filter for the parent name\r\n .query({\r\n Filter: \"Name eq '\" + ctName + \"'\"\r\n })\r\n // Execute the request\r\n .execute(function (cts) {\r\n // See if the parent exists\r\n if (cts.results[0]) {\r\n // Resolve the promise\r\n resolve({ Id: cts.results[0].Id.StringValue, Url: url });\r\n }\r\n // Else, ensure this isn't the root web\r\n else if (url != lib_1.ContextInfo.siteServerRelativeUrl) {\r\n // Check the root web for the parent content type\r\n getParentCT(ctName, lib_1.ContextInfo.siteServerRelativeUrl).then(resolve, reject);\r\n }\r\n else {\r\n // Reject the promise\r\n reject();\r\n }\r\n }, reject);\r\n });\r\n };\r\n // Parse the configuration\r\n _1.Executor(cfgContentTypes, function (cfg) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if this content type already exists\r\n var ct = isInCollection(\"Name\", cfg.Name, contentTypes.results);\r\n if (ct) {\r\n // Log\r\n console.log(\"[gd-sprest]\" + (list ? \"[\" + list.Title + \" List]\" : \"\") + \"[Content Type] The content type '\" + cfg.Name + \"' already exists.\");\r\n // Update the configuration\r\n cfg.ContentType = ct;\r\n // Resolve the promise and return\r\n resolve(cfg);\r\n return;\r\n }\r\n // Log\r\n console.log(\"[gd-sprest]\" + (list ? \"[\" + list.Title + \" List]\" : \"\") + \"[Content Type] Creating the '\" + cfg.Name + \"' content type.\");\r\n // See if the parent name exists\r\n if (cfg.ParentName) {\r\n getParentCT(cfg.ParentName, cfg.ParentWebUrl || webUrl).then(\r\n // Success\r\n function (parentInfo) {\r\n // Add the content type\r\n _1.createContentType({\r\n Description: cfg.Description,\r\n Group: cfg.Group,\r\n Name: cfg.Name\r\n }, parentInfo, webUrl, list ? list.Title : null).then(\r\n // Success\r\n function (ct) {\r\n // Log\r\n console.log(\"[gd-sprest]\" + (list ? \"[\" + list.Title + \" List]\" : \"\") + \"[Content Type] The content type '\" + cfg.Name + \"' was created successfully.\");\r\n // Update the configuration\r\n cfg.ContentType = ct;\r\n // Trigger the event\r\n cfg.onCreated ? cfg.onCreated(ct, list) : null;\r\n // Resolve the promise\r\n resolve(cfg);\r\n }, \r\n // Error\r\n function (error) {\r\n // Log\r\n console.log(\"[gd-sprest]\" + (list ? \"[\" + list.Title + \" List]\" : \"\") + \"[Content Type] The content type '\" + cfg.Name + \"' failed to be created.\", error);\r\n // Reject the promise\r\n reject(error);\r\n });\r\n }, \r\n // Error\r\n function () {\r\n // Log\r\n console.log(\"[gd-sprest]\" + (list ? \"[\" + list.Title + \" List]\" : \"\") + \"[Content Type] The parent content type '\" + cfg.ParentName + \"' was not found.\");\r\n // Reject the promise\r\n reject(ct.response);\r\n });\r\n }\r\n else {\r\n // Create the content type\r\n contentTypes.add({\r\n Description: cfg.Description,\r\n Group: cfg.Group,\r\n Name: cfg.Name,\r\n Id: {\r\n __metadata: {\r\n type: \"SP.ContentTypeId\"\r\n },\r\n StringValue: cfg.Id || \"0x0100\" + lib_1.ContextInfo.generateGUID().replace(/-/g, \"\")\r\n }\r\n }).execute(\r\n // Success\r\n function (ct) {\r\n // Log\r\n console.log(\"[gd-sprest]\" + (list ? \"[\" + list.Title + \" List]\" : \"\") + \"[Content Type] The content type '\" + cfg.Name + \"' was created successfully.\");\r\n // Update the configuration\r\n cfg.ContentType = ct;\r\n // Trigger the event\r\n cfg.onCreated ? cfg.onCreated(ct, list) : null;\r\n // Resolve the promise\r\n resolve(cfg);\r\n }, \r\n // Error\r\n function (error) {\r\n // Log\r\n console.log(\"[gd-sprest]\" + (list ? \"[\" + list.Title + \" List]\" : \"\") + \"[Content Type] The content type '\" + cfg.Name + \"' failed to be created.\");\r\n console.error(\"[gd-sprest]\" + (list ? \"[\" + list.Title + \" List]\" : \"\") + \"[Content Type] Error: \" + error.response);\r\n // Reject the promise\r\n reject(error.response);\r\n });\r\n }\r\n });\r\n }).then(function () {\r\n // Parse the configuration\r\n _1.Executor(cfgContentTypes, function (cfgContentType) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n var cfgUpdate = {};\r\n var updateFl = false;\r\n // Ensure the content type exists\r\n if (cfgContentType.ContentType == null) {\r\n // Skip this content type\r\n resolve();\r\n return;\r\n }\r\n // Log\r\n console.log(\"[gd-sprest]\" + (list ? \"[\" + list.Title + \" List]\" : \"\") + \"[Content Type] Updating the field references for: \" + cfgContentType.Name);\r\n // Create the field refs\r\n _1.setContentTypeFields({\r\n fields: cfgContentType.FieldRefs,\r\n id: cfgContentType.ContentType.Id.StringValue,\r\n listName: list ? list.Title : null,\r\n webUrl: webUrl\r\n }).then(function () {\r\n /**\r\n * See if we need to update the properties\r\n */\r\n // Description\r\n if (cfgContentType.Description != null && cfgContentType.ContentType.Description != cfgContentType.Description) {\r\n // Update the configuration\r\n cfgUpdate.Description = cfgContentType.Description;\r\n // Set the flag\r\n updateFl = true;\r\n }\r\n // Group\r\n if (cfgContentType.Group != null && cfgContentType.ContentType.Group != cfgContentType.Group) {\r\n // Update the configuration\r\n cfgUpdate.Group = cfgContentType.Group;\r\n // Set the flag\r\n updateFl = true;\r\n }\r\n // JSLink\r\n if (cfgContentType.JSLink != null && cfgContentType.ContentType.JSLink != cfgContentType.JSLink) {\r\n // Update the configuration\r\n cfgUpdate.JSLink = cfgContentType.JSLink;\r\n // Set the flag\r\n updateFl = true;\r\n }\r\n // Name\r\n if (cfgContentType.Name != null && cfgContentType.ContentType.Name != cfgContentType.Name) {\r\n // Update the configuration\r\n cfgUpdate.Name = cfgContentType.Name;\r\n // Set the flag\r\n updateFl = true;\r\n }\r\n // See if an update is needed\r\n if (updateFl) {\r\n // Log\r\n console.log(\"[gd-sprest]\" + (list ? \"[\" + list.Title + \" List]\" : \"\") + \"[Content Type][\" + cfgContentType.ContentType.Name + \"] Updating the content type.\");\r\n // Update the content type\r\n cfgContentType.ContentType.update(cfgUpdate).execute(function () {\r\n // Log\r\n console.log(\"[gd-sprest]\" + (list ? \"[\" + list.Title + \" List]\" : \"\") + \"[Content Type][\" + cfgContentType.ContentType.Name + \"] Update request completed.\");\r\n // Trigger the event\r\n cfgContentType.onUpdated ? cfgContentType.onUpdated(cfgContentType.ContentType) : null;\r\n // Resolve this request\r\n resolve();\r\n }, reject);\r\n }\r\n else {\r\n // Trigger the event\r\n cfgContentType.onUpdated ? cfgContentType.onUpdated(cfgContentType.ContentType) : null;\r\n // Resolve this request\r\n resolve();\r\n }\r\n }, reject);\r\n });\r\n }).then(resolve);\r\n }, reject);\r\n });\r\n };\r\n // Method to create the fields`\r\n var createFields = function (fields, cfgFields, list) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure fields exist\r\n if (cfgFields == null || cfgFields.length == 0) {\r\n // Resolve the promise\r\n resolve();\r\n return;\r\n }\r\n // Parse the configuration\r\n _1.Executor(cfgFields, function (cfg) {\r\n return new Promise(function (resolve, reject) {\r\n // See if this field already exists\r\n var field = isInCollection(\"InternalName\", cfg.name, fields.results);\r\n if (field) {\r\n // Log\r\n console.log(\"[gd-sprest][Field] The field '\" + cfg.name + \"' already exists.\");\r\n // Trigger the event\r\n cfg.onUpdated ? cfg.onUpdated(field, list) : null;\r\n // Resolve the promise\r\n resolve();\r\n }\r\n else {\r\n // Log\r\n console.log(\"[gd-sprest][Field] Creating the '\" + cfg.name + \"' field.\");\r\n // See if this is an associated lookup field\r\n var cfgLookup = cfg;\r\n if (cfgLookup.type == _1.SPCfgFieldType.Lookup && cfgLookup.fieldRef) {\r\n // Get the field reference\r\n var fieldRef = isInCollection(\"InternalName\", cfgLookup.fieldRef, fields.results);\r\n if (fieldRef) {\r\n // Update the value to be the guid\r\n cfgLookup.fieldRef = fieldRef.Id;\r\n }\r\n }\r\n // Compute the schema xml\r\n _1.FieldSchemaXML(cfg).then(function (response) {\r\n var schemas = typeof (response) === \"string\" ? [response] : response;\r\n // Parse the fields to add\r\n for (var i = 0; i < schemas.length; i++) {\r\n // Add the field\r\n fields.createFieldAsXml(schemas[i]).execute(function (field) {\r\n // See if it was successful\r\n if (field.InternalName) {\r\n // Log\r\n console.log(\"[gd-sprest][Field] The field '\" + field.InternalName + \"' was created successfully.\");\r\n // Trigger the event\r\n cfg.onCreated ? cfg.onCreated(field, list) : null;\r\n // Resolve the promise\r\n resolve();\r\n }\r\n else {\r\n // Log\r\n console.log(\"[gd-sprest][Field] The field '\" + cfg.name + \"' failed to be created.\");\r\n console.error(\"[gd-sprest][Field] Error: \" + field.response);\r\n // Reject the promise\r\n reject();\r\n }\r\n });\r\n }\r\n });\r\n }\r\n });\r\n }).then(resolve);\r\n });\r\n };\r\n // Method to create the lists\r\n var createLists = function (lists, cfgLists) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Execute code against each list configuration\r\n _1.Executor(cfgLists, function (cfgList) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // See if the target name exists and matches this list\r\n if (_cfgType && _targetName) {\r\n // Ensure it's for this list\r\n if (cfgList.ListInformation.Title.toLowerCase() != _targetName) {\r\n // Do nothing\r\n resolve();\r\n return;\r\n }\r\n }\r\n // See if this list already exists\r\n var list = isInCollection(\"Title\", cfgList.ListInformation.Title, lists.results);\r\n if (list) {\r\n // Log\r\n console.log(\"[gd-sprest][List] The list '\" + cfgList.ListInformation.Title + \"' already exists.\");\r\n // Resolve the promise and do nothing\r\n resolve();\r\n return;\r\n }\r\n // Log\r\n console.log(\"[gd-sprest][List] Creating the '\" + cfgList.ListInformation.Title + \"' list.\");\r\n // Update the list name and remove spaces\r\n var listInfo = cfgList.ListInformation;\r\n var listName = listInfo.Title;\r\n listInfo.Title = listName.replace(/ /g, \"\");\r\n // Add the list\r\n lists.add(listInfo)\r\n // Execute the request\r\n .execute(function (list) {\r\n // Restore the list name in the configuration\r\n listInfo.Title = listName;\r\n // See if the request was successful\r\n if (list.Id) {\r\n // See if we need to update the list\r\n if (list.Title != listName) {\r\n // Update the list\r\n list.update({ Title: listName }).execute(function () {\r\n // Log\r\n console.log(\"[gd-sprest][List] The list '\" + list.Title + \"' was created successfully.\");\r\n // Resolve the promise\r\n resolve();\r\n });\r\n }\r\n else {\r\n // Log\r\n console.log(\"[gd-sprest][List] The list '\" + list.Title + \"' was created successfully.\");\r\n // Resolve the promise\r\n resolve();\r\n }\r\n // Trigger the event\r\n cfgList.onCreated ? cfgList.onCreated(list) : null;\r\n }\r\n else {\r\n // Log\r\n console.log(\"[gd-sprest][List] The list '\" + listInfo.Title + \"' failed to be created.\");\r\n console.log(\"[gd-sprest][List] Error: '\" + list.response);\r\n // Resolve the promise\r\n resolve();\r\n }\r\n }, reject);\r\n });\r\n }).then(function () {\r\n // Update the lists\r\n updateLists(cfgLists).then(function () {\r\n // Resolve the promise\r\n resolve();\r\n });\r\n });\r\n });\r\n };\r\n // Method to create the user custom actions\r\n var createUserCustomActions = function (customActions, cfgCustomActions) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the configuration type exists\r\n if (_cfgType) {\r\n // Ensure it's for this type\r\n if (_cfgType != _1.SPCfgType.SiteUserCustomActions || _cfgType != _1.SPCfgType.WebUserCustomActions) {\r\n // Resolve the promise\r\n resolve();\r\n return;\r\n }\r\n }\r\n // Ensure the lists exist\r\n if (cfgCustomActions == null || cfgCustomActions.length == 0) {\r\n // Resolve the promise and return it\r\n resolve();\r\n return;\r\n }\r\n // Parse the configuration\r\n _1.Executor(cfgCustomActions, function (cfg) {\r\n // See if the target name exists\r\n if (_cfgType && _targetName) {\r\n // Ensure it's for this custom action\r\n if (cfg.Name.toLowerCase() != _targetName ||\r\n cfg.Title.toLowerCase() != _targetName) {\r\n // Skip this custom action\r\n return;\r\n }\r\n }\r\n // See if this custom action already exists\r\n if (isInCollection(\"Name\", cfg.Name, customActions.results)) {\r\n // Log\r\n console.log(\"[gd-sprest][Custom Action] The custom action '\" + cfg.Name + \"' already exists.\");\r\n }\r\n else {\r\n // See if rights exist\r\n if (cfg.Rights) {\r\n // Update the value\r\n cfg.Rights = updateBasePermissions(cfg.Rights);\r\n }\r\n // Add the custom action\r\n customActions.add(cfg).execute(function (ca) {\r\n // Ensure it exists\r\n if (ca.existsFl) {\r\n // Log\r\n console.log(\"[gd-sprest][Custom Action] The custom action '\" + ca.Name + \"' was created successfully.\");\r\n }\r\n else {\r\n // Log\r\n console.log(\"[gd-sprest][Custom Action] The custom action '\" + ca.Name + \"' failed to be created.\");\r\n console.log(\"[gd-sprest][Custom Action] Error: \" + ca.response);\r\n }\r\n }, reject, true);\r\n }\r\n }).then(resolve);\r\n });\r\n };\r\n // Method to create the list views\r\n var createViews = function (list, views, cfgViews) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure the list views exist\r\n if (cfgViews == null || cfgViews.length == 0) {\r\n // Resolve the promise and return it\r\n resolve();\r\n return;\r\n }\r\n // Parse the configuration\r\n _1.Executor(cfgViews, function (cfg) {\r\n // See if this view exists\r\n var view = isInCollection(\"Title\", cfg.ViewName, views.results);\r\n if (view) {\r\n // Log\r\n console.log(\"[gd-sprest][View] The view '\" + cfg.ViewName + \"' already exists.\");\r\n }\r\n else {\r\n // Add the view\r\n views.add({\r\n Title: cfg.ViewName,\r\n ViewQuery: cfg.ViewQuery\r\n }).execute(function (view) {\r\n // Ensure it exists\r\n if (view.existsFl) {\r\n // Log\r\n console.log(\"[gd-sprest][View] The view '\" + cfg.ViewName + \"' was created successfully.\");\r\n // Trigger the event\r\n cfg.onCreated ? cfg.onCreated(view, list) : null;\r\n }\r\n else {\r\n // Log\r\n console.log(\"[gd-sprest][View] The view '\" + cfg.ViewName + \"' failed to be created.\");\r\n console.log(\"[gd-sprest][View] Error: \" + view.response);\r\n }\r\n }, reject, true);\r\n }\r\n }).then(function () {\r\n // Update the views\r\n updateViews(list, views, cfgViews).then(function () {\r\n // Resolve the promise\r\n resolve();\r\n });\r\n });\r\n });\r\n };\r\n // Method to create the web parts\r\n var createWebParts = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n var cfgWebParts = cfg.WebPartCfg;\r\n // Ensure fields exist\r\n if (cfgWebParts == null || cfgWebParts.length == 0) {\r\n // Resolve the promise\r\n resolve();\r\n return;\r\n }\r\n // Log\r\n console.log(\"[gd-sprest][WebPart] Creating the web parts.\");\r\n // Get the web\r\n lib_1.Web(webUrl, { requestDigest: _requestDigest })\r\n // Get the web part catalog\r\n .getCatalog(__1.SPTypes.ListTemplateType.WebPartCatalog)\r\n // Get the root folder\r\n .RootFolder()\r\n // Expand the files and items\r\n .query({\r\n Expand: [\"Files\"]\r\n })\r\n // Execute the request\r\n .execute(function (folder) {\r\n var ctr = 0;\r\n var _loop_1 = function (i) {\r\n var cfgWebPart = cfgWebParts[i];\r\n // See if the target name exists\r\n if (_cfgType && _targetName) {\r\n // Ensure it's for this list\r\n if (cfgWebPart.FileName.toLowerCase() != _targetName) {\r\n return \"continue\";\r\n }\r\n }\r\n // The post execute method\r\n var postExecute = function () {\r\n // Increment the counter\r\n if (++ctr >= cfgWebParts.length) {\r\n // Resolve the promise\r\n resolve();\r\n }\r\n };\r\n // See if this webpart exists\r\n var file = isInCollection(\"Name\", cfgWebPart.FileName, folder.Files.results);\r\n if (file.Name) {\r\n // Log\r\n console.log(\"[gd-sprest][WebPart] The webpart '\" + cfgWebPart.FileName + \"' already exists.\");\r\n // Trigger the event\r\n cfgWebPart.onUpdated ? cfgWebPart.onUpdated(file) : null;\r\n // Execute the post event\r\n postExecute();\r\n }\r\n else {\r\n // Trim the xml\r\n var xml = cfgWebPart.XML.trim();\r\n // Convert the string to an array buffer\r\n var buffer = new ArrayBuffer(xml.length * 2);\r\n var bufferView = new Uint16Array(buffer);\r\n for (var j = 0; j < xml.length; j++) {\r\n bufferView[j] = xml.charCodeAt(j);\r\n }\r\n // Create the webpart, but execute the requests one at a time\r\n folder.Files.add(cfgWebPart.FileName, true, buffer).execute(\r\n // Success\r\n function (file) {\r\n // See if group exists\r\n if (cfgWebPart.Group) {\r\n // Set the target to the root web\r\n lib_1.Web(lib_1.ContextInfo.siteServerRelativeUrl)\r\n // Get the web part catalog\r\n .getCatalog(__1.SPTypes.ListTemplateType.WebPartCatalog)\r\n // Get the Items\r\n .Items()\r\n // Query for this webpart\r\n .query({\r\n Filter: \"FileLeafRef eq '\" + cfgWebPart.FileName + \"'\"\r\n })\r\n // Execute the request\r\n .execute(function (items) {\r\n // Update the item\r\n items.results[0].update({\r\n Group: cfgWebPart.Group\r\n }).execute(postExecute);\r\n });\r\n }\r\n // Log\r\n console.log(\"[gd-sprest][WebPart] The '\" + file.Name + \"' webpart file was uploaded successfully.\");\r\n // Trigger the event\r\n cfgWebPart.onCreated ? cfgWebPart.onCreated(file) : null;\r\n }, \r\n // Error\r\n function () {\r\n // Log\r\n console.log(\"[gd-sprest][WebPart] The '\" + file.Name + \"' webpart file upload failed.\");\r\n // Skip this webpart\r\n resolve();\r\n });\r\n }\r\n };\r\n // Parse the configuration\r\n for (var i = 0; i < cfgWebParts.length; i++) {\r\n _loop_1(i);\r\n }\r\n }, reject);\r\n });\r\n };\r\n // Method to see if an object exists in a collection\r\n var isInCollection = function (key, value, collection) {\r\n var valueLower = value.toLowerCase();\r\n // Parse the collection\r\n for (var i = 0; i < collection.length; i++) {\r\n var keyValue = collection[i][key];\r\n keyValue = keyValue ? keyValue.toLowerCase() : \"\";\r\n // See if the item exists\r\n if (valueLower == keyValue) {\r\n // Return true\r\n return collection[i];\r\n }\r\n }\r\n // Not in the collection\r\n return false;\r\n };\r\n // Method to remove the content type\r\n var removeContentTypes = function (contentTypes, cfgContentTypes) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure the content types exist\r\n if (cfgContentTypes == null || cfgContentTypes.length == 0) {\r\n // Resolve the promise and return it\r\n resolve();\r\n return;\r\n }\r\n // Parse the configuration\r\n _1.Executor(cfgContentTypes, function (cfg) {\r\n // Get the field\r\n var ct = isInCollection(\"Name\", cfg.Name, contentTypes.results);\r\n if (ct) {\r\n // Remove the field\r\n ct.delete().execute(function () {\r\n // Log\r\n console.log(\"[gd-sprest][Content Type] The content type '\" + ct.Name + \"' was removed.\");\r\n }, reject, true);\r\n }\r\n }).then(resolve);\r\n });\r\n };\r\n // Method to remove the fields\r\n var removeFields = function (fields, cfgFields) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure the fields exist\r\n if (cfgFields == null || cfgFields.length == 0) {\r\n // Resolve the promise and return it\r\n resolve();\r\n return;\r\n }\r\n // Parse the configuration\r\n _1.Executor(cfgFields, function (cfg) {\r\n // Get the field\r\n var field = isInCollection(\"InternalName\", cfg.name, fields.results);\r\n if (field) {\r\n // Remove the field\r\n field.delete().execute(function () {\r\n // Log\r\n console.log(\"[gd-sprest][Field] The field '\" + field.InternalName + \"' was removed.\");\r\n }, reject, true);\r\n }\r\n }).then(resolve);\r\n });\r\n };\r\n // Method to remove the lists\r\n var removeLists = function (lists, cfgLists) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the configuration type exists\r\n if (_cfgType) {\r\n // Ensure it's for this type\r\n if (_cfgType != _1.SPCfgType.Lists) {\r\n // Resolve the promise\r\n resolve();\r\n return;\r\n }\r\n }\r\n // Ensure the lists exist\r\n if (cfgLists == null || cfgLists.length == 0) {\r\n // Resolve the promise and return it\r\n resolve();\r\n return;\r\n }\r\n // Parse the configuration\r\n _1.Executor(cfgLists, function (cfg) {\r\n // See if the target name exists\r\n if (_cfgType && _targetName) {\r\n // Ensure it's for this list\r\n if (cfg.ListInformation.Title.toLowerCase() != _targetName) {\r\n // Skip this list\r\n return;\r\n }\r\n }\r\n // Get the list\r\n var list = isInCollection(\"Title\", cfg.ListInformation.Title, lists.results);\r\n if (list) {\r\n // Remove the list\r\n list.delete().execute(function () {\r\n // Log\r\n console.log(\"[gd-sprest][List] The list '\" + list.Title + \"' was removed.\");\r\n }, reject, true);\r\n }\r\n }).then(resolve);\r\n });\r\n };\r\n // Method to remove the user custom actions\r\n var removeUserCustomActions = function (customActions, cfgCustomActions) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the configuration type exists\r\n if (_cfgType) {\r\n // Ensure it's for this type\r\n if (_cfgType != _1.SPCfgType.SiteUserCustomActions || _cfgType != _1.SPCfgType.WebUserCustomActions) {\r\n // Resolve the promise\r\n resolve();\r\n return;\r\n }\r\n }\r\n // Ensure the custom actions exist\r\n if (cfgCustomActions == null || cfgCustomActions.length == 0) {\r\n // Resolve the promise and return it\r\n resolve();\r\n return;\r\n }\r\n // Parse the configuration\r\n _1.Executor(cfgCustomActions, function (cfg) {\r\n // See if the target name exists\r\n if (_cfgType && _targetName) {\r\n // Ensure it's for this custom action\r\n if (cfg.Name.toLowerCase() != _targetName ||\r\n cfg.Title.toLowerCase() != _targetName) {\r\n // Skip this custom action\r\n return;\r\n }\r\n }\r\n // Get the custom action\r\n var ca = isInCollection(\"Name\", cfg.Name, customActions.results);\r\n if (ca) {\r\n // Remove the custom action\r\n ca.delete().execute(function () {\r\n // Log\r\n console.log(\"[gd-sprest][Custom Action] The custom action '\" + ca.Name + \"' was removed.\");\r\n }, reject, true);\r\n }\r\n }).then(resolve);\r\n });\r\n };\r\n // Method to remove the web parts\r\n var removeWebParts = function (site) {\r\n var cfgWebParts = cfg.WebPartCfg;\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the configuration type exists\r\n if (_cfgType) {\r\n // Ensure it's for this type\r\n if (_cfgType != _1.SPCfgType.WebParts) {\r\n // Resolve the promise\r\n resolve();\r\n return;\r\n }\r\n }\r\n // Ensure the configuration exists\r\n if (cfgWebParts == null || cfgWebParts.length == 0) {\r\n // Resolve the promise and return it\r\n resolve();\r\n return;\r\n }\r\n // Log\r\n console.log(\"[gd-sprest][WebPart] Removing the web parts.\");\r\n // Get the webpart gallery from the root web\r\n site.RootWeb().getCatalog(__1.SPTypes.ListTemplateType.WebPartCatalog)\r\n // Get the root folder\r\n .RootFolder()\r\n // Expand the files\r\n .Files()\r\n // Execute the request\r\n .execute(function (files) {\r\n var _loop_2 = function (i) {\r\n var cfgWebPart = cfgWebParts[i];\r\n // See if the target name exists\r\n if (_cfgType && _targetName) {\r\n // Ensure it's for this webpart\r\n if (cfgWebPart.FileName.toLowerCase() != _targetName) {\r\n return \"continue\";\r\n }\r\n }\r\n // Get the file\r\n var file = isInCollection(\"Name\", cfgWebPart.FileName, files.results);\r\n if (file) {\r\n // Remove the file\r\n file.delete().execute(function () {\r\n // Log\r\n console.log(\"[gd-sprest][WebPart] The webpart '\" + file.Name + \"' file was removed.\");\r\n }, true);\r\n }\r\n };\r\n // Parse the configuration\r\n for (var i = 0; i < cfgWebParts.length; i++) {\r\n _loop_2(i);\r\n }\r\n // Resolve the promise\r\n resolve();\r\n }, reject);\r\n });\r\n };\r\n // Method to get the web information\r\n var setRequestDigest = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n if (webUrl) {\r\n // Get the web context information\r\n lib_1.ContextInfo.getWeb(webUrl).execute(function (webInfo) {\r\n _requestDigest = webInfo.GetContextWebInformation.FormDigestValue;\r\n // Resolve the promise\r\n resolve();\r\n }, reject);\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve();\r\n }\r\n });\r\n };\r\n // Method to update the base permissions\r\n var updateBasePermissions = function (values) {\r\n var high = values.High;\r\n var low = values.Low;\r\n // See if this is an array\r\n for (var i = 0; i < values[\"length\"]; i++) {\r\n var value = values[i];\r\n // See if this is the full mask\r\n if (value == 65) {\r\n // Set the values\r\n low = 65535;\r\n high = 32767;\r\n // Break from the loop\r\n break;\r\n }\r\n // Else, see if it's empty\r\n else if (value == 0) {\r\n // Clear the values\r\n low = 0;\r\n high = 0;\r\n }\r\n // Else, update the base permission\r\n else {\r\n var bit = value - 1;\r\n var bitValue = 1;\r\n // Validate the bit\r\n if (bit < 0) {\r\n continue;\r\n }\r\n // See if it's a low permission\r\n if (bit < 32) {\r\n // Compute the value\r\n bitValue = bitValue << bit;\r\n // Set the low value\r\n low |= bitValue;\r\n }\r\n // Else, it's a high permission\r\n else {\r\n // Compute the value\r\n bitValue = bitValue << (bit - 32);\r\n // Set the high value\r\n high |= bitValue;\r\n }\r\n }\r\n }\r\n // Return the base permission\r\n return {\r\n Low: low.toString(),\r\n High: high.toString()\r\n };\r\n };\r\n // Method to update the lists\r\n var updateLists = function (cfgLists) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n var request = function (idx, resolve) {\r\n // Get the list configuration\r\n var cfgList = cfgLists[idx];\r\n // See if the target name exists\r\n if (_targetName) {\r\n // Ensure it's for this list\r\n if (cfgList.ListInformation.Title.toLowerCase() != _targetName) {\r\n // Update the next list\r\n request(idx + 1, resolve);\r\n return;\r\n }\r\n }\r\n // Ensure the configuration exists\r\n if (cfgList) {\r\n // Get the web\r\n lib_1.Web(webUrl, { requestDigest: _requestDigest })\r\n // Get the list\r\n .Lists(cfgList.ListInformation.Title)\r\n // Expand the content types, fields and views\r\n .query({\r\n Expand: [\"ContentTypes\", \"Fields\", \"UserCustomActions\", \"Views\"]\r\n })\r\n // Execute the request\r\n .execute(function (list) {\r\n // Update the title field\r\n updateListTitleField(list, cfgList).then(function () {\r\n // Create the fields\r\n createFields(list.Fields, cfgList.CustomFields, list).then(function () {\r\n // Create the content types\r\n createContentTypes(list.ContentTypes, cfgList.ContentTypes, list).then(function () {\r\n // Update the views\r\n createViews(list, list.Views, cfgList.ViewInformation).then(function () {\r\n // Update the views\r\n createUserCustomActions(list.UserCustomActions, cfgList.UserCustomActions).then(function () {\r\n // Trigger the event\r\n cfgList.onUpdated ? cfgList.onUpdated(list) : null;\r\n // Update the next list\r\n request(idx + 1, resolve);\r\n }, reject);\r\n }, reject);\r\n }, reject);\r\n }, reject);\r\n }, reject);\r\n }, reject);\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve();\r\n }\r\n };\r\n // Execute the request\r\n request(0, resolve);\r\n });\r\n };\r\n // Method to update the list title field\r\n var updateListTitleField = function (list, cfgList) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if the title field is being updated\r\n if (cfgList.TitleFieldDisplayName) {\r\n // Update the field name\r\n list.Fields.getByInternalNameOrTitle(\"Title\").update({ Title: cfgList.TitleFieldDisplayName }).execute(function () {\r\n // Log\r\n console.log(\"[gd-sprest][List] The 'Title' field's display name was updated to '\" + cfgList.TitleFieldDisplayName + \"'.\");\r\n // Resolve the promise\r\n resolve();\r\n }, reject);\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve();\r\n }\r\n });\r\n };\r\n // Method to update the views\r\n var updateViews = function (list, views, cfgViews) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Parse the configuration\r\n _1.Executor(cfgViews, function (cfg) {\r\n // Return a promise\r\n return new Promise(function (resolve) {\r\n // Get the view\r\n var view = views.getByTitle(cfg.ViewName);\r\n // See if the view fields are defined\r\n if (cfg.ViewFields && cfg.ViewFields.length > 0) {\r\n // Log\r\n console.log(\"[gd-sprest][View] Updating the view fields for the '\" + cfg.ViewName + \"' view.\");\r\n // Clear the view fields\r\n view.ViewFields().removeAllViewFields().execute(true);\r\n // Parse the view fields\r\n for (var i = 0; i < cfg.ViewFields.length; i++) {\r\n // Add the view field\r\n view.ViewFields().addViewField(cfg.ViewFields[i]).execute(true);\r\n }\r\n }\r\n // See if we are updating the view properties\r\n if (cfg.JSLink || cfg.ViewQuery) {\r\n var props = {};\r\n // Log\r\n console.log(\"[gd-sprest][View] Updating the view properties for the '\" + cfg.ViewName + \"' view.\");\r\n // Set the properties\r\n cfg.JSLink ? props[\"JSLink\"] = cfg.JSLink : null;\r\n cfg.ViewQuery ? props[\"ViewQuery\"] = cfg.ViewQuery : null;\r\n // Update the view\r\n view.update(props).execute(true);\r\n }\r\n // Wait for the requests to complete\r\n view.done(function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // Log\r\n console.log(\"[gd-sprest][View] The updates for the '\" + cfg.ViewName + \"' view has completed.\");\r\n // Trigger the event\r\n cfg.onUpdated ? cfg.onUpdated(view, list) : null;\r\n // Resolve the promise\r\n resolve();\r\n });\r\n });\r\n }).then(resolve);\r\n });\r\n };\r\n // Method to uninstall the site components\r\n var uninstallSite = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure we need to complete this request\r\n if ((cfg.CustomActionCfg != null && cfg.CustomActionCfg.Site != null) || cfg.WebPartCfg != null) {\r\n // Log\r\n console.log(\"[gd-sprest][uninstall] Loading the site information...\");\r\n // Get the site\r\n lib_1.Site(webUrl, { requestDigest: _requestDigest })\r\n // Expand the user custom actions\r\n .query({\r\n Expand: [\"UserCustomActions\"]\r\n })\r\n // Execute the request\r\n .execute(function (site) {\r\n // Remove the user custom actions\r\n removeUserCustomActions(site.UserCustomActions, cfg.CustomActionCfg ? cfg.CustomActionCfg.Site : []).then(function () {\r\n // Remove the webpart\r\n removeWebParts(site).then(function () {\r\n // Resolve the promise\r\n resolve(site);\r\n }, reject);\r\n });\r\n }, reject);\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve();\r\n }\r\n });\r\n };\r\n // Method to uninstall the web components\r\n var uninstallWeb = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n var Expand = [];\r\n // Log\r\n console.log(\"[gd-sprest][uninstall] Loading the web information...\");\r\n // Set the query\r\n if (cfg.ContentTypes) {\r\n Expand.push(\"ContentTypes\");\r\n }\r\n if (cfg.CustomActionCfg) {\r\n Expand.push(\"UserCustomActions\");\r\n }\r\n if (cfg.Fields) {\r\n Expand.push(\"Fields\");\r\n }\r\n if (cfg.ListCfg) {\r\n Expand.push(\"Lists\");\r\n }\r\n // Query the web\r\n lib_1.Web(webUrl, { requestDigest: _requestDigest }).query({ Expand: Expand })\r\n // Execute the request\r\n .execute(function (web) {\r\n // Remove the web custom actions\r\n removeUserCustomActions(web.UserCustomActions, cfg.CustomActionCfg ? cfg.CustomActionCfg.Web : null).then(function () {\r\n // Remove the lists\r\n removeLists(web.Lists, cfg.ListCfg).then(function () {\r\n // Remove the content types\r\n removeContentTypes(web.ContentTypes, cfg.ContentTypes).then(function () {\r\n // Remove the fields\r\n removeFields(web.Fields, cfg.Fields).then(function () {\r\n // Resolve the promise\r\n resolve();\r\n }, reject);\r\n }, reject);\r\n }, reject);\r\n }, reject);\r\n }, reject);\r\n });\r\n };\r\n /**\r\n * Public Interface\r\n */\r\n return {\r\n // The configuration\r\n _configuration: cfg,\r\n // Method to install the configuration\r\n install: function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Set the request digest\r\n setRequestDigest().then(function () {\r\n // Log\r\n console.log(\"[gd-sprest] Installing the web assets...\");\r\n // Get the web\r\n var web = lib_1.Web(webUrl, { requestDigest: _requestDigest });\r\n // Create the site fields\r\n var createSiteFields = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if we are creating fields\r\n if (cfg.Fields && cfg.Fields.length > 0) {\r\n // Log\r\n console.log(\"[gd-sprest][Fields] Starting the requests.\");\r\n // Get the fields\r\n web.Fields().execute(function (fields) {\r\n // Create the fields\r\n createFields(fields, cfg.Fields).then(function () {\r\n // Log\r\n console.log(\"[gd-sprest][Fields] Completed the requests.\");\r\n // Resolve the promise\r\n resolve();\r\n }, reject);\r\n }, reject);\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve();\r\n }\r\n });\r\n };\r\n // Create the site content types\r\n var createSiteContentTypes = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if we are creating the content types\r\n if (cfg.ContentTypes && cfg.ContentTypes.length > 0) {\r\n // Log\r\n console.log(\"[gd-sprest][Content Types] Starting the requests.\");\r\n // Get the content types\r\n web.ContentTypes().execute(function (contentTypes) {\r\n // Create the content types\r\n createContentTypes(contentTypes, cfg.ContentTypes).then(function () {\r\n // Log\r\n console.log(\"[gd-sprest][Content Types] Completed the requests.\");\r\n // Resolve the promise\r\n resolve();\r\n }, reject);\r\n }, reject);\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve();\r\n }\r\n });\r\n };\r\n // Create the site lists\r\n var createSiteLists = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if we are creating the lists\r\n if (cfg.ListCfg && cfg.ListCfg.length) {\r\n // Log\r\n console.log(\"[gd-sprest][Lists] Starting the requests.\");\r\n // Get the lists\r\n web.Lists().execute(function (lists) {\r\n // Create the lists\r\n createLists(lists, cfg.ListCfg).then(function () {\r\n // Log\r\n console.log(\"[gd-sprest][Lists] Completed the requests.\");\r\n // Resolve the promise\r\n resolve();\r\n }, reject);\r\n }, reject);\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve();\r\n }\r\n });\r\n };\r\n // Create the site webparts\r\n var createSiteWebParts = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if we are creating the webparts\r\n if (cfg.WebPartCfg && cfg.WebPartCfg.length > 0) {\r\n // Log\r\n console.log(\"[gd-sprest][WebParts] Starting the requests.\");\r\n // Create the webparts\r\n createWebParts().then(function () {\r\n // Log\r\n console.log(\"[gd-sprest][WebParts] Completed the requests.\");\r\n // Resolve the promise\r\n resolve();\r\n }, reject);\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve();\r\n }\r\n });\r\n };\r\n // Create the custom actions\r\n var createSiteCollectionCustomActions = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if we are targeting the site collection\r\n if (cfg.CustomActionCfg && cfg.CustomActionCfg.Site) {\r\n // Log\r\n console.log(\"[gd-sprest][Site Custom Actions] Starting the requests.\");\r\n // Get the site\r\n lib_1.Site(webUrl, { requestDigest: _requestDigest })\r\n // Get the user custom actions\r\n .UserCustomActions().execute(function (customActions) {\r\n // Create the user custom actions\r\n createUserCustomActions(customActions, cfg.CustomActionCfg.Site).then(function () {\r\n // Log\r\n console.log(\"[gd-sprest][Site Custom Actions] Completed the requests.\");\r\n // Resolve the promise\r\n resolve();\r\n }, reject);\r\n }, reject);\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve();\r\n }\r\n });\r\n };\r\n // Create the custom actions\r\n var createSiteCustomActions = function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // See if we are targeting the web\r\n if (cfg.CustomActionCfg && cfg.CustomActionCfg.Web) {\r\n // Log\r\n console.log(\"[gd-sprest][Web Custom Actions] Starting the requests.\");\r\n // Get the user custom actions\r\n web.UserCustomActions().execute(function (customActions) {\r\n // Create the user custom actions\r\n createUserCustomActions(customActions, cfg.CustomActionCfg.Web).then(function () {\r\n // Log\r\n console.log(\"[gd-sprest][Web Custom Actions] Completed the requests.\");\r\n // Resolve the promise\r\n resolve();\r\n });\r\n }, reject);\r\n }\r\n else {\r\n // Resolve the promise\r\n resolve();\r\n }\r\n });\r\n };\r\n // Create the site fields\r\n createSiteFields().then(function () {\r\n // Create the site content types\r\n createSiteContentTypes().then(function () {\r\n // Create the site lists\r\n createSiteLists().then(function () {\r\n // Create the webparts\r\n createSiteWebParts().then(function () {\r\n // Create the site collection custom actions\r\n createSiteCollectionCustomActions().then(function () {\r\n // Create the site custom actions\r\n createSiteCustomActions().then(function () {\r\n // Log\r\n console.log(\"[gd-sprest] The configuration script completed, but some requests may still be running.\");\r\n // Resolve the request\r\n resolve();\r\n }, reject);\r\n }, reject);\r\n }, reject);\r\n }, reject);\r\n }, reject);\r\n }, reject);\r\n }, reject);\r\n });\r\n },\r\n // Method to uninstall the configuration\r\n uninstall: function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Set the request digest\r\n setRequestDigest().then(function () {\r\n // Uninstall the web components\r\n uninstallWeb().then(function () {\r\n // Uninstall the site components\r\n uninstallSite().then(function () {\r\n // Log\r\n console.log(\"[gd-sprest] The configuration script completed, but some requests may still be running.\");\r\n // Resolve the promise\r\n resolve();\r\n }, reject);\r\n }, reject);\r\n });\r\n });\r\n }\r\n };\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/spCfg.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/spCfgTypes.js":
/*!*****************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/spCfgTypes.js ***!
\*****************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * SharePoint Configuration Field Types\r\n */\r\nexports.SPCfgFieldType = {\r\n Boolean: 0,\r\n Calculated: 1,\r\n Choice: 2,\r\n Currency: 3,\r\n Date: 4,\r\n Geolocation: 5,\r\n Lookup: 6,\r\n MMS: 7,\r\n Note: 8,\r\n Number: 9,\r\n Text: 10,\r\n Url: 11,\r\n User: 12\r\n};\r\n/**\r\n * SharePoint Configuration Types\r\n * The value determines the order to install the object type.\r\n */\r\nexports.SPCfgType = {\r\n Fields: 0,\r\n ContentTypes: 1,\r\n Lists: 2,\r\n SiteUserCustomActions: 3,\r\n WebParts: 5,\r\n WebUserCustomActions: 4\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/spCfgTypes.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/taxonomy.js":
/*!***************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/taxonomy.js ***!
\***************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Taxonomy Helper Class\r\n */\r\nexports.Taxonomy = {\r\n /**\r\n * Method to find a term by id\r\n */\r\n findById: function (term, termId) {\r\n // See if this is the root node\r\n if (term.info && term.info.id == termId) {\r\n // Return the root node\r\n return term;\r\n }\r\n // Parse the child nodes\r\n for (var prop in term) {\r\n // Skip the info and parent\r\n if (prop == \"info\" || prop == \"parent\") {\r\n continue;\r\n }\r\n // Find the term by id\r\n var childTerm = exports.Taxonomy.findById(term[prop], termId);\r\n if (childTerm) {\r\n return childTerm;\r\n }\r\n }\r\n },\r\n /**\r\n * Method to find a term by name\r\n */\r\n findByName: function (term, termName) {\r\n // See if this is the root node\r\n if (term.info && term.info.name == termName) {\r\n // Return the root node\r\n return term;\r\n }\r\n // Parse the child nodes\r\n for (var prop in term) {\r\n // Skip the info and parent\r\n if (prop == \"info\" || prop == \"parent\") {\r\n continue;\r\n }\r\n // Find the term by id\r\n var childTerm = exports.Taxonomy.findByName(term[prop], termName);\r\n if (childTerm) {\r\n return childTerm;\r\n }\r\n }\r\n },\r\n /**\r\n * Method to get the terms\r\n */\r\n getTerms: function (termSet, termSetTerms) {\r\n var terms = [];\r\n // Add the root term\r\n terms.push({\r\n description: termSet.get_description(),\r\n id: termSet.get_id().toString(),\r\n name: termSet.get_name(),\r\n path: [],\r\n pathAsString: \"\",\r\n props: termSet.get_customProperties()\r\n });\r\n // Parse the term sets terms\r\n var enumerator = termSetTerms.getEnumerator();\r\n while (enumerator.moveNext()) {\r\n var term = enumerator.get_current();\r\n // Create the terms\r\n terms.push({\r\n description: term.get_description(),\r\n id: term.get_id().toString(),\r\n name: term.get_name(),\r\n path: term.get_pathOfTerm().split(\";\"),\r\n pathAsString: term.get_pathOfTerm(),\r\n props: term.get_customProperties()\r\n });\r\n }\r\n // Sort the terms\r\n terms = terms.sort(function (a, b) {\r\n if (a.pathAsString < b.pathAsString) {\r\n return -1;\r\n }\r\n if (a.pathAsString > b.pathAsString) {\r\n return 1;\r\n }\r\n return 0;\r\n });\r\n // Return the terms\r\n return terms;\r\n },\r\n /**\r\n * Method to get the term group\r\n */\r\n getTermGroup: function (groupName) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the scripts\r\n exports.Taxonomy.loadScripts().then(function () {\r\n // Get the taxonomy session\r\n var context = SP.ClientContext.get_current();\r\n var session = SP.Taxonomy.TaxonomySession.getTaxonomySession(context);\r\n // See if we are getting a specific group name\r\n if (groupName) {\r\n // Resolve the promise\r\n var termStores_1 = session.get_termStores();\r\n context.load(termStores_1, \"Include(Groups)\");\r\n context.executeQueryAsync(function () {\r\n // Get the default store\r\n var enumerator = termStores_1.getEnumerator();\r\n var termStore = enumerator.moveNext() ? enumerator.get_current() : null;\r\n if (termStore) {\r\n // Get the term group\r\n var termGroup = termStore.get_groups().getByName(groupName);\r\n context.load(termGroup);\r\n // Resolve the promise\r\n resolve({ context: context, termGroup: termGroup });\r\n }\r\n else {\r\n // Reject the promise\r\n reject(\"Unable to find the taxonomy store.\");\r\n }\r\n }, function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // Reject the promise\r\n reject(args[1].get_message());\r\n });\r\n }\r\n else {\r\n // Get the default site collection group\r\n var termStore = session.getDefaultSiteCollectionTermStore();\r\n var termGroup = termStore.getSiteCollectionGroup(context.get_site());\r\n context.load(termGroup);\r\n // Resolve the promise\r\n resolve({ context: context, termGroup: termGroup });\r\n }\r\n });\r\n });\r\n },\r\n /**\r\n * Method to get the term groups\r\n */\r\n getTermGroups: function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the scripts\r\n exports.Taxonomy.loadScripts().then(function () {\r\n // Get the taxonomy session\r\n var context = SP.ClientContext.get_current();\r\n var session = SP.Taxonomy.TaxonomySession.getTaxonomySession(context);\r\n // Resolve the promise\r\n var termStores = session.get_termStores();\r\n context.load(termStores, \"Include(Groups)\");\r\n context.executeQueryAsync(function () {\r\n // Get the default store\r\n var enumerator = termStores.getEnumerator();\r\n var termStore = enumerator.moveNext() ? enumerator.get_current() : null;\r\n if (termStore) {\r\n // Get the term groups\r\n var termGroups_1 = termStore.get_groups();\r\n context.load(termGroups_1, \"Include(Description, Id, Name)\");\r\n // Execute the request\r\n context.executeQueryAsync(\r\n // Success\r\n function () {\r\n var groups = [];\r\n // Parse the groups\r\n var enumerator = termGroups_1.getEnumerator();\r\n while (enumerator.moveNext()) {\r\n var group = enumerator.get_current();\r\n // Add the group information\r\n groups.push({\r\n description: group.get_description(),\r\n id: group.get_id().toString(),\r\n name: group.get_name()\r\n });\r\n }\r\n // Resolve the promise\r\n resolve(groups);\r\n }, function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // Reject the promise\r\n reject(args[1].get_message());\r\n });\r\n }\r\n else {\r\n // Reject the promise\r\n reject(\"Unable to find the taxonomy store.\");\r\n }\r\n }, function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // Reject the promise\r\n reject(args[1].get_message());\r\n });\r\n });\r\n });\r\n },\r\n /**\r\n * Method to get the term sets for a group\r\n */\r\n getTermSets: function (groupName) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Get the term gruop\r\n exports.Taxonomy.getTermGroup(groupName).then(\r\n // Success\r\n function (_a) {\r\n var context = _a.context, termGroup = _a.termGroup;\r\n // Get the term group information\r\n var termGroupInfo = termGroup.get_termSets();\r\n context.load(termGroupInfo, \"Include(CustomProperties, Description, Id, Name)\");\r\n // Execute the request\r\n context.executeQueryAsync(function () {\r\n var termSets = [];\r\n // Parse the term group information\r\n var enumerator = termGroupInfo.getEnumerator();\r\n while (enumerator.moveNext()) {\r\n var termSet = enumerator.get_current();\r\n // Add the group information\r\n termSets.push({\r\n description: termSet.get_description(),\r\n id: termSet.get_id().toString(),\r\n name: termSet.get_name(),\r\n props: termSet.get_customProperties()\r\n });\r\n }\r\n // Resolve the promise\r\n resolve(termSets);\r\n }, function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // Reject the promise\r\n reject(args[1].get_message());\r\n });\r\n }, \r\n // Error\r\n function (reason) {\r\n // Reject the promise\r\n reject(reason);\r\n });\r\n });\r\n },\r\n /**\r\n * Method to get the term sets from the default site collection.\r\n */\r\n getTermSetsFromDefaultSC: function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the scripts\r\n exports.Taxonomy.loadScripts().then(function () {\r\n // Get the taxonomy session\r\n var context = SP.ClientContext.get_current();\r\n var session = SP.Taxonomy.TaxonomySession.getTaxonomySession(context);\r\n // Get the terms sets from the default site collection\r\n var termStore = session.getDefaultSiteCollectionTermStore();\r\n var termGroup = termStore.getSiteCollectionGroup(context.get_site());\r\n var termGroupInfo = termGroup.get_termSets();\r\n context.load(termGroupInfo, \"Include(CustomProperties, Description, Id, Name)\");\r\n // Execute the request\r\n context.executeQueryAsync(\r\n // Success\r\n function () {\r\n var termSets = [];\r\n // Parse the term group information\r\n var enumerator = termGroupInfo.getEnumerator();\r\n while (enumerator.moveNext()) {\r\n var termSet = enumerator.get_current();\r\n // Add the group information\r\n termSets.push({\r\n description: termSet.get_description(),\r\n id: termSet.get_id().toString(),\r\n name: termSet.get_name(),\r\n props: termSet.get_customProperties()\r\n });\r\n }\r\n // Resolve the promise\r\n resolve(termSets);\r\n }, function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // Reject the promise\r\n reject(args[1].get_message());\r\n });\r\n });\r\n });\r\n },\r\n /**\r\n * Method to get the terms by id\r\n */\r\n getTermsById: function (termStoreId, termSetId) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Load the scripts\r\n exports.Taxonomy.loadScripts().then(function () {\r\n // Get the taxonomy session\r\n var context = SP.ClientContext.get_current();\r\n var session = SP.Taxonomy.TaxonomySession.getTaxonomySession(context);\r\n // Get the term set terms\r\n var termStore = session.get_termStores().getById(termStoreId);\r\n var termSet = termStore.getTermSet(termSetId);\r\n var terms = termSet.getAllTerms();\r\n context.load(termSet);\r\n context.load(terms, \"Include(CustomProperties, Description, Id, Name, PathOfTerm)\");\r\n // Execute the request\r\n context.executeQueryAsync(function () {\r\n // Resolve the promise\r\n resolve(exports.Taxonomy.getTerms(termSet, terms));\r\n }, function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // Reject the promise\r\n reject(args[1].get_message());\r\n });\r\n });\r\n });\r\n },\r\n /**\r\n * Method to get the term set by id\r\n */\r\n getTermSetById: function (termStoreId, termSetId) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Get the terms\r\n exports.Taxonomy.getTermsById(termStoreId, termSetId).then(\r\n // Success\r\n function (terms) {\r\n // Resolve the promise\r\n resolve(exports.Taxonomy.toObject(terms));\r\n }, \r\n // Error\r\n function (reason) {\r\n // Reject the promise\r\n reject(reason);\r\n });\r\n });\r\n },\r\n /**\r\n * Method to get the terms from the default site collection\r\n */\r\n getTermsFromDefaultSC: function (termSetName) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Get the term group\r\n exports.Taxonomy.getTermGroup().then(\r\n // Success\r\n function (_a) {\r\n var context = _a.context, termGroup = _a.termGroup;\r\n // Get the term set terms\r\n var termSet = termGroup.get_termSets().getByName(termSetName);\r\n var terms = termSet.getAllTerms();\r\n context.load(termSet);\r\n context.load(terms, \"Include(CustomProperties, Description, Id, Name, PathOfTerm)\");\r\n // Execute the request\r\n context.executeQueryAsync(function () {\r\n // Resolve the promise\r\n resolve(exports.Taxonomy.getTerms(termSet, terms));\r\n }, function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // Reject the promise\r\n reject(args[1].get_message());\r\n });\r\n }, \r\n // Error\r\n function (reason) {\r\n // Reject the promise\r\n reject(reason);\r\n });\r\n });\r\n },\r\n /**\r\n * Method to get the term set from the default site collection\r\n */\r\n getTermSetFromDefaultSC: function (termSetName) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Get the terms\r\n exports.Taxonomy.getTermsFromDefaultSC(termSetName).then(\r\n // Success\r\n function (terms) {\r\n // Resolve the object\r\n resolve(exports.Taxonomy.toObject(terms));\r\n }, \r\n // Error\r\n function (reason) {\r\n // Reject the promise\r\n reject(reason);\r\n });\r\n });\r\n },\r\n /**\r\n * Method to get a terms from a specified group\r\n */\r\n getTermsByGroupName: function (termSetName, groupName) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Get the term group\r\n exports.Taxonomy.getTermGroup(groupName).then(function (_a) {\r\n var context = _a.context, termGroup = _a.termGroup;\r\n // Get the term set terms\r\n var termSet = termGroup.get_termSets().getByName(termSetName);\r\n var terms = termSet.getAllTerms();\r\n context.load(termSet);\r\n context.load(terms, \"Include(CustomProperties, Description, Id, Name, PathOfTerm)\");\r\n // Execute the request\r\n context.executeQueryAsync(function () {\r\n // Resolve the promise\r\n resolve(exports.Taxonomy.getTerms(termSet, terms));\r\n }, function () {\r\n var args = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n args[_i] = arguments[_i];\r\n }\r\n // Reject the promise\r\n reject(args[1].get_message());\r\n });\r\n });\r\n });\r\n },\r\n /**\r\n * Method to get the term set from the default site collection\r\n */\r\n getTermSetByGroupName: function (termSetName, groupName) {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Get the terms\r\n exports.Taxonomy.getTermsByGroupName(termSetName, groupName).then(\r\n // Success\r\n function (terms) {\r\n // Resolve the object\r\n resolve(exports.Taxonomy.toObject(terms));\r\n }, \r\n // Error\r\n function (reason) {\r\n // Reject the promise\r\n reject(reason);\r\n });\r\n });\r\n },\r\n /**\r\n * Method to ensure the taxonomy script references are loaded.\r\n */\r\n loadScripts: function () {\r\n // Return a promise\r\n return new Promise(function (resolve, reject) {\r\n // Ensure the core script is loaded\r\n SP.SOD.executeFunc(\"sp.js\", \"SP.Utilities.Utility\", function () {\r\n // Ensure the taxonomy script is loaded\r\n SP.SOD.registerSod(\"sp.taxonomy.js\", SP.Utilities.Utility.getLayoutsPageUrl(\"sp.taxonomy.js\"));\r\n SP.SOD.executeFunc(\"sp.taxonomy.js\", \"SP.Taxonomy.TaxonomySession\", function () {\r\n // Resolve the promise\r\n resolve();\r\n });\r\n }, \"sp.js\");\r\n });\r\n },\r\n /**\r\n * Method to convert a term to an array of term information\r\n */\r\n toArray: function (term) {\r\n var terms = [];\r\n // Recursive method to extract the child terms\r\n var getChildTerms = function (term, terms) {\r\n // Parse the properties\r\n for (var prop in term) {\r\n // Skip the info and parent properties\r\n if (prop == \"info\" || prop == \"parent\") {\r\n continue;\r\n }\r\n // Add the child term\r\n var childTerm = term[prop];\r\n terms.push(childTerm.info);\r\n // Add the child terms\r\n getChildTerms(childTerm, terms);\r\n }\r\n };\r\n // Ensure the term exists\r\n if (term) {\r\n // See if the root node contains term information\r\n if (term.info) {\r\n // Add the root term\r\n terms.push(term.info);\r\n }\r\n // Get the child terms\r\n getChildTerms(term, terms);\r\n }\r\n // Return the child terms\r\n return terms;\r\n },\r\n /**\r\n * Method to convert a term to a field value\r\n */\r\n toFieldValue: function (term) {\r\n var termInfo = term ? term[\"info\"] || term : null;\r\n // Ensure the term exists\r\n if (termInfo) {\r\n return {\r\n __metadata: { \"type\": \"SP.Taxonomy.TaxonomyFieldValue\" },\r\n Label: termInfo.name,\r\n TermGuid: termInfo.id,\r\n WssId: -1\r\n };\r\n }\r\n // Return nothing\r\n return null;\r\n },\r\n /**\r\n * Method to convert a collection of terms to a field value\r\n */\r\n toFieldMultiValue: function (terms) {\r\n var results = [];\r\n // Ensure terms exist\r\n if (terms && terms.length > 0) {\r\n // Parse the terms\r\n for (var i = 0; i < terms.length; i++) {\r\n var termInfo = terms[i][\"info\"] || terms[i];\r\n // Add the term\r\n results.push(\";#\" + termInfo.name + \"|\" + termInfo.id);\r\n }\r\n }\r\n // Return a blank array\r\n return {\r\n __metadata: { type: \"Collection(SP.Taxonomy.TaxonomyFieldValue)\" },\r\n results: results\r\n };\r\n },\r\n /**\r\n * Method to convert the terms to an object\r\n */\r\n toObject: function (terms) {\r\n var root = {};\r\n // Recursive method to add terms\r\n var addTerm = function (node, info, path) {\r\n var term = node;\r\n var termName = \"\";\r\n // Loop for each term\r\n while (path.length > 0) {\r\n // Ensure the term exists\r\n termName = path[0];\r\n if (term[termName] == null) {\r\n // Create the term\r\n term[termName] = {};\r\n }\r\n // Set the term\r\n var parent_1 = term;\r\n term = term[termName];\r\n // Set the parent\r\n term.parent = parent_1;\r\n // Remove the term from the path\r\n path.splice(0, 1);\r\n }\r\n // Set the info\r\n term.info = info;\r\n };\r\n // Ensure the terms exist\r\n if (terms && terms.length > 0) {\r\n // Parse the terms\r\n for (var i = 0; i < terms.length; i++) {\r\n var term = terms[i];\r\n // See if this is the root term\r\n if (term.pathAsString == \"\") {\r\n // Set the root information\r\n root.info = term;\r\n }\r\n else {\r\n // Add the term\r\n addTerm(root, term, term.pathAsString.split(\";\"));\r\n }\r\n }\r\n // Return the root term\r\n return exports.Taxonomy.findById(root, terms[0].id);\r\n }\r\n // Return nothing\r\n return null;\r\n }\r\n};\r\n\n\n//# sourceURL=webpack:///./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/taxonomy.js?");
/***/ }),
/***/ "./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/webpart.js":
/*!**************************************************************************************************************!*\
!*** ./node_modules/.pnpm/registry.npmjs.org/gd-sprest/5.7.5/node_modules/gd-sprest/build/helper/webpart.js ***!
\**************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
eval("\r\nObject.defineProperty(exports, \"__esModule\", { value: true });\r\n/**\r\n * Web Part\r\n */\r\nvar _WebPart = /** @class */ (function () {\r\n /**\r\n * Constructor\r\n * @param props - The webpart properties.\r\n */\r\n function _WebPart(props) {\r\n var _this = this;\r\n this._props = null;\r\n this._wp = null;\r\n /**\r\n * Method to add the help link to a script part editor.\r\n * @wpId - The webpart id.\r\n */\r\n this.addHelpLink = function () {\r\n // Ensure the help properties exist\r\n if (_this._props.helpProps) {\r\n // Get the webpart's \"Snippet\"\r\n var link = document.querySelector(\"div[webpartid='\" + _this._wp.wpId + \"'] a[title='Edit Snippet']\");\r\n if (link) {\r\n // Create the help link\r\n var helpLink = document.createElement(\"a\");\r\n helpLink.href = _this._props.helpProps.url || \"#\";\r\n helpLink.style.paddingLeft = \"10px\";\r\n helpLink.setAttribute(\"role\", \"button\");\r\n helpLink.title = _this._props.helpProps.title || \"Help\";\r\n helpLink.innerHTML = \"\" + helpLink.title + \"\";\r\n helpLink.target = \"_blank\";\r\n // Append the link\r\n link.parentElement.appendChild(helpLink);\r\n }\r\n }\r\n };\r\n /**\r\n * Method to get the webpart id for a specified element\r\n * @param el - The target element.\r\n */\r\n this.getWebPartId = function (el) {\r\n // Loop until we find the webpart id\r\n while (el) {\r\n // See if this element contains the webpart id\r\n var wpId = el.getAttribute(\"webpartid\");\r\n if (wpId) {\r\n // Return the webpart id\r\n return wpId;\r\n }\r\n // Check the parent\r\n el = el.parentElement;\r\n }\r\n // Unable to detect\r\n return \"\";\r\n };\r\n /**\r\n * Method to get the webpart information\r\n */\r\n this.getWebPartInfo = function () {\r\n var targetInfo = {\r\n cfg: null,\r\n el: null,\r\n wpId: null\r\n };\r\n // Ensure the element id exists\r\n if (_this._props.elementId) {\r\n // Get the webpart elements\r\n var elements = document.querySelectorAll(\"#\" + _this._props.elementId);\r\n for (var i = 0; i < elements.length; i++) {\r\n var elWebPart = elements[i];\r\n // See if we have already configured this element\r\n if (elWebPart.getAttribute(\"data-isConfigured\")) {\r\n continue;\r\n }\r\n // Get the webpart id\r\n var wpId = _this.getWebPartId(elWebPart);\r\n if (wpId) {\r\n // See if the configuration element exists\r\n var elCfg = _this._props.cfgElementId ? elWebPart.parentElement.querySelector(\"#\" + _this._props.cfgElementId) : null;\r\n if (elCfg) {\r\n try {\r\n // Parse the configuration\r\n var cfg = JSON.parse(elCfg.innerText.trim());\r\n // See if the webaprt id exists\r\n if (cfg.WebPartId) {\r\n // See if it's for this webpart\r\n if (cfg.WebPartId == wpId) {\r\n // Set the target information\r\n targetInfo = {\r\n cfg: cfg,\r\n el: elWebPart,\r\n wpId: wpId\r\n };\r\n break;\r\n }\r\n }\r\n else {\r\n // Set the target information\r\n targetInfo = {\r\n cfg: {\r\n WebPartId: wpId\r\n },\r\n el: elWebPart,\r\n wpId: wpId\r\n };\r\n break;\r\n }\r\n }\r\n catch (ex) {\r\n // Set the target information\r\n targetInfo = {\r\n cfg: {\r\n WebPartId: wpId\r\n },\r\n el: elWebPart,\r\n wpId: wpId\r\n };\r\n // Log\r\n console.log(\"[sp-webpart] Error parsing the configuration for element '\" + _this._props.cfgElementId + \"'.\");\r\n }\r\n // Break from the loop\r\n break;\r\n }\r\n else {\r\n // Set the target information\r\n targetInfo = {\r\n cfg: {\r\n WebPartId: wpId\r\n },\r\n el: elWebPart,\r\n wpId: wpId\r\n };\r\n break;\r\n }\r\n }\r\n }\r\n // Ensure elements were found\r\n if (elements.length == 0) {\r\n // Log\r\n console.log(\"[sp-webpart] Error - Unable to find elements with id '\" + _this._props.elementId + \"'.\");\r\n }\r\n }\r\n else {\r\n // Log\r\n console.log(\"[sp-webpart] The target element id is not defined.\");\r\n }\r\n // Ensure the target element exists\r\n if (targetInfo.el) {\r\n // Set the configuration flag\r\n targetInfo.el.setAttribute(\"data-isConfigured\", \"true\");\r\n }\r\n // Return the target information\r\n return targetInfo;\r\n };\r\n /**\r\n * Method to render the webpart\r\n */\r\n this.render = function () {\r\n var element = null;\r\n // Get the webpart information\r\n _this._wp = _this.getWebPartInfo();\r\n if (_this._wp == null || _this._wp.el == null) {\r\n // Log\r\n console.log(\"[sp-webpart] The target webpart element '\" + _this._props.elementId + \"' was not found.\");\r\n return;\r\n }\r\n // See if the page is being edited\r\n var returnVal = null;\r\n if (exports.WebPart.isEditMode()) {\r\n // Add the help link\r\n _this.addHelpLink();\r\n // Call the render event\r\n if (_this._props.onRenderEdit) {\r\n // Execute the render edit event\r\n returnVal = _this._props.onRenderEdit(_this._wp);\r\n }\r\n }\r\n else {\r\n // See if the configuration is defined, but has no value\r\n if (_this._wp.cfg || (_this._props.cfgElementId || \"\").length == 0) {\r\n // Execute the render edit event\r\n returnVal = _this._props.onRenderDisplay(_this._wp);\r\n }\r\n else {\r\n // Render a message\r\n _this._wp.el.innerHTML = '