1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[7245],{156(e){var t=function(e){var t;return!!e&&"object"==typeof e&&"[object RegExp]"!==(t=Object.prototype.toString.call(e))&&"[object Date]"!==t&&e.$$typeof!==r},r="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function i(e,t){return!1!==t.clone&&t.isMergeableObject(e)?o(Array.isArray(e)?[]:{},e,t):e}function s(e,t,r){return e.concat(t).map(function(e){return i(e,r)})}function n(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function l(e,t){try{return t in e}catch(e){return!1}}function o(e,r,a){(a=a||{}).arrayMerge=a.arrayMerge||s,a.isMergeableObject=a.isMergeableObject||t,a.cloneUnlessOtherwiseSpecified=i;var u,c,h=Array.isArray(r);return h!==Array.isArray(e)?i(r,a):h?a.arrayMerge(e,r,a):(c={},(u=a).isMergeableObject(e)&&n(e).forEach(function(t){c[t]=i(e[t],u)}),n(r).forEach(function(t){(!l(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(l(e,t)&&u.isMergeableObject(r[t])?c[t]=(function(e,t){if(!t.customMerge)return o;var r=t.customMerge(e);return"function"==typeof r?r:o})(t,u)(e[t],r[t],u):c[t]=i(r[t],u))}),c)}o.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,r){return o(e,r,t)},{})},e.exports=o},245(e,t,r){r.r(t),r.d(t,{default:()=>n});var i=r(737),s=r(439);class n extends i.A{static #e=this.options={inputFieldPlaceholder:"Enter title...",btnNewLabel:null,btnSaveLabel:null,checkboxName:"newRequestCartItems[]"};init(){this._domHelper=new s.A(this.el),this._collectItems(),this._registerEvents()}_collectItems(){this.toggleButton=this._domHelper.querySelector("#createNewRequestCartButton"),this.selectionWrapper=this._domHelper.querySelector(".acris-request-cart-selection-wrapper"),this.selectionFields=this.selectionWrapper.querySelectorAll('input[type="checkbox"]'),this.newItemTemplate=this._domHelper.querySelector(".acris-request-cart-new-item-template")}_registerEvents(){this.toggleButton?.addEventListener("click",this._toggleInputField.bind(this))}_toggleSelectFields(){this.selectionFields?.forEach(e=>{e.disabled=!this.isSave})}_toggleBtnLabel(){this.toggleButton&&(this.toggleButton.innerText=this.isSave?this.options.btnNewLabel:this.options.btnSaveLabel)}_toggleInputField(){this.isSave?this._saveRequestCartField():this._addRequestCartField(),this._toggleSelectFields(),this._toggleBtnLabel(),this.isSave=!this.isSave}_addRequestCartField(){if(!this.selectionWrapper||!this.newItemTemplate)return;let e=this.newItemTemplate.cloneNode(!0);e.classList.remove("d-none","acris-request-cart-new-item-template"),e.classList.add("acris-request-cart-new-item");let t=e.querySelector(".js-new-request-cart-checkbox"),r=e.querySelector(".js-new-request-cart-input"),i=e.querySelector(".js-new-request-cart-close");if(!r||!t||!i)return;let s=`newRequestCartItem-${Date.now()}`;t.type="checkbox",t.checked=!0,t.id=s,t.name=this.options.checkboxName,t.classList.add("form-check-input"),r.type="text",r.placeholder=this.options.inputFieldPlaceholder,r.classList.add("form-check-label"),r.value="",i.addEventListener("click",this._cancelRequestCartField.bind(this)),this.selectionWrapper.appendChild(e),r.focus(),this.toggleButton.classList.add("disabled"),r.addEventListener("input",this._validateInput.bind(this)),this.currentCartInputField=e}_cancelRequestCartField(){this.currentCartInputField&&(this.currentCartInputField.remove(),this.currentCartInputField=null,this.toggleButton?.classList.remove("disabled"),this.selectionFields?.forEach(e=>{e.disabled=!1}),this.toggleButton&&null!==this.options.btnNewLabel&&(this.toggleButton.innerText=this.options.btnNewLabel),this.isSave=!1)}_validateInput(e){e.target.value.trim().length>0?this.toggleButton.classList.remove("disabled"):this.toggleButton.classList.add("disabled")}_saveRequestCartField(){if(!this.currentCartInputField)return;let e=this.currentCartInputField.querySelector('input[type="checkbox"]'),t=this.currentCartInputField.querySelector('input[type="text"]'),r=(t?.value??"").trim();if(!r||!e)return;let i=document.createElement("label");i.classList.add("form-check-label"),i.htmlFor=e.id;let s=document.createElement("strong");s.innerText=r,e.value=r,i.appendChild(s),this.currentCartInputField.replaceChild(i,t);let n=this.currentCartInputField.querySelector(".js-new-request-cart-close");n?.remove()}}},439(e,t,r){r.d(t,{A:()=>s});var i=r(795);class s{static #e=this._selectors=["#","."];static getSelectorName(e){return s._selectors.includes(e.at(0))?e.slice(1):e}static getDataAttribute(e,t){let r=i.A.getDataAttribute(e,t,!1);return"string"==typeof r&&0===r.length?null:r??null}_getDataOptions(e,t){if("string"!=typeof t)return null;try{return JSON.parse(t)}catch{}return null}constructor(e){if(!e instanceof HTMLElement)throw Error("Element is not an HTMLElement");this.el=e}querySelector(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=this.#t(e,t);return r?this.el.querySelector(r):null}closest(e){return this.el.closest(e)}querySelectorAll(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=this.#t(e,t);return r?this.el.querySelectorAll(r):[]}getAttribute(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return i.A.getAttribute(this.el,e,t)}buildFormDataFromElement(e){let t=new FormData;return e.querySelectorAll("input[name], select[name], textarea[name]").forEach(e
1=>{if(e.disabled)return;let r=e.name;if("file"===e.type){Array.from(e.files||[]).forEach(e=>{t.append(r,e)}),e.files?.length;return}if("checkbox"===e.type){e.checked&&t.append(r,e.value||"on");return}if("radio"===e.type){e.checked&&t.append(r,e.value);return}if("SELECT"===e.tagName&&e.multiple){Array.from(e.selectedOptions).forEach(e=>{t.append(r,e.value)});return}t.append(r,e.value)}),t}#t(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";if(""===t)return e;let r=t,i=e;return s._selectors.includes(e.at(0))&&(i=e.slice(1),r=s._selectors.includes(t.at(0))?e[0]+t.slice(1):e[0]+t),r+i}}},707(e,t,r){r.d(t,{A:()=>i});class i{static ucFirst(e){return e.charAt(0).toUpperCase()+e.slice(1)}static lcFirst(e){return e.charAt(0).toLowerCase()+e.slice(1)}static toDashCase(e){return e.replace(/([A-Z])/g,"-$1").replace(/^-/,"").toLowerCase()}static toLowerCamelCase(e,t){let r=i.toUpperCamelCase(e,t);return i.lcFirst(r)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>i.ucFirst(e.toLowerCase())).join(""):i.ucFirst(e.toLowerCase())}static parsePrimitive(e){try{return/^\d+(.|,)\d+$/.test(e)&&(e=e.replace(",",".")),JSON.parse(e)}catch(t){return e.toString()}}}},737(e,t,r){r.d(t,{A:()=>o});var i=r(156),s=r.n(i),n=r(707);class l{constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=new CustomEvent(e,{detail:t,cancelable:r});return this.el.dispatchEvent(i),i}subscribe(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this,s=e.split("."),n=r.scope?t.bind(r.scope):t;if(r.once&&!0===r.once){let t=n;n=function(r){i.unsubscribe(e),t(r)}}return this.el.addEventListener(s[0],n),this.listeners.push({splitEventName:s,opts:r,cb:n}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,r)=>([...r.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(r.splitEventName[0],r.cb):e.push(r),e),[]),!0}reset(){return this.listeners.forEach(e=>{this.el.removeEventListener(e.splitEventName[0],e.cb)}),this.listeners=[],!0}get el(){return this._el}set el(e){this._el=e}get listeners(){return this._listeners}set listeners(e){this._listeners=e}}class o{constructor(e,t={},r=!1){if(!(e instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${r}".`);return}this.el=e,this.$emitter=new l(this.el),this._pluginName=this._getPluginName(r),this.options=this._mergeOptions(t),this._initialized=!1,this._registerInstance(),this._init()}init(){console.warn(`The "init" method for the plugin "${this._pluginName}" is not defined. The plugin will not be initialized.`)}update(){}_init(){this._initialized||(this.init(),this._initialized=!0)}_update(){this._initialized&&this.update()}_mergeOptions(e){let t=[this.constructor.options,this.options,e];return t.push(this._getConfigFromDataAttribute()),t.push(this._getOptionsFromDataAttribute()),s().all(t.filter(e=>e instanceof Object&&!(e instanceof Array)).map(e=>e||{}))}_getConfigFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=n.A.toDashCase(this._pluginName),r=this.el.getAttribute(`data-${t}-config`);return r?window.PluginConfigManager.get(this._pluginName,r):e}_getOptionsFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=n.A.toDashCase(this._pluginName),r=this.el.getAttribute(`data-${t}-options`);if(r)try{return JSON.parse(r)}catch(e){console.error(`The data attribute "data-${t}-options" could not be parsed to json: ${e.message}`)}return e}_registerInstance(){window.PluginManager.getPluginInstancesFromElement(this.el).set(this._pluginName,this),window.PluginManager.getPlugin(this._pluginName,!1).get("instances").push(this)}_getPluginName(e){return e||(e=this.constructor.name),e}}},795(e,t,r){r.d(t,{A:()=>s});var i=r(707);class s{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!s.isNode(e))throw Error("The element must be a valid HTML Node!");return"function"==typeof e.hasAttribute&&e.hasAttribute(t)}static getAttribute(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!1===s.hasAttribute(e,t))throw Error(`The required property "${t}" does not exist!`);
1if("function"!=typeof e.getAttribute){if(r)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=t.replace(/^data(|-)/,""),l=i.A.toLowerCamelCase(n,"-");if(!s.isNode(e)){if(r)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(r)throw Error("This node doesn't support the dataset attribute!");return}let o=e.dataset[l];if(void 0===o){if(r)throw Error(`The required data attribute "${t}" does not exist on ${e}!`);return o}return i.A.parsePrimitive(o)}static querySelector(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!s.isNode(e))throw Error("The parent node is not a valid HTML Node!");let i=e.querySelector(t)||!1;if(r&&!1===i)throw Error(`The required element "${t}" does not exist in parent node!`);return i}static querySelectorAll(e,t){let r=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(r&&!s.isNode(e))throw Error("The parent node is not a valid HTML Node!");let i=e.querySelectorAll(t);if(0===i.length&&(i=!1),r&&!1===i)throw Error(`At least one item of "${t}" must exist in parent node!`);return i}static getFocusableElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=` 2 input:not([tabindex^="-"]):not([disabled]):not([type="hidden"]), 3 select:not([tabindex^="-"]):not([disabled]), 4 textarea:not([tabindex^="-"]):not([disabled]), 5 button:not([tabindex^="-"]):not([disabled]), 6 a[href]:not([tabindex^="-"]):not([disabled]), 7 [tabindex]:not([tabindex^="-"]):not([disabled]) 8 `;return e.querySelectorAll(t)}static getFirstFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return this.getFocusableElements(e)[0]}static getLastFocusableElement(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=this.getFocusableElements(e);return t[t.length-1]}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.