1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[56940],{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!==i},i="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function s(e,t){return!1!==t.clone&&t.isMergeableObject(e)?a(Array.isArray(e)?[]:{},e,t):e}function r(e,t,i){return e.concat(t).map(function(e){return s(e,i)})}function n(e){return Object.keys(e).concat(Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[])}function o(e,t){try{return t in e}catch(e){return!1}}function a(e,i,l){(l=l||{}).arrayMerge=l.arrayMerge||r,l.isMergeableObject=l.isMergeableObject||t,l.cloneUnlessOtherwiseSpecified=s;var c,u,d=Array.isArray(i);return d!==Array.isArray(e)?s(i,l):d?l.arrayMerge(e,i,l):(u={},(c=l).isMergeableObject(e)&&n(e).forEach(function(t){u[t]=s(e[t],c)}),n(i).forEach(function(t){(!o(e,t)||Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))&&(o(e,t)&&c.isMergeableObject(i[t])?u[t]=(function(e,t){if(!t.customMerge)return a;var i=t.customMerge(e);return"function"==typeof i?i:a})(t,c)(e[t],i[t],c):u[t]=s(i[t],c))}),u)}a.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,i){return a(e,i,t)},{})},e.exports=a},795:(e,t,i)=>{i.d(t,{A:()=>r});var s=i(707);class r{static isNode(e){return"object"==typeof e&&null!==e&&(e===document||e===window||e instanceof Node)}static hasAttribute(e,t){if(!r.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 i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!1===r.hasAttribute(e,t))throw Error(`The required property "${t}" does not exist!`);if("function"!=typeof e.getAttribute){if(i)throw Error("This node doesn't support the getAttribute function!");return}return e.getAttribute(t)}static getDataAttribute(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2],n=t.replace(/^data(|-)/,""),o=s.A.toLowerCamelCase(n,"-");if(!r.isNode(e)){if(i)throw Error("The passed node is not a valid HTML Node!");return}if(void 0===e.dataset){if(i)throw Error("This node doesn't support the dataset attribute!");return}let a=e.dataset[o];if(void 0===a){if(i)throw Error(`The required data attribute "${t}" does not exist on ${e}!`);return a}return s.A.parsePrimitive(a)}static querySelector(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!r.isNode(e))throw Error("The parent node is not a valid HTML Node!");let s=e.querySelector(t)||!1;if(i&&!1===s)throw Error(`The required element "${t}" does not exist in parent node!`);return s}static querySelectorAll(e,t){let i=!(arguments.length>2)||void 0===arguments[2]||arguments[2];if(i&&!r.isNode(e))throw Error("The parent node is not a valid HTML Node!");let s=e.querySelectorAll(t);if(0===s.length&&(s=!1),i&&!1===s)throw Error(`At least one item of "${t}" must exist in parent node!`);return s}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]}}},707:(e,t,i)=>{i.d(t,{A:()=>s});class s{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 i=s.toUpperCamelCase(e,t);return s.lcFirst(i)}static toUpperCamelCase(e,t){return t?e.split(t).map(e=>s.ucFirst(e.toLowerCase())).join(""):s.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,i)=>{i.d(t,{A:()=>a});var s=i(156),r=i.n(s),n=i(707);class o{constructor(e=document){this._el=e,e.$emitter=this,this._listeners=[]}publish(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=new CustomEvent(e,{detail:t,cancelable:i});return this.el.dispatchEvent(s),s}subscribe(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=this,r=e.split("."),n=i.scope?t.bind(i.scope):t;if(i.once&&!0===i.once){let t=n;n=function(i){s.unsubscribe(e),t(i)}}return this.el.addEventListener(r[0],n),this.listeners.push({splitEventName:r,opts:i,cb:n}),!0}unsubscribe(e){let t=e.split(".");return this.listeners=this.listeners.reduce((e,i)=>([...i.splitEventName].sort().toString()===t.sort().toString()?this.el.removeEventListener(i.splitEventName[0],i.cb):e.push(i),e),[]),!0}
8reset(){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 a{constructor(e,t={},i=!1){if(!(e instanceof Node)){console.warn(`There is no valid element given while trying to create a plugin instance for "${i}".`);return}this.el=e,this.$emitter=new o(this.el),this._pluginName=this._getPluginName(i),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()),r().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),i=this.el.getAttribute(`data-${t}-config`);return i?window.PluginConfigManager.get(this._pluginName,i):e}_getOptionsFromDataAttribute(){let e={};if("function"!=typeof this.el.getAttribute)return e;let t=n.A.toDashCase(this._pluginName),i=this.el.getAttribute(`data-${t}-options`);if(i)try{return JSON.parse(i)}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}}},68:(e,t,i)=>{i.d(t,{A:()=>s});class s{constructor(){this._request=null,this._errorHandlingInternal=!1}get(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"application/json",s=this._createPreparedRequest("GET",e,i);return this._sendRequest(s,null,t)}post(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(t,s);let r=this._createPreparedRequest("POST",e,s);return this._sendRequest(r,t,i)}delete(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(t,s);let r=this._createPreparedRequest("DELETE",e,s);return this._sendRequest(r,t,i)}patch(e,t,i){let s=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"application/json";s=this._getContentType(t,s);let r=this._createPreparedRequest("PATCH",e,s);return this._sendRequest(r,t,i)}abort(){if(this._request)return this._request.abort()}setErrorHandlingInternal(e){this._errorHandlingInternal=e}_registerOnLoaded(e,t){t&&(!0===this._errorHandlingInternal?(e.addEventListener("load",()=>{t(e.responseText,e)}),e.addEventListener("abort",()=>{console.warn(`the request to ${e.responseURL} was aborted`)}),e.addEventListener("error",()=>{console.warn(`the request to ${e.responseURL} failed with status ${e.status}`)}),e.addEventListener("timeout",()=>{console.warn(`the request to ${e.responseURL} timed out`)})):e.addEventListener("loadend",()=>{t(e.responseText,e)}))}_sendRequest(e,t,i){return this._registerOnLoaded(e,i),e.send(t),e}_getContentType(e,t){return e instanceof FormData&&(t=!1),t}_createPreparedRequest(e,t,i){return this._request=new XMLHttpRequest,this._request.open(e,t),this._request.setRequestHeader("X-Requested-With","XMLHttpRequest"),i&&this._request.setRequestHeader("Content-type",i),this._request}}},581:(e,t,i)=>{i.d(t,{A:()=>a});let s="loader",r={BEFORE:"before",INNER:"inner"};class n{constructor(e,t=r.BEFORE){this.parent=e instanceof Element?e:document.body.querySelector(e),this.position=t}create(){if(!this.exists()){if(this.position===r.INNER){this._previousHTML=this.parent.innerHTML,this.parent.innerHTML=n.getTemplate();return}this.parent.insertAdjacentHTML(this._getPosition(),n.getTemplate())}}remove(){if(this.position===r.INNER){this.parent.innerHTML=this._previousHTML;return}this.parent.querySelectorAll(`.${s}
8`).forEach(e=>e.remove())}exists(){return this.parent.querySelectorAll(`.${s}`).length>0}_getPosition(){return this.position===r.BEFORE?"afterbegin":"beforeend"}static getTemplate(){return`<div class="${s}" role="status"> 9 <span class="visually-hidden">Loading...</span> 10 </div>`}static SELECTOR_CLASS(){return s}}let o="element-loader-backdrop";class a extends n{static create(e){e.classList.add("has-element-loader"),a.exists(e)||(a.appendLoader(e),setTimeout(()=>{let t=e.querySelector(`.${o}`);t&&t.classList.add("element-loader-backdrop-open")},1))}static remove(e){e.classList.remove("has-element-loader");let t=e.querySelector(`.${o}`);t&&t.remove()}static exists(e){return e.querySelectorAll(`.${o}`).length>0}static getTemplate(){return` 11 <div class="${o}"> 12 <div class="loader" role="status"> 13 <span class="visually-hidden">Loading...</span> 14 </div> 15 </div> 16 `}static appendLoader(e){e.insertAdjacentHTML("beforeend",a.getTemplate())}}},940:(e,t,i)=>{i.r(t),i.d(t,{default:()=>l});var s=i(737),r=i(68),n=i(795);class o{static isTouchDevice(){return"ontouchstart"in document.documentElement}static isIOSDevice(){return o.isIPhoneDevice()||o.isIPadDevice()}static isNativeWindowsBrowser(){return o.isIEBrowser()||o.isEdgeBrowser()}static isIPhoneDevice(){return!!navigator.userAgent.match(/iPhone/i)}static isIPadDevice(){return!!navigator.userAgent.match(/iPad/i)}static isIEBrowser(){return -1!==navigator.userAgent.toLowerCase().indexOf("msie")||!!navigator.userAgent.match(/Trident.*rv:\d+\./)}static isEdgeBrowser(){return!!navigator.userAgent.match(/Edge\/\d+/i)}static getList(){return{"is-touch":o.isTouchDevice(),"is-ios":o.isIOSDevice(),"is-native-windows":o.isNativeWindowsBrowser(),"is-iphone":o.isIPhoneDevice(),"is-ipad":o.isIPadDevice(),"is-ie":o.isIEBrowser(),"is-edge":o.isEdgeBrowser()}}}var a=i(581);class l extends s.A{static #e=this.options={editableClass:".editable",cancelButtonClass:".inline-edit-cancel-button",saveButtonClass:".inline-edit-save-button",tableRowClass:".approval-rule-item",editAction:"initial-inline-edit-action"};init(){o.isTouchDevice()||(this._client=new r.A,this.editable=!1,this.draftData={},this.cancelButtons=this.el.querySelectorAll(this.options.cancelButtonClass),this.saveButtons=this.el.querySelectorAll(this.options.saveButtonClass),this.tableRows=this.el.querySelectorAll(this.options.tableRowClass),this._registerEvents())}_registerEvents(){this.cancelButtons.forEach(e=>{e.addEventListener("click",this.onCancelEdit.bind(this))}),this.saveButtons.forEach(e=>{e.addEventListener("click",this.onEditSave.bind(this))}),this.tableRows.forEach(e=>{e.addEventListener("dblclick",this.onRowDoubleClick.bind(this))})}onEditStart(e){e.style.height=`${e.offsetHeight}px`,e.style.width=`${e.offsetWidth}px`,e.setAttribute("contenteditable",!0),e.classList.remove("truncate-multiline");let t=e.querySelector("span");t instanceof Element&&t.classList.add("d-none");let i=e.querySelector("input");if(i){if(this.draftData[i.getAttribute("name")]=i.value,i.classList.remove("d-none"),"checkbox"===i.getAttribute("type")){i.addEventListener("change",this.onCheckbox.bind(this));return}i.style.width=`${e.offsetWidth-16}px`}}onEditSave(){let e={};document.querySelectorAll("[contenteditable]").forEach(t=>{let i=t.querySelector("input");i.classList.remove("is-invalid");let s=i.getAttribute("name");"required"===i.getAttribute("required")&&""===i.value&&i.classList.add("is-invalid"),e[s]=i.value}),a.A.create(this.el),this._client.post(this._url,JSON.stringify(e),(e,t)=>{if(400===t.status){a.A.remove(this.el);return}location.reload()})}onCancelEdit(e){let t=e.target.closest(this.options.tableRowClass);if(!t||!(t instanceof Element))return;let i=t.querySelectorAll(".approval-rule-table-body-context-menu"),s=t.querySelectorAll(this.options.editableClass);t.querySelector(this.options.saveButtonClass).classList.add("d-none"),t.querySelector(this.options.cancelButtonClass).classList.add("d-none"),i.forEach(e=>{e.classList.remove("d-none")}
16),s.forEach(e=>{e.removeAttribute("contenteditable"),e.classList.add("truncate-multiline");let t=e.querySelector("span");t instanceof Element&&t.classList.remove("d-none");let i=e.querySelector("input");if(i instanceof Element){let e=this.draftData[i.getAttribute("name")];i.classList.add("d-none"),i.value=e,"checkbox"===i.getAttribute("type")&&(i.checked="1"===e)}}),this.editable=!1}onRowDoubleClick(e){this.editable&&this.onCancelEdit(this.previousEvent),this.editable=!0;let t=e.target.closest(this.options.tableRowClass);if(!t||!(t instanceof Element))return;t.style.height=`${t.offsetHeight}px`,this._url=n.A.getDataAttribute(t,this.options.editAction);let i=t.querySelectorAll(".approval-rule-table-body-context-menu"),s=t.querySelectorAll(this.options.editableClass);i.forEach(e=>{e.classList.add("d-none")}),[this.options.saveButtonClass,this.options.cancelButtonClass].forEach(e=>{let i=t.querySelector(e);i&&i.classList.remove("d-none")}),s.forEach(e=>{this.onEditStart(e)}),this.previousEvent=e}onCheckbox(e){if(e.target.checked){e.target.value=1;return}e.target.value=0}}}}]);
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.