/*! For license information please see orodatagrid.js.LICENSE.txt */ (globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[910],{"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orocatalog/templates/filter/subcategory-filter.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){__p+="";var selectorId=_.uniqueId("selector-");__p+="\n";var criteriaId=_.uniqueId("criteria-");__p+='\n<div class="filter-item">\n ';var criteriaClasses="filter-select filter-criteria-selector";obj.isEmpty&&(criteriaClasses+=" filter-default-value"),obj.criteriaClass&&(criteriaClasses+=obj.criteriaClass),__p+='\n <button id="'+(null==(__t=selectorId)?"":_.escape(__t))+'"\n class="'+(null==(__t=criteriaClasses)?"":_.escape(__t))+'"\n data-zoom-disable\n type="button"\n ',"toggle-mode"===renderMode&&(__p+='\n aria-controls="'+(null==(__t=criteriaId)?"":_.escape(__t))+'"\n '),__p+="\n >\n ",showLabel&&(__p+='<span class="filter-item-label">'+(null==(__t=label)?"":_.escape(__t))+"</span>"),__p+='\n <span class="filter-item-hint"></span>\n <span class="filter-criteria-selector-icon-wrap" aria-hidden="true">\n <span class="filter-criteria-selector-icon"></span>\n </span>\n </button>\n <select multiple data-skip-input-widgets>\n ',_.each(options,(function(e){__p+='\n <option value="'+(null==(__t=e.value)?"":_.escape(__t))+'"\n title="'+(null==(__t=e.label)?"":_.escape(__t))+'"\n ';var t=!1;__p+="\n ",_.isArray(selected.value)?(__p+="\n ",-1!==_.indexOf(selected.value,e.value)&&(__p+="\n ",t=!0,__p+="\n "),__p+="\n "):e.value==selected.value&&(__p+="\n ",t=!0,__p+="\n "),__p+="\n ",!0===t?__p+='\n selected="selected"\n ':(__p+="\n ",e.disabled!==undefined&&e.disabled&&(__p+='\n disabled="disabled"\n '),__p+="\n "),__p+="\n ",e.count!==undefined&&(__p+='\n data-option-count="'+(null==(__t=e.count)?"":_.escape(__t))+'"\n '),__p+="\n >"+(null==(__t=e.label)?"":_.escape(__t))+"</option>\n "})),__p+="\n </select>\n ","toggle-mode"===renderMode&&(__p+='\n <div id="'+(null==(__t=criteriaId)?"":_.escape(__t))+'" class="filter-criteria" aria-labelledby="'+(null==(__t=criteriaId)?"":_.escape(__t))+'" aria-hidden="true"></div>\n '),__p+="\n</div>\n"}return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orocustomer/templates/datagrid/action/frontend-map-action.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="map-popover popover">\n <div class="arrow"></div>\n <div class="map-popover__content popover-body"></div>\n</div>\n';return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/default/templates/datagrid/grid.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="toolbar" data-grid-toolbar="top"></div>\n<div class="other-scroll-container">\n <div class="other-scroll" aria-hidden="true"><div></div></div>\n <div class="grid-scrollable-container">\n <div class="grid-container">\n <'+(null==(__t=tableTagName)?"":_.escape(__t))+' class="grid-main-container table table-bordered',tableClassName&&(__p+=" "+(null==(__t=tableClassName)?"":_.escape(__t))),__p+='" tabindex="-1"></'+(null==(__t=tableTagName)?"":_.escape(__t))+'>\n </div>\n </div>\n <div class="no-data"></div>\n</div>\n<div class="toolbar" data-grid-toolbar="bottom"></div>\n';return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/default/templates/datagrid/no-data.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="<span>"+(null==(__t=hints)?"":_.escape(__t))+"</span>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/board/board-view.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="board-header-container"><div class="board-header"></div></div>\n<div class="board-body">\n <div class="board-columns-container"></div>\n <div class="board-body-loading-message" aria-label="'+(null==(__t=_.__("Loading..."))?"":_.escape(__t))+'"></div>\n</div>\n<div class="no-data"></div>\n';return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/board/card-view.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="<span>\n Generic card\n ",console&&console.warn&&console.warn("Please configure `card_view` in datagrid board configuration"),__p+="\n</span>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/board/column-header-view.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="board-column-title" data-grid-header-cell-label><span data-grid-header-cell-text>'+(null==(__t=label)?"":_.escape(__t))+"</span></div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/board/column-view.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="board-card-list"></div>\n';return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid-settings/datagrid-settings-dialog-widget-actions.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="widget-actions form-actions">\n <button type="reset" class="btn">\n '+(null==(__t=_.__("oro.datagrid.settings.close.label"))?"":_.escape(__t))+"\n </button>\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/action-component-dropdown-launcher.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){__p+="",obj.attributesTemplate=function(e){_.each(e,(function(e,t){__p+="\n "+(null==(__t=t)?"":_.escape(__t)),_.isNull(e)||(__p+='="'+(null==(__t=e)?"":_.escape(__t))+'"'),__p+="\n "}))},__p+="\n\n",actionClassNames=[],actionClassNames.push("action btn"),className&&actionClassNames.push(className),"icon-only"==launcherMode&&actionClassNames.push("btn-icon"),enabled||actionClassNames.push("disabled"),""!=launcherMode&&actionClassNames.push("mode-"+launcherMode),actionClassNames.push("dropdown-toggle dropdown-toggle--no-caret"),__p+="\n\n";var togglerId=_.uniqueId("dropdown-");__p+='\n<div class="'+(null==(__t=wrapperClassName)?"":_.escape(__t))+' dropdown">\n <a href="#" class="'+(null==(__t=actionClassNames.join(" "))?"":_.escape(__t))+'"\n title="'+(null==(__t=title)?"":_.escape(__t))+'"\n role="button" id="'+(null==(__t=togglerId)?"":_.escape(__t))+'" data-toggle="dropdown"\n aria-haspopup="true" aria-expanded="false"\n ',"icon-only"==launcherMode&&obj.ariaLabel&&(__p+=' aria-label="'+(null==(__t=ariaLabel)?"":_.escape(__t))+'" '),__p+="\n ",attributesTemplate(attributes),__p+=">\n ","icon-text"==launcherMode?__p+='\n <span class="'+(null==(__t=iconClassName||"fa-"+icon)?"":_.escape(__t))+'" aria-hidden="true"></span>\n '+(null==(__t=label)?"":_.escape(__t))+"\n ":"icon-only"==launcherMode?__p+='\n <span class="'+(null==(__t=iconClassName||"fa-"+icon)?"":_.escape(__t))+' fa--no-offset" aria-hidden="true"></span>\n ':"text-only"==launcherMode&&(__p+="\n ",iconClassName&&(__p+='<span class="'+(null==(__t=iconClassName)?"":_.escape(__t))+'" aria-hidden="true"></span>'),__p+="\n "+(null==(__t=label)?"":_.escape(__t))+"\n "),__p+='\n </a>\n <div class="dropdown-menu" aria-labelledby="'+(null==(__t=togglerId)?"":_.escape(__t))+'"></div>\n</div>\n'}return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/action-launcher.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){__p+="",obj.attributesTemplate=function(e){_.each(e,(function(e,t){__p+="\n "+(null==(__t=t)?"":_.escape(__t)),_.isNull(e)||(__p+='="'+(null==(__t=e)?"":_.escape(__t))+'"'),__p+="\n "}))},__p+="\n\n",actionClassNames=[],actionClassNames.push("action"),className&&actionClassNames.push(className),"icon-only"==launcherMode&&actionClassNames.push("btn-icon"),enabled||actionClassNames.push("disabled"),""!=launcherMode&&actionClassNames.push("mode-"+launcherMode),obj.withinDropdown&&actionClassNames.push("dropdown-item"),links&&actionClassNames.push("dropdown-toggle"),__p+="\n\n";var togglerId=_.uniqueId("dropdown-");__p+="\n\n",links&&(__p+='<div class="btn-group">'),__p+="\n\n<"+(null==(__t=tagName)?"":_.escape(__t))+"\n ","a"===tagName&&(__p+=' href="'+(null==(__t=link)?"":_.escape(__t))+'" role="button"'),__p+='\n class="'+(null==(__t=actionClassNames.join(" "))?"":_.escape(__t))+'"\n title="'+(null==(__t=title)?"":_.escape(__t))+'"\n ',obj.ariaLabel&&(__p+='\n aria-label="'+(null==(__t=ariaLabel)?"":_.escape(__t))+'"\n '),__p+="\n ",attributesTemplate(attributes),__p+="\n ",links&&(__p+=' data-toggle="dropdown" data-inherit-parent-width="loosely" role="button" id="'+(null==(__t=togglerId)?"":_.escape(__t))+'"\n aria-haspopup="true" aria-expanded="false" aria-label="'+(null==(__t=label)?"":_.escape(__t))+'"'),__p+=">\n\n ","icon-text"==launcherMode?__p+='\n <span class="icon '+(null==(__t=iconClassName||"fa-"+icon)?"":_.escape(__t))+'" aria-hidden="true"></span>\n '+(null==(__t=label)?"":_.escape(__t))+"\n ":"icon-only"==launcherMode?__p+='\n <span class="icon '+(null==(__t=iconClassName||"fa-"+icon)?"":_.escape(__t))+' fa--no-offset" aria-hidden="true"></span>\n ':"text-only"==launcherMode&&(__p+="\n ",iconClassName&&(__p+='<span class="icon '+(null==(__t=iconClassName)?"":_.escape(__t))+'" aria-hidden="true"></span>'),__p+="\n "+(null==(__t=label)?"":_.escape(__t))+"\n "),__p+="\n</"+(null==(__t=tagName)?"":_.escape(__t))+">\n\n",links&&(__p+='\n <ul class="dropdown-menu" aria-labelledby="'+(null==(__t=togglerId)?"":_.escape(__t))+'">\n ',_.each(links,(function(e,t){__p+='\n <li>\n <a href="'+(null==(__t=link)?"":_.escape(__t))+'" class="dropdown-item" data-index="'+(null==(__t=t)?"":_.escape(__t))+'" title="'+(null==(__t=e.label)?"":_.escape(__t))+'"\n ',e.attributes&&attributesTemplate(e.attributes),__p+="\n ",e.ariaLabel&&(__p+=' aria-label="'+(null==(__t=e.ariaLabel)?"":_.escape(__t))+'" '),__p+='\n data-key="'+(null==(__t=e.key)?"":_.escape(__t))+'">\n ',"icon-text"==launcherMode?__p+='\n <span class="icon '+(null==(__t=iconClassName||"fa-"+icon)?"":_.escape(__t))+'" aria-hidden="true"></span>\n '+(null==(__t=e.label)?"":_.escape(__t))+"\n ":"icon-only"==launcherMode?__p+='\n <span class="icon '+(null==(__t=iconClassName||"fa-"+icon)?"":_.escape(__t))+' fa--no-offset" aria-hidden="true"></span>\n ':"text-only"==launcherMode&&(__p+="\n ",iconClassName&&(__p+='<span class="icon '+(null==(__t=iconClassName)?"":_.escape(__t))+'" aria-hidden="true"></span>'),__p+="\n "+(null==(__t=e.label)?"":_.escape(__t))+"\n "),__p+="\n </a>\n </li>\n "})),__p+="\n </ul>\n</div>\n"),__p+="\n"}return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/grid-header-cell.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="",sortable?__p+='\n<a href="#" class="grid-header-cell__link" role="button" data-grid-header-cell-label>\n <span class="grid-header-cell__label" data-grid-header-cell-text>'+(null==(__t=label)?"":_.escape(__t))+'</span>\n <span class="sortable-icon" aria-hidden="true"></span>\n</a>\n':__p+='\n<span class="grid-header-cell__label-container" data-grid-header-cell-label>\n <span class="grid-header-cell__label" data-grid-header-cell-text>'+(null==(__t=label)?"":_.escape(__t))+"</span>\n</span>\n",__p+="\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/grid-settings.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="datagrid-settings__wrapper">\n <span class="close fa-close" data-role="close"></span>\n <h3 class="datagrid-settings__title">'+(null==(__t=title)?"":_.escape(__t))+'</h3>\n\n <div class="datagrid-settings__tabs" data-tabs-nav></div>\n\n <div class="datagrid-settings__tabs-content" data-tabs-content>\n ',_.each(views,(function(e){__p+='\n <div id="'+(null==(__t=e.id)?"":_.escape(__t))+'" ',e.active||(__p+=' style="display: none;"'),__p+=' data-tab-content="'+(null==(__t=e.id)?"":_.escape(__t))+'"></div>\n '})),__p+="\n </div>\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/grid-view.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){if(__p+="",choices.length){__p+="\n ";var gridViewTogglerId=_.uniqueId("dropdown-");__p+='\n <div class="views-group">\n <div id="'+(null==(__t=gridViewTogglerId)?"":_.escape(__t))+'"\n data-toggle="dropdown"\n data-adjust-height\n data-placement="bottom-start"\n class="grid-views-toogler ',disabled&&(__p+="disabled"),__p+='"\n role="button"\n aria-haspopup="true"\n aria-expanded="false"\n >\n ',__p+="\n "+(null==(__t=title)?"":__t)+"\n </div>\n\n ",iconClass=_.filter(choices,(function(e){return!1!==e.icon})).length?" has-icons":"",__p+='\n <div class="grid-views-dropdown dropdown-menu'+(null==(__t=iconClass)?"":_.escape(__t))+'" aria-labelledby="'+(null==(__t=gridViewTogglerId)?"":_.escape(__t))+'">\n ',_.each(choices,(function(e){__p+='\n <a class="grid-views-item dropdown-item" title="'+(null==(__t=e.label)?"":_.escape(__t))+'" href="#" role="button" data-value="'+(null==(__t=e.value)?"":_.escape(__t))+'">\n ',e.icon&&(__p+='\n <span class="grid-views-choice-icon '+(null==(__t=e.icon)?"":_.escape(__t))+'" aria-hidden="true"></span>\n '),__p+='\n <span class="grid-views-choice">\n '+(null==(__t=e.label)?"":_.escape(__t))+"\n </span>\n </a>\n "})),__p+="\n </div>\n </div>\n"}if(__p+="\n",showActions){__p+="\n ";var gridViewActionsTogglerId=_.uniqueId("dropdown-");__p+='\n <div class="actions-group">\n <button id="'+(null==(__t=gridViewActionsTogglerId)?"":_.escape(__t))+'"\n class="grid-view-btn btn btn-link btn-sm"\n data-toggle="dropdown"\n data-placement="bottom-start"\n data-modifiers="'+(null==(__t=JSON.stringify({preventOverflow:{enabled:!1},hide:{enabled:!1}}))?"":_.escape(__t))+'"\n aria-haspopup="true"\n aria-expanded="false"\n >\n '+(null==(__t=actionsLabel)?"":_.escape(__t))+'\n </button>\n <div class="dropdown-menu" aria-labelledby="'+(null==(__t=gridViewActionsTogglerId)?"":_.escape(__t))+'">\n ',_.each(actions,(function(e){__p+="\n ",e.enabled&&(__p+='\n <a href="#" role="button" class="grid-views-item dropdown-item '+(null==(__t=e.name)?"":_.escape(__t))+'">'+(null==(__t=e.label)?"":_.escape(__t))+"</a>\n "),__p+="\n "})),__p+="\n </div>\n ",dirty&&(__p+='\n <span class="edited-label">- '+(null==(__t=editedLabel)?"":_.escape(__t))+"</span>\n "),__p+="\n </div>\n"}__p+="\n"}return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/no-search-results.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<h5 class="no-data__title">'+(null==(__t=title)?"":__t)+'</h5>\n<p class="no-data__text">'+(null==(__t=text)?"":__t)+"</p>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/pagination.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="",_.isMobile()||(__p+="\n <span>"+(null==(__t=_.__("oro.datagrid.pagination.label"))?"":_.escape(__t))+":</span>\n"),__p+="\n\n",_.each(handles,(function(e){__p+="\n ";var t=_.isDesktop()?"btn btn-icon btn-light pagination-trigger ":"btn btn-icon pagination-trigger ";t+=e.className?e.className:"",__p+='\n <button class="'+(null==(__t=t)?"":_.escape(__t))+'"\n ',e.title&&(__p+=' title="'+(null==(__t=e.title)?"":_.escape(__t))+'"'),__p+="\n >\n ",e.wrapClass?(__p+="\n <span ",e.wrapClass&&(__p+='class="'+(null==(__t=e.wrapClass)?"":_.escape(__t))+'"'),__p+='\n aria-hidden="true"\n >\n '+(null==(__t=e.label)?"":_.escape(__t))+"\n </span>\n "):__p+="\n "+(null==(__t=e.label)?"":_.escape(__t))+"\n ",__p+="\n </button>\n"})),__p+="\n\n",_.isMobile()||(__p+="\n <span>"+(null==(__t=_.__("oro.datagrid.pagination.totalPages",{totalPages:state.totalPages||1},state.totalPages||1))?"":_.escape(__t))+"</span>\n <span>"+(null==(__t=_.__("oro.datagrid.pagination.totalRecords",{totalRecords:state.totalRecords},state.totalRecords))?"":_.escape(__t))+"</span>\n"),__p+="\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/sorting-dropdown.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){__p+="";var labelId=_.uniqueId("datagrid-toolbar-label-");__p+="\n",hasSortingOrderButton?__p+='\n<span id="'+(null==(__t=labelId)?"":_.escape(__t))+'" class="sorting-label">'+(null==(__t=_.__("oro.datagrid.toolbar_sorting.label"))?"":_.escape(__t))+":</span>\n":inlineSortingLabel&&(__p+='\n<span id="'+(null==(__t=labelId)?"":_.escape(__t))+'" class="datagrid-tool__label datagrid-tool__label-sorting">'+(null==(__t=_.__("oro.datagrid.toolbar_sorting.label"))?"":_.escape(__t))+":</span>\n"),__p+='\n\n<select class="oro-select2 oro-select2--size-s input-widget" data-skip-input-widgets aria-labelledby="'+(null==(__t=labelId)?"":_.escape(__t))+'">\n ',!1!==disableNotSelectedOption&&null!==currentDirection||(__p+='\n <option value="not-selected" ',null===currentDirection&&(__p+='selected="selected"'),__p+=">\n "+(null==(__t=_.__("oro.datagrid.sorters.not_selected"))?"":_.escape(__t))+"\n </option>\n "),__p+="\n ";for(var i=0;i<columns.length;i++)__p+='\n <option value="'+(null==(__t=columns[i].value)?"":_.escape(__t))+'"',selectedValue===columns[i].value&&(__p+=' selected="selected"'),__p+=">"+(null==(__t=columns[i].label)?"":_.escape(__t)),hasSortingOrderButton||(__p+=" ("+(null==(__t=_.__("oro.datagrid.sorters."+columns[i].sortingType+"."+columns[i].directionValue))?"":_.escape(__t))+")"),__p+="</option>\n ";__p+="\n</select>\n",hasSortingOrderButton&&(__p+='\n <span class="sorting-divider" aria-hidden="true">|</span>\n <button data-name="order-toggle" class="order-toggle btn btn-icon btn-light">\n <span aria-hidden="true"\n data-name="order-toggle-icon"\n class="',"ascending"===currentDirection?__p+="fa-sort-amount-asc-alt":__p+="fa-sort-amount-asc",__p+='"\n ></span>\n </button>\n'),__p+="\n"}return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/toggle-group.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="",visible&&(__p+='\n <button class="btn btn--size-s btn--link btn--no-x-offset" data-role="group-toggler" type="button"',enabled||(__p+=" disabled"),__p+=' aria-label="'+(null==(__t=ariaLabel)?"":_.escape(__t))+'">'+(null==(__t=label)?"":_.escape(__t))+"</button>\n"),__p+="\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/toggle-pagination.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="",visible&&(__p+='\n <button class="btn btn--size-s btn--link btn--no-x-offset" data-role="pagination-toggler" type="button"',enabled||(__p+=" disabled"),__p+=' aria-label="'+(null==(__t=ariaLabel)?"":_.escape(__t))+'">'+(null==(__t=label)?"":_.escape(__t))+"</button>\n"),__p+="\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/view-name-error-modal.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<span class="validation-failed" ',obj.id&&(__p+=' id="'+(null==(__t=id)?"":_.escape(__t))+'" '),__p+=' role="alert" >'+(null==(__t=error)?"":_.escape(__t))+"</span>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/view-name-modal.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){__p+="";var gridViewId=_.uniqueId("grid-view-");__p+='\n\n<div class="form-horizontal">\n <div class="control-group">\n <label class="control-label" for="'+(null==(__t=gridViewId)?"":_.escape(__t))+'">'+(null==(__t=label)?"":_.escape(__t))+':</label>\n <div class="controls">\n <input id="'+(null==(__t=gridViewId)?"":_.escape(__t))+'" data-role="grid-view-input" name="name" type="text" value="'+(null==(__t=value)?"":_.escape(__t))+'">\n </div>\n </div>\n <div class="control-group control-group-checkbox">\n <label class="control-label" for="gridViewDefault">'+(null==(__t=defaultLabel)?"":_.escape(__t))+':</label>\n <div class="controls">\n <input id="gridViewDefault" name="is_default" type="checkbox" ',defaultChecked&&(__p+=" checked "),__p+=" >\n </div>\n </div>\n</div>\n"}return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/hint/hint-view-template.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="popover" role="tooltip">\n <div class="arrow" aria-hidden="true"></div>\n <h3 class="popover-header"></h3>\n <div class="popover-body popover-no-close-button"></div>\n</div>\n';return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/inline-editing/error-holder.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="error-holder">\n',_.each(messages,(function(e,t){__p+='\n <span for="'+(null==(__t=t)?"":_.escape(__t))+'" class="validation-failed"><span><span>'+(null==(__t=e)?"":__t)+"</span></span></span>\n"})),__p+="\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/choice-filter.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="choice-filter" data-choice-filter-template>\n <div class="filter-select-oro-wrapper">\n <select name="'+(null==(__t=name)?"":_.escape(__t))+'" class="select select--size-s select--full oro-select2 oro-select2--size-s" data-choice-value-select\n ',"undefined"!=typeof dataName&&(__p+='\n data-name="'+(null==(__t=dataName)?"":_.escape(__t))+'"\n '),__p+="\n ",_.isMobile()&&(__p+="\n data-skip-input-widgets\n "),__p+='\n aria-label="'+(null==(__t=choiceAriaLabel)?"":_.escape(__t))+'"\n >\n ',_.each(choices,(function(e){__p+='\n <option value="'+(null==(__t=e.value)?"":_.escape(__t))+'"\n ',e.value==selectedChoice&&(__p+='\n selected="selected"\n '),__p+="\n >\n "+(null==(__t=e.label)?"":_.escape(__t))+"\n </option>\n "})),__p+='\n </select>\n </div>\n <div class="value-field-frame">\n <input class="input input--size-s input--full" type="text" name="value" value="" aria-label="'+(null==(__t=inputFieldAriaLabel)?"":_.escape(__t))+'">\n <input class="name_input" type="hidden" name="'+(null==(__t=name)?"":_.escape(__t))+'" id="'+(null==(__t=name)?"":_.escape(__t))+'" value="'+(null==(__t=selectedChoice)?"":_.escape(__t))+'">\n ',"toggle-mode"!==renderMode&&(__p+='\n <div class="filter-action-row">\n <button type="button"\n class="btn btn--action btn--size-s filter-update"\n aria-label="'+(null==(__t=updateButtonAriaLabel)?"":_.escape(__t))+'"\n >'+(null==(__t=_.__("oro.filter.updateButton.text"))?"":_.escape(__t))+"</button>\n </div>\n "),__p+="\n </div>\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/choice-tree.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="choice-tree-filter" data-choice-tree-template>\n <input type="hidden" name="value">\n <input type="hidden" name="type">\n\n ',"toggle-mode"!==renderMode&&(__p+='\n <div class="filter-action-row">\n <button type="button"\n class="btn btn--action filter-update"\n aria-label="'+(null==(__t=updateButtonAriaLabel)?"":_.escape(__t))+'"\n >'+(null==(__t=_.__("oro.filter.updateButton.text"))?"":_.escape(__t))+"</button>\n </div>\n "),__p+="\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/date-filter-dropdown.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="",tabs.length?(__p+='\n <ul class="nav nav-tabs nav-tabs-oro">\n ',_.each(tabs,(function(e,t){__p+='\n <li class="nav-item">\n <a class="nav-link '+(null==(__t=e.name)?"":_.escape(__t)),0===t&&(__p+=" active"),__p+='" href="#'+(null==(__t=e.name)?"":_.escape(__t))+(null==(__t=suffix)?"":_.escape(__t))+'" role="button">'+(null==(__t=e.label)?"":_.escape(__t))+"</a>\n </li>\n "})),__p+='\n </ul>\n <div class="tab-content">\n ',_.each(tabs,(function(e,t){__p+='\n <div class="tab-pane',0===t&&(__p+=" active"),__p+='" id="'+(null==(__t=e.name)?"":_.escape(__t))+(null==(__t=suffix)?"":_.escape(__t))+'"></div>\n '})),__p+="\n </div>\n"):__p+='\n <div id="calendar'+(null==(__t=suffix)?"":_.escape(__t))+'"></div>\n',__p+="\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/date-filter.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="data-filter-choice" data-date-filter-template>\n '+(null==(__t=parts.join(""))?"":__t)+"\n\n ","toggle-mode"===renderMode?__p+='\n <div class="filter-date-range">\n <div class="filter-start-date">\n <input type="text"\n class="'+(null==(__t=inputClass)?"":_.escape(__t))+'"\n value="'+(null==(__t=value.value.start)?"":_.escape(__t))+'"\n name="start"\n placeholder="'+(null==(__t=_.__("from"))?"":_.escape(__t))+'"\n aria-label="'+(null==(__t=startDateFieldAriaLabel)?"":_.escape(__t))+'"\n >\n </div>\n <span class="filter-separator" aria-hidden="true">-</span>\n <div class="filter-end-date">\n <input type="text"\n class="'+(null==(__t=inputClass)?"":_.escape(__t))+'"\n value="'+(null==(__t=value.value.end)?"":_.escape(__t))+'"\n name="end"\n placeholder="'+(null==(__t=_.__("to"))?"":_.escape(__t))+'"\n aria-label="'+(null==(__t=endDateFieldAriaLabel)?"":_.escape(__t))+'"\n >\n </div>\n </div>\n ':__p+='\n <div class="filter-date-range">\n <div class="filter-start-date">\n <div class="datepicker-box">\n <span class="datepicker-box__icon" aria-hidden="true">\n <span class="fa-calendar"></span>\n </span>\n <input type="text"\n class="'+(null==(__t=inputClass)?"":_.escape(__t))+'"\n value="'+(null==(__t=value.value.start)?"":_.escape(__t))+'"\n name="start"\n aria-label="'+(null==(__t=startDateFieldAriaLabel)?"":_.escape(__t))+'"\n placeholder="'+(null==(__t=_.__("from"))?"":_.escape(__t))+'"\n >\n </div>\n </div>\n <span class="filter-separator" aria-hidden="true">-</span>\n <div class="filter-end-date">\n <div class="datepicker-box">\n <span class="datepicker-box__icon" aria-hidden="true">\n <span class="fa-calendar"></span>\n </span>\n <input type="text" class="'+(null==(__t=inputClass)?"":_.escape(__t))+'"\n value="'+(null==(__t=value.value.end)?"":_.escape(__t))+'"\n name="end"\n placeholder="'+(null==(__t=_.__("to"))?"":_.escape(__t))+'"\n aria-label="'+(null==(__t=endDateFieldAriaLabel)?"":_.escape(__t))+'"\n >\n </div>\n </div>\n </div>\n <div class="filter-action-row">\n <button type="button"\n class="btn btn--action btn--size-s filter-update"\n aria-label="'+(null==(__t=updateButtonAriaLabel)?"":_.escape(__t))+'"\n >'+(null==(__t=_.__("oro.filter.updateButton.text"))?"":_.escape(__t))+"</button>\n </div>\n ",__p+="\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/date-picker.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="ui-datevariables-div" data-date-picker-itemized-content>\n <b>'+(null==(__t=title)?"":_.escape(__t))+"</b>\n <ul>\n ",_.each(items,(function(e,t){__p+='\n <li>\n <a data-value="'+(null==(__t=t)?"":_.escape(__t))+'" href="#">'+(null==(__t=e)?"":_.escape(__t))+"</a>\n </li>\n "})),__p+="\n </ul>\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/dictionary-filter.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="choice-filter" data-dictionary-filter-template>\n <div class="filter-select-oro-wrapper">\n <select name="'+(null==(__t=name)?"":_.escape(__t))+'" class="select select--size-s select--full oro-select2 oro-select2--size-s" data-choice-value-select\n ',_.isMobile()&&(__p+="\n data-skip-input-widgets\n "),__p+='\n aria-label="'+(null==(__t=choiceAriaLabel)?"":_.escape(__t))+'"\n >\n ',_.each(choices,(function(e){__p+='\n <option value="'+(null==(__t=e.value)?"":_.escape(__t))+'"\n\n ',e.value==selectedChoice&&(__p+='\n selected="selected"\n '),__p+="\n >\n "+(null==(__t=e.label)?"":_.escape(__t))+"\n </option>\n "})),__p+='\n </select>\n </div>\n <div class="value-field-frame">\n <input type="hidden"\n name="select-values-autocomplete"\n class="select-values-autocomplete oro-select2 oro-select2--size-s"\n value=""\n aria-label="'+(null==(__t=inputFieldAriaLabel)?"":_.escape(__t))+'"\n >\n <input class="name_input" type="hidden" name="'+(null==(__t=name)?"":_.escape(__t))+'" id="'+(null==(__t=name)?"":_.escape(__t))+'" value="'+(null==(__t=selectedChoice)?"":_.escape(__t))+'">\n\n ',"toggle-mode"!==renderMode&&(__p+='\n <div class="filter-action-row">\n <button type="button"\n class="btn btn--action btn--size-s filter-update"\n aria-label="'+(null==(__t=updateButtonAriaLabel)?"":_.escape(__t))+'"\n >'+(null==(__t=_.__("oro.filter.updateButton.text"))?"":_.escape(__t))+"</button>\n </div>\n "),__p+="\n </div>\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/filter-hint.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<span class="filter-criteria-hint-item">\n <span class="filter-criteria-hint-label">\n '+(null==(__t=label)?"":_.escape(__t))+':\n </span>\n <span class="filter-criteria-hint"></span>\n ',allowClear&&(__p+='\n <button class="btn btn--plain reset-filter"\n title="'+(null==(__t=_.__("oro.filter.wrapper.reset.tooltip"))?"":_.escape(__t))+'"\n aria-label="'+(null==(__t=_.__("oro.filter.wrapper.reset.aria_label.text_reset"))?"":_.escape(__t))+" "+(null==(__t=label)?"":_.escape(__t))+" "+(null==(__t=_.__("oro.filter.wrapper.reset.aria_label.text_filter"))?"":_.escape(__t))+'"\n type="button"\n ><span class="fa-close fa--no-offset" aria-hidden="true"></span></button>\n '),__p+="\n</span>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/filter-wrapper.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){__p+="";var selectorId=_.uniqueId("selector-");__p+="\n";var criteriaId=_.uniqueId("criteria-");__p+='\n<div class="filter-item" data-filter-wrapper-template>\n ';var criteriaClasses="filter-criteria-selector";obj.isEmpty&&(criteriaClasses+=" filter-default-value"),obj.criteriaClass&&(criteriaClasses+=obj.criteriaClass),__p+='\n <button id="'+(null==(__t=selectorId)?"":_.escape(__t))+'"\n class="'+(null==(__t=criteriaClasses)?"":_.escape(__t))+'"\n data-zoom-disable\n type="button"\n ',"toggle-mode"===renderMode&&(__p+='\n aria-controls="'+(null==(__t=criteriaId)?"":_.escape(__t))+'"\n '),__p+="\n >\n ",showLabel&&(__p+='<span class="filter-item-label">'+(null==(__t=label)?"":_.escape(__t))+"</span>"),__p+='<span class="filter-item-hint"></span>\n <span class="filter-criteria-selector-icon-wrap" aria-hidden="true">\n <span class="filter-criteria-selector-icon"></span>\n </span>\n </button>\n <div id="'+(null==(__t=criteriaId)?"":_.escape(__t))+'" class="filter-criteria ',"toggle-mode"!==renderMode&&(__p+="dropdown-menu"),__p+='" aria-labelledby="'+(null==(__t=selectorId)?"":_.escape(__t))+'"></div>\n</div>\n'}return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/filters-container.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="",_.isEmpty(filters)||(__p+="\n ","toggle-mode"===renderMode?(__p+='\n <div class="filter-box toggle-mode" '+(null==(__t=attributes)?"":__t)+'>\n <div class="filter-container">\n <div data-filters-items>\n ',obj.outerHintContainer||(__p+='\n <div class="filter-items-hint">\n <button type="button"\n class="btn btn--size-s btn--link reset-filter-button"\n >\n <span class="fa-close" aria-hidden="true"></span>\n '+(null==(__t=_.__("oro.filter.reset.label"))?"":_.escape(__t))+"\n </button>\n </div>\n "),__p+='\n <div class="filter-items"></div>\n <div class="filter-actions" data-role="filter-actions">\n ',obj.enableMultiselectWidget&&(__p+='\n <select data-action="add-filter-select" multiple data-skip-input-widgets>\n ',_.each(filters,(function(e,t){__p+='\n <option class="'+(null==(__t=e.visible?"":"hidden")?"":_.escape(__t))+'" title="'+(null==(__t=e.label)?"":_.escape(__t))+'" value="'+(null==(__t=t)?"":_.escape(__t))+'" ',e.renderable&&(__p+="selected"),__p+=">\n "+(null==(__t=e.label)?"":_.escape(__t))+"\n </option>\n "})),__p+="\n </select>\n "),__p+="\n </div>\n </div>\n </div>\n </div>\n "):(__p+='\n <div class="filter-box dropdown-mode" '+(null==(__t=attributes)?"":__t)+' >\n <div class="filter-container">\n <div class="filter-items"></div>\n <div class="filter-actions" data-role="filter-actions">\n ',obj.enableMultiselectWidget&&(__p+='\n <select data-action="add-filter-select"\n data-skip-input-widgets\n multiple\n >\n ',_.each(filters,(function(e,t){__p+='\n <option class="'+(null==(__t=e.visible?"":"hidden")?"":_.escape(__t))+'" title="'+(null==(__t=e.label)?"":_.escape(__t))+'" value="'+(null==(__t=t)?"":_.escape(__t))+'" ',e.renderable&&(__p+="selected"),__p+=">\n "+(null==(__t=e.label)?"":_.escape(__t))+"\n </option>\n "})),__p+="\n </select>\n "),__p+='\n </div>\n <div class="filter-items-hint">\n <button type="button"\n class="btn btn--size-s btn--link reset-filter-button"\n >\n <span class="fa-close" aria-hidden="true"></span>\n '+(null==(__t=_.__("oro.filter.reset.label"))?"":_.escape(__t))+"\n </button>\n </div>\n </div>\n </div>\n "),__p+="\n"),__p+="\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/multiselect-filter.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){__p+="";var selectorId=_.uniqueId("selector-");__p+="\n";var criteriaId=_.uniqueId("criteria-");__p+='\n<div class="filter-item" data-multiselect-filter-template>\n ';var criteriaClasses="filter-select filter-criteria-selector";obj.isEmpty&&(criteriaClasses+=" filter-default-value"),obj.criteriaClass&&(criteriaClasses+=obj.criteriaClass),__p+='\n <button id="'+(null==(__t=selectorId)?"":_.escape(__t))+'"\n class="'+(null==(__t=criteriaClasses)?"":_.escape(__t))+'"\n type="button"\n ',"toggle-mode"===renderMode&&(__p+='\n aria-controls="'+(null==(__t=criteriaId)?"":_.escape(__t))+'"\n '),__p+="\n >\n ",showLabel&&(__p+='\n <span class="filter-item-label">'+(null==(__t=label)?"":_.escape(__t))+"</span>\n "),__p+='\n <span class="filter-item-hint"></span>\n\n <span class="filter-criteria-selector-icon-wrap">\n <span class="filter-criteria-selector-icon" aria-hidden="true"></span>\n </span>\n </button>\n <select multiple\n data-skip-input-widgets\n >\n ',_.each(options,(function(e){__p+='\n <option value="'+(null==(__t=e.value)?"":_.escape(__t))+'"\n title="'+(null==(__t=e.label)?"":_.escape(__t))+'"\n ';var t=!1;__p+="\n ",_.isArray(selected.value)?(__p+="\n ",-1!==_.indexOf(selected.value,e.value)&&(__p+="\n ",t=!0,__p+="\n "),__p+="\n "):e.value==selected.value&&(__p+="\n ",t=!0,__p+="\n "),__p+="\n ",!0===t?__p+='\n selected="selected"\n ':(__p+="\n ",e.disabled!==undefined&&e.disabled&&(__p+='\n disabled="disabled"\n '),__p+="\n "),__p+="\n ",e.count!==undefined&&(__p+='data-option-count="'+(null==(__t=e.count)?"":_.escape(__t))+'"'),__p+="\n >"+(null==(__t=e.label)?"":_.escape(__t))+"</option>\n "})),__p+="\n </select>\n ","toggle-mode"===renderMode&&(__p+='\n <div id="'+(null==(__t=criteriaId)?"":_.escape(__t))+'" class="filter-criteria" aria-labelledby="'+(null==(__t=selectorId)?"":_.escape(__t))+'"></div>\n '),__p+="\n</div>\n"}return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/none-filter.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="<div data-none-filter>"+(null==(__t=popupHint)?"":_.escape(__t))+"</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/number-range-filter.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="choice-filter number-range-filter" data-number-range-filter-template>\n <div class="filter-select-oro-wrapper">\n <select name="'+(null==(__t=name)?"":_.escape(__t))+'" class="select select--size-s select--full oro-select2 oro-select2--size-s" data-choice-value-select\n ',_.isMobile()&&(__p+="\n data-skip-input-widgets\n "),__p+='\n aria-label="'+(null==(__t=choiceAriaLabel)?"":_.escape(__t))+'"\n >\n ',_.each(choices,(function(e){__p+='\n <option value="'+(null==(__t=e.value)?"":_.escape(__t))+'"\n\n ',e.value==selectedChoice&&(__p+='\n selected="selected"\n '),__p+="\n >\n "+(null==(__t=e.label)?"":_.escape(__t))+"\n </option>\n "})),__p+='\n </select>\n </div>\n <div class="value-field-frame">\n <div class="filter-value">\n <div class="filter-value-range">\n <div class="filter-start">\n <input class="input input--size-s input--full"\n type="number"\n value="'+(null==(__t=value.value)?"":_.escape(__t))+'"\n name="value"\n aria-label="'+(null==(__t=rangeStartFieldAriaLabel)?"":_.escape(__t))+'"\n >\n </div>\n <span class="filter-separator" aria-hidden="true">-</span>\n <div class="filter-end">\n <input class="input input--size-s input--full"\n type="number"\n value="'+(null==(__t=value.value_end)?"":_.escape(__t))+'"\n name="value_end"\n aria-label="'+(null==(__t=rangeEndFieldAriaLabel)?"":_.escape(__t))+'"\n >\n </div>\n </div>\n </div>\n <input class="name_input" type="hidden" name="'+(null==(__t=name)?"":_.escape(__t))+'" id="'+(null==(__t=name)?"":_.escape(__t))+'" value="'+(null==(__t=selectedChoice)?"":_.escape(__t))+'">\n\n ',"toggle-mode"!==renderMode&&(__p+='\n <div class="filter-action-row">\n <button type="button"\n class="btn btn--action btn--size-s filter-update"\n aria-label="'+(null==(__t=updateButtonAriaLabel)?"":_.escape(__t))+'"\n >'+(null==(__t=_.__("oro.filter.updateButton.text"))?"":_.escape(__t))+"</button>\n </div>\n "),__p+="\n </div>\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/select-field.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="filter-select-oro-wrapper" data-select-field-template>\n <select class="select select--size-s select--full oro-select2 oro-select2--size-s"\n name="'+(null==(__t=name)?"":_.escape(__t))+'"\n ',_.isMobile()&&(__p+="\n data-skip-input-widgets\n "),__p+="\n\n ","undefined"!=typeof dataName&&(__p+='\n data-name="'+(null==(__t=dataName)?"":_.escape(__t))+'"\n '),__p+='\n aria-label="'+(null==(__t=choiceAriaLabel)?"":_.escape(__t))+'"\n >\n ',_.each(choices,(function(e){__p+='\n <option value="'+(null==(__t=e.value)?"":_.escape(__t))+'"\n\n ',e.value==selectedChoice&&(__p+='\n selected="selected"\n '),__p+="\n >\n "+(null==(__t=e.label)?"":_.escape(__t))+"\n </option>\n "})),__p+="\n </select>\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/select-filter.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){__p+="";var selectorId=_.uniqueId("selector-");__p+="\n";var criteriaId=_.uniqueId("criteria-");__p+='\n<div class="filter-item" data-select-filter-template>\n ';var criteriaClasses="filter-select filter-criteria-selector";obj.isEmpty&&(criteriaClasses+=" filter-default-value"),obj.criteriaClass&&(criteriaClasses+=obj.criteriaClass),__p+='\n <button id="'+(null==(__t=selectorId)?"":_.escape(__t))+'"\n class="'+(null==(__t=criteriaClasses)?"":_.escape(__t))+'"\n data-zoom-disable\n type="button"\n ',"toggle-mode"===renderMode&&(__p+='\n aria-controls="'+(null==(__t=criteriaId)?"":_.escape(__t))+'"\n '),__p+="\n >\n ",showLabel&&(__p+='<span class="filter-item-label">'+(null==(__t=label)?"":_.escape(__t))+"</span>"),__p+='<span class="filter-item-hint"></span>\n <span class="filter-criteria-selector-icon-wrap" aria-hidden="true">\n <span class="filter-criteria-selector-icon"></span>\n </span>\n </button>\n\n <select data-skip-input-widgets>\n ',_.each(options,(function(e){__p+='\n <option value="'+(null==(__t=e.value)?"":_.escape(__t))+'" title="'+(null==(__t=e.label)?"":_.escape(__t))+'"\n ',e.value==selected.value&&(__p+='selected="selected"'),__p+="\n ",e.count!==undefined&&(__p+='data-option-count="'+(null==(__t=e.count)?"":_.escape(__t))+'"'),__p+="\n >"+(null==(__t=e.label)?"":_.escape(__t))+"</option>\n "})),__p+="\n </select>\n\n ","toggle-mode"===renderMode&&(__p+='\n <div id="'+(null==(__t=criteriaId)?"":_.escape(__t))+'" class="filter-criteria" aria-labelledby="'+(null==(__t=selectorId)?"":_.escape(__t))+'"></div>\n '),__p+="\n</div>\n"}return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/text-filter.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div data-text-filter-template>\n <input class="input input--size-m input--full" type="text" name="value" value="" aria-label="'+(null==(__t=inputFieldAriaLabel)?"":_.escape(__t))+'">\n ',"toggle-mode"!==renderMode&&(__p+='\n <div class="filter-action-row">\n <button type="button"\n class="btn btn--action filter-update"\n aria-label="'+(null==(__t=updateButtonAriaLabel)?"":_.escape(__t))+'"\n >'+(null==(__t=_.__("oro.filter.updateButton.text"))?"":_.escape(__t))+"</button>\n </div>\n "),__p+="\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/templates/filters-dialog-actions.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="widget-actions form-actions">\n <button data-role="reset-filters" class="btn">\n '+(null==(__t=_.__("oro.filter.dialog.reset_all"))?"":_.escape(__t))+'\n </button>\n <button type="reset" class="btn">\n '+(null==(__t=_.__("oro.filter.dialog.close"))?"":_.escape(__t))+"\n </button>\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/templates/filters-state-popover.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="popover filters-state-popover" role="tooltip">\n <div class="arrow"></div>\n <h3 class="popover-header"></h3>\n <div class="popover-body popover-no-close-button"></div>\n</div>\n';return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/templates/filters-state-view.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="",filters.length>0&&(__p+='\n<button class="filters-state" type="button">\n <span class="filters-state__ellipsis">\n <span class="fa-filter hide-text" aria-hidden="true"></span>\n ',_.each(filters,(function(e,t){t>0&&(__p+=", "),__p+="<span>"+(null==(__t=e.label)?"":_.escape(__t))+" <span>"+(null==(__t=e.hint)?"":_.escape(__t))+"</span></span>"})),__p+="\n </span>\n</button>\n"),__p+="\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/action-header-cell.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){__p+="";var togglerId=_.uniqueId("dropdown-");__p+='\n<div class="dropdown datagrid-massaction">\n <button type="button" class="btn btn--default btn--size-s dropdown-toggle" id="'+(null==(__t=togglerId)?"":_.escape(__t))+'"\n data-toggle="dropdown" data-placement="bottom-end"\n data-modifiers="'+(null==(__t=JSON.stringify({preventOverflow:{enabled:!1},hide:{enabled:!1}}))?"":_.escape(__t))+'"\n title="'+(null==(__t=_.__("oro.datagrid.mass_action.title"))?"":_.escape(__t))+'"\n aria-label="'+(null==(__t=_.__("oro.datagrid.mass_action.title"))?"":_.escape(__t))+'" aria-haspopup="true" aria-expanded="false">\n <span class="datagrid-massaction__dots" aria-hidden="true">'+(null==(__t=_.__("oro.datagrid.mass_action.button_title"))?"":_.escape(__t))+'</span>\n </button>\n <ul class="dropdown-menu datagrid-massaction__dropdown-menu" aria-labelledby="'+(null==(__t=togglerId)?"":_.escape(__t))+'" data-action-panel></ul>\n</div>\n'}return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/datagrid-settings-collection.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="table-wrapper"\n data-role="datagrid-settings-table-wrapper"\n data-scroll="true">\n <table class="table" role="presentation">\n <tbody></tbody>\n </table>\n</div>\n<div class="datagrid-manager__no-columns">\n <span>'+(null==(__t=_.__("oro.datagrid.settings.empty_list"))?"":_.escape(__t))+"</span>\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/datagrid-settings-filter.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="datagrid-manager-search',0===search.length&&(__p+=" empty"),__p+='">\n <input type="text" data-role="datagrid-settings-search" value="'+(null==(__t=search)?"":_.escape(__t))+'"\n placeholder="'+(null==(__t=_.__("oro.datagrid.settings.filter.search_placeholder"))?"":_.escape(__t))+'" />\n <a href="#" class="clear" data-role="datagrid-settings-clear-search" title="'+(null==(__t=_.__("oro.datagrid.settings.filter.clear_search_tooltip"))?"":_.escape(__t))+'">×</a>\n</div>\n';return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/datagrid-settings-item.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<td class="datagrid-manager__item">\n <div class="datagrid-manager__container">\n <span class="datagrid-manager__handle handle"></span>\n <div class="datagrid-manager__label">\n <label data-checkbox class="checkbox-label">\n <input type="checkbox" data-role="renderable"\n ',disabledVisibilityChange&&(__p+=" disabled "),__p+="\n ",renderable&&(__p+=" checked "),__p+=">\n "+(null==(__t=label)?"":_.escape(__t))+"\n </label>\n </div>\n </div>\n</td>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/datagrid-settings.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="datagrid-manager settings">\n <div class="datagrid-manager__header">\n <h5 class="datagrid-manager__title">'+(null==(__t=_.__("oro_frontend.settings.title"))?"":_.escape(__t))+'</h5>\n </div>\n <div class="datagrid-manager-filter" data-role="datagrid-settings-filter"></div>\n <div class="datagrid-manager__actions">\n <button type="button"\n class="btn btn--link btn--no-x-offset btn--no-y-offset"\n data-role="datagrid-settings-select-all"\n >'+(null==(__t=_.__("oro.datagrid.settings.select_all"))?"":_.escape(__t))+'</button>\n <span class="datagrid-manager__separator" aria-hidden="true">|</span>\n <button type="button"\n class="btn btn--link btn--no-x-offset btn--no-y-offset"\n data-role="datagrid-settings-unselect-all"\n >'+(null==(__t=_.__("oro.datagrid.settings.deselect_all"))?"":_.escape(__t))+'</button>\n </div>\n <div class="datagrid-manager-table" data-role="datagrid-settings-table"></div>\n <div class="datagrid-manager__footer" data-role="datagrid-settings-footer">\n <button type="button"\n class="btn btn--link btn--no-x-offset btn--no-y-offset datagrid-manager__reset-btn"\n data-role="datagrid-settings-reset"\n >\n <span class="fa fa-refresh" aria-hidden="true"></span>\n <span>'+(null==(__t=_.__("oro.datagrid.settings.reset"))?"":_.escape(__t))+'</span>\n </button>\n </div>\n <button type="button"\n class="close-dialog"\n data-role="close"\n title="'+(null==(__t=_.__("Close"))?"":_.escape(__t))+'"\n aria-label="'+(null==(__t=_.__("oro_frontend.settings.close.aria_label"))?"":_.escape(__t))+'"></button>\n</div>\n';return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/grid-view-label.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="<h2 ",obj.uniqueId&&(__p+=' id="'+(null==(__t=uniqueId)?"":_.escape(__t))+'" '),__p+=' class="grid-views__title',icon&&(__p+=" has-icon "),__p+='" data-toggle="dropdown" data-popper="false" aria-haspopup="true" aria-expanded="false">\n ',icon&&(__p+='\n <span class="grid-views__piece">\n <span class="badge '+(null==(__t=iconClass)?"":_.escape(__t))+'">\n <span class="fa-'+(null==(__t=icon)?"":_.escape(__t))+'" aria-hidden="true"></span>\n </span>\n </span>\n '),__p+="\n "+(null==(__t=title)?"":_.escape(__t))+'\n</h2>\n<button type="button" class="btn btn--plain" aria-label="'+(null==(__t=toggleAriaLabel)?"":_.escape(__t))+'" data-toggle="dropdown" data-popper="false" aria-haspopup="true" aria-expanded="false" >\n <span class="fa-angle-down fa--no-offset" aria-hidden="true"></span>\n</button>\n';return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/page-size.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){if(__p+="",(collectionState.totalRecords||0)>Math.min.apply(null,items.map((function(e){return e.size||e})))){__p+="\n ";var labelId=_.uniqueId("datagrid-toolbar-label-");__p+='\n <span id="'+(null==(__t=labelId)?"":_.escape(__t))+'" class="datagrid-tool__label">'+(null==(__t=_.__("Per page"))?"":_.escape(__t))+': </span>\n <div class="action-selectbox-custom-in-pager">\n <select class="select select--size-s oro-select2--size-s" name="action" data-grid-pagesize-selector aria-labelledby="'+(null==(__t=labelId)?"":_.escape(__t))+'">\n ',_.each(items,(function(e){__p+="\n <option ",(e===currentPageSize||!_.isUndefined(e.size)&&e.size===currentPageSize)&&(__p+="selected"),__p+='\n value="',_.isUndefined(e.size)?__p+=""+(null==(__t=e)?"":_.escape(__t)):__p+=""+(null==(__t=e.size)?"":_.escape(__t)),__p+='"\n data-grid-pagesize-trigger>\n ',_.isUndefined(e.label)?__p+=""+(null==(__t=e)?"":_.escape(__t)):__p+=""+(null==(__t=_.__(e.label))?"":_.escape(__t)),__p+="\n </option>\n "})),__p+="\n </select>\n </div>\n"}__p+="\n"}return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/pagination-input.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="",(state.totalPages||1)>1&&(__p+='\n <div class="oro-pagination__pager">\n ',_.each(handles,(function(e){__p+="\n ","input"==e.type?(__p+='\n <input type="text"\n class="input input--size-s oro-pagination__input"\n value="'+(null==(__t=0==state.firstPage?state.currentPage+1:state.currentPage)?"":_.escape(__t))+'"\n aria-label="'+(null==(__t=_.__("oro.datagrid.pagination.input.aria_label"))?"":_.escape(__t))+'"\n data-grid-pagination-trigger-input\n ',disabled&&(__p+='disabled="disabled"'),__p+="/>\n "):(__p+="\n ","next"==e.direction&&(__p+='\n <span class="oro-pagination__total">\n '+(null==(__t=_.__("oro.datagrid.pagination.totalPages",{totalPages:state.totalPages||1}))?"":_.escape(__t))+"\n </span>\n "),__p+='\n <button class="btn btn--size-s btn--default oro-pagination__'+(null==(__t=e.direction)?"":_.escape(__t)),e.className&&(__p+=" "+(null==(__t=e.className)?"":_.escape(__t))),__p+='"\n data-grid-pagination-trigger data-grid-pagination-direction="'+(null==(__t=e.direction)?"":_.escape(__t))+'"\n ',disabled&&(__p+=" disabled"),__p+="\n ",e.className&&(__p+=" "+(null==(__t=e.className)?"":_.escape(__t))),__p+=">\n ","next"==e.direction?__p+='\n <span class="oro-pagination__label" aria-label="'+(null==(__t=_.__("oro.datagrid.pagination.next.aria_label"))?"":_.escape(__t))+'">'+(null==(__t=_.__("oro.datagrid.pagination.next"))?"":_.escape(__t))+'</span>\n <span class="fa-angle-'+(null==(__t=e.arrow)?"":_.escape(__t))+'" aria-hidden="true"></span>\n ':__p+='\n <span class="fa-angle-'+(null==(__t=e.arrow)?"":_.escape(__t))+'" aria-hidden="true"></span>\n <span class="oro-pagination__label" aria-label="'+(null==(__t=_.__("oro.datagrid.pagination.prev.aria_label"))?"":_.escape(__t))+'">'+(null==(__t=_.__("oro.datagrid.pagination.prev"))?"":_.escape(__t))+"</span>\n ",__p+="\n </button>\n "),__p+="\n "})),__p+="\n </div>\n"),__p+="\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/select-all-header-cell.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){__p+="";var togglerId=_.uniqueId("dropdown-");__p+='\n<div class="datagrid-massaction">\n <div class="btn-group dropdown">\n <label class="btn btn--default btn--size-s">\n <input type="checkbox" name="is_default"\n data-input-widget-options="'+(null==(__t=JSON.stringify({checkedParentCssClass:null}))?"":_.escape(__t))+'"\n data-select>\n <span class="sr-only">'+(null==(__t=_.__("oro.datagrid.headerCell.selectAll.input.aria_label"))?"":_.escape(__t))+'</span>\n </label>\n <button class="btn btn--default btn--size-s dropdown-toggle dropdown-toggle--no-offset"\n id="'+(null==(__t=togglerId)?"":_.escape(__t))+'" data-toggle="dropdown"\n data-placement="bottom-center"\n data-modifiers="'+(null==(__t=JSON.stringify({preventOverflow:{enabled:!1},hide:{enabled:!1}}))?"":_.escape(__t))+'"\n aria-haspopup="true" aria-expanded="false"\n aria-label="'+(null==(__t=_.__("oro.datagrid.headerCell.selectAll.label"))?"":_.escape(__t))+'"\n ></button>\n <ul class="dropdown-menu datagrid-massaction__dropdown-menu" aria-labelledby="'+(null==(__t=togglerId)?"":_.escape(__t))+'">\n <li>\n <a href="#" class="action dropdown-item" role="button" data-select-all>\n '+(null==(__t=_.__("oro.datagrid.headerCell.selectAll.all"))?"":_.escape(__t))+'\n </a>\n </li>\n <li class="all-visible">\n <a href="#" class="action dropdown-item" role="button" data-select-all-visible>\n '+(null==(__t=_.__("oro.datagrid.headerCell.selectAll.allVisible"))?"":_.escape(__t))+'\n </a>\n </li>\n <li>\n <a href="#" class="action dropdown-item" role="button" data-select-none>\n '+(null==(__t=_.__("oro.datagrid.headerCell.selectAll.none"))?"":_.escape(__t))+"\n </a>\n </li>\n </ul>\n </div>\n</div>\n"}return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/select-row-cell.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<label class="checkbox-label">\n <input type="checkbox" class="select-row-cell-input" data-role="select-row-cell" ',checked&&(__p+=' checked="checked"'),__p+=">\n ",_.isUndefined(obj.text)||(__p+="\n "+(null==(__t=text)?"":_.escape(__t))+"\n "),__p+="\n</label>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/visible-items-counter.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+=(null==(__t=_.__(transTemplate||"oro.datagrid.pagination.totalRecordsShort",{totalRecords:state.totalRecords},state.totalRecords))?"":__t)+"\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/templates/multiselect-clear-search.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<button type="button" class="btn btn--plain clear-search-button" data-role="clear">\n <span class="fa-close fa--no-offset" aria-hidden="true"></span>\n</button>\n';return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/templates/multiselect-no-found.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="multiselect-filter__no-found" data-role="no-data" role="alert">'+(null==(__t=_.__("oro_frontend.filters.no_found"))?"":_.escape(__t))+"</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oropricing/templates/product/pricing-filter.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){__p+="";var togglerId=_.uniqueId("dropdown-");__p+='\n<div class="product-price-filter">\n <span class="product-price-unit-filter-separator">'+(null==(__t=_.__("oro.pricing.filter.product_price.per"))?"":_.escape(__t))+'</span>\n <div class="btn-group btn-block filter-trigger-wrapper product-price-unit-filter">\n <button id="'+(null==(__t=togglerId)?"":_.escape(__t))+'"\n class="btn btn--link btn--size-s dropdown-toggle" data-toggle="dropdown"\n data-inherit-parent-width="loosely"\n data-adjust-height\n aria-haspopup="true" aria-expanded="false" aria-label="'+(null==(__t=_.__("oro.pricing.filter.product_price.units_select.label"))?"":_.escape(__t))+'">\n '+(null==(__t=selectedChoiceLabel)?"":_.escape(__t))+'<span class="caret" aria-hidden="true"></span>\n </button>\n <ul class="dropdown-menu" data-name="unit" role="menu" aria-labelledby="'+(null==(__t=togglerId)?"":_.escape(__t))+'">\n ',_.each(choices,(function(e){__p+="\n <li",selectedChoice==e.value&&(__p+=' class="active"'),__p+='>\n <a class="dropdown-item choice-value" href="#" data-value="'+(null==(__t=e.value)?"":_.escape(__t))+'">'+(null==(__t=e.label)?"":_.escape(__t))+"</a>\n </li>\n "})),__p+='\n </ul>\n <input type="hidden" name="unit" id="unit" value="'+(null==(__t=selectedChoice)?"":_.escape(__t))+'"/>\n </div>\n</div>\n'}return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oropricing/templates/product/pricing-range-filter.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="choice-filter number-range-filter" data-pricing-range-filter-template>\n ',showChoices&&choices.length>1?(__p+='\n <div class="filter-select-oro-wrapper">\n <select name="'+(null==(__t=name)?"":_.escape(__t))+'" class="select select--size-s select--full oro-select2 oro-select2--size-s" data-choice-value-select\n ',_.isMobile()&&(__p+="\n data-skip-input-widgets\n "),__p+='\n aria-label="'+(null==(__t=choiceAriaLabel)?"":_.escape(__t))+'"\n >\n ',_.each(choices,(function(e){__p+='\n <option value="'+(null==(__t=e.value)?"":_.escape(__t))+'"\n ',e.value==selectedChoice&&(__p+='\n selected="selected"\n '),__p+="\n >\n "+(null==(__t=e.label)?"":_.escape(__t))+"\n </option>\n "})),__p+="\n </select>\n </div>\n "):!showChoices&&choices.length>1||showChoices&&1===choices.length?__p+='\n <input name="'+(null==(__t=name)?"":_.escape(__t))+'" type="hidden" value="'+(null==(__t=choices[0].value)?"":_.escape(__t))+'" data-choice-value-select>\n ':__p+='\n <input name="'+(null==(__t=name)?"":_.escape(__t))+'" type="hidden" value="7" data-choice-value-select>\n ',__p+='\n\n <div class="value-field-frame">\n <div class="filter-value">\n <div class="filter-value-range">\n <div class="filter-start input-group">\n <div class="input-group-'+(null==(__t=currency.isPrepend?"prepend":"append")?"":_.escape(__t))+" "+(null==(__t=currency.extended?"extended":"")?"":_.escape(__t))+'"\n aria-hidden="true"\n >\n <span class="input-group-text">'+(null==(__t=currency.symbol)?"":_.escape(__t))+'</span>\n </div>\n <input class="input input--size-s input--full" type="number"\n placeholder="'+(null==(__t=_.__("oro.pricing.filter.product_price.min"))?"":_.escape(__t))+'"\n value="'+(null==(__t=value.value)?"":_.escape(__t))+'"\n name="value"\n aria-label="'+(null==(__t=rangeStartFieldAriaLabel)?"":_.escape(__t))+'"\n >\n </div>\n <span class="filter-separator" aria-hidden="true">-</span>\n <div class="filter-end input-group">\n <div class="input-group-'+(null==(__t=currency.isPrepend?"prepend":"append")?"":_.escape(__t))+" "+(null==(__t=currency.extended?"extended":"")?"":_.escape(__t))+'"\n aria-hidden="true"\n >\n <span class="input-group-text">'+(null==(__t=currency.symbol)?"":_.escape(__t))+'</span>\n </div>\n <input class="input input--size-s input--full"\n type="number"\n placeholder="'+(null==(__t=_.__("oro.pricing.filter.product_price.max"))?"":_.escape(__t))+'"\n value="'+(null==(__t=value.value_end)?"":_.escape(__t))+'"\n name="value_end"\n aria-label="'+(null==(__t=rangeEndFieldAriaLabel)?"":_.escape(__t))+'"\n >\n </div>\n </div>\n </div>\n ',"toggle-mode"!==renderMode&&(__p+='\n <div class="filter-action-row">\n <button type="button"\n class="btn btn--action btn--size-s filter-update"\n aria-label="'+(null==(__t=updateButtonAriaLabel)?"":_.escape(__t))+'"\n >'+(null==(__t=_.__("oro.filter.updateButton.text"))?"":_.escape(__t))+"</button>\n </div>\n "),__p+="\n </div>\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oropricing/templates/product/pricing-range-units-filter.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="",choices.length>1&&!singleUnitMode?(__p+='\n <div class="product-price-filter">\n <span class="product-price-unit-filter-separator" aria-hidden="true">'+(null==(__t=_.__("oro.pricing.filter.product_price.per"))?"":_.escape(__t))+'</span>\n <div class="btn-group btn-block filter-trigger-wrapper product-price-unit-filter" role="group" aria-label="'+(null==(__t=unitsListAriaLabel)?"":_.escape(__t))+'">\n ',_.each(choices,(function(e){__p+='\n <div class="product-price-filter__unit">\n <label class="checkbox-label" title="'+(null==(__t=e.label)?"":_.escape(__t))+'">\n <span class="sr-only" aria-hidden="true">'+(null==(__t=e.label)?"":_.escape(__t))+'</span>\n <input type="radio" name="unit" data-role="set-default"\n value="'+(null==(__t=e.value)?"":_.escape(__t))+'" data-label="'+(null==(__t=e.label)?"":_.escape(__t))+'"\n '+(null==(__t=selectedChoice===e.value?"checked":"")?"":_.escape(__t))+"\n >\n "+(null==(__t=e.label)?"":_.escape(__t))+"\n </label>\n </div>\n "})),__p+="\n </div>\n </div>\n"):__p+='\n <input type="hidden" name="unit" value="'+(null==(__t=defaultUnitCode)?"":_.escape(__t))+'">\n',__p+="\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroproduct/templates/datagrid/backend-action-header-cell.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="datagrid-massaction sticky-mode buttons-equal buttons-equal--no-offset" data-action-panel>\n <button type="button" class="btn btn--block btn--size-s" data-undo-selection>\n <span class="fa fa-close" aria-hidden="true"></span>\n '+(null==(__t=_.__("Close"))?"":_.escape(__t))+"\n </button>\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroproduct/templates/datagrid/backend-select-all-header-cell.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){if(__p+="",obj.isSimple){__p+="\n ";var togglerId=_.uniqueId("toggle-");__p+='\n <label tabindex="0" class="btn btn--default btn--size-s">\n <input type="checkbox" tabindex="-1" class="hidden" data-checkbox-change-visible>\n <span class="icon-selector icon--no-offset" aria-hidden="true"></span>\n </label>\n'}else{__p+="\n ";var togglerId=_.uniqueId("dropdown-");__p+='\n <div class="datagrid-massaction">\n <div class="btn-group dropdown">\n <label class="btn btn--default btn--size-s">\n <input type="checkbox" name="is_default"\n data-input-widget-options="'+(null==(__t=JSON.stringify({checkedParentCssClass:null}))?"":_.escape(__t))+'"\n data-select>\n <span class="sr-only">'+(null==(__t=_.__("oro.datagrid.headerCell.selectAllVisible.input.aria_label"))?"":_.escape(__t))+'</span>\n </label>\n <button class="btn btn--default btn--size-s dropdown-toggle dropdown-toggle--no-offset"\n id="'+(null==(__t=togglerId)?"":_.escape(__t))+'" data-toggle="dropdown"\n data-placement="bottom-center"\n data-inherit-parent-width="loosely"\n data-modifiers="'+(null==(__t=JSON.stringify({preventOverflow:{enabled:!1},hide:{enabled:!1}}))?"":_.escape(__t))+'"\n aria-haspopup="true" aria-expanded="false"\n aria-label="'+(null==(__t=_.__("oro.datagrid.headerCell.selectAll.label"))?"":_.escape(__t))+'"\n ></button>\n <ul class="dropdown-menu datagrid-massaction__dropdown-menu" aria-labelledby="'+(null==(__t=togglerId)?"":_.escape(__t))+'">\n <li class="all-visible">\n <a href="#" role="button" class="action dropdown-item" data-select-all-visible>\n '+(null==(__t=_.__("oro.datagrid.headerCell.selectAll.allVisible"))?"":_.escape(__t))+'\n </a>\n </li>\n <li>\n <a href="#" role="button" class="action dropdown-item" data-select-none>\n '+(null==(__t=_.__("oro.datagrid.headerCell.selectAll.none"))?"":_.escape(__t))+"\n </a>\n </li>\n </ul>\n </div>\n </div>\n"}__p+="\n"}return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroproduct/templates/datagrid/backend-select-row-cell.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<label class="checkbox-label">\n <input type="checkbox" data-role="select-row-cell"',obj.isSimple&&(__p+=' class="checkbox-round"'),__p+="",checked&&(__p+=' checked="checked"'),__p+=">\n ",obj.isSimple||_.isUndefined(obj.text)||(__p+=""+(null==(__t=text)?"":_.escape(__t))),__p+="\n</label>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroproduct/templates/datagrid/fullscreen-sorting.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<button class="btn btn--default btn--size-s" title="Sorting" data-role="fullscreen-sorting">\n <i class="fa-sort-alpha-asc hide-text"></i>\n</button>\n<div class="sorting-popup" data-role="fullscreen-sorting-content">\n ',itemsList&&(__p+='\n <div class="sorting-popup__title">'+(null==(__t=_.__("oro.datagrid.toolbar_sorting.label"))?"":_.escape(__t))+':</div>\n <div class="sorting-popup__list">\n ',_.each(itemsList,(function(e){__p+='\n <div class="sorting-popup__item">\n <label class="checkbox-label sorting-popup__radio">\n <input type="radio" name="'+(null==(__t=e.name)?"":_.escape(__t))+'" data-role="fullscreen-sorting-switcher" value="'+(null==(__t=e.value)?"":_.escape(__t))+'"',e.checked&&(__p+=" checked"),__p+=">\n "+(null==(__t=e.title)?"":_.escape(__t))+"\n </label>\n </div>\n "})),__p+="\n </div>\n "),__p+="\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroproduct/templates/sidebar-filters/filter-applier.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<span class="arrow" aria-hidden="true"></span>\n<button class="'+(null==(__t=buttonOptions.classes)?"":_.escape(__t))+'" type="button" data-role="apply">'+(null==(__t=buttonOptions.label)?"":_.escape(__t))+"</button>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroproduct/templates/sidebar-filters/filter-items-hint.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="filter-items-hint">\n <button type="button"\n class="btn btn--size-s btn--link reset-filter-button"\n ><span class="fa-close" aria-hidden="true"></span>'+(null==(__t=_.__("oro.filter.reset.label"))?"":_.escape(__t))+"</button>\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroproduct/templates/sidebar-filters/filters-container.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="filter-box '+(null==(__t=renderMode)?"":_.escape(__t))+'">\n <div class="filter-container">\n <div class="filter-container-header">\n <div class="filter-container-title">\n <h2>'+(null==(__t=_.__("oro.product.sidebar_filters.title"))?"":_.escape(__t))+'</h2>\n </div>\n\n <div class="filter-container-manager">\n <div class="filter-actions" data-role="filter-actions">\n ',obj.enableMultiselectWidget&&(__p+='\n <div data-role="filter-container-manager">\n <select data-action="add-filter-select" data-skip-input-widgets multiple>\n ',_.each(filters,(function(e,t){__p+="\n ",e.visible&&(__p+='\n <option class="'+(null==(__t=e.visible?"":"hidden")?"":_.escape(__t))+'"\n title="'+(null==(__t=e.label)?"":_.escape(__t))+'"\n value="'+(null==(__t=t)?"":_.escape(__t))+'"\n ',e.renderable&&(__p+="selected"),__p+="\n >"+(null==(__t=e.label)?"":_.escape(__t))+"</option>\n "),__p+="\n "})),__p+="\n </select>\n </div>\n "),__p+='\n </div>\n </div>\n </div>\n <div data-filters-items>\n <div class="filter-items"></div>\n </div>\n </div>\n</div>\n';return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroproduct/templates/sidebar-filters/sidebar-toggle-filters-view.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<button class="'+(null==(__t=className)?"":_.escape(__t))+'" type="button" title="'+(null==(__t=_.__(title))?"":_.escape(__t))+'">\n <span class="'+(null==(__t=icon)?"":_.escape(__t))+'" aria-hidden="true"></span>\n</button>\n';return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroshipping/templates/datagrid/cell/shipping-methods-cell.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){if(__p+="",shippingMethods&&!_.isEmpty(shippingMethods)){__p+="\n";let titleClasses="grid-shipping-methods-title";titleClassName&&(titleClasses+=" "+titleClassName),__p+='\n<h5 class="'+(null==(__t=titleClasses)?"":_.escape(__t))+'">'+(null==(__t=_metadata.label)?"":_.escape(__t))+':</h5>\n<ul class="grid-shipping-methods">\n',_.each(shippingMethods,(e=>{__p+="\n ",e.types&&(__p+="\n ",_.each(e.types,(t=>{if(__p+="\n ",t.price){__p+="\n ";var i=currentShippingMethodType===t.identifier&¤tShippingMethod===e.identifier;__p+='\n <li>\n <label class="checkbox-label skip-row-click">\n <input type="radio"\n name="shippingMethodType['+(null==(__t=lineItemId)?"":_.escape(__t))+']"\n value="'+(null==(__t=t.identifier)?"":_.escape(__t))+"-"+(null==(__t=e.identifier)?"":_.escape(__t))+'"\n data-shipping-type="'+(null==(__t=t.identifier)?"":_.escape(__t))+'"\n data-shipping-method="'+(null==(__t=e.identifier)?"":_.escape(__t))+'"\n data-shipping-price="'+(null==(__t=t.price.value)?"":_.escape(__t))+'"\n data-choice="'+(null==(__t=t.identifier)?"":_.escape(__t))+'"\n data-item-id="'+(null==(__t=lineItemId)?"":_.escape(__t))+'"\n ',i&&(__p+="checked"),__p+="\n >\n "+(null==(__t=_.__("oro.shipping.method_type.backend.method_type_and_price.label",{translatedMethodType:t.label,price:formatter.formatCurrency(t.price.value,t.price.currency)}))?"":_.escape(__t))+"\n </label>\n </li>\n "}})),__p+="\n")})),__p+="\n</ul>\n"}__p+="\n"}return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroshoppinglist/templates/actions/add-notes-action.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<form novalidate>\n <textarea class="textarea full shopping-list-notes-modal__editor" name="notes" data-autoresize aria-labelledby="'+(null==(__t=arialLabelBy)?"":_.escape(__t))+'"></textarea>\n</form>\n';return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroshoppinglist/templates/datagrid/cell/product-kit-item-message.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){__p+="";let oroshoppinglist=_.macros("oroshoppinglist");__p+="\n\n",(obj.isUpcoming||obj.errors&&obj.errors.length||obj.warnings&&obj.warnings.length)&&(__p+='\n<div class="notification-container">\n '+(null==(__t=oroshoppinglist.renderErrors({errors:obj.errors,obj}))?"":__t)+"\n "+(null==(__t=oroshoppinglist.renderWarnings({warnings:obj.warnings}))?"":__t)+"\n "+(null==(__t=oroshoppinglist.renderUpcoming({isUpcoming:obj.isUpcoming,availabilityDate:obj.availabilityDate}))?"":__t)+"\n</div>\n"),__p+="\n"}return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroshoppinglist/templates/datagrid/cell/select-row-cell.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="",obj._isKitItemLineItem?__p+='\n <span class="checkbox-label cell-checkbox no-gap" aria-hidden="true">\n <span class="checkbox-placeholder">\n <span class="cell-line" aria-hidden="true"></span>\n </span>\n </span>\n':(__p+='\n <label class="checkbox-label cell-checkbox no-gap">\n <input type="checkbox" data-role="select-row-cell" class="select-row-cell-input" ',checked&&(__p+=' checked="checked"'),__p+='>\n <span class="cell-line" aria-hidden="true"></span>\n <span class="sr-only">'+(null==(__t=_.__("oro.datagrid.action.select_row"))?"":_.escape(__t))+"</span>\n </label>\n"),__p+="\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroshoppinglist/templates/editor/shoppinglist-line-item-editor.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){__p+="";let oroshoppinglist=_.macros("oroshoppinglist");__p+='\n\n<div class="inline-editor__inner">\n <div class="inline-editor__fields">\n <input\n name="quantity"\n type="number"\n inputmode="text"\n value="'+(null==(__t=data.quantity)?"":_.escape(__t))+'"\n data-precision="'+(null==(__t=data.precision)?"":_.escape(__t))+'"\n class="input input-qty"\n aria-label="'+(null==(__t=_.__("oro.frontend.shoppinglist.inline_editing.quantity.aria_label"))?"":_.escape(__t))+'"\n autocomplete="off"\n data-floating-error\n data-boundaries-element="[role=\'dialog\']"\n >\n <select name="unitCode" class="select input" aria-label="'+(null==(__t=_.__("oro.frontend.shoppinglist.inline_editing.unit.aria_label"))?"":_.escape(__t))+'" required>\n ',_.each(data.units,(function(e,t){__p+='\n <option value="'+(null==(__t=t)?"":_.escape(__t))+'"',e.selected&&(__p+=" selected"),__p+="",e.disabled&&(__p+=" disabled"),__p+=">\n "+(null==(__t=oroshoppinglist.renderUnit({unit:t,quantity:1}))?"":_.escape(__t))+"\n </option>\n "})),__p+='\n </select>\n </div>\n <div class="inline-editor__actions">\n <button class="btn btn-icon btn--info btn--size-xs inline-editor__action-item" type="submit"\n title="'+(null==(__t=_.__("oro.form.inlineEditing.action.save"))?"":_.escape(__t))+'">\n <span class="fa-check fa--no-offset" aria-hidden="true"></span>\n </button>\n <button class="btn btn-icon btn--size-xs inline-editor__action-item" data-action="cancel"\n title="'+(null==(__t=_.__("oro.form.inlineEditing.action.cancel"))?"":_.escape(__t))+'">\n <span class="fa-close fa--no-offset" aria-hidden="true"></span>\n </button>\n </div>\n</div>\n'}return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroshoppinglist/templates/editor/shoppinglist-update-all-btn.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<button class="btn btn--link btn--no-y-offset btn--size-xs" type="button" data-role="update-all">'+(null==(__t=_.__("oro.frontend.shoppinglist.actions.update_all"))?"":_.escape(__t))+"</button>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orowebsiteelasticsearch/templates/saved-search/datagrid/cell/applied-parameters.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="applied-parameters-cell__container">\n ',obj.parameters&&_.keys(parameters.urlParams).length&&(__p+='\n <div class="applied-parameters-cell__url-params">\n ',_.each(parameters.urlParams,(function(e){__p+="\n <div>"+(null==(__t=e)?"":_.escape(__t))+"</div>\n "})),__p+="\n </div>\n "),__p+="\n ",obj.parameters&&_.keys(parameters.filters).length&&(__p+='\n <ul class="applied-parameters-cell__list">\n ',_.each(parameters.filters,(function(e,t){__p+="\n <li>"+(null==(__t=e.label)?"":_.escape(__t))+": "+(null==(__t=e.hint)?"":_.escape(__t))+"</li>\n "})),__p+="\n </ul>\n "),__p+="\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orowebsiteelasticsearch/templates/saved-search/dropdown.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{}){__p+="";var dropdownId=_.uniqueId("saved-search-");__p+='\n<button class="saved-search-button btn btn--default btn--size-s dropdown-toggle dropdown-toggle--no-caret"\n type="button"\n id="'+(null==(__t=dropdownId)?"":_.escape(__t))+'"\n data-role="button"\n data-toggle="dropdown"\n aria-haspopup="true"\n aria-expanded="false"\n data-modifiers="'+(null==(__t=JSON.stringify({preventOverflow:{enabled:!1},hide:{enabled:!1}}))?"":_.escape(__t))+'"\n data-offset="'+(null==(__t=dropdownOffset)?"":_.escape(__t))+'"\n ',obj.stateMap.trigger&&stateMap.trigger.title&&(__p+='\n title="'+(null==(__t=_.__(stateMap.trigger.title,{label}))?"":_.escape(__t))+'"\n '),__p+="\n ",obj.stateMap.trigger&&stateMap.trigger.ariaLabel&&(__p+='\n aria-label="'+(null==(__t=_.__(stateMap.trigger.ariaLabel))?"":_.escape(__t))+'"\n '),__p+="\n>\n ",obj.stateMap.icon&&(__p+='\n <span class="saved-search-icon '+(null==(__t=viewMode)?"":_.escape(__t))+" "+(null==(__t=stateMap.icon)?"":_.escape(__t))+'" aria-hidden="true"></span>\n '),__p+='\n <span class="saved-search-button__text">'+(null==(__t=label)?"":_.escape(__t))+'</span>\n</button>\n\n<div class="saved-search__popover-helper" data-toggle="popover-helper" aria-hidden="true"></div>\n\n<div class="saved-search-dropdown dropdown-menu '+(null==(__t=dropdownAlignment)?"":_.escape(__t))+'"\n aria-labelledby="'+(null==(__t=dropdownId)?"":_.escape(__t))+'"\n data-inherit-parent-width="loosely"\n data-skip-focus-decoration\n>\n',obj.stateMap.title&&(__p+='\n <h5 class="saved-search__title saved-search__title--y-offset">'+(null==(__t=_.__(obj.stateMap.title))?"":_.escape(__t))+"</h5>\n"),__p+='\n <div class="saved-search-dropdown__content" data-role="content"></div>\n <button type="button" class="close-dialog" title="Close" aria-label="'+(null==(__t=_.__("oro.websiteelasticsearch.savedsearch.close_button.aria_label"))?"":_.escape(__t))+'" data-close></button>\n</div>\n'}return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orowebsiteelasticsearch/templates/saved-search/form-actions.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="saved-search-form-actions">\n <button class="btn btn--action btn--size-s"\n type="button"\n ',obj.id?__p+='\n data-role="undo"\n ':__p+='\n data-role="abort"\n ',__p+='\n aria-label="'+(null==(__t=_.__(stateMap.form.cancelButton.ariaLabel))?"":_.escape(__t))+'"\n >'+(null==(__t=_.__(stateMap.form.cancelButton.label))?"":_.escape(__t))+'</button>\n <button class="btn btn--info btn--size-s"\n type="button"\n data-role="save"\n disabled="disabled"\n aria-label="'+(null==(__t=_.__(stateMap.form.saveButton.ariaLabel))?"":_.escape(__t))+'"\n >'+(null==(__t=_.__(stateMap.form.saveButton.label))?"":_.escape(__t))+"</button>\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orowebsiteelasticsearch/templates/saved-search/form.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div role="form" class="grid saved-search-form__content" aria-label="'+(null==(__t=_.__(stateMap.form.ariaLabel))?"":_.escape(__t))+'">\n <div class="grid-col-12">\n <input class="input input--full input--size-s"\n type="text"\n data-role="name"\n name="'+(null==(__t=cid)?"":_.escape(__t))+'name"\n value="'+(null==(__t=inputValue)?"":_.escape(__t))+'"\n placeholder="'+(null==(__t=_.__("oro.websiteelasticsearch.savedsearch.form.input.placeholder"))?"":_.escape(__t))+'"\n aria-label="'+(null==(__t=_.__("oro.websiteelasticsearch.savedsearch.form.input.aria_label"))?"":_.escape(__t))+'"\n >\n </div>\n ',obj.isOutOfLimit&&(__p+='\n <div class="grid-col-12" data-role="notification">\n <div class="notification notification--warning" role="alert">\n <div class="notification__item notification__item--flex">\n <span class="fa-exclamation-circle" aria-hidden="true"></span>\n <span class="notification__text">'+(null==(__t=_.__("oro.websiteelasticsearch.savedsearch.notifications.message",{limit:resultSetLimit}))?"":_.escape(__t))+"</span>\n </div>\n </div>\n </div>\n "),__p+="\n ",_.isObject(obj.typeState)&&_.keys(obj.typeState).length&&(__p+='\n <div class="grid-col-12">\n <h5 class="saved-search__title">'+(null==(__t=_.__("oro.websiteelasticsearch.savedsearch.form_title"))?"":_.escape(__t))+'</h5>\n <ol class="saved-search__list">\n ',_.each(typeState,(function(e,t){__p+="\n ";var i=_.uniqueId("label");__p+='\n <li class="saved-search__list-item">\n <label class="checkbox-label" for="'+(null==(__t=i)?"":_.escape(__t))+'">\n <input id="'+(null==(__t=i)?"":_.escape(__t))+'"',e.checked&&(__p+=' checked="checked"'),__p+='\n value="'+(null==(__t=e.value)?"":_.escape(__t))+'"\n type="checkbox" name="type'+(null==(__t=cid)?"":_.escape(__t))+(null==(__t=t)?"":_.escape(__t))+'"\n data-name="'+(null==(__t=t)?"":_.escape(__t))+'"\n >'+(null==(__t=_.__("oro.websiteelasticsearch.savedsearch.notifications."+t))?"":_.escape(__t))+"\n </label>\n </li>\n "})),__p+="\n </ol>\n </div>\n "),__p+="\n</div>\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orowebsiteelasticsearch/templates/saved-search/fullscreen.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<button class="saved-search-button btn btn--default btn--size-s caret offset-start"\n type="button"\n data-role="button"\n ',obj.stateMap.trigger&&stateMap.trigger.title&&(__p+='\n title="'+(null==(__t=_.__(stateMap.trigger.title,{label}))?"":_.escape(__t))+'"\n '),__p+="\n ",obj.stateMap.trigger&&stateMap.trigger.ariaLabel&&(__p+='\n aria-label="'+(null==(__t=_.__(stateMap.trigger.ariaLabel))?"":_.escape(__t))+'"\n '),__p+="\n>\n ",obj.stateMap.icon&&(__p+='\n <span class="saved-search-icon '+(null==(__t=viewMode)?"":_.escape(__t))+" "+(null==(__t=stateMap.icon)?"":_.escape(__t))+'" aria-hidden="true"></span>\n '),__p+='\n</button>\n\n<div class="saved-search__popover-helper" data-toggle="popover-helper" aria-hidden="true"></div>\n';return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orowebsiteelasticsearch/templates/saved-search/notifications.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="",_.isObject(obj.typeState)&&_.keys(obj.typeState).length&&(__p+='\n<div data-role="notifications-list">\n <h5 class="saved-search__title">'+(null==(__t=_.__("oro.websiteelasticsearch.savedsearch.notifications.title"))?"":_.escape(__t))+'</h5>\n <table class="saved-search__notifications" role="presentation">\n <tbody>\n ',_.each(typeState,(function(e,t){__p+='\n <tr>\n <td class="saved-search__notifications-item">'+(null==(__t=_.__("oro.websiteelasticsearch.savedsearch.notifications."+t))?"":_.escape(__t))+':</td>\n <td class="saved-search__notifications-item has-offset-start">'+(null==(__t=_.__(e.checked?"Yes":"No"))?"":_.escape(__t))+"</td>\n </tr>\n "})),__p+="\n </tbody>\n </table>\n</div>\n"),__p+="\n";return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orowebsiteelasticsearch/templates/saved-search/update-entity.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+='<div class="saved-search-dropdown__item" data-role="entity">\n <div class="saved-search-dropdown__label">\n <span class="saved-search-dropdown__label-text line-clamp">'+(null==(__t=name)?"":_.escape(__t))+'</span>\n </div>\n <div class="saved-search-dropdown__actions">\n <ol class="actions-row" role="presentation">\n <li class="actions-row__item">\n <button class="btn btn--plain"\n type="button"\n data-role="edit-item"\n title="'+(null==(__t=_.__("Edit"))?"":_.escape(__t))+'"\n aria-label="'+(null==(__t=_.__("Edit"))?"":_.escape(__t))+" "+(null==(__t=name)?"":_.escape(__t))+'"\n >\n <span class="fa-pencil fa--no-offset" aria-hidden="true"></span>\n </button>\n </li>\n <li class="actions-row__item">\n <button class="btn btn--plain"\n type="button"\n data-role="delete-item"\n title="'+(null==(__t=_.__("Delete"))?"":_.escape(__t))+'"\n aria-label="'+(null==(__t=_.__("Delete"))?"":_.escape(__t))+" "+(null==(__t=name)?"":_.escape(__t))+'"\n >\n <span class="fa-trash fa--no-offset" aria-hidden="true"></span>\n </button>\n </li>\n </ol>\n </div>\n</div>\n';return __p}},"../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/pscatalog/templates/filter/pscategory-filter.html":(module,__unused_webpack_exports,__webpack_require__)=>{var _=__webpack_require__("./bundles/oroui/js/extend/underscore.js");module.exports=function(obj){var __t,__p="",__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,"")};with(obj||{})__p+="",obj.categoriesTemplate=function(e){_.each(e,(function(e){__p+='\n <span class="filter-criteria-selector-icon-wrap">\n <span class="filter-criteria-selector-icon fa-caret-down"></span>\n </span>\n <ul class="dropdown-menu--sublist" style="display: none">\n <ul class="ui-multiselect-checkboxes datagrid-manager__list ui-rewrite fixed-li">\n <li class="datagrid-manager__list-item">\n <label for="option-'+(null==(__t=e.id)?"":__t)+'" title="'+(null==(__t=e.title)?"":_.escape(__t))+'" class="custom-checkbox">\n <input name="value" type="checkbox" value="'+(null==(__t=e.id)?"":_.escape(__t))+'" title="'+(null==(__t=e.title)?"":_.escape(__t))+'" id="option-'+(null==(__t=e.id)?"":__t)+'" data-category-path="'+(null==(__t=e.categoryPath)?"":_.escape(__t))+'" data-parent-category-path="'+(null==(__t=e.parentCategoryPath)?"":_.escape(__t))+'" class="custom-checkbox__input">\n <i class="custom-checkbox__icon"></i>\n <span class="custom-checkbox__text">\n '+(null==(__t=e.title)?"":_.escape(__t))+"\n ",counts&&(__p+='\n (<span class="poducts-count">'+(null==(__t=isNaN(parseInt(counts[e.id]))?0:parseInt(counts[e.id]))?"":_.escape(__t))+"</span>)\n "),__p+="\n </span>\n </label>\n ",parseInt(e.hasSublist)>0&&(__p+="\n ",categoriesTemplate(e.childCategories),__p+="\n "),__p+="\n </li>\n </ul>\n </ul>\n "}))},__p+='\n\n<div class="filter-item--category">\n <div class="column column-1">\n ',_.each(categories,(function(e,t){__p+="\n ",Math.ceil(categories.length/2)===t&&(__p+='\n </div>\n <div class="column column-2">\n '),__p+='\n <ul class="ui-multiselect-checkboxes datagrid-manager__list ui-rewrite fixed-li">\n <li class="datagrid-manager__list-item">\n <label for="option-'+(null==(__t=e.id)?"":__t)+'" title="'+(null==(__t=e.title)?"":_.escape(__t))+'" class="ui-corner-all custom-checkbox">\n <input name="value" type="checkbox" value="'+(null==(__t=e.id)?"":__t)+'" title="'+(null==(__t=e.title)?"":_.escape(__t))+'" id="option-'+(null==(__t=e.id)?"":__t)+'" data-category-path="'+(null==(__t=e.categoryPath)?"":_.escape(__t))+'" data-parent-category-path="'+(null==(__t=e.parentCategoryPath)?"":_.escape(__t))+'" class="custom-checkbox__input">\n <i class="custom-checkbox__icon"></i>\n <span class="custom-checkbox__text">\n '+(null==(__t=e.title)?"":_.escape(__t))+"\n ",counts&&(__p+='\n (<span class="poducts-count">'+(null==(__t=isNaN(parseInt(counts[e.id]))?0:parseInt(counts[e.id]))?"":_.escape(__t))+"</span>)\n "),__p+="\n </span>\n </label>\n ",parseInt(e.hasSublist)>0&&(__p+="\n ",categoriesTemplate(e.childCategories),__p+="\n "),__p+="\n </li>\n </ul>\n "})),__p+="\n </div>\n</div>\n";return __p}},"../node_modules/backgrid/lib/backgrid.js":function(e,t,i){var s,n,o;o=this,s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/oroui/js/extend/backbone.js")],n=function(e,t){return o.Backgrid=function(e,t){"use strict";var i="\t\n\v\f\r Â áš€á Žâ€€â€â€‚         âŸã€€\u2028\u2029\ufeff";if(!String.prototype.trim||i.trim()){i="["+i+"]";var s=new RegExp("^"+i+i+"*"),n=new RegExp(i+i+"*$");String.prototype.trim=function(){if(null==this)throw new TypeError("can't convert "+this+" to object");return String(this).replace(s,"").replace(n,"")}}function o(e,t,i){var s=t-(e+"").length;s=s<0?0:s;for(var n="",o=0;o<s;o++)n+=i;return n+e}var r=t.$,a={Extension:{},resolveNameToClass:function(t,i){if(e.isString(t)){var s=e.map(t.split("-"),(function(e){return e.slice(0,1).toUpperCase()+e.slice(1)})).join("")+i,n=a[s]||a.Extension[s];if(e.isUndefined(n))throw new ReferenceError("Class '"+s+"' not found");return n}return t},callByNeed:function(){var t=arguments[0];if(!e.isFunction(t))return t;var i=arguments[1],s=[].slice.call(arguments,2);return t.apply(i,s+""?s:[])}};e.extend(a,t.Events);var l=a.Command=function(t){e.extend(this,{altKey:!!t.altKey,char:t.char,charCode:t.charCode,ctrlKey:!!t.ctrlKey,key:t.key,keyCode:t.keyCode,locale:t.locale,location:t.location,metaKey:!!t.metaKey,repeat:!!t.repeat,shiftKey:!!t.shiftKey,which:t.which})};e.extend(l.prototype,{moveUp:function(){return 38==this.keyCode},moveDown:function(){return 40===this.keyCode},moveLeft:function(){return this.shiftKey&&9===this.keyCode},moveRight:function(){return!this.shiftKey&&9===this.keyCode},save:function(){return 13===this.keyCode},cancel:function(){return 27===this.keyCode},passThru:function(){return!(this.moveUp()||this.moveDown()||this.moveLeft()||this.moveRight()||this.save()||this.cancel())}});var d=a.CellFormatter=function(){};e.extend(d.prototype,{fromRaw:function(e,t){return e},toRaw:function(e,t){return e}});var c=a.NumberFormatter=function(t){if(e.extend(this,this.defaults,t||{}),this.decimals<0||this.decimals>20)throw new RangeError("decimals must be between 0 and 20")};c.prototype=new d,e.extend(c.prototype,{defaults:{decimals:2,decimalSeparator:".",orderSeparator:","},HUMANIZED_NUM_RE:/(\d)(?=(?:\d{3})+$)/g,fromRaw:function(t,i){if(e.isNull(t)||e.isUndefined(t))return"";var s=(t=parseFloat(t).toFixed(~~this.decimals)).split("."),n=s[0],o=s[1]?(this.decimalSeparator||".")+s[1]:"";return n.replace(this.HUMANIZED_NUM_RE,"$1"+this.orderSeparator)+o},toRaw:function(t,i){if(""===(t=t.trim()))return null;for(var s="",n=t.split(this.orderSeparator),o=0;o<n.length;o++)s+=n[o];var r=s.split(this.decimalSeparator);for(s="",o=0;o<r.length;o++)s=s+r[o]+".";"."===s[s.length-1]&&(s=s.slice(0,s.length-1));var a=1*(1*s).toFixed(~~this.decimals);return e.isNumber(a)&&!e.isNaN(a)?a:void 0}});var u=a.PercentFormatter=function(){a.NumberFormatter.apply(this,arguments)};u.prototype=new a.NumberFormatter,e.extend(u.prototype,{defaults:e.extend({},c.prototype.defaults,{multiplier:1,symbol:"%"}),fromRaw:function(e,t){var i=[].slice.call(arguments,1);return i.unshift(e*this.multiplier),(c.prototype.fromRaw.apply(this,i)||"0")+this.symbol},toRaw:function(t,i){var s=t.split(this.symbol);if(s&&s[0]&&""===s[1]||null==s[1]){var n=c.prototype.toRaw.call(this,s[0]);return e.isUndefined(n)?n:n/this.multiplier}}});var h=a.DatetimeFormatter=function(t){if(e.extend(this,this.defaults,t||{}),!this.includeDate&&!this.includeTime)throw new Error("Either includeDate or includeTime must be true")};h.prototype=new d,e.extend(h.prototype,{defaults:{includeDate:!0,includeTime:!0,includeMilli:!1},DATE_RE:/^([+\-]?\d{4})-(\d{2})-(\d{2})$/,TIME_RE:/^(\d{2}):(\d{2}):(\d{2})(\.(\d{3}))?$/,ISO_SPLITTER_RE:/T|Z| +/,_convert:function(t,i){if(""===(t+"").trim())return null;var s,n=null;if(e.isNumber(t))s=o((d=new Date(t)).getUTCFullYear(),4,0)+"-"+o(d.getUTCMonth()+1,2,0)+"-"+o(d.getUTCDate(),2,0),n=o(d.getUTCHours(),2,0)+":"+o(d.getUTCMinutes(),2,0)+":"+o(d.getUTCSeconds(),2,0);else{var r=(t=t.trim()).split(this.ISO_SPLITTER_RE)||[];n=(s=this.DATE_RE.test(r[0])?r[0]:"")&&r[1]?r[1]:this.TIME_RE.test(r[0])?r[0]:""}var a=this.DATE_RE.exec(s)||[],l=this.TIME_RE.exec(n)||[];if(i){if(this.includeDate&&e.isUndefined(a[0]))return;if(this.includeTime&&e.isUndefined(l[0]))return;if(!this.includeDate&&s)return;if(!this.includeTime&&n)return}var d=new Date(Date.UTC(1*a[1]||0,1*a[2]-1||0,1*a[3]||0,1*l[1]||null,1*l[2]||null,1*l[3]||null,1*l[5]||null)),c="";return this.includeDate&&(c=o(d.getUTCFullYear(),4,0)+"-"+o(d.getUTCMonth()+1,2,0)+"-"+o(d.getUTCDate(),2,0)),this.includeTime&&(c=c+(this.includeDate?"T":"")+o(d.getUTCHours(),2,0)+":"+o(d.getUTCMinutes(),2,0)+":"+o(d.getUTCSeconds(),2,0),this.includeMilli&&(c=c+"."+o(d.getUTCMilliseconds(),3,0))),this.includeDate&&this.includeTime&&(c+="Z"),c},fromRaw:function(t,i){return e.isNull(t)||e.isUndefined(t)?"":this._convert(t)},toRaw:function(e,t){return this._convert(e,!0)}});var p=a.StringFormatter=function(){};p.prototype=new d,e.extend(p.prototype,{fromRaw:function(t,i){return e.isUndefined(t)||e.isNull(t)?"":t+""}});var _=a.EmailFormatter=function(){};_.prototype=new d,e.extend(_.prototype,{toRaw:function(t,i){var s=t.trim().split("@");if(2===s.length&&e.all(s))return t}});var g=a.SelectFormatter=function(){};g.prototype=new d,e.extend(g.prototype,{fromRaw:function(t,i){return e.isArray(t)?t:null!=t?[t]:[]}});var m=a.CellEditor=t.View.extend({initialize:function(e){this.formatter=e.formatter,this.column=e.column,this.column instanceof T||(this.column=new T(this.column)),this.listenTo(this.model,"backgrid:editing",this.postRender)},postRender:function(e,t){return null!=t&&t.get("name")!=this.column.get("name")||this.$el.focus(),this}}),f=a.InputCellEditor=m.extend({tagName:"input",attributes:{type:"text"},events:{blur:"saveOrCancel",keydown:"saveOrCancel"},initialize:function(e){f.__super__.initialize.apply(this,arguments),e.placeholder&&this.$el.attr("placeholder",e.placeholder)},render:function(){var e=this.model;return this.$el.val(this.formatter.fromRaw(e.get(this.column.get("name")),e)),this},saveOrCancel:function(t){var i=this.formatter,s=this.model,n=this.column,o=new l(t),r="blur"===t.type;if(o.moveUp()||o.moveDown()||o.moveLeft()||o.moveRight()||o.save()||r){t.preventDefault(),t.stopPropagation();var a=this.$el.val(),d=i.toRaw(a,s);e.isUndefined(d)?s.trigger("backgrid:error",s,n,a):(s.set(n.get("name"),d),s.trigger("backgrid:edited",s,n,o))}else o.cancel()&&(t.stopPropagation(),s.trigger("backgrid:edited",s,n,o))},postRender:function(e,t){if(null==t||t.get("name")==this.column.get("name"))if("right"===this.$el.css("text-align")){var i=this.$el.val();this.$el.focus().val(null).val(i)}else this.$el.focus();return this}}),b=a.Cell=t.View.extend({tagName:"td",formatter:d,editor:f,events:{click:"enterEditMode"},initialize:function(t){this.column=t.column,this.column instanceof T||(this.column=new T(this.column));var i=this.column,s=this.model,n=this.$el,o=a.resolveNameToClass(i.get("formatter")||this.formatter,"Formatter");e.isFunction(o.fromRaw)||e.isFunction(o.toRaw)||(o=new o),this.formatter=o,this.editor=a.resolveNameToClass(this.editor,"CellEditor"),this.listenTo(s,"change:"+i.get("name"),(function(){n.hasClass("editor")||this.render()})),this.listenTo(s,"backgrid:error",this.renderError),this.listenTo(i,"change:editable change:sortable change:renderable",(function(e){var t=e.changedAttributes();for(var i in t)t.hasOwnProperty(i)&&n.toggleClass(i,t[i])})),this.updateStateClassesMaybe()},updateStateClassesMaybe:function(){var e=this.model,t=this.column,i=this.$el;i.toggleClass("editable",a.callByNeed(t.editable(),t,e)),i.toggleClass("sortable",a.callByNeed(t.sortable(),t,e)),i.toggleClass("renderable",a.callByNeed(t.renderable(),t,e))},render:function(){var e=this.$el;e.empty();var t=this.model,i=this.column.get("name");return e.text(this.formatter.fromRaw(t.get(i),t)),e.addClass(i),this.updateStateClassesMaybe(),this.delegateEvents(),this},enterEditMode:function(){var e=this.model,t=this.column;a.callByNeed(t.editable(),t,e)&&(this.currentEditor=new this.editor({column:this.column,model:this.model,formatter:this.formatter}),e.trigger("backgrid:edit",e,t,this,this.currentEditor),this.undelegateEvents(),this.$el.empty(),this.$el.append(this.currentEditor.$el),this.currentEditor.render(),this.$el.addClass("editor"),e.trigger("backgrid:editing",e,t,this,this.currentEditor))},renderError:function(e,t){null!=t&&t.get("name")!=this.column.get("name")||this.$el.addClass("error")},exitEditMode:function(){this.$el.removeClass("error"),this.currentEditor.remove(),this.stopListening(this.currentEditor),delete this.currentEditor,this.$el.removeClass("editor"),this.render()},remove:function(){return this.currentEditor&&(this.currentEditor.remove.apply(this.currentEditor,arguments),delete this.currentEditor),b.__super__.remove.apply(this,arguments)}}),v=a.StringCell=b.extend({className:"string-cell",formatter:p}),w=a.UriCell=b.extend({className:"uri-cell",title:null,target:"_blank",initialize:function(e){w.__super__.initialize.apply(this,arguments),this.title=e.title||this.title,this.target=e.target||this.target},render:function(){this.$el.empty();var e=this.model.get(this.column.get("name")),t=this.formatter.fromRaw(e,this.model);return this.$el.append(r("<a>",{tabIndex:-1,href:e,title:this.title||t,target:this.target}).text(t)),this.delegateEvents(),this}}),j=(a.EmailCell=v.extend({className:"email-cell",formatter:_,render:function(){this.$el.empty();var e=this.model,t=this.formatter.fromRaw(e.get(this.column.get("name")),e);return this.$el.append(r("<a>",{tabIndex:-1,href:"mailto:"+t,title:t}).text(t)),this.delegateEvents(),this}}),a.NumberCell=b.extend({className:"number-cell",decimals:c.prototype.defaults.decimals,decimalSeparator:c.prototype.defaults.decimalSeparator,orderSeparator:c.prototype.defaults.orderSeparator,formatter:c,initialize:function(e){j.__super__.initialize.apply(this,arguments);var t=this.formatter;t.decimals=this.decimals,t.decimalSeparator=this.decimalSeparator,t.orderSeparator=this.orderSeparator}})),C=(a.IntegerCell=j.extend({className:"integer-cell",decimals:0}),a.PercentCell=j.extend({className:"percent-cell",multiplier:u.prototype.defaults.multiplier,symbol:u.prototype.defaults.symbol,formatter:u,initialize:function(){C.__super__.initialize.apply(this,arguments);var e=this.formatter;e.multiplier=this.multiplier,e.symbol=this.symbol}})),y=a.DatetimeCell=b.extend({className:"datetime-cell",includeDate:h.prototype.defaults.includeDate,includeTime:h.prototype.defaults.includeTime,includeMilli:h.prototype.defaults.includeMilli,formatter:h,initialize:function(t){y.__super__.initialize.apply(this,arguments);var i=this.formatter;i.includeDate=this.includeDate,i.includeTime=this.includeTime,i.includeMilli=this.includeMilli;var s=this.includeDate?"YYYY-MM-DD":"";s+=this.includeDate&&this.includeTime?"T":"",s+=this.includeTime?"HH:mm:ss":"",s+=this.includeTime&&this.includeMilli?".SSS":"",this.editor=this.editor.extend({attributes:e.extend({},this.editor.prototype.attributes,this.editor.attributes,{placeholder:s})})}}),x=(a.DateCell=y.extend({className:"date-cell",includeTime:!1}),a.TimeCell=y.extend({className:"time-cell",includeDate:!1}),a.BooleanCellEditor=m.extend({tagName:"input",attributes:{tabIndex:-1,type:"checkbox"},events:{mousedown:function(){this.mouseDown=!0},blur:"enterOrExitEditMode",mouseup:function(){this.mouseDown=!1},change:"saveOrCancel",keydown:"saveOrCancel"},render:function(){var e=this.model,t=this.formatter.fromRaw(e.get(this.column.get("name")),e);return this.$el.prop("checked",t),this},enterOrExitEditMode:function(e){if(!this.mouseDown){var t=this.model;t.trigger("backgrid:edited",t,this.column,new l(e))}},saveOrCancel:function(e){var t=this.model,i=this.column,s=this.formatter,n=new l(e);if(n.passThru()&&"change"!=e.type)return!0;n.cancel()&&(e.stopPropagation(),t.trigger("backgrid:edited",t,i,n));var o=this.$el;if(n.save()||n.moveLeft()||n.moveRight()||n.moveUp()||n.moveDown()){e.preventDefault(),e.stopPropagation();var r=s.toRaw(o.prop("checked"),t);t.set(i.get("name"),r),t.trigger("backgrid:edited",t,i,n)}else"change"==e.type&&(r=s.toRaw(o.prop("checked"),t),t.set(i.get("name"),r),o.focus())}})),k=(a.BooleanCell=b.extend({className:"boolean-cell",editor:x,events:{click:"enterEditMode"},render:function(){this.$el.empty();var e=this.model,t=this.column,i=a.callByNeed(t.editable(),t,e);return this.$el.append(r("<input>",{tabIndex:-1,type:"checkbox",checked:this.formatter.fromRaw(e.get(t.get("name")),e),disabled:!i})),this.delegateEvents(),this}}),a.SelectCellEditor=m.extend({tagName:"select",events:{change:"save",blur:"close",keydown:"close"},template:e.template('<option value="<%- value %>" <%= selected ? \'selected="selected"\' : "" %>><%- text %></option>',null,{variable:null,evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g}),setOptionValues:function(t){this.optionValues=t,this.optionValues=e.result(this,"optionValues")},setMultiple:function(e){this.multiple=e,this.$el.prop("multiple",e)},_renderOptions:function(t,i){for(var s="",n=0;n<t.length;n++)s+=this.template({text:t[n][0],value:t[n][1],selected:e.indexOf(i,t[n][1])>-1});return s},render:function(){this.$el.empty();var t=e.result(this,"optionValues"),i=this.model,s=this.formatter.fromRaw(i.get(this.column.get("name")),i);if(!e.isArray(t))throw new TypeError("optionValues must be an array");for(var n=null,o=null,a=(n=null,null),l=null,d=0;d<t.length;d++)if(n=t[d],e.isArray(n))o=n[0],n=n[1],this.$el.append(this.template({text:o,value:n,selected:e.indexOf(s,n)>-1}));else{if(!e.isObject(n))throw new TypeError("optionValues elements must be a name-value pair or an object hash of { name: 'optgroup label', value: [option name-value pairs] }");a=n.name,(l=r("<optgroup></optgroup>",{label:a})).append(this._renderOptions.call(this,n.values,s)),this.$el.append(l)}return this.delegateEvents(),this},save:function(e){var t=this.model,i=this.column;t.set(i.get("name"),this.formatter.toRaw(this.$el.val(),t))},close:function(e){var t=this.model,i=this.column,s=new l(e);s.cancel()?(e.stopPropagation(),t.trigger("backgrid:edited",t,i,new l(e))):(s.save()||s.moveLeft()||s.moveRight()||s.moveUp()||s.moveDown()||"blur"==e.type)&&(e.preventDefault(),e.stopPropagation(),this.save(e),t.trigger("backgrid:edited",t,i,new l(e)))}})),S=a.SelectCell=b.extend({className:"select-cell",editor:k,multiple:!1,formatter:g,optionValues:void 0,delimiter:", ",initialize:function(e){S.__super__.initialize.apply(this,arguments),this.listenTo(this.model,"backgrid:edit",(function(e,t,i,s){t.get("name")==this.column.get("name")&&(s.setOptionValues(this.optionValues),s.setMultiple(this.multiple))}))},render:function(){this.$el.empty();var t=e.result(this,"optionValues"),i=this.model,s=this.formatter.fromRaw(i.get(this.column.get("name")),i),n=[];try{if(!e.isArray(t)||e.isEmpty(t))throw new TypeError;for(var o=0;o<s.length;o++)for(var r=s[o],a=0;a<t.length;a++){var l=t[a];if(e.isArray(l)){var d=l[0];(l=l[1])==r&&n.push(d)}else{if(!e.isObject(l))throw new TypeError;for(var c=l.values,u=0;u<c.length;u++){var h=c[u];h[1]==r&&n.push(h[0])}}}this.$el.append(n.join(this.delimiter))}catch(e){if(e instanceof TypeError)throw new TypeError("'optionValues' must be of type {Array.<Array>|Array.<{name: string, values: Array.<Array>}>}");throw e}return this.delegateEvents(),this}}),T=a.Column=t.Model.extend({defaults:{name:void 0,label:void 0,sortable:!0,editable:!0,renderable:!0,formatter:void 0,sortType:"cycle",sortValue:void 0,direction:null,cell:void 0,headerCell:void 0},initialize:function(){this.has("label")||this.set({label:this.get("name")},{silent:!0});var e=a.resolveNameToClass(this.get("headerCell"),"HeaderCell"),t=a.resolveNameToClass(this.get("cell"),"Cell");this.set({cell:t,headerCell:e},{silent:!0})},sortValue:function(){var t=this.get("sortValue");return e.isString(t)?this[t]:e.isFunction(t)?t:function(e,t){return e.get(t)}}});e.each(["sortable","renderable","editable"],(function(t){T.prototype[t]=function(){var i=this.get(t);return e.isString(i)?this[i]:e.isFunction(i)?i:!!i}}));var E=a.Columns=t.Collection.extend({model:T}),V=a.Row=t.View.extend({tagName:"tr",initialize:function(e){var i=this.columns=e.columns;i instanceof t.Collection||(i=this.columns=new E(i));for(var s=this.cells=[],n=0;n<i.length;n++)s.push(this.makeCell(i.at(n),e));this.listenTo(i,"add",(function(t,i){var n=i.indexOf(t),o=this.makeCell(t,e);s.splice(n,0,o);var r=this.$el;0===n?r.prepend(o.render().$el):n===i.length-1?r.append(o.render().$el):r.children().eq(n).before(o.render().$el)})),this.listenTo(i,"remove",(function(e,t,i){s[i.index].remove(),s.splice(i.index,1)}))},makeCell:function(e){return new(e.get("cell"))({column:e,model:this.model})},render:function(){this.$el.empty();for(var e=document.createDocumentFragment(),t=0;t<this.cells.length;t++)e.appendChild(this.cells[t].render().el);return this.el.appendChild(e),this.delegateEvents(),this},remove:function(){for(var e=0;e<this.cells.length;e++){var i=this.cells[e];i.remove.apply(i,arguments)}return t.View.prototype.remove.apply(this,arguments)}}),D=a.EmptyRow=t.View.extend({tagName:"tr",emptyText:null,initialize:function(e){this.emptyText=e.emptyText,this.columns=e.columns},render:function(){this.$el.empty();var t=document.createElement("td");t.setAttribute("colspan",this.columns.length);var i=document.createElement("span");return i.innerHTML=e.result(this,"emptyText"),t.appendChild(i),this.el.className="empty",this.el.appendChild(t),this}}),M=a.HeaderCell=t.View.extend({tagName:"th",events:{"click button":"onClick"},initialize:function(e){this.column=e.column,this.column instanceof T||(this.column=new T(this.column));var t=this.column,i=this.collection,s=this.$el;this.listenTo(t,"change:editable change:sortable change:renderable",(function(e){var t=e.changedAttributes();for(var i in t)t.hasOwnProperty(i)&&s.toggleClass(i,t[i])})),this.listenTo(t,"change:direction",this.setCellDirection),this.listenTo(t,"change:name change:label",this.render),a.callByNeed(t.editable(),t,i)&&s.addClass("editable"),a.callByNeed(t.sortable(),t,i)&&s.addClass("sortable"),a.callByNeed(t.renderable(),t,i)&&s.addClass("renderable"),this.listenTo(i.fullCollection||i,"backgrid:sorted",this.removeCellDirection)},removeCellDirection:function(){this.$el.removeClass("ascending").removeClass("descending"),this.column.set("direction",null)},setCellDirection:function(e,t){this.$el.removeClass("ascending").removeClass("descending"),e.cid==this.column.cid&&this.$el.addClass(t)},onClick:function(e){e.preventDefault();var t,i=this.column,s=this.collection,n="backgrid:sort";a.callByNeed(i.sortable(),i,this.collection)&&("toggle"===i.get("sortType")?(t=i,"ascending"===i.get("direction")?s.trigger(n,t,"descending"):s.trigger(n,t,"ascending")):function(e,t){"ascending"===i.get("direction")?s.trigger(n,t,"descending"):"descending"===i.get("direction")?s.trigger(n,t,null):s.trigger(n,t,"ascending")}(0,i))},render:function(){this.$el.empty();var e,t=this.column;return e=a.callByNeed(t.sortable(),t,this.collection)?r("<button>").text(t.get("label")).append("<span class='sort-caret' aria-hidden='true'></span>"):document.createTextNode(t.get("label")),this.$el.append(e),this.$el.addClass(t.get("name")),this.$el.addClass(t.get("direction")),this.delegateEvents(),this}}),A=(a.HeaderRow=a.Row.extend({initialize:function(){a.Row.prototype.initialize.apply(this,arguments)},makeCell:function(e,t){var i=e.get("headerCell")||t.headerCell||M;return new i({column:e,collection:this.collection})}}),a.Header=t.View.extend({tagName:"thead",initialize:function(e){this.columns=e.columns,this.columns instanceof t.Collection||(this.columns=new E(this.columns)),this.row=new a.HeaderRow({columns:this.columns,collection:this.collection})},render:function(){return this.$el.append(this.row.render().$el),this.delegateEvents(),this},remove:function(){return this.row.remove.apply(this.row,arguments),t.View.prototype.remove.apply(this,arguments)}})),O=a.Body=t.View.extend({tagName:"tbody",initialize:function(e){this.columns=e.columns,this.columns instanceof t.Collection||(this.columns=new E(this.columns)),this.row=e.row||this.row||V,this.rows=this.collection.map((function(e){return new this.row({columns:this.columns,model:e})}),this),this.emptyText=e.emptyText,this._unshiftEmptyRowMayBe();var i=this.collection;this.listenTo(i,"add",this.insertRow),this.listenTo(i,"remove",this.removeRow),this.listenTo(i,"sort",this.refresh),this.listenTo(i,"reset",this.refresh),this.listenTo(i,"backgrid:sort",this.sort),this.listenTo(i,"backgrid:edited",this.moveToNextCell),this.listenTo(this.columns,"add remove",this.updateEmptyRow)},_unshiftEmptyRowMayBe:function(){if(0===this.rows.length&&null!=this.emptyText)return this.emptyRow=new D({emptyText:this.emptyText,columns:this.columns}),this.rows.unshift(this.emptyRow),!0},insertRow:function(e,i,s){if(this.rows[0]instanceof D&&this.rows.pop().remove(),i instanceof t.Collection||s){var n=new this.row({columns:this.columns,model:e}),o=i.indexOf(e);this.rows.splice(o,0,n);var r=this.$el,a=r.children(),l=n.render().$el;return o>=a.length?r.append(l):a.eq(o).before(l),this}this.collection.add(e,s=i)},removeRow:function(t,i,s){return s?((e.isUndefined(s.render)||s.render)&&this.rows[s.index].remove(),this.rows.splice(s.index,1),this._unshiftEmptyRowMayBe()&&this.render(),this):(this.collection.remove(t,s=i),void(this._unshiftEmptyRowMayBe()&&this.render()))},updateEmptyRow:function(){null!=this.emptyRow&&this.emptyRow.render()},refresh:function(){for(var e=0;e<this.rows.length;e++)this.rows[e].remove();return this.rows=this.collection.map((function(e){return new this.row({columns:this.columns,model:e})}),this),this._unshiftEmptyRowMayBe(),this.render(),this.collection.trigger("backgrid:refresh",this),this},render:function(){this.$el.empty();for(var e=document.createDocumentFragment(),t=0;t<this.rows.length;t++){var i=this.rows[t];e.appendChild(i.render().el)}return this.el.appendChild(e),this.delegateEvents(),this},remove:function(){for(var e=0;e<this.rows.length;e++){var i=this.rows[e];i.remove.apply(i,arguments)}return t.View.prototype.remove.apply(this,arguments)},sort:function(i,s){if(!e.contains(["ascending","descending",null],s))throw new RangeError('direction must be one of "ascending", "descending" or `null`');e.isString(i)&&(i=this.columns.findWhere({name:i}));var n,o=this.collection;n="ascending"===s?-1:"descending"===s?1:null;var r=this.makeComparator(i.get("name"),n,n?i.sortValue():function(e){return 1*e.cid.replace("c","")});return t.PageableCollection&&o instanceof t.PageableCollection?(o.setSorting(n&&i.get("name"),n,{sortValue:i.sortValue()}),o.fullCollection?(null==o.fullCollection.comparator&&(o.fullCollection.comparator=r),o.fullCollection.sort(),o.trigger("backgrid:sorted",i,s,o),i.set("direction",s)):o.fetch({reset:!0,success:function(){o.trigger("backgrid:sorted",i,s,o),i.set("direction",s)}})):(o.comparator=r,o.sort(),o.trigger("backgrid:sorted",i,s,o),i.set("direction",s)),this},makeComparator:function(e,t,i){return function(s,n){var o,r=i(s,e),a=i(n,e);return 1===t&&(o=r,r=a,a=o),r===a?0:r<a?-1:1}},moveToNextCell:function(e,t,i){var s,n,o,r,l,d=this.collection.indexOf(e),c=this.columns.indexOf(t);if(-1===c)return this;if(this.rows[d].cells[c].exitEditMode(),i.moveUp()||i.moveDown()||i.moveLeft()||i.moveRight()||i.save()){var u=this.columns.length,h=u*this.collection.length;if(i.moveUp()||i.moveDown()){r=d+(i.moveUp()?-1:1);var p=this.rows[r];p?(s=p.cells[c],a.callByNeed(s.column.editable(),s.column,e)&&(s.enterEditMode(),e.trigger("backgrid:next",r,c,!1))):e.trigger("backgrid:next",r,c,!0)}else if(i.moveLeft()||i.moveRight()){for(var _=i.moveRight(),g=d*u+c+(_?1:-1);g>=0&&g<h;_?g++:g--)if(l=g-(r=~~(g/u))*u,s=this.rows[r].cells[l],n=a.callByNeed(s.column.renderable(),s.column,s.model),o=a.callByNeed(s.column.editable(),s.column,e),n&&o){s.enterEditMode(),e.trigger("backgrid:next",r,l,!1);break}g==h&&e.trigger("backgrid:next",~~(g/u),g-r*u,!0)}}return this}});return a.Footer=t.View.extend({tagName:"tfoot",initialize:function(e){this.columns=e.columns,this.columns instanceof t.Collection||(this.columns=new a.Columns(this.columns))}}),a.Grid=t.View.extend({tagName:"table",className:"backgrid",header:A,body:O,footer:null,initialize:function(i){i.columns instanceof t.Collection||(i.columns=new E(i.columns||this.columns)),this.columns=i.columns,this.caption=i.caption;var s=e.omit(i,["el","id","attributes","className","tagName","events"]);this.body=i.body||this.body,this.body=new this.body(s),this.header=i.header||this.header,this.header&&(this.header=new this.header(s)),this.footer=i.footer||this.footer,this.footer&&(this.footer=new this.footer(s)),this.listenTo(this.columns,"reset",(function(){this.header&&(this.header=new(this.header.remove().constructor)(s)),this.body=new(this.body.remove().constructor)(s),this.footer&&(this.footer=new(this.footer.remove().constructor)(s)),this.render()}))},insertRow:function(){return this.body.insertRow.apply(this.body,arguments),this},removeRow:function(){return this.body.removeRow.apply(this.body,arguments),this},insertColumn:function(){return this.columns.add.apply(this.columns,arguments),this},removeColumn:function(){return this.columns.remove.apply(this.columns,arguments),this},sort:function(){return this.body.sort.apply(this.body,arguments),this},render:function(){return this.$el.empty(),this.caption&&this.$el.append(r("<caption>").text(this.caption)),this.header&&this.$el.append(this.header.render().$el),this.footer&&this.$el.append(this.footer.render().$el),this.$el.append(this.body.render().$el),this.delegateEvents(),this.trigger("backgrid:rendered",this),this},remove:function(){return this.header&&this.header.remove.apply(this.header,arguments),this.body.remove.apply(this.body,arguments),this.footer&&this.footer.remove.apply(this.footer,arguments),t.View.prototype.remove.apply(this,arguments)}}),a}(e,t)}.apply(t,s),void 0===n||(e.exports=n)},"../node_modules/jquery-ui-multiselect-widget/src/jquery.multiselect.filter.min.js":(e,t,i)=>{var s,n,o=i("./bundles/oroui/js/extend/jquery.js");n=/[\-\[\]{}()*+?.,\\\^$|#\s]/g,(s=o).widget("ech.multiselectfilter",{options:{label:"Filter:",width:null,placeholder:"Enter keywords",autoReset:!1,debounceMS:250},_create:function(){var e,t,i,n=this.options,o=s(this.element);this.instance=o.multiselect("instance"),this.header=this.instance.menu.find(".ui-multiselect-header").addClass("ui-multiselect-hasfilter"),this.input=s("<input/>").attr({placeholder:n.placeholder,type:"search"}).css({width:/\d/.test(n.width)?n.width+"px":null}).bind({keydown:function(e){if(13===e.which)e.preventDefault();else if(27===e.which)o.multiselect("close"),e.preventDefault();else if(9===e.which&&e.shiftKey)o.multiselect("close"),e.preventDefault();else if(e.altKey)switch(e.which){case 82:e.preventDefault(),s(this).val("").trigger("input","");break;case 65:o.multiselect("checkAll");break;case 85:o.multiselect("uncheckAll");break;case 76:o.multiselect("instance").labels.first().trigger("mouseenter")}},input:s.proxy((e=this._handler,t=n.debounceMS,function(){var s=this,n=arguments;clearTimeout(i),i=setTimeout((function(){i=null,e.apply(s,n)}),t)}),this),search:s.proxy(this._handler,this)}),this.options.autoReset&&o.bind("multiselectclose",s.proxy(this._reset,this)),o.bind("multiselectrefresh",s.proxy((function(){this.updateCache(),this._handler()}),this)),this.wrapper=s("<div/>").addClass("ui-multiselect-filter").text(n.label).append(this.input).prependTo(this.header),this.inputs=this.instance.menu.find('input[type="checkbox"], input[type="radio"]'),this.updateCache(),this.instance._toggleChecked=function(e,t){var i=t&&t.length?t:this.labels.find("input"),s=this,n=s._isOpen?":disabled, :hidden":":disabled";i=i.not(n).each(this._toggleState("checked",e)),this.update();var o={};i.each((function(){o[this.value]=!0})),this.element.find("option").filter((function(){!this.disabled&&o[this.value]&&s._toggleState("selected",e).call(this)})),i.length&&this.element.trigger("change")}},_handler:function(e){var t=s.trim(this.input[0].value.toLowerCase()),i=this.rows,o=this.inputs,r=this.cache,a=this.instance.menu.find(".ui-multiselect-optgroup");if(a.show(),t){i.hide();var l=new RegExp(t.replace(n,"\\$&"),"gi");this._trigger("filter",e,s.map(r,(function(e,t){return-1!==e.search(l)?(i.eq(t).show(),o.get(t)):null})))}else i.show();a.each((function(){var e=s(this);e.children("li:visible").length||e.hide()})),this.instance._setMenuHeight()},_reset:function(){this.input.val("").trigger("input","")},updateCache:function(){this.rows=this.instance.labels.parent(),this.cache=this.element.children().map((function(){var e=s(this);return"optgroup"===this.tagName.toLowerCase()&&(e=e.children()),e.map((function(){return this.innerHTML.toLowerCase()})).get()})).get()},widget:function(){return this.wrapper},destroy:function(){s.Widget.prototype.destroy.call(this),this.input.val("").trigger("keyup"),this.wrapper.remove()}})},"../node_modules/jquery-ui-multiselect-widget/src/jquery.multiselect.min.js":(e,t,i)=>{var s,n,o,r=i("./bundles/oroui/js/extend/jquery.js");n=0,o=(s=r)(document),s.widget("ech.multiselect",{options:{header:!0,height:175,minWidth:225,classes:"",checkAllText:"Check all",uncheckAllText:"Uncheck all",noneSelectedText:"Select options",showCheckAll:!0,showUncheckAll:!0,selectedText:"# selected",selectedList:0,closeIcon:"ui-icon-circle-close",show:null,hide:null,autoOpen:!1,multiple:!0,position:{},appendTo:null,menuWidth:null,selectedListSeparator:", ",disableInputsOnToggle:!0,groupColumns:!1},_getAppendEl:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?s(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_create:function(){var e=this.element,t=this.options;this.speed=s.fx.speeds._default,this._isOpen=!1,this.inputIdCounter=0,this._namespaceID=this.eventNamespace||"multiselect"+n,this.multiselectID=n++;var i=(this.button=s('<button type="button"><span class="ui-icon ui-icon-triangle-1-s"></span></button>')).addClass("ui-multiselect ui-widget ui-state-default ui-corner-all").addClass(t.classes).attr({title:e.attr("title"),tabIndex:e.attr("tabIndex"),id:e.attr("id")?e.attr("id")+"_ms":null}).prop("aria-haspopup",!0).insertAfter(e);this.buttonlabel=s("<span />").html(t.noneSelectedText).appendTo(i),this.menu=s("<div />").addClass("ui-multiselect-menu ui-widget ui-widget-content ui-corner-all").addClass(t.classes).appendTo(this._getAppendEl()),this.header=s("<div />").addClass("ui-widget-header ui-corner-all ui-multiselect-header ui-helper-clearfix").appendTo(this.menu),this.headerLinkContainer=s("<ul />").addClass("ui-helper-reset").html((function(){if(!0===t.header){var e="";return t.showCheckAll&&(e='<li><a class="ui-multiselect-all" href="#"><span class="ui-icon ui-icon-check"></span><span>'+t.checkAllText+"</span></a></li>"),t.showUncheckAll&&(e+='<li><a class="ui-multiselect-none" href="#"><span class="ui-icon ui-icon-closethick"></span><span>'+t.uncheckAllText+"</span></a></li>"),e}return"string"==typeof t.header?"<li>"+t.header+"</li>":""})).append('<li class="ui-multiselect-close"><a href="#" class="ui-multiselect-close"><span class="ui-icon '+t.closeIcon+'"></span></a></li>').appendTo(this.header),(this.checkboxContainer=s("<ul />")).addClass("ui-multiselect-checkboxes ui-helper-reset").appendTo(this.menu),this._bindEvents(),this.refresh(!0),t.multiple||this.menu.addClass("ui-multiselect-single"),e.hide()},_init:function(){!1===this.options.header&&this.header.hide(),this.options.multiple?this.headerLinkContainer.find(".ui-multiselect-all, .ui-multiselect-none").show():this.headerLinkContainer.find(".ui-multiselect-all, .ui-multiselect-none").hide(),this.options.autoOpen&&this.open(),this.element.is(":disabled")&&this.disable()},_makeOption:function(e){var t=e.title?e.title:null,i=e.value,n=this.element.attr("id")||this.multiselectID,o="ui-multiselect-"+this.multiselectID+"-"+(e.id||n+"-option-"+this.inputIdCounter++),r=e.disabled,a=e.selected,l=["ui-corner-all"],d=[],c=this.options;r&&(d.push("ui-multiselect-disabled"),l.push("ui-state-disabled")),e.className&&d.push(e.className),a&&!c.multiple&&l.push("ui-state-active");var u=s("<li/>").addClass(d.join(" ")),h=s("<label/>").attr({for:o,title:t}).addClass(l.join(" ")).appendTo(u);return s("<input/>").attr({name:"multiselect_"+n,type:c.multiple?"checkbox":"radio",value:i,title:t,id:o,checked:a?"checked":null,"aria-selected":a?"true":null,disabled:r?"disabled":null,"aria-disabled":r?"true":null}).data(s(e).data()).appendTo(h),s("<span/>").text(s(e).text()).appendTo(h),u},_buildOptionList:function(e,t){var i=this;e.children().each((function(){var e=s(this);if("OPTGROUP"===this.tagName){var n=s("<ul/>").addClass("ui-multiselect-optgroup "+this.className).appendTo(t);i.options.groupColumns&&n.addClass("ui-multiselect-columns"),s("<a/>").text(this.getAttribute("label")).appendTo(n),i._buildOptionList(e,n)}else i._makeOption(this).appendTo(t)}))},refresh:function(e){var t=this.element,i=(this.options,this.menu),n=(this.checkboxContainer,s("<ul/>").addClass("ui-multiselect-checkboxes ui-helper-reset"));this.inputIdCounter=0,this.options.header&&(this.options.multiple?this.headerLinkContainer.find(".ui-multiselect-all, .ui-multiselect-none").show():this.headerLinkContainer.find(".ui-multiselect-all, .ui-multiselect-none").hide()),this._buildOptionList(t,n),this.menu.find(".ui-multiselect-checkboxes").remove(),this.menu.append(n),this.labels=i.find("label"),this.inputs=this.labels.children("input"),this._setButtonWidth(),this.update(!0),e||this._trigger("refresh")},update:function(e){var t,i=this.options,n=this.inputs,o=n.filter(":checked"),r=o.length;t=0===r?i.noneSelectedText:s.isFunction(i.selectedText)?i.selectedText.call(this,r,n.length,o.get()):/\d/.test(i.selectedList)&&i.selectedList>0&&r<=i.selectedList?o.map((function(){return s(this).next().text()})).get().join(i.selectedListSeparator):i.selectedText.replace("#",r).replace("#",n.length),this._setButtonValue(t),e&&(this.button[0].defaultValue=t)},_setButtonValue:function(e){this.buttonlabel.text(e)},_bindButtonEvents:function(){var e=this,t=this.button;function i(){return e[e._isOpen?"close":"open"](),!1}t.find("span").bind("click.multiselect",i),t.bind({click:i,keypress:function(t){switch(t.which){case 27:case 38:case 37:e.close();break;case 39:case 40:e.open()}},mouseenter:function(){t.hasClass("ui-state-disabled")||s(this).addClass("ui-state-hover")},mouseleave:function(){s(this).removeClass("ui-state-hover")},focus:function(){t.hasClass("ui-state-disabled")||s(this).addClass("ui-state-focus")},blur:function(){s(this).removeClass("ui-state-focus")}})},_bindMenuEvents:function(){var e=this;this.menu.delegate(".ui-multiselect-optgroup a","click.multiselect",(function(t){t.preventDefault();var i=s(this),n=i.parent().find("input:visible:not(:disabled)"),o=n.get(),r=i.text();!1!==e._trigger("beforeoptgrouptoggle",t,{inputs:o,label:r})&&(e._toggleChecked(n.filter(":checked").length!==n.length,n),e._trigger("optgrouptoggle",t,{inputs:o,label:r,checked:o.length?o[0].checked:null}))})).delegate("label","mouseenter.multiselect",(function(){s(this).hasClass("ui-state-disabled")||(e.labels.removeClass("ui-state-hover"),s(this).addClass("ui-state-hover").find("input").focus())})).delegate("label","keydown.multiselect",(function(t){if(82!==t.which&&!(t.which>111&&t.which<124))switch(t.preventDefault(),t.which){case 9:t.shiftKey?(e.menu.find(".ui-state-hover").removeClass("ui-state-hover"),e.header.find("li").last().find("a").focus()):e.close();break;case 27:e.close();break;case 38:case 40:case 37:case 39:e._traverse(t.which,this);break;case 13:case 32:s(this).find("input")[0].click();break;case 65:t.altKey&&e.checkAll();break;case 85:t.altKey&&e.uncheckAll()}})).delegate('input[type="checkbox"], input[type="radio"]',"click.multiselect",(function(t){var i=s(this),n=this.value,o=i.parent().find("span").text(),r=this.checked,a=e.element.find("option");this.disabled||!1===e._trigger("click",t,{value:n,text:o,checked:r})?t.preventDefault():(i.focus(),i.prop("aria-selected",r),a.each((function(){this.value===n?this.selected=r:e.options.multiple||(this.selected=!1)})),e.options.multiple||(e.labels.removeClass("ui-state-active"),i.closest("label").toggleClass("ui-state-active",r),e.close()),e.element.trigger("change"),setTimeout(s.proxy(e.update,e),10))}))},_bindHeaderEvents:function(){var e=this;this.header.delegate("a","click.multiselect",(function(t){var i=s(this);i.hasClass("ui-multiselect-close")?e.close():i.hasClass("ui-multiselect-all")?e.checkAll():i.hasClass("ui-multiselect-none")&&e.uncheckAll(),t.preventDefault()})).delegate("a","keydown.multiselect",(function(t){switch(t.which){case 27:e.close();break;case 9:var i=s(t.target);(!t.shiftKey||i.parent().prev().length||e.header.find(".ui-multiselect-filter").length)&&(i.parent().next().length||e.labels.length||t.shiftKey)||(e.close(),t.preventDefault())}}))},_bindEvents:function(){var e=this;this._bindButtonEvents(),this._bindMenuEvents(),this._bindHeaderEvents(),o.bind("mousedown."+e._namespaceID,(function(t){var i=t.target;!e._isOpen||i===e.button[0]||i===e.menu[0]||s.contains(e.menu[0],i)||s.contains(e.button[0],i)||e.close()})),s(this.element[0].form).bind("reset."+this._namespaceID,(function(){setTimeout(s.proxy(e.refresh,e),10)}))},_getMinWidth:function(){var e=this.options.minWidth,t=0;switch(typeof e){case"number":t=e;break;case"string":var i=e[e.length-1];t=e.match(/\d+/),t="%"===i?this.element.parent().outerWidth()*(t/100):parseInt(e,10)}return t},_setButtonWidth:function(){var e=this.element.outerWidth(),t=this._getMinWidth();e<t&&(e=t),this.button.outerWidth(e)},_setMenuWidth:function(){var e=this.menu,t=this.button.outerWidth()<=0?this._getMinWidth():this.button.outerWidth();e.outerWidth(this.options.menuWidth||t)},_setMenuHeight:function(){var e=this.menu.children(".ui-multiselect-header:visible").outerHeight(!0),t=0;this.menu.find(".ui-multiselect-checkboxes li, .ui-multiselect-checkboxes a").each((function(e,i){t+=s(i).outerHeight(!0)})),t>this.options.height?(this.menu.children(".ui-multiselect-checkboxes").css("overflow","auto"),t=this.options.height):this.menu.children(".ui-multiselect-checkboxes").css("overflow","hidden"),this.menu.children(".ui-multiselect-checkboxes").height(t),this.menu.height(t+e)},_resizeMenu:function(){this._setMenuWidth(),this._setMenuHeight()},_traverse:function(e,t){var i=s(t),n=38===e||37===e,o=i.parent()[n?"prevAll":"nextAll"]("li:not(.ui-multiselect-disabled, .ui-multiselect-optgroup):visible").first();if(o.length||(o=i.parents(".ui-multiselect-optgroup")[n?"prev":"next"]()),o.length)o.find("label:visible")[n?"last":"first"]().trigger("mouseover");else{var r=this.menu.find("ul").last();this.menu.find("label:visible")[n?"last":"first"]().trigger("mouseover"),r.scrollTop(n?r.height():0)}},_toggleState:function(e,t){return function(){this.disabled||(this[e]=t),t?this.setAttribute("aria-selected",!0):this.removeAttribute("aria-selected")}},_toggleChecked:function(e,t){var i=t&&t.length?t:this.inputs,s=this;i.each(this._toggleState("checked",e)),i.eq(0).focus(),this.update();var n={};i.each((function(){n[this.value]=!0})),this.element.find("option").each((function(){!this.disabled&&n[this.value]&&s._toggleState("selected",e).call(this)})),i.length&&this.element.trigger("change")},_toggleDisabled:function(e){if(this.button.prop({disabled:e,"aria-disabled":e})[e?"addClass":"removeClass"]("ui-state-disabled"),this.options.disableInputsOnToggle){var t=this.menu.find(".ui-multiselect-checkboxes").get(0),i=[],s="ech-multiselect-disabled",n=0;if(e)for(i=t.querySelectorAll("input:enabled"),n=0;n<i.length;n++)i[n].setAttribute(s,!0),i[n].setAttribute("disabled","disabled"),i[n].setAttribute("aria-disabled","disabled"),i[n].parentNode.className=i[n].parentNode.className+" ui-state-disabled";else for(i=t.querySelectorAll("input:disabled"),n=0;n<i.length;n++)i[n].hasAttribute(s)&&(i[n].removeAttribute(s),i[n].removeAttribute("disabled"),i[n].removeAttribute("aria-disabled"),i[n].parentNode.className=i[n].parentNode.className.replace(" ui-state-disabled",""))}this.element.prop({disabled:e,"aria-disabled":e})},open:function(e){var t=this.button,i=this.menu,n=this.speed,o=this.options,r=[];if(!1!==this._trigger("beforeopen")&&!t.hasClass("ui-state-disabled")&&!this._isOpen){var a=i.find(".ui-multiselect-checkboxes"),l=o.show;s.isArray(o.show)&&(l=o.show[0],n=o.show[1]||this.speed),l&&(r=[l,n]),a.scrollTop(0),s.fn.show.apply(i,r),this._resizeMenu(),this.position();var d=this.header.find(".ui-multiselect-filter");d.length?d.first().find("input").trigger("focus"):this.labels.length?this.labels.filter(":not(.ui-state-disabled)").eq(0).trigger("mouseover").trigger("mouseenter").find("input").trigger("focus"):this.header.find("a").first().trigger("focus"),t.addClass("ui-state-active"),this._isOpen=!0,this._trigger("open")}},close:function(){if(!1!==this._trigger("beforeclose")){var e=this.options,t=e.hide,i=this.speed,n=[];s.isArray(e.hide)&&(t=e.hide[0],i=e.hide[1]||this.speed),t&&(n=[t,i]),s.fn.hide.apply(this.menu,n),this.button.removeClass("ui-state-active").trigger("blur").trigger("mouseleave"),this._isOpen=!1,this._trigger("close"),this.button.trigger("focus")}},enable:function(){this._toggleDisabled(!1)},disable:function(){this._toggleDisabled(!0)},checkAll:function(e){this._toggleChecked(!0),this._trigger("checkAll")},uncheckAll:function(){this._toggleChecked(!1),this._trigger("uncheckAll")},getChecked:function(){return this.menu.find("input").filter(":checked")},getUnchecked:function(){return this.menu.find("input").not(":checked")},destroy:function(){return s.Widget.prototype.destroy.call(this),o.unbind(this._namespaceID),s(this.element[0].form).unbind(this._namespaceID),this.button.remove(),this.menu.remove(),this.element.show(),this},isOpen:function(){return this._isOpen},widget:function(){return this.menu},getButton:function(){return this.button},getMenu:function(){return this.menu},getLabels:function(){return this.labels},addOption:function(e,t,i){var n=s("<option/>").attr(e).text(t),o=n.get(0);i?(this.element.children("OPTGROUP").filter((function(){return s(this).prop("label")===i})).append(n),this.menu.find(".ui-multiselect-optgroup").filter((function(){return s(this).find("a").text()===i})).append(this._makeOption(o))):(this.element.append(n),this.menu.find(".ui-multiselect-checkboxes").append(this._makeOption(o))),this.labels=this.menu.find("label"),this.inputs=this.labels.children("input")},removeOption:function(e){e&&(this.element.find("option[value="+e+"]").remove(),this.labels.find("input[value="+e+"]").parents("li").remove(),this.labels=this.menu.find("label"),this.inputs=this.labels.children("input"))},position:function(){var e={my:"top",at:"bottom",of:this.button};s.isEmptyObject(this.options.position)||(e.my=this.options.position.my||e.my,e.at=this.options.position.at||e.at,e.of=this.options.position.of||e.of),s.ui&&s.ui.position?this.menu.position(e):((e=this.button.position()).top+=this.button.outerHeight(!1),this.menu.offset(e))},_setOption:function(e,t){var i=this.menu;switch(e){case"header":"boolean"==typeof t?this.header[t?"show":"hide"]():"string"==typeof t&&(this.headerLinkContainer.children("li:not(:last-child)").remove(),this.headerLinkContainer.prepend("<li>"+t+"</li>"));break;case"checkAllText":i.find("a.ui-multiselect-all span").eq(-1).text(t);break;case"uncheckAllText":i.find("a.ui-multiselect-none span").eq(-1).text(t);break;case"height":this.options[e]=t,this._setMenuHeight();break;case"minWidth":case"menuWidth":this.options[e]=t,this._setButtonWidth(),this._setMenuWidth();break;case"selectedText":case"selectedList":case"noneSelectedText":this.options[e]=t,this.update();break;case"classes":i.add(this.button).removeClass(this.options.classes).addClass(t);break;case"multiple":i.toggleClass("ui-multiselect-single",!t),this.options.multiple=t,this.element[0].multiple=t,this.uncheckAll(),this.refresh();break;case"position":this.position();break;case"selectedListSeparator":this.options[e]=t,this.update(!0)}s.Widget.prototype._setOption.apply(this,arguments)}})},"../node_modules/jquery-numeric/jquery.numeric.js":(e,t,i)=>{var s,n,o;n=[i("./bundles/oroui/js/extend/jquery.js")],void 0===(o="function"==typeof(s=function(e){e.fn.numeric=function(t,i){"boolean"==typeof t&&(t={decimal:t,negative:!0,decimalPlaces:-1}),void 0===(t=t||{}).negative&&(t.negative=!0);var s=!1===t.decimal?"":t.decimal||".",n=!0===t.negative,o=void 0===t.decimalPlaces?-1:t.decimalPlaces;return i="function"==typeof i?i:function(){},this.data("numeric.decimal",s).data("numeric.negative",n).data("numeric.callback",i).data("numeric.decimalPlaces",o).keypress(e.fn.numeric.keypress).keyup(e.fn.numeric.keyup).blur(e.fn.numeric.blur)},e.fn.numeric.keypress=function(t){var i=e.data(this,"numeric.decimal"),s=e.data(this,"numeric.negative"),n=e.data(this,"numeric.decimalPlaces"),o=t.charCode?t.charCode:t.keyCode?t.keyCode:0;if(13==o&&"input"==this.nodeName.toLowerCase())return!0;if(13==o)return!1;if(35==o||36==o||37==o)return!1;var r=!1;if(t.ctrlKey&&97==o||t.ctrlKey&&65==o)return!0;if(t.ctrlKey&&120==o||t.ctrlKey&&88==o)return!0;if(t.ctrlKey&&99==o||t.ctrlKey&&67==o)return!0;if(t.ctrlKey&&122==o||t.ctrlKey&&90==o)return!0;if(t.ctrlKey&&118==o||t.ctrlKey&&86==o||t.shiftKey&&45==o)return!0;if(o<48||o>57){var a=e(this).val();if(0!==e.inArray("-",a.split(""))&&s&&45==o&&(0===a.length||0===parseInt(e.fn.getSelectionStart(this),10)))return!0;i&&o==i.charCodeAt(0)&&-1!=e.inArray(i,a.split(""))&&(r=!1),8!=o&&9!=o&&13!=o&&35!=o&&36!=o&&37!=o&&39!=o&&46!=o?r=!1:void 0!==t.charCode&&(t.keyCode==t.which&&0!==t.which?(r=!0,46==t.which&&(r=!1)):0!==t.keyCode&&0===t.charCode&&0===t.which&&(r=!0)),i&&o==i.charCodeAt(0)&&(r=-1==e.inArray(i,a.split("")))}else if(r=!0,i&&n>0){var l=e.fn.getSelectionStart(this),d=e.fn.getSelectionEnd(this),c=e.inArray(i,e(this).val().split(""));l===d&&c>=0&&l>c&&e(this).val().length>c+n&&(r=!1)}return r},e.fn.numeric.keyup=function(t){var i=e(this).val();if(i&&i.length>0){var s=e.fn.getSelectionStart(this),n=e.fn.getSelectionEnd(this),o=e.data(this,"numeric.decimal"),r=e.data(this,"numeric.negative"),a=e.data(this,"numeric.decimalPlaces");""!==o&&null!==o&&(0===(_=e.inArray(o,i.split("")))&&(this.value="0"+i,s++,n++),1==_&&"-"==i.charAt(0)&&(this.value="-0"+i.substring(1),s++,n++),i=this.value);for(var l=[0,1,2,3,4,5,6,7,8,9,"-",o],d=i.length,c=d-1;c>=0;c--){var u=i.charAt(c);0!==c&&"-"==u?i=i.substring(0,c)+i.substring(c+1):0!==c||r||"-"!=u||(i=i.substring(1));for(var h=!1,p=0;p<l.length;p++)if(u==l[p]){h=!0;break}h&&" "!=u||(i=i.substring(0,c)+i.substring(c+1))}var _,g=e.inArray(o,i.split(""));if(g>0)for(var m=d-1;m>g;m--)i.charAt(m)==o&&(i=i.substring(0,m)+i.substring(m+1));o&&a>0&&(_=e.inArray(o,i.split("")))>=0&&(i=i.substring(0,_+a+1),n=Math.min(i.length,n)),this.value=i,e.fn.setSelection(this,[s,n])}},e.fn.numeric.blur=function(){var t=e.data(this,"numeric.decimal"),i=e.data(this,"numeric.callback"),s=e.data(this,"numeric.negative"),n=this.value;""!==n&&(new RegExp("^"+(s?"-?":"")+"\\d+$|^"+(s?"-?":"")+"\\d*"+t+"\\d+$").exec(n)||i.apply(this))},e.fn.removeNumeric=function(){return this.data("numeric.decimal",null).data("numeric.negative",null).data("numeric.callback",null).data("numeric.decimalPlaces",null).unbind("keypress",e.fn.numeric.keypress).unbind("keyup",e.fn.numeric.keyup).unbind("blur",e.fn.numeric.blur)},e.fn.getSelectionStart=function(e){if("number"!==e.type){if(e.createTextRange&&document.selection){var t=document.selection.createRange().duplicate();return t.moveEnd("character",e.value.length),""==t.text?e.value.length:Math.max(0,e.value.lastIndexOf(t.text))}try{return e.selectionStart}catch(e){return 0}}},e.fn.getSelectionEnd=function(e){if("number"!==e.type){if(e.createTextRange&&document.selection){var t=document.selection.createRange().duplicate();return t.moveStart("character",-e.value.length),t.text.length}return e.selectionEnd}},e.fn.setSelection=function(e,t){if("number"==typeof t&&(t=[t,t]),t&&t.constructor==Array&&2==t.length)if("number"===e.type)e.focus();else if(e.createTextRange){var i=e.createTextRange();i.collapse(!0),i.moveStart("character",t[0]),i.moveEnd("character",t[1]-t[0]),i.select()}else{e.focus();try{e.setSelectionRange&&e.setSelectionRange(t[0],t[1])}catch(e){}}}})?s.apply(t,n):s)||(e.exports=o)},"../node_modules/jquery-ui/ui/widgets/sortable.js":(e,t,i)=>{var s,n,o;!function(r){"use strict";n=[i("./bundles/oroui/js/extend/jquery.js"),i("../node_modules/jquery-ui/ui/widgets/mouse.js"),i("../node_modules/jquery-ui/ui/data.js"),i("../node_modules/jquery-ui/ui/ie.js"),i("../node_modules/jquery-ui/ui/scroll-parent.js"),i("../node_modules/jquery-ui/ui/version.js"),i("../node_modules/jquery-ui/ui/widget.js")],s=function(e){return e.widget("ui.sortable",e.ui.mouse,{version:"1.13.2",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,i){return e>=t&&e<t+i},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){var t=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),e.each(this.items,(function(){t._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")}))},_destroy:function(){this._mouseDestroy();for(var e=this.items.length-1;e>=0;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(t,i){var s=null,n=!1,o=this;return!(this.reverting||this.options.disabled||"static"===this.options.type||(this._refreshItems(t),e(t.target).parents().each((function(){if(e.data(this,o.widgetName+"-item")===o)return s=e(this),!1})),e.data(t.target,o.widgetName+"-item")===o&&(s=e(t.target)),!s||this.options.handle&&!i&&(e(this.options.handle,s).find("*").addBack().each((function(){this===t.target&&(n=!0)})),!n)||(this.currentItem=s,this._removeCurrentsFromItems(),0)))},_mouseStart:function(t,i,s){var n,o,r=this.options;if(this.currentContainer=this,this.refreshPositions(),this.appendTo=e("parent"!==r.appendTo?r.appendTo:this.currentItem.parent()),this.helper=this._createHelper(t),this._cacheHelperProportions(),this._cacheMargins(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},e.extend(this.offset,{click:{left:t.pageX-this.offset.left,top:t.pageY-this.offset.top},relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),r.cursorAt&&this._adjustOffsetFromHelper(r.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),this.scrollParent=this.placeholder.scrollParent(),e.extend(this.offset,{parent:this._getParentOffset()}),r.containment&&this._setContainment(),r.cursor&&"auto"!==r.cursor&&(o=this.document.find("body"),this.storedCursor=o.css("cursor"),o.css("cursor",r.cursor),this.storedStylesheet=e("<style>*{ cursor: "+r.cursor+" !important; }</style>").appendTo(o)),r.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",r.zIndex)),r.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",r.opacity)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",t,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!s)for(n=this.containers.length-1;n>=0;n--)this.containers[n]._trigger("activate",t,this._uiHash(this));return e.ui.ddmanager&&(e.ui.ddmanager.current=this),e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this.helper.parent().is(this.appendTo)||(this.helper.detach().appendTo(this.appendTo),this.offset.parent=this._getParentOffset()),this.position=this.originalPosition=this._generatePosition(t),this.originalPageX=t.pageX,this.originalPageY=t.pageY,this.lastPositionAbs=this.positionAbs=this._convertPositionTo("absolute"),this._mouseDrag(t),!0},_scroll:function(e){var t=this.options,i=!1;return this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<t.scrollSensitivity?this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop+t.scrollSpeed:e.pageY-this.overflowOffset.top<t.scrollSensitivity&&(this.scrollParent[0].scrollTop=i=this.scrollParent[0].scrollTop-t.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<t.scrollSensitivity?this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft+t.scrollSpeed:e.pageX-this.overflowOffset.left<t.scrollSensitivity&&(this.scrollParent[0].scrollLeft=i=this.scrollParent[0].scrollLeft-t.scrollSpeed)):(e.pageY-this.document.scrollTop()<t.scrollSensitivity?i=this.document.scrollTop(this.document.scrollTop()-t.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<t.scrollSensitivity&&(i=this.document.scrollTop(this.document.scrollTop()+t.scrollSpeed)),e.pageX-this.document.scrollLeft()<t.scrollSensitivity?i=this.document.scrollLeft(this.document.scrollLeft()-t.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<t.scrollSensitivity&&(i=this.document.scrollLeft(this.document.scrollLeft()+t.scrollSpeed))),i},_mouseDrag:function(t){var i,s,n,o,r=this.options;for(this.position=this._generatePosition(t),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),r.scroll&&!1!==this._scroll(t)&&(this._refreshItemPositions(!0),e.ui.ddmanager&&!r.dropBehaviour&&e.ui.ddmanager.prepareOffsets(this,t)),this.dragDirection={vertical:this._getDragVerticalDirection(),horizontal:this._getDragHorizontalDirection()},i=this.items.length-1;i>=0;i--)if(n=(s=this.items[i]).item[0],(o=this._intersectsWithPointer(s))&&s.instance===this.currentContainer&&!(n===this.currentItem[0]||this.placeholder[1===o?"next":"prev"]()[0]===n||e.contains(this.placeholder[0],n)||"semi-dynamic"===this.options.type&&e.contains(this.element[0],n))){if(this.direction=1===o?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(s))break;this._rearrange(t,s),this._trigger("change",t,this._uiHash());break}return this._contactContainers(t),e.ui.ddmanager&&e.ui.ddmanager.drag(this,t),this._trigger("sort",t,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(t,i){if(t){if(e.ui.ddmanager&&!this.options.dropBehaviour&&e.ui.ddmanager.drop(this,t),this.options.revert){var s=this,n=this.placeholder.offset(),o=this.options.axis,r={};o&&"x"!==o||(r.left=n.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),o&&"y"!==o||(r.top=n.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,e(this.helper).animate(r,parseInt(this.options.revert,10)||500,(function(){s._clear(t)}))}else this._clear(t,i);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new e.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var t=this.containers.length-1;t>=0;t--)this.containers[t]._trigger("deactivate",null,this._uiHash(this)),this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",null,this._uiHash(this)),this.containers[t].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),e.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?e(this.domPosition.prev).after(this.currentItem):e(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},e(i).each((function(){var i=(e(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);i&&s.push((t.key||i[1]+"[]")+"="+(t.key&&t.expression?i[1]:i[2]))})),!s.length&&t.key&&s.push(t.key+"="),s.join("&")},toArray:function(t){var i=this._getItemsAsjQuery(t&&t.connected),s=[];return t=t||{},i.each((function(){s.push(e(t.item||this).attr(t.attribute||"id")||"")})),s},_intersectsWith:function(e){var t=this.positionAbs.left,i=t+this.helperProportions.width,s=this.positionAbs.top,n=s+this.helperProportions.height,o=e.left,r=o+e.width,a=e.top,l=a+e.height,d=this.offset.click.top,c=this.offset.click.left,u="x"===this.options.axis||s+d>a&&s+d<l,h="y"===this.options.axis||t+c>o&&t+c<r,p=u&&h;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?p:o<t+this.helperProportions.width/2&&i-this.helperProportions.width/2<r&&a<s+this.helperProportions.height/2&&n-this.helperProportions.height/2<l},_intersectsWithPointer:function(e){var t,i,s="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),n="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width);return!(!s||!n)&&(t=this.dragDirection.vertical,i=this.dragDirection.horizontal,this.floating?"right"===i||"down"===t?2:1:t&&("down"===t?2:1))},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),i=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),s=this.dragDirection.vertical,n=this.dragDirection.horizontal;return this.floating&&n?"right"===n&&i||"left"===n&&!i:s&&("down"===s&&t||"up"===s&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(e>0?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(e>0?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(t){var i,s,n,o,r=[],a=[],l=this._connectWith();if(l&&t)for(i=l.length-1;i>=0;i--)for(s=(n=e(l[i],this.document[0])).length-1;s>=0;s--)(o=e.data(n[s],this.widgetFullName))&&o!==this&&!o.options.disabled&&a.push(["function"==typeof o.options.items?o.options.items.call(o.element):e(o.options.items,o.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),o]);function d(){r.push(this)}for(a.push(["function"==typeof this.options.items?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):e(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),i=a.length-1;i>=0;i--)a[i][0].each(d);return e(r)},_removeCurrentsFromItems:function(){var t=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=e.grep(this.items,(function(e){for(var i=0;i<t.length;i++)if(t[i]===e.item[0])return!1;return!0}))},_refreshItems:function(t){this.items=[],this.containers=[this];var i,s,n,o,r,a,l,d,c=this.items,u=[["function"==typeof this.options.items?this.options.items.call(this.element[0],t,{item:this.currentItem}):e(this.options.items,this.element),this]],h=this._connectWith();if(h&&this.ready)for(i=h.length-1;i>=0;i--)for(s=(n=e(h[i],this.document[0])).length-1;s>=0;s--)(o=e.data(n[s],this.widgetFullName))&&o!==this&&!o.options.disabled&&(u.push(["function"==typeof o.options.items?o.options.items.call(o.element[0],t,{item:this.currentItem}):e(o.options.items,o.element),o]),this.containers.push(o));for(i=u.length-1;i>=0;i--)for(r=u[i][1],s=0,d=(a=u[i][0]).length;s<d;s++)(l=e(a[s])).data(this.widgetName+"-item",r),c.push({item:l,instance:r,width:0,height:0,left:0,top:0})},_refreshItemPositions:function(t){var i,s,n,o;for(i=this.items.length-1;i>=0;i--)s=this.items[i],this.currentContainer&&s.instance!==this.currentContainer&&s.item[0]!==this.currentItem[0]||(n=this.options.toleranceElement?e(this.options.toleranceElement,s.item):s.item,t||(s.width=n.outerWidth(),s.height=n.outerHeight()),o=n.offset(),s.left=o.left,s.top=o.top)},refreshPositions:function(e){var t,i;if(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),this._refreshItemPositions(e),this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(t=this.containers.length-1;t>=0;t--)i=this.containers[t].element.offset(),this.containers[t].containerCache.left=i.left,this.containers[t].containerCache.top=i.top,this.containers[t].containerCache.width=this.containers[t].element.outerWidth(),this.containers[t].containerCache.height=this.containers[t].element.outerHeight();return this},_createPlaceholder:function(t){var i,s,n=(t=t||this).options;n.placeholder&&n.placeholder.constructor!==String||(i=n.placeholder,s=t.currentItem[0].nodeName.toLowerCase(),n.placeholder={element:function(){var n=e("<"+s+">",t.document[0]);return t._addClass(n,"ui-sortable-placeholder",i||t.currentItem[0].className)._removeClass(n,"ui-sortable-helper"),"tbody"===s?t._createTrPlaceholder(t.currentItem.find("tr").eq(0),e("<tr>",t.document[0]).appendTo(n)):"tr"===s?t._createTrPlaceholder(t.currentItem,n):"img"===s&&n.attr("src",t.currentItem.attr("src")),i||n.css("visibility","hidden"),n},update:function(e,o){i&&!n.forcePlaceholderSize||(o.height()&&(!n.forcePlaceholderSize||"tbody"!==s&&"tr"!==s)||o.height(t.currentItem.innerHeight()-parseInt(t.currentItem.css("paddingTop")||0,10)-parseInt(t.currentItem.css("paddingBottom")||0,10)),o.width()||o.width(t.currentItem.innerWidth()-parseInt(t.currentItem.css("paddingLeft")||0,10)-parseInt(t.currentItem.css("paddingRight")||0,10)))}}),t.placeholder=e(n.placeholder.element.call(t.element,t.currentItem)),t.currentItem.after(t.placeholder),n.placeholder.update(t,t.placeholder)},_createTrPlaceholder:function(t,i){var s=this;t.children().each((function(){e("<td> </td>",s.document[0]).attr("colspan",e(this).attr("colspan")||1).appendTo(i)}))},_contactContainers:function(t){var i,s,n,o,r,a,l,d,c,u,h=null,p=null;for(i=this.containers.length-1;i>=0;i--)if(!e.contains(this.currentItem[0],this.containers[i].element[0]))if(this._intersectsWith(this.containers[i].containerCache)){if(h&&e.contains(this.containers[i].element[0],h.element[0]))continue;h=this.containers[i],p=i}else this.containers[i].containerCache.over&&(this.containers[i]._trigger("out",t,this._uiHash(this)),this.containers[i].containerCache.over=0);if(h)if(1===this.containers.length)this.containers[p].containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1);else{for(n=1e4,o=null,r=(c=h.floating||this._isFloating(this.currentItem))?"left":"top",a=c?"width":"height",u=c?"pageX":"pageY",s=this.items.length-1;s>=0;s--)e.contains(this.containers[p].element[0],this.items[s].item[0])&&this.items[s].item[0]!==this.currentItem[0]&&(l=this.items[s].item.offset()[r],d=!1,t[u]-l>this.items[s][a]/2&&(d=!0),Math.abs(t[u]-l)<n&&(n=Math.abs(t[u]-l),o=this.items[s],this.direction=d?"up":"down"));if(!o&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[p])return void(this.currentContainer.containerCache.over||(this.containers[p]._trigger("over",t,this._uiHash()),this.currentContainer.containerCache.over=1));o?this._rearrange(t,o,null,!0):this._rearrange(t,null,this.containers[p].element,!0),this._trigger("change",t,this._uiHash()),this.containers[p]._trigger("change",t,this._uiHash(this)),this.currentContainer=this.containers[p],this.options.placeholder.update(this.currentContainer,this.placeholder),this.scrollParent=this.placeholder.scrollParent(),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this.containers[p]._trigger("over",t,this._uiHash(this)),this.containers[p].containerCache.over=1}},_createHelper:function(t){var i=this.options,s="function"==typeof i.helper?e(i.helper.apply(this.element[0],[t,this.currentItem])):"clone"===i.helper?this.currentItem.clone():this.currentItem;return s.parents("body").length||this.appendTo[0].appendChild(s[0]),s[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),s[0].style.width&&!i.forceHelperSize||s.width(this.currentItem.width()),s[0].style.height&&!i.forceHelperSize||s.height(this.currentItem.height()),s},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),Array.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var t=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&e.ui.ie)&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"===this.cssPosition){var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,i,s,n=this.options;"parent"===n.containment&&(n.containment=this.helper[0].parentNode),"document"!==n.containment&&"window"!==n.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===n.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===n.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(n.containment)||(t=e(n.containment)[0],i=e(n.containment).offset(),s="hidden"!==e(t).css("overflow"),this.containment=[i.left+(parseInt(e(t).css("borderLeftWidth"),10)||0)+(parseInt(e(t).css("paddingLeft"),10)||0)-this.margins.left,i.top+(parseInt(e(t).css("borderTopWidth"),10)||0)+(parseInt(e(t).css("paddingTop"),10)||0)-this.margins.top,i.left+(s?Math.max(t.scrollWidth,t.offsetWidth):t.offsetWidth)-(parseInt(e(t).css("borderLeftWidth"),10)||0)-(parseInt(e(t).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,i.top+(s?Math.max(t.scrollHeight,t.offsetHeight):t.offsetHeight)-(parseInt(e(t).css("borderTopWidth"),10)||0)-(parseInt(e(t).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(t,i){i||(i=this.position);var s="absolute"===t?1:-1,n="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,o=/(html|body)/i.test(n[0].tagName);return{top:i.top+this.offset.relative.top*s+this.offset.parent.top*s-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():o?0:n.scrollTop())*s,left:i.left+this.offset.relative.left*s+this.offset.parent.left*s-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():o?0:n.scrollLeft())*s}},_generatePosition:function(t){var i,s,n=this.options,o=t.pageX,r=t.pageY,a="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&e.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,l=/(html|body)/i.test(a[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(t.pageX-this.offset.click.left<this.containment[0]&&(o=this.containment[0]+this.offset.click.left),t.pageY-this.offset.click.top<this.containment[1]&&(r=this.containment[1]+this.offset.click.top),t.pageX-this.offset.click.left>this.containment[2]&&(o=this.containment[2]+this.offset.click.left),t.pageY-this.offset.click.top>this.containment[3]&&(r=this.containment[3]+this.offset.click.top)),n.grid&&(i=this.originalPageY+Math.round((r-this.originalPageY)/n.grid[1])*n.grid[1],r=this.containment?i-this.offset.click.top>=this.containment[1]&&i-this.offset.click.top<=this.containment[3]?i:i-this.offset.click.top>=this.containment[1]?i-n.grid[1]:i+n.grid[1]:i,s=this.originalPageX+Math.round((o-this.originalPageX)/n.grid[0])*n.grid[0],o=this.containment?s-this.offset.click.left>=this.containment[0]&&s-this.offset.click.left<=this.containment[2]?s:s-this.offset.click.left>=this.containment[0]?s-n.grid[0]:s+n.grid[0]:s)),{top:r-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():l?0:a.scrollTop()),left:o-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():l?0:a.scrollLeft())}},_rearrange:function(e,t,i,s){i?i[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var n=this.counter;this._delay((function(){n===this.counter&&this.refreshPositions(!s)}))},_clear:function(e,t){this.reverting=!1;var i,s=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(i in this._storedCSS)"auto"!==this._storedCSS[i]&&"static"!==this._storedCSS[i]||(this._storedCSS[i]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function n(e,t,i){return function(s){i._trigger(e,s,t._uiHash(t))}}for(this.fromOutside&&!t&&s.push((function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))})),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||s.push((function(e){this._trigger("update",e,this._uiHash())})),this!==this.currentContainer&&(t||(s.push((function(e){this._trigger("remove",e,this._uiHash())})),s.push(function(e){return function(t){e._trigger("receive",t,this._uiHash(this))}}.call(this,this.currentContainer)),s.push(function(e){return function(t){e._trigger("update",t,this._uiHash(this))}}.call(this,this.currentContainer)))),i=this.containers.length-1;i>=0;i--)t||s.push(n("deactivate",this,this.containers[i])),this.containers[i].containerCache.over&&(s.push(n("out",this,this.containers[i])),this.containers[i].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(i=0;i<s.length;i++)s[i].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===e.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(t){var i=t||this;return{helper:i.helper,placeholder:i.placeholder||e([]),position:i.position,originalPosition:i.originalPosition,offset:i.positionAbs,item:i.currentItem,sender:t?t.element:null}}})},void 0===(o=s.apply(t,n))||(e.exports=o)}()},"./bundles/oroaction/js/datagrid/action/button-widget-action.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orodatagrid/js/datagrid/action/model-action.js"),n=i("./bundles/oroaction/js/button-manager.js"),o=s.extend({options:{operationName:null},buttonManager:null,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){o.__super__.initialize.call(this,e);const i=t.extend({action:t.pick(this,"name","label")},this.configuration);this.buttonManager=new n(i)},run:function(){this.buttonManager.execute()},dispose:function(){this.disposed||(t.isFunction(this.buttonManager.dispose)&&this.buttonManager.dispose(),delete this.buttonManager,o.__super__.dispose.call(this))}});return o}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroactivity/js/app/models/activity-context-collection.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroactivity/js/app/models/activity-context-model.js");return i("./bundles/oroui/js/app/models/base/collection.js").extend({model:t,constructor:function e(...t){e.__super__.constructor.apply(this,t)}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroactivity/js/app/models/activity-context-model.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";return i("./bundles/oroui/js/app/models/base/model.js").extend({defaults:{label:"",first:"",className:"",gridName:""},constructor:function e(...t){e.__super__.constructor.apply(this,t)}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroaddress/js/datagrid/action/map-action.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("../node_modules/@oroinc/bootstrap/js/dist/popover.js"),o=i("./bundles/oroaddress/js/mapservice/googlemaps.js"),r=i("./bundles/orodatagrid/js/datagrid/action/model-action.js").extend({options:{mapView:o},dispatched:!0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){r.__super__.initialize.call(this,e),this.$mapContainerFrame=t('<div class="map-popover__frame"/>'),this.mapView=new this.options.mapView({el:this.$mapContainerFrame}),this.datagrid.on("rendered",this.onGridRendered,this),this.datagrid.on("content:update",this.onGridRendered,this)},dispose:function(){this.disposed||(delete this.$mapContainerFrame,this.datagrid.off(null,null,this),this.subviews[0].$el.off("click"),r.__super__.dispose.call(this))},onGridRendered:function(){this.subviews.length&&this.subviews[0].$el.on("click",this.onActionClick.bind(this))},onActionClick:function(e){e.preventDefault(),this.handlePopover(this.getPopoverConfig())},getPopoverConfig:function(){return s.extend({placement:"left",container:"body",animation:!1,html:!0,closeButton:!0,class:"map-popover",content:this.$mapContainerFrame},this.popoverTpl?{template:this.popoverTpl}:{})},handlePopover:function(e){const i=this.subviews[0].$el;i.data(n.DATA_KEY)||i.popover(e).on("shown.bs.popover",(()=>{this.mapView.updateMap(this.getAddress(),this.model.get("label")),t(document).on("mouseup",(e=>{const s=this.mapView.$el;t(e.target).closest(s).length||i.popover("dispose")}))})).on("hide.bs.popover",(()=>{if(document.fullscreenElement||document.webkitFullscreenElement)return!1;t(document).off("mouseup",null,this)})),i.popover("show")},getAddress:function(){return this.model.get("countryName")+", "+this.model.get("city")+", "+this.model.get("street")+" "+(this.model.get("street2")||"")}});return r}.call(t,i,t,e))||(e.exports=s)},"./bundles/orocatalog/js/filter/subcategory-filter.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orocatalog/templates/filter/subcategory-filter.html");return i("./bundles/orofrontend/default/js/app/views/frontend-multiselect-filter.js").extend({emptyValue:{value:[]},template:t,populateDefault:!1,constructor:function e(t){e.__super__.constructor.call(this,t)}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/orocurrency/js/datagrid/cell/multi-currency-cell.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/orodatagrid/js/datagrid/cell/number-cell.js"),i("./bundles/orodatagrid/js/datagrid/formatter/currency-formatter.js")],void 0===(n=function(e,t,i){"use strict";return t.extend({formatterPrototype:i,style:"currency",constructor:function e(t){e.__super__.constructor.call(this,t)}})}.apply(t,s))||(e.exports=n)},"./bundles/orocustomer/js/datagrid/action/frontend-map-action.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroaddress/js/datagrid/action/map-action.js"),s=i("./bundles/oroui/js/viewport-manager.js").Z,n=i("../node_modules/@oroinc/bootstrap/js/dist/popover.js"),o=i("./bundles/orofrontend/default/js/app/views/fullscreen-popup-view.js"),r=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orocustomer/templates/datagrid/action/frontend-map-action.html");i("./bundles/oroui/js/extend/jquery.js");const a=t.extend({popoverTpl:r(),viewport:"tablet-small",constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){a.__super__.initialize.call(this,e),this.mapView.on("mapRendered",this.onMapRendered.bind(this)),this.listenTo(this.model,"change:isDropdownActions",this.actionsDropdownListener)},onMapRendered:function(){const e=this.getPopoverConfig().placement,t=this.subviews[0].$el.data(n.DATA_KEY);void 0!==t&&t.applyPlacement("",e)},onActionClick:function(e){e.preventDefault(),this.mapView.map&&this.mapView.map.setCenter(this.mapView.location),s.isApplicable(this.viewport)?this.handleFullScreenView():this.handlePopover(this.getPopoverConfig())},handleFullScreenView:function(){const e=()=>{this.fullscreenView.dispose(),delete this.fullscreenView};this.fullscreenView&&e(),this.fullscreenView=new o({contentElement:this.$mapContainerFrame,popupIcon:"fa-chevron-left"}),this.fullscreenView.on("close",e),this.fullscreenView.show(),this.mapView.updateMap(this.getAddress(),this.model.get("label"))},actionsDropdownListener:function(){this.model.get("isDropdownActions")&&this.subviews[0].$el.on("click",this.handleFullScreenView.bind(this))}});return a}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/components/cell-popup-editor-component.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/extend/jquery.js"),n=i("./bundles/orotranslation/js/translator.js"),o=i("./bundles/oroui/js/mediator.js"),r=i("./bundles/oroui/js/app/components/base/component.js"),a=i("./bundles/orodatagrid/js/app/views/inline-editing/error-holder-view.js"),l=i("./bundles/oroui/js/tools/overlay.js"),d=r.extend({TAB_KEY_CODE:9,ENTER_KEY_CODE:13,ESCAPE_KEY_CODE:27,ARROW_LEFT_KEY_CODE:37,ARROW_TOP_KEY_CODE:38,ARROW_RIGHT_KEY_CODE:39,ARROW_BOTTOM_KEY_CODE:40,lockUserActions:!1,OVERLAY_TOOL_DEFAULTS:{zIndex:1,position:{my:"left top",at:"left top",collision:"flipfit"}},listen:{saveAction:"saveCurrentCell",cancelAction:"cancelEditing",saveAndExitAction:"saveCurrentCell",saveAndEditNextAction:"saveCurrentCellAndEditNext",cancelAndEditNextAction:"editNextCell",saveAndEditPrevAction:"saveCurrentCellAndEditPrev",cancelAndEditPrevAction:"editPrevCell",saveAndEditNextRowAction:"saveCurrentCellAndEditNextRow",cancelAndEditNextRowAction:"editNextRowCell",saveAndEditPrevRowAction:"saveCurrentCellAndEditPrevRow",cancelAndEditPrevRowAction:"editPrevRowCell"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(this.options=e||{},!this.options.plugin)throw new Error('Option "plugin" is required');if(!this.options.cell)throw new Error('Option "cell" is required');if(!this.options.view)throw new Error('Option "view" is required');if(!this.options.save_api_accessor)throw new Error('Option "save_api_accessor" is required');this.errorHolderView=new a({el:this.options.cell.$el[0],within:this.options.plugin.main.$(".other-scroll-container")}),this.listenTo(this.options.plugin.main,"scroll",(function(){this.errorHolderView.updatePosition()})),this.listenTo(this.options.plugin,"lockUserActions",(function(e){this.lockUserActions=e})),this.listenTo(this.options.cell,"dispose",(()=>this.dispose())),d.__super__.initialize.call(this,e),this.enterEditMode()},createView:function(){const e=this.options.view,i=this.options.cell,n=t.extend({},this.options.viewOptions,this.getRestrictedOptions(),{autoRender:!0,model:i.model,fieldName:i.column.get("name"),metadata:i.column.get("metadata"),cell:i});this.formState&&(this.updateModel(i.model,this.oldState),this.errorHolderView.render(),this.options.plugin.main.trigger("content:update"),n.value=this.formState);const o=this.view=new e(n);o.$el.addClass("inline-editor-wrapper");const r=i.$el.closest(".grid-container").find(".grid-editor-boundary"),a=o.className().split(" ").filter((e=>e)).map((e=>`${e}-offset`)).join(" ");r.addClass(a);const d={of:i.$el,within:r};i.el&&"right"===getComputedStyle(i.el).textAlign&&s.extend(d,{at:"right top",my:"right top"});const c=s.extend(!0,{},this.OVERLAY_TOOL_DEFAULTS,{insertInto:i.$el,position:d});this.resizeToCell(o,i);const u=l.createOverlay(o.$el,c);o.trigger("change:visibility"),this.listenTo(o,{dispose:function(){u.remove()},change:function(){i.$el.toggleClass("has-error",!o.isValid()),this.errorHolderView.updatePosition()},keydown:this.onKeyDown,focus:function(){u.focus(),this.errorHolderView.updatePosition()},blur:function(){if(u.blur(),o.isValid())this.saveCurrentCell();else{this.options.cell.$el.toggleClass("has-error",!this.view.isValid()),this.formState=this.view.getFormState();const e=this.view.getModelUpdateData();this.oldState=t.pick(this.options.cell.model.toJSON(),t.keys(e)),this.exitEditMode(),this.updateModel(this.options.cell.model,e),this.errorHolderView.render(),this.options.plugin.main.trigger("content:update"),this.errorHolderView.updatePosition()}}}),o.trigger("change"),this.errorHolderView.render()},getRestrictedOptions:function(){const e=this.options.cell.model.get("entity_restrictions"),i=t.filter(e,(function(e){return e.field===this.options.cell.column.get("name")}),this),s={};return t.each(i,(function(e){"disallow"===e.mode?s.choices=t.omit(this.options.viewOptions.choices,e.values):"allow"===e.mode&&(s.choices=t.pick(this.options.viewOptions.choices,e.values))}),this),s},resizeToCell:function(e,t){e.$el.width(t.$el.outerWidth())},saveCurrentCell:function(){if(!this.view.isChanged())return this.exitEditMode(!0),!0;if(!this.view.isValid())return!1;const{cell:e,plugin:i}=this.options;let s=this.getServerUpdateData();this.applyDivisor(s,!1),this.formState=this.view.getFormState();const o=this.view.getModelUpdateData();if(e.$el.addClass("loading"),this.oldState=t.pick(e.model.toJSON(),t.keys(o)),this.exitEditMode(),this.updateModel(e.model,o),this.errorHolderView.render(),i.main.trigger("content:update"),this.options.save_api_accessor.initialOptions.field_name){const e=t.keys(s);if(e.length>1)throw new Error("Only single field editors are supported with field_name option");const i={};i[this.options.save_api_accessor.initialOptions.field_name]=s[e[0]],s=i}let r=this.options.save_api_accessor.send(e.model.toJSON(),s,{},{processingMessage:n("oro.form.inlineEditing.saving_progress"),preventWindowUnload:n("oro.form.inlineEditing.inline_edits"),errorHandlerMessage:!1});return this.constructor.processSavePromise&&(r=this.constructor.processSavePromise(r,e.column.get("metadata"))),this.options.view.processSavePromise&&(r=this.options.view.processSavePromise(r,e.column.get("metadata"))),r.done(this.onSaveSuccess.bind(this)).fail(this.onSaveError.bind(this)).always((()=>{i.main.trigger("content:update"),e.$el.removeClass("loading")})),r},updateModel:function(e,t){for(const i in t)t.hasOwnProperty(i)&&void 0===t[i]&&(e.unset(i),delete t[i]);e.set(t)},enterEditMode:function(){this.options.grid.trigger("grid-cell:enter-edit-mode",this.options.cell),this.view||(this.options.cell.$el.removeClass("view-mode save-fail"),this.options.cell.$el.addClass("edit-mode"),this.options.grid.$(".grid-container").append('<div class="grid-editor-boundary"></div>'),this.createView(this.options),this.listenTo(this.view,"all",(function(e,...t){"dispose"!==e&&this.trigger(e,...t)}),this))},exitEditMode:function(e){this.view&&(this.errorHolderView.parseValidatorErrors(this.view.validator.errorList),this.options.cell.disposed||this.options.cell.$el.removeClass("edit-mode").addClass("view-mode"),this.options.grid.$("div.grid-editor-boundary").remove(),this.view.dispose(),this.stopListening(this.view),delete this.view),this.options.grid.trigger("grid-cell:exit-edit-mode",this.options.cell),e&&this.dispose()},toggleHeaderCellHighlight:function(e,t){const i=this.options.plugin.main.columns.indexOf(e.column),s=this.options.plugin.main.findHeaderCellByIndex(i);s&&s.$el.toggleClass("header-cell-highlight",t)},revertChanges:function(){!this.options.cell.disposed&&this.oldState&&(this.options.cell.model.set(this.oldState),delete this.oldState,this.options.plugin.main.trigger("content:update"))},cancelEditing:function(){this.revertChanges(),this.exitEditMode(!0)},editNextCell:function(){this.exitAndNavigate("editNextCell")},editNextRowCell:function(){this.exitAndNavigate("editNextRowCell")},editPrevCell:function(){this.exitAndNavigate("editPrevCell")},editPrevRowCell:function(){this.exitAndNavigate("editPrevRowCell")},exitAndNavigate:function(e){const t=this.options.plugin,i=this.options.cell;t[e](i)},saveCurrentCellAndEditNext:function(){this.saveAndNavigate("editNextCell")},saveCurrentCellAndEditPrev:function(){this.saveAndNavigate("editPrevCell")},saveCurrentCellAndEditNextRow:function(){this.saveAndNavigate("editNextRowCell")},saveCurrentCellAndEditPrevRow:function(){this.saveAndNavigate("editPrevRowCell")},saveAndNavigate:function(e){const t=this.options.plugin,i=this.options.cell;this.isNavigationAvailable()&&t[e](i)},onKeyDown:function(e){this.onGenericTabKeydown(e),this.onGenericEnterKeydown(e),this.onGenericEscapeKeydown(e),this.onGenericArrowKeydown(e)},onGenericEnterKeydown:function(e){if(this.disposed)return;const t=this.options.plugin,i=this.options.cell;e.keyCode===this.ENTER_KEY_CODE&&!e.ctrlKey&&this.isNavigationAvailable()&&(e.shiftKey?t.editPrevRowCell(i):t.editNextRowCell(i),e.preventDefault())},onGenericTabKeydown:function(e){if(this.disposed)return;const t=this.options.plugin,i=this.options.cell;e.keyCode===this.TAB_KEY_CODE&&this.isNavigationAvailable()&&(e.shiftKey?t.editPrevCell(i):t.editNextCell(i),e.preventDefault())},onGenericEscapeKeydown:function(e){e.keyCode===this.ESCAPE_KEY_CODE&&(this.lockUserActions||(this.revertChanges(),this.exitEditMode(!0)),e.preventDefault())},onGenericArrowKeydown:function(e){if(this.disposed)return;const t=this.options.plugin,i=this.options.cell;if(e.altKey&&this.isNavigationAvailable())switch(e.keyCode){case this.ARROW_LEFT_KEY_CODE:t.editPrevCell(i),e.preventDefault();break;case this.ARROW_RIGHT_KEY_CODE:t.editNextCell(i),e.preventDefault();break;case this.ARROW_TOP_KEY_CODE:t.editPrevRowCell(i),e.preventDefault();break;case this.ARROW_BOTTOM_KEY_CODE:t.editNextRowCell(i),e.preventDefault()}},isNavigationAvailable:function(){return!this.lockUserActions&&(!this.view||this.view.isValid())},isChanged:function(){return this.view&&this.view.isChanged()||this.oldState},onSaveSuccess:function(e){if(!this.options.cell.disposed&&this.options.cell.$el){if(e)if(e.hasOwnProperty("fields")||t.every(t.keys(e),(function(e){return this.options.cell.model.attributes.hasOwnProperty(e)}),this)){const i=e.hasOwnProperty("fields")?e.fields:e;this.applyDivisor(i,!0);const s=t.invert(this.options.save_api_accessor.routeParametersRenameMap);t.each(i,(function(e,t){const i=s.hasOwnProperty(t)?s[t]:t;void 0!==this.options.cell.model.get(i)&&this.options.cell.model.set(i,e)}),this)}else e.hasOwnProperty("httpMethod")&&"DELETE"===e.httpMethod&&t.each(this.options.save_api_accessor.routeParametersRenameMap,(function(e,t){this.options.cell.model.set(t,"")}),this);this.options.cell.$el.removeClass("save-fail").addClassTemporarily("save-success",2e3)}o.execute("showFlashMessage","success",n("oro.form.inlineEditing.successMessage")),delete this.oldState,delete this.formState,this.errorHolderView.setErrorMessages({}),this.exitEditMode(!0)},onSaveError:function(e){const i="responseJSON"in e&&"code"in e.responseJSON?e.responseJSON.code:e.status,s=[];let r;if(400!==i){switch(this.options.cell.disposed||(r=this.options.cell.column.get("label"),this.options.cell.$el.addClass("save-fail")),i){case 403:s.push(n("oro.datagrid.inline_editing.message.save_field.permission_denied",{fieldLabel:r}));break;case 500:e.responseJSON.message?s.push(n(e.responseJSON.message)):s.push(n("oro.ui.unexpected_error"));break;default:s.push(n("oro.ui.unexpected_error"))}this.revertChanges(),this.exitEditMode(!0),t.each(s,(function(e){o.execute("showMessage","error",e)}))}else this.onValidationError(e)},onValidationError:function(e){let i,s;const r=t.result(e.responseJSON,"errors");if(r)t.each(r.children,(function(e){t.isArray(e.errors)&&o.execute("showMessage","error",e.errors[0])})),t.isArray(r.errors)&&o.execute("showMessage","error",n(r.errors[0])),i=t.result(r.children,this.options.cell.column.get("name")),i||"undefined"===this.options.viewOptions||"undefined"===this.options.viewOptions.value_field_name||(i=t.result(r.children,this.options.viewOptions.value_field_name)),i&&t.isArray(i.errors)?s={value:n(i.errors[0])}:t.isArray(r.errors)&&(s={value:n(r.errors[0])}),this.errorHolderView.setErrorMessages(s);else if(t.isArray(e.responseJSON)){const i=t.chain(e.responseJSON).map(t.property("detail")).filter().value();if(this.disposed||this.options.cell.disposed)t.each(i,t.partial(o.execute,"showMessage","error"));else{const e=t.first(i);e&&this.errorHolderView.setErrorMessages({value:e})}}},getServerUpdateData:function(){return this.view.getServerUpdateData()},applyDivisor:function(e,i){const s=this.options.cell.column.attributes.metadata,n=s.name;t.has(s,"divisor")&&(isNaN(e[n])||(e[n]=i?e[n]/s.divisor:e[n]*s.divisor))}});return d}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/components/column-renderer-component.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/app/components/base/component.js").extend({columns:null,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){s.__super__.initialize.call(this,e)},dispose:function(){this.disposed||s.__super__.dispose.call(this)},getHtml:function(e){return e.html()},getRawAttributes:function(e,t){return t.class=t.class||"",e.length&&(t.class=this._getElementClasses(e,t.class)),this._getAttributesRaw(t)},_getElementClasses:function(e,i){const s=e.attr("class")||"",n=t.union(i.split(" "),s.split(" "));return t.without(n,"")},_getAttributesRaw:function(e){let i="";return t.each(e,(function(e,s){i+=" "+s+'="'+(t.isArray(e)?e.join(" "):e)+'"'})),i.trim()}});return s}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/components/datagrid-allow-tracking-component.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/app/components/base/component.js"),s=i("./bundles/orosync/js/content/grid-builder.js"),n=t.extend({optionNames:t.prototype.optionNames.concat(["gridName"]),constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){s.allowTracking(this.gridName),n.__super__.initialize.call(this,e)}});return n}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/components/datagrid-component.js":(e,t,i)=>{var s;s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/oroui/js/tools.js"),o=i("./bundles/oroui/js/app/services/load-modules.js"),r=i("./bundles/oroui/js/mediator.js"),a=i("./bundles/oroui/js/extend/backbone.js"),l=i("./bundles/oroui/js/app/components/base/component.js"),d=i("./bundles/orodatagrid/js/pageable-collection.js"),c=i("./bundles/orofrontend/js/datagrid/frontend-grid.js"),u=i("./bundles/orodatagrid/js/map-action-module-name.js"),h=i("./bundles/orodatagrid/js/map-cell-module-name.js"),p=i("./bundles/oroui/js/app/plugins/plugin-manager.js"),_=i("./bundles/orodatagrid/js/datagrid/metadata-model.js"),g=i("./bundles/orodatagrid/js/datagrid-theme-options-manager.js"),m="orodatagrid/js/app/plugins/grid/sticked-scrollbar-plugin",f=function(e){return e+"Cell"},b=function(e){return e+"Action"},v=l.extend({currentAppearanceKey:"grid",currentAppearanceId:void 0,changeAppearanceEnabled:!1,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.pluginManager=new p(this),this.changeAppearanceEnabled="appearanceData"in e.metadata.state,(!e.enableFilters||"filters"in e.metadata&&!e.metadata.filters.length)&&(e.builders=s.reject(e.builders,(function(e){return"orofilter/js/datafilter-builder"===e}))),e.metadata.rowLinkEnabled&&e.builders.push("orodatagrid/js/cell-links/builder"),e.builders.push("orodatagrid/js/inline-editing/builder"),e.builders.push("orodatagrid/js/appearance/builder");const i=this;this._deferredInit(),this.built=t.Deferred(),e=e||{},this.fixStates(e),this.processOptions(e);const n=[],r=[];s.each(e.builders,(function(i){const a=t.Deferred();n.push(a.promise()),o(i,(function(t){r.push(t),s.has(t,"processDatagridOptions")?t.processDatagridOptions(a,e):a.resolve()}))})),t.when(...n).always((()=>{this.initDataGrid(e),this.built.then((function(){const n=[];function o(){throw new TypeError("Builder does not have init method")}for(let i=0;i<r.length;i++){const a=r[i],l=t.Deferred();n.push(l.promise()),s.has(a,"init")&&"function"==typeof a.init?a.init(l,e):(l.resolve(),s.defer(o))}t.when(...n).always((function(...t){i.changeAppearanceEnabled&&i.selectAppearanceById(e.metadata.state.appearanceData.id),i.subComponents=s.compact(t),i._resolveDeferredInit(),i.$componentEl.find(".view-loading").remove(),i.$el.show(),i.grid.shown=!0,i.grid.trigger("shown")}))}))}))},processOptions:function(e){if(void 0===e.inputName)throw new Error("Option inputName has to be specified");e.metadata.options.toolbarOptions=t.extend(!0,e.metadata.options.toolbarOptions,e.toolbarOptions),e.$el=t(e._sourceElement),e.gridName=e.gridName||e.metadata.options.gridName,e.builders=e.builders||[],e.builders.push("orodatagrid/js/grid-views-builder"),e.gridPromise=this.built.promise()},initDataGrid:function(e){this.$componentEl=e.$el,this.insertDataGrid(e),this.gridName=e.gridName,this.inputName=e.inputName,this.data=e.data,this.themeOptions=e.themeOptions||{};const t=s.extend(e.metadata.customModules||{},this.themeOptions.customModules);this.metadata=s.defaults(e.metadata,{columns:[],options:{},state:{},initialState:{},rowActions:{},massActions:{},extraActions:{},customModules:t}),this.metadataModel=new _(this.metadata),this.modules={},this.collectModules(),o(this.modules,this.build,this),this.listenTo(this.metadataModel,"change:massActions",((e,t)=>{this.grid.massActions.reset(this.buildActionsOptions(t))})),this.listenTo(this.metadataModel,"change:extraActions",((e,t)=>{this.grid.extraActions.reset(this.buildActionsOptions(t))}))},insertDataGrid:function(e){this.$el=t('<div data-layout="separate">'),this.$componentEl.append(this.$el)},collectModules:function(){const e=this.modules,t=this.metadata;s.each(t.columns,(function(t){const i=t.type;e[f(i)]=h(i)})),[...Object.values(t.rowActions),...Object.values(t.massActions),...Object.values(t.extraActions)].forEach((({frontend_type:t})=>{e[b(t)]=u(t)})),s.each(t.customModules,(function(t,i){s.isString(t)&&(e[function(e){return e+"Custom"}(i)]=t)})),s.each(this.data.data,(function(t){s.each(t.action_configuration,(function(t){const i=t.confirmation&&t.confirmation.component;i&&(e[i]=i)}))})),this.themeOptions.headerHide||(this.metadata.enableFloatingHeaderPlugin?e.FloatingHeaderPlugin="orodatagrid/js/app/plugins/grid/floating-header-plugin":this.metadata.enableFullScreenLayout&&(e.FullscreenPlugin="orodatagrid/js/app/plugins/grid/fullscreen-plugin")),t.options.toolbarOptions.addDatagridSettingsManager&&(e.DatagridSettingsPlugin="orodatagrid/js/app/plugins/grid/datagrid-settings-plugin"),this.themeOptions.showMassActionOnToolbar&&(e.ToolbarMassActionPlugin="orodatagrid/js/app/plugins/grid/toolbar-mass-action-plugin"),this.themeOptions.disableStickedScrollbar||(this.metadata.responsiveGrids&&this.metadata.responsiveGrids.enable?e.StickedScrollbarPlugin=m:!n.isMobile()&&this.metadata.enableFullScreenLayout||(e.StickedScrollbarPlugin=m)),this.themeOptions.enabledAccessibilityPlugin&&(e.AccessibilityPlugin="orodatagrid/js/app/plugins/grid/accessibility-plugin")},build:function(e){let t;const i=e.GridView||c,n=e.PageableCollection||d;t={},this.data&&this.data.data&&(t=this.data.data);const o=this.combineCollectionOptions(e);this.data&&this.data.options&&s.extend(o,this.data.options);const a=new n(t,o),l=this.combineGridOptions();r.trigger("datagrid_create_before",l,a),l.el=this.$el[0],l.themeOptionsConfigurator(i,l);const u=new i(s.extend({collection:a},l));this.grid=u,u.render(),this.changeAppearanceEnabled&&(u.on("changeAppearance",this.onChangeAppearance.bind(this)),a.on("updateState",(()=>{this.currentAppearanceKey===a.state.appearanceType&&this.currentAppearanceId===a.state.appearanceData.id||this.selectAppearanceById(a.state.appearanceData.id)}))),r.trigger("datagrid:rendered",u),this.collection=a,!1!==l.routerEnabled&&this.traceChanges();const h=this.built;u.deferredRender?u.deferredRender.then((function(){h.resolve(u)})):h.resolve(u)},onChangeAppearance:function(e,t){this.selectAppearance(e,t)},selectAppearanceById:function(e){const t=s.find(this.metadata.options.appearances,(function(t){return t.id===e||""===e&&void 0===t.id}));if(t)this.selectAppearance(t.type,t);else{const t=new Error("Could not find appearance `"+e+"`");setTimeout((function(){throw t}),0)}},selectAppearance:function(e,t){if(this.currentAppearanceKey===e&&this.currentAppearanceId===t.id)return;if(this.currentAppearanceKey=e,this.currentAppearanceId=t.id,this.lastAppearancePlugin&&(this.pluginManager.remove(this.lastAppearancePlugin),delete this.lastAppearancePlugin),this.grid.trigger("appearanceChanged",e,t),"grid"===e)return;const i=t.plugin;if(!i)throw new Error("Could not find plugin for appearance key `"+e+"`");this.lastAppearancePlugin=i,this.pluginManager.create(i,t||{}),this.pluginManager.enable(i)},combineCollectionOptions:function(e){return s.extend({inputName:this.gridName,parse:!0,url:"/user/json",state:s.extend({filters:{},sorters:{},columns:{}},this.metadata.state),initialState:this.metadata.initialState,mode:this.metadata.mode||"server",modules:e},this.metadata.options)},combineGridOptions:function(){const e={},t={sortable:!1},i=this.modules,n=this.metadata,o=this.metadata.plugins||[],r=s.map(n.columns,(function(e){const n=["name","label","renderable","editable","sortable","sortingType","align","order","manageable","required","shortenableLabel","cellClassName","notMarkAsBlank","long_value_threshold","editor"],o=s.extend({},t,s.pick.apply(null,[e].concat(n))),r=s.omit.apply(null,[e].concat(n.concat("type")));let a=i[f(e.type)];return s.isEmpty(r)||(a=a.extend(r)),o.cell=a,o}));s.each(n.rowActions,(function(t,s){e[s]=i[b(t.frontend_type)].extend(t)}));const l=this.buildActionsOptions(this.metadata.massActions),d=this.buildActionsOptions(this.metadata.extraActions);Object.values(s.pick(i,["FloatingHeaderPlugin","FullscreenPlugin","DatagridSettingsPlugin","ToolbarMassActionPlugin","AccessibilityPlugin"])).forEach((e=>o.push(e))),i.StickedScrollbarPlugin&&(this.metadata.responsiveGrids&&this.metadata.responsiveGrids.enable?o.push({constructor:i.StickedScrollbarPlugin,options:{viewport:this.metadata.responsiveGrids.viewport||"all"}}):o.push(i.StickedScrollbarPlugin));const c=n.options.appearances||[];switch(c.length){case 0:case 1:break;default:n.options.toolbarOptions.addAppearanceSwitcher=!0,n.options.toolbarOptions.availableAppearances=c.map((function(e){return{key:e.type,id:e.id||"by_type",label:e.label,className:"btn",iconClassName:e.icon,options:e}}))}return{name:this.gridName,columns:r,rowActions:e,massActions:new a.Collection(l),extraActions:new a.Collection(d),toolbarOptions:n.options.toolbarOptions||{},multipleSorting:n.options.multipleSorting||!1,entityHint:n.options.entityHint,noDataMessages:n.options.noDataMessages||{},exportOptions:n.options.export||{},routerEnabled:!!s.isUndefined(n.options.routerEnabled)||n.options.routerEnabled,multiSelectRowEnabled:n.options.multiSelectRowEnabled||l.length,rowClickAction:n.options.rowClickAction||!1,metadata:this.metadata,metadataModel:this.metadataModel,plugins:o,themeOptionsConfigurator:g.createConfigurator(this.themeOptions)}},buildActionsOptions:function(e){const t=[];for(const[i,s]of Object.entries(e)){const e=b(s.frontend_type);e in this.modules&&t.push({action:i,module:this.modules[e].extend(s)})}return t},fixStates:function(e){e.metadata&&(this.fixState(e.metadata.state),this.fixState(e.metadata.initialState))},fixState:function(e){s.isArray(e.filters)&&s.isEmpty(e.filters)&&(e.filters={}),s.isArray(e.sorters)&&s.isEmpty(e.sorters)&&(e.sorters={})},dispose:function(){this.subComponents&&(s.each(this.subComponents,(function(e){e&&"function"==typeof e.dispose&&e.dispose()})),delete this.subComponents),v.__super__.dispose.call(this)},traceChanges:function(){const e=this;this.updateStateInUrl(),this.listenTo(this.collection,{updateState:this.updateStateInUrl,reset:this.updateStateInUrl}),r.once("page:beforeChange",(function(){e.stopListening(e.collection)}))},updateStateInUrl:function(){const e=this.collection.stateHashKey(),t=this.collection.stateHashValue(!0);r.execute("changeUrlParam",e,t)}});return v}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orodatagrid/js/app/components/grid-sidebar-component.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/extend/jquery.js"),n=i("./bundles/oroui/js/mediator.js"),o=i("./bundles/fosjsrouting/js/router.js"),r=i("./bundles/oroui/js/widget/widget-manager.js"),a=i("./bundles/oroui/js/app/components/base/component.js"),l=i("./bundles/orodatagrid/js/pageable-collection.js"),d=a.extend({options:{sidebarAlias:"",widgetAlias:"",widgetRoute:"oro_datagrid_widget",widgetRouteParameters:{gridName:""},gridParam:"grid"},listen:{"grid_load:complete mediator":"onGridLoadComplete"},gridCollection:{},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.options=t.defaults(e||{},this.options),n.on("grid-sidebar:change:"+this.options.sidebarAlias,this.onSidebarChange,this)},onGridLoadComplete:function(e,t){if(e.inputName===this.options.widgetRouteParameters.gridName){this.gridCollection=e;const i=this;r.getWidgetInstanceByAlias(this.options.widgetAlias,(function(){i._patchGridCollectionUrl(i._getQueryParamsFromUrl(location.search))})),this.options._sourceElement.closest('[data-role="grid-sidebar-component-container"]').find(t).length&&n.trigger("grid-sidebar:load:"+this.options.sidebarAlias)}},onSidebarChange:function(e){const i=t.extend(this._getQueryParamsFromUrl(location.search),this._getDatagridParams(),e.params);e=t.extend({reload:!0,updateUrl:!0},e);const s=t.extend(t.omit(this.options.widgetRouteParameters,this.options.gridParam),i);if(e.updateUrl&&this._pushState(t.omit(i,t.isNull)),this._patchGridCollectionUrl(i),e.reload)if(e.widgetReload){const e=this;r.getWidgetInstanceByAlias(this.options.widgetAlias,(function(t){t.loading&&t.loading.abort(),t.setUrl(o.generate(e.options.widgetRoute,s)),t.render()}))}else this.gridCollection.getPage(1)},_patchGridCollectionUrl:function(e){const i=this.gridCollection;if(!t.isUndefined(i)){let s=i.url;if(t.isUndefined(s))return;const n=t.extend(this._getQueryParamsFromUrl(s),t.omit(e,this.options.gridParam));-1!==s.indexOf("?")&&(s=s.substring(0,s.indexOf("?"))),t.isEmpty(n)||(i.url=s+"?"+this._urlParamsToString(n))}},_pushState:function(e){const i=this._urlParamsToString(t.omit(e,["saveState"])),s=n.execute("pageCache:getCurrent");n.execute("changeUrl",s.path+"?"+i)},_getQueryParamsFromUrl:function(e){if(t.isUndefined(e))return{};if(-1===e.indexOf("?"))return{};const i=e.substring(e.indexOf("?")+1,e.length);return i.length?l.decodeStateData(i):{}},_urlParamsToString:function(e){return s.param(e)},_getDatagridParams:function(){const e={};return t.has(this.gridCollection,"options")?(e[this.gridCollection.options.gridName]=this.gridCollection.urlParams,e):e},dispose:function(){this.disposed||(n.off("grid-sidebar:change:"+this.options.sidebarAlias),delete this.gridCollection,d.__super__.dispose.call(this))}});return d}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/components/multi-grid-component.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/mediator.js"),n=i("./bundles/oroui/js/widget/widget-manager.js"),o=i("./bundles/oroui/js/app/components/base/component.js"),r=i("./bundles/orodatagrid/js/app/views/multi-grid-view.js");return o.extend({options:{},contextView:null,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.options=e,this.initView(),this.contextView.render(),this._bindGridEvent()},initView:function(){let e=this.options.params||{},i={};n.getWidgetInstanceByAlias(this.options.dialogWidgetName,(function(e){i=e.options.routeParams||{}})),t.isEmpty(i)||(e=t.extend({},e,{routeParams:i})),this.contextView=new r({items:this.options.items||[],el:this.options._sourceElement,params:e,dialogWidgetName:this.options.dialogWidgetName,gridWidgetName:this.options.gridWidgetName})},_bindGridEvent:function(){const e=this,t=this.options.gridWidgetName;t&&n.getWidgetInstanceByAlias(t,(function(t){t.on("grid-row-select",e.onRowSelect.bind(e,t))}))},onRowSelect:function(e,t){const i=t.model.get("id"),o=this.options.dialogWidgetName,r=this.contextView.currentTargetClass();s.trigger(o+":select",JSON.stringify({entityClass:r,entityId:i})),n.getWidgetInstanceByAlias(o,(function(e){e.remove()}))}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/components/toolbar-mass-action-component.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/app/components/base/component.js"),n=i("./bundles/orodatagrid/js/datagrid/actions-panel.js"),o=s.extend({grid:null,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){t.extend(this,t.pick(e,["collection","actions","grid"]));const i=[],s=this.grid;this.actions.each((function(e){const t=new(e.get("module"))({datagrid:s});this.listenTo(t,"preExecute",this.onActionRun.bind(this)),i.push(t)}),this),this.actionsPanel=new n({actions:i,el:e._sourceElement}),this.actionsPanel.render(),this.listenTo(this.grid.collection,"backgrid:refresh",(function(){this.actionsPanel.$el.is(":visible")&&this.actionsPanel.$el.dropdown("toggle")})),o.__super__.initialize.call(this,e)},onActionRun:function(e){e&&e.disposed||e.launcherInstance.$el.trigger("tohide.bs.dropdown")},dispose:function(){this.disposed||(delete this.collection,delete this.actions,delete this.grid,o.__super__.dispose.call(this))}});return o}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/models/board-data-collection.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/orotranslation/js/translator.js"),i("./bundles/oroui/js/extend/chaplin.js"),i("./bundles/oroui/js/app/models/base/collection.js")],void 0===(n=function(e,t,i,s){"use strict";const n=s.extend({constructor:function e(...t){e.__super__.constructor.apply(this,t)},initialize:function(e,t){n.__super__.initialize.call(this,e,t)},updateBoardItem:function(e,t){e=this.get(e.get("id"));const i=this.indexOf(e);let s;if(t.insertAfter){if(t.insertAfter=this.get(t.insertAfter),!t.insertAfter)throw new Error("`insertAfter` contains item which does not belong to this collection");this.models.splice(i,1),s=this.indexOf(t.insertAfter),this.models.splice(s+1,0,e)}else if(t.insertBefore){if(t.insertBefore=this.get(t.insertBefore),!t.insertBefore)throw new Error("`insertBefore` contains item which does not belong to this collection");s=this.indexOf(t.insertBefore),this.models.splice(s,0,e)}else this.models.splice(i,1),this.models.unshift(e);t.properties&&e.set(t.properties,{silent:!0}),this.trigger("sort")}});return n}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/app/models/datagrid-settings-list/datagrid-settings-list-collection.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/app/models/base/collection.js").extend({comparator:"order",minVisibleColumnsQuantity:1,constructor:function e(...t){e.__super__.constructor.apply(this,t)},initialize:function(e,i){t.extend(this,t.pick(i,["minVisibleColumnsQuantity"])),s.__super__.initialize.call(this,e,i),this.on({"change:renderable":this.updateVisibilityChange})},reset:function(...e){s.__super__.reset.apply(this,e),this.updateVisibilityChange(),this.each((function(e,t){e.set("order",t)}))},updateVisibilityChange:function(){const e=this.where({renderable:!0}).length<=this.minVisibleColumnsQuantity;this.each((function(t){const i=Boolean(t.get("renderable")&&(e||t.get("required")));t.get("disabledVisibilityChange")!==i&&t.set("disabledVisibilityChange",i)}),this)}});return s}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/models/datagrid-settings-list/datagrid-settings-list-filter-model.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";return i("./bundles/oroui/js/app/models/base/model.js").extend({defaults:{search:"",renderable:!1},constructor:function e(...t){e.__super__.constructor.apply(this,t)},filterer:function(e){const t=this.get("search").toLowerCase();return!(t.length>0&&-1===e.get("label").toLowerCase().indexOf(t)||this.get("renderable")&&!e.get("renderable"))}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/plugins/grid-component/board-appearance-plugin.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/oroui/js/extend/backbone.js"),o=i("./bundles/oroui/js/app/plugins/base/plugin.js"),r=i("./bundles/oroui/js/tools/collection-tools.js"),a=i("./bundles/oroui/js/app/services/load-modules.js"),l=i("./bundles/orodatagrid/js/app/models/board-data-collection.js"),d=o.extend({defaultPagesize:10,enable:function(){const e=this,t=this.options.board_view,i=this.options.column_view,n=this.options.column_header_view,o=this.options.card_view;this.view=new t({readonly:this.options.readonly,columnView:i,columnHeaderView:n,cardView:o,boardPlugin:this,columns:this.getColumns(),boardCollection:this.getBoardCollection(),serverCollection:this.main.collection,cardActions:this.main.grid.rowActions}),this.listenTo(this.view,"update",(function(e,t){t.column.get("transition").class.build(e,t.column,this,t.relativePosition).start()})),this.listenTo(this.view,"navigate",(function(e,t,i){i.parameters||(i.parameters={}),i.parameters.boardColumnIds=JSON.stringify(t.ids),this.main.grid.runRowClickAction(e,i)})),this.listenTo(this.view,"loadMoreIfPossible",(function(){this.main.collection.isLoadingMore||this.main.collection.hasExtraRecordsToLoad()&&this.main.collection.loadMore()})),this.view.render(),this.view.$el.insertAfter(this.main.$el.find(".other-scroll-container")),this.main.$el.find(".other-scroll-container, .pagination, .page-size, .datagrid-settings, .extra-actions-panel").hide(),this.main.$el.find(".visible-items-counter").show(),this.main.$el.find(".board").show(),this.restoreSortableOnColumns=[],this.main.grid.columns.filter((function(t){if(t.get("name")===e.options.group_by)return!0})).forEach((function(t){t.get("sortable")&&(e.restoreSortableOnColumns.push(t),t.set({sortable:!1}))})),"board"===this.main.collection.state.appearanceType&&this.main.collection.state.appearanceData.id===this.options.id||(this.oldPageSize=this.main.collection.state.pageSize,this.main.collection.state.pageSize=this.options.pagesize||this.defaultPagesize,this.main.collection.state.sorters.hasOwnProperty(this.options.group_by)&&(this.oldSorting=s.extend({},this.main.collection.state.sorters),delete this.main.collection.state.sorters[this.options.group_by],0===s.keys(this.main.collection.state.sorters).length&&(this.main.collection.state.sorters=s.extend({},this.main.collection.initialState.sorters))),this.main.collection.setAppearance("board",{id:this.options.id})),d.__super__.enable.call(this)},disable:function(){this.main.$el.find(".board").hide(),this.main.$el.find(".other-scroll-container, .pagination, .page-size, .datagrid-settings, .extra-actions-panel").show(),this.main.$el.find(".visible-items-counter").hide(),this.restoreSortableOnColumns&&this.restoreSortableOnColumns.length&&(this.restoreSortableOnColumns.forEach((function(e){e.set({sortable:!0})})),delete this.restoreSortableOnColumns),this.main.pluginManager.disposing||"grid"===this.main.collection.state.appearanceType&&void 0===this.main.collection.state.appearanceData.id||(this.oldSorting&&(this.main.collection.state.sorters=this.oldSorting||this.main.collection.initialState.sorters,delete this.oldSorting),this.main.collection.state.pageSize=this.oldPageSize||this.main.collection.initialState.pageSize,this.main.collection.setAppearance("grid",{id:void 0})),this._collection&&this._collection.dispose(),this.view.dispose(),this._columns||(this._columns.each((function(e){e.dispose()})),this._columns.dispose()),d.__super__.disable.call(this)},getBoardCollection:function(){return this._collection||(this._collection=new l(this.main.collection.models),this._collection.listenTo(this.main.collection,"add remove reset sort",(()=>{this._collection.reset(this.main.collection.models)}))),this._collection},getColumns:function(){const e=this;function t(t,i){return{id:t,ids:i.ids,columnDefinition:i,label:i.label,items:r.createFilteredCollection(e.getBoardCollection(),{criteria:function(t){return-1!==i.ids.indexOf(t.get(e.options.group_by))}}),transition:i.transition}}if(!this._columns){const e=[];for(let i=0;i<this.options.columns.length;i++){const s=this.options.columns[i];e.push(t(i,s))}this._columns=new n.Collection(e)}return this._columns}},{defaultOptions:{board_view:"orodatagrid/js/app/views/board/board-view",card_view:"orodatagrid/js/app/views/board/card-view",column_header_view:"orodatagrid/js/app/views/board/column-header-view",column_view:"orodatagrid/js/app/views/board/column-view"},saveApiAccessorDefaults:{class:"oroui/js/tools/api-accessor",http_method:"PATCH"},transitionDefaults:{class:"orodatagrid/js/app/transitions/update-main-property-transition"},processMetadata:function(e,i){return s.defaults(e,this.defaultOptions),e.default_transition.save_api_accessor||(e.default_transition.save_api_accessor=s.extend({},i.metadata.inline_editing.save_api_accessor)),s.defaults(e.default_transition.save_api_accessor,this.saveApiAccessorDefaults),e.columns.forEach((function(t){t.transition||(t.transition=e.default_transition),t.transition.save_api_accessor||(t.transition.save_api_accessor=e.default_transition.save_api_accessor),s.extend(t.transition,d.transitionDefaults)})),t.when(a.fromObjectProp(e,"board_view"),a.fromObjectProp(e,"card_view"),a.fromObjectProp(e,"column_header_view"),a.fromObjectProp(e,"column_view"),t.when(...e.columns.map((e=>a.fromObjectProp(e.transition,"class")))),t.when(...e.columns.map((e=>a.fromObjectProp(e.transition.save_api_accessor,"class")))))}});return d}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/plugins/grid/accessibility-plugin.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>g});var s=i("./bundles/oroui/js/app/plugins/base/plugin.js"),n=i.n(s),o=i("./bundles/oroui/js/extend/backbone.js");class r{constructor(e){if(void 0===e||!(e[0]instanceof HTMLElement))throw new Error('Option "$table" is required');this.$table=e,this.setCurrentCell(e.find("[aria-colindex]:first"))}setCurrentCell(e){if(!this.$table[0].contains(e[0])||!e.is("[aria-colindex]")||e.is(this._$cell))return this;const{_$cell:t}=this;return this._$cell=e,this.trigger("change:current",e,t),this}get $cell(){return this._$cell}get $row(){return this.$cell.closest("[aria-rowindex]")}get colindex(){return Number(this.$cell.attr("aria-colindex"))}get rowindex(){return Number(this.$row.attr("aria-rowindex"))}get index(){return[this.rowindex,this.colindex]}prev(){const e=this.$cell.prevAll("[aria-colindex]:visible:first");return e.length&&this.setCurrentCell(e),this}next(){const e=this.$cell.nextAll("[aria-colindex]:visible:first");return e.length&&this.setCurrentCell(e),this}firstInRow(){const e=this.$row.find("[aria-colindex]:visible:first");return this.$cell.is(e)||this.setCurrentCell(e),this}lastInRow(){const e=this.$row.find("[aria-colindex]:visible:last");return this.$cell.is(e)||this.setCurrentCell(e),this}prevRow(){return this._goToRow(-1)}nextRow(){return this._goToRow(1)}firstRow(){return this._goToRow(-1/0)}lastRow(){return this._goToRow(1/0)}_goToRow(e){const t=this.$table.find("[aria-rowindex]:visible"),i=t.index(this.$row);let s,n;for(e===-1/0?(s=0,e=1):e===1/0?(s=t.length-1,e=-1):s=i+e;s!==i&&s>=0&&s<t.length&&!n;)n=t.eq(s).find(`[aria-colindex="${this.colindex}"]:visible:first`),n.length||(s+=e,n=null);return n&&this.setCurrentCell(n),this}}Object.assign(r.prototype,o.Events);const a=r;var l=i("./bundles/oroui/js/tools/manage-focus.js"),d=i("./bundles/oroui/js/extend/underscore.js"),c=i.n(d),u=i("./bundles/oroui/js/extend/jquery.js"),h=i.n(u);function p(e){return e.clone().find(".sr-only").remove().end().text().trim()}const _=n().extend({iterator:null,events:()=>({"select2-close table.grid-main-container"(){this._forceInnerFocus=!0},"focusin table.grid-main-container":"onFocusin","focusout table.grid-main-container":"onFocusout","keydown table.grid-main-container":"onKeyDown","keyup table.grid-main-container":"onKeyUp"}),ignoreEntrusted:"[data-toggle]",_isDocumentClick:!1,_isDocumentKeyPressed:void 0,_isFocusInside:!1,_forceInnerFocus:!1,_lastIndex:null,constructor:function e(t,i){e.__super__.constructor.call(this,t,i)},initialize(e,t){Object.assign(this,c().pick(t,"ignoreEntrusted")),this.listenTo(this.main,{"content:update"(){this.enabled&&!this.suspended&&this.$table.is(":visible")&&this._resumeNavigation()},"loading-mask:show":this._suspendNavigation,"loading-mask:hide":this._resumeNavigation}),this.listenToOnce(this.main,"rendered",(()=>{this.$table=this.main.$("table.grid-main-container"),this.enable()})),_.__super__.initialize.call(this,e,t)},delegateEvents(){_.__super__.delegateEvents.call(this),h()(document).on({[`mousedown${this.ownEventNamespace()}`]:this.onDocumentMouseDown.bind(this),[`mouseup${this.ownEventNamespace()}`]:this.onDocumentMouseUp.bind(this),[`dragstart${this.ownEventNamespace()}`]:this.onDocumentDragstart.bind(this),[`keydown${this.ownEventNamespace()}`]:this.onDocumentKeyDown.bind(this),[`keyup${this.ownEventNamespace()}`]:this.onDocumentKeyUp.bind(this)})},undelegateEvents(){_.__super__.undelegateEvents.call(this),h()(document).off(this.ownEventNamespace())},dispose(){this.disposed||(this.disable(),_.__super__.dispose.call(this))},enable(){void 0!==this.$table&&0!==this.$table.length&&(this.iterator=new a(this.$table),this.listenTo(this.iterator,"change:current",this.onCurrentChange),this._resetCurrent(),this.delegateEvents(),_.__super__.enable.call(this))},disable(){this.enabled&&(this.$table&&this.$table.find("[aria-colindex]").removeAttr("tabindex").removeAttr("data-ignore-tabbable"),this.undelegateEvents(),this.stopListening(this.iterator),delete this.iterator,this.enabled=!1,this.trigger("disabled"))},onFocusin(e){clearTimeout(this._focusoutTimeoutID);const t=this.$table.find(e.target),i=t.closest("[aria-colindex]"),s=this._isDocumentClick||(this._isFocusInside||"Tab"!==this._isDocumentKeyPressed)&&(!e.relatedTarget||this.$table[0].contains(e.relatedTarget))&&(!i.is("[data-ignore-tabbable]")||this._isFocusInside||this._forceInnerFocus);let n;if((i.is(t)||s)&&(n=i,this._isFocusInside=!i.is(t)&&!this.entrustedTabbable(i).is(t)),n)this.iterator.setCurrentCell(n);else if(!i.is("[data-ignore-tabbable]")){const e=this.defineFocusElement({allowInnerFocus:s});this.focusElement(e)}!this.isInnerFocus()&&t.is(document.activeElement)&&e.target.classList.add("focus-via-arrows-keys"),this._forceInnerFocus=!1,delete this._lastIndex},onFocusout(e){if((!e.relatedTarget||!this.$table[0].contains(e.relatedTarget))&&(this._focusoutTimeoutID=setTimeout((()=>{this.disposed||(this._isFocusInside=!1,this.removeIgnoreTabbableAttributes())}),10),!e.relatedTarget&&h()(document.activeElement).is("body"))){const t=h()(e.target).closest(".dropdown-menu");if(t.length){const e=t.parent().find('[data-toggle="dropdown"]');this.focusElement(e.is(":tabbable")?e:e.find(":tabbable:first"))}else this.suspended||this._isDocumentClick||(this._lastIndex=this.iterator.index,setTimeout((()=>{this._restoreCurrent()})))}const t=h()(e.relatedTarget).closest('[role="dialog"], [role="alertdialog"]');t.length&&(this._lastIndex=this.iterator.index,t.is(".ui-dialog")?t.one("dialogclose",this.onDialogClose.bind(this)):t.one("hidden.bs.modal",this.onDialogClose.bind(this))),e.target.classList.remove("focus-via-arrows-keys")},onKeyDown(e){const t=this.$table.find(e.target),{$cell:i}=this.iterator;if(this.isInnerFocus())"Escape"===e.key?(this._isFocusInside=!1,this.focusElement(i),e.preventDefault()):l.Z.preventTabOutOfContainer(e,i);else switch(e.key){case"Tab":this.addIgnoreTabbableAttributes();break;case"ArrowLeft":this.iterator.prev(),e.preventDefault();break;case"ArrowRight":this.iterator.next(),e.preventDefault();break;case"ArrowUp":this.iterator.prevRow(),e.preventDefault();break;case"ArrowDown":this.iterator.nextRow(),e.preventDefault();break;case"Home":e.ctrlKey&&this.iterator.firstRow(),this.iterator.firstInRow(),e.preventDefault();break;case"End":e.ctrlKey&&this.iterator.lastRow(),this.iterator.lastInRow(),e.preventDefault();break;case"PageDown":e.preventDefault(),!this.main.disposed&&this.main.collection.hasNext()&&this.main.collection.getNextPage();break;case"PageUp":e.preventDefault(),!this.main.disposed&&this.main.collection.hasPrevious()&&this.main.collection.getPreviousPage();break;case"Enter":case" ":const s=this.entrustedTabbable(i),n=i.find(":tabbable");t.is("[aria-colindex]")&&!s.length&&(n.length?(this._isFocusInside=!0,this.focusElement(n.first())):(t.trigger("mousedown"),t.trigger("mouseup"),t.click()),e.preventDefault())}},onKeyUp(e){"Tab"===e.key&&this.removeIgnoreTabbableAttributes()},onCurrentChange(){if(this._updateTabindexAttribute(),this.$table[0].contains(document.activeElement)){const e=this.defineFocusElement({allowInnerFocus:!0});this.focusElement(e)}},addIgnoreTabbableAttributes(){this.$table.find("[aria-colindex]").attr("data-ignore-tabbable","")},removeIgnoreTabbableAttributes(){this.$table.find("[aria-colindex]").removeAttr("data-ignore-tabbable")},defineFocusElement({allowInnerFocus:e=!1}){const t=this.entrustedTabbable(this.iterator.$cell);return e&&this.iterator.$cell[0].contains(document.activeElement)&&!t.length?h()(document.activeElement):t.length?t:this.iterator.$cell},focusElement(e){const{$cell:t}=this.iterator;t.is(e)||t.removeAttr("data-ignore-tabbable"),e.is(document.activeElement)||e.focus()},entrustedTabbable(e){const t=e.find(":tabbable");return 1===t.length&&t.is(`:not(${this.ignoreEntrusted})`)&&p(t)===p(e)?t:h()()},isInnerFocus(){const{$cell:e}=this.iterator;return this._isFocusInside&&!e.is(document.activeElement)&&!this.entrustedTabbable(e).is(document.activeElement)},onDialogClose(){this._restoreCurrent()},onDocumentMouseDown(){this._isDocumentClick=!0},onDocumentMouseUp(){this._isDocumentClick=!1},onDocumentDragstart(){this._isDocumentClick=!1},onDocumentKeyDown(e){this._isDocumentKeyPressed=e.key},onDocumentKeyUp(){delete this._isDocumentKeyPressed},_updateTabindexAttribute(){const{$cell:e}=this.iterator;this.entrustedTabbable(e).length?e.removeAttr("tabindex"):e.attr("tabindex",0),this.$table.find("[aria-colindex]").not(e).attr("tabindex",-1)},_resetCurrent(){const e=this.iterator;if(this.iterator.setCurrentCell(this.$table.find("[aria-colindex]:visible:first")),this.$table.find("[aria-colindex]:not(th)").length)for(;e.$cell.is("th")&&e.$cell!==e.nextRow().$cell;);e.$cell.is(".select-row-cell")&&e.next(),e.$cell.is(".action-cell")&&e.prev()},_restoreCurrent(){if(!this._lastIndex)return;let e,[t,i]=this._lastIndex;for(delete this._lastIndex;(!e||!e.length)&&t>=0;)e=this.$table.find(`[aria-rowindex="${t}"] [aria-colindex="${i}"]`),t-=1;if(e&&e.length&&(this.iterator.setCurrentCell(e),h()(document.activeElement).is("body"))){const e=this.defineFocusElement({});this.focusElement(e)}},_suspendNavigation(){this.suspended=!0,this.$table[0].contains(document.activeElement)&&(this._lastIndex=this.iterator.index,document.activeElement.blur())},_resumeNavigation(){this.suspended=!1,this.enabled&&(this._lastIndex?this._restoreCurrent():this.$table.find(this.iterator.$cell).is(":visible")||this._resetCurrent(),this._updateTabindexAttribute())}}),g=_},"./bundles/orodatagrid/js/app/plugins/grid/datagrid-settings-plugin.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/orotranslation/js/translator.js"),r=i("./bundles/oroui/js/app/plugins/base/plugin.js"),a=i("./bundles/orodatagrid/js/datagrid/action/show-component-action.js"),l=i("./bundles/orodatagrid/js/app/views/grid/datagrid-manage-column-view.js"),d=i("./bundles/orodatagrid/js/app/views/grid/datagrid-manage-filter-view.js"),c=i("./bundles/orodatagrid/js/app/views/grid/datagrid-settings-view.js");let u=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);u=n.extend({icon:"cog",wrapperClassName:"datagrid-settings "+(n.isRTL()?"dropright":"dropleft"),label:o("oro.datagrid.settings.title"),ariaLabel:o("oro.datagrid.settings.title_aria_label")},u);const h=r.extend({enable:function(){this.listenTo(this.main,"beforeToolbarInit",this.onBeforeToolbarInit),h.__super__.enable.call(this)},onBeforeToolbarInit:function(e){const t={datagrid:this.main,launcherOptions:n.extend(u,{allowDialog:n.isMobile(),componentConstructor:e.componentConstructor||c,viewConstructors:e.viewConstructors||[{id:"grid",label:o("oro.datagrid.settings.tab.grid"),view:l,options:{collection:this.main.columns}},{id:"filters",label:o("oro.datagrid.settings.tab.filters"),view:d,options:{collection:n.filter(this.main.metadata.filters,(function(e){return e.visible})),addSorting:!1}}],columns:this.main.columns},e.datagridSettings),order:600};e.addToolbarAction(new a(t))}});return h}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orodatagrid/js/app/plugins/grid/floating-header-plugin.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/oroui/js/app/plugins/base/plugin.js"),o=i("./bundles/oroui/js/extend/backbone.js"),r=i("./bundles/oroui/js/mediator.js"),a=i("./bundles/oroui/js/tools/scroll-helper.js"),l=i("./bundles/oroui/js/tools.js"),d=n.extend({initialize:function(e){this.grid=e,this.grid.on("shown",this.onGridShown.bind(this)),this.grid.on("changeAppearance",(()=>{delete this.headerHeight})),this.selectMode=this.selectMode.bind(this),this.checkLayout=this.checkLayout.bind(this),this.fixHeaderCellWidth=this.fixHeaderCellWidth.bind(this)},onGridShown:function(){this.enabled&&!this.connected&&this.enable()},enable:function(){this.grid.rendered?(this.setupCache(),this.$el.addClass("with-floating-header"),this.rescrollCb=this.enableOtherScroll(),this.fixHeaderCellWidth(),this.supportDropdowns(),this.listenTo(r,"layout:headerStateChange",this.checkLayout),this.listenTo(r,"layout:reposition",this.checkLayout),this.listenTo(this.grid,"content:update",this.onGridContentUpdate),this.listenTo(this.grid,"ensureCellIsVisible",this.ensureCellIsVisible),this.checkLayoutIntervalId=setInterval(this.checkLayout,400),this.connected=!0,d.__super__.enable.call(this)):d.__super__.enable.call(this)},disable:function(){this.connected=!1,clearInterval(this.checkLayoutIntervalId),this.domCache.gridContainer.parents().add(document).off(".float-thead"),this.manager.disposing||(this.setFloatTheadMode("default"),this.disableOtherScroll(),this.$grid.off(".float-thead"),this.domCache.headerCells.attr("style","")),this.$el.removeClass("with-floating-header"),d.__super__.disable.call(this)},setupCache:function(){this.$grid=this.grid.$grid,this.$el=this.grid.$el,this.documentHeight=a.documentHeight(),this.domCache={body:t(document.body),gridContainer:this.$grid.parent(),headerCells:this.$grid.find("th:first").parent().find("th.renderable"),otherScrollContainer:this.$grid.parents(".other-scroll-container:first"),gridScrollableContainer:this.$grid.parents(".grid-scrollable-container:first"),otherScroll:this.$el.find(".other-scroll"),otherScrollInner:this.$el.find(".other-scroll > div"),thead:this.$grid.find("thead:first"),theadTr:this.$grid.find("thead:first tr:first")},this.headerHeight||(this.headerHeight=this.domCache.theadTr.height())},supportDropdowns:function(){const e=s.debounce((()=>{this.domCache.thead.find('.show > [data-toggle="dropdown"]').trigger("tohide.bs.dropdown")}),100,!0);this.$grid[0].addEventListener("click",(i=>{const s=t(i.target).is("input[type=checkbox]"),n=t(i.target).closest('[data-toggle="dropdown"]');n.length&&n.parent().is("thead:first .dropdown:not(.show)")&&!s&&(e(),this.isHeaderDropdownVisible=!0,a.scrollIntoView(n[0],void 0,10,10))}),!0),this.$grid.on("hide.bs.dropdown",(()=>{this.isHeaderDropdownVisible=!1,this.selectMode()})),this.domCache.gridContainer.parents().add(document).on("scroll.float-thead",(()=>{e(),this.checkLayout()})),this.domCache.gridScrollableContainer.on("updateScroll",this.selectMode.bind(this))},fixHeaderCellWidth:function(){r.trigger("gridHeaderCellWidth:beforeUpdate"),this.setupCache();const e=this.domCache.headerCells,t=this.domCache.gridScrollableContainer[0].scrollLeft;let i=0;const n=[];e.attr("style",""),this.$grid.css({width:""}),this.domCache.gridContainer.css({width:""}),this.$el.removeClass("floatThead");const o=this.$grid[0].scrollWidth;e.each((function(e,t){n.push(t.scrollWidth)}));const a=s.reduce(n,(function(e,t){return e+t}));a!==o&&(i=(o-a)/n.length),e.each((function(e,t){const s=n[e]+i;t.style.width=s+"px",t.style.maxWidth=s+"px",t.style.minWidth=s+"px",t.style.boxSizing="border-box"})),"default"!==this.currentFloatTheadMode&&this.$el.addClass("floatThead"),this.$grid.css({width:o}),this.domCache.gridContainer.css({width:o}),this.domCache.gridScrollableContainer[0].scrollLeft=t,r.trigger("gridHeaderCellWidth:updated"),this.selectMode()},selectMode:function(){const e=this.domCache.gridContainer[0].getBoundingClientRect(),t=a.getVisibleRect(this.$grid[0],{top:-this.headerHeight},"default"===this.currentFloatTheadMode);let i="default";(Math.ceil(t.top)!==Math.ceil(e.top)&&e.bottom>this.headerHeight||"fullscreen"===this.grid.layout)&&(i=this.isHeaderDropdownVisible?"relative":"fixed"),this.setFloatTheadMode(i,t,e),this._lastClientRect=this.domCache.otherScrollContainer[0].getBoundingClientRect(),this._lastScrollLeft=this.domCache.gridScrollableContainer.scrollLeft(),this.rescrollCb&&this.rescrollCb()},setFloatTheadMode:function(e,t,i){let n;switch(t||(t=a.getVisibleRect(this.domCache.gridContainer[0],{top:-this.headerHeight},"default"===this.currentFloatTheadMode)),i||(i=this.domCache.gridContainer[0].getBoundingClientRect()),e){case"relative":this.currentFloatTheadMode!==e&&(this.$el.removeClass("floatThead-fixed"),this.$el.addClass("floatThead-relative floatThead"),this._ensureTHeadSizing()),n=this.domCache.thead[0].getBoundingClientRect(),requestAnimationFrame((()=>{this.domCache.thead.css({width:"",top:t.top-i.top,left:""}),this.domCache.theadTr.css({["margin"+(s.isRTL()?"Right":"Left")]:s.isRTL()?n.right-i.right:i.left-n.left})})),"relative"===e&&(this._lastScrollTop=this.domCache.gridScrollableContainer.scrollTop());break;case"fixed":this.currentFloatTheadMode!==e&&(this.$el.removeClass("floatThead-relative"),this.$el.addClass("floatThead-fixed floatThead"),this._ensureTHeadSizing()),requestAnimationFrame((()=>{let e=t.top;l.isIOS()&&l.isDesktop()&&(e+=document.scrollingElement.scrollTop),this.domCache.thead.css({top:e,width:t.right-t.left,height:Math.min(this.headerHeight,t.bottom-t.top),left:t.left}),n=this.domCache.thead[0].getBoundingClientRect(),this.domCache.theadTr.css({["margin"+(s.isRTL()?"Right":"Left")]:s.isRTL()?n.right-i.right:i.left-n.left})}));break;default:this.currentFloatTheadMode!==e&&requestAnimationFrame((()=>{this.$grid.find(".thead-sizing").remove(),this.$el.removeClass("floatThead-relative floatThead-fixed floatThead"),this.domCache.thead.attr("style",""),this.domCache.theadTr.attr("style","")}))}this.currentFloatTheadMode=e},onGridContentUpdate:function(){const e=this.$grid.find(".thead-sizing");e.length&&(e.remove(),this._ensureTHeadSizing()),this.fixHeaderCellWidth()},_ensureTHeadSizing:function(){if(!this.$grid.find(".thead-sizing").length){const e=this.domCache.thead.clone();e.addClass("thead-sizing"),e.find("th").attr("style",""),e.insertAfter(this.domCache.thead)}},enableOtherScroll:function(){let e;const t=this,i=this.domCache.gridScrollableContainer,n=this.domCache.otherScroll,a=this.domCache.otherScrollInner,l=r.execute("layout:scrollbarWidth"),d=new o.Model;if(this.scrollStateModel=d,0===l)return s.noop;function c(e){d.set({scrollTop:e.currentTarget.scrollTop})}function u(){d.set({headerHeight:t.headerHeight});const e=i[0].getBoundingClientRect().height;let s=i[0].scrollHeight;const n=i[0].offsetHeight;n!==e&&n===Math.round(e)&&(s-=1),t.scrollVisible=i[0].clientHeight<s,d.set({visible:t.scrollVisible,scrollHeight:i[0].scrollHeight,clientHeight:i[0].clientHeight,scrollTop:i[0].scrollTop}),d.set({clientWidth:i[0].clientWidth})}return d.on("change:headerHeight",(function(t,s){e=s+1,n.css({width:l,marginTop:e}),d.trigger("change:scrollHeight",d,i[0].scrollHeight),d.trigger("change:clientHeight",d,i[0].clientHeight)}),this),d.on("change:visible",(function(e,t){i.css({width:"calc(100% + "+(t?l:0)+"px)"}),n.css({display:t?"block":"none"}),i.toggleClass("scrollbar-is-visible",Boolean(t))}),this),d.on("change:clientHeight",(function(t,i){n.css({height:i-e})}),this),d.on("change:clientWidth",(function(e,t){n.css({["margin"+(s.isRTL()?"Right":"Left")]:t-l})}),this),d.on("change:scrollHeight",(function(t,i){a.css({height:i-e})})),d.on("change:scrollTop",(function(e,t){n[0].scrollTop!==t&&(n[0].scrollTop=t),i[0].scrollTop!==t&&(i[0].scrollTop=t)}),this),i.on("scroll",c),n.on("scroll",c),u(),u},disableOtherScroll:function(){this.domCache.gridScrollableContainer.off("scroll",this.rescrollCb),this.domCache.otherScroll.off("scroll"),this.domCache.otherScroll.css({display:"none"}),this.domCache.gridScrollableContainer.css({width:""}).removeClass("scrollbar-is-visible"),this.domCache.gridScrollableContainer.off("updateScroll"),this.domCache.gridContainer.css({width:""}),this.$grid.css({width:""}),this.scrollStateModel.destroy(),delete this.scrollStateModel,delete this.rescrollCb},checkLayout:function(){if(!this.connected)return;let e;if("default"===this.currentFloatTheadMode&&"fullscreen"===this.grid.layout&&"default"===this.currentFloatTheadMode&&0!==this.domCache.gridScrollableContainer.scrollTop())return void this.selectMode();if("relative"===this.currentFloatTheadMode&&this.domCache.gridScrollableContainer.scrollTop()!==this._lastScrollTop)return void this.selectMode();const t=this.domCache.otherScrollContainer[0].getBoundingClientRect();this._lastClientRect&&this._lastClientRect.top===t.top&&this._lastClientRect.left===t.left&&this._lastClientRect.right===t.right?(e=this.domCache.gridScrollableContainer.scrollLeft(),this._lastScrollLeft!==e?(this.selectMode(),this._lastScrollLeft=e):this._lastClientRect.bottom!==t.bottom&&this.rescrollCb()):this._lastClientRect&&this._lastClientRect.left===t.left&&this._lastClientRect.right===t.right?this.selectMode():this.fixHeaderCellWidth(),this._lastClientRect=t},ensureCellIsVisible:function(e,t){e.isDefaultPrevented()||this.currentFloatTheadMode in{relative:!0,fixed:!0}&&(this.fixHeaderCellWidth(),a.scrollIntoView(t.el,((e,t)=>{this.domCache.gridScrollableContainer&&this.domCache.gridScrollableContainer.length&&e===this.domCache.gridScrollableContainer[0]&&(t.top+=this.headerHeight)})),e.preventDefault())}});return d}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/plugins/grid/fullscreen-plugin.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/app/plugins/base/plugin.js"),n=i("./bundles/oroui/js/mediator.js"),o=i("./bundles/oroui/js/tools.js"),r=i("./bundles/orodatagrid/js/app/plugins/grid/floating-header-plugin.js"),a=i("./bundles/oroui/js/tools/scroll-helper.js"),l=s.extend({enable:function(){this.listenTo(this.main,"shown rendered content:update",this.updateLayout,this),this.main.filterManager?this.listenFilterManager():this.listenTo(this.main,"filterManager:connected",this.listenFilterManager,this),this.listenTo(n,"layout:reposition",this.updateLayout,this),this.updateLayout(),l.__super__.enable.call(this)},disable:function(){clearTimeout(this.updateLayoutTimeoutId),this.setLayout("default"),l.__super__.disable.call(this)},listenFilterManager:function(){const e=t.debounce(this.updateLayout.bind(this),10);this.listenTo(this.main.filterManager,"afterUpdateList",e),this.listenTo(this.main.filterManager,"updateFilter",e)},getCssHeightCalcExpression:function(){return"calc(100vh - "+(a.documentHeight()-n.execute("layout:getAvailableHeight",this.main.$grid.parents(".grid-scrollable-container:first")))+"px)"},updateLayout:function(){if(!this.main.shown)return clearTimeout(this.updateLayoutTimeoutId),void(this.updateLayoutTimeoutId=t.delay(this.updateLayout.bind(this),0));clearTimeout(this.updateLayoutTimeoutId),o.isMobile()&&this.manager.enable(r);const e=n.execute("layout:getPreferredLayout",this.main.$grid);this.setLayout(e)},setLayout:function(e){if(e!==this.main.layout){switch(this.main.layout=e,e){case"fullscreen":n.execute("layout:disablePageScroll",this.main.$el),this.main.$grid.parents(".grid-scrollable-container").css({maxHeight:this.getCssHeightCalcExpression()}),this.manager.enable(r);break;case"scroll":case"default":n.execute("layout:enablePageScroll"),this.main.$grid.parents(".grid-scrollable-container").css({maxHeight:""}),this.manager.disable(r);break;default:throw new Error("Unknown grid layout")}this.main.trigger("layout:update")}else"fullscreen"===e&&(this.main.$grid.parents(".grid-scrollable-container").css({maxHeight:this.getCssHeightCalcExpression()}),this.main.trigger("layout:update"))}});return l}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/plugins/grid/inline-editing-plugin.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orotranslation/js/translator.js"),n=i("./bundles/oroui/js/extend/jquery.js"),o=i("./bundles/oroui/js/mediator.js"),r=i("./bundles/oroui/js/app/plugins/base/plugin.js"),a=i("./bundles/orodatagrid/js/datagrid/cell-iterator.js"),l=i("./bundles/oroui/js/tools/api-accessor.js"),d=i("./bundles/oroui/js/modal.js"),c=i("./bundles/orodatagrid/js/app/plugins/grid/inline-editing-plugin/split-event-list.js"),u=i("./bundles/oronavigation/js/app/services/page-state-checker.js");i("./bundles/oroshoppinglist/js/app/components/shopping-list-cell-popup-editor-component.js"),i("./bundles/oroform/js/app/views/editor/text-editor-view.js");const h=r.extend({helpMessage:s("oro.form.inlineEditing.helpMessage"),modalOptions:{title:s("oro.datagrid.inline_editing.refresh_confirm_modal.title"),content:s("oro.ui.leave_page_with_unsaved_data_confirm"),okText:s("Ok, got it"),className:"modal modal-primary",cancelText:s("Cancel")},activeEditorComponents:null,initialize:function(e,t){this.activeEditorComponents=[],this.patchCellConstructor=this.patchCellConstructor.bind(this),this.hasChanges=this.hasChanges.bind(this),h.__super__.initialize.call(this,e,t)},enable:function(){if(this.main.$el.addClass("grid-editable"),this.listenTo(this.main.collection,{beforeFetch:this.beforeGridCollectionFetch}),this.main.columns?this.processColumnsAndListenEvents():this.listenToOnce(this.main,"columns:ready",this.processColumnsAndListenEvents),this.listenTo(o,{"page:beforeChange":this.removeActiveEditorComponents,"openLink:before":this.beforePageChange,"page:beforeRedirectTo":this.beforeRedirectTo,"page:beforeRefresh":this.beforeRefresh}),!this.options.metadata.inline_editing.save_api_accessor)throw new Error('"save_api_accessor" option is required');const e=this.options.metadata.inline_editing.save_api_accessor.class;this.saveApiAccessor=new e(t.omit(this.options.metadata.inline_editing.save_api_accessor,"class")),this.main.rendered&&this.main.body.refresh(),u.registerChecker(this.hasChanges),h.__super__.enable.call(this),n(window).on("beforeunload."+this.cid,this.onWindowUnload.bind(this))},processColumnsAndListenEvents:function(){this.processColumns(),this.listenTo(this.main.columns,{"change:renderable":this.onColumnStateChange}),this.main.columns.trigger("change:columnEventList")},processColumns:function(){this.main.columns.each(this.patchCellConstructor)},disable:function(){n(window).off("."+this.cid),this.removeActiveEditorComponents(),this.manager.disposing||(this.main.columns.each(this.removePatchForCellConstructor),this.main.$el.removeClass("grid-editable"),this.main.body.refresh()),u.removeChecker(this.hasChanges),h.__super__.disable.call(this)},onColumnStateChange:function(){for(let e=0;e<this.activeEditorComponents.length;e++){const t=this.activeEditorComponents[e];t.options.cell.column&&t.options.cell.column.get("renderable")||(t.dispose(),e--)}},confirmNavigation:function(){const e=new d(this.modalOptions),t=n.Deferred();return t.always((()=>{this.stopListening(e)})),this.listenTo(e,"ok",(function(){t.resolve()})),this.listenTo(e,"cancel close",(function(){t.reject(t.promise(),"abort")})),t.then((()=>u.ignoreChanges())),e.open(),t},beforeGridCollectionFetch:function(e,t){if(this.hasChanges()){const e=this.confirmNavigation();e.then(this.removeActiveEditorComponents.bind(this)),t.waitForPromises.push(e.promise())}else this.removeActiveEditorComponents()},beforeRefresh(e){return this.beforeNavigation(e)},beforeRedirectTo(e){return this.beforeNavigation(e)},beforeNavigation:function(e){if(this.hasChanges()){const t=this.confirmNavigation();e.push(t.promise())}},beforePageChange:function(e){!e.prevented&&this.hasChanges()&&(e.prevented=!window.confirm(s("oro.ui.leave_page_with_unsaved_data_confirm")))},onWindowUnload:function(){if(this.hasChanges()&&!u.hasChangesIgnored())return s("oro.ui.leave_page_with_unsaved_data_confirm")},cellPatcher(e){const i=this,n=e.prototype.className,o=new c(e,"isEditable",{dblclick:"enterEditModeIfNeeded","mousedown [data-role=edit]":"enterEditModeIfNeeded",click:t.noop,mouseenter:"delayedIconRender"});return e.extend({constructor:function(t){this.column=t.column,e.call(this,t)},className:t.isFunction(n)?function(){const e=n.call(this);return(e?e+" ":"")+(i.isEditable(this)?"editable view-mode prevent-text-selection-on-dblclick":"")}:function(){const e=i.isEditable(this)?"editable view-mode prevent-text-selection-on-dblclick":"";return(n?n+" ":"")+e},events:o.generateDeclaration(),delayedIconRender:function(){this.$('[data-role="edit"]').length||(this.$el.append(`<span class="inline-editor-edit-action">\n <button data-role="edit"\n class="inline-actions-btn skip-row-click hide-text"\n title="${t.escape(s("Edit"))}">\n <span class="fa-pencil" aria-hidden="true"></span>\n </button>\n </span>`),this.$el.attr("title",i.helpMessage))},isEditable:function(){return i.isEditable(this)},enterEditModeIfNeeded:function(e){this.isEditable()&&i.enterEditMode(this),e.preventDefault(),e.stopPropagation()}})},patchCellConstructor:function(e){const t=e.get("cell");e.set({cellPatcher:this.cellPatcher.bind(this),cell:this.cellPatcher(t),oldCell:t})},removePatchForCellConstructor:function(e){e.get("oldCell")&&e.set({cell:e.get("oldCell"),oldCell:!1})},hasChanges:function(){return t.some(this.activeEditorComponents,(function(e){return e.isChanged()}))},isEditable:function(e){const i=e.column.get("metadata");if(!i||!e.model||!e.column.get("renderable"))return!1;const s=e.column.get("name");return!t.find(e.model.get("entity_restrictions"),(function(e){return e.field===s&&"full"===e.mode}))&&!(!i.inline_editing||!i.inline_editing.enable)&&this.getCellEditorOptions(e).save_api_accessor.validateUrlParameters(e.model.toJSON())},getCellEditorOptions:function(e){let i=e.column.get("cellEditorOptions");if(!i){const s=e.column.get("metadata");i=n.extend(!0,{},t.result(t.result(s,"inline_editing"),"editor"));let o=t.result(t.result(s,"inline_editing"),"save_api_accessor");if(i.component_options||(i.component_options={}),o){if(!(o instanceof l)){const e=t.extend({},this.options.metadata.inline_editing.save_api_accessor,o);o=new(0,e.class)(t.omit(e,"class"))}i.save_api_accessor=o}else i.save_api_accessor=this.saveApiAccessor;const r=t.result(s.inline_editing,"validation_rules")||{};t.each(r,(function(e,t){r[t]=e||{}})),i.viewOptions=n.extend(!0,{},i.view_options||{},{validationRules:r}),e.column.set("cellEditorOptions",i)}return i},getOpenedEditor:function(e){return t.find(this.activeEditorComponents,(function(t){return t.options.cell===e}))},enterEditMode:function(e,i){let s;if(e.trigger("before-enter-edit-mode"),this._focusedCell&&this._focusedCell!==e&&(s=this.getOpenedEditor(this._focusedCell),s&&s.view&&s.view.blur()),s=this.getOpenedEditor(e),s)return s.enterEditMode(),void s.view.focus(!!i);this.main.ensureCellIsVisible(e);const n=this.getCellEditorOptions(e);n.viewOptions.className=this.buildClassNames(n,e).join(" ");const o=n.component,r=n.view;if(!r)throw new Error("Editor view in not available for `"+e.column.get("name")+"` column");const a=new o(t.extend({},n.component_options,{cell:e,view:r,viewOptions:n.viewOptions,save_api_accessor:n.save_api_accessor,grid:this.main,plugin:this}));this.activeEditorComponents.push(a),this.listenTo(a,"dispose",(function(){if(this.disposed)return;this._focusedCell&&this.highlightCell(this._focusedCell,!1);const e=this.activeEditorComponents.indexOf(a);-1!==e&&this.activeEditorComponents.splice(e,1)})),this.listenTo(a.view,{focus:function(){this._focusedCell=e,this.highlightCell(e,!0)},blur:function(){this.highlightCell(e,!1)}}),a.view.scrollIntoView(),a.view.focus(!!i)},buildClassNames:function(e,t){const i=["skip-row-click"];return e.view_options&&e.view_options.css_class_name&&i.push(e.view_options.css_class_name),t.column.get("name")&&i.push(t.column.get("name")+"-column-editor"),this.main.name&&i.push(this.main.name+"-grid-editor"),t.column.get("metadata")&&t.column.get("metadata").type&&i.push(t.column.get("metadata").type+"-frontend-type-editor"),i},editNextCell:function(e){this.editCellByIteratorMethod("next",e)},editNextRowCell:function(e){this.editCellByIteratorMethod("nextRow",e)},editPrevCell:function(e){this.editCellByIteratorMethod("prev",e)},editPrevRowCell:function(e){this.editCellByIteratorMethod("prevRow",e)},editCellByIteratorMethod:function(e,t){const i="prev"===e;this.trigger("lockUserActions",!0);const s=new a(this.main,t),n=t=>this.isEditable(t)?t:s[e]().then(n);s[e]().then(n).done((e=>{this.enterEditMode(e,i),this.trigger("lockUserActions",!1)})).fail(((e,t)=>{this.trigger("lockUserActions",!1)}))},removeActiveEditorComponents:function(){for(let e=0;e<this.activeEditorComponents.length;e++)this.activeEditorComponents[e].dispose();this.activeEditorComponents=[]},lastHighlightedCell:null,highlightCell:function(e,t){(t=!1!==t)!=(this.lastHighlightedCell===e)&&(this.lastHighlightedCell&&t&&this.highlightCell(this.lastHighlightedCell,!1),this.toggleHeaderCellHighlight(e,t),t?(e.disposed||e.$el.parent("tr:first").addClass("row-edit-mode"),this.lastHighlightedCell=e):(e.disposed||e.$el.parent("tr:first").removeClass("row-edit-mode"),this.lastHighlightedCell=null))},toggleHeaderCellHighlight:function(e,t){const i=this.main.columns.indexOf(e.column),s=this.main.findHeaderCellByIndex(i);s&&s.$el.toggleClass("header-cell-highlight",t)}});return h}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/plugins/grid/inline-editing-plugin/split-event-list.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js")],void 0===(n=function(e){"use strict";function t(t,i,s){this.View=t,this.extendedEvents=s,this.testFnName=i,this.canGenerateEventsAsObject=!e.isFunction(t.prototype.events)}return t.prototype={canGenerateEventsAsObject:!1,selectAndRun:function(t,i,s,n){if(this[t]()){if(e.isString(i)&&(i=this[i]),!i)return;i.call(this,n)}else{if(e.isString(s)&&(s=this[s]),!s)return;s.call(this,n)}},generateEvents:function(t){const i=this.canGenerateEventsAsObject?this.View.prototype.events:this.View.prototype.events.call(t),s=Object.create(i);for(const t in this.extendedEvents)this.extendedEvents.hasOwnProperty(t)&&(s[t]=e.partial(this.selectAndRun,this.testFnName,this.extendedEvents[t],i[t]));return s},generateDeclaration:function(){const e=this;return this.canGenerateEventsAsObject?this.generateEvents():function(){e.generateEvents(this)}}},t}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/app/plugins/grid/toolbar-mass-action-plugin.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/orotranslation/js/translator.js"),r=i("./bundles/oroui/js/app/plugins/base/plugin.js"),a=i("./bundles/orodatagrid/js/datagrid/action/show-component-action.js"),l=i("./bundles/orodatagrid/js/app/components/toolbar-mass-action-component.js");let d=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);d=n.extend({icon:"ellipsis-h",wrapperClassName:"toolbar-mass-actions",label:o("oro.datagrid.mass_action.title"),attributes:{"data-placement":"bottom-end"}},d);const c=r.extend({enable:function(){this.listenTo(this.main,"beforeToolbarInit",this.onBeforeToolbarInit),c.__super__.enable.call(this)},onBeforeToolbarInit:function(e){const t={datagrid:this.main,launcherOptions:n.extend(d,{componentConstructor:l,collection:e.collection,actions:this.main.massActions})};e.actions.push(new a(t))}});return c}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orodatagrid/js/app/transitions/abstract-transition.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";return i("./bundles/oroui/js/base-class.js").extend({constructor:function e(t){e.__super__.constructor.call(this,t),this.model=t.model,this.column=t.column,this.boardCollection=t.boardCollection,this.relativePosition=t.relativePosition,this.apiAccessor=t.apiAccessor},start:function(e){throw new Error("Expected abstract method `start` to be implemented")}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/transitions/update-main-property-transition.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orotranslation/js/translator.js"),n=i("./bundles/orodatagrid/js/app/transitions/abstract-transition.js"),o=i("./bundles/oroui/js/mediator.js"),r=n.extend({constructor:function e(t){e.__super__.constructor.call(this,t),this.propertyName=t.propertyName,this.boardPlugin=t.boardPlugin},start:function(){const e=this,i=this.model,n=this.boardCollection,r=this.getPropertiesUpdates(),a=this.getRestoreUpdates(),l=this.relativePosition;return l.properties=r,n.updateBoardItem(i,l),i.set({transitionStatus:"in_progress",transitionStatusUpdateTime:new Date}),this.apiAccessor.send(i.toJSON(),r,{},{processingMessage:s("oro.form.inlineEditing.saving_progress")}).then((function(n){return i.set(t.extend({transitionStatus:"success",transitionStatusUpdateTime:new Date},n.fields||{})),o.execute("showFlashMessage","success",s("oro.form.inlineEditing.successMessage"),{delay:e.boardPlugin.view.earlyChangeTimeout}),!0}),(function(e){n.updateBoardItem(i,a),i.set({transitionStatus:"error",transitionStatusUpdateTime:new Date}),o.execute("showMessage","error",e.responseJSON.message,{onClose:function(){i.set({transitionStatus:"not_started",transitionStatusUpdateTime:new Date})}})}))},getPropertiesUpdates:function(){const e={};return e[this.propertyName]=this.column.get("columnDefinition").ids[0],e},getRestoreUpdates:function(){const e=this.boardPlugin.getColumns().find((e=>-1!==e.get("ids").indexOf(this.model.get(this.propertyName)))),t=e.get("items").indexOf(this.model);return{insertAfter:0===t?void 0:e.get("items").at(t-1),properties:this.getRestorePropertiesUpdates()}},getRestorePropertiesUpdates:function(){const e={};return e[this.propertyName]=this.model.get(this.propertyName),e}},{build:function(e,t,i,s){const n=t.get("columnDefinition").transition.save_api_accessor;return new r({model:e,propertyName:i.options.group_by,column:t,boardPlugin:i,boardCollection:i.getBoardCollection(),relativePosition:s,apiAccessor:new n.class(n)})}});return r}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/views/board/board-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/orotranslation/js/translator.js"),o=i("./bundles/oroui/js/mediator.js"),r=i("./bundles/oroui/js/app/views/base/view.js"),a=i("./bundles/oroui/js/app/views/base/collection-view.js"),l=i("./bundles/oroui/js/app/views/loading-mask-view.js"),d=i("./bundles/oroui/js/tools/scroll-helper.js"),c=r.extend({className:"board",template:i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/board/board-view.html"),earlyChangeTimeout:2e3,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.readonly=e.readonly,this.columns=e.columns,this.boardPlugin=e.boardPlugin,this.columnView=e.columnView,this.columnHeaderView=e.columnHeaderView,this.cardView=e.cardView,this.boardCollection=e.boardCollection,this.serverCollection=e.serverCollection,this.cardActions=e.cardActions,this.listenTo(this.serverCollection,"change reset add remove",this.updateNoDataBlock),c.__super__.initialize.call(this,e)},dispose:function(){clearInterval(this.setTrackScrollInterval),c.__super__.dispose.call(this)},_ensureElement:function(){c.__super__._ensureElement.call(this),this.className&&this.$el.addClass(s.result(this,"className"))},render:function(){const e=this;c.__super__.render.call(this),this.updateNoDataBlock(),this.subview("header",new a({autoRender:!0,el:this.$(".board-header"),collection:this.columns,itemView:function(t){return t=s.extend(s.pick(e,"boardCollection"),t),new e.columnHeaderView(t)},readonly:this.readonly})),this.subview("body",new a({autoRender:!0,el:this.$(".board-columns-container"),collection:this.columns,readonly:this.readonly,itemView:function(i){i.readonly=e.readonly,i.boardCollection=e.boardCollection;const n=i.model.get("ids"),o=new e.columnView(s.extend(i,{cardView:function(s){s.readonly=e.readonly,s.actions=t.extend(!0,{},e.cardActions),s.actionOptions={parameters:{boardColumnIds:JSON.stringify(n)}},s.datagrid=e.boardPlugin.main.grid,s.earlyTransitionStatusChangeTimeout=e.earlyChangeTimeout;const o=new e.cardView(s);return e.listenTo(o,"navigate",(function(t,s){e.trigger("navigate",t,i.model.get("columnDefinition"),s)})),o}}));return e.listenTo(o,"move",e.onItemMove),e.listenTo(o,"dragStart",e.startIntensiveScrollTracking),e.listenTo(o,"dragEnd",e.stopIntensiveScrollTracking),o}})),this.$(".board-body").on("scroll",this.onBoardBodyScroll.bind(this)),this.loadingMask=new l({container:this.$el}),this.listenTo(this.serverCollection,"request",(function(e,t){this._beforeRequest();const i=this,s=t.always;t.always=function(...e){s.apply(this,e),i.disposed||i._afterRequest(this)}})),this.setTrackScrollInterval=setInterval(this.trackScroll.bind(this),300),this.listenTo(this.serverCollection,"change reset add remove",s.debounce(this.trackScroll.bind(this),0))},updateNoDataBlock:function(){let e;const t=this.boardPlugin.main.grid,i=this.serverCollection.models.length<=0;if(i){const i={entityHint:(t.entityHint||n(t.noDataTranslations.entityHint)).toLowerCase()};e=s.isEmpty(this.serverCollection.state.filters)?t.noDataTemplate({text:n(t.noDataTranslations.noEntities,i)}):t.noSearchResultsTemplate({title:n(t.noDataTranslations.noResultsTitle),text:n(t.noDataTranslations.noResults,i)}),this.$(".no-data").html(e)}this.$el.toggleClass("no-data-visible",i)},startIntensiveScrollTracking:function(){this.dragTrackScrollInterval=setInterval(this.trackScroll.bind(this),0)},stopIntensiveScrollTracking:function(){clearInterval(this.dragTrackScrollInterval)},getCssHeightCalcExpression:function(){return"calc(100vh - "+(d.documentHeight()-o.execute("layout:getAvailableHeight",this.$(".board-body")))+"px)"},trackScroll:function(){const e=this.$(".board-body")[0],i=d.hasScroll(e,"top");i!==this.lastHasScroll&&(this.subview("header").$el.css({paddingRight:i?d.scrollbarWidth():0}),this.lastHasScroll=i),t(e).css({maxHeight:this.getCssHeightCalcExpression()})},_beforeRequest:function(){this.serverCollection.isLoadingMore?this.$(".board-body").addClass("loading-more"):this.loadingMask.show()},_afterRequest:function(){this.loadingMask.hide(),this.$(".board-body").removeClass("loading-more")},onItemMove:function(e){const t={position:e.position,column:e.column,relativePosition:{}};e.column.get("items").length&&(0===e.position?t.relativePosition.insertBefore=e.column.get("items").at(0):t.relativePosition.insertAfter=e.column.get("items").at(Math.min(e.position-1,e.column.get("items").length-1))),s.defer((()=>{this.trigger("update",e.model,t)}))},onBoardBodyScroll:function(){const e=this.$(".board-body")[0];this.subview("header").$el.css({"margin-left":-1*e.scrollLeft}),e.scrollTop>e.scrollHeight-e.offsetHeight-50&&this.trigger("loadMoreIfPossible")}});return c}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/views/board/card-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/app/views/base/view.js"),s=i("./bundles/orolocale/js/formatter/number.js"),n=i("./bundles/orolocale/js/formatter/datetime.js"),o=i("./bundles/oroui/js/tools/scroll-helper.js"),r=i("./bundles/orodatagrid/js/app/views/grid/actions-view.js"),a=t.extend({className:"card-view",cardActionsElementSelector:'[data-placeholder-for="actions"]',template:i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/board/card-view.html"),keepElement:!1,earlyTransitionStatusChangeTimeout:2e3,events:{'click [data-action="navigate"]':"navigate"},listen:{"change model":"render"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){a.__super__.initialize.call(this,e),this.readonly=e.readonly,this.datagrid=e.datagrid,this.actions=e.actions,this.actionOptions=e.actionOptions,e.earlyTransitionStatusChangeTimeout&&(this.earlyTransitionStatusChangeTimeout=e.earlyTransitionStatusChangeTimeout)},getTemplateData:function(){const e=a.__super__.getTemplateData.call(this);return e.numberFormatter=s,e.datetimeFormatter=n,e.readonly=this.readonly,e},render:function(){a.__super__.render.call(this),this.$el.attr({"data-transition-status":this.model.get("transitionStatus"),"data-readonly":this.readonly}),this.trackErrorTransitionStatus(),this.trackEarlyTransitionStatusChange(),this.model?(this.$el.removeAttr("data-non-valid"),this.$el.data({model:this.model})):this.$el.attr("data-non-valid",""),this.renderCardActionsDropdown(this.cardActionsElementSelector)},trackErrorTransitionStatus:function(){"error"===this.model.get("transitionStatus")?this.scrolledToErrorCard||(o.scrollIntoView(this.el,void 0,20,20),this.scrolledToErrorCard=!0):delete this.scrolledToErrorCard},trackEarlyTransitionStatusChange:function(){const e=this.$el;if(e.removeClass("transition-status-just-changed"),clearTimeout(this.transitionStatusUpdateTimeout),!this.model.get("transitionStatusUpdateTime"))return;const t=(new Date).getTime(),i=this.model.get("transitionStatusUpdateTime").getTime(),s=this.earlyTransitionStatusChangeTimeout-(t-i);s>0&&(e.addClass("transition-status-just-changed"),this.transitionStatusUpdateTimeout=setTimeout((function(){e.removeClass("transition-status-just-changed")}),s))},navigate:function(e){e.preventDefault(),this.trigger("navigate",this.model,{doExecute:!0})},renderCardActionsDropdown:function(e){const t=this.$(e);t.length&&(this.cardActionsView?this.cardActionsView.setElement(t):this.cardActionsView=new r({el:t,actions:this.actions,model:this.model,actionConfiguration:this.model.get("action_configuration"),datagrid:this.datagrid,actionOptions:this.actionOptions,showCloseButton:!1}),this.cardActionsView.render())}});return a}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/views/board/column-header-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/app/views/base/view.js"),s=i("./bundles/orodatagrid/js/app/views/hint-view.js"),n=t.extend({className:"board-column-header",template:i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/board/column-header-view.html"),events:{mouseenter:"onMouseEnter",mouseleave:"onMouseLeave"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.boardCollection=e.boardCollection,this.listenTo(this.boardCollection,"add remove reset sort",this.markIfEmpty),n.__super__.initialize.call(this,e),this.markIfEmpty()},markIfEmpty:function(){this.$el.toggleClass("empty",0===this.model.get("items").length)},onMouseEnter:function(e){this.subview("hint",new s({el:this.$("[data-grid-header-cell-label]"),offsetOfEl:this.$el,autoRender:!0,popoverConfig:{content:this.model.get("label")}})),this.hintTimeout=setTimeout(function(){const e=this.subview("hint");e&&!e.fullLabelIsVisible()&&e.show()}.bind(this),300)},onMouseLeave:function(e){clearTimeout(this.hintTimeout),this.subview("hint")&&this.removeSubview("hint")}});return n}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/views/board/column-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/app/views/base/view.js"),n=i("./bundles/oroui/js/app/views/base/collection-view.js"),o=s.extend({className:"board-column",template:i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/board/column-view.html"),constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.cardView=e.cardView,this.readonly=e.readonly,this.boardCollection=e.boardCollection,this.listenTo(this.boardCollection,"add remove reset sort",this.cleanupViews),o.__super__.initialize.call(this,e)},render:function(){const e=this;this.subview("columns")&&!this.readonly&&this.destroySortable(),o.__super__.render.call(this),this.subview("columns",new n({autoRender:!0,el:this.$el,collection:this.model.get("items"),itemView:this.cardView,animationDuration:0})),this.readonly||(this.listenTo(this.model.get("items"),"change reset add remove",(function(){e.$el.sortable("refresh")})),this.initSortable())},initSortable:function(){const e=this;this.subview("columns").$el.sortable({connectWith:".board-column",placeholder:"board-card-placeholder",cancel:"[data-non-valid]",forcePlaceholderSize:!0,start:function(){t(document.body).addClass("force-grabbed-cursor"),e.trigger("dragStart")},stop:function(){t(document.body).removeClass("force-grabbed-cursor"),e.trigger("dragEnd")},update:function(t,i){const s=i.item[0],n=Array.prototype.indexOf.call(s.parentNode.children,s);if(s.parentNode===e.el){if(!i.item.data("model"))throw new Error("Trying to receive non card element");e.trigger("move",{model:i.item.data("model"),column:e.model,position:n})}else o._lastDropIndex=n;return!1},receive:function(t,i){if(!i.item.data("model"))throw new Error("Trying to receive non card element");return e.trigger("move",{model:i.item.data("model"),column:e.model,position:o._lastDropIndex}),!1},over:function(){e.$el.addClass("drag-over")},out:function(){e.$el.removeClass("drag-over")}})},destroySortable:function(){this.subview("columns").$el.sortable("destroy")},cleanupViews:function(){const e=this.subview("columns");e&&e.cleanup()},dispose:function(){this.subview("columns")&&!this.readonly&&this.destroySortable(),o.__super__.dispose.call(this)}});return o}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/views/datagrid-settings-list/datagrid-settings-list-collection-view.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/datagrid-settings-collection.html"),o=i("./bundles/oroui/js/extend/jquery.js"),r=i("./bundles/oroui/js/extend/underscore.js"),a=i("./bundles/oroui/js/app/views/base/collection-view.js"),l=i("./bundles/orodatagrid/js/app/models/datagrid-settings-list/datagrid-settings-list-filter-model.js"),d=i("./bundles/orodatagrid/js/app/views/datagrid-settings-list/datagrid-settings-list-item-view.js");let c=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);i("./bundles/oroui/js/extend/jquery-ui/widgets/sortable.js"),c=r.extend({fallbackSelector:".no-data"},c);const u=a.extend({animationDuration:0,template:n,itemView:d,className:"dropdown-menu",listSelector:"tbody",fallbackSelector:c.fallbackSelector,events:{"click tbody tr [data-role=moveUp]":"onMoveUp","click tbody tr [data-role=moveDown]":"onMoveDown"},listen:{"change collection":"filter",visibilityChange:"updateHeaderWidths","layout:reposition mediator":"updateHeaderWidths"},orderShift:0,filterModel:null,addSorting:!0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(r.extend(this,r.pick(e,["orderShift","filterModel","addSorting"])),!(this.filterModel instanceof l))throw new TypeError('Invalid required option "filterModel"');e.filterer=this.filterModel.filterer.bind(this.filterModel),u.__super__.initialize.call(this,e)},delegateListeners:function(){return this.listenTo(this.filterModel,"change",this.filter),u.__super__.delegateListeners.call(this)},render:function(){return u.__super__.render.call(this),this.addSorting&&this.initSorting(),this.updateHeaderWidths(),this},initItemView:function(...e){const t=u.__super__.initItemView.apply(this,e);return t.setFilterModel(this.filterModel),t.setSorting(this.addSorting),t},getTemplateData:function(){const e=u.__super__.getTemplateData.call(this);return e.addSorting=this.addSorting,e},initSorting:function(){let e;this.$("tbody").sortable({cursor:"move",delay:50,revert:10,axis:"y",containment:this.$("tbody"),items:"tr",tolerance:"pointer",handle:".handle",helper:(t,i)=>(e=o("<tr />",{class:"sortable-placeholder"}),i.children().each((function(){const t=o(this).width();o(this).width(t),e.append(o("<td />").append(o("<div/>").width(t)))})),i.parent().append(e),i),stop:()=>{e.remove(),this.onReorder()}}).disableSelection()},onMoveUp:function(e){const t=this.$(e.currentTarget).closest("tr"),i=t.prev();i.length&&(t.insertBefore(i),this.onReorder())},onMoveDown:function(e){const t=this.$(e.currentTarget).closest("tr"),i=t.next();i.length&&(t.insertAfter(i),this.onReorder())},onReorder:function(){let e=!1;const t=this.$("tbody tr").toArray();r.each(this.subviews,(function(i){const s=t.indexOf(i.el)+this.orderShift;i.model.get("order")!==s&&(e=!0,i.model.set("order",s))}),this),e&&(this.collection.sort(),this.trigger("reordered"))},toggleFallback:function(){const e=Boolean(this.visibleItems.length);this.$('[data-role="datagrid-settings-table-header-wrapper"], [data-role="datagrid-settings-table-wrapper"]').toggle(e),u.__super__.toggleFallback.call(this)},updateHeaderWidths:function(){let e;const t=this.$('[data-role="datagrid-settings-table-wrapper"]'),i=t.children("table"),s=i.find("thead th"),n=this.$('[data-role="datagrid-settings-table-header-wrapper"] tr th');for(t.css("padding-"+(r.isRTL()?"left":"right"),0),t[0].clientWidth>0&&t.css("padding-"+(r.isRTL()?"left":"right"),i.width()-t[0].clientWidth+"px"),e=0;e<s.length-1;e+=1)o(n[e]).width(o(s[e]).width())}});return u}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orodatagrid/js/app/views/datagrid-settings-list/datagrid-settings-list-filter-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/datagrid-settings-filter.html"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/oroui/js/mediator.js"),o=i("./bundles/oroui/js/app/views/base/view.js").extend({template:t,autoRender:!0,events:{'input [data-role="datagrid-settings-search"]':"onSearch",'click [data-role="datagrid-settings-clear-search"]':"onClearSearch",'click [data-role="datagrid-settings-show-all"]':"onShowAll",'click [data-role="datagrid-settings-show-selected"]':"onShowSelected"},listen:{"change model":"updateView"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.onSearch=s.debounce(this.onSearch,100),o.__super__.initialize.call(this,e)},updateView:function(){const e=this.model.get("search"),t=Boolean(this.model.get("renderable"));this.$('[data-role="datagrid-settings-search"]').val(e),this.$('[data-role="datagrid-settings-search-wrapper"]').toggleClass("empty",!e.length),this.$('[data-role="datagrid-settings-show-all"]').toggleClass("active",!t),this.$('[data-role="datagrid-settings-show-selected"]').toggleClass("active",t),n.trigger("layout:reposition")},onSearch:function(e){this.model.set("search",e.currentTarget.value)},onClearSearch:function(e){e.preventDefault(),e.stopPropagation(),this.$('[data-role="datagrid-settings-search"]').focus(),this.model.set("search",""),n.trigger("layout:reposition")},onShowAll:function(e){e.preventDefault(),e.stopPropagation(),this.model.set("renderable",!1)},onShowSelected:function(e){e.preventDefault(),e.stopPropagation(),this.model.set("renderable",!0)}});return o}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/views/datagrid-settings-list/datagrid-settings-list-item-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/datagrid-settings-item.html"),s=i("./bundles/oroui/js/extend/jquery.js"),n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/oroui/js/app/views/base/view.js").extend({template:t,tagName:"tr",events:{"change input[type=checkbox][data-role=renderable]":"updateModel"},listen:{addedToParent:"delegateEvents","change:disabledVisibilityChange model":"render","change:renderable model":"updateView"},addSorting:!1,constructor:function e(t){e.__super__.constructor.call(this,t)},render:function(){return o.__super__.render.call(this),this.$el.toggleClass("renderable",this.model.get("renderable")),this.$el.inputWidget("seekAndCreate"),this},setFilterModel:function(e){this.filterModel=e,this.listenTo(this.filterModel,"change:search",this.render)},setSorting:function(e){this.addSorting=e},getTemplateData:function(){const e=this.filterModel.get("search"),t=o.__super__.getTemplateData.call(this);return t.cid=this.model.cid,t.label=n.escape(t.label),e.length>0&&(t.label=this.highlightLabel(t.label,e)),t.addSorting=this.addSorting,t},highlightLabel:function(e,t){let i=e;const s=t.length,n=e.toLowerCase().indexOf(t.toLowerCase());return-1!==n&&(i=e.substr(0,n)+'<span class="column-filter-match">'+e.substr(n,s)+"</span>"+e.substr(n+s)),i},updateModel:function(e){const t=s(e.target).prop("checked");this.model.set("renderable",t)},updateView:function(){const e=this.model.get("renderable");this.$("input[type=checkbox][data-role=renderable]").prop("checked",e),this.$el.toggleClass("renderable",e)}});return o}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/views/datagrid-settings-list/datagrid-settings-list-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/datagrid-settings.html"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/oroui/js/extend/jquery.js"),o=i("./bundles/oroui/js/app/views/base/view.js").extend({template:t,autoRender:!0,className:"dropdown-menu",events:{'click [data-role="datagrid-settings-select-all"]':"onSelectAll",'click [data-role="datagrid-settings-unselect-all"]':"onUnselectAll",'click [data-role="datagrid-settings-reset"]':"reset",'click [data-role="close"]':"closeDropdown"},listen:{"change:renderable collection":"onRenderableChange","layout:reposition mediator":"adjustListHeight"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){o.__super__.initialize.call(this,e),this.filterer=e.columnFilterModel.filterer.bind(e.columnFilterModel),this.onRenderableChange=s.debounce(this.onRenderableChange,0),this.listenTo(e.columnFilterModel,"change",this.updateView)},render:function(){return o.__super__.render.call(this),this.updateView(),this},updateView:function(){const e=this._getFilteredModels(),t=Boolean(s.find(e,(function(e){return!e.get("renderable")}))),i=Boolean(s.find(e,(function(e){return e.get("renderable")}))),n=Boolean(s.find(e,(function(e){return e.get("renderable")!==e.get("metadata").renderable}))),o=[{$el:this.$('[data-role="datagrid-settings-select-all"]'),toApply:!t},{$el:this.$('[data-role="datagrid-settings-unselect-all"]'),toApply:!i},{$el:this.$('[data-role="datagrid-settings-reset"]'),toApply:!n}];for(const{$el:e,toApply:t}of o)e.toggleClass("disabled",t),e.is(":button")?e.attr("disabled",t):e.attr("aria-disabled",t);this.toggleWholeSelectButtons(t)},toggleWholeSelectButtons:function(e){this.$('[data-role="datagrid-settings-select-all"]').toggleClass("hide-action",!e),this.$('[data-role="datagrid-settings-unselect-all"]').toggleClass("hide-action",e)},adjustListHeight:function(){const e=n(window).height(),t=this.$('[data-role="datagrid-settings-table-wrapper"]'),i=(this.$('[data-role="datagrid-settings-footer"]').outerHeight()||0)+this.getUIDialogActionHeight()+this.getDropdownBottomInnerOffset(),s=t[0].getBoundingClientRect(),o=(this.$('[data-role="datagrid-settings-table"]').outerHeight(!0)-s.height)/2;t.css("max-height",Math.max(e-s.top-o-i,120)+"px")},getUIDialogActionHeight:function(){const e=this.$el.closest(".ui-dialog").find(".ui-dialog-buttonpane");return e.length?e.outerHeight():0},getDropdownBottomInnerOffset:function(){const e=this.$el.closest(".dropdown-menu");return parseInt(e.length?window.getComputedStyle(e.get(0),null).getPropertyValue("padding-bottom"):0)},updateStateView:function(){this.adjustListHeight()},onRenderableChange:function(){this.updateView()},onSelectAll:function(e){e.preventDefault(),s.each(this._getFilteredModels(),(function(e){e.set("renderable",!0)}))},onUnselectAll:function(e){e.preventDefault(),s.each(this._getFilteredModels(),(function(e){e.get("disabledVisibilityChange")||e.set("renderable",!1)}))},reset:function(e){e.preventDefault(),s.each(this._getFilteredModels(),(function(e){e.set("renderable",e.get("metadata").renderable)}))},_getFilteredModels:function(){return s.filter(this.collection.filter(this.filterer),(function(e){return!e.get("disabledVisibilityChange")}))},closeDropdown:function(){this.$el.trigger("tohide.bs.dropdown")}});return o}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/views/grid/actions-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/orotranslation/js/translator.js"),o=i("./bundles/oroui/js/app/views/base/view.js"),r=i("./bundles/oroui/js/tools.js"),a=o.extend({actions:void 0,actionsHideCount:3,launchers:void 0,showCloseButton:!1,baseMarkup:s.template('<div class="more-bar-holder"><div class="dropleft"><a class="dropdown-toggle" href="#" role="button" id="<%- togglerId %>" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="<%- label %>"><span class="icon fa-ellipsis-h" aria-hidden="true"></span></a><ul class="dropdown-menu dropdown-menu__action-cell launchers-dropdown-menu" aria-labelledby="<%- togglerId %>"></ul></div></div>'),simpleBaseMarkup:s.template('<div class="more-bar-holder action-row"></div>'),closeButtonTemplate:s.template('<li class="dropdown-close"><i class="fa-close hide-text">'+n("Close")+"</i></li>"),launchersContainerSelector:".launchers-dropdown-menu",launchersListTemplate:s.template('<% if (withIcons) { %><li><ul class="launchers-list"></ul></li><% } else { %><li class="well-small"><ul class="list-unstyled launchers-list"></ul></li><% } %>'),simpleLaunchersListTemplate:s.template('<% if (withIcons) { %><ul class="launchers-list"></ul><% } else { %><ul class="list-unstyled launchers-list"></ul><% } %>'),launcherItemTemplate:s.template('<li class="launcher-item"></li>'),events:function(){const e={click:"_showDropdown","click .dropdown-close .fa-close":"_hideDropdown"};return r.isTouchDevice()||(e["mouseover .dropdown-toggle"]="_showDropdown",e["mouseleave .dropleft.show"]="_hideDropdown"),e},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){const t=e||{};this.subviews=[],s.isEmpty(t.actionsHideCount)||(this.actionsHideCount=t.actionsHideCount),this.showCloseButton=t.showCloseButton,a.__super__.initialize.call(this,e),this.actions=this.createActions(t),s.each(this.actions,(function(e){this.listenTo(e,"preExecute",this.onActionRun)}),this),this.subviews.push(...this.actions)},dispose:function(){this.disposed||(delete this.actions,delete this.column,a.__super__.dispose.call(this))},onActionRun:function(e){this.$('.show > [data-toggle="dropdown"]').trigger("tohide.bs.dropdown")},createActions:function(e){const t=[],i=e.actions,n=e.actionConfiguration;return s.each(i,(function(i,s){n&&!1===n[s]||t.push(this.createAction(i,e))}),this),t},isEmpty:function(){return!this.actions.length},createAction:function(e,t){return new e(s.extend({model:t.model,datagrid:t.datagrid},t.actionOptions))},createLaunchers:function(){return s.map(this.actions,(function(e){return e.createLauncher({})}),this)},render:function(){let e=!1;return s.isEmpty(this.actions)?(this.$el.empty(),this):(this.actions.length<this.actionsHideCount&&(e=!0,this.baseMarkup=this.simpleBaseMarkup,this.launchersListTemplate=this.simpleLaunchersListTemplate,this.launchersContainerSelector=".more-bar-holder"),this.$el.html(this.baseMarkup(this.getTemplateData())),this.isLauncherListFilled=!1,e&&this.fillLauncherList(),this)},getTemplateData:function(){return{togglerId:"actions-view-dropdown-"+this.cid,label:n("oro.datagrid.card_actions.label")}},fillLauncherList:function(){if(!this.isLauncherListFilled){this.isLauncherListFilled=!0;const e=this.createLaunchers(),t=this.getLaunchersByIcons(e),i=this.$(this.launchersContainerSelector);this.showCloseButton&&e.length>=this.actionsHideCount&&i.append(this.closeButtonTemplate()),t.withIcons.length&&this.renderLaunchersList(t.withIcons,{withIcons:!0}).appendTo(i),t.withIcons.length&&t.withoutIcons.length&&i.append('<li class="divider"></li>'),t.withoutIcons.length&&this.renderLaunchersList(t.withoutIcons,{withIcons:!1}).appendTo(i)}},renderLaunchersList:function(e,i){i=i||{};const n=t(this.launchersListTemplate(i)),o=n.filter(".launchers-list").length?n:t(".launchers-list",n);return s.each(e,(function(e){o.append(this.renderLauncherItem(e))}),this),n},renderLauncherItem:function(e,i){i=i||{};const s=t(this.launcherItemTemplate(i)),n=s.filter(".launcher-item").length?s:t(".launcher-item",s);n.append(e.render().$el);const o="mode-"+e.launcherMode;return n.addClass(o),s},getLaunchersByIcons:function(e){const t={withIcons:[],withoutIcons:[]};return s.each(e,(function(e){e.icon?t.withIcons.push(e):t.withoutIcons.push(e)}),this),t},_showDropdown:function(e){this.fillLauncherList(),this.$('[data-toggle="dropdown"]').parent().hasClass("show")||this.$('[data-toggle="dropdown"]').dropdown("toggle"),e.stopPropagation()},_hideDropdown:function(e){this.$('[data-toggle="dropdown"]').parent().hasClass("show")&&this.$('[data-toggle="dropdown"]').dropdown("toggle"),e.stopPropagation()}});return a}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/views/grid/datagrid-manage-column-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/tools.js"),n=i("./bundles/orodatagrid/js/app/views/grid/datagrid-module-manager-view.js"),o=i("./bundles/orodatagrid/js/app/models/datagrid-settings-list/datagrid-settings-list-collection.js"),r=n.extend({defaultState:null,listen:{"dropdown-launcher:hide mediator":"_onDatagridSettingsHide"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this._createManagedCollection(),this.defaultState=s.deepClone(this.grid.collection.state),r.__super__.initialize.call(this,e),this._applyState(this.grid.collection,this.grid.collection.state)},delegateListeners:function(){return this.listenTo(this.grid.collection,"updateState",this._applyState),this.listenTo(this.grid.collection,"sync",this._onSync),this.listenTo(this.collection,"change:renderable",t.debounce(this._pushState,this.pushStateTimeout)),this.listenTo(this.collection,"sort",(function(){this.columns.sort()})),n.__super__.delegateListeners.call(this)},_createManagedCollection:function(){const e=[];this.collection.each((function(i,s){const n=!1!==i.get("manageable");(t.isUndefined(i.get("order"))||n)&&i.set("order",s,{silent:!0}),n&&e.push(i)})),this.collection=new o(e)},_pushState:function(){if(this._applyingState||this._isStateSynced())return;const e=this._createState();this.grid.collection.updateState({columns:e})},_applyState:function(e,i){const{columns:s}=i||this.grid.collection.state;this._isStateSynced(i)||(this._applyingState=!0,this.collection.each((function(e,i){let n;const o=e.get("name");n=s[o]?t.defaults(t.pick(s[o],["renderable","order"]),{renderable:!0}):{renderable:!0,order:i},e.set(n)})),this.collection.sort(),this._applyingState=!1)},_isStateSynced(e){const{columns:t}=e||this.grid.collection.state,i=this._createState();return s.isEqualsLoosely(i,t)},_createState:function(){const e={};return this.collection.each((function(t){const i=t.get("name"),s=t.get("order");e[i]={renderable:t.get("renderable")},void 0!==s&&(e[i].order=s)}),this),e},_onSync:function(){this.defaultState=s.deepClone(this.grid.collection.state)},_onDatagridSettingsHide:function(){this._pushState(),this._isRefreshNeeded(this.defaultState)&&this._refreshCollection()},_isRefreshNeeded:function(e){const{refresh:i}=this.grid.collection.state.parameters||{};return!i&&t.filter(this._createState(),(function(t,i){return t.renderable&&!e.columns[i].renderable})).length>0},_refreshCollection:function(){this.grid.setAdditionalParameter("refresh",!0),this.grid.collection.fetch({reset:!0}).then((()=>{this.grid.removeAdditionalParameter("refresh")}))}});return r}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/views/grid/datagrid-manage-filter-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/mediator.js"),n=i("./bundles/orodatagrid/js/app/views/grid/datagrid-module-manager-view.js"),o=i("./bundles/orodatagrid/js/app/models/datagrid-settings-list/datagrid-settings-list-collection.js"),r=n.extend({constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){const t=this._applyState(e.collection,this.grid.collection.state.filters);this.collection=new o(t),this.defaultState=this._getEnabledState(),r.__super__.initialize.call(this,e)},delegateListeners:function(){return this.listenTo(this.grid.collection,"sync",this._onSync),this.listenTo(this.collection,"change:renderable",t.debounce(this._pushState,this.pushStateTimeout)),n.__super__.delegateListeners.call(this)},_pushState:function(){const e=this._getEnabledState();t.haveEqualSet(this.defaultState,e)||s.trigger("filters:update",e)},_onSync:function(){this.defaultState=this._getEnabledState()},_getEnabledState:function(){const e=[];return this.collection.each((function(t){t.get("renderable")&&e.push(t.get("name"))}),this),e},_applyState:function(e,i){return t.each(e,(function(e){const s="__"+e.name;t.has(i,s)&&(e.renderable="0"!==i[s]),e.metadata={renderable:e.renderable}})),e}});return r}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/views/grid/datagrid-module-manager-view.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/app/views/base/view.js"),o=i("./bundles/oroui/js/extend/underscore.js"),r=i("./bundles/orodatagrid/js/extend/backgrid.js"),a=i("./bundles/orodatagrid/js/app/models/datagrid-settings-list/datagrid-settings-list-filter-model.js"),l=i("./bundles/orodatagrid/js/app/views/datagrid-settings-list/datagrid-settings-list-filter-view.js"),d=i("./bundles/orodatagrid/js/app/views/datagrid-settings-list/datagrid-settings-list-collection-view.js"),c=i("./bundles/orodatagrid/js/app/views/datagrid-settings-list/datagrid-settings-list-view.js");let u=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);u=o.extend({enableFilters:!0},u);const h=n.extend({optionNames:n.prototype.optionNames.concat(["columns","grid","collection","addSorting","enableFilters","datagridSettingsListView"]),columns:null,collection:null,grid:null,addSorting:!0,enableFilters:u.enableFilters,datagridSettingsListView:c,collectionFilterModel:null,pushStateTimeout:200,_defaultState:null,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(!(e.columns instanceof r.Columns))throw new TypeError('The "columns" option have to be instance of Backgrid.Columns');if(!(e.grid instanceof r.Grid))throw new TypeError('The "grid" option have to be instance of Backgrid.Grid');this.collection.comparator="order",this.collectionFilterModel=new a,this.render=this.render.bind(this,e),h.__super__.initialize.call(this,e)},dispose:function(){this.disposed||(delete this.columns,delete this.grid,h.__super__.dispose.call(this))},render:function(e){const t=this.collection[0]?this.collection[0].get("order"):0;this.subview("datagridSettingsListView",new this.datagridSettingsListView({el:e._sourceElement,collection:this.collection,columnFilterModel:this.collectionFilterModel})),this.enableFilters&&this.subview("datagridSettingsListFilterView",new l({el:this.subview("datagridSettingsListView").$('[data-role="datagrid-settings-filter"]').get(0),model:this.collectionFilterModel})),this.subview("datagridSettingsListCollectionView",new d({el:this.subview("datagridSettingsListView").$('[data-role="datagrid-settings-table"]').get(0),collection:this.collection,filterModel:this.collectionFilterModel,addSorting:this.addSorting,orderShift:t})),this.listenTo(this.subview("datagridSettingsListCollectionView"),"reordered",this._pushState)},beforeOpen:function(e){this.subview("datagridSettingsListCollectionView")||this.render(),o.invoke(this.subviews,"beforeOpen",e)},updateViews:function(){this.subview("datagridSettingsListCollectionView").updateHeaderWidths(),this.subview("datagridSettingsListView").updateStateView()}});return h}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orodatagrid/js/app/views/grid/datagrid-settings-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/extend/jquery.js"),n=i("./bundles/oroui/js/app/views/base/view.js"),o=i("./bundles/oroui/js/app/views/tab-collection-view.js"),r=i("./bundles/oroui/js/app/models/base/collection.js"),a=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/grid-settings.html"),l=i("./bundles/oroui/js/mediator.js"),d=n.extend({optionNames:["viewConstructors","title","template"],autoRender:!0,template:a,title:t.__("oro.datagrid.settings.title"),tabsNav:"[data-tabs-nav]",tabsContent:"[data-tabs-content]",views:null,uniqueId:null,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.options=e,d.__super__.initialize.call(this,e),this.uniqueId=t.uniqueId(this.cid),this.views=new r(t.map(this.viewConstructors,(function(e,i){return 0===i&&(e.active=!0),e.uniqueId=t.uniqueId(e.id),e.id="datagrid-settings-"+e.id+"-"+this.uniqueId,e}),this)),this.setElement(e._sourceElement)},dispose:function(){this.disposed||d.__super__.dispose.call(this)},onTabChange:function(e){this.views.each((function(e){this.getElement(e.id).hide()}),this),e.hasChanged("active")&&!0===e.get("active")&&(this.getElement(e.id).show(),this.subview(e.id).updateViews(),this.getElement(e.get("uniqueId")).tab("show"))},getElement:function(e){return s("#"+e)},render:function(){d.__super__.render.call(this),this.tabs=new o({el:this.$(this.tabsNav),animationDuration:0,collection:this.views,useDropdown:this.options.useDropdown}),this.views.each(this.renderSubview,this),this.listenTo(this.views,"change",this.onTabChange),l.execute("hideLoading")},renderSubview:function(e){const i=e.get("id"),s=e.get("view");this.subview(i,new s(t.extend({_sourceElement:this.$("#"+i),grid:this.options.grid,columns:this.options.columns},e.get("options"))))},getTemplateData:function(){return{title:this.title,views:this.views.toJSON(),viewId:this.uniqueId}},updateViews:function(){t.invoke(this.subviews,"updateViews")},beforeOpen:function(e){t.invoke(this.subviews,"beforeOpen",e)}});return d}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/views/hint-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/app/views/base/view.js"),s=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/hint/hint-view-template.html"),n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/oroui/js/extend/jquery.js"),r={content:"",trigger:"manual",placement:"bottom",animation:!1,container:"body",template:s()},a=t.extend({noWrap:!0,offsetOfEl:null,textEl:"[data-grid-header-cell-text]",constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){n.extend(this,n.pick(e,["offsetOfEl","textEl","popoverConfig"])),this.$el.popover(n.extend({offset:this.calcPopoverOffset()},r,this.popoverConfig)),a.__super__.initialize.call(this,e)},show:function(){this.disposed||this.$el.popover("show")},hide:function(){this.disposed||this.$el.popover("hide")},fullLabelIsVisible:function(){const e=this.$(this.textEl).get(0)||null;return!e||e.scrollWidth<=e.offsetWidth},calcPopoverOffset:function(){let e=0;const t=o(this.offsetOfEl);return t.length&&(e=t[0].getBoundingClientRect().bottom-this.$el[0].getBoundingClientRect().bottom),[0,e].join(", ")},dispose:function(){this.disposed||(this.$el.popover("hide"),this.$el.popover("dispose"),a.__super__.dispose.call(this))}});return a}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/views/inline-editing/error-holder-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/oroui/js/app/views/base/view.js"),o=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/inline-editing/error-holder.html");function r(e){if(!e||!s.isFunction(e.getBoundingClientRect))return null;const t=s.pick(e.getBoundingClientRect(),["top","right","bottom","left","width","height"]);return s.forEach(e.childNodes,(function(e){const i=r(e);i&&(t.top=Math.min(t.top,i.top),t.left=Math.min(t.left,i.left),t.right=Math.max(t.right,i.right),t.bottom=Math.max(t.bottom,i.bottom))})),t.width=t.right-t.left,t.height=t.bottom-t.top,t}i("../node_modules/jquery-ui/ui/position.js");const a=n.extend({keepElement:!0,DEFAULT_POSITION:"top",POSITION_CLASSES:{bottom:"error-message-below",right:"error-message-right",left:"error-message-left"},DROPDOWNS:[".select2-container.select2-drop-below",".timepicker-dialog-is-below",".ui-datepicker-dialog-is-below"],DROPUPS:[".select2-container.select2-drop-above",".timepicker-dialog-is-above",".ui-datepicker-dialog-is-above"],offsetDefault:{top:0,right:0,bottom:0,left:0},events:{click:"updatePosition",mouseenter:"updatePosition",updatePosition:"updatePosition","datepicker:dialogShow":"updatePosition","datepicker:dialogReposition":"updatePosition","datepicker:dialogHide":"updatePosition",showTimepicker:"updatePosition",hideTimepicker:"updatePosition","select2-open":"updatePosition","select2-close":"updatePosition"},within:null,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(!e.within)throw new Error('Option "within" is required');this._errors={},s.extend(this,s.pick(e,["within"])),a.__super__.initialize.call(this,e)},render:function(){const e=this.$("form");this.$(".error-holder").remove(),this.$el.toggleClass("has-error",!s.isEmpty(this._errors)),s.isEmpty(this._errors)||(e.length&&e.data("validator")?e.data("validator").showErrors(this._errors):this.$el.append(o({messages:this._errors})))},dispose:function(){this.disposed||(this.$(".error-holder").remove(),this.$el.removeClass("has-error"),delete this.within,a.__super__.dispose.call(this))},getWithinRect:function(){const e=s.pick(this.within[0].getBoundingClientRect(),["top","right","bottom","left","width","height"]),i=this.within.find("thead:first").outerHeight(),n=t.position.scrollbarWidth();return e.top+=i,e.height-=i,this.within.find(".grid-container").height()>e.height&&(e.right-=n,e.width-=n),this.within.find(".grid-container").width()>e.width&&(e.bottom-=n,e.height-=n),e},updatePosition:function(){const e=this.getErrorMessageElements();if(0===e.length)return;const t=this.getWithinRect(),i=s.keys(this.POSITION_CLASSES),n=this.getPositionByClass();if(n===this.DEFAULT_POSITION){if(this.checkPosition(n,t,e[0]))return}else i.unshift(this.DEFAULT_POSITION);const o=e.css("opacity");e.css("opacity",0);for(let s=0;s<i.length;s++){const n=i[s];if(this.setPositionClass(n),this.checkPosition(n,t,e[0]))break}e.css("opacity",o)},checkPosition:function(e,t,i){const n="check"+s.capitalize(e);return!!s.isFunction(this[n])&&this[n](t,i)},checkTop:function(e,t){if(this.$(this.DROPUPS.join(", ")).length>0)return!1;const i=r(t);return i&&i.top>=e.top&&i.right<=e.right},checkBottom:function(e,t){if(this.$(this.DROPDOWNS.join(", ")).length>0)return!1;const i=r(t);return i&&i.bottom<=e.bottom&&i.right<=e.right},checkRight:function(e,t){const i=r(t);return i&&i.right<=e.right},checkLeft:function(e,t){const i=r(t);return i&&i.left>=e.left},getErrorMessageElements:function(){return this.$(".validation-failed:visible")},setErrorMessages:function(e){this._errors=e,this.render()},parseValidatorErrors:function(e){const t={};s.each(e,(function(e){t[e.element.getAttribute("name")]=e.message}),this),this._errors=t},setPositionClass:function(e){const t=s.values(s.omit(this.POSITION_CLASSES,e));this.$el.removeClass(t.join(" ")),e!==this.DEFAULT_POSITION&&this.$el.addClass(s.result(this.POSITION_CLASSES,e))},getPositionByClass:function(){return s.findKey(this.POSITION_CLASSES,(function(e){return this.$el.hasClass(e)}),this)||this.DEFAULT_POSITION}});return a}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/views/multi-grid-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/extend/jquery.js"),n=i("./bundles/oroactivity/js/app/models/activity-context-collection.js"),o=i("./bundles/oroui/js/app/views/base/view.js"),r=i("./bundles/oroui/js/widget/widget-manager.js"),a=i("./bundles/fosjsrouting/js/router.js");return o.extend({constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.options=e,this.template=t.template(s("#multi-grid-item").html()),this.collection=new n,this.initEvents(),this.options.items&&(t.first(this.options.items).first=!0,t.each(t.rest(this.options.items),(function(e){e.first=!1})),this.collection.add(this.options.items))},add:function(e){this.collection.add(e)},render:function(){0===this.collection.models.length?this.$el.hide():this.$el.show()},initEvents:function(){const e=this,i=this.$(".context-items-dropdown"),n=this.$(".activity-context-current-item");this.collection.on("add",(function(o){let l=e.options.params.grid_query||{params:{}};l.params.class_name=o.get("className"),l.gridName=o.get("gridName"),t.isUndefined(e.options.params.routeParams)||(l=t.extend({},l,{params:e.options.params.routeParams}));const d=a.generate("oro_datagrid_widget",l),c=e.template({entity:o}),u=s(c);o.attributes.first&&(n.html(o.attributes.label),e.currentTargetClass(o.attributes.className)),i.append(u),i.find(".dropdown-item:last").click((function(){e.currentTargetClass(o.attributes.className),i.find(".dropdown-item").each((function(){s(this).removeClass("active")}));const t=s(this);n.html(t.html()),t.addClass("active");const a=e.options.gridWidgetName;r.getWidgetInstanceByAlias(a,(function(e){e.setUrl(d),e.render()}))}))}))},currentTargetClass:function(e){return t.isUndefined(e)?e=this._currentTargetClass:this._currentTargetClass=e,e}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/app/views/toggle-group-view.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>h});var s=i("./bundles/oroui/js/app/views/base/view.js"),n=i.n(s),o=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/toggle-group.html"),r=i.n(o),a=i("./bundles/oroui/js/extend/underscore.js"),l=i.n(a),d=i("./bundles/orotranslation/js/translator.js"),c=i.n(d);const u=n().extend({autoRender:!0,enabled:!0,grid:null,className:"datagrid-toggle-group datagrid-divider",defaultGroupState:!1,translationPrefix:"oro.datagrid.btn",template:r(),events:{'click [data-role="group-toggler"]':"onClick"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize(e){l().extend(this,l().pick(e,["translationPrefix"]));const{parameters:t={}}=e.datagrid.collection.initialState;t.hasOwnProperty("group")&&(this.defaultGroupState=t.group),this.grid=e.datagrid,this.listenTo(this.grid.collection,"updateState sync",this.render),this.listenTo(this.grid,"disable",this.disable),this.listenTo(this.grid,"enable",this.enable),u.__super__.initialize.call(this,e)},dispose(){this.disposed||(delete this.grid,u.__super__.dispose.call(this))},getCurrentState(){const{parameters:e={}}=this.grid.collection.state;return e.hasOwnProperty("group")?e.group:this.defaultGroupState},getTemplateData(){const e=this.getCurrentState(),t=`${this.translationPrefix}.${e?"ungroup_similar":"group_similar"}`;return{enabled:this.enabled,visible:this.isVisible(),label:c()(`${t}.label`),ariaLabel:c()(`${t}.aria_label`)}},isVisible(){return this.grid.metadata.canBeGrouped||!1},disable(){return this.enabled=!1,this.render(),this},enable(){return this.enabled=!0,this.render(),this},render(){return u.__super__.render.call(this),this.$el.toggleClass("empty",!this.isVisible()),this},onClick(){this.enabled&&this.togglePagination()},togglePagination(){const{parameters:e={}}=this.grid.collection.state;e.group=!this.getCurrentState(),this.grid.collection.updateState({parameters:e}),this.grid.collection.fetch({reset:!0})}}),h=u},"./bundles/orodatagrid/js/app/views/toggle-pagination-view.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>h});var s=i("./bundles/oroui/js/app/views/base/view.js"),n=i.n(s),o=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/toggle-pagination.html"),r=i.n(o),a=i("./bundles/oroui/js/extend/underscore.js"),l=i.n(a),d=i("./bundles/orotranslation/js/translator.js"),c=i.n(d);const u=n().extend({autoRender:!0,enabled:!0,grid:null,maxPageSize:void 0,className:"datagrid-toggle-pagination datagrid-divider",translationPrefix:"oro.datagrid.btn",template:r(),events:{'click [data-role="pagination-toggler"]':"onClick"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){l().extend(this,l().pick(e,["translationPrefix"])),this.grid=e.datagrid;const{items:t}=this.grid.gridOptions.toolbarOptions.pageSize;this.maxPageSize=Math.max(...t.map((e=>e.size||e))),this.listenTo(this.grid.collection,"updateState",this.render),this.listenTo(this.grid,"disable",this.disable),this.listenTo(this.grid,"enable",this.enable),u.__super__.initialize.call(this,e)},dispose:function(){this.disposed||(delete this.grid,u.__super__.dispose.call(this))},getTemplateData:function(){const{pageSize:e}=this.grid.collection.state,t=e===this.maxPageSize,i=`${this.translationPrefix}.${t?"show_less":"show_all"}`;return{enabled:this.enabled,visible:this.isVisible(),isMaxPageSize:t,label:c()(`${i}.label`),ariaLabel:c()(`${i}.aria_label`)}},isVisible(){const{pageSize:e}=this.grid.collection.initialState,{pageSize:t,totalPages:i,totalRecords:s}=this.grid.collection.state,n=t===this.maxPageSize;return i>1||n&&s>e},disable:function(){return this.enabled=!1,this.render(),this},enable:function(){return this.enabled=!0,this.render(),this},render(){return u.__super__.render.call(this),this.$el.toggleClass("empty",!this.isVisible()),this},onClick:function(){this.enabled&&this.togglePagination()},togglePagination:function(){const{pageSize:e}=this.grid.collection.initialState,{pageSize:t}=this.grid.collection.state,i=t===this.maxPageSize?e:this.maxPageSize;this.grid.collection.setPageSize(i)}}),h=u},"./bundles/orodatagrid/js/appearance/builder.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/tools.js"),n=i("./bundles/oroui/js/error.js"),o=i("./bundles/oroui/js/app/services/load-modules.js");return{processDatagridOptions:function(e,i){if(!s.isMobile()&&i.metadata.options.appearances&&i.metadata.options.appearances.length)return t.when(...this.prepareAppearances(i.metadata.options.appearances,i)).done((function(){e.resolve()})).fail((function(t){n.showErrorInConsole(t),e.resolve()})),e;e.resolve()},init:function(e,t){e.resolve()},prepareAppearances:function(e,t){return e.map((function(e){if(e.plugin)return o.fromObjectProp(e,"plugin").then((()=>e.plugin.processMetadata(e,t)))}))}}}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/cell-links/builder.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>_});var s=i("./bundles/oroui/js/extend/underscore.js"),n=i.n(s),o=i("./bundles/oroui/js/app/plugins/base/plugin.js"),r=i.n(o),a=i("./bundles/oroui/js/app/views/base/view.js"),l=i.n(a);const d=l().extend({autoRender:!0,className:"cell-link",tagName:"a",containerMethod:"prepend",optionNames:l().prototype.optionNames.concat(["url"]),url:null,events:{click:"onClick",mousemove:"onMouseMove",mousedown:"onMouseDown",mouseup:"onMouseUp"},attributes(){return{href:this.url,"data-include":!0,draggable:!1}},constructor:function e(...t){e.__super__.constructor.apply(this,t)},render(){const{padding:e}=getComputedStyle(this.container[0]);this.inner=document.createElement("span"),this.inner.classList.add("cell-link-inner"),this.inner.innerHTML=new Array(this.container.text().length).join(" "),this.inner.setAttribute("draggable",!1),this.inner.style.padding=e,this.$el.css("-moz-user-select","auto"),this.$el.append(this.inner),d.__super__.render.call(this)},onMouseDown(){this.resetSelection(),this.pressed=!0},onMouseUp(){this.resetSelection(),this.pressed=!1,this.$el.show()},onMouseMove(){if(!this.pressed)return;const e=window.getSelection();e.rangeCount&&e.removeAllRanges();const t=[...this.container[0].childNodes].find((e=>3===e.nodeType));e.collapse(t||this.container[0]),this.$el.hide()},resetSelection(){window.getSelection&&(window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().removeAllRanges())},onClick(e){1===e.which&&e.preventDefault()}}),c=d;var u=i("./bundles/oroui/js/tools.js");const h=r().extend({constructor:function e(...t){e.__super__.constructor.apply(this,t)},enable(){this.main.columns?this.processColumnsAndListenEvents():this.listenToOnce(this.main,"columns:ready",this.processColumnsAndListenEvents),h.__super__.enable.call(this)},processColumnsAndListenEvents(){this.processColumns()},processColumns(){const{rowClickAction:e}=this.main;e&&e.prototype.link&&(this.clickRowActionLink="navigate"===e.prototype.type&&e.prototype.link),this.main.columns.each(this.patchCellConstructor.bind(this))},patchCellConstructor(e){const t=e.get("cell"),i=this.clickRowActionLink,s=t.extend({rowUrl:null,main:this.main,delegateEvents(){if(s.__super__.delegateEvents.call(this),this.rowUrl=!!i&&this.model.get(i),this.rowUrl){const e=n().debounce(this.createCellLinkView.bind(this),50),t=n().debounce(this.destroyCellLinkView.bind(this),50);(0,u.isTouchDevice)()?(this.$el.off(`touchstart${this.eventNamespace()}\n touchend${this.eventNamespace()}\n touchcancel${this.eventNamespace()}`),this.$el.on(`touchstart${this.eventNamespace()}`,this.createCellLinkView.bind(this)),this.$el.on(`touchend${this.eventNamespace()} touchcancel${this.eventNamespace()}`,this.destroyCellLinkView.bind(this))):(this.$el.off(`mouseenter${this.eventNamespace()} mouseleave${this.eventNamespace()}`),this.$el.on(`mouseenter${this.eventNamespace()}`,e),this.$el.on(`mouseleave${this.eventNamespace()}`,t)),this.listenTo(this,"before-enter-edit-mode",this.destroyCellLinkView.bind(this))}},isSkipRowClick(){return!n().isUndefined(this.skipRowClick)&&this.skipRowClick},isSelectedText:()=>window.getSelection().toString().length,createCellLinkView(e){this.inEditMode()||"touchstart"===e.type&&"A"===e.target.tagName||this.isSelectedText()||this.subview("cell-link")||((0,u.isTouchDevice)()?this.timeoutId=setTimeout((()=>{this.subview("cell-link",new c({container:this.$el,url:this.rowUrl}))}),100):this.subview("cell-link",new c({container:this.$el,url:this.rowUrl})))},destroyCellLinkView(){this.timeoutId&&clearTimeout(this.timeoutId),this.disposeCellLink()},inEditMode(){return this.$el.hasClass("edit-mode")},disposeCellLink(){this.subview("cell-link")&&!this.subview("cell-link").disposed&&(this.subview("cell-link").dispose(),this.removeSubview("cell-link"))}});e.set({cell:s,oldCell:t})}}),p=h,_={processDatagridOptions(e,t){t.metadata.rowLinkEnabled?(t.metadata.plugins||(t.metadata.plugins=[]),t.metadata.plugins.push(p),e.resolve()):e.resolve()},init:function(e){e.resolve()}}},"./bundles/orodatagrid/js/datagrid-theme-options-manager.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js");return{defaults:{optionPrefix:"",tagName:"",className:"",hide:!1,template:null,templateSelector:null,el:null,elFilter:null},createConfigurator:function(e){const t=s.extend({gridThemeOptions:e},this);return t.configure.bind(t)},configure:function(e,i,n){const o=i.themeOptions=t.extend(!0,{},this.defaults,e.prototype.themeOptions||{},i.themeOptions||{},this.gridThemeOptions),r=o.optionPrefix;r&&s.each(o,(function(e,t){r&&0===t.indexOf(r)&&(delete o[t],t=(t=t.replace(r,"")).charAt(0).toLowerCase()+t.slice(1),o[t]=e)})),s.each(o,((t,o)=>{const r=o+"Option";s.isFunction(this[r])&&this[r](e,i,t,n)}))},mergeOption:function(e,t,i,n,o){if(n)if(void 0===t[i]&&(t[i]=e.prototype[i]),s.isFunction(t[i])){const e=t[i];t[i]=function(){const t=e.call(this);return o(t,n)}}else t[i]=o(t[i],n)},tagNameOption:function(e,t,i){i&&(t.tagName=i)},attributesOption:function(e,i,s){this.mergeOption(e,i,"attributes",s,(function(e,i){return t.extend(!0,{},e||{},i)}))},classNameOption:function(e,t,i){this.mergeOption(e,t,"className",i,(function(e,t){return(e?e+" ":"")+t}))},templateOption:function(e,t,i){i&&(t.template=s.template(i))},templateSelectorOption:function(e,i,n){n&&(i.template=s.template(t(n).html()))},elOption:function(e,t,i,s){i&&(i=s.$el.find(i),t.elFilter&&(i=i.filter(t.elFilter)),t.el=i.get(0)||null)}}}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/action-component-dropdown-launcher.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/mediator.js"),n=i("./bundles/orodatagrid/js/datagrid/action-launcher.js"),o=i("./bundles/orodatagrid/js/datagrid/datagrid-settings-dialog-widget.js"),r=n.extend({template:i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/action-component-dropdown-launcher.html"),componentOptions:null,component:null,componentConstructor:null,wrapperClassName:void 0,events:{"show.bs.dropdown":"onBeforeOpen","shown.bs.dropdown":"onOpen","hide.bs.dropdown":"onHide"},dialogWidget:null,allowDialog:!1,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){t.extend(this,t.pick(e,["allowDialog"])),this.componentOptions=t.omit(e,["action","componentConstructor"]),this.componentConstructor=e.componentConstructor,this.componentOptions.grid=e.action.datagrid,e.wrapperClassName&&(this.wrapperClassName=e.wrapperClassName),s.on("layout:reposition",this._updateDropdown,this),r.__super__.initialize.call(this,e)},getTemplateData:function(){const e=r.__super__.getTemplateData.call(this);return e.wrapperClassName=this.wrapperClassName,e},render:function(){if(r.__super__.render.call(this),this.allowDialog)this.$(".dropdown-toggle").dropdown("dispose"),this.$(".dropdown-toggle").on("click"+this.eventNamespace(),this.openDialogWidget.bind(this));else{this.componentOptions._sourceElement=this.$(".dropdown-menu");const e=this.componentConstructor;this.component=new e(this.componentOptions)}return this},dispose:function(){this.disposed||(this.$(".dropdown-toggle").off(this.eventNamespace()),this.component&&this.component.dispose(),delete this.component,delete this.componentOptions,r.__super__.dispose.call(this))},onBeforeOpen:function(e){t.isFunction(this.component.beforeOpen)&&this.component.beforeOpen(e)},onOpen:function(){t.isFunction(this.component.updateViews)&&this.component.updateViews();const e=this.$(">.dropdown-menu");if(e.length){const t=e[0].getBoundingClientRect();e.css({maxWidth:t.right+"px"}),e.focusFirstInput()}s.trigger("dropdown-launcher:show")},onHide:function(e){if(e.clickEvent&&!this.$(e.clickEvent.target).is(".close")){const t=this.$(e.clickEvent.target);if(t.get(0)&&!t.is(".close"))return void e.preventDefault()}s.trigger("dropdown-launcher:hide")},openDialogWidget:function(){s.execute("showLoading"),this.dialogWidget=new o({title:t.__("oro.datagrid.settings.title"),View:this.componentConstructor,viewOptions:this.componentOptions,stateEnabled:!1,incrementalPosition:!0,resize:!1}),this.dialogWidget.render()},disable:function(){return this.$('[data-toggle="dropdown"]').addClass("disabled"),r.__super__.disable.call(this)},enable:function(){return this.$('[data-toggle="dropdown"]').removeClass("disabled"),r.__super__.enable.call(this)},_updateDropdown:function(){this.$('[data-toggle="dropdown"]').dropdown("update")}});return r}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/action-launcher.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/jquery.js"),o=i("./bundles/oroui/js/extend/underscore.js"),r=i("./bundles/orotranslation/js/translator.js"),a=i("./bundles/oroui/js/tools.js"),l=i("./bundles/oroui/js/extend/backbone.js");let d=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);d=o.extend({launcherMode:"icon-only"},d);const c=l.View.extend({enabled:!0,tagName:"a",onClickReturnValue:!0,action:void 0,label:void 0,title:void 0,ariaLabel:void 0,allowDefaultAriaLabel:!1,icon:void 0,iconClassName:void 0,launcherMode:"",className:void 0,link:"#",links:void 0,runAction:!0,template:i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/action-launcher.html"),attributes:null,withinDropdown:!1,events:function(){const e={};let t="";return this.links&&(e["shown.bs.dropdown"]="onDropdownShown",t=" .dropdown-menu a"),e["click"+t]="onClick",e},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(!e.action)throw new TypeError('"action" is required');this.setOptions(e),this.launcherMode||(this.launcherMode=this.icon?d.launcherMode:"text-only"),c.__super__.initialize.call(this,e)},dispose:function(){this.disposed||(delete this.action,delete this.runAction,delete this.attributes,c.__super__.dispose.call(this))},setOptions:function(e){const t=o.pick(e,"template","label","title","ariaLabel","allowDefaultAriaLabel","icon","link","launcherMode","iconClassName","className","action","attributes","withinDropdown");return o.extend(this,o.pick(e,"runAction","onClickReturnValue","links"),o.pick(t,(e=>void 0!==e))),this},getTemplateData:function(){const e=o.pick(this,"icon","title","label","ariaLabel","className","iconClassName","launcherMode","link","links","action","attributes","enabled","tagName","withinDropdown");return e.label||(e.label=this.action.label),!e.ariaLabel&&this.action.ariaLabel&&(e.ariaLabel=this.action.ariaLabel),!e.attributes&&this.action.attributes&&(e.attributes={...this.action.attributes}),!e.ariaLabel&&this.allowDefaultAriaLabel&&(e.ariaLabel=this.getDefaultAriaLabel(e.label)),e.title||(e.title=e.label),e.launcherMode||(e.launcherMode=this._convertToLauncherMode()),e},getDefaultAriaLabel:function(e){return`${e} ${r("oro.datagrid.action.default_postfix")}`},render:function(){this.$el.empty();const e=n(this.template(this.getTemplateData()));return this.setElement(e),this.trigger("render"),this},onClick:function(e){let t,i;const s={};return this.enabled?(this.trigger("click",this,e.currentTarget),this.runAction&&(this.links&&(t=n(e.currentTarget),i=t.data("key"),o.isUndefined(i)||(this.action.actionKey=i)),a.isTargetBlankEvent(e)&&(s.target="_blank"),this.action.run(s),e.preventDefault()),this.onClickReturnValue):this.onClickReturnValue},onDropdownShown:function(e){this.trigger("expand",this)},disable:function(){return this.enabled=!1,this.$el.addClass("disabled"),this},enable:function(){return this.enabled=!0,this.$el.removeClass("disabled"),this}});return c}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/action/abstract-action.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/oroui/js/app/views/base/view.js"),o=i("./bundles/fosjsrouting/js/router.js"),r=i("./bundles/orotranslation/js/translator.js"),a=i("./bundles/oroui/js/mediator.js"),l=i("./bundles/oroui/js/app/services/load-modules.js"),d=i("./bundles/oroui/js/tools.js"),c=i("./bundles/oroui/js/modal.js"),u=i("./bundles/orodatagrid/js/datagrid/action-launcher.js"),h=i("./bundles/oroui/js/extend/chaplin.js"),p=n.extend({launcher:u,name:null,datagrid:null,route:null,route_parameters:null,confirmation:!1,confirmModalConstructor:c,frontend_type:null,frontend_handle:null,frontend_options:null,identifierFieldName:"id",dispatched:!1,reloadData:!0,messages:null,launcherOptions:null,requestType:"GET",order:500,defaultMessages:{confirm_title:"Execution Confirmation",confirm_content:"Are you sure you want to do this?",confirm_content_params:{},confirm_ok:"Yes, do it",confirm_cancel:"Cancel",success:"Action performed.",error:"Action is not performed.",empty_selection:"Please, select item to perform action."},configuration:{},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize(e){if(!e.datagrid)throw new TypeError('"datagrid" is required');e.configuration&&(this.configuration=t.extend(!0,{},this.configuration,e.configuration)),e.requestType&&(this.requestType=e.requestType),e.order&&(this.order=e.order),this.subviews=[],this.datagrid=e.datagrid,this.messages=s.extend({},this._getDefaultMessages(),this.messages),this.launcherOptions=t.extend(!0,{},this.launcherOptions,e.launcherOptions,{action:this}),p.__super__.initialize.call(this,e)},dispose(){this.disposed||(delete this.datagrid,delete this.launcherOptions,delete this.messages,this.confirmModal&&(this.confirmModal.dispose(),delete this.confirmModal),p.__super__.dispose.call(this))},createLauncher(e){e=e||{},s.isUndefined(e.icon)&&!s.isUndefined(this.icon)&&(e.icon=this.icon),s.defaults(e,this.launcherOptions);const t=new this.launcher(e);return this.launcherInstance=t,this.subviews.push(t),t},run(e){e=s.defaults(e,{doExecute:!0}),this.trigger("preExecute",this,e),e.doExecute&&(this.execute(e),this.trigger("postExecute",this,e))},execute(){this._confirmationExecutor(this.executeConfiguredAction.bind(this))},executeConfiguredAction(){switch(this.frontend_handle){case"ajax":this._handleAjax();break;case"redirect":this._handleRedirect();break;default:this._handleWidget()}},_getDefaultMessages(){let e=h.utils.getAllPropertyVersions(this,"defaultMessages");return e.unshift({}),e=s.extend(...e),e},_confirmationExecutor(e){this.confirmation?this.getConfirmDialog(e).open():e()},async _handleWidget(){if(!this.dispatched)return this.frontend_options=this.frontend_options||{},this.frontend_options.url=this.getLinkWithParameters(),this.frontend_options.title=this.frontend_options.title||this.label,l("oro/"+this.frontend_handle+"-widget").then((e=>{const t=new e(this.frontend_options);return t.render(),t}))},_handleRedirect(){if(this.dispatched)return;const e=this.getLinkWithParameters();a.execute("redirectTo",{url:e},{redirect:!0})},async _handleAjax(){if(!this.dispatched)return this.reloadData&&this.datagrid.showLoading(),this._doAjaxRequest()},async _doAjaxRequest(){return t.ajax({url:this.getLink(),data:this.getActionParameters(),context:this,dataType:"json",type:this.requestType,error:this._onAjaxError,success:this._onAjaxSuccess})},_onAjaxError(e){this.reloadData&&this.datagrid.hideLoading()},_onAjaxSuccess(e){this.reloadData&&(this.datagrid.hideLoading(),this.datagrid.collection.fetch({reset:!0})),this._showAjaxSuccessMessage(e)},_showAjaxSuccessMessage(e){const t=e.successful?this.messages.success:this.messages.error,i=e.successful?"success":"error",s=e[`${i}MessageOptions`]||this[`${i}MessageOptions`]||{},n=e.message||r(t);n&&a.execute("showFlashMessage",i,n,s)},getLink(e={}){const i=this.datagrid.collection.url,n=d.unpackFromQueryString(i.substring(i.indexOf("?"),i.length));return o.generate(this.route,s.extend(s.extend([],this.route_parameters),t.extend(!0,{},n,e)))},getLinkWithParameters(){return this.getLink(this.getActionParameters())},getActionParameters:()=>({}),getConfirmDialog(e){return this.confirmModal&&(this.confirmModal.dispose(),delete this.confirmModal),this.confirmModal=new this.confirmModalConstructor(this.getConfirmDialogOptions()),this.confirmModal.on("ok",e).on("hidden",function(){delete this.confirmModal}.bind(this)),this.confirmModal},getConfirmDialogOptions(){return{title:r(this.messages.confirm_title),content:this.getConfirmContentMessage(),okText:r(this.messages.confirm_ok),cancelText:r(this.messages.confirm_cancel)}},getConfirmContentMessage(){return r(this.messages.confirm_content,this.messages.confirm_content_params)},getRequestType(){return this.requestType}});return p}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/action/ajax-action.js":(e,t,i)=>{var s,n;s=[i("./bundles/orodatagrid/js/datagrid/action/model-action.js")],void 0===(n=function(e){"use strict";return e.extend({requestType:"POST",constructor:function e(t){e.__super__.constructor.call(this,t)}})}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/action/ajaxdelete-action.js":(e,t,i)=>{var s,n;s=[i("./bundles/orodatagrid/js/datagrid/action/model-action.js"),i("./bundles/oroui/js/delete-confirmation.js"),i("./bundles/oroui/js/mediator.js")],void 0===(n=function(e,t,i){"use strict";const s=e.extend({confirmation:!0,confirmModalConstructor:t,requestType:"DELETE",defaultMessages:{confirm_title:"Delete Confirmation",confirm_content:"Are you sure you want to delete this item?",confirm_ok:"Yes",confirm_cancel:"Cancel",success:"Removed.",error:"Not removed.",empty_selection:"Please, select item to remove."},constructor:function e(t){e.__super__.constructor.call(this,t)},_doAjaxRequest:function(){i.trigger("datagrid:beforeRemoveRow:"+this.datagrid.name,this.model),s.__super__._doAjaxRequest.call(this)},_onAjaxSuccess:function(...e){i.trigger("datagrid:afterRemoveRow:"+this.datagrid.name),s.__super__._onAjaxSuccess.apply(this,e)}});return s}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/action/delete-action.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/oroui/js/messenger.js"),i("./bundles/orotranslation/js/translator.js"),i("./bundles/oroui/js/delete-confirmation.js"),i("./bundles/orodatagrid/js/datagrid/action/model-action.js")],void 0===(n=function(e,t,i,s,n){"use strict";return n.extend({confirmModalConstructor:s,defaultMessages:{confirm_title:"Delete Confirmation",confirm_content:"Are you sure you want to delete this item?",confirm_ok:"Yes, Delete",confirm_cancel:"Cancel",success:"Item deleted"},constructor:function e(t){e.__super__.constructor.call(this,t)},execute:function(){this.getConfirmDialog((()=>{this.doDelete(this.messages)})).open()},doDelete:function(e){this.model.destroy({url:this.getLink(),wait:!0,success:function(){t.notificationFlashMessage("success",i(e.success))}})}})}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/action/delete-mass-action.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/delete-confirmation.js"),i("./bundles/orotranslation/js/translator.js"),i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/orodatagrid/js/datagrid/action/mass-action.js"),i("./bundles/oroui/js/mediator.js")],void 0===(n=function(e,t,i,s,n){"use strict";const o=s.extend({confirmModalConstructor:e,defaultMessages:{confirm_title:"Delete Confirmation",confirm_content:"Are you sure you want to delete these items?",confirm_ok:"Yes, Delete",confirm_cancel:"Cancel",success:"Selected items were deleted.",error:"Selected items were not deleted.",empty_selection:"Please select items to delete."},confirmMessages:{selected_message:"oro.datagrid.mass_action.delete.selected_message",max_limit_message:"oro.datagrid.mass_action.delete.max_limit_message",restricted_access_message:"oro.datagrid.mass_action.delete.restricted_access_message",restricted_access_empty_message:"oro.datagrid.mass_action.delete.restricted_access_empty_message"},confirmMessage:null,allowOk:!0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){o.__super__.initialize.call(this,e),this.confirmMessage=t(this.defaultMessages.confirm_content),this.confirmation=!1},getConfirmDialogOptions:function(){const e=o.__super__.getConfirmDialogOptions.call(this);return e.allowOk=this.allowOk,e},_onAjaxSuccess:function(e,t,i){if("POST"===this.requestType)return this.requestType="DELETE",this.setConfirmMessage(e),this.reloadData&&this.datagrid.hideLoading(),this.confirmation=!0,o.__super__.execute.call(this);o.__super__._onAjaxSuccess.call(this,e,t,i),n.trigger("datagrid:afterMassRemoveRow:"+this.datagrid.name)},execute:function(){this.requestType="POST",this.confirmModal=null,this.checkSelectionState()&&o.__super__.executeConfiguredAction.call(this)},getConfirmContentMessage:function(){return this.confirmMessage},setConfirmMessage:function(e){if(this.allowOk=!0,this.isDefined(e.selected)&&this.isDefined(e.deletable)&&this.isDefined(e.max_limit))if(0===e.deletable)this.confirmMessage=t(this.confirmMessages.restricted_access_empty_message),this.allowOk=!1;else if(e.deletable<=e.max_limit)if(e.deletable>=e.selected){const i={selected:e.selected};this.confirmMessage=t(this.confirmMessages.selected_message,i,e.selected)}else this.confirmMessage=t(this.confirmMessages.restricted_access_message,{deletable:e.deletable,selected:e.selected});else this.confirmMessage=t(this.confirmMessages.max_limit_message,{max_limit:e.max_limit})},isDefined:function(e){return!i.isUndefined(e)},getLink:function(e){if("DELETE"===this.requestType){const t=this.getActionParameters();i.isUndefined(e)&&(e={}),e=i.extend(t,e)}return o.__super__.getLink.call(this,e)}});return o}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/action/dialog-action.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/jquery.js"),i("./bundles/orotranslation/js/translator.js"),i("./bundles/orodatagrid/js/datagrid/action/model-action.js"),i("./bundles/oroui/js/app/components/widget-component.js")],void 0===(n=function(e,t,i,s){"use strict";const n=i.extend({useDirectLauncherLink:!1,widgetOptions:null,widgetComponent:null,widgetDefaultOptions:{type:"dialog",multiple:!1,"reload-grid-name":"",options:{dialogOptions:{title:t("Update item"),allowMaximize:!1,allowMinimize:!1,modal:!0,resizable:!1,maximizedHeightDecreaseBy:"minimize-bar",width:635}}},defaultMessages:{saved:t("Item updated successfully")},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(t){n.__super__.initialize.call(this,t),this.widgetOptions=e.extend(!0,{},this.widgetDefaultOptions,this.widgetOptions,{options:{url:this.getLink()}})},dispose:function(){this.disposed&&(this.widgetComponent&&this.widgetComponent.dispose(),delete this.widgetComponent,n.__super__.dispose.call(this))},run:function(){this.widgetComponent||(this.widgetComponent=new s(this.widgetOptions)),this.widgetComponent.openWidget()}});return n}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/action/export-action.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/jquery.js"),i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/orodatagrid/js/datagrid/action/abstract-action.js"),i("./bundles/orotranslation/js/translator.js"),i("./bundles/oroui/js/mediator.js")],void 0===(n=function(e,t,i,s,n){"use strict";const o=i.extend({collection:void 0,isModalBinded:!1,messages:{success:"oro.datagrid.export.success.message",fail:"oro.datagrid.export.fail.message"},defaultMessages:{confirm_title:"Export Confirmation",confirm_ok:"Yes",confirm_cancel:"Cancel"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.route="oro_datagrid_export_action",this.route_parameters={gridName:e.datagrid.name},this.collection=e.datagrid.collection,this.reloadData=!1,this.frontend_handle="ajax",o.__super__.initialize.call(this,e)},createLauncher:function(i){const s=o.__super__.createLauncher.call(this,i);return this.listenTo(s,"expand",(function(i){const s=this.collection.getFetchData();t.each(i.$el.find(".dropdown-menu a"),(function(n){const o=e(n);this.isModalBinded||this.createWarningModalForMaxRecords(o,i),o.attr("href",this.getLink(t.extend({format:o.data("key")},s)))}),this),this.isModalBinded=!0})),s},getActionParameters:function(){return t.extend({format:this.actionKey},this.collection.getFetchData())},_onAjaxError:function(e){n.execute("showFlashMessage","error",this.messages.fail),o.__super__._onAjaxError.call(this,e)},createWarningModalForMaxRecords:function(e,i){const n=t.findWhere(i.links,{key:e.data("key")}),o=(this.collection.state||{}).totalRecords||0,r=this;n.show_max_export_records_dialog&&n.max_export_records&&o>=n.max_export_records&&e.on("click",(function(t){t.stopPropagation(),t.preventDefault();const i=e;r.confirmModal=new r.confirmModalConstructor({title:s(r.messages.confirm_title),content:s("oro.datagrid.export.max_limit_message",{max_limit:n.max_export_records,total:o}),okText:s(r.messages.confirm_ok),cancelText:s(r.messages.confirm_cancel),allowOk:r.allowOk}),r.confirmModal.on("ok",(function(){window.location.href=i.attr("href"),r.confirmModal.off()})),r.confirmModal.open()}))}});return o}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/action/frontend-action.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/mediator.js"),i("./bundles/orodatagrid/js/datagrid/action/model-action.js")],void 0===(n=function(e,t){"use strict";return t.extend({constructor:function e(t){e.__super__.constructor.call(this,t)},execute:function(){e.trigger("datagrid:frontend:execute:"+this.datagrid.name,this),this.disposed||this.$el.dropdown("toggle")}})}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/action/frontend-mass-action.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/oroui/js/mediator.js"),i("./bundles/oroui/js/messenger.js"),i("./bundles/orotranslation/js/translator.js"),i("./bundles/orodatagrid/js/datagrid/action/mass-action.js")],void 0===(n=function(e,t,i,s,n){"use strict";return n.extend({constructor:function e(t){e.__super__.constructor.call(this,t)},execute:function(){const e=this.datagrid.getSelectionState();0===e.selectedIds.length&&e.inset?i.notificationFlashMessage("warning",s(this.messages.empty_selection)):t.trigger("datagrid:mass:frontend:execute:"+this.datagrid.name,this)},dispose:function(){this.disposed||(t.off("datagrid:mass:frontend:execute:"+this.datagrid.name),n.__super__.dispose.call(this))}})}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/action/mass-action.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/oroui/js/messenger.js"),i("./bundles/orotranslation/js/translator.js"),i("./bundles/oroui/js/modal.js"),i("./bundles/orodatagrid/js/datagrid/action/abstract-action.js")],void 0===(n=function(e,t,i,s,n){"use strict";const o=n.extend({defaultMessages:{confirm_title:"Mass Action Confirmation",confirm_content:"Are you sure you want to do this?",confirm_ok:"Yes, do it",confirm_cancel:"Cancel",success:"Mass action performed.",error:"Mass action is not performed.",empty_selection:"Please, select items to perform mass action."},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(t){o.__super__.initialize.call(this,t);const i={};i[this.datagrid.name]=this.datagrid.collection.urlParams||{},e.extend(this.route_parameters,i,{gridName:this.datagrid.name,actionName:this.name})},execute:function(){this.checkSelectionState()&&o.__super__.execute.call(this)},checkSelectionState:function(){const e=this.datagrid.getSelectionState();return 0!==e.selectedIds.length||!e.inset||(t.notificationFlashMessage("warning",i(this.messages.empty_selection)),!1)},getActionParameters:function(){const e=this.datagrid.getSelectionState(),t=this.datagrid.collection,i=t.stateHashKey();let s={inset:e.inset?1:0,values:e.selectedIds.join(",")};return s[i]=t.stateHashValue(),s=t.processFiltersParams(s,null,"filters"),s},_onAjaxSuccess:function(e,t,i){this.datagrid.resetSelectionState(),o.__super__._onAjaxSuccess.call(this,e,t,i)}});return o}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/action/model-action.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/orodatagrid/js/datagrid/action/abstract-action.js"),i("./bundles/orodatagrid/js/url-helper.js")],void 0===(n=function(e,t,i){"use strict";const s=window.location,n=t.extend({model:null,link:void 0,title:void 0,ariaLabel:void 0,backUrl:!1,backUrlParameter:"back",constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(t){const i=t||{};if(!i.model)throw new TypeError('"model" is required');this.model=i.model,e.has(i,"backUrl")&&(this.backUrl=i.backUrl),e.has(i,"backUrlParameter")&&(this.backUrlParameter=i.backUrlParameter),n.__super__.initialize.call(this,t);const s=this.model.get(this.title);s&&(this.launcherOptions.title=s);const o=this.model.get(this.ariaLabel);o&&(this.launcherOptions.ariaLabel=o)},getLink:function(){let t,i;if(!this.link)throw new TypeError('"link" is required');return t=this.model.has(this.link)?this.model.get(this.link):this.link,this.backUrl&&(i=e.isBoolean(this.backUrl)?s.href:this.backUrl,i=encodeURIComponent(i),t=this.addUrlParameter(t,this.backUrlParameter,i)),t},addUrlParameter:function(e,t,s){return i.addUrlParameter(e,t,s)}});return n}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/action/navigate-action.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/orotranslation/js/translator.js"),i("./bundles/oroui/js/mediator.js"),i("./bundles/orodatagrid/js/datagrid/action/model-action.js")],void 0===(n=function(e,t,i,s){"use strict";const n=s.extend({useDirectLauncherLink:!0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(t){n.__super__.initialize.call(this,t),t.useDirectLauncherLink&&(this.useDirectLauncherLink=t.useDirectLauncherLink),this.on("preExecute",this._preExecuteSubscriber.bind(this)),t.parameters&&(this.parameters=t.parameters),this.useDirectLauncherLink&&(this.launcherOptions=e.extend({link:this.getLink(),runAction:!1},this.launcherOptions))},execute:function(e){let t=this.getLink(),s=this.datagrid.collection.stateHashKey(),n=this.datagrid.collection.stateHashValue();if(t=this.addUrlParameter(t,s,n),e.parameters)for(s in e.parameters)e.parameters.hasOwnProperty(s)&&(n=e.parameters[s],t=this.addUrlParameter(t,s,n));if(this.parameters)for(s in this.parameters)this.parameters.hasOwnProperty(s)&&(n=this.parameters[s],t=this.addUrlParameter(t,s,n));const{attributes:o={}}=this.launcherOptions;o.target?window.open(t,o.target):i.execute("redirectTo",{url:t},e)},_preExecuteSubscriber:function(e,s){i.once("page:beforeError",(function(e,s){let n;403===e.status&&(s.stopPageProcessing=!0,n=t("You do not have permission to perform this action."),i.execute("addMessage","error",n,{flash:!0}))})),i.trigger("grid_action:navigateAction:preExecute",e,s)}});return n}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/action/refresh-collection-action.js":(e,t,i)=>{var s,n;s=[i("./bundles/orodatagrid/js/datagrid/action/abstract-action.js")],void 0===(n=function(e){"use strict";const t=e.extend({collection:void 0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){const i=e||{};if(!i.datagrid)throw new TypeError('"datagrid" is required');this.collection=i.datagrid.collection,t.__super__.initialize.call(this,e)},execute:function(){this.datagrid.setAdditionalParameter("refresh",!0),this.collection.fetch({reset:!0}),this.datagrid.removeAdditionalParameter("refresh")}});return t}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/action/reset-collection-action.js":(e,t,i)=>{var s,n;s=[i("./bundles/orodatagrid/js/datagrid/action/abstract-action.js"),i("./bundles/oroui/js/tools.js")],void 0===(n=function(e,t){"use strict";const i=e.extend({collection:void 0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){const t=e||{};if(!t.datagrid)throw new TypeError('"datagrid" is required');this.collection=t.datagrid.collection,i.__super__.initialize.call(this,e)},execute:function(){this.collection.updateState(t.deepClone(this.collection.initialState)),this.collection.fetch({reset:!0})}});return i}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/action/row/importexport-action.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/jquery.js"),i("./bundles/orodatagrid/js/datagrid/action/model-action.js"),i("./bundles/oroimportexport/js/importexport-manager.js")],void 0===(n=function(e,t,i){"use strict";const s=t.extend({configuration:{options:{datagridName:void 0,routeOptions:{}}},importProcessor:null,importJob:null,importValidateJob:null,exportProcessor:null,exportJob:null,exportTemplateJob:null,importExportManager:null,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(t){s.__super__.initialize.call(this,t),null===this.configuration.options.datagridName&&(this.configuration.options.datagridName=this.datagrid.name);const n=e.extend({},this.configuration.options,{entity:this.entity_class,importProcessor:this.importProcessor,importJob:this.importJob,importValidateJob:this.importValidateJob,exportProcessor:this.exportProcessor,exportJob:this.exportJob,exportTemplateJob:this.exportTemplateJob});this.importExportManager=new i(n)},execute:function(){switch(this.type){case"import":this.importExportManager.handleImport();break;case"export":this.importExportManager.handleExport()}},dispose:function(){this.disposed||(delete this.importExportManager,s.__super__.dispose.call(this))}});return s}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/action/select-data-appearance-action.js":(e,t,i)=>{var s,n;s=[i("./bundles/orodatagrid/js/datagrid/action/abstract-action.js"),i("./bundles/orodatagrid/js/datagrid/dropdown-select-choice-launcher.js")],void 0===(n=function(e,t){"use strict";const i=e.extend({launcher:t,collection:void 0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){const t=e||{};if(!t.datagrid)throw new TypeError('"datagrid" is required');this.datagrid=t.datagrid,i.__super__.initialize.call(this,e)},execute:function(e){this.datagrid.changeAppearance(e.key,e.item.options)}});return i}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/action/show-component-action.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/orodatagrid/js/datagrid/action/abstract-action.js"),s=i("./bundles/orodatagrid/js/datagrid/action-component-dropdown-launcher.js");return t.extend({launcher:s,constructor:function e(t){e.__super__.constructor.call(this,t)},execute:function(){}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/action/trigger-event-action.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/orodatagrid/js/datagrid/action/model-action.js")],void 0===(n=function(e,t){"use strict";const s=i("./bundles/oroui/js/mediator.js");return t.extend({constructor:function e(t){e.__super__.constructor.call(this,t)},execute:function(){const e=this.datagrid.getGridScope();e&&s.trigger(this.event_name+":"+e,[this.model.id]),s.trigger(this.event_name,[this.model.id])}})}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/actions-panel.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/extend/backbone.js").View.extend({className:"btn-group",actions:[],launchers:[],constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){const t=e||{};this.subviews=[],t.actions&&this.setActions(t.actions),s.__super__.initialize.call(this,e)},dispose:function(){this.disposed||(delete this.launchers,delete this.actions,s.__super__.dispose.call(this))},render:function(){this.$el.empty();const e=this.$el.is(".dropdown-menu");return this.launchers.forEach((t=>{t.setOptions({withinDropdown:e}),this.$el.append(t.render().$el),t.trigger("appended")})),this},haveActions:function(){return!t.isEmpty(this.actions)},setActions:function(e){this.actions=[],this.launchers=[],t.each(e,(function(e){this.actions.push(e),this.launchers.push(e.createLauncher())}),this),this.subviews.push(...this.actions)},disable:function(){return t.each(this.launchers,(function(e){e.disable()})),this},enable:function(){return t.each(this.launchers,(function(e){e.enable()})),this}});return s}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/body.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/mediator.js"),n=i("./bundles/oroui/js/extend/chaplin.js"),o=i("./bundles/orodatagrid/js/extend/backgrid.js"),r=i("./bundles/orodatagrid/js/datagrid/row.js"),a=n.CollectionView.extend({tagName:"tbody",autoRender:!1,itemView:r,animationDuration:0,renderItems:!0,rowClassName:void 0,themeOptions:{optionPrefix:"body",className:"grid-body"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){t.extend(this,t.pick(e,["rowClassName","columns","filteredColumns","emptyText","gridRowsCounter"])),this.rows=this.subviews,"rowView"in e.themeOptions&&(this.itemView=e.themeOptions.rowView),a.__super__.initialize.call(this,e)},dispose:function(){this.disposed||(delete this.columns,delete this.filteredColumns,delete this.gridRowsCounter,a.__super__.dispose.call(this))},renderAllItems:function(){const e=a.__super__.renderAllItems.call(this);return s.trigger("layout:adjustHeight"),e},getRowConstructor(e){return e.get("rowView")&&e.get("rowView").prototype?e.get("rowView"):this.row||this.itemView},initItemView:function(e){const t=this.getRowConstructor(e);if(t){const i={autoRender:!1,model:e,dataCollection:this.collection,collection:this.filteredColumns,columns:this.columns,rowClassName:this.rowClassName,ariaRowsIndexShift:this.gridRowsCounter.getHeaderRowsCount()};this.columns.trigger("configureInitializeOptions",t,i);const s=new t(i);return this.attachListenerToSingleRow(s),s}throw new Error("The one of Body#row or Body#itemView properties must be defined or the initItemView() must be overridden.")},attachListenerToSingleRow:function(e){e.on("clicked",(function(e,t){this.trigger("rowClicked",e,t)}),this)},initFallback:function(){if(!this.fallbackSelector&&this.emptyText){const e=new o.EmptyRow({emptyText:this.emptyText,columns:this.columns}).render().el;this.fallbackSelector=t.map(e.classList,(function(e){return"."+e})).join(""),this.$el.append(e)}a.__super__.initFallback.call(this)},render:function(){return this._deferredRender(),a.__super__.render.call(this),this._resolveDeferredRender(),this}});return a}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/builder/html-templates-preloader.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var s=i("./bundles/oroui/js/app/services/load-modules.js"),n=i.n(s);const o={processDatagridOptions:function(e,t){const i=t.metadata.columns.filter((e=>e.frontend_template)).map((e=>n()(e.frontend_template).then((t=>{e.template=t,delete e.frontend_template}))));return i.length?Promise.all(i).then((()=>e.resolve())):e.resolve(),e},init:function(e,t){e.resolve()}}},"./bundles/orodatagrid/js/datagrid/cell-event-list.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/backbone.js");function s(e){this.columns=e,e.on("change:renderable add remove reset change:columnEventList",(()=>{delete this.cachedEventList,this.trigger("change")}))}return s.prototype={getEventsMap:function(){if(!this.cachedEventList){const e={};this.columns.each((function(t){if(!t.get("renderable"))return;const i=t.get("cell");if(i.prototype.delegatedEventBinding&&"function"!=typeof i.prototype.events){const t=i.prototype.events;for(const i in t)e.hasOwnProperty(i)||(e[i]=!0)}})),this.cachedEventList=e}return this.cachedEventList}},Object.assign(s.prototype,t.Events),s}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/cell-iterator.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/base-class.js"),s=i("./bundles/oroui/js/extend/jquery.js"),n=i("./bundles/oroui/js/extend/underscore.js");return t.extend({constructor:function e(t,i){this.current=i,this.grid=t,this.columns=t.columns,this.rows=t.collection,e.__super__.constructor.call(this,t,i)},toResolvedPromise:function(e){const t=s.Deferred();return t.resolve(e),t.promise()},isColumnVisible:function(e){return e.get("renderable")},getCurrentCellInfo:function(){const e=this.rows.indexOf(this.current.model),t=0===e,i=e>=this.rows.length-1,s=this.columns.indexOf(this.current.column);return{row:{i:e,first:t,last:i},column:{i:s,first:s<=n.findIndex(this.columns.models,this.isColumnVisible),last:s>=n.findLastIndex(this.columns.models,this.isColumnVisible)}}},getNextPage:function(){return this.rows.hasNext()?this.rows.getNextPage():this.rows.state.firstPage!==this.rows.state.currentPage?this.rows.getPage(this.rows.state.firstPage):this.toResolvedPromise({})},getPreviousPage:function(){return this.rows.hasPrevious()?this.rows.getPreviousPage():this.rows.state.lastPage!==this.rows.state.currentPage?this.rows.getPage(this.rows.state.lastPage):this.toResolvedPromise({})},next:function(){const e=this.getCurrentCellInfo();let t,i;if(e.column.last){if(e.row.last)return this.getNextPage().then((()=>(this.current=this.findCellByIndexOrNext(0,0,1),this.current)));i=e.row.i+1,t=0}else i=e.row.i,t=e.column.i+1;return this.current=this.findCellByIndexOrNext(i,t,1),this.toResolvedPromise(this.current)},nextRow:function(){const e=this.getCurrentCellInfo(),t=e.row.i+1,i=e.column.i;return e.row.last?this.getNextPage().then((()=>(this.current=this.findCellByIndexOrNext(0,i,1),this.current))):(this.current=this.findCellByIndexOrNext(t,i,1),this.toResolvedPromise(this.current))},prev:function(){const e=this.getCurrentCellInfo();let t,i;if(e.column.first){if(e.row.first)return this.getPreviousPage().then((()=>(this.current=this.findCellByIndexOrNext(this.rows.length-1,this.columns.length-1,-1),this.current)));i=e.row.i-1,t=this.columns.length-1}else i=e.row.i,t=e.column.i-1;return this.current=this.findCellByIndexOrNext(i,t,-1),this.toResolvedPromise(this.current)},prevRow:function(){const e=this.getCurrentCellInfo(),t=e.row.i-1,i=e.column.i;return e.row.first?this.getPreviousPage().then((()=>(this.current=this.findCellByIndexOrNext(this.rows.length-1,i,-1),this.current))):(this.current=this.findCellByIndexOrNext(t,i,-1),this.toResolvedPromise(this.current))},findCellByIndexOrNext:function(e,t,i){let s;for(;!s&&t>=0&&t<this.columns.length;)s=this.grid.findCellByIndex(e,t),t+=i;return s}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/cell/action-cell.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/jquery.js"),o=i("./bundles/oroui/js/extend/underscore.js"),r=i("./bundles/orotranslation/js/translator.js"),a=i("./bundles/orodatagrid/js/extend/backgrid.js"),l=i("./bundles/oroui/js/tools.js");let d=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);d=o.extend({showCloseButton:!1,allowDefaultAriaLabel:!0},d);const c=a.Cell.extend({className:"action-cell",actions:void 0,isDropdownActions:null,actionsHideCount:3,launchers:void 0,showCloseButton:d.showCloseButton,launcherMode:"",allowDefaultAriaLabel:d.allowDefaultAriaLabel,actionsState:"",baseMarkup:o.template('<div class="more-bar-holder">\n <div class="dropleft">\n <a class="dropdown-toggle" href="#" role="button" id="<%- togglerId %>" data-toggle="dropdown" \n aria-haspopup="true" aria-expanded="false" aria-label="<%- label %>">\n <span class="icon fa-ellipsis-h fa--no-offset" aria-hidden="true"></span>\n </a>\n <ul class="dropdown-menu dropdown-menu__action-cell launchers-dropdown-menu" \n aria-labelledby="<%- togglerId %>"></ul>\n </div>\n </div>'),simpleBaseMarkup:o.template('<div class="more-bar-holder action-row"></div>'),closeButtonTemplate:o.template(`<li class="dropdown-close"><i class="fa-close hide-text">${r("Close")}</i></li>`),launchersContainerSelector:".launchers-dropdown-menu",launchersListTemplate:o.template('<% if (withIcons) { %>\n <li><ul class="launchers-list"></ul></li>\n <% } else { %>\n <li class="well-small"><ul class="list-unstyled launchers-list"></ul></li>\n <% } %>'),simpleLaunchersListTemplate:o.template('<% if (withIcons) { %>\n <ul class="nav nav--block nav-pills icons-holder launchers-list"></ul>\n <% } else { %>\n <ul class="unstyled launchers-list"></ul>\n <% } %>'),launcherItemTemplate:o.template("<li class=\"launcher-item<% if (className) { %> <%= 'mode-' + className %><% } %>\"></li>"),events:{click:"_showDropdown","keydown .dropdown-menu":"onKeydown","click .dropdown-close .fa-close":"_hideDropdown"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){const t=e||{};this.subviews=[],void 0!==t.actionsHideCount&&(this.actionsHideCount=t.actionsHideCount),void 0!==t.themeOptions.actionsHideCount&&(this.actionsHideCount=t.themeOptions.actionsHideCount),void 0!==t.allowDefaultAriaLabel&&(this.allowDefaultAriaLabel=t.allowDefaultAriaLabel),o.isObject(t.themeOptions.launcherOptions)&&(this.launcherMode=t.themeOptions.launcherOptions.launcherMode||this.launcherMode,this.actionsState=t.themeOptions.launcherOptions.actionsState||this.actionsState),c.__super__.initialize.call(this,e),this.actions=this.createActions(),o.each(this.actions,(function(e){this.listenTo(e,"preExecute",this.onActionRun)}),this),this.listenTo(this.model,"change:action_configuration",this.onActionConfigChange),this.subviews.push(...this.actions)},delegateEvents(e){return c.__super__.delegateEvents.call(this,e),l.isTouchDevice()||(this.$el.on(`mouseover${this.eventNamespace()}`,".dropdown-toggle",this._showDropdown.bind(this)),this.$el.on(`mouseleave${this.eventNamespace()}`,".dropleft.show",this._hideDropdown.bind(this))),this},dispose:function(){this.disposed||(delete this.actions,delete this.column,c.__super__.dispose.call(this))},onActionRun:function(e){this.$('.show > [data-toggle="dropdown"]').trigger("tohide.bs.dropdown")},createActions:function(){const e=[],t=this.column.get("actions"),i=this.model.get("action_configuration")||{};return o.each(t,(function(t,s){i&&!1===i[s]||e.push(this.createAction(t,{...i[s]||{},name:s}))}),this),o.sortBy(e,"order")},createAction:function(e,t){return new e({model:this.model,datagrid:this.column.get("datagrid"),configuration:t})},createLaunchers:function(){return this.actions.map((e=>e.launcherInstance||e.createLauncher({launcherMode:this.launcherMode,allowDefaultAriaLabel:this.allowDefaultAriaLabel})))},onActionConfigChange:function(){const e=this.model.get("action_configuration")||{};this.actions.forEach((t=>{const i=e[t.configuration.name];void 0!==i&&i!==t.launcherInstance.enabled&&t.launcherInstance[i?"enable":"disable"]()})),Object.entries(e).forEach((([t,i])=>{if(!i)return;let s=this.actions.find((e=>e.configuration.name===t));const n=this.column.get("actions")[t];!s&&n&&(s=this.createAction(n,{...e[t]||{},name:t}),s.createLauncher({launcherMode:this.launcherMode,allowDefaultAriaLabel:this.allowDefaultAriaLabel}),this.actions.push(s))}));const t=Object.keys(this.column.get("actions")).map((e=>this.actions.find((t=>t.configuration.name===e))));this.actions.length=0,this.actions.push(...o.sortBy(o.compact(t),"order")),this.isLauncherListFilled=!1,this.fillLauncherList()},render:function(){return o.isEmpty(this.actions)?(this.$el.attr({"aria-label":null,"data-blank-content":null,"aria-colindex":null}).empty(),this):(this.isDropdownActions=this.actions.length>=this.actionsHideCount,"show"===this.actionsState?this.isDropdownActions=!1:"hide"===this.actionsState&&(this.isDropdownActions=!0),this.isDropdownActions||(this.baseMarkup=this.simpleBaseMarkup,this.launchersListTemplate=this.simpleLaunchersListTemplate,this.launchersContainerSelector=".more-bar-holder"),this.$el.html(this.baseMarkup(this.getTemplateData())),this.isLauncherListFilled=!1,this.isDropdownActions||this.fillLauncherList(),this.$el.toggleClass("dropdown-action-cell",this.isDropdownActions),this)},getTemplateData:function(){return{togglerId:"actions-cell-dropdown-"+this.cid,label:r("oro.datagrid.row_actions.label")}},fillLauncherList:function(){if(!this.isLauncherListFilled){this.isLauncherListFilled=!0;let e=this.createLaunchers();e.forEach((e=>e.$el.detach())),e=e.filter((e=>e.enabled));const t=this.getLaunchersByIcons(e),i=this.$(this.launchersContainerSelector);if(i.empty(),this.showCloseButton&&e.length>=this.actionsHideCount&&i.append(this.closeButtonTemplate()),t.withIcons.length&&this.renderLaunchersList(t.withIcons,{withIcons:!0}).appendTo(i),t.withIcons.length&&t.withoutIcons.length){const e=document.createElement("UL"===i[0].tagName?"li":"span");e.classList.add("divider"),i.append(e)}t.withoutIcons.length&&this.renderLaunchersList(t.withoutIcons,{withIcons:!1}).appendTo(i)}},renderLaunchersList:function(e,t){t=t||{};const i=n(this.launchersListTemplate(t)),s=i.filter(".launchers-list").length?i:n(".launchers-list",i);return o.each(e,(function(e){s.append(this.renderLauncherItem(e))}),this),i},renderLauncherItem:function(e,t){t=o.extend(t||{},{className:e.launcherMode});const i=n(this.launcherItemTemplate(t)),s=i.filter(".launcher-item").length?i:n(".launcher-item",i);s.append(e.render().$el);const r="mode-"+e.launcherMode;return s.addClass(r),this.isDropdownActions&&e.$el.addClass("dropdown-item"),i},getLaunchersByIcons:function(e){const t={withIcons:[],withoutIcons:[]};return o.each(e,(function(e){e.icon?t.withIcons.push(e):t.withoutIcons.push(e)}),this),t},_showDropdown:function(e){this.fillLauncherList(),this.$('[data-toggle="dropdown"]').parent().hasClass("show")||this.$('[data-toggle="dropdown"]').dropdown("toggle"),this.model.set("isDropdownActions",this.isDropdownActions),e.preventDefault(),e.stopPropagation()},_hideDropdown:function(e){this.$('[data-toggle="dropdown"]').parent().hasClass("show")&&this.$('[data-toggle="dropdown"]').dropdown("toggle"),e.stopPropagation()},onKeydown:function(e){27===e.which&&this._hideDropdown(e)}});return c}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/cell/boolean-cell.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/orodatagrid/js/extend/backgrid.js"),s=i("./bundles/orotranslation/js/translator.js"),n=t.BooleanCell.extend({listenRowClick:!0,events:{},constructor:function e(t){e.__super__.constructor.call(this,t),this.listenTo(this.model,"change:"+this.column.get("name"),this.onModelChange)},render(){if(this.isEditableColumn())this.enterEditMode();else{this.$el.empty();let e="";const t=this.model.get(this.column.get("name"));null!==t&&(e=this.formatter.fromRaw(t)?s("Yes"):s("No")),this.$el.append("<span>").text(e),this.delegateEvents()}return this},enterEditMode(){this.currentEditor||(n.__super__.enterEditMode.call(this),this.currentEditor&&this.currentEditor.$el.inputWidget("create"))},onRowClicked(e,t){if(this.currentEditor&&!this.currentEditor.$el.is(t.target)){const e=this.column.get("name"),t=this.model.get(e);this.model.set(e,!t)}},onModelChange(e){if(this.currentEditor){const t=this.currentEditor.formatter.fromRaw(e.get(this.column.get("name")),e);this.currentEditor.$el.prop("checked",t)}}});return n}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/cell/date-cell.js":(e,t,i)=>{var s,n;s=[i("./bundles/orodatagrid/js/datagrid/cell/datetime-cell.js")],void 0===(n=function(e){"use strict";return e.extend({type:"date",className:"date-cell",constructor:function e(t){e.__super__.constructor.call(this,t)}})}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/cell/datetime-cell.js":(e,t,i)=>{var s,n;s=[i("./bundles/orodatagrid/js/datagrid/cell/string-cell.js"),i("./bundles/orodatagrid/js/datagrid/formatter/datetime-formatter.js")],void 0===(n=function(e,t){"use strict";const i=e.extend({formatterPrototype:t,type:"dateTime",className:"datetime-cell",constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){i.__super__.initialize.call(this,e),this.formatter=this.createFormatter()},createFormatter:function(){return new this.formatterPrototype({type:this.type})}});return i}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/cell/html-cell.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/orodatagrid/js/datagrid/cell/string-cell.js"),s=i("./bundles/orodatagrid/js/extend/backgrid.js");return t.extend({formatter:new s.CellFormatter,constructor:function e(t){e.__super__.constructor.call(this,t)},render:function(){const e=this.model.get(this.column.get("name")),t=this.formatter.fromRaw(e);return this.$el.html(t),this}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/cell/html-template-cell.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var s=i("./bundles/orodatagrid/js/datagrid/cell/string-cell.js"),n=i.n(s),o=i("./bundles/orotranslation/js/translator.js"),r=i.n(o);const a=n().extend({constructor:function e(t){e.__super__.constructor.call(this,t)},_attributes:()=>({"data-blank-content":null}),getTemplateData:function(){const e={...this.model.toJSON(),_cid:this.cid,_metadata:{...this.column.get("metadata")},_attrs:this._collectAttributes()},t=this.model.get(this.column.get("name"));return(null==t||"string"==typeof t&&0===t.trim().length)&&(e._blankContent=r()("oro.datagrid.cell.blank.placeholder")),e},getTemplateFunction:function(e="default"){return"function"==typeof this.column.get("metadata").template?this.column.get("metadata").template:this.column.get("metadata").template[e]},render:function(){const e=this.getTemplateFunction()(this.getTemplateData()).trim();return this.$el.html(e),this}})},"./bundles/orodatagrid/js/datagrid/cell/multi-relation-cell.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orotranslation/js/translator.js");return"backgrid".StringCell.extend({type:"multi-relation",className:"multi-relation-cell",ERROR_HTML:'<span style="color:red">'+s("Unexpected format")+"</span>",constructor:function e(t){e.__super__.constructor.call(this,t)},render:function(){let e,i=this.model.get(this.column.get("name"));if(t.isString(i))try{i=JSON.parse(i)}catch(e){return this.$el.html(this.ERROR_HTML),this}null==i&&(i={count:0,data:[]});try{e=i.count>0?'<span class="multiselect-value-wrapper"><span class="value-item">'+i.data.map((function(e){return e.label})).join('</span><span class="value-item">')+"</span></span>":""}catch(t){e=this.ERROR_HTML}return this.$el.html(e),this}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/cell/multi-select-cell.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/orodatagrid/js/extend/backgrid.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/orotranslation/js/translator.js");return t.StringCell.extend({type:"multiselect",className:"multi-select-cell",ERROR_HTML:'<span style="color:red">'+n("Unexpected format")+"</span>",constructor:function e(t){e.__super__.constructor.call(this,t)},render:function(){let e=this.model.get(this.column.get("name"));const t=this.choices;if(s.isString(e))try{e=JSON.parse(e)}catch(e){return this.$el.html(this.ERROR_HTML),this}let i;null==e&&(e=[]);try{i=e.length>0?'<span class="multiselect-value-wrapper"><span class="value-item">'+e.map((function(e){return s.findKey(t,(function(t){return t===e}))})).filter((function(e){return e})).join('</span><span class="value-item">')+"</span></span>":""}catch(e){i=this.ERROR_HTML}return this.$el.html(i),this}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/cell/number-cell.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orodatagrid/js/extend/backgrid.js"),n=i("./bundles/orodatagrid/js/datagrid/formatter/number-formatter.js"),o=s.NumberCell.extend({formatterPrototype:n,style:"decimal",constructor:function e(t){e.__super__.constructor.call(this,t)},initialize(e){t.extend(this,e),o.__super__.initialize.call(this,e),this.formatter=this.createFormatter()},createFormatter(){return new this.formatterPrototype({style:this.style})},render(){const e=o.__super__.render.call(this);return this.enterEditMode(),e},enterEditMode(){this.isEditableColumn()&&!this.currentEditor&&o.__super__.enterEditMode.call(this)},exitEditMode(){this.isEditableColumn()||o.__super__.exitEditMode.call(this)}});return o}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/cell/phone-cell.js":(e,t,i)=>{var s,n;s=[i("./bundles/orodatagrid/js/datagrid/cell/html-cell.js"),i("./bundles/orodatagrid/js/datagrid/formatter/phone-formatter.js")],void 0===(n=function(e,t){"use strict";return e.extend({className:"phone-cell",events:{"click a":"stopPropagation"},formatter:new t,constructor:function e(t){e.__super__.constructor.call(this,t)},stopPropagation:function(e){e.stopPropagation()}})}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/cell/relation-cell.js":(e,t,i)=>{var s,n;s=[i("./bundles/orodatagrid/js/extend/backgrid.js"),i("./bundles/orodatagrid/js/datagrid/formatter/cell-formatter.js")],void 0===(n=function(e,t){"use strict";return e.StringCell.extend({formatter:new t,constructor:function e(t){e.__super__.constructor.call(this,t)}})}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/cell/select-cell.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orodatagrid/js/extend/backgrid.js"),n=i("./bundles/orodatagrid/js/datagrid/editor/select-cell-radio-editor.js"),o=i("./bundles/oroui/js/tools/text-util.js"),r=s.SelectCell.extend({events:{},optionValues:[],notMarkAsBlank:!0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize(e){this.expanded&&!this.multiple&&(this.editor=n);const i=e.column.get("metadata").choices;if(!i)throw new Error("Column metadata must have choices specified");this.optionValues=Object.entries(i).map((([e,i])=>[t.escape(o.prepareText(e)),i])),r.__super__.initialize.call(this,e),this.listenTo(this.model,"change:"+this.column.get("name"),this.enterEditMode)},render(){if(t.isEmpty(this.optionValues))return;const e=r.__super__.render.call(this);return this.enterEditMode(),e},enterEditMode(){if(!this.isEditableColumn())return;const e=this.model.get(this.column.get("name"));this.currentEditor&&t.isEqual(this.currentEditor.$el.val(),e)||(r.__super__.enterEditMode.call(this),this.$el.find("select").inputWidget("create"))},exitEditMode(){this.$el.removeClass("error"),this.stopListening(this.currentEditor),delete this.currentEditor}});return r}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/cell/select-row-cell.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/app/views/base/view.js"),n=i("./bundles/orodatagrid/js/extend/backgrid.js"),o=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/select-row-cell.html"),r=s.extend({optionNames:["column"],_attributes:n.Cell.prototype._attributes,className:"select-row-cell renderable",tagName:"td",template:o,checkboxSelector:'[data-role="select-row-cell"]',events:{"change :checkbox":"onChange",click:"updateCheckbox"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.column instanceof n.Column||(this.column=new n.Column(this.column)),this.template=this.getTemplateFunction(),this.listenTo(this.model,"backgrid:select",(function(e,t){this.$(":checkbox").prop("checked",t).change()}))},dispose:function(){this.disposed||(delete this.column,delete this.$checkbox,r.__super__.dispose.call(this))},updateCheckbox:function(e){this.$checkbox.get(0)===e.target||t(e.target).closest("label").length||this.$checkbox.prop("checked",!this.$checkbox.prop("checked")).change(),e.stopPropagation()},onChange:function(e){this.model.trigger("backgrid:selected",this.model,t(e.target).prop("checked"))},render:function(){const e={selected:!1};this.model.trigger("backgrid:isSelected",this.model,e);const t=this.model.toJSON();return this.$el.html(this.template({...t,checked:e.selected})),this.$checkbox=this.$el.find(this.checkboxSelector),this.$checkbox.inputWidget("isInitialized")?this.$checkbox.inputWidget("refresh"):this.$checkbox.inputWidget("create"),this}});return r}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/cell/string-cell.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/orodatagrid/js/extend/backgrid.js"),s=i("./bundles/orodatagrid/js/datagrid/formatter/cell-formatter.js"),n=t.StringCell.extend({formatter:new s,constructor:function e(t){e.__super__.constructor.call(this,t)},_attributes(){const e={};return this.isEditableColumn()&&(e["data-blank-content"]=null),e},render(){const e=n.__super__.render.call(this);return this._computeLongValueClassName(),this.enterEditMode(),e},_computeLongValueClassName(){const e=this.column.get("name"),t=this.model.get(e),i=this.column.get("long_value_threshold");t&&i&&this.$el.toggleClass(`grid-body-cell-${e}-long-value`,t.length>=i)},enterEditMode(){this.isEditableColumn()&&!this.currentEditor&&n.__super__.enterEditMode.call(this)},exitEditMode(){this.isEditableColumn()||n.__super__.exitEditMode.call(this)}});return n}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/cell/time-cell.js":(e,t,i)=>{var s,n;s=[i("./bundles/orodatagrid/js/datagrid/cell/string-cell.js")],void 0===(n=function(e){"use strict";return e.extend({type:"time",className:"time-cell",constructor:function e(t){e.__super__.constructor.call(this,t)}})}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/column/action-column.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/backbone.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/orodatagrid/js/extend/backgrid.js"),o=i("./bundles/orofrontend/js/datagrid/cell/frontend-action-cell.js"),r=i("./bundles/orofrontend/js/datagrid/cell/frontend-action-header-cell.js"),a=n.Column.extend({defaults:s.defaults({name:"",label:"",sortable:!1,editable:!1,cell:o,headerCell:r,datagrid:null,actions:[],massActions:new t.Collection},n.Column.prototype.defaults),constructor:function e(...t){e.__super__.constructor.call(this,...t)},initialize:function(e,t){const i=e||{};i.cell||(i.cell=this.defaults.cell),i.name||(i.name=this.defaults.name),s.isEmpty(i.actions)&&i.massActions.length&&this.set("renderable",!1),a.__super__.initialize.call(this,e,t)}});return a}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/columns.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/orodatagrid/js/extend/backgrid.js"),s=i("./bundles/orodatagrid/js/datagrid/cell-event-list.js");return t.Columns.extend({comparator:"order",constructor:function e(...t){e.__super__.constructor.apply(this,t)},getCellEventList:function(){return this.cellEventList||(this.cellEventList=new s(this)),this.cellEventList}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/datagrid-settings-dialog-widget.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orowindows/js/widget/dialog-widget.js"),n=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid-settings/datagrid-settings-dialog-widget-actions.html"),o=i("./bundles/oroui/js/mediator.js"),r=s.extend({View:null,view:null,viewOptions:{},actionsTemplate:n,dialogOptions:{autoResize:!1,modal:!0,resize:!1,dialogClass:"datagrid-settings-dialog",close:function(){o.trigger("dropdown-launcher:hide")}},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(!t.isFunction(e.View))throw new TypeError('"View" property should be the function');t.extend(this,t.pick(e,["View","viewOptions"])),e.dialogOptions=t.extend({},this.dialogOptions,e.dialogOptions),r.__super__.initialize.call(this,e)},render:function(){this.viewOptions._sourceElement=this.$el,this.viewOptions.title="",this.subview("datagridSettingsView",new this.View(this.viewOptions)),t.isFunction(this.subview("datagridSettingsView").beforeOpen)&&this.subview("datagridSettingsView").beforeOpen(),this.$el.append(this.actionsTemplate()),r.__super__.render.call(this)},onContentUpdated:function(){t.isFunction(this.subview("datagridSettingsView").updateViews)&&this.subview("datagridSettingsView").updateViews(),this.$el.focusFirstInput()},hide:function(){this.loadingBar.appendTo("#oroplatform-header"),r.__super__.hide.call(this)}});return r}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/dropdown-select-choice-launcher.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/jquery.js"),o=i("./bundles/oroui/js/extend/underscore.js"),r=i("./bundles/orotranslation/js/translator.js"),a=i("./bundles/oroui/js/extend/backbone.js");let l=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);l=o.extend({launcherMode:"icon-only"},l);const d=a.View.extend({enabled:!0,tagName:"a",onClickReturnValue:!0,action:void 0,label:void 0,ariaLabel:void 0,allowDefaultAriaLabel:!1,launcherMode:"",className:void 0,link:"#",links:void 0,runAction:!0,template:i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/action-launcher.html"),events:function(){return{"shown.bs.dropdown":"onDropdownShown","click .dropdown-menu a":"onClick"}},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(!e.action)throw new TypeError('"action" is required');this.setOptions(e),this.selectedItem=e.selectedItem||e.items[0],d.__super__.initialize.call(this,e)},dispose:function(){this.disposed||(delete this.action,delete this.runAction,d.__super__.dispose.call(this))},setOptions:function(e){const t=o.pick(e,"template","label","ariaLabel","allowDefaultAriaLabel","link","launcherMode","className","attributes","runAction");o.extend(this,o.pick(e,"action","items"),o.pick(t,Boolean))},getTemplateData:function(){const e=this.label||this.action.label;let t=this.ariaLabel;return!t&&this.action.ariaLabel&&(t=this.action.ariaLabel),!t&&this.allowDefaultAriaLabel&&(t=this.getDefaultAriaLabel(e)),this.launcherMode||(this.launcherMode=this.icon?l.launcherMode:"text-only"),{label:e,icon:this.selectedItem.icon,title:this.selectedItem.title,ariaLabel:t,className:this.className,iconClassName:this.selectedItem.iconClassName,launcherMode:this.launcherMode,link:this.link,links:this.items,action:this.action,attributes:this.attributes,enabled:this.enabled,tagName:this.tagName}},getDefaultAriaLabel:function(e){return`${e} ${r("oro.datagrid.action.default_postfix")}`},render:function(){this.$el.empty();const e=n(this.template(this.getTemplateData()));return e.insertAfter(this.$el),this.$el.remove(),this.setElement(e),this},onClick:function(e){const t={};if(!this.enabled)return this.onClickReturnValue;this.trigger("click",this,e.currentTarget);const i=n(e.currentTarget);t.key=i.data("key"),t.index=parseInt(i.data("index")),t.item=this.items[t.index],this.action.run(t),e.preventDefault()},onDropdownShown:function(e){this.trigger("expand",this)},disable:function(){return this.enabled=!1,this.$el.addClass("disabled"),this.$('[data-toggle="dropdown"]').addClass("disabled"),this},enable:function(){return this.enabled=!0,this.$el.removeClass("disabled"),this.$('[data-toggle="dropdown"]').removeClass("disabled"),this}});return d}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/editor/select-cell-radio-editor.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/orodatagrid/js/extend/backgrid.js")],void 0===(n=function(e,t){"use strict";return t.SelectCellEditor.extend({tagName:"ul",className:"radio-ul",template:e.template('<li><input id="<%- this.model.cid + \'_\' + this.cid + \'_\' + value %>" name="<%- this.model.cid + \'_\' + this.cid %>" type="radio" value="<%- value %>" <%= selected ? "checked" : "" %>><label for="<%- this.model.cid + \'_\' + this.cid + \'_\' + value %>"><%- text %></label></li>',null,{variable:null}),constructor:function e(t){e.__super__.constructor.call(this,t)},save:function(){const e=this.model,t=this.column;e.set(t.get("name"),this.formatter.toRaw(this.$el.find(":checked").val(),e))}})}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/footer.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orodatagrid/js/extend/backgrid.js"),n=i("./bundles/orodatagrid/js/datagrid/footer/footer-row.js"),o=i("./bundles/orodatagrid/js/datagrid/footer/footer-cell.js"),r=s.Footer.extend({tagName:"tfoot",row:n,rows:[],footerCell:o,renderable:!1,themeOptions:{optionPrefix:"footer",className:"grid-footer"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(t.extend(this,t.pick(e,["themeOptions","gridRowsCounter"])),this.rows=[],!e.collection)throw new TypeError('"collection" is required');if(!e.columns)throw new TypeError('"columns" is required');this.columns=e.columns,this.filteredColumns=e.filteredColumns;const i=e.collection.state||{};if(i.totals&&Object.keys(i.totals).length){this.renderable=!0;let e=this.gridRowsCounter.getHeaderRowsCount()+this.gridRowsCounter.getTotalRowsCount();t.each(i.totals,(function(t,i){e++,this.rows[this.rows.length]=new this.row({columns:this.columns,collection:this.filteredColumns,dataCollection:this.collection,footerCell:this.footerCell,rowName:i,ariaRowIndex:e})}),this)}},dispose:function(){this.disposed||(t.each(this.rows,(function(e){e.dispose()})),delete this.rows,delete this.columns,delete this.filteredColumns,delete this.gridRowsCounter,r.__super__.dispose.call(this))},render:function(){return this.renderable&&t.each(this.rows,(function(e){e.render(),this.$el.append(e.$el)}),this),this.delegateEvents(),this},_attributes(){return{"aria-hidden":!this.renderable||null}},getRowsCount(){return this.rows.length}});return r}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/footer/footer-cell.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/extend/backbone.js"),n=i("./bundles/orodatagrid/js/extend/backgrid.js");return s.View.extend({optionNames:["column"],_attributes:n.Cell.prototype._attributes,tagName:"th",template:t.template('<span><%- label %><%- total ? (label? ": " : "") + total : "" %></span>'),keepElement:!1,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.options=e||{},this.column instanceof n.Column||(this.column=new n.Column(this.column)),this.listenTo(e.collection,"reset",this.render),this.listenTo(this.column,"change:editable change:sortable change:renderable",(function(e){const t=e.changedAttributes();for(const e in t)t.hasOwnProperty(e)&&this.$el.toggleClass(e,t[e])}))},render:function(){this.$el.empty();const e=this.column.get("name"),i=(this.collection.state||{}).totals||{};if(!t.isUndefined(i[this.options.rowName])){if(!t.isUndefined(i[this.options.rowName])&&t.has(i[this.options.rowName].columns,e)){const t=i[this.options.rowName].columns[e];if(!t.label&&!t.total)return this;this.$el.append(this.template({label:t.label,total:t.total}))}if(!t.isUndefined(this.column.attributes.cell.prototype.className)){const e=this.column.attributes.cell.prototype.className;this.$el.addClass(t.isFunction(e)?e.call(this):e)}return this.column.has("align")&&(this.$el.removeClass("align-left align-center align-right"),this.$el.addClass("align-"+this.column.get("align"))),this}this.$el.removeClass("renderable")}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/footer/footer-row.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/orodatagrid/js/datagrid/footer/footer-cell.js"),s=i("./bundles/oroui/js/extend/chaplin.js").CollectionView.extend({optionNames:["ariaRowIndex"],tagName:"tr",className:"",animationDuration:0,constructor:function e(t){e.__super__.constructor.call(this,t)},footerCell:t,initialize:function(e){this.columns=e.columns,this.dataCollection=e.dataCollection;const t=this;this.itemView||(this.itemView=function(i){const s=i.model,n=s.get("footerCell")||e.footerCell||t.footerCell,o={column:s,collection:t.dataCollection,rowName:e.rowName,themeOptions:{className:"grid-cell grid-footer-cell"}};return s.get("name")&&(o.themeOptions.className+=" grid-footer-cell-"+s.get("name")),t.columns.trigger("configureInitializeOptions",n,o),new n(o)}),s.__super__.initialize.call(this,e),this.listenTo(this.dataCollection,"add remove reset",this._updateAttributes),this.cells=this.subviews},_updateAttributes(){this.disposed||this._setAttributes(this._collectAttributes())},_attributes(){return{"aria-rowindex":this.ariaRowIndex}},dispose:function(){this.disposed||(delete this.cells,delete this.columns,delete this.dataCollection,s.__super__.dispose.call(this))}});return s}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/formatter/cell-formatter.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/orodatagrid/js/extend/backgrid.js"),i("./bundles/oroui/js/tools/text-util.js")],void 0===(n=function(e,t,i){"use strict";const s=function(){t.CellFormatter.call(this)};return s.prototype=Object.create(t.CellFormatter.prototype),e.extend(s.prototype,{fromRaw:function(e){if(null===e)return"";const s=t.CellFormatter.prototype.fromRaw.call(this,e);return i.prepareText(s)}}),s}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/formatter/currency-formatter.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orotranslation/js/translator.js"),n=i("./bundles/orodatagrid/js/datagrid/formatter/number-formatter.js"),o=function(e){n.call(this,e)};return o.prototype=Object.create(n),t.extend(o.prototype,{style:"currency",fromRaw:function(e){if(null==e||""===e)return"";const t=Number(e.substring(3)),i=e.substring(0,3);return isNaN(t)?s("oro.datagrid.not_number"):this.formatter(t,i)}}),o}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/formatter/datetime-formatter.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/orodatagrid/js/extend/backgrid.js"),i("./bundles/orolocale/js/formatter/datetime.js")],void 0===(n=function(e,t,i){"use strict";const s=function(t){e.extend(this,t)};return s.prototype=new t.CellFormatter,e.extend(s.prototype,{type:"dateTime",fromRaw:function(e){return null===e||""===e?"":this._getFormatterFunction("format","dateTime"===this.type?"NBSP":void 0).call(i,e)},toRaw:function(e){return null===e||""===e?null:this._getFormatterFunction("convert","ToBackendFormat").call(i,e)},_getFormatterFunction:function(e,t){t=t||"";const s=e+((n=this.type).charAt(0).toUpperCase()+n.slice(1))+t;var n;if(!i.hasOwnProperty(s)||"function"!=typeof i[s])throw new Error("Can't use formatter function with name "+s);return i[s]}}),s}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/formatter/number-formatter.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orotranslation/js/translator.js"),n=i("./bundles/orodatagrid/js/datagrid/formatter/cell-formatter.js"),o=i("./bundles/orolocale/js/formatter/number.js");function r(e){e=e?t.clone(e):{},t.extend(this,e),this.formatter=function(e){const i="format"+e.charAt(0).toUpperCase()+e.slice(1);if(!t.isFunction(o[i]))throw new Error("Formatter doesn't support \""+e+'" number style');return o[i]}(this.style)}return r.prototype=new n,t.extend(r.prototype,{style:"decimal",fromRaw:function(e){return null==e||""===e?"":isNaN(e)?s("oro.datagrid.not_number"):this.formatter(e)},toRaw:function(e){let t=null;return null!==e&&""!==e&&(t=o.unformat(e)),t}}),r}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/formatter/phone-formatter.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/orodatagrid/js/extend/backgrid.js")],void 0===(n=function(e,t){"use strict";function i(e){t.CellFormatter.call(this,e)}return i.prototype=Object.create(t.CellFormatter),e.extend(i.prototype,{fromRaw:function(e){return null===e?"":this.generateLinkHTML(e)},generateLinkHTML:function(t){const i=t.trim();return`<a href="tel:${e.escape(i)}" class="nowrap"><bdo dir="ltr">${e.escape(i)}</bdo></a>`}}),i}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/grid-rows-counter.js":(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});const s=class{constructor(e){if(void 0===e)throw new Error('Option "grid" is required.');this.grid=e}getGridRowsCount(){return this.getHeaderRowsCount()+this.getTotalRowsCount()+this.getFooterRowsCount()}getHeaderRowsCount(){return this.grid.subview("header")?this.grid.subview("header").getRowsCount():0}getTotalRowsCount(){return this.grid.collection.filter((e=>!0!==e.isAuxiliary)).length}getFooterRowsCount(){return this.grid.subview("footer")?this.grid.subview("footer").getRowsCount():0}}},"./bundles/orodatagrid/js/datagrid/grid-views/collection.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/extend/backbone.js"),n=i("./bundles/oroui/js/app/models/base/collection.js"),o=i("./bundles/orodatagrid/js/datagrid/grid-views/model.js"),r=n.extend({model:o,gridName:"",constructor:function e(...t){e.__super__.constructor.apply(this,t)},initialize:function(e,i){t.extend(this,t.pick(i,["gridName"])),r.__super__.initialize.call(this,e,i)},_prepareModel:function(e,t){return e instanceof s.Model?e.set("grid_name",this.gridName,{silent:!0}):e.grid_name=this.gridName,r.__super__._prepareModel.call(this,e,t)},clone:function(){return new this.constructor(this.toJSON(),{gridName:this.gridName})},stateHashKey:function(){return r.stateHashKey(this.gridName)},stateHashValue:function(e){return null}});return r.stateHashKey=function(e){return"gridViews["+e+"]"},r}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/grid-views/model.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/backbone.js"),o=i("./bundles/oroui/js/extend/underscore.js"),r=i("./bundles/fosjsrouting/js/router.js"),a=i("./bundles/orotranslation/js/translator.js"),l=i("./bundles/oroui/js/mediator.js");let d=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);return d=o.extend({route:"oro_datagrid_api_rest_gridview_post"},d),n.Model.extend({route:d.route,urlRoot:null,sharedByLabel:"oro.datagrid.grid_views.shared_by.label",idAttribute:"name",defaults:{filters:[],sorters:[],columns:{},deletable:!1,editable:!1,is_default:!1,shared_by:null,freezeName:""},directions:{ASC:"-1",DESC:"1"},constructor:function e(t,i){e.__super__.constructor.call(this,t,i)},initialize:function(e){this.urlRoot=r.generate(this.route),o.isArray(e.filters)&&o.isEmpty(e.filters)&&this.set("filters",{}),o.isArray(e.sorters)&&o.isEmpty(e.sorters)&&this.set("sorters",{}),o.isArray(e.appearanceData)&&o.isEmpty(e.appearanceData)&&this.set("appearanceData",{}),o.each(e.sorters,(function(t,i){void 0!==this.directions[t]?e.sorters[i]=this.directions[t]:e.sorters[i]=String(t)}),this)},toGridState:function(){return{filters:this.get("filters"),sorters:this.get("sorters"),columns:this.get("columns"),gridView:this.get("name"),appearanceType:""!==this.get("appearanceType")?this.get("appearanceType"):void 0,appearanceData:this.get("appearanceData")}},toJSON:function(){return o.omit(this.attributes,["editable","deletable","shared_by","icon","freezeName"])},getLabel:function(){const e=this.get("label"),t=this.get("shared_by");return null===t?e:e+"("+a(this.sharedByLabel,{name:t})+")"},validate:function(e,t){const i=this.get("freezeName").replace(/\s+/g," "),s=[];if(""===o.trim(e.label)&&s.push(a("oro.datagrid.gridview.notBlank")),o.trim(e.label)===o.trim(i)&&s.push(a("oro.datagrid.gridview.unique")),s.length)return l.trigger(this.get("grid_name")+":grid-views-model:invalid",s),!0}})}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/grid-views/view-name-modal.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/orotranslation/js/translator.js"),s=i("./bundles/oroui/js/modal.js"),n=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/view-name-modal.html"),o=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/view-name-error-modal.html"),r=s.extend({contentTemplate:n,nameErrorTemplate:o,events:{'keydown [data-role="grid-view-input"]':"onKeyDown"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){(e=e||{}).title=e.title||t("oro.datagrid.name_modal.title"),e.content=e.content||this.contentTemplate({value:e.defaultValue||"",label:t("oro.datagrid.gridView.name"),defaultLabel:t("oro.datagrid.action.set_as_default_grid_view"),defaultChecked:e.defaultChecked||!1}),e.okText=t("oro.datagrid.gridView.save_name"),e.disposeOnHidden=!1,r.__super__.initialize.call(this,e)},onKeyDown:function(e){13===e.which&&(this.trigger("close"),this.trigger("ok"))},setNameError:function(e){this.$(".validation-failed").remove(),e&&(e=this.nameErrorTemplate({error:e}),this.$('[data-role="grid-view-input"]').addClass("error").after(e))}});return r}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/grid-views/view.js":(e,t,i)=>{var s;void 0===(s=function(t){"use strict";const s=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/grid-view.html"),n=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/grid-view-label.html"),o=i("./bundles/oroui/js/app/views/base/view.js"),r=i("./bundles/oroui/js/extend/jquery.js"),a=i("./bundles/oroui/js/extend/underscore.js"),l=i("./bundles/orotranslation/js/translator.js"),d=i("./bundles/oroui/js/error.js"),c=i("./bundles/orodatagrid/js/datagrid/grid-views/model.js"),u=i("./bundles/orodatagrid/js/datagrid/grid-views/view-name-modal.js"),h=i("./bundles/oroui/js/mediator.js"),p=i("./bundles/oroui/js/delete-confirmation.js"),_=i("./bundles/fosjsrouting/js/router.js"),g={hideSwitcherOnNoData:!0,...i("./bundles/oroui/js/app/services/module-config.js").Z(e.id)},m=o.extend({DEFAULT_GRID_VIEW_ID:"__all__",className:"grid-views",events:{"click .views-group a":"onChange","click a.save":"onSave","click a.save_as":"onSaveAs","click a.share":"onShare","click a.unshare":"onUnshare","click a.delete":"onDelete","click a.rename":"onRename","click a.discard_changes":"onDiscardChanges","click a.use_as_default":"onUseAsDefault"},template:s,titleTemplate:n,title:null,enabled:!0,appearances:null,permissions:{CREATE:!1,EDIT:!1,DELETE:!1,SHARE:!1},prevState:{},gridName:{},viewsCollection:null,originalTitle:null,defaultPrefix:l("oro.datagrid.gridView.all"),route:"oro_datagrid_api_rest_gridview_default",DeleteConfirmation:p,defaults:{DeleteConfirmationOptions:{content:l("Are you sure you want to delete this item?")}},modal:null,showErrorMessage:!1,adjustDocumentTitle:!0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(!(e=e||{}).collection)throw new TypeError('"collection" is required');if(!e.viewsCollection)throw new TypeError('"viewsCollection" is required');a.extend(this,a.pick(e,["viewsCollection","title","appearances","uniqueId"])),this.template=this.getTemplateFunction(),this.titleTemplate=this.getTemplateFunction("titleTemplate"),e.permissions&&(this.permissions=a.extend(this.permissions,e.permissions)),this.originalTitle=r("head title").text(),this.gridName=e.gridName,this.collection=e.collection,this.enabled=!1!==e.enable,this.collection.state.gridView||(this.collection.state.gridView=this.DEFAULT_GRID_VIEW_ID),this.viewsCollection.get(this.DEFAULT_GRID_VIEW_ID).set({filters:e.collection.initialState.filters,sorters:e.collection.initialState.sorters,columns:e.collection.initialState.columns,appearanceType:e.collection.initialState.appearanceType,appearanceData:e.collection.initialState.appearanceData}),this.viewDirty=!this._isCurrentStateSynchronized(),this.prevState=this._getCurrentViewModelState(),this._bindEventListeners(),this._updateTitle(),m.__super__.initialize.call(this,e)},dispose:function(){this.disposed||(this.viewsCollection.dispose(),delete this.viewsCollection,m.__super__.dispose.call(this))},_bindEventListeners:function(){this.listenTo(this.collection,"updateState",(function(e){e.state.gridView||(e.state.gridView=this.DEFAULT_GRID_VIEW_ID)})),this.listenTo(this.collection,"updateState",this.render),this.listenTo(this.collection,"beforeFetch",this.render),this.listenTo(this.collection,"reset",this.render),this.listenTo(this.viewsCollection,"add",this._onModelAdd),this.listenTo(this.viewsCollection,"remove",this._onModelRemove),this.listenTo(this.viewsCollection,"change",this._onModelChange,this),this.listenTo(this.viewsCollection,"sync",this._onModelChange,this),this.listenTo(h,"datagrid:"+this.gridName+":views:add",(function(e){this.viewsCollection.add(e)}),this),this.listenTo(h,"datagrid:"+this.gridName+":views:remove",(function(e){this.viewsCollection.remove(e)}),this),this.listenTo(h,"datagrid"+this.gridName+":views:change",(function(e){this.viewsCollection.get(e).attributes=e.attributes,this._getView(e.get("name")).label=e.get("label"),this.viewDirty=!this._isCurrentStateSynchronized(),this.render()}),this),this.listenTo(h,this.gridName+":grid-views-model:invalid",(function(e){this.onGridViewsModelInvalid(e)}),this)},disable:function(){return this.enabled=!1,this.render(),this},enable:function(){return this.enabled=!0,this.render(),this},onChange:function(e){e.preventDefault();const t=r(e.currentTarget).data("value");this.changeView(t),this._updateTitle(),this.prevState=this._getCurrentState(),this.viewDirty=!this._isCurrentStateSynchronized()},onSave:function(e){const t=this._getEditableViewModel(e.currentTarget);this._onSaveModel(t)},_onSaveModel:function(e){e.save({icon:void 0,label:e.get("label"),filters:this.collection.state.filters,sorters:this.collection.state.sorters,columns:this.collection.state.columns,appearanceType:this.collection.state.appearanceType,appearanceData:this.collection.state.appearanceData},{wait:!0,errorHandlerMessage:this.showErrorMessage,success:()=>{this._showFlashMessage("success",l("oro.datagrid.gridView.updated"))}})},onSaveAs:function(){a.isObject(this.modal)&&this.modal.dispose();const e=new u;e.on("ok",(()=>{const t=this.getInputData(e.$el),i=this._createBaseViewModel(t);i.isValid()?(this.lockModelOnOkCloses(e,!0),this._onSaveAsModel(i)):this.lockModelOnOkCloses(e,!1)})),e.open(),e.$el.find('[data-role="grid-view-input"]').focus(),this.modal=e},_onSaveAsModel:function(e){e.save(null,{wait:!0,success:e=>{const t=this._getCurrentDefaultViewModel(),i=this._getAppearanceIcon(e.get("appearanceType"));e.set("name",e.get("id")),e.set("icon",i),e.unset("id"),e.get("is_default")&&t&&t.set({is_default:!1}),this.viewsCollection.add(e),this.changeView(e.get("name")),this.collection.state.gridView=e.get("name"),this.viewDirty=!this._isCurrentStateSynchronized(),this._updateTitle(),this._showFlashMessage("success",l("oro.datagrid.gridView.created")),h.trigger("datagrid:"+this.gridName+":views:add",e)},errorHandlerMessage:this.showErrorMessage,error:(e,t,i)=>{this.onError(e,t,i)}})},_getAppearanceIcon:function(e){return this.appearances?a.result(a.findWhere(this.appearances,{type:e}),"icon"):""},onShare:function(e){const t=this._getEditableViewModel(e.currentTarget);t.save({label:t.get("label"),type:"public"},{wait:!0,success:()=>{this._showFlashMessage("success",l("oro.datagrid.gridView.updated"))}})},onUnshare:function(e){const t=this._getEditableViewModel(e.currentTarget);t.save({label:t.get("label"),type:"private"},{wait:!0,success:()=>{this._showFlashMessage("success",l("oro.datagrid.gridView.updated"))}})},onDelete:function(e){const t=this._getModelForDelete(e.currentTarget),i=new this.DeleteConfirmation(this.defaults.DeleteConfirmationOptions);return i.on("ok",(()=>{t.destroy({wait:!0}),t.once("sync",(function(){this._showFlashMessage("success",l("oro.datagrid.gridView.deleted")),h.trigger("datagrid:"+this.gridName+":views:remove",t)}),this)})),i.open(),i},_getModelForDelete:function(e){const t=this._getCurrentView().value;return this.viewsCollection.get(t)},onRename:function(e){a.isObject(this.modal)&&this.modal.dispose();const t=this._getEditableViewModel(e.currentTarget),i=new u({defaultValue:t.get("label"),defaultChecked:t.get("is_default")});i.on("ok",(()=>{const e=this.getInputData(i.$el);t.set(e,{silent:!0}),t.isValid()?(this.lockModelOnOkCloses(i,!0),this._onRenameSaveModel(t)):this.lockModelOnOkCloses(i,!1)})),i.open(),this.modal=i},_onRenameSaveModel:function(e){e.save(null,{wait:!0,success:t=>{const i=this._getCurrentDefaultViewModel(),s=i===e,n=void 0===i;e.get("is_default")&&!s?i.set({is_default:!1}):n&&this._getDefaultSystemViewModel().set({is_default:!0}),e.set({label:t.get("label")}),this._showFlashMessage("success",l("oro.datagrid.gridView.updated"))},errorHandlerMessage:this.showErrorMessage,error:(e,t,i)=>{e.set("label",e.previous("label")),this.onError(e,t,i)}})},onError:function(e,t,i){400===t.status?(a.isObject(this.modal)&&this.modal.open(),this._showNameError(this.modal,t)):d.showErrorInUI(t)},onGridViewsModelInvalid:function(e){e&&a.isObject(this.modal)&&(this.modal.setNameError(a.first(e)),this.modal.open())},lockModelOnOkCloses:function(e,t){a.isObject(e)&&a.isObject(e.options)&&(e.options.okCloses=t)},onDiscardChanges:function(e){this.changeView(this.collection.state.gridView)},getViewChoices:function(){const e=a.uniq(this.viewsCollection.pluck("icon")).length>1,t=this.viewsCollection.map((function(t,i){return{label:t.getLabel(),icon:!!e&&t.get("icon"),value:t.get("name")}}),this),i=a.findWhere(t,{value:this.DEFAULT_GRID_VIEW_ID});return i.label===this.DEFAULT_GRID_VIEW_ID&&(i.label=this.defaultPrefix+(this.title||"")),t},onUseAsDefault:function(e){let t=1;const i=this._getCurrentDefaultViewModel(),s=this.gridName,n=this._getEditableViewModel(e.currentTarget);let o=n.id;return this._isCurrentViewSystem()&&(t=0,i&&(o=i.id)),r.post(_.generate(this.route,{id:o,default:t,gridName:s}),{},(e=>{i&&i.set({is_default:!1}),n.set({is_default:!0}),this._showFlashMessage("success",l("oro.datagrid.gridView.updated"))}))},_onModelAdd:function(){this.render()},_onModelRemove:function(e){this.render(),this.collection.state.gridView=this.DEFAULT_GRID_VIEW_ID;const t=this._getDefaultSystemViewModel();e.get("is_default")&&t.set({is_default:!0}),this.changeView(t)},_onModelChange:function(e){h.trigger("datagrid"+this.gridName+":views:change",e)},_checkCurrentState:function(){this.viewDirty=!this._isCurrentStateSynchronized()},changeView:function(e){let t;const i=this.viewsCollection.get(e);return i&&(t=a.extend({},this.collection.initialState,i.toGridState()),this.collection.updateState(t),this.collection.fetch({reset:!0})),this},render:function(){let e;const t=0===this.collection.length&&a.isEmpty(this.collection.state.filters);if(g.hideSwitcherOnNoData&&t)e=this.renderPlainTitle();else{this._checkCurrentState();const t=this.renderTitle(),i=this._getViewActions();e=this.template({title:t,titleLabel:this.title,disabled:!this.enabled,choices:this.getViewChoices(),current:this.collection.state.gridView,dirty:this.viewDirty,editedLabel:l("oro.datagrid.gridView.data_edited"),actionsLabel:l("oro.datagrid.gridView.actions"),actions:i,showActions:this.showActions(i),gridViewId:this.cid})}return this.$el.html(e),h.trigger("layout:reposition"),this},renderTitle:function(){return this.titleTemplate({uniqueId:this.uniqueId,title:this._getCurrentViewLabel(),hasCaret:!0,navbar:Boolean(this.title)})},renderPlainTitle:function(){return this.titleTemplate({uniqueId:this.uniqueId,title:this.title||"",hasCaret:!1,navbar:Boolean(this.title)})},_getViewActions:function(){return this._getCurrentActions()},showActions:function(e){return a.some(e,(function(e){return e.enabled}))},_getCurrentActions:function(){const e=this._getCurrentViewModel();return this._getActions(e)},_getActions:function(e){const t=this._getCurrentDefaultViewModel();return[{label:l("oro.datagrid.action.save_grid_view"),name:"save",enabled:this._getViewIsDirty(e)&&void 0!==e&&e.get("editable")},{label:l("oro.datagrid.action.save_grid_view_as"),name:"save_as",enabled:this.permissions.CREATE},{label:l("oro.datagrid.action.rename_grid_view"),name:"rename",enabled:void 0!==e&&e.get("editable")},{label:l("oro.datagrid.action.share_grid_view"),name:"share",enabled:void 0!==e&&"private"===e.get("type")&&this.permissions.SHARE},{label:l("oro.datagrid.action.unshare_grid_view"),name:"unshare",enabled:void 0!==e&&e.get("editable")&&"public"===e.get("type")&&this.permissions.SHARE},{label:l("oro.datagrid.action.discard_grid_view_changes"),name:"discard_changes",enabled:this._getViewIsDirty(e)},{label:l("oro.datagrid.action.delete_grid_view"),name:"delete",enabled:void 0!==e&&e.get("deletable")},{label:l("oro.datagrid.action.set_as_default_grid_view"),name:"use_as_default",enabled:void 0!==e&&!e.get("is_default")&&(!this._isCurrentViewSystem()||t)}]},_createViewModel:function(e){return new c(e)},_createBaseViewModel:function(e){return this._createViewModel({label:a.isUndefined(e.label)?this.defaultPrefix:e.label,is_default:!a.isUndefined(e.is_default)&&e.is_default,type:"private",grid_name:this.gridName,filters:this.collection.state.filters,sorters:this.collection.state.sorters,columns:this.collection.state.columns,appearanceType:this.collection.state.appearanceType,appearanceData:this.collection.state.appearanceData,editable:this.permissions.EDIT,deletable:this.permissions.DELETE,freezeName:this.defaultPrefix+(this.title||"")})},_getViewIsDirty:function(e){return this.viewDirty},_getCurrentViewModel:function(){const e=this._getCurrentView();if(!a.isUndefined(e))return this.viewsCollection.findWhere({name:e.value})},_getEditableViewModel:function(e){return this._getCurrentViewModel()},_getCurrentDefaultViewModel:function(){if(this._hasActiveView())return this.viewsCollection.findWhere({is_default:!0})},_isCurrentViewSystem:function(){const e=this._getCurrentView();return e&&e.value===this.DEFAULT_GRID_VIEW_ID},_getDefaultSystemViewModel:function(){return this.viewsCollection.findWhere({name:this.DEFAULT_GRID_VIEW_ID})},_hasActiveView:function(){return void 0!==this._getCurrentView()},_getCurrentViewLabel:function(){const e=this._getCurrentView();return void 0===e?this.title?this.title.trim():l("Please select view"):e.label.trim()},_getView:function(e){return a.findWhere(this.getViewChoices(),{value:e})},_getCurrentView:function(){return this._getView(this.collection.state.gridView)},_isCurrentStateSynchronized:function(){const e=this._getCurrentViewModelState();return!e||a.isEqual(this._getCurrentState(),e)},_getCurrentViewModelState:function(){const e=this._getCurrentViewModel();if(e)return{filters:e.get("filters"),sorters:e.get("sorters"),columns:e.get("columns"),appearanceType:e.get("appearanceType"),appearanceData:e.get("appearanceData")}},_getCurrentState:function(){return{filters:this.collection.state.filters,sorters:this.collection.state.sorters,columns:this.collection.state.columns,appearanceType:this.collection.state.appearanceType,appearanceData:this.collection.state.appearanceData}},_createTitle:function(){const e=this._getCurrentView();if(!e)return this.originalTitle;let t=e.label;return e.value===this.DEFAULT_GRID_VIEW_ID&&(t=this.defaultPrefix),t+" - "+this.originalTitle},_showFlashMessage:function(e,t,i){let s=i||{};const n=this.$el.closest(".ui-widget-content").attr("id");n&&(s=a.extend(s,{container:"#"+n+" .flash-messages"})),h.execute("showFlashMessage",e,t,s)},_showNameError:function(e,t){const i=t.responseJSON,s=i.errors?i.errors.children.label.errors:null,n=i.message,o=s?s[0]:n;o&&e.setNameError(o)},_updateTitle:function(){this.title&&this.adjustDocumentTitle&&h.execute("adjustTitle",this._createTitle(),!0)},getInputData:function(e){return{label:r("input[name=name]",e).val(),is_default:r("input[name=is_default]",e).is(":checked")}}});return m}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/grid.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/oroui/js/extend/backbone.js"),o=i("./bundles/orodatagrid/js/extend/backgrid.js"),r=i("./bundles/orotranslation/js/translator.js"),a=i("./bundles/oroui/js/mediator.js"),l=i("./bundles/oroui/js/app/views/loading-mask-view.js"),d=i("./bundles/orodatagrid/js/datagrid/header.js"),c=i("./bundles/orodatagrid/js/datagrid/body.js"),u=i("./bundles/orodatagrid/js/datagrid/footer.js"),h=i("./bundles/orodatagrid/js/datagrid/columns.js"),p=i("./bundles/orodatagrid/js/datagrid/toolbar.js"),_=i("./bundles/orodatagrid/js/datagrid/select-state-model.js"),g=i("./bundles/orodatagrid/js/datagrid/column/action-column.js"),m=i("./bundles/orodatagrid/js/datagrid/cell/select-row-cell.js"),f=i("./bundles/orodatagrid/js/datagrid/header-cell/select-all-header-cell.js"),b=i("./bundles/orodatagrid/js/datagrid/action/refresh-collection-action.js"),v=i("./bundles/orodatagrid/js/datagrid/action/reset-collection-action.js"),w=i("./bundles/orodatagrid/js/datagrid/action/select-data-appearance-action.js"),j=i("./bundles/orodatagrid/js/datagrid/action/export-action.js"),C=i("./bundles/oroui/js/app/plugins/plugin-manager.js"),y=i("./bundles/oroui/js/tools/scroll-helper.js"),x=i("./bundles/orodatagrid/js/pageable-collection.js"),k=i("./bundles/orodatagrid/js/datagrid/grid-rows-counter.js").Z,S=i("./bundles/orodatagrid/js/datagrid/util.js"),T=i("./bundles/oroui/js/tools.js"),E=o.Grid.extend({name:"datagrid",tagName:"div",attributes:{"data-layout":"separate"},requestsCount:0,className:"oro-datagrid",noDataTemplate:i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/default/templates/datagrid/no-data.html"),noSearchResultsTemplate:i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/no-search-results.html"),noDataTranslations:{entityHint:"oro.datagrid.entityHint",noColumns:"oro.datagrid.no.columns",noEntities:"oro.datagrid.no.entities",noResults:"oro.datagrid.no.results",noResultsTitle:"oro.datagrid.no.results_title"},selectors:{grid:".grid-main-container",toolbar:"[data-grid-toolbar]",toolbars:{top:"[data-grid-toolbar=top]",bottom:"[data-grid-toolbar=bottom]"},noDataBlock:".no-data",filterBox:".filter-box",loadingMaskContainer:".other-scroll-container",floatTheadContainer:".floatThead-container"},header:d,body:c,footer:u,toolbar:p,toolbars:{},metadataModel:null,loadingMask:null,actionsColumn:g,selectRowCell:m,selectAllHeaderCell:f,noColumnsFlag:!1,selectState:null,_defaults:()=>({rowClickActionClass:"row-click-action",rowClassName:"",toolbarOptions:{addResetAction:!0,addRefreshAction:!0,addDatagridSettingsManager:!0,addSorting:!1,datagridSettings:{addSorting:!0},placement:{top:!0,bottom:!1}},actionOptions:{refreshAction:{launcherOptions:{label:r("oro_datagrid.action.refresh"),ariaLabel:r("oro_datagrid.action.refresh.aria_label"),className:"btn refresh-action",iconClassName:"fa-repeat",launcherMode:"icon-only"}},resetAction:{launcherOptions:{label:r("oro_datagrid.action.reset"),ariaLabel:r("oro_datagrid.action.reset.aria_label"),className:"btn reset-action",iconClassName:"fa-refresh",launcherMode:"icon-only"}}},rowClickAction:void 0,multipleSorting:!0,rowActions:[],massActions:new n.Collection,extraActions:new n.Collection,enableFullScreenLayout:!1,scopeDelimiter:":"}),DEFAULT_COLUMN_START_INDEX:1e3,template:i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/default/templates/datagrid/grid.html"),themeOptions:{optionPrefix:"grid"},constructor:function e(t){this.defaults=this._defaults(),e.__super__.constructor.call(this,t)},initialize:function(e){const t=e||{};if(this.pluginManager=new C(this),e.plugins)for(let t=0;t<e.plugins.length;t++){const i=e.plugins[t];s.isFunction(i)?this.pluginManager.enable(i):(this.pluginManager.create(i.constructor,i.options),this.pluginManager.enable(i.constructor))}this.trigger("beforeParseOptions",e),this.className&&this.$el.addClass(s.result(this,"className")),this._validateOptions(t),this._initProperties(t),this.themeOptionsConfigurator&&this.listenTo(this.columns,"configureInitializeOptions",this.themeOptionsConfigurator),this.filteredColumns=S.createFilteredColumnCollection(this.columns),e.filteredColumns=this.filteredColumns,this.trigger("beforeBackgridInitialize"),this.backgridInitialize(e),this.trigger("afterBackgridInitialize"),this._listenToCollectionEvents(),this._listenToContentEvents(),this._listenToCommands()},_validateOptions:function(e){if(!e.collection)throw new TypeError('"collection" is required');if(!e.columns)throw new TypeError('"columns" is required');if(!e.metadataModel)throw new TypeError('"metadataModel" is required')},_initProperties:function(e){this.collection=e.collection,0===e.columns.length&&(this.noColumnsFlag=!0),s.extend(this,T.deepClone(this.defaults),e),this._initToolbars(e),this._initActions(e),this.exportOptions={},s.extend(this.exportOptions,e.exportOptions),this.collection.multipleSorting=this.multipleSorting,this._initRowActions(),this.rowClickAction&&(e.rowClassName=this.rowClickActionClass+" "+this.rowClassName),this._initColumns(e)},backgridInitialize:function(e){const t=this.gridRowsCounter=new k(this),i=Object.assign({gridRowsCounter:t},s.omit(e,["el","id","attributes","className","tagName","events","themeOptions"]));this.header=e.header||this.header;const n=Object.assign({},i);this.columns.trigger("configureInitializeOptions",this.header,n),n.themeOptions.hide&&(this.header=null),this.body=e.body||this.body;const o=Object.assign({},i);this.columns.trigger("configureInitializeOptions",this.body,o),this.footer=e.footer||this.footer;const r=Object.assign({},i);this.columns.trigger("configureInitializeOptions",this.footer,r),r.themeOptions.hide&&(this.footer=null),this.body&&(this.body=new this.body(o),this.subview("body",this.body)),this.header&&(this.header=new this.header(n),this.subview("header",this.header),"selectState"in this.header.row.subviews[0]&&(this.selectState=this.header.row.subviews[0].selectState)),null===this.selectState&&(this.selectState=new _),this.footer&&(this.footer=new this.footer(r),this.subview("footer",this.footer)),this.listenTo(this.columns,"reset",(function(){this.header&&(this.header=new(this.header.remove().constructor)(n)),this.body&&(this.body=new(this.body.remove().constructor)(o)),this.footer&&(this.footer=new(this.footer.remove().constructor)(r)),this.render()})),this.listenTo(this.collection,{remove:this.onCollectionModelRemove,updateState:this.onCollectionUpdateState,"backgrid:selected":this.onSelectRow,"backgrid:selectAll":this.selectAll,"backgrid:selectAllVisible":this.selectAllVisible,"backgrid:selectNone":this.selectNone,"backgrid:isSelected":this.isSelected,"backgrid:getSelected":this.getSelected})},onCollectionUpdateState:function(e,t){this.stateIsResettable(e.previousState,t)&&this.selectNone()},onCollectionModelRemove:function(e){this.selectState.removeRow(e)},onSelectRow:function(e,t){t===this.selectState.get("inset")?this.selectState.addRow(e):this.selectState.removeRow(e)},selectAll:function(){this.collection.each((function(e){e.trigger("backgrid:select",e,!0)})),this.selectState.reset({inset:!1})},selectNone:function(){this.collection.each((function(e){e.trigger("backgrid:select",e,!1)})),this.selectState.reset()},selectAllVisible:function(){this.selectState.reset(),this.collection.each((function(e){e.trigger("backgrid:select",e,!0)}))},isSelected:function(e,i){t.isPlainObject(i)&&(i.selected=this.selectState.hasRow(e)===this.selectState.get("inset"))},getSelected:function(e){t.isEmptyObject(e)&&(e.selected=this.selectState.get("rows"),e.inset=this.selectState.get("inset"))},stateIsResettable:function(e,t){const i=["filters","gridView","pageSize"];return!T.isEqualsLoosely(s.pick(e,i),s.pick(t,i))},_initToolbars:function(e){this.toolbars={},this.toolbarOptions={},s.extend(this.toolbarOptions,this.defaults.toolbarOptions,e.toolbarOptions)},_initActions:function(e){const i=e.themeOptions.actionOptions;s.isObject(i)&&(this.actionOptions=t.extend(!0,{},this.actionOptions,i))},dispose:function(){this.disposed||(this.pluginManager.dispose(),this.filteredColumns.dispose(),delete this.filteredColumns,this.columns.dispose(),delete this.columns,delete this.refreshAction,delete this.resetAction,delete this.exportAction,delete this.gridRowsCounter,s.each(["header","body","footer","loadingMask"],(function(e){this[e]&&(this[e].dispose(),delete this[e])}),this),this.callToolbar("dispose"),delete this.toolbars,a.off("import-export:handleExport",this.onHandleExport,this),E.__super__.dispose.call(this))},delegateEvents:function(e){E.__super__.delegateEvents.call(this,e);let t=this.$(".grid-container").parents();return t.length&&(t=t.add(document),t.on("scroll"+this.eventNamespace(),this.trigger.bind(this,"scroll")),this._$boundScrollHandlerParents=t,this.listenTo(this.collection,"backgrid:sort",s.debounce(this.sort,50),this)),a.on("import-export:handleExport",this.onHandleExport,this),this},onHandleExport:function(e){if(e.hasOwnProperty("filteredResultsGrid")){const t=T.unpackFromQueryString(window.location.search),i=e.filteredResultsGrid;t.hasOwnProperty("grid")&&t.grid.hasOwnProperty(i)&&(e.filteredResultsGridParams=t.grid[i])}},undelegateEvents:function(){return E.__super__.undelegateEvents.call(this),this._$boundScrollHandlerParents&&(this._$boundScrollHandlerParents.off(this.eventNamespace()),delete this._$boundScrollHandlerParents),this.stopListening(this.collection,"backgrid:sort"),this},_initColumns:function(e){Object.keys(this.rowActions).length>0&&e.columns.push(this._createActionsColumn()),e.multiSelectRowEnabled&&e.columns.unshift(this._createSelectRowColumn());for(let t=0;t<e.columns.length;t++){const i=e.columns[t];void 0!==i.order||i instanceof o.Column||(i.order=t+this.DEFAULT_COLUMN_START_INDEX),i.metadata=s.findWhere(e.metadata.columns,{name:i.name})}this.columns=e.columns=new h(e.columns),this.columns.sort(),this.trigger("columns:ready")},_initRowActions:function(){this.rowClickAction||(this.rowClickAction=s.find(this.rowActions,(function(e){return Boolean(e.prototype.rowAction)})))},_createActionsColumn:function(){return new this.actionsColumn({datagrid:this,actions:this.rowActions,massActions:this.massActions,manageable:!1,order:1/0,notMarkAsBlank:!0})},_createSelectRowColumn:function(){return new o.Column({name:"massAction",label:r("Selected Rows"),renderable:!0,sortable:!1,editable:!1,manageable:!1,cell:this.selectRowCell,headerCell:this.selectAllHeaderCell,order:-1/0,notMarkAsBlank:!0})},getSelectionState:function(){return{selectedIds:this.selectState.get("rows"),inset:this.selectState.get("inset")}},resetSelectionState:function(e){this.collection.trigger("backgrid:selectNone"),e&&e.selectedIds&&this.collection.each((function(t){-1!==e.selectedIds.indexOf(t)&&t.trigger("backgrid:selected",t,!0)}))},_createToolbar:function(e){const t=this.collection.options.modules.datagridSettingsComponentCustom||null,i=this.sortActions,n={collection:this.collection,actions:this._getToolbarActions(),extraActions:this._getToolbarExtraActions(),columns:this.columns,componentConstructor:t,addToolbarAction:function(e){n.actions.push(e),i(n.actions)}};s.defaults(n,e),this.columns.trigger("configureInitializeOptions",this.toolbar,n),this.trigger("beforeToolbarInit",n);const o=new this.toolbar(n);return this.trigger("afterToolbarInit",o),o},sortActions:function(e){e.sort((function(e,t){return(e.order||500)-(t.order||500)}))},_getToolbarActions:function(){const e=[];if(this.toolbarOptions.addRefreshAction&&e.push(this.getRefreshAction()),this.toolbarOptions.addResetAction&&e.push(this.getResetAction()),this.toolbarOptions.addAppearanceSwitcher){const t=new w({datagrid:this,launcherOptions:{label:r("oro_datagrid.action.appearance"),items:this.toolbarOptions.availableAppearances,attributes:{"data-placement":"bottom-end"},className:"btn btn-icon data-appearance-selector"},order:700});this.on("appearanceChanged",(function(e,i){const n=s.findWhere(t.launcherInstance.items,{key:i.type,id:i.id||"by_type"});if(!n)throw new Error("Could not find corresponding launcher item");t.launcherInstance.selectedItem=n,t.launcherInstance.render()})),e.push(t)}return this.sortActions(e),e},changeAppearance:function(e,t){this.switchAppearanceClass(e),this.trigger("changeAppearance",e,t)},switchAppearanceClass:function(e){const t=s.find(this.el.classList,(function(e){return/-appearance$/.test(e)}));t&&this.$el.removeClass(t),e&&this.$el.addClass(e+"-appearance")},_getToolbarExtraActions:function(){const e=this.extraActions.map((e=>new(e.get("module"))({datagrid:this})));return s.isEmpty(this.exportOptions)||e.push(this.getExportAction()),e},getRefreshAction:function(){return this.refreshAction||(this.refreshAction=new b({datagrid:this,launcherOptions:this.actionOptions.refreshAction.launcherOptions,order:100}),this.listenTo(a,"datagrid:doRefresh:"+this.name,s.debounce((function(e){e||this.$el.is(":visible")?this.refreshAction.execute():this._hasDeferRefresh=!0}),100,!0)),this.listenTo(a,"content:shown",function(){this._hasDeferRefresh&&this.$el.is(":visible")&&(delete this._hasDeferRefresh,this.refreshAction.execute())}.bind(this)),this.listenTo(this.refreshAction,"preExecute",(function(e,t){this.$el.trigger("preExecute:refresh:"+this.name,[e,t])}))),this.refreshAction},getResetAction:function(){return this.resetAction||(this.resetAction=new v({datagrid:this,launcherOptions:this.actionOptions.resetAction.launcherOptions,order:200}),this.listenTo(a,"datagrid:doReset:"+this.name,s.debounce((function(){this.$el.is(":visible")&&this.resetAction.execute()}),100,!0)),this.listenTo(this.resetAction,"preExecute",(function(e,t){this.$el.trigger("preExecute:reset:"+this.name,[e,t])}))),this.resetAction},getExportAction:function(){if(!this.exportAction){const e=[];s.each(this.exportOptions,(function(t,i){e.push({key:i,label:t.label,show_max_export_records_dialog:t.show_max_export_records_dialog,max_export_records:t.max_export_records,attributes:{class:"no-hash",download:null}})})),this.exportAction=new j({datagrid:this,launcherOptions:{label:r("oro.datagrid.extension.export.label"),title:r("oro.datagrid.extension.export.tooltip"),className:"btn",iconClassName:"fa-upload",links:e}}),this.listenTo(this.exportAction,"preExecute",(function(e,t){this.$el.trigger("preExecute:export:"+this.name,[e,t])}))}return this.exportAction},_listenToCollectionEvents:function(){this.listenTo(this.collection,"request",(function(e,t,i={}){this._beforeRequest(i);const s=t.always;t.always=(...e)=>{s.apply(t,e),this.disposed||this._afterRequest(t,i)}})),this.listenTo(this.collection,"remove",this._onRemove),this.listenTo(this.collection,"add reset",this.setGridAriaAttrs),this.listenTo(this.collection,"change",(function(e){this.$el.trigger("datagrid:change:"+this.name,e)}))},_listenToContentEvents:function(){this.listenTo(this.body,"rowClicked",(function(e,t){this.trigger("rowClicked",this,e),this.runRowClickAction(e.model,t)})),this.listenTo(this.columns,"change:renderable",(function(){this.trigger("content:update")})),this.header&&this.listenTo(this.header.row,"columns:reorder",(function(){s.defer(this.trigger.bind(this,"content:update"))}))},runRowClickAction:function(e,t){if(!this.rowClickAction)return;const i=new this.rowClickAction({datagrid:this,model:e});"function"==typeof i.dispose&&this.subviews.push(i);const s=e.get("action_configuration");s&&!1===s[i.name]||i.run(t)},_listenToCommands:function(){this.listenTo(a,"datagrid:setParam:"+this.name,(function(e,t){this.setAdditionalParameter(e,t)})),this.listenTo(a,"datagrid:removeParam:"+this.name,(function(e){this.removeAdditionalParameter(e)})),this.listenTo(a,"datagrid:restoreState:"+this.name,(function(e,t,i,n){this.collection.each((function(o){-1!==s.indexOf(i,o.get(t))&&o.set(e,!0),-1!==s.indexOf(n,o.get(t))&&o.set(e,!1)}))})),this.listenTo(a,"datagrid:restoreChangeset:"+this.name,(function(e,t){this.collection.each((function(i){t[i.get(e)]&&s.each(t[i.get(e)],(function(e,t){i.set(t,e)}))}))})),this.listenTo(a,`datagrid:changeColumnParam:${this.name}`,this.changeColumnParam),this.listenTo(a,"datagrid:doRefresh:"+this.name,(function(){this.refreshAction||this._onDatagridRefresh()})),this.listenTo(a,"datagrid:highlightNew:"+this.name,((...e)=>{e=e.map((e=>e.toString())),this.collection.each((t=>{e.includes(t.id)&&t.set("isNew",!0)}))})),this.listenTo(a,"datagrid:doInitialRefresh:"+this.name,(()=>{this.setAdditionalParameter("refresh",!0),this.collection.getFirstPage(),this.removeAdditionalParameter("refresh")}))},changeColumnParam:function(e,t,i){this.columns.each((s=>{s.get("name")===e&&s.set(t,i)}))},render:function(){return this.$el.html(this.template({tableTagName:this.themeOptions.tagName||"table",tableClassName:this.themeOptions.tableClassName||""})),this.$grid=this.$(this.selectors.grid),this.renderToolbar(),this.renderGrid(),this.renderNoDataBlock(),this.renderLoadingMask(),this.delegateEvents(),this.listenTo(this.collection,"reset remove sync",this.renderNoDataBlock),this._deferredRender(),this.initLayout({datagrid:this}).always((()=>{this.rendered=!0,this.trigger("rendered"),a.trigger("grid_render:complete",this.$el),this._resolveDeferredRender()})),this.rendered=!0,this.switchAppearanceClass(s.result(this.metadata.state,"appearanceType")),this},renderGrid:function(){this.header&&this.$grid.append(this.header.render().$el),this.body&&this.$grid.append(this.body.render().$el),this.footer&&this.$grid.append(this.footer.render().$el),this.$grid.attr("role","grid"),this.setGridAriaAttrs(),a.trigger("grid_load:complete",this.collection,this.$grid)},setGridAriaAttrs(){this.$grid.attr({"aria-rowcount":this.gridRowsCounter.getGridRowsCount(),"aria-colcount":this.columns.filter((e=>e.renderable)).length})},renderToolbar:function(){const e=this;s.each(this.toolbarOptions.placement,(function(t,i){t&&e.$(e.selectors.toolbars[i]).append(e.getToolbar(i).render().$el)}))},getToolbar:function(e){if(this.toolbars[e])return this.toolbars[e];const t=s.extend(this.toolbarOptions,{el:this.$(this.selectors.toolbars[e])});return this.toolbars[e]=this._createToolbar(t),this.toolbars[e]},callToolbar:function(e){s.invoke(this.toolbars,e)},renderLoadingMask:function(){this.loadingMask&&this.loadingMask.dispose(),this.loadingMask=new l({container:this.$(this.selectors.loadingMaskContainer)}),this.subview("loadingMask",this.loadingMask)},_defineNoDataBlock:function(){let e;const t={entityHint:(this.entityHint||r(this.noDataTranslations.entityHint)).toLowerCase()};e=this.noColumnsFlag||s.isEmpty(this.collection.state.filters)?s.has(this.noDataMessages,"emptyGrid")?this.getEmptyGridCustomMessage(this.noDataMessages.emptyGrid):this.getEmptyGridMessage(t):s.has(this.noDataMessages,"emptyFilteredGrid")?this.getEmptySearchResultCustomMessage(this.noDataMessages.emptyFilteredGrid):this.getEmptySearchResultMessage(t),this.$(this.selectors.noDataBlock).html(e)},getEmptyGridMessage:function(e){const t=this.noColumnsFlag?this.noDataTranslations.noColumns:this.noDataTranslations.noEntities;return this.noDataTemplate({text:r(t,e)})},getEmptyGridCustomMessage:function(e){return this.noDataTemplate({text:e})},getEmptySearchResultMessage:function(e){return this.noSearchResultsTemplate({title:r(this.noDataTranslations.noResultsTitle),text:r(this.noDataTranslations.noResults,e)})},getEmptySearchResultCustomMessage:function(e){return this.noSearchResultsTemplate({title:r(this.noDataTranslations.noResultsTitle),text:e})},_beforeRequest:function(e={}){const{toggleLoading:t=!0}=e;this.requestsCount+=1,t&&this.showLoading(),this.lockToolBar()},_afterRequest:function(e,t={}){const i=e.responseJSON||{},{toggleLoading:s=!0}=t;i.metadata&&this._processLoadedMetadata(i.metadata),this.requestsCount-=1,0===this.requestsCount&&(s&&this.hideLoading(),this.unlockToolBar(),a.trigger("grid_load:complete",this.collection,this.$el),this.initLayout(),this.trigger("content:update"))},_processLoadedMetadata:function(e){s.extend(this.metadata,e),this.metadataModel.set(e),a.trigger("datagrid:metadata-loaded",this)},showLoading:function(){this.loadingMask.show(),this.trigger("loading-mask:show")},lockToolBar:function(){this.callToolbar("disable"),this.trigger("disable")},hideLoading:function(){this.trigger("loading-mask:hide"),this.loadingMask.hide()},unlockToolBar:function(){this.callToolbar("enable"),this.trigger("enable")},renderNoDataBlock:function(){this._defineNoDataBlock(),this.$el.toggleClass("no-data-visible",this.collection.models.length<=0||this.noColumnsFlag)},_onRemove:function(e,t,i={}){if(a.trigger("datagrid:beforeRemoveRow:"+this.name,e),t){const e=["mode","parse","reset","wait","uniqueOnly","add","remove","merge","toggleLoading","global"];let n={reset:!0,alreadySynced:!0},o=s.pick(t.options,e);t.options.parseResponseOptions&&(o=s.extend(o,s.pick(t.options.parseResponseOptions.call(t),e))),n=s.extend(n,o,s.pick(i,e)),i.alreadySynced||this.collection.fetch(n)}this.setGridAriaAttrs(),a.trigger("datagrid:afterRemoveRow:"+this.name)},_onDatagridRefresh:function(){this.setAdditionalParameter("refresh",!0),this.collection.fetch({reset:!0}),this.removeAdditionalParameter("refresh")},setAdditionalParameter:function(e,t){const i=this.collection.state;s.has(i,"parameters")||(i.parameters={}),i.parameters[e]=t},removeAdditionalParameter:function(e){const t=this.collection.state;s.has(t,"parameters")&&delete t.parameters[e]},ensureCellIsVisible:function(e){const i=t.Event("ensureCellIsVisible");this.trigger("ensureCellIsVisible",i,e),i.isDefaultPrevented()||y.scrollIntoView(e.el)},findCell:function(e,t){const i=this.body.rows;for(let s=0;s<i.length;s++){const n=i[s];if(n.model===e){const e=n.subviews;for(let i=0;i<e.length;i++){const s=e[i];if(s.column===t)return s}}}return null},findCellByIndex:function(e,t){try{return s.findWhere(this.body.subviews[e].subviews,{column:this.columns.at(t)})}catch(e){return null}},findHeaderCellByIndex:function(e){if(!this.header)return null;try{return s.findWhere(this.header.row.subviews,{column:this.columns.at(e)})}catch(e){return null}},backgridRefresh:function(){return this.render(),this.collection.trigger("backgrid:refresh",this),this},makeComparator:function(e,t,i){return function(s,n){let o,r=i(s,e),a=i(n,e);return 1===t&&(o=r,r=a,a=o),r===a?0:r<a?-1:1}},sort:function(e,t){if(!s.contains(["ascending","descending",null],t))throw new RangeError('direction must be one of "ascending", "descending" or `null`');s.isString(e)&&e.length&&(e=this.columns.findWhere({name:e}));let i=null,n=null;s.isObject(e)?(i=e.get("name"),n=e.sortValue()):e=null;const o=this.collection;let r,a;r="ascending"===t?"-1":"descending"===t?"1":null,a=r?n:function(e){return 1*e.cid.replace("c","")};const l=this.makeComparator(i,r,a);return o instanceof x?(o.setSorting(i,r,{sortValue:n}),o.fullCollection?(null!==o.fullCollection.comparator&&void 0!==o.fullCollection.comparator||(o.fullCollection.comparator=l),o.fullCollection.sort(),o.trigger("backgrid:sorted",e,t,o)):o.fetch({reset:!0,success:function(){o.trigger("backgrid:sorted",e,t,o)}})):(o.comparator=l,o.sort(),o.trigger("backgrid:sorted",e,t,o)),e&&e.set("direction",t),this},getGridScope:function(){const e=this.name.split(this.scopeDelimiter);if(e.length>2)throw new Error('Grid name is invalid, it should not contain more than one occurrence of "'+this.scopeDelimiter+'"');return 2===e.length?e[1]:null}});return E}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/header-cell/action-header-cell.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/orotranslation/js/translator.js"),s=i("./bundles/orodatagrid/js/extend/backgrid.js"),n=i("./bundles/orodatagrid/js/datagrid/actions-panel.js"),o=i("./bundles/oroui/js/app/views/base/view.js"),r=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/action-header-cell.html"),a=o.extend({optionNames:["column"],_attributes(){const e=s.Cell.prototype._attributes.call(this);return e["aria-label"]=t("oro.datagrid.cell.action_header.aria_label"),e},keepElement:!1,className:"action-column renderable",tagName:"th",template:r,actionsPanel:n,options:{controls:"[data-toggle=dropdown]"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){a.__super__.initialize.call(this,e),this.column=e.column,this.column instanceof s.Column||(this.column=new s.Column(this.column)),this.createActionsPanel();const t=this.column.get("datagrid");this.listenTo(t,"enable",this.enable),this.listenTo(t,"disable",this.disable),this.listenTo(t.massActions,"reset",this.rebuildAndRender)},dispose:function(){this.disposed||(delete this.column,a.__super__.dispose.call(this),delete this.actionsPanel)},createActionsPanel:function(){const e=[],t=this.column.get("datagrid");this.column.get("massActions").each((function(i){const s=i.get("module");e.push(new s({datagrid:t}))})),this.subview("actionsPanel",new this.actionsPanel({actions:e}))},render:function(){const e=this.subview("actionsPanel");return this.$el.empty(),e.haveActions()&&(this.$el.append(this.getTemplateFunction()(this.getTemplateData())),e.setElement(this.$("[data-action-panel]")),e.render(),e.$el.children().wrap("<li/>")),this},rebuildAndRender:function(e){this.column.set("massActions",e),this.createActionsPanel(),this.render()},enable:function(){this.subview("actionsPanel").enable(),this.$(this.options.controls).attr({tabindex:null,"aria-disabled":null}).removeClass("disabled")},disable:function(){this.subview("actionsPanel").disable(),this.$(this.options.controls).attr({tabindex:-1,"aria-disabled":!0}).addClass("disabled")}});return a}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/header-cell/header-cell.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orodatagrid/js/extend/backgrid.js"),n=i("./bundles/oroui/js/tools/text-util.js"),o=i("./bundles/orodatagrid/js/app/views/hint-view.js"),r=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/grid-header-cell.html"),a=s.HeaderCell.extend({template:r,allowNoSorting:!0,minWordsToAbbreviate:4,keepElement:!1,events:{mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",focusin:"onFocusin",focusout:"onFocusout",click:"onClick"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.allowNoSorting=this.collection.multipleSorting,a.__super__.initialize.call(this,e),this._initCellDirection(this.collection),this.listenTo(this.collection,"reset",this._initCellDirection),this.listenTo(this.column,"change:direction",this._updateAttributes)},dispose:function(){this.disposed||(delete this.column,a.__super__.dispose.call(this))},_resetCellDirection:function(){},removeCellDirection:function(){},_initCellDirection:function(e){if(e===this.collection){const i=e.state;let s=null;const n=this.column.get("name");this.column.get("sortable")&&t.has(i.sorters,n)&&(1===parseInt(i.sorters[n],10)?s="descending":-1===parseInt(i.sorters[n],10)&&(s="ascending")),s!==this.column.get("direction")&&this.column.set({direction:s}),this.column.get("sortable")&&this._updateAttributes()}},render:function(){this.$el.empty();let e=this.column.get("label");!1!==this.column.get("shortenableLabel")&&(e=n.abbreviate(e,this.minWordsToAbbreviate),this.isLabelAbbreviated=e!==this.column.get("label"),this.isLabelAbbreviated||this.$el.addClass("shortenable-label")),this.$el.append(this.template({label:e,sortable:this.column.get("sortable")})),this.column.has("width")&&this.$el.width(this.column.get("width"));const i=this.column.get("oldCell")||this.column.get("cell");return t.isFunction(i.prototype.className)||this.$el.addClass(i.prototype.className),this.column.has("align")&&(this.$el.removeClass("align-left align-center align-right"),this.$el.addClass("align-"+this.column.get("align"))),this.isLabelAbbreviated&&(this.$("[data-grid-header-cell-label]").attr("aria-label",this.column.get("label")),this.$("[data-grid-header-cell-text]").attr("aria-hidden",!0)),this},onClick:function(e){e.preventDefault();const t=this.column,i=this.collection,n="backgrid:sort",o=(e,s)=>{"ascending"===t.get("direction")?i.trigger(n,s,"descending"):this.allowNoSorting&&"descending"===t.get("direction")?i.trigger(n,s,null):i.trigger(n,s,"ascending")};var r;s.callByNeed(t.sortable(),t,this.collection)&&("toggle"===t.get("sortType")?(r=t,"ascending"===t.get("direction")?i.trigger(n,r,"descending"):i.trigger(n,r,"ascending")):o(0,t))},onMouseEnter(e){this.isHovered=!0,this.showHint()},onMouseLeave(e){delete this.isHovered,this.isFocused||this.hideHint()},onFocusin(e){this.isFocused=!0,this.showHint()},onFocusout(e){delete this.isFocused,this.isHovered||this.hideHint()},showHint(){!this.isLabelAbbreviated||this.hintTimeout||this.subview("hint")||(this.subview("hint",new o({el:this.$("[data-grid-header-cell-label]"),offsetOfEl:this.$el,autoRender:!0,popoverConfig:{content:this.column.get("label")}})),this.hintTimeout=setTimeout(function(){const e=this.subview("hint");!e||!this.isLabelAbbreviated&&e.fullLabelIsVisible()||this.subview("hint").show()}.bind(this),300))},hideHint(){clearTimeout(this.hintTimeout),delete this.hintTimeout,this.subview("hint")&&this.removeSubview("hint")},_updateAttributes(){this.disposed||this._setAttributes(this._collectAttributes())},_attributes(){return{"aria-sort":this.column.get("direction")||"none"}}});return a}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/header-cell/select-all-header-cell.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/orodatagrid/js/extend/backgrid.js"),o=i("./bundles/orodatagrid/js/datagrid/select-state-model.js"),r=i("./bundles/oroui/js/app/views/base/view.js"),a=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/select-all-header-cell.html"),l=r.extend({optionNames:["column"],_attributes:n.Cell.prototype._attributes,keepElement:!1,className:"select-all-header-cell renderable",tagName:"th",template:a,selectState:null,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){const t=s.debounce(this.updateState.bind(this),50);this.column instanceof n.Column||(this.column=new n.Column(this.column)),this.selectState=new o,this.listenTo(this.selectState,"change",t)},dispose:function(){this.disposed||(delete this.selectState,delete this.column,l.__super__.dispose.call(this))},updateState:function(e){this.$("[data-select]:checkbox").prop({indeterminate:!e.isEmpty(),checked:!e.get("inset")})},render:function(){return this.$el.html(this.getTemplateFunction()(this.getTemplateData())),this.delegateEvents(),this},delegateEvents:function(e){return l.__super__.delegateEvents.call(this,e),this.$(".dropdown-menu").on("click"+this.eventNamespace(),this.onDropdownClick.bind(this)),this.$("[data-select]:checkbox").on("click"+this.eventNamespace(),this.onCheckboxClick.bind(this)),this},undelegateEvents:function(){return this.$el&&(this.$(".dropdown-menu").off(this.eventNamespace()),this.$("[data-select]:checkbox").off(this.eventNamespace())),l.__super__.undelegateEvents.call(this)},onCheckboxClick:function(e){this.selectState.get("inset")&&this.selectState.isEmpty()?this.collection.trigger("backgrid:selectAll"):this.collection.trigger("backgrid:selectNone"),e.stopPropagation()},onDropdownClick:function(e){const i=t(e.target);i.is("[data-select-all]")?this.collection.trigger("backgrid:selectAll"):i.is("[data-select-all-visible]")?this.collection.trigger("backgrid:selectAllVisible"):i.is("[data-select-none]")&&this.collection.trigger("backgrid:selectNone"),e.preventDefault()}});return l}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/header-row.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orodatagrid/js/datagrid/header-cell/header-cell.js"),n=i("./bundles/oroui/js/extend/chaplin.js"),o=i("./bundles/orodatagrid/js/app/components/column-renderer-component.js"),r=n.CollectionView.extend({optionNames:["ariaRowIndex"],tagName:"tr",className:"",animationDuration:0,autoRender:!0,themeOptions:{optionPrefix:"headerRow",className:"grid-header-row"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.columns=e.columns,this.dataCollection=e.dataCollection;const i=this;t.extend(this,t.pick(e,["themeOptions","template"])),this.itemView||(this.itemView=function(e){const t=e.model,n=t.get("headerCell")||e.headerCell||s,o={column:t,collection:i.dataCollection,themeOptions:{className:"grid-cell grid-header-cell"}};return t.get("name")&&(o.themeOptions.className+=" grid-header-cell-"+t.get("name")),i.columns.trigger("configureInitializeOptions",n,o),new n(o)}),this.columnRenderer=new o(e),r.__super__.initialize.call(this,e),this.cells=this.subviews},dispose:function(){this.disposed||(delete this.cells,delete this.columns,delete this.dataCollection,r.__super__.dispose.call(this))},render:function(){return this._deferredRender(),this.template?this.renderCustomTemplate():r.__super__.render.call(this),this._resolveDeferredRender(),this},renderCustomTemplate:function(){const e=this;return this.$el.html(this.template({themeOptions:this.themeOptions?this.themeOptions:{},render:function(i){const s=t.find(e.columns.models,(function(e){return e.get("name")===i}));return s?e.columnRenderer.getHtml(e.renderItem(s).$el):""},attributes:function(i,s){const n=s||{},o=t.find(e.columns.models,(function(e){return e.get("name")===i}));return o?(n.id=o.get("name"),e.columnRenderer.getRawAttributes(e.renderItem(o).$el,n)):""}})),t.each(this.getItemViews(),(function(e){e.setElement(this.$("#"+e.column.get("name"))),e.$el.attr("id",null)}),this),this},_attributes(){return{"aria-rowindex":this.ariaRowIndex}}});return r}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/header.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/extend/backbone.js"),n=i("./bundles/orodatagrid/js/extend/backgrid.js"),o=i("./bundles/orodatagrid/js/datagrid/header-row.js"),r=i("./bundles/orodatagrid/js/datagrid/header-cell/header-cell.js"),a=n.Header.extend({tagName:"thead",row:o,headerCell:r,themeOptions:{optionPrefix:"header",className:"grid-header"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(t.extend(this,t.pick(e,["themeOptions"])),!e.collection)throw new TypeError('"collection" is required');if(!e.columns)throw new TypeError('"columns" is required');this.columns=e.columns,this.columns instanceof s.Collection||(this.columns=new n.Columns(this.columns)),this.filteredColumns=e.filteredColumns;const i={columns:this.columns,collection:this.filteredColumns,dataCollection:this.collection,headerCell:this.headerCell,ariaRowIndex:1};this.columns.trigger("configureInitializeOptions",this.row,i),this.row=new this.row(i),this.subviews=[this.row]},getRowsCount:()=>1,dispose:function(){this.disposed||(this.row.dispose(),delete this.row,delete this.columns,delete this.filteredColumns,a.__super__.dispose.call(this))}});return a}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/listener/abstract-grid-change-listener.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/jquery.js"),i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/orotranslation/js/translator.js"),i("./bundles/oroui/js/modal.js"),i("./bundles/orodatagrid/js/datagrid/listener/abstract-listener.js")],void 0===(n=function(e,t,i,s,n){"use strict";const o=n.extend({confirmModal:{},constructor:function e(...t){e.__super__.constructor.apply(this,t)},dispose:function(){this.disposed||(t.each(this.confirmModal,(function(e){e.dispose()})),delete this.confirmModal,o.__super__.dispose.call(this))},setDatagridAndSubscribe:function(){o.__super__.setDatagridAndSubscribe.call(this),this._clearState(),this._restoreState()},getGridEvents:function(){const e=o.__super__.getGridEvents.call(this);return e["preExecute:refresh:"+this.gridName]=this._onExecuteRefreshAction.bind(this),e["preExecute:reset:"+this.gridName]=this._onExecuteResetAction.bind(this),e},_clearState:function(){throw new Error("_clearState method is abstract and must be implemented")},_synchronizeState:function(){throw new Error("_synchronizeState method is abstract and must be implemented")},_restoreState:function(){throw new Error("_restoreState method is abstract and must be implemented")},_onExecuteRefreshAction:function(e,t,s){this._confirmAction(t,s,"refresh",{title:i("Refresh Confirmation"),content:i("Your local changes will be lost. Are you sure you want to refresh grid?")})},_onExecuteResetAction:function(e,t,s){this._confirmAction(t,s,"reset",{title:i("Reset Confirmation"),content:i("Your local changes will be lost. Are you sure you want to reset grid?")})},_confirmAction:function(e,t,i,s){this.confirmed=this.confirmed||{},!this.confirmed[i]&&this._hasChanges()&&(t.doExecute=!1,this._openConfirmDialog(i,s,(function(){this.confirmed[i]=!0,this._clearState(),this._synchronizeState(),t.doExecute=!0,e.run(t)}))),this.confirmed[i]=!1},_hasChanges:function(){throw new Error("_hasChanges method is abstract and must be implemented")},_openConfirmDialog:function(e,n,o){this.confirmModal[e]||(this.confirmModal[e]=new s(t.extend({title:i("Confirmation"),okText:i("Ok, got it"),className:"modal modal-primary",disposeOnHidden:!1},n)),this.confirmModal[e].on("ok",o.bind(this))),this.confirmModal[e].open()}});return o}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/listener/abstract-listener.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/oroui/js/extend/jquery.js"),i("./bundles/oroui/js/extend/backbone.js")],void 0===(n=function(e,t,i){"use strict";const s=i.Model.extend({columnName:"id",dataField:"id",constructor:function e(...t){e.__super__.constructor.apply(this,t)},initialize:function(t){if(!e.has(t,"columnName"))throw new Error("Data column name is not specified");if(this.columnName=t.columnName,t.dataField&&(this.dataField=t.dataField),s.__super__.initialize.call(this,t),!t.$gridContainer)throw new Error("gridSelector is not specified");this.$gridContainer=t.$gridContainer,this.gridName=t.gridName,this.setDatagridAndSubscribe()},dispose:function(){this.disposed||(e.isUndefined(this.$gridContainer)||this.$gridContainer.off(this.gridEvents),delete this.$gridContainer,delete this.gridEvents,s.__super__.dispose.call(this))},setDatagridAndSubscribe:function(){this.gridEvents=this.getGridEvents(),this.$gridContainer.on(this.gridEvents)},getGridEvents:function(){const e={};return e["datagrid:change:"+this.gridName]=this._onModelEdited.bind(this),e},_onModelEdited:function(t,i){if(!i.hasChanged(this.columnName))return;const s=i.get(this.dataField);e.isUndefined(s)||this._processValue(s,i)},_processValue:function(e,t){throw new Error("_processValue method is abstract and must be implemented")}});return s}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/listener/action-form-listener.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/oroui/js/mediator.js"),i("./bundles/orodatagrid/js/datagrid/listener/abstract-listener.js")],void 0===(n=function(e,t,i){"use strict";const s=i.extend({constructor:function e(...t){e.__super__.constructor.apply(this,t)},initialize:function(e){t.on("datagrid:frontend:execute:"+e.gridName,this.onFrontAction,this),t.on("datagrid:mass:frontend:execute:"+e.gridName,this.onFrontMassAction,this)},onFrontAction:function(t){const i=t.configuration.triggerAction,s=t.datagrid.collection;e.isUndefined(i)||"excludeRow"===i&&(s.trigger("excludeRow",t.model.get("id")),s.trigger("remove",t.model))},onFrontMassAction:function(t){const i=t.configuration.triggerAction;if(e.isUndefined(i))return;const s=t.datagrid.collection,n=t.datagrid.getSelectionState().selectedIds;"excludeRow"===i&&(e.each(n,(function(e){s.trigger("excludeRow",e),s.trigger("remove",s.get(e),!1)})),s.fetch({reset:!0}))},_processValue:function(e,t){}});return s.init=function(e,t){t.gridPromise.done((function(t){const i={$gridContainer:t.$el,gridName:t.name,grid:t},n=new s(i);e.resolve(n)})).fail((function(){e.reject()}))},s}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/listener/callback-listener.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/orodatagrid/js/datagrid/listener/abstract-listener.js")],void 0===(n=function(e,t){"use strict";const i=t.extend({processCallback:null,constructor:function e(...t){e.__super__.constructor.apply(this,t)},initialize:function(t){if(!e.has(t,"processCallback"))throw new Error("Process callback is not specified");this.processCallback=t.processCallback,i.__super__.initialize.call(this,t)},_processValue:function(e,t){this.processCallback(e,t,this)}});return i}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/listener/change-editable-cell-listener.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/jquery.js"),i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/oroui/js/mediator.js"),i("./bundles/orodatagrid/js/datagrid/listener/abstract-grid-change-listener.js")],void 0===(n=function(e,t,i,s){"use strict";const n=s.extend({selector:null,constructor:function e(...t){e.__super__.constructor.apply(this,t)},initialize:function(i){if(!t.has(i,"selector"))throw new Error("Parameter selector is not specified");if(this.selector=i.selector,!e(this.selector).length)throw new Error("DOM element for selector not found");n.__super__.initialize.call(this,i)},setDatagridAndSubscribe:function(){n.__super__.setDatagridAndSubscribe.call(this),i.bind("grid_load:complete",(function(){this._restoreState()}),this)},_onModelEdited:function(e,i){const s=i.changed,n=this.columnName;if(t.each(s,(function(e,i){-1===t.indexOf(n,i)&&delete s[i]})),t.isEmpty(s))return;const o=i.get(this.dataField);t.isUndefined(o)||this._processValue(o,s)},_processValue:function(e,i){const s=this.get("changeset");t.has(s,e)||(s[e]={}),s[e]=t.extend(s[e],i),this.set("changeset",s),this._synchronizeState()},_clearState:function(){this.set("changeset",{})},_synchronizeState:function(){e(this.selector).val(JSON.stringify(this.get("changeset")))},_toObject:function(e){return e?JSON.parse(e):{}},_restoreState:function(){let s={};const n=e(this.selector);n.length&&(s=this._toObject(n.val()),this.set("changeset",s)),t.isEmpty(s)||i.trigger("datagrid:restoreChangeset:"+this.gridName,this.dataField,s)},_hasChanges:function(){return!t.isEmpty(this.get("changeset"))}});return n.init=function(e,i){const s=i.metadata.options||{},o=i.gridPromise;s.cellSelection?o.done((function(i){const o=t.defaults({$gridContainer:i.$el,gridName:i.name},s.cellSelection),r=new n(o);e.resolve(r)})).fail((function(){e.reject()})):e.reject()},n}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/listener/column-form-listener.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/jquery.js"),i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/oroui/js/mediator.js"),i("./bundles/orodatagrid/js/datagrid/listener/abstract-grid-change-listener.js")],void 0===(n=function(e,t,i,s){"use strict";const n=s.extend({selectors:{included:null,excluded:null},constructor:function e(...t){e.__super__.constructor.apply(this,t)},initialize:function(e){if(!t.has(e,"selectors"))throw new Error("Field selectors is not specified");this.selectors=e.selectors,this.grid=e.grid,this.confirmModal={},n.__super__.initialize.call(this,e),this.selectRows(),this.listenTo(e.grid.collection,{sync:this.selectRows,excludeRow:this._excludeRow,includeRow:this._includeRow,setState:this.setState})},setDatagridAndSubscribe:function(){n.__super__.setDatagridAndSubscribe.call(this),i.bind("pagestate_restored",(function(){this._restoreState()}),this)},selectRows:function(){const e=this.columnName;this.grid.collection.each((function(t){const i=t.get(e);t.trigger("backgrid:selected",t,i)}))},_processValue:function(e,t){e=String(e);const i=t.get(this.columnName);i?this._includeRow(e):this._excludeRow(e),t.trigger("backgrid:selected",t,i)},_excludeRow:function(e){let i=this.get("included"),s=this.get("excluded");t.contains(i,e)?i=t.without(i,e):s=t.union(s,[e]),this.set("included",i),this.set("excluded",s),this._synchronizeState()},_includeRow:function(e){let i=this.get("included"),s=this.get("excluded");t.contains(s,e)?s=t.without(s,e):i=t.union(i,[e]),this.set("included",i),this.set("excluded",s),this._synchronizeState()},setState:function(e,t){this.set("included",e),this.set("excluded",t),this._synchronizeState()},_clearState:function(){this.set("included",[]),this.set("excluded",[])},_synchronizeState:function(){const t=this.get("included"),s=this.get("excluded");this.selectors.included&&e(this.selectors.included).val(t.join(",")),this.selectors.excluded&&e(this.selectors.excluded).val(s.join(",")),i.trigger("datagrid:setParam:"+this.gridName,"data_in",t),i.trigger("datagrid:setParam:"+this.gridName,"data_not_in",s)},_explode:function(e){return e?t.map(e.split(","),(function(e){return e?String(e):null})):[]},_restoreState:function(){let s=[],n=[];const o=this.columnName;this.selectors.included&&e(this.selectors.included).length&&(s=this._explode(e(this.selectors.included).val()),this.set("included",s)),this.selectors.excluded&&e(this.selectors.excluded).length&&(n=this._explode(e(this.selectors.excluded).val()),this.set("excluded",n)),t.each(this.grid.collection.models,(function(e){const i=e.get(o),r=String(e.id);!i&&t.contains(s,r)&&e.set(o,!0),i&&t.contains(n,r)&&e.set(o,!1)})),(s||n)&&(i.trigger("datagrid:setParam:"+this.gridName,"data_in",s),i.trigger("datagrid:setParam:"+this.gridName,"data_not_in",n),i.trigger("datagrid:restoreState:"+this.gridName,this.columnName,this.dataField,s,n))},_hasChanges:function(){return!t.isEmpty(this.get("included"))||!t.isEmpty(this.get("excluded"))},dispose:function(){this.disposed||(delete this.grid,n.__super__.dispose.call(this))}});return n.init=function(e,i){const s=i.metadata.options||{},o=i.gridPromise,r=s.rowSelection||s.columnListener;r?o.done((function(i){const s=t.defaults({$gridContainer:i.$el,gridName:i.name,grid:i},r),o=new n(s);e.resolve(o)})).fail((function(){e.reject()})):e.reject()},n}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/metadata-model.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/backbone.js")],void 0===(n=function(e){"use strict";return e.Model.extend({defaults:{columns:[],options:{},state:{},initialState:{},rowActions:{},massActions:{}},constructor:function e(t,i){e.__super__.constructor.call(this,t,i)}})}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/page-size.js":(e,t,i)=>{var s,n;s=[i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/page-size.html"),i("./bundles/oroui/js/extend/jquery.js"),i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/oroui/js/extend/backbone.js")],void 0===(n=function(e,t,i,s){"use strict";const n=s.View.extend({template:e,events:{"click [data-grid-pagesize-trigger]":"onChangePageSize","change [data-grid-pagesize-selector]":"onChangePageSize"},items:[10,25,50,100],enabled:!0,hidden:!1,showLabels:!1,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(!(e=e||{}).collection)throw new TypeError('"collection" is required');e.items&&(this.items=this.preparePageSizes(e.items)),("function"!=typeof this.template||e.template)&&(this.template=i.template(t(e.template||this.template).html())),this.collection=e.collection,this.listenTo(this.collection,"add",this.render),this.listenTo(this.collection,"remove",this.render),this.listenTo(this.collection,"reset",this.render),this.enabled=!1!==e.enable,this.hidden=!0===e.hide,n.__super__.initialize.call(this,e)},disable:function(){return this.enabled=!1,this.render(),this},preparePageSizes:e=>e.map((e=>i.isObject(e)?{...e,size:parseInt(e.size,10)}:parseInt(e,10))),enable:function(){return this.enabled=!0,this.render(),this},onChangePageSize:function(e){e.preventDefault();const i=parseInt(t(e.target).data("size")||t(e.target).val(),10);i!==this.collection.state.pageSize&&this.changePageSize(i)},changePageSize:function(e){return this.collection.setPageSize(e),this},render:function(){this.$el.empty();const{pageSize:e}=this.collection.state,i=this.items.find((t=>e===(void 0!==t.size?t.size:t)));return this.$el.append(t(this.template({disabled:!this.enabled||!this.collection.state.totalRecords,collectionState:this.collection.state,items:this.items,currentPageSize:e,currentSizeLabel:void 0!==i.label?i.label:i,showLabels:this.showLabels}))),this.hidden&&this.$el.hide(),this.initControls(),this}});return n}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/pagination-input.js":(e,t,i)=>{var s,n;s=[i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/pagination-input.html"),i("./bundles/oroui/js/extend/jquery.js"),i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/orodatagrid/js/datagrid/pagination.js"),i("../node_modules/jquery-numeric/jquery.numeric.js")],void 0===(n=function(e,t,i,s){"use strict";const n=s.extend({template:e,events:{"blur [data-grid-pagination-trigger-input]":"onChangePageByInput","change [data-grid-pagination-trigger-input]":"onChangePageByInput","keyup input":function(e){13===e.which&&this.onChangePageByInput(e)}},windowSize:0,constructor:function e(t){e.__super__.constructor.call(this,t)},onChangePageByInput:function(e){e.preventDefault();let s=parseInt(t(e.target).val(),10);const n=this.collection,o=n.state;i.isNaN(s)?t(e.target).val(o.currentPage):(s=0===o.firstPage?s-1:s,s<o.firstPage?(s=o.firstPage,t(e.target).val(0===o.firstPage?o.firstPage+1:o.firstPage)):o.lastPage<=s&&(s=o.lastPage,t(e.target).val(0===o.firstPage?o.lastPage+1:o.lastPage)),o.currentPage!==s&&n.getPage(s))},makeHandles:function(){const e=[];return e.push({type:"input"}),n.__super__.makeHandles.call(this,e)},render:function(){return n.__super__.render.call(this),this.$("input").numeric({decimal:!1,negative:!1}),this}});return n}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/pagination.js":(e,t,i)=>{var s,n;s=[i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/pagination.html"),i("./bundles/oroui/js/extend/jquery.js"),i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/oroui/js/app/views/base/view.js")],void 0===(n=function(e,t,i,s){"use strict";const n=s.extend({windowSize:10,enabled:!0,hidden:!1,template:e,events:{"click [data-grid-pagination-trigger]":"onChangePage"},fastForwardHandleConfig:{prev:{label:"Prev",direction:"prev",arrow:"left",wrapClass:"fa-chevron-left hide-text"},next:{label:"Next",direction:"next",arrow:"right",wrapClass:"fa-chevron-right hide-text"}},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(!(e=e||{}).collection)throw new TypeError('"collection" is required');this.collection=e.collection,this.listenTo(this.collection,"add",this.render),this.listenTo(this.collection,"remove",this.render),this.listenTo(this.collection,"reset",this.render),this.hidden=!0===e.hide,this.scrollToPosition=t(e.el).closest(".toolbar").prevAll(".toolbar").position(),e.template&&(this.template=e.template),this.template=this.getTemplateFunction(),n.__super__.initialize.call(this,e)},disable:function(){return this.enabled=!1,this.render(),this},enable:function(){return this.enabled=!0,this.render(),this},onChangePage:function(e){if(e.preventDefault(),!this.enabled)return;let s=t(e.target).closest("[data-grid-pagination-trigger]").data("grid-pagination-direction");"string"==typeof s&&(s=s.trim());const n=this.fastForwardHandleConfig,o=this.collection,r=o.state;if(this.scrollToPosition&&t("body,html").stop().animate({scrollTop:this.scrollToPosition.top},"500","swing"),n){const e=i.has(n.prev,"direction")?n.prev.direction:void 0,t=i.has(n.next,"direction")?n.next.direction:void 0;switch(s){case e:return void(o.hasPrevious()&&o.getPreviousPage());case t:return void(o.hasNext()&&o.getNextPage())}}const a=1*t(e.target).text()-r.firstPage;o.getPage(0===r.firstPage?a:a+1)},makeHandles:function(e){e=e||[];const t=this.collection,s=t.state;let n=s.lastPage?s.lastPage:s.firstPage;n=0===s.firstPage?n:n-1;const o=0===s.firstPage?s.currentPage:s.currentPage-1,r=Math.floor(o/this.windowSize)*this.windowSize;let a=r+this.windowSize;if(a=a<=n?a:n+1,"infinite"!==t.mode)for(let t=r;t<a;t++)e.push({label:t+1,title:"No. "+(t+1),className:o===t?"active":void 0});const l=this.fastForwardHandleConfig;return l.prev&&e.unshift({label:i.has(l.prev,"label")?l.prev.label:void 0,wrapClass:i.has(l.prev,"wrapClass")?l.prev.wrapClass:void 0,direction:i.has(l.prev,"direction")?l.prev.direction:void 0,arrow:i.has(l.prev,"arrow")?l.prev.arrow:void 0,className:t.hasPrevious()?void 0:"disabled"}),l.next&&e.push({label:i.has(l.next,"label")?l.next.label:void 0,wrapClass:i.has(l.next,"wrapClass")?l.next.wrapClass:void 0,direction:i.has(l.next,"direction")?l.next.direction:void 0,arrow:i.has(l.next,"arrow")?l.next.arrow:void 0,className:t.hasNext()?void 0:"disabled"}),e},render:function(){const e=this.collection.state;return null===e.totalRecords||(this.$el.empty(),this.$el.append(this.template({disabled:!this.enabled||!e.totalRecords,handles:this.makeHandles(),state:e})),this.hidden&&this.$el.hide()),this}});return n}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/row.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/oroui/js/extend/chaplin.js"),o=i("./bundles/oroui/js/extend/backbone.js"),r=i("./bundles/oroui/js/tools.js"),a=i("./bundles/orodatagrid/js/app/components/column-renderer-component.js"),l=window.document,d=/^(\S+)\s*(.*)$/,c=n.CollectionView.extend({tagName:"tr",autoRender:!1,animationDuration:0,delegateEvents:o.View.prototype.delegateEvents,events:function(){const e={},t=this.collection.getCellEventList().getEventsMap();for(const i in t){const t=i.match(d),n=t[1],o=t[2];e[n+" td"+(o?" "+o:"")]=s.partial(this.delegateEventToCell,i)}return s.extend(e,{mousedown:"onMouseDown",mouseleave:"onMouseLeave",mouseup:"onMouseUp",click:"onClick"}),e},DOUBLE_CLICK_WAIT_TIMEOUT:170,template:null,themeOptions:{view:"",optionPrefix:"row",className:"grid-row",actionSelector:""},constructor:function e(t){s.extend(this,s.pick(t,["rowClassName","themeOptions","template","columns","dataCollection","ariaRowsIndexShift"])),e.__super__.constructor.call(this,t)},initialize(e){if(!this.itemView){const e=this;this.itemView=function(t){const i=t.model,s=e.getConfiguredCellOptions(i);return s.model=e.model,new(i.get("cell"))(s)}}const t=this.collection.getCellEventList();this.listenTo(t,"change",this.delegateEvents),this.listenTo(this.model,"backgrid:selected",this.onBackgridSelected),this.listenTo(this.model,"change:row_class_name",this.onRowClassNameChanged),this.listenTo(this.model,"change:isNew",this.onRowNewStatusChange),this.listenTo(this.dataCollection,"add remove reset",this._updateAttributes),this.listenTo(this,"visibilityChange",this.onVisibilityChange),this.columnRenderer=new a(e),c.__super__.initialize.call(this,e),this.cells=this.subviews},initItemView(e){const t=e,i=c.__super__.initItemView.call(this,e);return i.$el.attr({"data-column-label":t.get("label")}),t.has("align")&&(i.$el.removeClass("align-left align-center align-right"),i.$el.addClass("align-"+t.get("align"))),!s.isUndefined(i.skipRowClick)&&i.skipRowClick&&i.$el.addClass("skip-row-click"),i},getConfiguredCellOptions:function(e){let t=e.get("cellOptions");const i=e.get("cellClassName")||"";if(!t){t={column:e,themeOptions:{optionPrefix:"cell",className:`${i.trim()} grid-cell grid-body-cell`}},e.get("name")&&(t.themeOptions.className+=" grid-body-cell-"+e.get("name"));const s=e.get("cell");this.columns.trigger("configureInitializeOptions",s,t),e.set({cellOptions:t})}return t},delegateEventToCell:function(e,i){const n=t(i.target).closest("td, th")[0];for(let t=0;t<this.subviews.length;t++){const o=this.subviews[t];if(o.el===n&&o.events){const t=o.events;if(e in t){let r=t[e];if(s.isFunction(r)||(r=o[t[e]]),!r)break;const a=i.delegateTarget;i.delegateTarget=n,r.call(o,i),i.isPropagationStopped()&&i.stopImmediatePropagation(),i.delegateTarget=a}break}}},onBackgridSelected:function(e,t){s.isUndefined(t)&&(t=!1),this.$el.toggleClass("row-selected",t)},onRowNewStatusChange:function(e){this.$el.toggleClass("row-new",e.get("isNew"))},onVisibilityChange(e){this.countCellClassName(e.length)},onRowClassNameChanged:function(e){const t=e.previous("row_class_name"),i=s.result(this,"className");t&&this.$el.removeClass(t),i&&this.$el.addClass(i)},countCellClassName(e){this._cellsCountClassName&&this.$el.removeClass(this._cellsCountClassName),this._cellsCountClassName=`row-${e}cells`,this.$el.addClass(this._cellsCountClassName)},className:function(){const e=[];return this.rowClassName&&e.push(this.rowClassName),this.model.get("row_class_name")&&e.push(this.model.get("row_class_name")),e.join(" ")},_attributes:function(){return{...this.model.get("row_attributes"),"aria-rowindex":this.getAriaRowIndex()}},dispose:function(){this.disposed||(this.clickTimeout&&clearTimeout(this.clickTimeout),delete this.columns,delete this.cells,c.__super__.dispose.call(this))},onMouseDown:function(e){if(this.clickTimeout)return clearTimeout(this.clickTimeout),delete this.clickTimeout,this.mouseDownSelection=null,this.mouseDownTarget=null,void(t(e.target).closest(".prevent-text-selection-on-dblclick").length&&e.preventDefault());this.mouseDownSelection=this.getSelectedText(),this.mouseDownTarget=t(e.target).closest("td"),this.$el.addClass("mouse-down")},onMouseLeave:function(e){this.$el.removeClass("mouse-down")},onMouseUp:function(e){this.clickPermit=!1;const t=this.$(e.target);if(this.themeOptions.actionSelector){const e=this.themeOptions.actionSelector;if(!t.is(e)&&!t.parents(e).length)return}else{const e='a:not("[data-include]"), .dropdown, .skip-row-click, :input';if(t.is(e)||t.parents(e).length)return}this.mouseDownSelection===this.getSelectedText()&&this.mouseDownTarget[0]===t.closest("td")[0]&&(this.clickPermit=!0)},onClick:function(e){const t={},i=()=>{if(!this.disposed&&(this.trigger("clicked",this,t),!this.disposed)){for(let t=0;t<this.subviews.length;t++){const i=this.subviews[t];i.listenRowClick&&s.isFunction(i.onRowClicked)&&i.onRowClicked(this,e)}this.$el.removeClass("mouse-down"),delete this.clickTimeout}};if(this.clickPermit){if(e.preventDefault(),r.isTargetBlankEvent(e))return t.target="_blank",void i();this.clickTimeout=setTimeout(i,this.DOUBLE_CLICK_WAIT_TIMEOUT)}},getSelectedText:function(){let e="";return s.isFunction(window.getSelection)?e=window.getSelection().toString():s.isUndefined(l.selection)||"Text"!==l.selection.type||(e=l.selection.createRange().text),e},render:function(){this._deferredRender(),c.__super__.render.call(this);const e={selected:!1};if(this.model.trigger("backgrid:isSelected",this.model,e),this.$el.toggleClass("row-selected",e.selected),"separate"===this.$el.data("layout")){const e={};this.$el.data("layout-model")&&(e[this.$el.data("layout-model")]=this.model),this.initLayout(e).always((()=>{this._resolveDeferredRender()}))}else this._resolveDeferredRender();return this},renderAllItems:function(){if(!this.template)return c.__super__.renderAllItems.call(this);this.renderCustomTemplate()},renderCustomTemplate:function(){const e=this;this.$el.html(this.template({model:this.model?this.model.attributes:{},themeOptions:this.themeOptions?this.themeOptions:{},render:function(t){const i=s.find(e.columns.models,(function(e){return e.get("name")===t}));return i?e.columnRenderer.getHtml(e.renderItem(i).$el):""},attributes:function(t,i){const n=i||{},o=s.find(e.columns.models,(function(e){return e.get("name")===t}));return o?e.columnRenderer.getRawAttributes(e.renderItem(o).$el,n):""}}));const t=this.$("[data-role=select-row]:checkbox");return t.length&&(this.listenTo(this.model,"backgrid:select",(function(e,i){t.prop("checked",i)})),t.on("change"+this.eventNamespace(),(()=>{this.model.trigger("backgrid:selected",this.model,t.prop("checked"))})),t.on("click"+this.eventNamespace(),(function(e){e.stopPropagation()}))),this},_updateAttributes(){this.disposed||this._setAttributes(this._collectAttributes())},getAriaRowIndex(){let e=null;const t=this.dataCollection.filter((e=>!0!==e.get("isAuxiliary"))).findIndex((e=>e.cid===this.model.cid));if(-1!==t){const{currentPage:i,pageSize:s}=this.dataCollection.state,n=i*s-s;e=t+this.ariaRowsIndexShift+n+1}return e}});return c}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/select-state-model.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js");return i("./bundles/oroui/js/app/models/base/model.js").extend({defaults:{inset:!0,rows:[]},constructor:function e(t,i){e.__super__.constructor.call(this,t,i)},addRow:function(e){const i=e.get("id");return this.set("rows",t.uniq(this.attributes.rows.concat(i))),this},removeRow:function(e){const i=e.get("id");return this.set("rows",t.without(this.attributes.rows,i)),this},hasRow:function(e){const t=e.get("id");return-1!==this.get("rows").indexOf(t)},isEmpty:function(){return 0===this.get("rows").length},reset:function(e){return this.set("rows",[]),this.set("inset",!t.isObject(e)||!1!==e.inset),this}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/sorting/dropdown.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/oroui/js/app/views/base/view.js"),r=i("./bundles/oroform/js/app/views/select2-view.js");let a=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);a=n.defaults({},a,{hasSortingOrderButton:!0,inlineSortingLabel:!1,disableNotSelectedOption:!1,className:"sorting-select sorting-select-control",dropdownClassName:"sorting-select-control"});const l=o.extend({SEARCH_CAPABILITY_GATE:8,VALUE_SEPARATOR:"-sep-",DIRECTIONS:["ascending","descending"],template:i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/sorting-dropdown.html"),events:{"change select":"onChangeSorting","click [data-name=order-toggle]":"onDirectionToggle"},className:a.className,dropdownClassName:a.dropdownClassName,select2Config:{},enabled:!0,hasSortingOrderButton:a.hasSortingOrderButton,inlineSortingLabel:a.inlineSortingLabel,disableNotSelectedOption:a.disableNotSelectedOption,currentColumn:null,currentDirection:null,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(!(e=e||{}).columns)throw new TypeError('"columns" is required');if(!e.collection)throw new TypeError('"collection" is required');n.extend(this,n.pick(e,["columns","collection","hasSortingOrderButton"])),n.extend(this,n.pick(e.collection.options.toolbarOptions,["disableNotSelectedOption"])),this.listenTo(this.columns,"change:direction",this._selectCurrentSortableColumn),this.listenTo(this.columns,"change:renderable",this._columnRenderableChanged),this.listenTo(this.columns,"change:sortable",this._columnSortableChanged),this.listenTo(this.collection,"updateState",this.render),this._initCurrentSortableColumn(),l.__super__.initialize.call(this,e)},_initCurrentSortableColumn:function(){const e=Object.keys(this.collection.state.sorters);if(e.length){const t=e[0];let i;const s=this.columns.find((function(e){return e.get("name")===t}));switch(parseInt(this.collection.state.sorters[t],10)){case-1:i=this.DIRECTIONS[0];break;case 1:i=this.DIRECTIONS[1];break;default:return}this.currentDirection=i,this.currentColumn=s}},_selectCurrentSortableColumn:function(e,t){null!==t&&(this.currentDirection=t,this.currentColumn=e,this._updateDisplayValue())},_columnRenderableChanged:function(e,t){t||this.currentColumn!==e||(this.currentColumn=null,this.currentDirection=null),this.render()},_columnSortableChanged:function(e,t){t||this.currentColumn!==e||(this.currentColumn=null,this.currentDirection=null),this.render()},disable:function(){return this.enabled=!1,this.render(),this},enable:function(){return this.enabled=!0,this.render(),this},_getCurrentValue:function(){return this.currentColumn?this.hasSortingOrderButton?this.currentColumn.get("name"):this.currentColumn.get("name")+this.VALUE_SEPARATOR+this.currentDirection:null},_updateDisplayValue:function(){this.$("select").inputWidget("val",this._getCurrentValue()),this.hasSortingOrderButton&&this._updateDisplayDirection()},_updateDisplayDirection:function(){this.$("[data-name=order-toggle-icon]").toggleClass("fa-sort-amount-asc",this.currentDirection===this.DIRECTIONS[0]).toggleClass("fa-sort-amount-desc",this.currentDirection===this.DIRECTIONS[1])},onDirectionToggle:function(){this.currentDirection===this.DIRECTIONS[1]?this.currentDirection=this.DIRECTIONS[0]:this.currentDirection=this.DIRECTIONS[1],this.currentColumn&&this.collection.trigger("backgrid:sort",this.currentColumn,this.currentDirection),this._updateDisplayDirection()},onChangeSorting:function(){let e,t,i=this.$("select").val();this.hasSortingOrderButton?e=i:(i=i.split(this.VALUE_SEPARATOR),e=i[0],t=i[1]);const s=this.columns.findWhere({name:e});s?(t?this.currentDirection=t:this.currentDirection||(this.currentDirection=this.DIRECTIONS[0]),this.collection.trigger("backgrid:sort",s,this.currentDirection)):(this.currentColumn=null,this.currentDirection=null,this.collection.trigger("backgrid:sort","",this.currentDirection)),this.hasSortingOrderButton&&this._updateDisplayDirection()},getTemplateData:function(){let e=l.__super__.getTemplateData.call(this);return e=n.extend(e,{columns:this._getSelectOptionsData(),selectedValue:this._getCurrentValue(),currentDirection:this.currentDirection,hasSortingOrderButton:this.hasSortingOrderButton,disableNotSelectedOption:this.disableNotSelectedOption,inlineSortingLabel:this.inlineSortingLabel}),e},_getSelectOptionsData:function(){const e=[];return n.each(n.where(this.columns.toJSON(),{sortable:!0,renderable:!0}),(t=>{this.hasSortingOrderButton?e.push({label:t.label,value:t.name}):n.each(this.DIRECTIONS,(i=>{e.push({label:t.label,sortingType:t.sortingType,directionValue:i,value:t.name+this.VALUE_SEPARATOR+i})}))})),e},initSubview:function(){this.subview("select2",new r({el:this.$("select"),select2Config:this.select2Config}))},render:function(){if(this._initCurrentSortableColumn(),!this.enabled)return this;l.__super__.render.call(this),this.select2Config={dropdownCssClass:n.result(this,"dropdownClassName"),dropdownAutoWidth:!0};let e=this.SEARCH_CAPABILITY_GATE;return this.hasSortingOrderButton||(e=Math.floor(e/this.DIRECTIONS.length)),this.columns.where({sortable:!0,renderable:!0}).length<e&&(this.select2Config.minimumResultsForSearch=-1),this.initSubview(),this._updateDisplayDirection(),this}});return l}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orodatagrid/js/datagrid/toolbar.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/oroui/js/extend/backbone.js"),i("./bundles/orotranslation/js/translator.js"),i("./bundles/orodatagrid/js/datagrid/pagination-input.js"),i("./bundles/orodatagrid/js/datagrid/visible-items-counter.js"),i("./bundles/orodatagrid/js/datagrid/page-size.js"),i("./bundles/orodatagrid/js/datagrid/actions-panel.js"),i("./bundles/orodatagrid/js/datagrid/sorting/dropdown.js")],void 0===(n=function(e,t,i,s,n,o,r,a){"use strict";const l=t.$,d=t.View.extend({template:'.datagrid_templates[data-identifier="template-datagrid-toolbar"]',pagination:s,itemsCounter:n,pageSize:o,sortingDropdown:a,actionsPanel:r,extraActionsPanel:r,selector:{pagination:"[data-grid-pagination]",itemsCounter:"[data-grid-items-counter]",pagesize:"[data-grid-pagesize]",actionsPanel:"[data-grid-actions-panel]",extraActionsPanel:"[data-grid-extra-actions-panel]",sortingDropdown:"[data-grid-sorting]"},themeOptions:{optionPrefix:"toolbar"},hideItemsCounter:!0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(t){if(!(t=t||{}).collection)throw new TypeError('"collection" is required');this.collection=t.collection;const i=e.defaults({collection:this.collection},t.itemsCounter);t.columns.trigger("configureInitializeOptions",this.itemsCounter,i),this.subviews={pagination:new this.pagination(e.defaults({collection:this.collection},t.pagination)),itemsCounter:new this.itemsCounter(i),actionsPanel:new this.actionsPanel(e.extend({className:""},t.actionsPanel)),extraActionsPanel:new this.extraActionsPanel},!0!==e.result(t.pageSize,"hide")&&(this.subviews.pageSize=new this.pageSize(e.defaults({collection:this.collection},t.pageSize))),t.addSorting&&(this.subviews.sortingDropdown=new this.sortingDropdown({collection:this.collection,columns:t.columns})),t.actions&&this.subviews.actionsPanel.setActions(t.actions),t.extraActions&&this.subviews.extraActionsPanel.setActions(t.extraActions),e.has(t,"enable")&&!t.enable&&this.disable(),(t.hide||this.collection.state.hideToolbar)&&this.hide(),e.isFunction(t.template)?this.template=t.template:(t.template||this.template)&&(this.template=e.template(l(t.template||this.template).html())),e.isUndefined(t.hideItemsCounter)||(this.hideItemsCounter=t.hideItemsCounter),d.__super__.initialize.call(this,t)},enable:function(){return e.invoke(this.subviews,"enable"),this},disable:function(){return e.invoke(this.subviews,"disable"),this},hide:function(){return this.$el.hide(),this},render:function(){this.$el.empty(),this.$el.append(this.template({toolbarPosition:this.$el.data("gridToolbar")}));const e=this.subviews.pagination.render().$el;return e.attr("class",this.$(this.selector.pagination).attr("class")),this.$(this.selector.pagination).replaceWith(e),this.subviews.pageSize&&this.$(this.selector.pagesize).append(this.subviews.pageSize.render().$el),this.$(this.selector.actionsPanel).length&&this.$(this.selector.actionsPanel).append(this.subviews.actionsPanel.render().$el),this.$(this.selector.itemsCounter).replaceWith(this.subviews.itemsCounter.render().$el),this.hideItemsCounter&&this.subviews.itemsCounter.$el.hide(),this.subviews.sortingDropdown&&this.$(this.selector.sortingDropdown).append(this.subviews.sortingDropdown.render().$el),this.subviews.extraActionsPanel.haveActions()?this.$(this.selector.extraActionsPanel).append(this.subviews.extraActionsPanel.render().$el):this.$(this.selector.extraActionsPanel).hide(),this}});return d}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/util.js":(e,t,i)=>{var s,n;s=[i("./bundles/orodatagrid/js/datagrid/columns.js")],void 0===(n=function(e){"use strict";return{createFilteredColumnCollection:function(t){const i=new e(t.where({renderable:!0}));return i.listenTo(t,"change:renderable add remove reset",(function(){i.reset(t.where({renderable:!0}))})),i.listenTo(t,"sort",(function(){i.sort()})),i}}}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/datagrid/visible-items-counter.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/jquery.js"),i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/oroui/js/extend/backbone.js"),i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/default/templates/datagrid/visible-items-counter.html")],void 0===(n=function(e,t,i,s){"use strict";const n=i.View.extend({enabled:!0,hidden:!1,template:s,className:"visible-items-counter",themeOptions:{optionPrefix:"itemscounter"},transTemplate:null,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(e=e||{},this.hidden=!1!==e.hidden,e.template&&(this.template=e.template),e.transTemplate&&(this.transTemplate=e.transTemplate),!e.collection)throw new TypeError('"collection" is required');this.collection=e.collection,this.listenTo(this.collection,"add",this.render),this.listenTo(this.collection,"remove",this.render),this.listenTo(this.collection,"reset",this.render),this.hidden=!0===e.hide,n.__super__.initialize.call(this,e)},disable:function(){return this},enable:function(){return this},render:function(){const e=this.collection.state;return null===e.totalRecords||(this.$el.empty(),this.$el.html(this.template({disabled:!this.enabled||!e.totalRecords,state:t.extend({length:this.collection.length},e),transTemplate:this.transTemplate})),this.hidden&&this.$el.hide()),this}});return n}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/extend/backgrid.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orotranslation/js/translator.js"),n=i("../node_modules/backgrid/lib/backgrid.js");n.Cell.prototype.optionNames=["column"],n.Cell.prototype.keepElement=!1,n.Cell.prototype.initialize=function(e){const i=this.column,s=this.model,o=this.$el;let r=n.resolveNameToClass(i.get("formatter")||this.formatter,"Formatter");t.isFunction(r.fromRaw)||t.isFunction(r.toRaw)||(r=new r),this.formatter=r,this.editor="function"==typeof this.column.get("editor")?this.column.get("editor"):n.resolveNameToClass(this.editor,"CellEditor"),this.listenTo(s,"change:"+i.get("name"),(function(){o.hasClass("editor")||(this.render(),this._setAttributes(this._collectAttributes()))})),this.listenTo(s,"backgrid:error",this.renderError),this.listenTo(i,"change:editable change:sortable change:renderable",(function(e){const t=e.changedAttributes();for(const e in t)t.hasOwnProperty(e)&&o.toggleClass(e,t[e])}))},n.Cell.prototype.render=function(){const e=this.$el;e.empty();const t=this.model,i=this.column.get("name");return e.text(this.formatter.fromRaw(t.get(i),t)),this.delegateEvents(),this},n.Cell.prototype.delegatedEventBinding=!0;const o=n.Cell.prototype.delegateEvents;n.Cell.prototype.delegateEvents=function(){t.isFunction(this.events)&&o.call(this)};const r=n.Cell.prototype.undelegateEvents;return n.Cell.prototype.undelegateEvents=function(){t.isFunction(this.events)&&r.call(this)},n.Cell.prototype.isEditableColumn=function(){return n.callByNeed(this.column.editable(),this.column,this.model)},n.Cell.prototype._attributes=function(){const e={},{collection:i}=this.column||{};if(i&&i.length){const t=i.indexOf(this.column);-1===t||this.model&&!0===this.model.get("isAuxiliary")||(e["aria-colindex"]=t+1)}if(this.model&&!0!==this.model.get("isAuxiliary")&&!0!==this.column.get("notMarkAsBlank")&&!0!==this.notMarkAsBlank){const i=this.model&&this.model.get(this.column.get("name"));null==i||t.isString(i)&&0===i.trim().length||t.isArray(i)&&0===i.length?(e["aria-label"]=s("oro.datagrid.cell.blank.aria_label"),e["data-blank-content"]=s("oro.datagrid.cell.blank.placeholder")):(e["aria-label"]=null,e["data-blank-content"]=null)}return e},n.HeaderCell.prototype.optionNames=["column"],n.HeaderCell.prototype._attributes=function(){const e={};if(this.column&&this.column.get("label")){const{collection:t}=this.column;if(t&&t.length){const i=t.indexOf(this.column);-1!==i&&(e["aria-colindex"]=i+1)}}return e},n.BooleanCellEditor.prototype.attributes={type:"checkbox"},n.BooleanCellEditor.prototype.initialize=function(e){this.formatter=e.formatter,this.column=e.column,this.column instanceof n.Column||(this.column=new n.Column(this.column))},n.BooleanCellEditor.prototype.saveOrCancel=function(e){const t=this.model,i=this.column,s=this.formatter,o=new n.Command(e);if(o.passThru()&&"change"!==e.type)return!0;o.cancel()&&(e.stopPropagation(),t.trigger("backgrid:edited",t,i,o));const r=this.$el;if(o.save()){e.preventDefault(),e.stopPropagation();const n=s.toRaw(r.prop("checked"),t);t.set(i.get("name"),n),t.trigger("backgrid:edited",t,i,o)}else if("change"===e.type){const e=s.toRaw(r.prop("checked"),t);t.set(i.get("name"),e),r.focus()}},n}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/grid-views-builder.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/jquery.js"),o=i("./bundles/oroui/js/extend/underscore.js"),r=i("./bundles/oroui/js/mediator.js"),a=i("./bundles/oroui/js/app/services/load-modules.js"),l=i("./bundles/orodatagrid/js/datagrid/grid-views/view.js"),d=i("./bundles/orodatagrid/js/datagrid/grid-views/collection.js");let c=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);c=o.extend({GridViewsView:l},c);const u={init:function(e,t){if(!t.enableViews||n.isEmptyObject(t.metadata.gridViews)||!t.metadata.gridViews.permissions.VIEW||!t.metadata.filters)return void e.resolve();const i={metadata:o.defaults(t.metadata,{gridViews:{},options:{}}),gridViewsOptions:o.defaults({},t.gridViewsOptions),enableViews:t.enableViews,$gridEl:t.$el,showInNavbar:t.showViewsInNavbar,showInCustomElement:t.showViewsInCustomElement,GridViewsView:c.GridViewsView,buildViews:function(t){const i=u.build.call(this,t.collection);void 0!==i&&t.$grid.attr({"aria-labelledby":i.uniqueId}),e.resolve(i)}};o.isString(i.GridViewsView)&&(i.buildViews=o.wrap(i.buildViews,(function(e,t){a(this.GridViewsView).then((i=>{this.GridViewsView=i,e.call(this,t)}))}))),t.gridPromise.done((function(e){if(o.contains(t.builders,"orofilter/js/datafilter-builder"))if(i.$gridEl.find(".filter-box").length)i.buildViews(e);else{const t=function(i,s){s.is("#"+this.$gridEl.attr("id"))&&(this.buildViews(e),r.off("datagrid_filters:rendered",t))};r.on("datagrid_filters:rendered",t,i)}else i.buildViews(e)})).fail((function(){e.reject()}))},build:function(e){let t,i;const s=this.GridViewsView,r=u.combineGridViewsOptions.call(this),a=o.extend({collection:e},r);return this.showInNavbar?(i=n(".page-title > .navbar-extra .pull-left-extra > .pull-left"),a.title=i.text(),t=new s(a),i.html(t.render().$el)):this.showInCustomElement?(t=new s(a),i=n(this.showInCustomElement),i.html(t.render().$el)):(t=new s(a),this.$gridEl.prepend(t.render().$el)),t},combineGridViewsOptions:function(){const e=this.metadata.gridViews;u.normalizeGridViewModelsData(e.views,this.metadata.initialState);const t=new d(e.views,{gridName:e.gridName});return e.viewsCollection=t,e.appearances=this.metadata.options.appearances,e.gridViewsOptions=this.gridViewsOptions,e.uniqueId=o.uniqueId(`grid-views-${e.gridName}`),o.omit(e,["views"])},normalizeGridViewModelsData:function(e,t){o.each(e,(function(e){o.each(["columns","sorter"],(function(i){o.isEmpty(e[i])&&n.extend(!0,e,o.pick(t,i))}))}))}};return u}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orodatagrid/js/inline-editing/builder.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/oroui/js/tools.js"),o=i("./bundles/oroui/js/app/services/load-modules.js"),r=i("./bundles/oroui/js/error.js"),{validator:a}=i("./bundles/oroform/js/extend/validate.js"),l={DEFAULT_COLUMN_TYPE:"string",processDatagridOptions:function(e,i){if(!i.metadata.inline_editing)return void e.resolve();const{mobile_enabled:s=!1,enable:o=!1}=i.metadata.inline_editing;if(!s&&n.isMobile()||!i.metadata.inline_editing||!o)return void e.resolve();const l=this.preparePlugin(i).concat(this.prepareColumns(i)).concat([a.preloadMethods()]);t.when(...l).done((function(){i.metadata.plugins||(i.metadata.plugins=[]),i.metadata.plugins.push({constructor:i.metadata.inline_editing.plugin,options:i}),e.resolve()})).fail((function(t){r.showErrorInConsole(t),e.resolve()}))},init:function(e,t){e.resolve()},getDefaultOptions:function(){return{plugin:"orodatagrid/js/app/plugins/grid/inline-editing-plugin",default_editors:"orodatagrid/js/inline-editing/default-editors",behaviour:"enable_all",cell_editor:{component:"orodatagrid/js/app/components/cell-popup-editor-component"},save_api_accessor:{class:"oroui/js/tools/api-accessor",http_method:"PATCH"}}},preparePlugin:function(e){const i=[],s={};return t.extend(!0,s,this.getDefaultOptions(),e.metadata.inline_editing),e.metadata.inline_editing=s,i.push(o.fromObjectProp(s,"plugin")),e.metadata.inline_editing.defaultEditorsLoadPromise=o.fromObjectProp(s,"default_editors"),i.push(e.metadata.inline_editing.defaultEditorsLoadPromise),i.push(o.fromObjectProp(s.cell_editor,"component")),i.push(o.fromObjectProp(s.save_api_accessor,"class")),i},prepareColumns:function(e){const t=[],i=this.getDefaultOptions(),n=e.metadata.columns,a=e.metadata.inline_editing.behaviour;return s.each(n,(function(n){switch(a){case"enable_all":if(n.inline_editing&&!1===n.inline_editing.enable)return;break;case"enable_selected":if(!n.inline_editing||!0!==n.inline_editing.enable)return;break;default:throw new Error("Unknown behaviour")}n.inline_editing||(n.inline_editing={}),n.inline_editing.editor||(n.inline_editing.editor={});const d=n.inline_editing.editor;if(d.component||(d.component=i.cell_editor.component),d.view?t.push(o(d.view).then((function(e){return d.view=e,s.isFunction(e.processMetadata)?e.processMetadata(n):e}))):t.push(e.metadata.inline_editing.defaultEditorsLoadPromise.then((function(e){const t=e[n.type||l.DEFAULT_COLUMN_TYPE];return d.view=t,void 0===t?(n.inline_editing.enable=!1,n.inline_editing.enable$changeReason="Automatically disabled due to absent editor realization",void("enable_selected"===a&&r.showErrorInConsole("Could not enable editing on grid column due to absent editor realization for type `"+n.type+"`"))):s.isFunction(t.processMetadata)?t.processMetadata(n):t}))),s.isString(d.component))t.push(o(d.component).then((function(e){return d.component=e,s.isFunction(e.processMetadata)?e.processMetadata(n):e})));else if(s.isFunction(d.component.processMetadata))return d.component.processMetadata(n);n.inline_editing&&n.inline_editing.save_api_accessor&&n.inline_editing.save_api_accessor.class&&t.push(o.fromObjectProp(n.inline_editing.save_api_accessor,"class"))})),t}};return l}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/inline-editing/default-editors.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";return{string:i("./bundles/oroform/js/app/views/editor/text-editor-view.js"),phone:i("./bundles/oroform/js/app/views/editor/text-editor-view.js"),datetime:i("./bundles/oroform/js/app/views/editor/datetime-editor-view.js"),date:i("./bundles/oroform/js/app/views/editor/date-editor-view.js"),currency:i("./bundles/oroform/js/app/views/editor/number-editor-view.js"),number:i("./bundles/oroform/js/app/views/editor/number-editor-view.js"),integer:i("./bundles/oroform/js/app/views/editor/number-editor-view.js"),decimal:i("./bundles/oroform/js/app/views/editor/number-editor-view.js"),percent:i("./bundles/oroform/js/app/views/editor/percent-editor-view.js"),select:i("./bundles/oroform/js/app/views/editor/select-editor-view.js")}}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/map-action-module-name.js":(e,t,i)=>{var s;void 0===(s=function(){"use strict";return function(e){return"oro/datagrid/action/{{type}}-action".replace("{{type}}",e)}}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/map-cell-module-name.js":(e,t,i)=>{var s;void 0===(s=function(){"use strict";const e={integer:"number",decimal:"number",percent:"number",currency:"number",array:"string",simple_array:"string",enum:"string"};return function(t){return"oro/datagrid/cell/{{type}}-cell".replace("{{type}}",e[t]||t)}}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/row-select-for-widget/builder.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/widget/widget-manager.js");return{init:function(e,t){e.resolve()},processDatagridOptions:function(e,i){const s=i.gridBuildersOptions.rowSelectForWidget||{};if(s.multiSelect)i.metadata.options.multiSelectRowEnabled=!0;else{const e=s.wid;if(!e)throw Error('"wid" has to be defined');i.metadata.options.rowClickAction=function(i){return{run:function(){t.getWidgetInstance(e,(function(e){e.trigger("grid-row-select",i)}))}}}}return e.resolve(),e}}}.call(t,i,t,e))||(e.exports=s)},"./bundles/orodatagrid/js/totals-builder.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/jquery.js"),i("./bundles/oroui/js/extend/underscore.js")],void 0===(n=function(e,t){"use strict";return{init:function(e,t){t.gridPromise.done((function(t){t.collection.on("beforeReset",(function(e,t,i){e.state.totals=i.totals})),e.resolve()})).fail((function(){e.reject()}))}}}.apply(t,s))||(e.exports=n)},"./bundles/orodatagrid/js/url-helper.js":(e,t,i)=>{var s;void 0===(s=function(){"use strict";return{addUrlParameter:function(e,t,i){let s,n,o,r,a,l;e.indexOf("#")>0?(n=e.indexOf("#"),s=e.substring(e.indexOf("#"),e.length)):(s="",n=e.length);const d=e.substring(0,n).split("?");if(o="",d.length>1)for(r=d[1].split("&"),l=0;l<r.length;l+=1)a=r[l].split("="),a[0]!==t&&(""===o?o="?":o+="&",o+=a[0]+"="+(a[1]||""));return""===o&&(o="?"),""!==o&&"?"!==o&&(o+="&"),o+=t+"="+encodeURIComponent(i||""),d[0]+o+s},encodeURI(e){const t={"-":"%2D",_:"%5F",".":"%2E","!":"%21","~":"%7E","*":"%2A","'":"%27","(":"%28",")":"%29"};return encodeURIComponent(e).replaceAll(/[-_.!~*'()]/g,(e=>t[e]))}}}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/actions/toggle-filters-action.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/mediator.js"),s=i("./bundles/orodatagrid/js/datagrid/action/abstract-action.js"),n=i("./bundles/orofilter/js/filters-manager.js"),o=s.extend({initialize:function(e){const t=e||{};if(!t.datagrid)throw new TypeError('"datagrid" is required');this.listenTo(t.datagrid,"filters:beforeRender",(()=>{this.listenTo(this.datagrid.filterManager,"visibility-change",this.onFilterManagerVisibilityChange)})),this.listenTo(t.datagrid,"filterManager:connected",(()=>{this.onFilterManagerModeChange(this.datagrid.filterManager.getViewMode()),this.listenTo(this.datagrid.filterManager,"changeViewMode",this.onFilterManagerModeChange)})),o.__super__.initialize.call(this,e)},execute:function(){const e=this.datagrid.filterManager.getViewMode()===n.STATE_VIEW_MODE?n.MANAGE_VIEW_MODE:n.STATE_VIEW_MODE;this.datagrid.filterManager.setViewMode(e)},toggleFilters:function(e){e===n.STATE_VIEW_MODE&&this.datagrid.filterManager.$el.is(":visible")?this.datagrid.filterManager.hide():e===n.MANAGE_VIEW_MODE&&this.datagrid.filterManager.hasFilters()&&!this.datagrid.filterManager.$el.is(":visible")&&this.datagrid.filterManager.show()},onFilterManagerModeChange:function(e){this.datagrid.filterManager.getViewMode()!==e&&this.toggleFilters(e),t.trigger("layout:adjustHeight")},onFilterManagerVisibilityChange(e){this.launcherInstance&&this.launcherInstance.$el.toggleClass("pressed",e)}});return o}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/app/views/datepicker/filter-datepicker-view.js":(e,t,i)=>{"use strict";i.d(t,{Z:()=>f});var s=i("./bundles/oroui/js/extend/jquery.js"),n=i.n(s),o=i("./bundles/oroui/js/extend/underscore.js"),r=i.n(o),a=i("./bundles/oroui/js/layout.js"),l=i.n(a),d=i("./bundles/oroui/js/mediator.js"),c=i.n(d),u=i("./bundles/oroui/js/tools/manage-focus.js"),h=i("./bundles/oroui/js/extend/popper.js"),p=i("./bundles/oroui/js/app/views/datepicker/datepicker-view.js"),_=i.n(p),g=i("./bundles/oroui/js/tools/keyboard-key-codes.js");const m=_().extend({constructor:function e(t){e.__super__.constructor.call(this,t)},initPickerWidget(e){this.initDropdown(e),this.initDatePicker(e)},createFrontField(e){m.__super__.createFrontField.call(this,e),this.$frontDateField.on("keydown",this.onKeyDownDropdownTrigger.bind(this))},initDropdown(e){this.$dropdown=this.$frontDateField.wrap('<div class="dropdown datefilter">').parent(),this.$dropdown.append('<div class="dropdown-menu dropdown-menu-calendar"><div class="tab-content"></div></div>').on("shown.bs.dropdown",this.onOpen.bind(this)).on(`keydown${this.eventNamespace()}`,this.closeOnEscape.bind(this)),this.$frontDateField.attr({"data-toggle":"dropdown","data-placement":"bottom-start","data-display-arrow":!1,"data-flip":!1,"data-position-fixed":!1}).data({onDestroy(e){if(e.state.__prevElementsStyle){for(const[t,i]of e.state.__prevElementsStyle){const e=Object.entries(i)[0];t.style[e[0]]=e[1]}delete e.state.__prevElementsStyle,c().trigger("layout:reposition")}},modifiers:{hide:{enabled:!1},offset:{enabled:!0,fn(e,t){const i=e.instance.state.scrollElement,s=e.instance.popper.getBoundingClientRect(),n=Math.round(s.bottom),o=l().getRootElement();let a=i;document.body.isSameNode(i)&&n>document.body.clientHeight&&(e.instance.state.__prevElementsStyle||(e.instance.state.__prevElementsStyle=[[document.body,{overflowY:document.body.style.overflowY}],[o,{minHeight:o.style.minHeight}]]),document.body.style.overflowY="scroll",o.style.minHeight=`${n}px`,a=o,c().trigger("layout:reposition"));const d=a.scrollWidth-a.clientWidth;return s.right>a.clientWidth&&d>0&&(t.offset=r().isRTL()?`${d}, 0`:-d+", 0"),h.default.Defaults.modifiers.offset.fn(e,t),e}}}})},initDatePicker:function(e){const t={};this.$calendar=this.getCalendarElement(),r().extend(t,e.datePickerOptions,{onSelect:this.onSelect.bind(this)}),this.$calendar.datepicker(t),this.$calendar.addClass(t.className).click((function(e){e.stopImmediatePropagation()})),this.$calendar.on(`keydown${this.eventNamespace()}`,this.closeOnEscape.bind(this))},getCalendarElement(){return this.$dropdown.find(".dropdown-menu .tab-content")},onOpen:function(e){"bs.dropdown"===e.namespace&&(this.$calendar.datepicker("refresh"),u.Z.focusTabbable(this.$calendar,this.$calendar.find(".ui-datepicker-calendar")),this.trigger("open",this))},onSelect(e){this.$frontDateField.val(e),m.__super__.onSelect.call(this,e),this.close()},close(){this.$dropdown.trigger("tohide"),this.$frontDateField.focus(),this.trigger("close",this)},closeOnEscape(e){e.keyCode===g.Z.ESCAPE&&this.$calendar.is(":visible")&&(e.stopPropagation(),this.close())},onKeyDownDropdownTrigger(e){const t=n()(e.target);switch(e.keyCode){case g.Z.ARROW_UP:case g.Z.ARROW_DOWN:e.preventDefault(),t.dropdown("show");break;case g.Z.ESCAPE:this.$calendar.is(":visible")&&(e.stopPropagation(),t.dropdown("hide"))}},destroyPickerWidget(){this.disposed||(this.$calendar.off(this.eventNamespace()),this.$dropdown.off(this.eventNamespace()),this.$calendar.datepicker("destroy"),this.$frontDateField.unwrap(),delete this.$calendar,delete this.$dropdown)}}),f=m},"./bundles/orofilter/js/app/views/datepicker/filter-datetimepicker-view.js":(e,t,i)=>{"use strict";i.d(t,{Z:()=>l});var s=i("./bundles/oroui/js/extend/jquery.js"),n=i.n(s),o=i("./bundles/orofilter/js/app/views/datepicker/filter-datepicker-view.js"),r=i("./bundles/oroui/js/app/views/datepicker/datetimepicker-view-mixin.js"),a=i.n(r);const l=o.Z.extend(Object.assign({},a(),{defaults:n().extend(!0,{},o.Z.prototype.defaults,a().defaults),constructor:function e(t){e.__super__.constructor.call(this,t)},_super:function(){return o.Z.__super__}}))},"./bundles/orofilter/js/app/views/datepicker/variable-datepicker-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orotranslation/js/translator.js"),n=i("./bundles/oroui/js/app/views/tabs-view.js"),o=i("./bundles/orofilter/js/date-variable-helper.js"),r=i("./bundles/orofilter/js/date-value-helper.js"),a=i("./bundles/orofilter/js/app/views/datepicker/filter-datepicker-view.js").Z,l=i("./bundles/orolocale/js/moment-l10n.js"),d=i("./bundles/orolocale/js/locale-settings.js"),c=i("./bundles/oroui/js/tools/manage-focus.js").Z;function u(e,i,s){return e=parseInt(e),!t.isNaN(e)&&e>=i&&e<=s}function h(e,i){let s;return t.each(e,(function(e,t){e===i&&(s=t)})),s}i("./bundles/orofilter/js/datevariables-widget.js"),i("./bundles/orofilter/js/itemizedpicker-widget.js");const p=a.extend({defaultTabs:[],partsDateValidation:{value:function(e){return this.dateVariableHelper.isDateVariable(e)||this.dateValueHelper.isValid(e)||l(e,this.getDateFormat(),!0).isValid()},dayofweek:function(e){return this.dateVariableHelper.isDateVariable(e)||h(d.getCalendarDayOfWeekNames("wide"),e)},week:function(e){return this.dateVariableHelper.isDateVariable(e)||u(e,1,53)},day:function(e){return this.dateVariableHelper.isDateVariable(e)||u(e,1,31)},month:function(e){return this.dateVariableHelper.isDateVariable(e)||h(d.getCalendarMonthNames("wide"),e)},quarter:function(e){return this.dateVariableHelper.isDateVariable(e)||u(e,1,4)},dayofyear:function(e){return this.dateVariableHelper.isDateVariable(e)||u(e,1,365)},year:function(e){return this.dateVariableHelper.isDateVariable(e)||!t.isNaN(parseInt(e))}},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.defaultTabs=[{name:"calendar",icon:"calendar",label:s("oro.filter.date.tab.calendar"),isVisible:()=>"value"===this.$variables.dateVariables("getPart")},{name:"days",label:s("oro.filter.date.tab.days"),isVisible:()=>"dayofweek"===this.$variables.dateVariables("getPart")},{name:"months",label:s("oro.filter.date.tab.months"),isVisible:()=>"month"===this.$variables.dateVariables("getPart")},{name:"variables",icon:"list-ul",label:s("oro.filter.date.tab.variables")}],this.dateVariableHelper=new o(e.datePickerOptions.dateVars),this.dateValueHelper=new r(e.dayFormats),p.__super__.initialize.call(this,e)},setPart:function(e){this.$variables.dateVariables("setPart",e),this.$frontDateField.attr("placeholder",s("oro.filter.date.placeholder."+e))},initPickerWidget:function(e){this.initDropdown(e),this.initTabsView(e),this.initDatePicker(e),this.initVariablePicker(e),this.initItemizedPicker("days",s("oro.filter.date.days.title"),d.getSortedDayOfWeekNames("wide")),this.initItemizedPicker("months",s("oro.filter.date.months.title"),d.getCalendarMonthNames("wide"))},initItemizedPicker:function(e,t,i){this.$dropdown.find("#"+e+"-"+this.cid).itemizedPicker({title:t,items:i,onSelect:this.onSelect.bind(this)})},initTabsView:function(e){const t=new n({el:this.$dropdown.find(".dropdown-menu"),template:e.dropdownTemplate,data:{tabs:e.tabs||this.defaultTabs,suffix:"-"+this.cid}});this.subview("tabs",t)},checkConsistency:function(e){const t=this.$frontDateField.val();this._preventFrontendUpdate||this.$frontDateField.is(e)||this._isDateValid(t)||this.$frontDateField.val("")},_isDateValid:function(e){const t=this.$variables.dateVariables("getPart"),i=this.partsDateValidation[t];return!!i&&i.call(this,e)},initVariablePicker:function(e){const i={};t.extend(i,e.datePickerOptions,{onSelect:this.onSelect.bind(this)}),this.$variables=this.$dropdown.find("#variables-"+this.cid),this.$variables.dateVariables(i),this.$frontDateField.attr("placeholder",s("oro.filter.date.placeholder."+this.$variables.dateVariables("getPart"))),this.$variables.addClass(i.className)},destroyPickerWidget:function(){this.disposed||(p.__super__.destroyPickerWidget.call(this),this.$variables.dateVariables("destroy"),delete this.$variables,this.removeSubview("tabs"))},getBackendFormattedValue:function(){const e=this.$frontDateField.val();return this.dateVariableHelper.isDateVariable(e)?this.dateVariableHelper.formatRawValue(e):"value"===this.$variables.dateVariables("getPart")?this.dateValueHelper.isValid(e)?this.dateValueHelper.formatRawValue(e):p.__super__.getBackendFormattedValue.call(this):this.getBackendPartFormattedValue()},getBackendPartFormattedValue:function(){const e=this.$frontDateField.val();switch(this.$variables.dateVariables("getPart")){case"dayofweek":return h(d.getCalendarDayOfWeekNames("wide"),e);case"month":return h(d.getCalendarMonthNames("wide"),e)}return e},getFrontendFormattedDate:function(){const e=this.$el.val();return this.dateVariableHelper.isDateVariable(e)?this.dateVariableHelper.formatDisplayValue(e):"value"===this.$variables.dateVariables("getPart")?this.dateValueHelper.isValid(e)?this.dateValueHelper.formatDisplayValue(e):p.__super__.getFrontendFormattedDate.call(this):this.getFrontendPartFormattedDate()},getFrontendPartFormattedDate:function(){const e=this.$el.val();switch(this.$variables.dateVariables("getPart")){case"dayofweek":return d.getCalendarDayOfWeekNames("wide")[e];case"month":return d.getCalendarMonthNames("wide")[e]}return e},onOpen:function(e){if("bs.dropdown"!==e.namespace)return;const t=this.$frontDateField.val();this.dateVariableHelper.isDateVariable(t)||this.$calendar.datepicker("setDate",t),this.subview("tabs").updateTabsVisibility(),this.dateVariableHelper.isDateVariable(t)&&(this.subview("tabs").show("variables"),c.focusTabbable(this.$variables,this.$variables.find(`:contains(${t})`))),this.$calendar.datepicker("refresh"),c.focusTabbable(this.$calendar,this.$calendar.find(".ui-datepicker-calendar")),this.trigger("open",this)},getCalendarElement(){return this.$dropdown.find("#calendar-"+this.cid)}});return p}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/app/views/datepicker/variable-datetimepicker-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/orofilter/js/app/views/datepicker/variable-datepicker-view.js"),n=i("./bundles/oroui/js/app/views/datepicker/datetimepicker-view-mixin.js"),o=i("./bundles/orolocale/js/moment-l10n.js"),r=s.extend(Object.assign({},n,{defaults:t.extend(!0,{},s.prototype.defaults,n.defaults),partsDateTimeValidation:{value:function(e,t){return this.dateVariableHelper.isDateVariable(e)||this.dateValueHelper.isValid(e)||o(e,this.getDateFormat(),!0).isValid()&&o(t,this.getTimeFormat(),!0).isValid()}},_super:function(){return r.__super__},updateTimeFieldState:function(){const e=this.$el.val();!this.$variables||"value"!==this.$variables.dateVariables("getPart")||this.dateVariableHelper.isDateVariable(e)||this.dateValueHelper.isValid(e)?this.$frontTimeField.val("").attr("disabled","disabled"):this.$frontTimeField.removeAttr("disabled")},checkConsistency:function(e){n.checkConsistency.call(this,e),r.__super__.checkConsistency.call(this,e);const t=this.$frontDateField.val(),i=this.$frontTimeField.val();this._preventFrontendUpdate||this.$frontDateField.is(e)||this.$frontTimeField.is(e)||this._isDateTimeValid(t,i)||(this.$frontDateField.val(""),this.$frontTimeField.val(""))},_isDateTimeValid:function(e,t){const i=this.$variables.dateVariables("getPart"),s=this.partsDateTimeValidation[i];return!s||s.call(this,e,t)},getBackendFormattedValue:function(){const e=this.$frontDateField.val();return this.dateVariableHelper.isDateVariable(e)?this.dateVariableHelper.formatRawValue(e):"value"===this.$variables.dateVariables("getPart")?this.dateValueHelper.isValid(e)?this.dateValueHelper.formatRawValue(e):r.__super__.getBackendFormattedValue.call(this):this.getBackendPartFormattedValue()},getFrontendFormattedDate:function(){const e=this.$el.val();return this.dateVariableHelper.isDateVariable(e)?this.dateVariableHelper.formatDisplayValue(e):"value"===this.$variables.dateVariables("getPart")?this.dateValueHelper.isValid(e)?this.dateValueHelper.formatDisplayValue(e):n.getFrontendFormattedDate.call(this):this.getFrontendPartFormattedDate()}}));return r}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/app/views/filter-dialog-widget.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/extend/jquery.js"),n=i("./bundles/oroui/js/mediator.js"),o=i("./bundles/orowindows/js/widget/dialog-widget.js"),r=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/templates/filters-dialog-actions.html"),a=o.extend({actionsTemplate:r,content:null,dialogOptions:{autoResize:!1,modal:!0,resize:!1,dialogClass:"filter-box"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(t.isEmpty(e.content))throw new TypeError('"content" property should be not empty');t.extend(this,t.pick(e,["content"])),e.dialogOptions=t.extend({},this.dialogOptions,e.dialogOptions),a.__super__.initialize.call(this,e)},render:function(){this.$placeholder=s("<div />"),this.content.after(this.$placeholder),this.$el.append(this.content),this.$el.append(this.actionsTemplate()),a.__super__.render.call(this),this._bindActionEvents()},onResetAll:function(e){n.trigger("filters:reset",e)},_bindActionEvents:function(){this.actionsEl.on("click",'[data-role="reset-filters"]',this.onResetAll.bind(this))},dispose:function(){this.disposed||(this.$placeholder.before(this.content),this.$placeholder.remove(),a.__super__.dispose.call(this))}});return a}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/app/views/filters-state-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/app/views/base/view.js"),n="animated-init",o=s.extend({POPOVER_DELAY:300,filters:[],template:i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/templates/filters-state-view.html"),popoverTemplate:i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/templates/filters-state-popover.html"),events:{"click .filters-state":"onClick","mouseenter .filters-state":"onMouseEnter","mouseleave .filters-state":"onMouseLeave"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){t.extend(this,t.pick(e,["filters"])),t.each(this.filters,(function(e){this.listenTo(e,"update updateCriteriaLabels",this.render)}),this),e.useAnimationOnInit&&this.$el.addClass(n),o.__super__.initialize.call(this,e)},getTemplateData:function(){const e=o.__super__.getTemplateData.call(this);return e.filters=[],t.each(this.filters,(function(t){t.isEmptyValue()||e.filters.push(t.getState())}),this),e},render:function(){return o.__super__.render.call(this),t.isEmpty(this.filters)&&this.$el.hide(),this},show:function(){this.$el.show()},hide:function(){this.$el.removeClass(n).hide()},onMouseEnter:function(e){const i=this.$(".filters-state");i[0].scrollWidth>i[0].clientWidth&&(i.popover({content:i.text(),trigger:"manual",placement:"bottom",animation:!1,container:"body",template:this.popoverTemplate()}),this.popoverDelay=t.delay((function(){i.popover("show")}),this.POPOVER_DELAY))},onMouseLeave:function(e){this.popoverDelay&&(clearTimeout(this.popoverDelay),delete this.popoverDelay);const t=this.$(".filters-state");t.popover("hide"),t.popover("dispose")},onClick:function(){this.trigger("clicked")}});return o}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/collection-filters-manager.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/tools.js"),n=i("./bundles/orofilter/js/filters-manager.js"),o=i("./bundles/oroui/js/mediator.js"),r=n.extend({constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.collection=e.collection,this.listenTo(this.collection,{beforeFetch:this._beforeCollectionFetch,updateState:this._onUpdateCollectionState,reset:this._onCollectionReset}),this.isVisible=!0,r.__super__.initialize.call(this,e)},render:function(){return r.__super__.render.call(this),this._onUpdateCollectionState(this.collection),this._onCollectionReset(this.collection),this},_onFilterUpdated:function(e){this.ignoreFiltersUpdateEvents||(this._updateView(),r.__super__._onFilterUpdated.call(this,e))},_beforeCollectionFetch:function(e){e.state.filters=this._createState()},_onUpdateCollectionState:function(e){this.ignoreFiltersUpdateEvents=!0,this._applyState(e.state.filters||{}),this._resetHintContainer(),this.ignoreFiltersUpdateEvents=!1},_updateView:function(){this.trigger("update-view:before-fetch"),this.collection.state.currentPage=1,this.collection.fetch({reset:!0})},_onChangeFilterSelect(e){r.__super__._onChangeFilterSelect.call(this,e),this.collection.updateState({filters:this._createState()})},_onCollectionReset:function(e){const i=e.length>0,s=!t.isEmpty(e.state.filters);i||s?this.isVisible||(this.show(),this.isVisible=!0):this.isVisible&&(this.hide(),this.isVisible=!1)},_createState:function(){const e={};return t.each(this.filters,(function(i,s){const n="__"+s;t.has(this.collection.initialState.filters,s)&&!i.isEmptyValue()?e[s]=i.getValue():i.renderable?i.isEmptyValue()?i.renderableByDefault||(e[n]="1"):e[s]=i.getValue():i.renderableByDefault&&(e[n]="0")}),this),e},_applyState:function(e){const i=[],n=[],r={};return t.each(this.filters,(function(o,a){const l="__"+a;let d;!1===o.renderableByDefault&&!0===o.renderable&&this.disableFilter(o),!0===o.renderableByDefault&&!1===o.renderable&&this.enableFilter(o),t.has(e,a)&&!s.isEqualsLoosely(e[a],o.emptyValue)?(d=e[a],t.isObject(d)||(d={value:d}),r[a]=d,i.push(o)):t.has(e,l)?(o.reset(),Number(e[l])?i.push(o):n.push(o)):o.reset()}),this),this.enableFilters(i),this.disableFilters(n),t.each(r,(function(e,t){this.filters[t].setValue(e)}),this),o.trigger("filters-manager:after-applying-state",this),this.checkFiltersVisibility(),this}});return r}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/datafilter-builder.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/jquery.js"),o=i("./bundles/oroui/js/extend/underscore.js"),r=i("./bundles/oroui/js/mediator.js"),a=i("./bundles/fosjsrouting/js/router.js"),l=i("./bundles/oroui/js/app/services/load-modules.js"),d=i("./bundles/orofilter/js/map-filter-module-name.js");let c=i("./bundles/orofilter/js/collection-filters-manager.js");const u=i("./bundles/orofilter/js/filters-navigation-component.js").Z,h=i("./bundles/orofrontend/js/app/datafilter/plugins/frontend-filters-plugin.js");let p=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);const _={};p=o.extend({FiltersManager:c},p);const g={initBuilder:function(){const e=n.Deferred();o.defaults(this.metadata,{filters:{}});const t=g.collectModules.call(this);return l(t,(function(t){this.modules=t,e.resolve()}),this),e.promise()},collectModules:function(){const e={};return o.each(this.metadata.filters||{},(function(t){const i=t.type;e[i]=d(i)})),o.isString(p.FiltersManager)&&(e.FiltersManager=p.FiltersManager),e},build:function(){if(!this.collection||!this.modules)return;c=this.modules.FiltersManager||c;const e=o.extend(g.combineOptions.call(this),o.pick(this,"collection"),o.pick(this.metadata.options,"defaultFiltersViewMode","filtersStateStorageKey","useFiltersStateAnimationOnInit","enableFiltersNavigation"),this.metadata.options.filtersManager);let t;if(this.filterContainerSelector&&(t=this.$el.find(this.filterContainerSelector)[0]||n(this.filterContainerSelector)[0]),t||(t=this.$el[0]),this.enableToggleFilters&&!0!==o.result(this.metadata.options.toolbarOptions,"hide"))if(this.filtersStateElement)e.filtersStateElement=this.filtersStateElement;else{const i=this.$el.closest("body, .ui-dialog").find(e.filtersStateElement).first();e.filtersStateElement=i.length?i:n("<div/>").prependTo(t)}else e.forcedViewMode=c.MANAGE_VIEW_MODE;e.filterContainer=t;const i=new c(e);this.grid.filterManager=i,this.grid.trigger("filters:beforeRender"),i.render(),r.trigger("datagrid_filters:rendered",this.collection,this.$el),this.metadata.state.filters=this.metadata.state.filters||[],0===this.collection.length&&0===this.metadata.state.filters.length&&i.hide(),this.grid.trigger("filterManager:connected");const{enableFiltersNavigation:s=!0}=e;s&&(this.grid.filtersNavigationComponent=new u({filters:e.filters})),this.deferred.resolve(i)},combineOptions:function(){const e={},t=this.modules;return o.each(this.metadata.filters,(function(i){if(o.has(i,"name")&&o.has(i,"type")){i.lazy&&(i.loader=g.createFilterLoader.call(this,i));const s=t[i.type].extend(i);e[i.name]=new s}}),this),g.loadFilters.call(this,this.metadata.options.gridName),{filters:e}},loadFilters:function(e){if(!o.map(this.filterLoaders,o.property("name")).length)return;o.chain(this.filterLoaders).filter(o.property("useCache")).each((function(e){e.success.call(this,_[e.cacheId])}));const t={gridName:e,filterNames:o.map(this.filterLoaders,o.property("name"))};t[this.metadata.options.gridName]=this.metadata.gridParams;const i=a.generate("oro_datagrid_filter_metadata",t),s=this;n.get(i).done((function(e){o.each(s.filterLoaders,(function(t){_[e[t.name].cacheId]=e[t.name],t.useCache||t.success.call(this,e[t.name])}))}))},createFilterLoader:function(e){return t=>{this.filterLoaders.push({name:e.name,cacheId:e.cacheId,success:t,useCache:e.cacheId&&_[e.cacheId]})}}};return{init:function(e,t){const i={filterLoaders:[],deferred:e,$el:t.$el,gridName:t.gridName,metadata:t.metadata,collection:null,modules:null};o.extend(i,o.pick(t,"filtersStateElement","filterContainerSelector","enableToggleFilters")),n.when(t.gridPromise,g.initBuilder.call(i)).done((function(e){i.collection=e.collection,i.grid=e,g.build.call(i)})).fail((function(){e.reject()}))},processDatagridOptions:function(e,t){o.isArray(t.metadata.plugins)||(t.metadata.plugins=[]),!1===o.result(p,"enableToggleFilters")&&(t.enableToggleFilters=!1),t.enableToggleFilters&&t.metadata.plugins.push(h),o.isFunction(h.isApplicable)&&!1===h.isApplicable(t)&&(t.enableToggleFilters=!1),e.resolve()}}}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofilter/js/datafilter-wrapper.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/oroui/js/tools/keyboard-key-codes.js").Z,o={popupCriteriaShowed:!1,_getWrapperTemplate:function(){if(!this.wrapperTemplate){let e="";this.wrapperTemplateSelector&&(e=t(this.wrapperTemplateSelector).text()),this.wrapperTemplate=s.template(e)}return this.wrapperTemplate},_wrap:function(e){this.setElement(this._getWrapperTemplate()({label:this.labelPrefix+this.label,showLabel:this.showLabel,isEmpty:this.isEmptyValue(),renderMode:this.renderMode,criteriaHint:this._getCriteriaHint(),criteriaClass:this.getCriteriaExtraClass(),...this.getTemplateDataProps()})),this._appendFilter(e);const i=["click","multiselectbeforeopen","show.bs.dropdown","clearMenus"].map((e=>e+this._eventNamespace())).join(" ");t(document).off(this._eventNamespace()),t(document).on(i,(e=>{this.popupCriteriaShowed&&!1!==this.autoClose&&this._onClickOutsideCriteria(e)})),this.$el.on(`keydown${this._eventNamespace()}`,".dropdown-menu.filter-criteria",(e=>{e.keyCode===n.ESCAPE&&(this._hideCriteria(),this.focusCriteriaToggler())}))},dispose:function(){this.disposed||(t(document).off(this._eventNamespace()),s.each(s.keys(o),(function(e){delete this[e]}),this),this.constructor.__super__.dispose.call(this))},_eventNamespace:function(){return".delegateEvents"+this.cid},_appendFilter:function(e){this.$(this.criteriaSelector).append(e)},close:function(){return this._hideCriteria(),this}};return o}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/date-value-helper.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orolocale/js/moment-l10n.js"),n=i("./bundles/orolocale/js/formatter/datetime.js");function o(e){e=e||[n.getDayFormat()],(e=t.isArray(e)?e:[e]).push(n.getBackendDayFormat()),this.backendFormats={},this.backendFormats[this.DAY]=n.getBackendDayFormat(),this.backendFormats[this.MONTH]=n.getBackendMonthFormat(),this.formats={},this.formats[this.DAY]=e,this.formats[this.MONTH]=["MMM","MMMM",this.backendFormats[this.MONTH]]}return o.prototype={DAY:"day",MONTH:"month",isValid:function(e){const t=this._valueType(e);return s(e,this.formats[t],!0).isValid()},formatDisplayValue:function(e){const t=this._valueType(e);return s(e,this.formats[t],!0).format(this.formats[t][0])},formatRawValue:function(e){const t=this._valueType(e);return s(e,this.formats[t],!0).format(this.backendFormats[t])},_valueType:function(e){return s(e,this.formats[this.DAY],!0).isValid()?this.DAY:this.MONTH}},o}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/date-variable-helper.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js");function s(e){this.dateVariables=e;const i=t.toArray(this.dateVariables);i.unshift({}),this.objectIndex=t.chain(t.extend(...i)).map((function(e,t){return{key:t,name:e}})).sortBy((function(e){return-e.name.length})).value()}return s.prototype={isDateVariable:function(e){const i=this;return e=e.replace(/( *[\-+]+ *(\d+)?)/,""),t.some(this.objectIndex,(function(t){const s=new RegExp("^"+e+"$","i"),n=!/\s+/.test(t.name)&&s.test(t.name.substr(0,3))&&i.dateVariables.month[t.key];return e==="{{"+t.key+"}}"||s.test(t.name)||n}))},formatDisplayValue:function(e){return t.reduce(this.objectIndex,(function(e,t){return e.replace(new RegExp("\\{+"+t.key+"\\}+","gi"),t.name)}),e)},formatRawValue:function(e){let i=null;return t.each(this.objectIndex,(function(t){const s=new RegExp("^"+e+"$","i"),n=!/\s+/.test(t.name)&&s.test(t.name.substr(0,3))&&this.dateVariables.month[t.key];i=n?t.name.substr(0,3):t.name,e=e.replace(new RegExp(i,"gi"),"{{"+t.key+"}}")}),this),e}},s}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/datevariables-widget.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/orotranslation/js/translator.js"),o=i("./bundles/oroui/js/layout.js");return i("../node_modules/jquery-ui/ui/widget.js"),t.widget("orofilter.dateVariables",{options:{onSelect:t.noop,value:null,part:"value",dateParts:null,dateVars:null,tooltipTemplate:'<i class="fa-info-circle fa--offset-l fa--x-large" data-content="<%- content %>" data-placement="top" data-toggle="popover" data-original-title="<%- title %>"></i>',htmlTemplate:'<div class="ui-datevariables-div <%- attributes %>"><span class="datevariables-title"><%- title %></span> <%= tooltipHTML %><ul><% _.each(dateVars, function(dateVariable, varCode) { %><li><a class="ui_date_variable" href="#" data-code="<%- varCode %>"><%- dateVariable %></a></li><% }); %></ul></div>'},_create:function(){this.render(),this._on({"click .ui-datevariables-div a.ui_date_variable":"onSelectVar"})},_destroy:function(){this.element.empty()},setPart:function(e){this.options.part=e,this.render()},getPart:function(){return this.options.part},onSelectVar:function(e){const t=e.target.text;this.options.onSelect(t),e.preventDefault()},render:function(){const e=this.options,i=e.part,r=this._getVariablesByPart(i),a=s.template(e.tooltipTemplate),l=s.template(e.htmlTemplate),d=t(l({attributes:"",title:n("oro.filter.date.variable.title"),tooltipHTML:a({content:n("oro.filter.date.variable.tooltip"),title:n("oro.filter.date.variable.tooltip_title")}),dateVars:r}));this.element.html(d),o.initPopover(this.element)},_getVariablesByPart:function(e){const t=this.options.dateVars;return t[e]?t[e]:t.value}}),t}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/filter-hint.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/filter-hint.html"),o=i("./bundles/oroui/js/extend/underscore.js"),r=i("./bundles/oroui/js/extend/jquery.js"),a=i("./bundles/oroui/js/app/views/base/view.js");let l=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);const d=i("./bundles/orofilter/js/filter-template.js");l=o.extend({inline:!0,selectors:{filters:".filter-container",itemHint:".filter-item-hint",itemsHint:".filter-items-hint",hint:".filter-criteria-hint",reset:".reset-filter-button"}},l);const c=a.extend(o.extend({},d,{filter:null,label:"",hint:"",template:n,inline:l.inline,selectors:l.selectors,events:{"click .reset-filter":"_onClickResetFilter"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(!e.filter)throw new Error("Required option filter not found.");this.filter=e.filter,this.selectors={...this.selectors,...e.selectors},this.templateTheme=this.filter.templateTheme,this.label=this.filter.label,this.hint=this.filter._getCriteriaHint(),this._defineTemplate(),this.listenTo(this.filter,"rendered",this.render),c.__super__.initialize.call(this,e)},render:function(){document.contains(this.el)&&this.el.remove(),this.setElement(this.template({label:this.inline?null:this.label,allowClear:this.filter.allowClear})),this.filter.outerHintContainer?r(this.filter.outerHintContainer).find(this.selectors.itemsHint).prepend(this.$el):this.inline?this.filter.$el.find(this.selectors.itemHint).append(this.$el):this.filter.$el.closest(this.selectors.filters).find(this.selectors.itemsHint).find(this.selectors.reset).before(this.$el),this.visible=!0,this.update(this.hint)},update:function(e){return this.$el.find(this.selectors.hint).html(o.escape(e)),this.inline||null!==e?this.visible||(this.$el.show(),this.visible=!0):this.visible&&(this.$el.hide(),this.visible=!1),this},_onClickResetFilter:function(e){e.stopPropagation(),this.trigger("reset")}}));return c}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofilter/js/filter-template.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/jquery.js"),i("./bundles/oroui/js/extend/underscore.js")],void 0===(n=function(e,t){"use strict";return{template:"",templateSelector:"",templateTheme:"",_defineTemplate:function(){this.template=this._getTemplate("template")},_getTemplate:function(i){const s=this[i+"Selector"]||"",n=this.templateTheme,o=n&&e(s+"-"+n).text()||e(s).text();return t.isEmpty(o)?this[i]:t.template(o)}}}.apply(t,s))||(e.exports=n)},"./bundles/orofilter/js/filter/abstract-filter.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/jquery.js"),o=i("./bundles/oroui/js/extend/underscore.js"),r=i("./bundles/orotranslation/js/translator.js"),a=i("./bundles/oroui/js/app/views/base/view.js"),l=i("./bundles/oroui/js/tools.js"),d=i("./bundles/orofilter/js/filter-template.js"),c=i("./bundles/orofilter/js/filter-hint.js"),u=i("./bundles/orofrontend/default/js/app/views/filter-settings.js").Z;let h=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);h=o.extend({placeholder:r("All"),labelPrefix:""},h);const p=a.extend(o.extend({},d,{renderable:!1,visible:!0,renderableByDefault:!1,name:"input_name",placeholder:h.placeholder,label:r("Input Label"),labelPrefix:h.labelPrefix,showLabel:!0,buttonActiveClass:"open-filter",buttonExpandClass:u.buttonExpandClass,dropdownFitContainers:[".ui-dialog-content>*:first-child","#container","body"],allowClear:!0,renderMode:"",outerHintContainer:void 0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){const t=o.pick(e||{},"renderable","visible","placeholder","showLabel","label","templateSelector","templateTheme","template","renderMode","outerHintContainer");o.extend(this,t),this._defineTemplate(),this.renderableByDefault=this.renderable,o.isUndefined(this.emptyValue)&&(this.emptyValue={}),o.isUndefined(this.value)&&(this.value=l.deepClone(this.emptyValue)),p.__super__.initialize.call(this,e);const i=new c({filter:this});this.subview("hint",i),this.listenTo(i,"reset",this.reset)},isRendered:function(){return this._rendereddInMode===this.renderMode},rendered:function(){return this._rendereddInMode=this.renderMode,this.trigger("rendered"),this},dispose:function(){this.disposed||(delete this.value,delete this.emptyValue,p.__super__.dispose.call(this))},enable:function(){return this.renderable||(this.renderable=!0,this.show(),this.trigger("enable",this)),this},disable:function(){return this.renderable&&(this.renderable=!1,this.hide(),this.trigger("disable",this),this.reset()),this},show:function(){return this.visible&&this.$el.show(),this},hide:function(){return this.$el.hide(),this},close:function(){},reset:function(){return this.trigger("reset"),this.setValue(this.emptyValue),this},getValue:function(){return l.deepClone(this.value)},setValue:function(e){if(!l.isEqualsLoosely(this.value,e)){const t=this.value;this.value=l.deepClone(e),this._updateDOMValue(),this._onValueUpdated(this.value,t)}return this},setRenderMode:function(e){o.isString(e)&&e.length&&(this.renderMode=e)},_findDropdownFitContainer:function(e){e=e||this.$el;let t=n();for(let i=0;i<this.dropdownFitContainers.length&&0===t.length;i+=1)t=n(e).closest(this.dropdownFitContainers[i]);return 0===t.length?null:t},_formatRawValue:function(e){return e},_formatDisplayValue:function(e){return e},_onValueUpdated:function(e,t){this._updateCriteriaHint(),this._triggerUpdate(e,t)},_updateCriteriaHint:function(){return this.subview("hint").update(this._getCriteriaHint()),this.$el.find(".filter-criteria-selector").toggleClass("filter-default-value",this.isEmptyValue()),this},_onValueChanged:function(){this.trigger("change")},_triggerUpdate:function(e,t){this.trigger("update")},isUpdatable:(e,t)=>!0,isEmpty:function(){return l.isEqualsLoosely(this.getValue(),this.emptyValue)},isEmptyValue:function(){return!o.has(this.emptyValue,"value")||!o.has(this.value,"value")||l.isEqualsLoosely(this.value.value,this.emptyValue.value)},_getInputValue:function(e){let t;const i=this.$(e);return"radio"===i.attr("type")?i.each((function(){n(this).is(":checked")&&(t=n(this).val())})):t=i.val(),t},_setInputValue:function(e,t){const i=this.$(e);return"radio"===i.attr("type")?i.each((function(){const e=n(this);e.attr("value")===t?(e.prop("checked",!0),e.click()):e.prop("checked",!1)})):i.val(t),this},_updateDOMValue:function(){return this._writeDOMValue(this._getDisplayValue())},_getCriteriaHint:function(){return""},_getDisplayValue:function(...e){const t=e.length>0?e[0]:this.getValue();return this._formatDisplayValue(t)},_writeDOMValue:function(e){throw new Error("Method _writeDOMValue is abstract and must be implemented")},_readDOMValue:function(){throw new Error("Method _readDOMValue is abstract and must be implemented")},_isDOMValueChanged:function(){throw new Error("Method _isDOMValueChanged is abstract and must be implemented")},_setButtonPressed:function(e,t){this._setButtonExpanded(t),t?e.parent().addClass(this.buttonActiveClass):e.parent().removeClass(this.buttonActiveClass)},_setButtonExpanded:function(e){this.$(".filter-criteria-selector").toggleClass(this.buttonExpandClass,e).attr("aria-expanded",e)},_preventEnterProcessing:function(e){13===e.keyCode&&(e.preventDefault(),e.stopPropagation())},applyValue:function(){this.setValue(this._formatRawValue(this._readDOMValue()))},getState:function(){return{label:this.label,hint:this._getCriteriaHint()}},getCriteriaExtraClass(){if(o.isObject(u)&&o.isObject(u.appearance)){const e=u.appearance[this.renderMode];return e&&"string"==typeof e.criteriaClass?e.criteriaClass:void 0}},getTemplateDataProps(){return{inputFieldAriaLabel:r("oro.filter.input_field.aria_label",{label:this.label}),choiceAriaLabel:r("oro.filter.select_field.aria_label",{label:this.label}),updateButtonAriaLabel:r("oro.filter.updateButton.aria_label",{label:`${r("oro.filter.by")} ${this.label}`})}},isDropdownRenderMode(){return"dropdown-mode"===this.renderMode}}));return p}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofilter/js/filter/boolean-filter.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";return i("./bundles/orofrontend/default/js/app/views/frontend-select-filter.js").extend({})}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/filter/choice-filter.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/choice-filter.html"),s=i("./bundles/oroui/js/extend/jquery.js"),n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/oroui/js/tools.js"),r=i("./bundles/orofilter/js/filter/text-filter.js").extend({template:t,templateSelector:"#choice-filter-template",criteriaValueSelectors:{value:'input[name="value"]:not(input[type="hidden"])',type:'input[type="hidden"]:last'},choiceDropdownSelector:".choice-filter .dropdown-menu",wrapHintValue:!0,events(){return{[`change ${this.criteriaValueSelectors.type}`]:"_onValueChanged","click .disable-filter":"_onClickDisableFilter","click .choice-value":"_onClickChoiceValue"}},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){const t=n.pick(e||{},"choices");n.extend(this,t),n.isUndefined(this.choices)&&(this.choices=[]),s.isPlainObject(this.choices)&&(this.choices=n.map(this.choices,(function(e,t){return{value:t.toString(),label:e}}))),n.isUndefined(this.emptyValue)&&(this.emptyValue={type:n.isEmpty(this.choices)?"":n.first(this.choices).value,value:""}),r.__super__.initialize.call(this,e)},dispose:function(){this.disposed||(delete this.choices,delete this.emptyValue,r.__super__.dispose.call(this))},resetFlags(){this.popupCriteriaShowed=!1,this.selectDropdownOpened=!1,this._criteriaRenderd=!1,this._isRenderingInProgress=!1},render:function(){return this.resetFlags(),this._wrap(""),""===this.$el.html()&&this._renderCriteria(),this.initiallyOpened&&this._showCriteria(),this},getType:function(){return this._readDOMValue().type},getTemplateData:function(){const e=n.extend({},this.emptyValue,this.value);let t="";if(!n.isEmpty(this.choices)){let i=n.find(this.choices,(function(t){return String(t.value)===String(e.type)}));i=i||n.first(this.choices),t=n.result(i,"label")||""}return{name:this.name,choices:this.choices,selectedChoice:e.type,selectedChoiceLabel:t,value:e.value,renderMode:this.renderMode,...this.getTemplateDataProps()}},_renderCriteria:function(){const e=s(this.template(this.getTemplateData()));this._appendFilter(e),this._updateDOMValue(),this._updateValueField(),this._criteriaRenderd=!0,this._isRenderingInProgress=!1},_showCriteria:function(){this._criteriaRenderd||this._isRenderingInProgress||(this._isRenderingInProgress=!0,this._renderCriteria()),this._updateValueField(),r.__super__._showCriteria.call(this)},_onClickChoiceValue:function(e){r.__super__._onClickChoiceValue.call(this,e),this._updateValueField()},reset:function(){r.__super__.reset.call(this),this._updateValueField()},_updateValueField:function(){if(!this.$(".value-field-frame").length)return;const e=this.$(this.criteriaValueSelectors.type).val(),t=this.isEmptyType(e);this.$(".filter-criteria").toggleClass("empty-type",t),t||!1===this.autoClose||this.$(this.criteriaValueSelectors.value).focus()},_getCriteriaHint:function(...e){const t=e.length>0?this._getDisplayValue(e[0]):this._getDisplayValue();let i=null;if(!n.isUndefined(t.type)){const e=t.type;if(i=this._getChoiceOption(e),this.isEmptyType(e))return i?i.label:this.placeholder}if(!t.value)return this.placeholder;const s=this.wrapHintValue?'"'+t.value+'"':t.value;return(i?i.label+" ":"")+s},_getChoiceOption:function(e){return n.findWhere(this.choices,{value:e.toString()})},_writeDOMValue:function(e){return this._setInputValue(this.criteriaValueSelectors.value,e.value),this._setInputValue(this.criteriaValueSelectors.type,e.type),this},_readDOMValue:function(){return{value:this._getInputValue(this.criteriaValueSelectors.value),type:this._getInputValue(this.criteriaValueSelectors.type)}},isUpdatable:function(e,t){return!o.isEqualsLoosely(e,t)&&(this.isEmptyType(e.type)||this.isEmptyType(t.type)||!this._isEmpty(e.value)||!this._isEmpty(t.value))},_triggerUpdate:function(e,t){this.isUpdatable(e,t)&&this.trigger("update")},_isEmpty:function(e){return!n.isNumber(e)&&n.isEmpty(e)},_onValueUpdated:function(e,t){this.$(this.choiceDropdownSelector).each((function(){const i=s(this),n=i.data("name")||"type";t[n]!==e[n]&&i.find("li a").each((function(){const o=s(this);o.data("value").toString()===t[n]&&o.parent().hasClass("active")?o.parent().removeClass("active"):o.data("value").toString()!==e[n]||o.parent().hasClass("active")||(o.parent().addClass("active"),i.parent().find("button").html(o.html()+'<span class="caret"></span>'))}))})),r.__super__._onValueUpdated.call(this,e,t)}});return r}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/filter/choice-tree-filter.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/choice-tree.html"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/oroui/js/extend/jquery.js"),o=i("./bundles/orofilter/js/filter/text-filter.js"),r=i("./bundles/oroui/js/tools.js"),a=i("./bundles/oroui/js/app/views/loading-mask-view.js"),l=i("./bundles/oroform/js/app/components/select2-tree-autocomplete-component.js"),d=o.extend({template:t,templateSelector:"#choice-tree-template",select2component:null,events:{"click .filter-update":"_onClickUpdateCriteria","click .filter-criteria .filter-criteria-hide":"_onClickCloseCriteria","click .disable-filter":"_onClickDisableFilter","select2-data-loaded":"onDataLoaded","select2-loaded":"onDataLoaded"},emptyValue:{type:1,value:""},checkedItems:{},loadedMetadata:!0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){d.__super__.initialize.call(this,e),this.data=this.data||[],this.lazy&&(this.loadedMetadata=!1,this.loader((e=>{this.data=e.data,this._updateCriteriaHint(),this.loadedMetadata=!0,this.subview("loading")&&this.subview("loading").hide()})))},render:function(){const e=d.__super__.render.call(this);return this.loadedMetadata||(this.subview("loading",new a({container:this.$el})),this.subview("loading").show()),e},_showCriteria:function(){this.select2component||this._initSelect2Component(),d.__super__._showCriteria.call(this)},_initSelect2Component:function(){if(!this.loadedMetadata)return;const e={_sourceElement:this.$(this.criteriaValueSelectors.value),configs:{allowClear:!0,minimumInputLength:0,multiple:!0,renderedPropertyName:this.renderedPropertyName,forceSelectedData:!0}};this.autocomplete_url?(e.url=this.autocomplete_url,s.extend(e.configs,{autocomplete_alias:this.autocomplete_alias})):this.data&&(e.configs.data={results:this.data,text:"name"}),this.$(this.criteriaValueSelectors.value).data("selected-data",this.data),this.select2component=new l(e)},setValue:function(e,t){if(!r.isEqualsLoosely(this.value,e)){const i=this.value;this.value=r.deepClone(e),this._updateDOMValue(),t||this._onValueUpdated(this.value,i)}return this},_onClickUpdateCriteria:function(){this.trigger("updateCriteriaClick",this),this._hideCriteria(),this.applyValue()},_readDOMValue:function(){return{value:this._getInputValue(this.criteriaValueSelectors.value),type:1}},onDataLoaded:function(e){const t=s.result(e.items,"results")||[],i=s.pluck(this.data,"id");Array.prototype.push.apply(this.data,s.filter(t,(function(e){return-1===i.indexOf(e.id)})))},_getCriteriaHint:function(...e){const t=e.length>0?this._getDisplayValue(e[0]):this._getDisplayValue();if(!t.value)return this.placeholder;if(0!==this.data.length){const e=this.renderedPropertyName||"name",i=[];return s.each(t.value.split(","),(function(t){let n=parseInt(t);t&&isNaN(n)&&(n=t);const o=s.findWhere(this.data,{id:n});if(void 0!==o)if(o.treePath){const t=[];s.each(o.treePath,(function(i){t.push(i[e])})),i.push(t.join(" / "))}else i.push(o[e])}),this),this.select2component&&0===this.select2component.view.$el.select2("data").length&&this.select2component.view.$el.select2("data",this.data),""+(this.wrapHintValue?'"'+i.join(", ")+'"':i.join(", "))}this.loadDataById(t)},getQuery:function(e){let t;if("string"==typeof e.value)t=e.value;else{const i=[];s.each(e.value,(function(e){i.push(e.id)})),t=i.join(",")}return t},loadDataById:function(e){const t=this.getQuery(e),i=this;n.ajax({url:this.autocomplete_url,data:{page:1,per_page:10,name:i.autocomplete_alias,query:t,search_by_id:!0},success:function(e){i.data=e.results,i._updateCriteriaHint(!0)}})},reset:function(){d.__super__.reset.call(this),this.$(this.criteriaValueSelectors.value).trigger("change"),this._hideCriteria()}});return d}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/filter/date-filter.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/date-filter.html"),o=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/select-field.html"),r=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/date-filter-dropdown.html"),a=i("./bundles/oroui/js/extend/jquery.js"),l=i("./bundles/oroui/js/extend/underscore.js"),d=i("./bundles/oroui/js/tools.js"),c=i("./bundles/orotranslation/js/translator.js"),u=i("./bundles/orofrontend/default/js/app/views/choice-filter.js"),h=i("./bundles/orofilter/js/app/views/datepicker/filter-datepicker-view.js").Z,p=i("./bundles/orofilter/js/app/views/datepicker/variable-datepicker-view.js"),_=i("./bundles/orofilter/js/date-variable-helper.js"),g=i("./bundles/orofilter/js/date-value-helper.js"),m=i("./bundles/orolocale/js/formatter/datetime.js"),f=i("./bundles/orolocale/js/locale-settings.js"),b=i("./bundles/oroui/js/layout.js");let v=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);v=l.extend({inputClass:"date-visual-element"},v),i("./bundles/orofilter/js/datevariables-widget.js");const w=u.extend({template:n,templateSelector:"#date-filter-template",fieldTemplate:o,fieldTemplateSelector:"#select-field-template",dropdownTemplate:r,dropdownTemplateSelector:"#date-filter-dropdown-template",criteriaValueSelectors:{type:"select",date_type:"select[name][name!=date_part]",date_part:"select[name=date_part]",value:{start:'input[name="start"]',end:'input[name="end"]'}},selectors:{startContainer:".filter-start-date",separator:".filter-separator",endContainer:".filter-end-date"},className:"date-filter-container",customClass:"date-filter-custom",inputClass:v.inputClass,dateWidgetOptions:{changeMonth:!0,changeYear:!0,yearRange:"-80:+1",dateFormat:f.getVendorDateTimeFormat("jquery_ui","date","mm/dd/yy"),altFormat:"yy-mm-dd",className:"date-filter-widget",showButtonPanel:!0},pickerConstructor:null,variablePickerConstructor:null,externalWidgetOptions:{},typeValues:{between:1,notBetween:2,moreThan:3,lessThan:4,equal:5,notEqual:6},typeDefinedValues:{none:0,today:7,this_week:8,this_month:9,this_quarter:10,this_year:11,all_time:12},dateParts:[],datePartTooltips:{week:"oro.filter.date.part.week.tooltip",day:"oro.filter.date.part.day.tooltip",quarter:"oro.filter.date.part.quarter.tooltip",dayofyear:"oro.filter.date.part.dayofyear.tooltip",year:"oro.filter.date.part.year.tooltip"},hasPartsElement:!1,dayFormats:null,events:{"change select":"onChangeFilterType"},autoUpdateRangeFilterType:!0,autoUpdateBetweenWhenOneDate:!0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(this.dayFormats=e&&e.dayFormats||[m.getDayFormat()],this.dateWidgetOptions=a.extend(!0,{},this.dateWidgetOptions,this.externalWidgetOptions),this.dateVariableHelper=new _(this.dateWidgetOptions.dateVars),this.dateValueHelper=new g(this.dayFormats.slice()),this.hasPartsElement=""!==this.templateTheme,l.isUndefined(this.emptyValue)&&(this.emptyValue={type:l.isEmpty(this.choices)?"":l.first(this.choices).value,part:"value",value:{start:"",end:""}}),l.isUndefined(this.dateParts)&&(this.dateParts=[]),a.isPlainObject(this.dateParts)&&(this.dateParts=l.map(this.dateParts,(function(e,t){const i=t.toString();return{value:i,label:e,tooltip:this._getPartTooltip(i)}}),this)),l.isUndefined(this.emptyPart)){const e=l.first(this.dateParts).value;this.emptyPart={type:l.isEmpty(this.dateParts)?"":e,value:e}}w.__super__.initialize.call(this,e)},dispose:function(){this.disposed||(delete this.dateParts,delete this.emptyPart,delete this.emptyValue,this.$(`[data-cid="filter-${this.cid}"]`).off(this.eventNamespace()),w.__super__.dispose.call(this))},_getPickerConstructor:function(){return this.isSimplePickerView()?h:p},isSimplePickerView(){return d.isMobile()||!this.dateWidgetOptions.showDatevariables},onChangeFilterType:function(e){const t=this.$el.find(e.currentTarget).val();this.changeFilterType(t)},onFilterRemove(e){this.removeSubview("start"),this.removeSubview("end"),this._criteriaRenderd=!1},_applyValueAndHideCriteria:function(){this._beforeApply(),w.__super__._applyValueAndHideCriteria.call(this)},changeFilterType:function(e){const t=[this.selectors.startContainer,this.selectors.separator,this.selectors.endContainer].join(","),i=[this.selectors.startContainer,this.selectors.separator].join(","),s=[this.selectors.separator,this.selectors.endContainer].join(","),n=parseInt(e,10);isNaN(n)?(this.subview("start").setPart(e),this.subview("start").setValue(""),this.subview("end").setPart(e),this.subview("end").setValue(""),this.$(this.criteriaValueSelectors.date_part).closest(".dropdown").find('[data-toggle="dropdown"]').attr("title",this._getPartTooltip(e))):(this.$(t).css("display",""),this.$el.addClass(this.customClass),[this.typeDefinedValues.none,this.typeDefinedValues.today,this.typeDefinedValues.this_week,this.typeDefinedValues.this_month,this.typeDefinedValues.this_quarter,this.typeDefinedValues.this_year,this.typeDefinedValues.all_time].indexOf(n)>-1?(this.$(t).hide(),this.$el.removeClass(this.customClass),this.subview("start").setValue(""),this.subview("end").setValue("")):this.typeValues.moreThan===n?(this.$(s).hide(),this.subview("end").setValue("")):this.typeValues.lessThan===n?(this.$(i).hide(),this.subview("start").setValue("")):this.typeValues.equal===n?(this.$(s).hide(),this.subview("end").setValue("")):this.typeValues.notEqual===n&&(this.$(i).hide(),this.subview("start").setValue("")),this.$(this.criteriaValueSelectors.date_type).closest(".dropdown").find('[data-toggle="dropdown"]').html(this.$(this.criteriaValueSelectors.date_type+" :selected").text()))},_renderCriteria:function(){const e=l.extend({},this.emptyValue,this.getValue()),t={value:e.part,type:e.part};this.dateWidgetOptions.part=t.type,this._updateRangeFilter(e,!1);const i=this._formatDisplayValue(e),s=a(this.template({inputClass:this.inputClass,value:i,parts:this._getParts(),popoverContent:c("oro.filter.date.info"),renderMode:this.renderMode,...this.getTemplateDataProps()}));this._appendFilter(s),s.attr("data-cid",`filter-${this.cid}`),s.one(`remove${this.eventNamespace()}`,this.onFilterRemove.bind(this)),this.$(this.criteriaSelector).attr("tabindex","0"),this._renderSubViews(),this.changeFilterType(e.type),b.initPopover(this.$el),e&&this._updateTooltipVisibility(e.part),this.on("update",(()=>{const e=this.getValue();e&&this._updateTooltipVisibility(e.part)})),this.$el.inputWidget("seekAndCreate"),this._criteriaRenderd=!0,this._isRenderingInProgress=!1},_getParts:function(){const e=l.extend({},this.emptyValue,this.getValue()),t={value:e.part,type:e.part},i=this._getSelectedChoiceLabel("choices",e),s=this._getSelectedChoiceLabel("dateParts",t),n=this._getTemplate("fieldTemplate"),o=[];return""!==this.templateTheme&&o.push(n({name:this.name+"_part",choices:this.dateParts,selectedChoice:e.part,selectedChoiceLabel:s,selectedChoiceTooltip:this._getPartTooltip(e.part),renderMode:this.renderMode,...this.getTemplateDataProps()})),o.push(n({name:this.name,choices:this.choices,selectedChoice:e.type,selectedChoiceLabel:i,popoverContent:c("oro.filter.date.info"),renderMode:this.renderMode,...this.getTemplateDataProps()})),o},_renderSubViews:function(){let e,t,i,s;const n=this.criteriaValueSelectors.value,o=this._getPickerConstructor();for(e in n)n.hasOwnProperty(e)&&(t=n[e],s=this._getPickerConfigurationOptions({el:this.$(t)},{criteriaValueName:e}),i=new o(s),this.subview(e,i))},_updateValueField:function(){},_getPickerConfigurationOptions:function(e,t={}){const{startDateFieldAriaLabel:i,endDateFieldAriaLabel:s}=this.getTemplateDataProps(),n={start:i,end:s};let o=null;return n[t.criteriaValueName]&&(o=n[t.criteriaValueName]),l.extend(e,{nativeMode:d.isMobile(),dateInputAttrs:{class:"datepicker-input "+this.inputClass,placeholder:c("oro.form.choose_date"),"aria-label":o},datePickerOptions:this.dateWidgetOptions,dropdownTemplate:this._getTemplate("dropdownTemplate"),backendFormat:m.getDateFormat(),dayFormats:this.dayFormats.slice()}),e},_getCriteriaHint:function(...e){let t,i="";const s=e.length>0?this._getDisplayValue(e[0]):this._getDisplayValue();if(s.value){const e=s.value.start,n=s.value.end;switch(s.type?s.type.toString():""){case this.typeValues.moreThan.toString():i+=[c("oro.filter.date.later_than"),e].join(" ");break;case this.typeValues.lessThan.toString():i+=[c("oro.filter.date.earlier_than"),n].join(" ");break;case this.typeValues.equal.toString():t=this._getChoiceOption(this.typeValues.equal),i+=[t.label,e].join(" ");break;case this.typeValues.notEqual.toString():t=this._getChoiceOption(this.typeValues.notEqual),i+=[t.label,n].join(" ");break;case this.typeValues.notBetween.toString():e&&n?(t=this._getChoiceOption(this.typeValues.notBetween),i+=[t.label,e,c("oro.filter.date.and"),n].join(" ")):e?i+=[c("oro.filter.date.before"),e].join(" "):n&&(i+=[c("oro.filter.date.after"),n].join(" "));break;default:e&&n?(t=this._getChoiceOption(this.typeValues.between),i+=[t.label,e,c("oro.filter.date.and"),n].join(" ")):e?i+=[c("oro.filter.date.from"),e].join(" "):n&&(i+=[c("oro.filter.date.to"),n].join(" "))}if(i)return i}return this.placeholder},_formatDisplayValue:function(e){return e.value&&e.value.start&&(e.value.start=this._toDisplayValue(e.value.start,e.part)),e.value&&e.value.end&&(e.value.end=this._toDisplayValue(e.value.end,e.part)),e},_formatRawValue:function(e){return e.value&&e.value.start&&(e.value.start=this._toRawValue(e.value.start,e.part)),e.value&&e.value.end&&(e.value.end=this._toRawValue(e.value.end,e.part)),e},_beforeApply:function(){this.autoUpdateRangeFilterType&&this._updateRangeFilter(this._readDOMValue(),!0)},_updateRangeFilter:function(e,t){const i=d.deepClone(e),s=parseInt(e.type);if(e.value&&(s===this.typeValues.between||s===this.typeValues.notBetween)){if(e.value.start&&e.value.end){if(!this.dateVariableHelper.isDateVariable(e.value.end)&&!this.dateVariableHelper.isDateVariable(e.value.start)&&m.getMomentForFrontendDateTime(e.value.end)<m.getMomentForFrontendDateTime(e.value.start)){const t=e.value.end;e.value.end=e.value.start,e.value.start=t}}else!0===this.autoUpdateBetweenWhenOneDate&&(e.value.start||e.value.end)&&(s===this.typeValues.between?e.type=e.value.end?this.typeValues.lessThan:this.typeValues.moreThan:s===this.typeValues.notBetween&&(e.value.end?(e.type=this.typeValues.moreThan,e.value.start=e.value.end,e.value.end=""):(e.type=this.typeValues.lessThan,e.value.end=e.value.start,e.value.start="")));d.isEqualsLoosely(e,i)||(this.value=d.deepClone(e),t&&this._writeDOMValue(e))}},_toDisplayValue:function(e,t){return this.dateVariableHelper.isDateVariable(e)?e=this.dateVariableHelper.formatDisplayValue(e):"value"===t&&this.dateValueHelper.isValid(e)?e=this.dateValueHelper.formatDisplayValue(e):m.isBackendDateValid(e)&&(e=m.formatDate(e)),e},_toRawValue:function(e,t){return this.dateVariableHelper.isDateVariable(e)?e=this.dateVariableHelper.formatRawValue(e):"value"===t&&this.dateValueHelper.isValid(e)?e=this.dateValueHelper.formatRawValue(e):m.isDateValid(e)&&(e=m.convertDateToBackendFormat(e)),e},isUpdatable:function(e,t){return!d.isEqualsLoosely(e,t)},_triggerUpdate:function(e,t){if(this.isUpdatable(e,t)){const e=this.subview("start"),t=this.subview("end");e&&e.updateFront&&e.updateFront(),t&&t.updateFront&&t.updateFront(),this.trigger("update")}},_writeDOMValue:function(e){this._setInputValue(this.criteriaValueSelectors.value.start,e.value.start),this._setInputValue(this.criteriaValueSelectors.value.end,e.value.end);const t=this.$(this.criteriaValueSelectors.date_type);return t.val()!==e.type&&t.val(e.type).trigger("change"),e.part&&this._setInputValue(this.criteriaValueSelectors.date_part,e.part),this},_readDOMValue:function(){return this.subview("start")&&this.subview("end")&&"function"==typeof this._getPickerConstructor().prototype.checkConsistency&&(this.subview("start").checkConsistency(document.activeElement),this.subview("end").checkConsistency(document.activeElement)),{type:this._getInputValue(this.criteriaValueSelectors.date_type),part:this.hasPartsElement?this._getInputValue(this.criteriaValueSelectors.date_part):"value",value:{start:this._getInputValue(this.criteriaValueSelectors.value.start),end:this._getInputValue(this.criteriaValueSelectors.value.end)}}},_getSelectedChoiceLabel:function(e,t){let i="";return l.isEmpty(this[e])||(i=l.find(this[e],(function(e){return String(e.value)===String(t.type)})).label),i},_getPartTooltip:function(e){return this.datePartTooltips[e]?c(this.datePartTooltips[e]):null},_updateTooltipVisibility:function(e){"value"===e?this.$(".field-condition-date-popover").removeClass("hide"):this.$(".field-condition-date-popover").addClass("hide")},_isDOMValueChanged:function(){const e=this._readDOMValue();return!l.isUndefined(e.value)&&!l.isUndefined(e.type)&&!l.isEqual(this.value,e)},getCriteriaValueFieldToFocus(){return this.subviewsByName.start.nativeMode?this.$(`${this.criteriaSelector} ${this.criteriaValueSelectors.value.start}`):this.$(`${this.criteriaSelector} .datepicker-input`).filter(":visible").first()},getTemplateDataProps(){return{...w.__super__.getTemplateDataProps.call(this),startDateFieldAriaLabel:c("oro.filter.date.start_field.aria_label",{label:this.label}),endDateFieldAriaLabel:c("oro.filter.date.end_field.aria_label",{label:this.label})}}});return w}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofilter/js/filter/datetime-filter.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/orolocale/js/moment-l10n.js"),r=i("./bundles/orotranslation/js/translator.js"),a=i("./bundles/orolocale/js/formatter/datetime.js"),l=i("./bundles/orofilter/js/app/views/datepicker/filter-datetimepicker-view.js").Z,d=i("./bundles/orofilter/js/app/views/datepicker/variable-datetimepicker-view.js"),c=i("./bundles/orofilter/js/filter/date-filter.js"),u=i("./bundles/oroui/js/tools.js"),h=i("./bundles/oroui/js/tools/keyboard-key-codes.js").Z;let p=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);p=n.extend({inputClass:"datetime-visual-element",timeInputAttrs:{class:"timepicker-input",placeholder:"oro.form.choose_time"}},p),p.timeInputAttrs.placeholder=r(p.timeInputAttrs.placeholder);const _=c.extend({inputClass:p.inputClass,criteriaValueSelectors:{type:"select",date_type:"select[name][name!=datetime_part]",date_part:"select[name=datetime_part]",value:{start:'input[name="start"]',end:'input[name="end"]'}},backendFormat:"YYYY-MM-DD HH:mm",events:{"hideTimepicker input":"_onHideTimepicker","showTimepicker input":"_onShowTimepicker"},constructor:function e(t){e.__super__.constructor.call(this,t)},_getPickerConstructor:function(){return u.isMobile()||!this.dateWidgetOptions.showDatevariables?l:d},_renderCriteria:function(){_.__super__._renderCriteria.call(this);const e=this.getValue();e&&this._updateTimeVisibility(e.part)},_onClickOutsideCriteria:function(e){this._justPickedTime?this._justPickedTime=!1:_.__super__._onClickOutsideCriteria.call(this,e)},_preventClickOutsideCriteria(){this._justPickedTime=!0},_onHideTimepicker(){this._preventClickOutsideCriteria(),this._preventCloseCriteria=!0},_onShowTimepicker(){this._preventCloseCriteria=!1},onKeyDownTimepickerInput(e){e.keyCode!==h.ESCAPE&&e.keyCode!==h.ENTER||(this._preventCloseCriteria=!this._preventCloseCriteria);const t=this.subviewsByName.start;e.keyCode===h.ESCAPE&&!t.nativeMode&&this._preventCloseCriteria&&e.stopPropagation()},_getPickerConfigurationOptions:function(e,t){_.__super__._getPickerConfigurationOptions.call(this,e,t);const{startTimeFieldAriaLabel:i,endTimeFieldAriaLabel:s}=this.getTemplateDataProps(),o={start:i,end:s};let r=null;return o[t.criteriaValueName]&&(r=o[t.criteriaValueName]),n.extend(e,{backendFormat:[a.getDateTimeFormat(),this.backendFormat],timezone:"UTC",timeInputAttrs:{"aria-label":r,...p.timeInputAttrs},timePickerOptions:{...this.timePickerOptions||{}}}),e},_toDisplayValue:function(e,t){let i;return this.dateVariableHelper.isDateVariable(e)?e=this.dateVariableHelper.formatDisplayValue(e):"value"===t&&this.dateValueHelper.isValid(e)?e=this.dateValueHelper.formatDisplayValue(e):a.isValueValid(e,this.backendFormat)&&(i=o(e,this.backendFormat,!0),e=i.format(a.getDateTimeFormat())),e},_toRawValue:function(e,t){let i;return this.dateVariableHelper.isDateVariable(e)?e=this.dateVariableHelper.formatRawValue(e):"value"===t&&this.dateValueHelper.isValid(e)?e=this.dateValueHelper.formatRawValue(e):a.isDateTimeValid(e)&&(i=o(e,a.getDateTimeFormat(),!0),e=i.format(this.backendFormat)),e},_triggerUpdate:function(e,t){this.isUpdatable(e,t)&&this._updateTimeVisibility(e.part),_.__super__._triggerUpdate.call(this,e,t)},_renderSubViews:function(){_.__super__._renderSubViews.call(this);const e=this._readDOMValue();this._updateDateTimePickerSubView("start",e),this._updateDateTimePickerSubView("end",e),this.$el.find(".timepicker-input").bindFirst(`keydown${this.eventNamespace()}`,this.onKeyDownTimepickerInput.bind(this))},_updateDateTimePickerSubView:function(e,t){const i=this.subview(e);i&&i.updateFront&&i.updateFront()},_updateTimeVisibility:function(e){"value"===e?this.$(".timepicker-input").removeClass("hide"):this.$(".timepicker-input").addClass("hide")},getTemplateDataProps(){return{..._.__super__.getTemplateDataProps.call(this),startTimeFieldAriaLabel:r("oro.filter.datetime.start_field.aria_label",{label:this.label}),endTimeFieldAriaLabel:r("oro.filter.datetime.end_field.aria_label",{label:this.label})}},dispose(){this.disposed||(this.$el.find(".timepicker-input").off(this.eventNamespace()),_.__super__.dispose.call(this))}});return _}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofilter/js/filter/dictionary-filter.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/dictionary-filter.html"),s=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/select-field.html"),n=i("./bundles/oroui/js/extend/jquery.js"),o=i("./bundles/fosjsrouting/js/router.js"),r=i("./bundles/oroui/js/extend/underscore.js"),a=i("./bundles/orotranslation/js/translator.js"),l=i("./bundles/orofrontend/default/js/app/views/choice-filter.js"),d=i("./bundles/oroui/js/tools.js");i("./bundles/oroui/js/extend/select2.js");const c=l.extend({elementSelector:".select-values-autocomplete",template:t,templateSelector:"#dictionary-filter-template",fieldTemplate:s,fieldTemplateSelector:"#select-field-template",maxCountForDropDownMode:10,criteriaValueSelectors:{type:'input[type="hidden"]:last',value:"input.select-values-autocomplete"},filterParams:null,class:null,select2ConfigData:null,isInitSelect2:!1,previousData:[],selectedData:{},dictionaryValueRoute:"oro_dictionary_value",dictionarySearchRoute:"oro_dictionary_search",constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.selectedData={},this.filterParams?this.dictionaryClass=this.filterParams.class.replace(/\\/g,"_"):this.dictionaryClass=this.class.replace(/\\/g,"_"),this.listenTo(this,"renderCriteriaLoadValues",this.renderCriteriaLoadValues),this.listenTo(this,"updateCriteriaLabels",this.updateCriteriaLabels),c.__super__.initialize.call(this,e)},_toggleSelect2Element:function(){const e=this.$(this.criteriaSelector).find(this.criteriaValueSelectors.type).val(),t=this.$el.find(this.elementSelector);this.isEmptyType(e)?(t.hide(),t.inputWidget("val","")):t.show()},_updateValueFieldVisibility:function(){return this._toggleSelect2Element(),c.__super__._updateValueFieldVisibility.call(this)},_handleEmptyFilter:function(){return this._toggleSelect2Element(),c.__super__._handleEmptyFilter.call(this)},reset:function(){c.__super__.reset.call(this);const e=this.$el.find(this.elementSelector),t=e.inputWidget("data");t&&(this.previousData=t),e.inputWidget("data",null)},resetFags(){this.popupCriteriaShowed=!1,this.selectDropdownOpened=!1,this._criteriaRenderd=!1,this._isRenderingInProgress=!1},render:function(){this.resetFags(),this.renderDeferred=n.Deferred(),this._wrap(""),""===this.$el.html()&&this._renderCriteria()},loadValuesById:function(e){const t=this;if(null===this.select2ConfigData){const i=t.$(t.elementSelector).parent();i.addClass("loading"),n.ajax({url:o.generate(t.dictionaryValueRoute,{dictionary:this.dictionaryClass}),data:{keys:this.isEmptyType(this.value.type)?[]:this.value.value},success:function(s){i.removeClass("loading"),t.trigger(e,s)}})}else{const i=this.select2ConfigData,s=this.value.value,n={results:r.filter(i,(function(e){const t=e.id.toString();return-1!==r.indexOf(s,t)}))};t.trigger(e,n)}},renderCriteriaLoadValues:function(e){this.updateLocalValues(e.results),this._writeDOMValue(this.value),this.applySelect2(),this._updateCriteriaHint(),this._updateDOMValue(),this._handleEmptyFilter(),this.renderDeferred.resolve(),this.trigger("update")},updateCriteriaLabels:function(e){this.updateLocalValues(e.results),this.$(this.elementSelector).inputWidget("data",this.getDataForSelect2()),this._updateCriteriaHint(),this.trigger("update")},updateLocalValues:function(e){const t=[];return r.each(e,(function(e){t.push(e.id),this.selectedData[e.id]=e}),this),this.value.value=t,this},_renderCriteria:function(){this.renderTemplate(),this.loadValuesById("renderCriteriaLoadValues")},renderTemplate:function(){const e=r.extend({},this.emptyValue,this.value);let t="";r.isEmpty(this.choices)||(t=r.find(this.choices,(function(t){return e.type===t.value})).label);const i=this._getParts(),s=n(this.template({parts:i,isEmpty:!1,showLabel:this.showLabel,label:this.label,selectedChoiceLabel:t,selectedChoice:e.type,choices:this.choices,name:this.name,renderMode:this.renderMode,...this.getTemplateDataProps()}));this._appendFilter(s)},applySelect2:function(){const e=this,t=this.getSelect2Config(),i=this.$el.find(this.elementSelector),s=this.getDataForSelect2();i.removeClass("hide"),i.attr("multiple","multiple"),i.inputWidget("create","select2",{initializeOptions:t}),e.isInitSelect2=!0,this.templateTheme&&i.on("change",(function(){e.applyValue()})),i.inputWidget("data",s),this._criteriaRenderd=!0,this._alignCriteria(),!1!==this.autoClose&&this._focusCriteriaValue()},getSelect2Config:function(){const e={multiple:!0,containerCssClass:"dictionary-filter",dropdownAutoWidth:!0,minimumInputLength:0,placeholder:a("Choose values")};return null===this.select2ConfigData?e.ajax={url:o.generate(this.dictionarySearchRoute,{dictionary:this.dictionaryClass}),dataType:"json",delay:250,type:"POST",data:function(e){return{q:e}},results:function(e){return{results:e.results}}}:(e.data={results:this.select2ConfigData},e.data.results.length>100&&(e.minimumInputLength=2)),""===this.templateTheme&&(e.width="off"),e},getDataForSelect2:function(){const e=[];return r.each(this.value.value,(function(t){const i=this.selectedData[t];i&&e.push({id:i.id,text:i.text})}),this),e},isEmptyValue:function(){if(this.isEmptyType(this.value.type))return!1;const e=this.getValue();return!e.value||0===e.value.length},_getParts:function(){const e=r.extend({},this.emptyValue,this.getValue()),t=this._getTemplate("fieldTemplate"),i=[],s=this._getSelectedChoiceLabel("choices",this.value);return""!==this.templateTheme&&i.push(t({name:this.name+"_part",choices:this.choices,selectedChoice:e.type,selectedChoiceLabel:s})),i},setValue:function(e){this.preloadSelectedData(e);const t=this.value;return this.value=d.deepClone(e),this.$(this.elementSelector).inputWidget("data",this.getDataForSelect2()),this._updateDOMValue(),this.valueIsLoaded(e.value)||this.isEmptyType(e.type)?this._onValueUpdated(this.value,t):this.loadValuesById("updateCriteriaLabels"),this},preloadSelectedData:function(e){if(!this.isInitSelect2||!e.value)return;const t=this.$(this.elementSelector).inputWidget("data");r.each(t,(function(e){"id"in e&&(this.selectedData[e.id]||(this.selectedData[e.id]=e))}),this)},_writeDOMValue:function(e){this._setInputValue(this.criteriaValueSelectors.type,e.type)},_readDOMValue:function(){let e;return e=this.isInitSelect2?this.$el.find(".select-values-autocomplete").inputWidget("val"):null,{type:this._getInputValue(this.criteriaValueSelectors.type),value:e}},_getSelectedChoiceLabel:function(e,t){let i="";if(!r.isEmpty(this[e])){const s=r.find(this[e],(function(e){return e.value===t.type}));s&&(i=s.label)}return i},_getCriteriaHint:function(){const e=this._getDisplayValue();let t=null;if(!r.isUndefined(e.type)){const i=e.type;if(t=this._getChoiceOption(i),this.isEmptyType(i))return t?t.label:this.placeholder}if(!e.value||0===e.value.length)return this.placeholder;if(this.valueIsLoaded(e.value)){const i=this,s=r.isObject(r.first(e.value))?r.map(e.value,r.property("text")):r.chain(e.value).map((function(e){const t=r.find(i.selectedData,(function(t){return t.id.toString()===e.toString()}));return t?t.text:t})).filter(r.negate(r.isUndefined)).value(),n=this.wrapHintValue?'"'+s+'"':s;return(t?t.label+" ":"")+n}return this.placeholder},_hideCriteria:function(){this.$el.find(this.elementSelector).inputWidget("close"),c.__super__._hideCriteria.call(this)},valueIsLoaded:function(e){if(e){let t=0;const i=this;return r.each(e,(function(e){i.selectedData&&i.selectedData[e]&&t++})),t===e.length}return!0},_applyValueAndHideCriteria:function(){if(!this.isInitSelect2)return this._hideCriteria();c.__super__._applyValueAndHideCriteria.call(this)},getCriteriaValueFieldToFocus(){const e=c.__super__.getCriteriaValueFieldToFocus.call(this);return e.data("select2")?e.data("select2").search:e}});return c}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/filter/empty-filter.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/jquery.js"),i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/oroui/js/tools.js"),i("./bundles/orofrontend/default/js/app/views/frontend-abstract-filter.js")],void 0===(n=function(e,t,i,s){"use strict";const n=s.extend({emptyOption:"filter_empty_option",notEmptyOption:"filter_not_empty_option",query:null,revertQuery:!1,updateSelector:".filter-update",updateSelectorEmptyClass:"filter-update-empty",caret:'<span class="caret" aria-hidden="true"></span>',constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){const i=t.pick(e||{},"caret");t.extend(this,i),n.__super__.initialize.call(this,e)},setValue:function(e){const t=this.value;return this.value=i.deepClone(e),this._updateDOMValue(),this._onValueUpdated(this.value,t),this},_onClickChoiceValue:function(t){e(t.currentTarget).parent().parent().find("li").each((function(){e(this).removeClass("active")})),e(t.currentTarget).parent().addClass("active");const i=e(t.currentTarget).parent().parent().parent();let s=e(t.currentTarget).html();s+=this.caret,i.find('[data-toggle="dropdown"]').html(s);const n=e(t.currentTarget).attr("data-value");this._onClickChoiceValueSetType(n),this._alignCriteria(),t.preventDefault()},_onClickChoiceValueSetType:function(t){const i=this.$(this.criteriaValueSelectors.type);i.each((function(){const i=e(this);return i.is(":not(select)")||i.is(":has(option[value="+t+"])")?(i.val(t),!0):void 0})),this.fixSelects(),i.trigger("change"),this._handleEmptyFilter(t),this.trigger("typeChange",this)},fixSelects:function(){this.$("select").each((function(){const t=e(this);if(t.val())return!0;t.val(t.find("option[selected]").val())}))},_onClickCriteriaSelector:function(e){e.stopPropagation(),e.preventDefault(),this.popupCriteriaShowed?this._hideCriteria():this._showCriteria(),this._handleEmptyFilter()},_handleEmptyFilter:function(){const e=this.$(this.criteriaSelector),t=e.find(this.criteriaValueSelectors.value),i=e.find(this.criteriaValueSelectors.type).val(),s=e.find(this.updateSelector),n=t.val();if(this.isEmptyType(i))return""!==n&&(this.query=n,this.revertQuery=!0),t.hide().val(""),void s.addClass(this.updateSelectorEmptyClass);""===n&&t.val(""),this.revertQuery&&(t.val(this.query),this.query=null,this.revertQuery=!1),s.removeClass(this.updateSelectorEmptyClass),t.show()},_updateDOMValue:function(){n.__super__._updateDOMValue.call(this),this._updateValueFieldVisibility()},_updateValueFieldVisibility:function(){const e=this.$(this.criteriaValueSelectors.type).val(),t=this.$(this.criteriaValueSelectors.value);this.isEmptyType(e)?t.hide():t.show()},isEmptyValue:function(){return!this.isEmptyType(this.value.type)&&(!t.has(this.emptyValue,"value")||!t.has(this.value,"value")||i.isEqualsLoosely(this.value.value,this.emptyValue.value))},isEmptyType:function(e){return t.contains([this.emptyOption,this.notEmptyOption],e)}});return n}.apply(t,s))||(e.exports=n)},"./bundles/orofilter/js/filter/multiselect-filter.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/multiselect-filter.html"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/oroui/js/tools.js"),o=i("./bundles/orofrontend/default/js/app/views/frontend-select-filter.js").extend({template:t,templateSelector:"#multiselect-filter-template",widgetOptions:{multiple:!0,classes:"select-filter-widget multiselect-filter-widget"},minimumDropdownWidth:120,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){s.isUndefined(this.emptyValue)&&(this.emptyValue={value:[""]}),o.__super__.initialize.call(this,e)},_onSelectChange:function(e){o.__super__._onSelectChange.call(this,e),this._setDropdownWidth()},_setDropdownWidth:function(){this.cachedMinimumWidth||(this.cachedMinimumWidth=Math.max(this.minimumDropdownWidth,this.selectWidget.getMinimumDropdownWidth())+24);const e=this.selectWidget.getWidget(),t=this.cachedMinimumWidth;e.width(t).css({minWidth:t,maxWidth:t})},setValue:function(e){const t=this._normalizeValue(n.deepClone(e));null!==e.value&&void 0!==e.value||!n.isEqualsLoosely(this.value,t)||(this._updateDOMValue(),this._onValueUpdated(t,this.value)),o.__super__.setValue.call(this,t)},_normalizeValue:function(e){if(null===e.value||void 0===e.value)return e.value=[""],e;if(this.isEmpty()){if(e.value.length>1){const t=e.value.indexOf("");-1!==t&&e.value.splice(t,1)}}else e.value&&-1===e.value.indexOf("")||(e.value=[""]);return e},_getCriteriaHint:function(...e){const t=e.length>0?this._getDisplayValue(e[0]):this._getDisplayValue(),i=this._getSelectedChoices(t,this.choices);return i.length>0?i.join(", "):this.placeholder},_formatRawValue(e){const t=o.__super__._formatRawValue.call(this,e);return this._normalizeValue(t)},_getSelectedChoices:function(e,t){return s.reduce(t,(function(t,i){return s.has(i,"choices")?t.concat(this._getSelectedChoices(e,i.choices)):(-1!==s.indexOf(e.value,i.value)&&t.push(i.label),t)}),[],this)},_isDOMValueChanged:function(){const e=this._readDOMValue();return!s.isUndefined(e.value)&&s.isArray(e.value)&&!s.isEqual(this.value,e)}});return o}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/filter/none-filter.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/filter-wrapper.html"),s=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/none-filter.html"),n=i("./bundles/oroui/js/extend/jquery.js"),o=i("./bundles/oroui/js/extend/underscore.js"),r=i("./bundles/orofrontend/default/js/app/views/frontend-abstract-filter.js").extend({wrappable:!0,wrapperTemplate:t,wrapperTemplateSelector:"#filter-wrapper-template",template:s,templateSelector:"#none-filter-template",criteriaHintSelector:".filter-criteria-hint",criteriaSelector:".filter-criteria",popupHint:"Choose a value first",events:{"click .filter-criteria-selector":"_onClickCriteriaSelector","click .filter-criteria .filter-criteria-hide":"_onClickCloseCriteria","click .disable-filter":"_onClickDisableFilter"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){const t=o.pick(e||{},"popupHint");o.extend(this,t),this.label="None",r.__super__.initialize.call(this,e)},ensurePopupCriteriaClosed:function(){this.popupCriteriaShowed&&this._hideCriteria()},_onClickCriteriaSelector:function(e){e.stopPropagation(),this.popupCriteriaShowed?this._hideCriteria():this._showCriteria()},_onClickCloseCriteria:function(){this._hideCriteria(),this._updateDOMValue()},_onClickDisableFilter:function(e){e.preventDefault(),this.disable()},_onClickOutsideCriteria:function(e){const t=this.$(this.criteriaSelector);t.get(0)===e.target||t.has(e.target).length||this._hideCriteria()},render:function(){const e=n(this.template({popupHint:this._getPopupHint(),renderMode:this.renderMode}));return this._wrap(e),this.initiallyOpened&&this._showCriteria(),this},_wrap:function(e){this.$el.append(e)},_showCriteria:function(){this.$(this.criteriaSelector).show(),this._setButtonPressed(this.$(this.criteriaSelector),!0),this.trigger("showCriteria",this),setTimeout((()=>{this.popupCriteriaShowed=!0}),100)},_hideCriteria:function(){this.$(this.criteriaSelector).hide(),this._setButtonPressed(this.$(this.criteriaSelector),!1),this.trigger("hideCriteria",this),setTimeout((()=>{this.disposed||(this.popupCriteriaShowed=!1)}),100)},_writeDOMValue:function(e){return this},_readDOMValue:function(){return{}},_getPopupHint:function(){return this.popupHint,this.popupHint},_getCriteriaHint:function(){return this.criteriaHint?this.criteriaHint:this.placeholder}});return r}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/filter/number-filter.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/extend/jquery.js"),n=i("./bundles/orofrontend/default/js/app/views/choice-filter.js"),o=i("./bundles/orofilter/js/formatter/number-formatter.js"),r=i("./bundles/orotranslation/js/translator.js"),a=i("./bundles/oroui/js/mediator.js"),l=n.extend({wrapHintValue:!1,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){t.defaults(this,{formatterOptions:{},arraySeparator:",",arrayOperators:[],dataType:"data_integer",limitDecimals:!1,min:null,max:null}),this._filterArrayChoices(),this.formatter=new o(this.formatterOptions),l.__super__.initialize.call(this,e)},dispose:function(){this.disposed||(delete this.formatter,l.__super__.dispose.call(this))},_filterArrayChoices:function(){this.choices=t.filter(this.choices,(e=>"data_integer"===this.dataType||!this._isArrayType(e.data)))},_formatRawValue:function(e){const i=t.clone(e);return i.value=this._toRawValue(e.value),i},_formatDisplayValue:function(e){const i=t.clone(e);return i.value=this._toDisplayValue(e.value),i},_toRawValue:function(e){return""===e&&(e=void 0),void 0!==e&&this._isArrayTypeSelected()?this._formatArray(e):(void 0!==e&&(e=this.formatter.toRaw(e)),e)},_toDisplayValue:function(e){return e&&this._isArrayTypeSelected()?this._formatArray(e):this.formatter.fromRaw(e)},_formatArray:function(e){return t.filter(t.map(e.toString().split(this.arraySeparator),(function(e){return parseFloat(e)})),(function(e){return!isNaN(e)})).join(this.arraySeparator)},_isArrayTypeSelected:function(){return this._isArrayType(this._readDOMValue().type)},_isArrayType:function(e){return t.contains(this.arrayOperators,parseInt(e)||0)},_writeDOMValue:function(e){return this._initInputWidget(),l.__super__._writeDOMValue.call(this,e)},_isValid:function(){const e=this.formatter.toRaw(this._readDOMValue().value);return!(void 0!==e&&!this._checkNumberRules(e))&&(t.isNumber(this.min)&&this.min>e?(this._showMinWarning(),!1):t.isNumber(this.max)&&this.max<e?(this._showMaxWarning(),!1):l.__super__._isValid.call(this))},_checkNumberRules:function(e){if(t.isUndefined(e))return!0;let i=!0;return t.isNaN(e)&&(this._showNumberWarning(),i=!1),i},_showNumberWarning:function(){a.execute("showFlashMessage","warning",r("oro.form.number.nan"))},_initInputWidget:function(){t.each(this.$el.find('input[type="number"]'),(function(e){this.formatter.decimals&&s(e).attr("data-precision",this.formatter.decimals),s(e).attr("data-limit-decimals",this.limitDecimals)}),this),this.$el.inputWidget("seekAndCreate")},_showMinWarning:function(){a.execute("showFlashMessage","warning",r("The entered value must be bigger or equal to {{ min }}",{min:this.min}))},_showMaxWarning:function(){a.execute("showFlashMessage","warning",r("The entered value must be less or equal to {{ max }}",{max:this.max}))}});return l}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/filter/number-range-filter.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/number-range-filter.html"),s=i("./bundles/oroui/js/extend/jquery.js"),n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/orotranslation/js/translator.js"),r=i("./bundles/oroui/js/tools.js"),a=i("./bundles/orofilter/js/filter/number-filter.js").extend({template:t,templateSelector:"#number-range-filter-template",criteriaValueSelectors:{value_end:'input[name="value_end"]'},typeValues:{between:7,notBetween:8},fallbackTypeValues:{moreThan:2,lessThan:6},autoUpdateRangeFilterType:!0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.emptyValue=n.defaults(this.emptyValue||{},{type:n.isEmpty(this.choices)?"":n.first(this.choices).value,value:"",value_end:""}),n.defaults(this.criteriaValueSelectors,a.__super__.criteriaValueSelectors),a.__super__.initialize.call(this,e)},isEmptyValue:function(){return this.isApplicable(this.value.type)?!n.has(this.value,"value")&&!n.has(this.value,"value_end")||this.emptyValue.value===this.value.value&&this.emptyValue.value_end===this.value.value_end:a.__super__.isEmptyValue.call(this)},_applyValueAndHideCriteria:function(){this._beforeApply(),a.__super__._applyValueAndHideCriteria.call(this)},_updateValueField:function(){a.__super__._updateValueField.call(this);const e=this.$(this.criteriaValueSelectors.type).val(),t=this.$(".filter-separator, .filter-end"),{inputFieldAriaLabel:i,rangeStartFieldAriaLabel:s}=this.getTemplateDataProps();this.isApplicable(e)?(this.$(this.criteriaValueSelectors.value).attr("aria-label",s),t.show()):(this.$(this.criteriaValueSelectors.value).attr("aria-label",i),t.hide(),this.value.value_end=this.emptyValue.value_end,this._setInputValue(this.criteriaValueSelectors.value_end,this.value.value_end))},isApplicable:function(e){return n.has(n.invert(this.typeValues),e)},getRangeHint:function(e,t,i,s){let n="",r=this._getChoiceOption(e);return t&&i?(r=this._getChoiceOption(e),n+=[r.label,t,o("and"),i].join(" ")):s&&t||!s&&i?n+=[o("oro.filter.number_range.greater_than"),t||i].join(" "):(s&&i||!s&&t)&&(n+=[o("oro.filter.number_range.less_than"),i||t].join(" ")),n},_getCriteriaHint:function(...e){if(this.isEmptyValue())return this.placeholder;let t="";const i=e.length>0?this._getDisplayValue(e[0]):this._getDisplayValue();if(i.value||i.value_end)switch(i.type?i.type.toString():""){case this.typeValues.between.toString():t=this.getRangeHint(this.typeValues.between,i.value,i.value_end,!0);break;case this.typeValues.notBetween.toString():t=this.getRangeHint(this.typeValues.notBetween,i.value,i.value_end,!1)}return t||(t=a.__super__._getCriteriaHint.apply(this,e)),t||this.placeholder},_beforeApply:function(){this.autoUpdateRangeFilterType&&this._updateRangeFilter(this._readDOMValue())},_updateRangeFilter:function(e){e=this._formatRawValue(e);const t=r.deepClone(e);e=this.swapValues(e),r.isEqualsLoosely(e,t)||this.setValue(e)},_writeDOMValue:function(e){a.__super__._writeDOMValue.call(this,e),this._setInputValue(this.criteriaValueSelectors.value_end,e.value_end);const t=this.$(this.criteriaValueSelectors.type);return t.length&&e.type!==t.val()&&(this._setInputValue(this.criteriaValueSelectors.type,e.type),this._updateTypeDropdown(e.type)),this},_updateTypeDropdown:function(e){const t=this.$(".dropdown-menu:eq(0) a").filter((function(){return s(this).data("value")===e}));t.parent().parent().find("li").each((function(){s(this).removeClass("active")})),t.parent().addClass("active");const i=t.parent().parent().parent();let n=t.html();n+=this.caret,i.find('[data-toggle="dropdown"]').html(n)},_readDOMValue:function(){const e=a.__super__._readDOMValue.call(this);return e.value_end=this._getInputValue(this.criteriaValueSelectors.value_end),e},swapValues(e){if(!this.isApplicable(e.type))return e;if(e.value&&e.value_end){if(e.value_end<e.value){const t=e.value_end;e.value_end=e.value,e.value=t}}else if(e.value||e.value_end){const t=parseInt(e.type);e.value_end?(e.type=t===this.typeValues.between?this.fallbackTypeValues.lessThan:this.fallbackTypeValues.moreThan,e.value=e.value_end,e.value_end=""):e.type=t===this.typeValues.between?this.fallbackTypeValues.moreThan:this.fallbackTypeValues.lessThan}return e},_formatRawValue:function(e){const t=a.__super__._formatRawValue.call(this,e);return t.value_end=this._toRawValue(e.value_end),t},_formatDisplayValue:function(e){const t=a.__super__._formatDisplayValue.call(this,e);return t.value_end=this._toDisplayValue(e.value_end),t},_isValid:function(){const e=this.formatter.toRaw(this._readDOMValue().value_end);return!(void 0!==e&&!this._checkNumberRules(e))&&a.__super__._isValid.call(this)},getTemplateDataProps(){return{...a.__super__.getTemplateDataProps.call(this),rangeStartFieldAriaLabel:o("oro.filter.range_fields.start_field.aria_label",{label:this.label}),rangeEndFieldAriaLabel:o("oro.filter.range_fields.end_field.aria_label",{label:this.label})}}});return a}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/filter/select-filter.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/select-filter.html"),o=i("./bundles/oroui/js/extend/jquery.js"),r=i("./bundles/oroui/js/extend/underscore.js"),a=i("./bundles/orotranslation/js/translator.js"),l=i("./bundles/orofrontend/default/js/app/views/frontend-abstract-filter.js"),d=i("./bundles/orofilter/js/multiselect-decorator.js"),c=i("./bundles/oroui/js/app/views/loading-mask-view.js");let u=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);u=r.extend({populateDefault:!0},u);const h=l.extend({MultiselectDecorator:d,template:n,templateSelector:"#select-filter-template",populateDefault:u.populateDefault,containerSelector:".filter-select",disableSelector:".disable-filter",buttonSelector:".filter-criteria-selector",criteriaSelector:".filter-criteria",inputSelector:"select",selectWidget:null,cachedMinimumWidth:null,widgetOptions:{multiple:!1,classes:"select-filter-widget"},dropdownContainer:null,selectDropdownOpened:!1,contextSearch:!0,closeAfterChose:!0,loadedMetadata:!0,noWrap:!0,events:{"keydown select":"_preventEnterProcessing","keydown .filter-criteria-selector":"_triggerEventOnCriteriaToggle","focusin .filter-criteria-selector":"_triggerEventOnCriteriaToggle","focusout .filter-criteria-selector":"_triggerEventOnCriteriaToggle","click .filter-select":"_onClickFilterArea","click .disable-filter":"_onClickDisableFilter","change select":"_onSelectChange",multiselectbeforeclose:function(){return!1!==this.autoClose}},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){const t=r.pick(e,"choices","dropdownContainer","widgetOptions");o.extend(!0,this,t),this._setChoices(this.choices),r.isUndefined(this.emptyValue)&&(this.emptyValue={value:""}),h.__super__.initialize.call(this,e),this.lazy&&(this.loadedMetadata=!1,this.loader((e=>{this._setChoices(e.choices),this.render(),this.subview("loading")&&this.subview("loading").hide()})))},dispose:function(){this.disposed||(delete this.choices,this._disposeSelectWidget(),h.__super__.dispose.call(this))},getTemplateData:function(){const e=this.choices.slice(0);return this.populateDefault&&e.unshift({value:"",label:this.placeholder||this.populateDefault}),{label:this.labelPrefix+this.label,showLabel:this.showLabel,options:e,selected:r.extend({},this.emptyValue,this.value),isEmpty:this.isEmpty(),renderMode:this.renderMode,criteriaClass:this.getCriteriaExtraClass(),...this.getTemplateDataProps()}},resetFlags(){this.selectDropdownOpened=!1},render:function(){let e=!1;if(this.isRendered()&&this.selectWidget){e=this.selectWidget.multiselect("isOpen");const t=o(this.template(this.getTemplateData())).find("select").html();this.$("select").html(t),this.selectWidget.multiselect("refresh")}else this.resetFlags(),h.__super__.render.call(this),this._initializeSelectWidget();return this.loadedMetadata||this.subview("loading")||(this.subview("loading",new c({container:this.$el})),this.subview("loading").show()),(this.initiallyOpened||e)&&this._showCriteria(),this.visible||this.hide(),this},setDropdownContainer:function(e){this.dropdownContainer=o(e)},hide:function(){return this.selectWidget&&this.selectWidget.multiselect("close"),h.__super__.hide.call(this)},setValue:function(e){return r.isNumber(e.value)&&!r.isNaN(e.value)&&(e.value=e.value.toString()),h.__super__.setValue.call(this,e)},_disposeSelectWidget(){this.selectWidget&&(this.$(this.inputSelector).off(`remove${this.eventNamespace()}`),this.selectWidget.dispose(),delete this.selectWidget)},_initializeSelectWidget:function(){this._disposeSelectWidget();const e=this._getSelectWidgetPosition(),{selectOptionsListAriaLabel:t}=this.getTemplateDataProps();this.selectDropdownOpened=!1,this.$(this.inputSelector).on(`remove${this.eventNamespace()}`,this._disposeSelectWidget.bind(this)),this.selectWidget=new this.MultiselectDecorator({element:this.$(this.inputSelector),parameters:r.extend({noneSelectedText:this.placeholder,showCheckAll:!1,showUncheckAll:!1,outerTrigger:this.$(this.buttonSelector),selectedText:(e,t,i)=>this._getSelectedText(i),position:e,beforeopen:()=>{this.selectWidget.onBeforeOpenDropdown()},open:()=>{this.selectWidget.onOpenDropdown(),this._setDropdownWidth(),this._setButtonPressed(this.$(this.containerSelector),!0),this.trigger("showCriteria",this),this._clearChoicesStyle(),this.selectDropdownOpened=!0,this.selectWidget.updateDropdownPosition(o.extend({},e,{within:this._findDropdownFitContainer(this.dropdownContainer)||this.dropdownContainer}))},refresh:()=>{this.selectWidget.onRefresh()},beforeclose:()=>this.closeAfterChose,close:()=>{this._setButtonPressed(this.$(this.containerSelector),!1),this.trigger("hideCriteria",this),this.disposed||(this.selectDropdownOpened=!1)},appendTo:this._appendToContainer(),refreshNotOpened:""!==this.templateTheme,listAriaLabel:t,preventTabOutOfContainer:this.isDropdownRenderMode()},this.widgetOptions),contextSearch:this.contextSearch,filterLabel:this.label}),this.selectWidget.multiselect("getButton").addClass("select-widget-trigger"),this.selectWidget.setViewDesign(this),this.selectWidget.getWidget().on("keyup",(e=>{27===e.keyCode&&!1!==this.autoClose&&this._onClickFilterArea(e)}))},_showCriteria(){this.selectWidget&&this.selectWidget.multiselect("open")},_hideCriteria(){this.selectWidget&&this.selectWidget.multiselect("close")},_getSelectWidgetPosition:function(){return{my:(r.isRTL()?"right":"left")+" top+8",at:(r.isRTL()?"right":"left")+" bottom",of:this.$el,collision:r.isMobile()?"none":"fit none",within:this._findDropdownFitContainer(this.dropdownContainer)||this.dropdownContainer}},_appendToContainer:function(){return this.$el},_clearChoicesStyle:function(){const e=this.selectWidget.getWidget().find("label");e.removeClass("ui-state-hover"),r.isEmpty(this.value.value)&&e.removeClass("ui-state-active")},_getSelectedText:function(e){if(r.isEmpty(e))return this.placeholder;const t=[];return r.each(e,(function(e){const i=e.getAttribute("title");i&&t.push(i)})),t.join(", ")},_getCriteriaHint:function(...e){const t=e.length>0?this._getDisplayValue(e[0]):this._getDisplayValue(),i=r.find(this.choices,(function(e){return e.value===t.value}));return r.isUndefined(i)?this.placeholder:i.label},_setDropdownWidth:function(){this.cachedMinimumWidth||(this.cachedMinimumWidth=this.selectWidget.getMinimumDropdownWidth()+24);const e=this.selectWidget.getWidget(),t=this.$(this.containerSelector).width(),i=Math.max(t+24,this.cachedMinimumWidth);e.width(i).css("min-width",i+"px")},_triggerEventOnCriteriaToggle(e){this.trigger(`${e.type}OnToggle`,e,this)},focusCriteriaToggler(){this.getCriteriaSelector().trigger("focus")},_onClickFilterArea:function(e){this.selectDropdownOpened?this.selectWidget.multiselect("close"):this.selectWidget.multiselect("open"),e.stopPropagation()},_onSelectChange:function(){this._onValueChanged(),this.applyValue(),this.selectWidget.updateDropdownPosition()},_onClickDisableFilter:function(e){e.preventDefault(),this.disable()},_onValueUpdated:function(e,t){h.__super__._onValueUpdated.call(this,e,t),this.selectWidget&&this.selectWidget.multiselect("refresh")},_writeDOMValue:function(e){return this._setInputValue(this.inputSelector,e.value),this},_readDOMValue:function(){return{value:this._getInputValue(this.inputSelector)}},_setChoices:function(e){e=e||[],this.choices=r.map(e,(function(e,t){return r.isString(e)?{value:t,label:e}:e}))},_isDOMValueChanged:function(){const e=this._readDOMValue();return!r.isUndefined(e.value)&&!r.isNull(e.value)&&!r.isEqual(this.value,e)},getCriteriaSelector(){return this.$(".filter-criteria-selector")},getCriteria(){return this.$(this.criteriaSelector)},getTemplateDataProps(){return{...h.__super__.getTemplateDataProps.call(this),selectOptionsListAriaLabel:a("oro.filter.select.options_list.aria_label",{label:this.label})}}});return h}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofilter/js/filter/text-filter.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/filter-wrapper.html"),o=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/text-filter.html"),r=i("./bundles/oroui/js/extend/jquery.js"),a=i("./bundles/oroui/js/extend/underscore.js"),l=i("./bundles/orotranslation/js/translator.js"),d=i("./bundles/orofilter/js/filter/empty-filter.js"),c=i("./bundles/oroui/js/tools.js"),u=i("./bundles/oroui/js/mediator.js"),h=i("./bundles/oroui/js/tools/manage-focus.js").Z,p=i("./bundles/oroui/js/tools/keyboard-key-codes.js").Z;let _=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);_=a.extend({notAlignCriteria:c.isMobile()},_),i("../node_modules/jquery-ui/ui/tabbable.js");const g=d.extend({wrappable:!0,notAlignCriteria:_.notAlignCriteria,wrapperTemplate:n,wrapperTemplateSelector:"#filter-wrapper-template",template:o,templateSelector:"#text-filter-template",criteriaHintSelector:".filter-criteria-hint",criteriaSelector:".filter-criteria",criteriaValueSelectors:{value:'input[name="value"]',nested:{end:"input"}},events:{"keydown input:not(.select2-focusser)":"_onReadCriteriaInputKey","click .filter-update":"_onClickUpdateCriteria","keydown .filter-update":"_onKeydownUpdateCriteria","keydown .filter-criteria-selector":"_triggerEventOnCriteriaToggle","focusin .filter-criteria-selector":"_triggerEventOnCriteriaToggle","focusout .filter-criteria-selector":"_triggerEventOnCriteriaToggle","keydown .filter-criteria":"onKeyDownCriteria","click .filter-criteria-selector":"_onClickCriteriaSelector","click .filter-criteria .filter-criteria-hide":"_onClickCloseCriteria","click .disable-filter":"_onClickDisableFilter","change input":"_onValueChanged"},listen:{"layout:reposition mediator":"_onLayoutReposition"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){a.isUndefined(this.emptyValue)&&(this.emptyValue={value:""}),g.__super__.initialize.call(this,e)},ensurePopupCriteriaClosed:function(){this.popupCriteriaShowed&&this._applyValueAndHideCriteria()},_onReadCriteriaInputKey:function(e){this._onValueChanged(),13===e.which&&(e.preventDefault(),this._isValid()&&this._applyValueAndHideCriteria())},_onClickUpdateCriteria:function(e){this._isValid()?(this.trigger("updateCriteriaClick",this),this._applyValueAndHideCriteria()):e.stopImmediatePropagation()},_onKeydownUpdateCriteria(e){e.keyCode!==p.ENTER&&e.keyCode!==p.SPACE||this._onClickUpdateCriteria(e)},_isValid:function(){return void 0!==this.min_length&&this._readDOMValue().value.length<this.min_length?(this._showMinLengthWarning(),!1):!(void 0!==this.max_length&&this._readDOMValue().value.length>this.max_length&&(this._showMaxLengthWarning(),1))},_isDOMValueChanged:function(){const e=this._readDOMValue();return!a.isUndefined(e.value)&&!a.isNull(e.value)&&!a.isEqual(this.value,e)},_showMinLengthWarning:function(){u.execute("showFlashMessage","warning",l("oro.filter.warning.min_length",{min_length:this.min_length}))},_showMaxLengthWarning:function(){u.execute("showFlashMessage","warning",l("oro.filter.warning.max_length",{max_length:this.max_length}))},_onClickCloseCriteria:function(){this._hideCriteria(),this._updateDOMValue()},_onClickDisableFilter:function(e){e.preventDefault(),this.disable()},_onClickOutsideCriteria:function(e){const t=this.$(this.criteriaSelector);t.get(0)===e.target||t.has(e.target).length||this._applyValueAndHideCriteria()},_onLayoutReposition:function(){this.popupCriteriaShowed&&this._alignCriteria()},_applyValueAndHideCriteria:function(){!1!==this.autoClose&&this._hideCriteria(),this._isValid()&&this.applyValue()},resetFlags(){this.popupCriteriaShowed=!1},render:function(){this.resetFlags();const e=r(this.template({renderMode:this.renderMode}));return this._wrap(e),this},_wrap:function(e){this._appendFilter(e)},_appendFilter:function(e){this.$el.append(e)},_showCriteria:function(){r(document).trigger("clearMenus"),this.$(this.criteriaSelector).removeClass("criteria-hidden").addClass("criteria-visible").attr("tabindex",-1),this._alignCriteria(),this._setButtonPressed(this.$(this.criteriaSelector),!0),!1!==this.autoClose&&this._focusCriteriaValue(),this.trigger("showCriteria",this),setTimeout((()=>{this.popupCriteriaShowed=!0}),100)},_alignCriteria:function(){if(this.notAlignCriteria)return;const e=this.$el.closest(".filter-box");if(!e.length)return;const t=this.$(this.criteriaSelector);t.css("margin-inline-start","auto");const i=t.get(0).getBoundingClientRect(),s=i[a.isRTL()?"left":"right"],n=e.get(0).getBoundingClientRect();let o=s-n[a.isRTL()?"left":"right"];!a.isRTL()&&o>0&&(o-=Math.max(0,n.left-(i.left-o)),t.css("margin-inline-start",-o)),a.isRTL()&&o<0&&t.css("margin-inline-start",o)},_hideCriteria:function(){this.$(this.criteriaSelector).removeClass("criteria-visible").addClass("criteria-hidden").removeAttr("tabindex"),this._setButtonPressed(this.$(this.criteriaSelector),!1),this.trigger("hideCriteria",this),setTimeout((()=>{this.disposed||(this.popupCriteriaShowed=!1)}),100)},_writeDOMValue:function(e){return this._setInputValue(this.criteriaValueSelectors.value,e.value),this},_readDOMValue:function(){return{value:this._getInputValue(this.criteriaValueSelectors.value)}},_getCriteriaHint:function(...e){const t=e.length>0?this._getDisplayValue(e[0]):this._getDisplayValue();return t.value?'"'+t.value+'"':this.placeholder},onKeyDownCriteria(e){e.keyCode!==p.ENTER||this.getCriteria().is(":visible")?e.keyCode===p.ENTER&&this.$(this.criteriaSelector).is(":animated")?this.$(this.criteriaSelector).done((()=>{!this.getCriteria().is(":visible")&&document.activeElement.isSameNode(e.target)&&this.focusCriteriaToggler()})):this.isDropdownRenderMode()&&h.preventTabOutOfContainer(e,e.currentTarget):this.focusCriteriaToggler()},_triggerEventOnCriteriaToggle(e){this.trigger(`${e.type}OnToggle`,e,this)},_focusCriteriaValue(){this.getCriteriaValueFieldToFocus().focus().select()},getCriteriaValueFieldToFocus(){return void 0===this.criteriaValueSelectors?r():"string"==typeof this.criteriaValueSelectors.value?this.$(`${this.criteriaSelector} ${this.criteriaValueSelectors.value}`):this.$(`${this.criteriaSelector} ${this.criteriaValueSelectors.value.start}`)},getCriteriaSelector(){return this.$(".filter-criteria-selector")},getCriteria(){return this.$(this.criteriaSelector)},focusCriteriaToggler(){this.getCriteriaSelector().trigger("focus")}});return g}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofilter/js/filters-manager.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/filters-container.html"),o=i("./bundles/oroui/js/extend/jquery.js"),r=i("./bundles/oroui/js/extend/underscore.js"),a=i("./bundles/orotranslation/js/translator.js"),l=i("./bundles/oroui/js/mediator.js"),d=i("./bundles/oroui/js/tools.js"),c=i("./bundles/oroui/js/app/views/base/view.js"),u=i("./bundles/orofilter/js/multiselect-decorator.js"),h=i("./bundles/orofilter/js/datafilter-wrapper.js"),p=i("./bundles/orofilter/js/app/views/filters-state-view.js"),_=i("./bundles/oroui/js/persistent-storage.js"),g=i("./bundles/orofilter/js/app/views/filter-dialog-widget.js"),m=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id),f=c.extend({filters:null,template:n,viewMode:NaN,filterSelector:"[data-action=add-filter-select]",renderMode:"dropdown-mode",addButtonHint:a("oro_datagrid.label_add_filter"),multiselectResetButtonLabel:a("oro_datagrid.label_reset_button"),filterDialogTitle:a("oro.filter.dialog.filter_results"),selectWidget:null,MultiselectDecorator:u,multiselectParameters:{},buttonSelector:".ui-multiselect.filter-list",dropdownContainer:"body",outerHintContainer:void 0,autoClose:!0,storageKey:null,enableMultiselectWidget:!1,events:{"change [data-action=add-filter-select]":"_onChangeFilterSelect",'click .reset-filter-button, [data-role="reset-all-filters"]':"_onReset",'click a[data-name="filters-dropdown"]':"_onDropdownToggle",'click [data-role="reset-filters"]':"_onResetFiltersSelection"},listen:{"filters:update mediator":"_onChangeFilterSelect","filters:reset mediator":"_onReset"},noWrap:!0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){r.extend(this,r.pick(e,"addButtonHint","multiselectResetButtonLabel","stateViewElement","template","renderMode","autoClose","outerHintContainer","enableMultiselectWidget","multiselectParameters","filterContainer")),this.template=this.getTemplateFunction(),this.filters=r.extend({},e.filters),this.storageKey=e.filtersStateStorageKey||m.filtersStateStorageKey||"filters-state",e.forcedViewMode?this.viewMode=e.forcedViewMode:(this.viewMode=_.getItem(this.storageKey),null===this.viewMode&&(this.viewMode=e.defaultFiltersViewMode||f.STATE_VIEW_MODE));const t={update:this._onFilterUpdated,change:this._onFilterChanged,disable:this._onFilterDisabled,showCriteria:this._onFilterShowCriteria};if(d.isMobile()){const e="click."+this.cid+" shown.bs.dropdown."+this.cid;t.updateCriteriaClick=this._onUpdateCriteriaClick,o("body").on(e,this._onOutsideActionEvent.bind(this))}if(r.each(this.filters,(function(e){e.wrappable&&Object.assign(e,h),!1===this.autoClose&&Object.assign(e,{autoClose:this.autoClose}),this.listenTo(e,t),e.trigger("total-records-count-updated",this.collection.state.totalRecords)}),this),this.isFiltersStateViewNeeded(e)){const t=new p({el:e.filtersStateElement,filters:e.filters,useAnimationOnInit:e.useFiltersStateAnimationOnInit});this.subview("filters-state",t),this.listenTo(t,"clicked",(function(){this.setViewMode(f.MANAGE_VIEW_MODE);const e=Object.values(this.filters).find((e=>e.visible&&e.renderable&&"-1"!==e.getCriteriaSelector().attr("tabindex")));e&&o.contains(t.el,document.activeElement)&&e.getCriteriaSelector().trigger("focus")}))}f.__super__.initialize.call(this,e)},hasFilters:function(){return!r.isEmpty(this.filters)},delegateListeners:function(){return r.isEmpty(this.filters)||this.listenTo(l,"datagrid:metadata-loaded",this.updateFilters),f.__super__.delegateListeners.call(this)},updateFilters:function(e){r.each(e.metadata.filters,(function(e){const t=this.filters[e.name];t&&(t.setRenderMode(this.renderMode),t.trigger("total-records-count-updated",this.collection.state.totalRecords),t.trigger("metadata-loaded",e))}),this),this.checkFiltersVisibility()},checkFiltersVisibility:function(){r.each(this.filters,(e=>{e.visible&&e.renderable?this._renderFilter(e).show():e.visible||e.hide()})),this.checkFiltersSelectVisibility()},checkFiltersSelectVisibility:function(){const e=this.$(this.filterSelector);e.length&&(r.each(this.filters,(t=>{const i=e.find(`option[value="${t.name}"]`);t.visible&&i.hasClass("hidden")?i.removeClass("hidden").removeAttr("disabled"):t.visible||i.hasClass("hidden")||i.addClass("hidden").attr("disabled",!0)})),this._refreshSelectWidget())},isFiltersStateViewNeeded:function(e){return"filtersStateElement"in e},dispose:function(){this.disposed||(o("body").off("."+this.cid),r.each(this.filters,(function(e){e.dispose()})),delete this.filters,this._disposeSelectWidget(),f.__super__.dispose.call(this))},_onFilterUpdated:function(e){this._resetHintContainer(),this.trigger("updateFilter",e),this._publishCountSelectedFilters()},_onFilterChanged:function(){this._publishCountSelectedFilters(),this._publishCountChangedFilters()},_onFilterDisabled:function(e){this.trigger("disableFilter",e),this.disableFilter(e),this.trigger("afterDisableFilter",e),this._publishCountSelectedFilters(),this._publishCountChangedFilters()},_onFilterShowCriteria:function(e){this.autoClose&&r.each(this.filters,(function(t){t!==e&&r.result(t,"ensurePopupCriteriaClosed")})),this._publishCountSelectedFilters()},getValues:function(){const e={};return r.each(this.filters,(function(t){t.renderable&&(e[t.name]=t.getValue())}),this),e},setValues:function(e){r.each(e,(function(e,t){r.has(this.filters,t)&&this.filters[t].setValue(e)}),this)},_onChangeFilterSelect:function(e){this.trigger("updateList",this),this._processFilterStatus(e),this.trigger("afterUpdateList",this)},enableFilter:function(e){return this.enableFilters([e])},disableFilter:function(e){return this.disableFilters([e])},enableFilters:function(e){if(r.isEmpty(e))return this;const t=[];if(r.each(e,(function(e){this._renderFilter(e),e.visible&&e.enable(),t.push('option[value="'+e.name+'"]:not(:selected)')}),this),!this.enableMultiselectWidget)return;const i=this.$(this.filterSelector).find(t.join(","));return i.length&&i.prop("selected",!0),t.length&&this._refreshSelectWidget(),this},disableFilters:function(e){if(r.isEmpty(e))return this;const t=[];if(r.each(e,(function(e){e.disable(),t.push('option[value="'+e.name+'"]:selected')}),this),!this.enableMultiselectWidget)return;const i=this.$(this.filterSelector).find(t.join(","));return i.length&&i.prop("selected",!1),t.length&&this.selectWidget.multiselect("refresh"),this},_renderFilter:function(e){if(!e.isRendered()){const t=e.$el;e.setRenderMode(this.renderMode),e.render(),t.replaceWith(e.$el),e.rendered(),e.visible||e.hide()}return e},getTemplateData:function(){return{filters:this.filters,renderMode:this.renderMode,outerHintContainer:this.outerHintContainer,enableMultiselectWidget:this.enableMultiselectWidget}},render:function(){f.__super__.render.call(this),this.dropdownContainer=this.$el.find(".filter-container");const e=this.dropdownContainer.find(".filter-items");r.each(this.filters,(function(t){r.isFunction(t.setDropdownContainer)&&t.setDropdownContainer(this.dropdownContainer),t.setRenderMode(this.renderMode),t.renderable&&t.visible?(t.render(),e.append(t.$el),t.rendered()):e.append(t.$el)}),this),this.trigger("rendered"),r.isEmpty(this.filters)?this.hide():this.enableMultiselectWidget&&this._initializeSelectWidget();const t=this.subview("filters-state");return t&&(t.render(),this.viewMode===f.MANAGE_VIEW_MODE&&t.hide()),this.viewMode===f.STATE_VIEW_MODE&&this.hide(),this.appendToContainer(),this},show:function(){this.$el.show(),this.trigger("visibility-change",!0)},hide:function(){this.$el.hide(),this.trigger("visibility-change",!1)},appendToContainer(){this.$el.prependTo(this.filterContainer),this.trigger("visibility-change",this.$el.is(":visible"))},_publishCountSelectedFilters:function(e){const t=!r.isUndefined(e)&&r.isNumber(e)?e:this._calculateSelectedFilters();l.trigger("filterManager:selectedFilters:count:"+this.collection.options.gridName,t),this.$('a[data-name="filters-dropdown"]').toggleClass("filters-exist",t>0)},_publishCountChangedFilters:function(e){const t=!r.isUndefined(e)&&r.isNumber(e)?e:this._calculateChangedFilters();l.trigger("filterManager:changedFilters:count:"+this.collection.options.gridName,t)},_calculateSelectedFilters:function(){return r.reduce(this.filters,(function(e,t){return e+(!t.renderable||t.isEmptyValue()||r.isEqual(t.emptyValue,t.value)?0:1)}),0)},_calculateChangedFilters:function(){return this.getChangedFilters().length},getHintContainer:function(){let e=this.dropdownContainer;return this.outerHintContainer&&(e=o(this.outerHintContainer)),e.find(".filter-items-hint")},_resetHintContainer:function(){const e=this.getHintContainer();let t=!1;e.children("span").each((function(){if("none"!==this.style.display)return t=!0,!1})),t?e.show():e.hide(),this._publishCountSelectedFilters()},_disposeSelectWidget(){this.selectWidget&&(this.$(this.filterSelector).off(`remove${this.eventNamespace()}`),this.selectWidget.dispose(),delete this.selectWidget)},_initializeSelectWidget:function(){this._disposeSelectWidget(),this.multiselectParameters.appendTo&&(this.multiselectParameters.appendTo=this.$el.find(this.multiselectParameters.appendTo));const e=r.extend({multiple:!0,selectedList:0,classes:"select-filter-widget",position:{my:"left top+2",at:"left bottom"}},{minWidth:"none",selectedText:this.addButtonHint,beforeopen:()=>{this.selectWidget.onBeforeOpenDropdown()},open:()=>{this.selectWidget.onOpenDropdown(),this._setDropdownWidth()},refresh:()=>{this.selectWidget.onRefresh()},beforeclose:()=>!1===this.ignoreFiltersUpdateEvents,close:()=>{this.selectWidget.onClose()},appendTo:this.dropdownContainer,initialValue:this._defaultFiltersNames()},this.multiselectParameters);this.$(this.filterSelector).on(`remove${this.eventNamespace()}`,this._disposeSelectWidget.bind(this)),this.selectWidget=new this.MultiselectDecorator({element:this.$(this.filterSelector),parameters:e}),this.selectWidget.setViewDesign(this);const t=this.selectWidget.multiselect("instance").button;this._setButtonDesign(t),this._setButtonReset()},_refreshSelectWidget:function(){(this.selectWidget||this.enableMultiselectWidget)&&this.selectWidget.multiselect("refresh")},_setButtonDesign:function(e){e.addClass("dropdown-toggle")},_createButtonReset:function(){return o('<div class="ui-multiselect-footer"><a href="#" class="ui-multiselect-reset" role="button" data-role="reset-filters"><i class="fa-refresh"></i>'+this.multiselectResetButtonLabel+"</a></div>")},_setButtonReset:function(){const e=this._createButtonReset();this.selectWidget.multiselect("instance").menu.append(e)},_setDropdownWidth:function(){const e=this.selectWidget.getWidget(),t=this.selectWidget.getMinimumDropdownWidth()+24;e.width(t).css("min-width",t+"px")},_processFilterStatus:function(e){r.isArray(e)||(e=this.$(this.filterSelector).val()),r.each(this.filters,(function(t,i){t.renderable||-1===r.indexOf(e,i)?t.renderable&&-1===r.indexOf(e,i)&&this.disableFilter(t):this.enableFilter(t)}),this)},_onReset:function(e){e.stopPropagation(),this.collection.state.filters={},this.collection.trigger("updateState",this.collection),l.trigger("datagrid:doRefresh:"+this.collection.inputName,!0)},_onResetFiltersSelection:function(e){e.stopPropagation();const t=this._defaultFiltersNames();this.selectWidget.element.val(t).trigger("change")},_defaultFiltersNames(){return Object.values(this.filters).filter((e=>!0===e.renderableByDefault)).map((e=>e.name))},_onDropdownToggle:function(e){e.preventDefault(),new g({title:this.filterDialogTitle,content:this.dropdownContainer}).render()},_onOutsideActionEvent:function(e){r.contains(o(e.target).parents(),this.el)||this.closeDropdown()},closeDropdown:function(){this.$(".dropdown").removeClass("oro-open")},_onUpdateCriteriaClick:function(e){e.once("update",this.closeDropdown,this),r.defer(e.off.bind(e,"update",this.closeDropdown,this))},getViewMode:function(){return this.viewMode},setViewMode:function(e){const t=[f.STATE_VIEW_MODE,f.MANAGE_VIEW_MODE];this.viewMode!==e&&r.contains(t,e)&&(this.trigger("changeViewMode",e),r.result(this.subview("filters-state"),e===f.STATE_VIEW_MODE?"show":"hide"),this.viewMode=e,_.setItem(this.storageKey,e))},getChangedFilters:function(){return r.filter(this.filters,(function(e){return e.renderable&&e._isDOMValueChanged()}))}});return r.extend(f,{MANAGE_VIEW_MODE:"expanded",STATE_VIEW_MODE:"collapsed"}),f}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofilter/js/filters-navigation-component.js":(e,t,i)=>{"use strict";i.d(t,{Z:()=>h});var s=i("./bundles/oroui/js/app/components/base/component.js"),n=i.n(s),o=i("./bundles/oroui/js/extend/backbone.js");const r=class{constructor(e){if(!e||!Array.isArray(e)||!e.length)throw new Error('Option "filters" is required');this.filters=e,this._index=0}get index(){return this._index}set index(e){this._index=e,this.trigger("change:index",e)}next(){return this.index+1<this.filters.length?this.getFilterByIndex(this.index+1):this.first()}previous(){return this.index>0?this.getFilterByIndex(this.index-1):this.last()}current(){return this.filters[this.index]}setCurrent(e){const t=this.filters.indexOf(e);this.index=-1!==t?t:0}first(){return this.getFilterByIndex(0)}last(){return this.getFilterByIndex(this.filters.length-1)}getFilterByIndex(e){const t=this.filters[e];return t?(this.index=e,t):this.first()}reset(){return this.index=0,this.current()}};Object.assign(r.prototype,o.Events);const a=r;var l=i("./bundles/oroui/js/tools/keyboard-key-codes.js"),d=i("./bundles/oroui/js/extend/underscore.js"),c=i.n(d);i("../node_modules/jquery-ui/ui/tabbable.js");const u=n().extend({constructor:function e(t){e.__super__.constructor.call(this,t)},initialize(e){if(this.options=e||{},!this.options.filters)throw new Error('Option "filters" is required');const t=Object.values(this.options.filters);if(u.__super__.initialize.call(this,e),0===t.length)return;this.onFilterVisibilityChange=c().debounce(this.onFilterVisibilityChange.bind(this),50);const i={keydownOnToggle:this.onFilterKeyDownToggle,focusinOnToggle:this.onFilterFocusInToggle,focusoutOnToggle:this.onFilterFocusOutToggle,enable:this.onFilterVisibilityChange,disable:this.onFilterVisibilityChange,showCriteria:this.setFilterAsCurrent};t.forEach((e=>this.listenTo(e,i))),this.iterator=new a(t),this.listenTo(this.iterator,"change:index",this.updateTabIndex),this.setFirstVisibleFilterAsCurrent()},onFilterKeyDownToggle(e){if(!this.disposed)switch(e.keyCode){case l.Z.ARROW_LEFT:this.focusPreviousFilter(),e.preventDefault();break;case l.Z.ARROW_RIGHT:this.focusNextFilter(),e.preventDefault();break;case l.Z.ENTER:case l.Z.SPACE:case l.Z.ARROW_UP:case l.Z.ARROW_DOWN:this.openCurrentFilter(),e.preventDefault();break;case l.Z.ESCAPE:this.closeCurrentFilterAndSetFocus(),e.preventDefault(),e.stopPropagation()}},onFilterFocusInToggle(e){e.target.classList.add("focus-via-arrows-keys")},onFilterFocusOutToggle(e){e.target.classList.remove("focus-via-arrows-keys")},onFilterVisibilityChange(){const e=this.iterator.current();e.renderable&&e.visible||this.setFirstVisibleFilterAsCurrent(),this.updateTabIndex()},setFilterAsCurrent(e){this.iterator.setCurrent(e)},updateTabIndex(){const e=this.iterator.current();e.getCriteriaSelector().attr("tabindex",0),this.iterator.filters.forEach((t=>{t!==e&&t.getCriteriaSelector().attr("tabindex",-1)}))},getFilterByIterator(e){const t=this.iterator.current();let i;do{i=this.iterator[e]()}while(!(i.renderable&&i.visible||i===t));return i},setFirstVisibleFilterAsCurrent(){const e=this.iterator.reset();e.visible&&e.renderable||this.getFilterByIterator(c().isRTL()?"previous":"next")},focusNextFilter(){const e=this.getFilterByIterator(c().isRTL()?"previous":"next");c().result(e,"focusCriteriaToggler")},focusPreviousFilter(){const e=this.getFilterByIterator(c().isRTL()?"next":"previous");c().result(e,"focusCriteriaToggler")},openCurrentFilter(){const e=this.iterator.current();c().result(e,"_showCriteria")},closeCurrentFilterAndSetFocus(){const e=this.iterator.current();c().result(e,"_hideCriteria"),c().result(e,"focusCriteriaToggler")},dispose:function(){this.disposed||(delete this.iterator,u.__super__.dispose.call(this))}}),h=u},"./bundles/orofilter/js/itemizedpicker-widget.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/date-picker.html");i("../node_modules/jquery-ui/ui/widget.js"),t.widget("orofilter.itemizedPicker",{options:{title:"Title",items:[],onSelect:t.noop,template:s},_create:function(){this.render(),this._on({"click a":"onSelect"})},onSelect:function(e){this.options.onSelect(e.target.text)},render:function(){this.element.html(this.options.template({title:this.options.title,items:this.options.items}))}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/map-filter-module-name.js":(e,t,i)=>{var s;void 0===(s=function(){"use strict";const e={string:"choice",choice:"select",single_choice:"select",multichoice:"multiselect",boolean:"boolean",duplicate:"select",dictionary:"dictionary"};return function(t){return"oro/filter/{{type}}-filter".replace("{{type}}",e[t]||t)}}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/multiselect-decorator.js":(e,t,i)=>{var s;void 0===(s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/jquery.js"),o=i("./bundles/oroui/js/extend/underscore.js"),r=i("./bundles/orotranslation/js/translator.js"),a=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/templates/multiselect-no-found.html"),l=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofrontend/templates/multiselect-clear-search.html");function d(e){this.initialize(e)}return i("./bundles/oroui/js/extend/jquery.multiselect.js"),i("./bundles/oroui/js/extend/jquery.multiselect-filter.js"),d.prototype={cidPrefix:"multiselect",element:null,multiselectFilterParameters:{},contextSearch:!0,displayNoFoundMessage:!0,notFoundTemplate:a,clearSearchTemplate:l,filterLabel:"",initialize:function(e){if(this.cid=o.uniqueId(this.cidPrefix),!e.element)throw new Error("Select element must be defined");if(this.element=e.element,o.has(e,"contextSearch")&&(this.contextSearch=e.contextSearch),e.filterLabel&&(this.filterLabel=e.filterLabel),e.parameters=e.parameters||{},o.defaults(e.parameters,this.parameters),this.multiselect(e.parameters),this.contextSearch){const e={label:"",placeholder:"",autoReset:!0};if(this.multiselectfilter(o.extend(e,this.multiselectFilterParameters)),this.displayNoFoundMessage){const e=this.multiselect("instance"),t=this.multiselectfilter("instance"),i=this.getWidget();t.element.on("multiselectfilterfilter",(function(s,o){const r=t.rows.filter((function(){return"none"!==n(this).css("display")})).length;e.$notFound.toggleClass("hide",0!==r),i.toggleClass("no-matches",0===r)})),t.input.on(`input${e._namespaceID}`,(t=>{t.target.value.length?(i.addClass("search-shown"),e.$clearSearch&&e.$clearSearch.removeClass("hide")):(e.$clearSearch&&e.$clearSearch.addClass("hide"),e.$notFound&&e.$notFound.addClass("hide"),i.removeClass("no-matches search-shown"))}))}}},dispose:function(){this.contextSearch&&this.element.data("ech-multiselectfilter")&&this.multiselectfilter("destroy"),this.element.data("ech-multiselect")&&this.multiselect("destroy"),delete this.element},setViewDesign:function(e){e.$(".ui-multiselect").removeClass("ui-widget").removeClass("ui-state-default"),e.$(".ui-multiselect span.ui-icon").remove()},_setDropdownDesign:function(){const e=this.getWidget();e.addClass("dropdown-menu"),e.removeClass("ui-widget-content"),e.removeClass("ui-widget"),e.find(".ui-widget-header").removeClass("ui-widget-header"),e.find(".ui-multiselect-filter").removeClass("ui-multiselect-filter"),e.find("ul li label").removeClass("ui-corner-all"),this.appendNoFoundTemplate()},appendNoFoundTemplate:function(){if(this.contextSearch){const e=this.multiselect("instance"),t=this.multiselectfilter("instance"),i=this.getWidget();e.$clearSearch||(n(e.header).find("input").addClass("input-with-search"),n(t.input).after(this.clearSearchTemplate()),e.$clearSearch=i.find('[data-role="clear"]'),e.$clearSearch.on(`click${e._namespaceID}`,(e=>{t.input.val("").trigger("input","").trigger("focus")})).attr("aria-label",r("oro.filter.clear",{label:this.filterLabel.trim()},this.filterLabel.trim().length))),e.$notFound||(n(e.header).after(this.notFoundTemplate()),e.$notFound=i.find('[data-role="no-data"]')),e.$notFound.addClass("hide"),e.$clearSearch.addClass("hide")}},onBeforeOpenDropdown:function(){this._setDropdownDesign()},onOpenDropdown:function(){this.getWidgetTrigger().addClass("pressed")},onClose:function(){this.getWidgetTrigger().removeClass("pressed")},onRefresh:function(){const e=this.getWidget();e.find(".ui-multiselect-checkboxes").addClass("fixed-li"),e.inputWidget("seekAndCreate")},getMinimumDropdownWidth:function(){let e=0;this.getWidget().find(".ui-multiselect-checkboxes").removeClass("fixed-li");const t=this.getWidget().find(".ui-multiselect-checkboxes li");return o.each(t,(function(t){const i=this._getTextWidth(n(t).find("label"));i>e&&(e=i)}),this),this.getWidget().find(".ui-multiselect-checkboxes").addClass("fixed-li"),e},_getTextWidth:function(e){const t=e.html(),i="<span>"+t+"</span>";e.html(i);const s=e.outerWidth();return e.html(t),s},getWidget:function(){return this.multiselect("widget")},getWidgetTrigger:function(){return this.multiselect("instance").button},multiselect:function(...e){return this.element.multiselect(...e)},multiselectfilter:function(...e){return this.element.multiselectfilter(...e)},updateDropdownPosition:function(e){this.multiselect("updatePos",e)}},d}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofilter/js/plugins/filters-toggle-plugin.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/orotranslation/js/translator.js"),r=i("./bundles/oroui/js/app/plugins/base/plugin.js"),a=i("./bundles/orofilter/js/actions/toggle-filters-action.js"),l=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id),d=n.extend({className:"btn",icon:"filter",label:o("oro.filter.datagrid-toolbar.filters"),ariaLabel:o("oro.filter.datagrid-toolbar.aria_label")},l.launcherOptions||{}),c=r.extend({enable:function(){this.listenTo(this.main,"beforeToolbarInit",this.onBeforeToolbarInit),c.__super__.enable.call(this)},onBeforeToolbarInit:function(e){const t={datagrid:this.main,launcherOptions:d,order:l.order||50};e.addToolbarAction(new a(t))}});return c}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/oroform/js/app/views/editor/date-editor-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/orotranslation/js/translator.js"),o=i("./bundles/orolocale/js/moment-l10n.js"),r=i("./bundles/orolocale/js/formatter/datetime.js"),a=i("./bundles/oroform/js/app/views/editor/text-editor-view.js"),l=i("./bundles/oroui/js/app/views/datepicker/datepicker-view.js"),d=a.extend({className:"date-editor",inputType:"date",view:l,DROPDOWN_BELOW_INPUT_CSS_CLASS:"dropdown-below-input",DEFAULT_OPTIONS:{dateInputAttrs:{placeholder:n("oro.form.choose_date"),name:"date",autocomplete:"off","data-validation":JSON.stringify({Date:{}})},datePickerOptions:{altFormat:"yy-mm-dd",changeMonth:!0,changeYear:!0,yearRange:"-80:+1",showButtonPanel:!0,blurInputOnTodaySelection:!1}},events:{"blur .hasDatepicker":"onDatePickerBlur","datepicker:dialogReposition .hasDatepicker":"onDropdownReposition"},format:r.getBackendDateFormat(),constructor:function e(t){e.__super__.constructor.call(this,t)},render:function(){d.__super__.render.call(this);const e=this.view;this.view=new e(this.getViewOptions()),this.options.value&&this.setFormState(this.options.value),this.view.getDatePickerWidget().on("mousedown"+this.eventNamespace(),(()=>{this._isDateSelection=!0}));const t=this.$(".hasDatepicker");t.on(`focusout${this.eventNamespace()}`,(()=>this._preventFocusout=!0)),t.bindFirst("keydown"+this.eventNamespace(),this.onGenericEnterKeydown.bind(this)),t.on("keydown"+this.eventNamespace(),this.onGenericEscapeKeydown.bind(this)),t.on("keydown"+this.eventNamespace(),this.onGenericArrowKeydown.bind(this))},onGenericEnterKeydown:function(e){e.keyCode===this.ENTER_KEY_CODE&&(t("#ui-datepicker-div").is(":visible")&&this.isChanged()?this.$(".hasDatepicker").datepicker("hide"):d.__super__.onGenericEnterKeydown.call(this,e))},onGenericEscapeKeydown:function(e){e.keyCode===this.ESCAPE_KEY_CODE&&(t("#ui-datepicker-div").is(":visible")?this.$(".hasDatepicker").datepicker("hide"):d.__super__.onGenericEscapeKeydown.call(this,e))},dispose:function(){this.disposed||(this._isFocused=!1,this.$(".hasDatepicker").off(this.eventNamespace()),this.view.getDatePickerWidget().off(this.eventNamespace()),this.view.dispose(),d.__super__.dispose.call(this))},getViewOptions:function(){return t.extend(!0,{},this.DEFAULT_OPTIONS,s.pick(this.options,["dateInputAttrs","datePickerOptions"]),{el:this.$("input[name=value]")})},focus:function(){this.$("input.hasDatepicker").setCursorToEnd().focus()},onFocusout:function(e){if(this._isFocused&&this._isDateSelection)delete this._isDateSelection,this.focus();else{if(this._preventFocusout)return void delete this._preventFocusout;d.__super__.onFocusout.call(this,e)}},parseRawValue:function(e){try{return r.getMomentForBackendDate(e)}catch(t){try{return r.getMomentForBackendDateTime(e)}catch(e){return null}}},formatRawValue:function(e){return null===(e=this.parseRawValue(e))?"":e.format(this.format)},getValue:function(){const e=this.$("input[name=value]").val();return e?o.utc(e,this.format):null},isChanged:function(){const e=this.getValue(),t=this.getModelValue();return null!==e&&null!==t?e.diff(t):e!==t},onDatePickerBlur:function(){this.toggleDropdownBelowClass(!1)},onDropdownReposition:function(e,t){this.toggleDropdownBelowClass("below"===t)},toggleDropdownBelowClass:function(e){this.$el.toggleClass(this.DROPDOWN_BELOW_INPUT_CSS_CLASS,e)}});return d}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroform/js/app/views/editor/datetime-editor-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/orotranslation/js/translator.js"),o=i("./bundles/orolocale/js/formatter/datetime.js"),r=i("./bundles/oroform/js/app/views/editor/date-editor-view.js"),a=i("./bundles/oroui/js/app/views/datepicker/datetimepicker-view.js"),l=r.extend({className:"datetime-editor",inputType:"hidden",view:a,DEFAULT_OPTIONS:{...r.prototype.DEFAULT_OPTIONS,timeInputAttrs:{placeholder:n("oro.form.choose_time"),name:"time",autocomplete:"off",class:"input-small timepicker-input","data-validation":JSON.stringify({Time:{}})},timePickerOptions:{}},events:{"keydown .hasDatepicker":"onDateEditorKeydown","keydown .timepicker-input":"onTimeEditorKeydown","change .hasDatepicker":"onDateEditorKeydown","change .timepicker-input":"onTimeEditorKeydown","showTimepicker .ui-timepicker-input":"onTimepickerShow","hideTimepicker .ui-timepicker-input":"onTimepickerHide"},format:o.getBackendDateTimeFormat(),constructor:function e(t){e.__super__.constructor.call(this,t)},render:function(){return l.__super__.render.call(this),this.$(".timepicker-input").bindFirst("keydown"+this.eventNamespace(),(e=>{e.keyCode===this.ESCAPE_KEY_CODE&&"block"===t(".ui-timepicker-wrapper").css("display")&&e.stopPropagation()})),this.$(".timepicker-input").on("keydown"+this.eventNamespace(),this.onGenericArrowKeydown.bind(this)),this},dispose:function(){this.disposed||(this.$(".timepicker-input").off(this.eventNamespace()),l.__super__.dispose.call(this))},getViewOptions:function(){return t.extend(!0,{},this.DEFAULT_OPTIONS,s.pick(this.options,["dateInputAttrs","datePickerOptions","timeInputAttrs","timePickerOptions"]),{el:this.$("input[name=value]")})},focus:function(e){e?this.$("input.timepicker-input").setCursorToEnd().focus():this.$("input.hasDatepicker").setCursorToEnd().focus()},onFocusout:function(e){this._isTimeSelection?(delete this._isTimeSelection,this.focus(1)):l.__super__.onFocusout.call(this,e)},parseRawValue:function(e){let t;try{t=o.getMomentForBackendDateTime(e)}catch(e){return null}return t.seconds(0),t},onDateEditorKeydown:function(e){e.shiftKey||(e.stopPropagation(),this.onGenericTabKeydown(e))},onTimeEditorKeydown:function(e){e.shiftKey&&(e.stopPropagation(),this.onGenericTabKeydown(e))},onTimepickerHide:function(){this.toggleDropdownBelowClass(!1)},onTimepickerShow:function(e){const t=this.view.getTimePickerWidget(),i=!t.hasClass("ui-timepicker-positioned-top");this.toggleDropdownBelowClass(i),t.off(this.eventNamespace()).on("mousedown"+this.eventNamespace(),(e=>{this._isTimeSelection=!0}))},onGenericTabKeydown:function(e){e.keyCode===this.TAB_KEY_CODE&&(this.$("input.hasDatepicker").is(e.currentTarget)&&!e.shiftKey?(e.preventDefault(),this._isTimeSelection=!0,this.focus(1)):this.$("input.timepicker-input").is(e.currentTarget)&&e.shiftKey&&(e.preventDefault(),this._isDateSelection=!0,this.focus()))}});return l}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroform/js/app/views/editor/percent-editor-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";return i("./bundles/oroform/js/app/views/editor/number-editor-view.js").extend({className:"number-editor",constructor:function e(t){e.__super__.constructor.call(this,t)},parseRawValue:function(e){return this._roundValue(100*parseFloat(e))},getModelUpdateData:function(){const e={},t=this.getValue();return e[this.fieldName]=isNaN(t)?null:this._roundValue(t/100),e},formatRawValue:function(e){const t=this.parseRawValue(e);return isNaN(t)?"":String(t)},_roundValue:function(e){return parseFloat(Math.round(e+"e12")+"e-12")}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroform/js/app/views/editor/related-id-relation-editor-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroform/js/app/views/editor/abstract-relation-editor-view.js"),s=i("./bundles/oroui/js/extend/underscore.js");i("./bundles/oroui/js/extend/select2.js");const n=t.extend({DEFAULT_ID_PROPERTY:"id",DEFAULT_TEXT_PROPERTY:"text",constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(n.__super__.initialize.call(this,e),!e.value_field_name&&!e.ignore_value_field_name)throw new Error("`value_field_name` option is required");this.valueFieldName=e.value_field_name},getAvailableOptions:function(e){return[]},getInitialResultItem:function(){return{id:this.getModelValue(),label:this.model.get(this.fieldName)}},filterInitialResultItem:function(e){e=s.clone(e);const t=String(this.getModelValue());for(let i=0;i<e.length;i++)if(String(e[i].id)===t){e.splice(i,1);break}return e},addInitialResultItem:function(e){return(e=this.filterInitialResultItem(e)).unshift(this.getInitialResultItem()),e},getSelect2Options:function(){const e=s.omit(n.__super__.getSelect2Options.call(this),"data");return s.extend(e,{allowClear:!0,noFocus:!0,formatSelection:function(e){return e.label},formatResult:function(e){return e.label},initSelection:(e,t)=>{t(this.getInitialResultItem())},query:e=>{this.currentTerm=e.term,this.currentRequest&&""!==this.currentRequest.term&&"resolved"!==this.currentRequest.state()&&this.currentRequest.abort();const t=s.extend(this.model.toJSON(),{term:e.term,page:e.page,per_page:this.perPage});""===e.term||this.autocompleteApiAccessor.isCacheExistsFor(t)?this.makeRequest(e,t):this.debouncedMakeRequest(e,t)}})},getRawModelValue:function(){return this.model.get(this.valueFieldName)},parseRawValue:function(e){return e||""},getChoiceLabel:function(){const e=s.result(this.getSelect2Data(),"label");return void 0!==e?e:""},getServerUpdateData:function(){const e={};return e[this.valueFieldName]=this.getValue(),e},getModelUpdateData:function(){const e=this.getServerUpdateData();return e[this.fieldName]=this.getChoiceLabel(),e}},{DEFAULT_ACCESSOR_CLASS:"oroentity/js/tools/entity-select-search-api-accessor",processMetadata:t.processMetadata});return n}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofrontend/default/js/app/filter-count-helper.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/extend/jquery.js");return{counts:null,countsWithoutFilters:null,totalRecordsCount:0,isDisableFiltersEnabled:!1,onMetadataLoaded:function(e){this.counts=e.counts||null,this.countsWithoutFilters=e.countsWithoutFilters||null,this.isDisableFiltersEnabled=e.isDisableFiltersEnabled||!1,this.rerenderFilter()},onTotalRecordsCountUpdate:function(e){this.totalRecordsCount=e},rerenderFilter:function(){this.isRendered()&&this.render()},filterTemplateData:function(e){if(null===this.counts)return e;t.isEmpty(this.counts)&&(this.counts=Object.create(null));let i=s.extend(!0,{},e.options||{});const n=e=>{this.isDisableFiltersEnabled&&t.has(this.countsWithoutFilters,e.value)?e.disabled=!0:i=t.without(i,e)};return t.each(i,(i=>{i.count=this.counts[i.value]||0,i.disabled=!1,0!==i.count||t.contains(e.selected.value,i.value)||n(i)})),1===t.filter(i,(e=>e.count>0)).length&&t.each(i,(i=>{i.count!==this.totalRecordsCount||t.contains(e.selected.value,i.value)||n(i)})),this.visible=!t.isEmpty(i),e.options=i,e}}}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofrontend/default/js/app/views/choice-filter.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orofilter/js/filter/choice-filter.js"),n=s.extend({criteriaValueSelectors:t.defaults({type:"select[data-choice-value-select]"},s.prototype.criteriaValueSelectors),events:{"change select[data-choice-value-select]":"_onChangeChoiceValue"},constructor:function e(t){e.__super__.constructor.call(this,t)},_renderCriteria:function(){n.__super__._renderCriteria.call(this),this.$el.inputWidget("seekAndCreate")},_onChangeChoiceValue:function(e){this.changeChoiceValueHandling||(this.changeChoiceValueHandling=!0,this._onClickChoiceValueSetType(e.currentTarget.value),this._updateValueField(),delete this.changeChoiceValueHandling),this._onValueChanged()},_onValueUpdated:function(e,t){this.$(this.criteriaValueSelectors.type).each(function(i,s){const n=this.$(s),o=n.data("name")||"type";t[o]!==e[o]&&(n.inputWidget("val",e[o]),n.trigger("change"))}.bind(this)),n.__super__._onValueUpdated.call(this,e,t)}});return n}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofrontend/default/js/app/views/filter-settings.js":(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var s=i("./bundles/oroui/js/extend/jquery.js"),n=i.n(s),o=i("./bundles/oroui/js/viewport-manager.js");const r=n().extend(!0,{},{buttonExpandClass:"active"},{fullScreenViewport:"tablet",isFullScreen(){return o.Z.isApplicable(this.fullScreenViewport)},appearance:{"dropdown-mode":{criteriaClass:" btn btn--default btn--size-s btn--full"},"toggle-mode":{criteriaClass:" btn btn--plain btn--default-color btn--full"}}})},"./bundles/orofrontend/default/js/app/views/frontend-abstract-filter.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/orofilter/js/filter/abstract-filter.js");let r=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);r=n.extend({animationDuration:0},r);const a=o.extend({animationDuration:r.animationDuration,constructor:function e(t){e.__super__.constructor.call(this,t)},_setButtonPressed:function(e,t){if(!this.animationDuration)return a.__super__._setButtonPressed.call(this,e,t);t?e.slideDown(this.animationDuration,(()=>{this._setButtonExpanded(!0),e.parent().addClass(this.buttonActiveClass)})):e.slideUp(this.animationDuration,(()=>{this._setButtonExpanded(!1),e.parent().removeClass(this.buttonActiveClass)}))}});return a}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofrontend/default/js/app/views/frontend-multiselect-filter.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orofilter/js/filter/multiselect-filter.js"),n=i("./bundles/orofrontend/default/js/app/filter-count-helper.js"),o=s.extend(t.extend({},n,{populateDefault:!1,listen:{"metadata-loaded":"onMetadataLoaded","filters-manager:after-applying-state mediator":"rerenderFilter"},constructor:function e(t){e.__super__.constructor.call(this,t)},getTemplateData:function(){const e=o.__super__.getTemplateData.call(this);return this.filterTemplateData(e)}}));return o}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofrontend/default/js/app/views/frontend-search-boolean-filter.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orofrontend/default/js/app/views/frontend-multiselect-filter.js"),n=i("./bundles/orofrontend/default/js/app/filter-count-helper.js"),o=s.extend(t.extend({},n,{populateDefault:!1,listen:{"metadata-loaded":"onMetadataLoaded","filters-manager:after-applying-state mediator":"rerenderFilter"},constructor:function(e){o.__super__.constructor.call(this,e)},getTemplateData:function(){let e=o.__super__.getTemplateData.call(this);return e=this.filterTemplateData(e),this.visible=t.size(e.options)>1,e}}));return o}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofrontend/default/js/app/views/frontend-select-filter.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/orofilter/js/filter/select-filter.js"),r=i("./bundles/orofrontend/js/app/datafilter/frontend-multiselect-decorator.js"),a=i("./bundles/orofrontend/default/js/app/filter-count-helper.js");let l=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);l=n.extend({closeAfterChose:!0},l);const d=o.extend(n.extend({},a,{closeAfterChose:l.closeAfterChose,MultiselectDecorator:r,widgetOptions:{multiple:!1,classes:"select-filter-widget"},containerSelector:".filter-criteria-selector",criteriaSelector:".filter-criteria",listen:{"metadata-loaded":"onMetadataLoaded","total-records-count-updated":"onTotalRecordsCountUpdate","filters-manager:after-applying-state mediator":"rerenderFilter"},constructor:function e(t){e.__super__.constructor.call(this,t)},getTemplateData:function(){const e=d.__super__.getTemplateData.call(this);return this.filterTemplateData(e)},_appendToContainer:function(){return this.isToggleMode()?this.$el.find(".filter-criteria"):this.dropdownContainer},_initializeSelectWidget(){return this.widgetOptions=Object.assign({},this.widgetOptions,{additionalClass:!this.isToggleMode()}),d.__super__._initializeSelectWidget.call(this)},_onClickFilterArea:function(e){e.stopPropagation(),this.isToggleMode()?this.toggleFilter():d.__super__._onClickFilterArea.call(this,e)},toggleFilter:function(){this.selectDropdownOpened?(this._setButtonPressed(this.$(this.criteriaSelector),!1),this.selectDropdownOpened=!1,this.trigger("hideCriteria",this)):(this._setButtonPressed(this.$(this.criteriaSelector),!0),this.selectWidget.multiselect("open"),this.trigger("showCriteria",this),this.selectDropdownOpened=!0)},reset:function(){d.__super__.reset.call(this),this.isToggleMode()&&!1!==this.autoClose&&(this.selectDropdownOpened=!0,this.toggleFilter())},_getSelectWidgetPosition:function(){const e=d.__super__._getSelectWidgetPosition.call(this);return n.extend({},e,{my:(n.isRTL()?"right":"left")+" top"})},isToggleMode:function(){return"toggle-mode"===this.renderMode}}));return d}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofrontend/js/app/components/frontend-datagrid-component.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/orodatagrid/js/app/components/datagrid-component.js"),o=i("./bundles/orofrontend/js/app/plugins/plugin-elastic-swipe-actions.js"),r=i("./bundles/oroui/js/extend/underscore.js"),a=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id),l={responsiveGridClassName:"frontend-datagrid--responsive",gridHasSwipeClassName:"frontend-datagrid--has-swipe",...a,themeOptions:{enabledAccessibilityPlugin:!0,...a.themeOptions}},d=n.extend({options:{rowActionsClass:"has-actions",rowSelectClass:"has-select-action"},constructor:function e(t){e.__super__.constructor.call(this,t)},initDataGrid:function(e){e={...e,themeOptions:{...l.themeOptions,...e.themeOptions}},d.__super__.initDataGrid.call(this,e),this.metadata.responsiveGrids&&this.metadata.responsiveGrids.enable&&this.$componentEl.addClass(l.responsiveGridClassName),this.toEnableElasticSwipeActionsPlugin()&&this.$componentEl.addClass(l.gridHasSwipeClassName)},combineGridOptions:function(){const e=d.__super__.combineGridOptions.call(this);return r.extend(e,this.options),this.toEnableElasticSwipeActionsPlugin()&&e.plugins.push(o),e},toEnableElasticSwipeActionsPlugin:function(){return r.isTouchDevice()&&this.metadata.responsiveGrids?.enable&&this.metadata.swipeActionsGrid?.enable}});return d}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofrontend/js/app/datafilter/actions/fullscreen-filters-action.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/oroui/js/mediator.js"),r=i("./bundles/orofilter/js/actions/toggle-filters-action.js"),a=i("./bundles/orofilter/js/filters-manager.js"),l=i("./bundles/orofrontend/js/app/views/counter-badge-view.js"),d=i("./bundles/orofrontend/default/js/app/views/filter-settings.js").Z;let c=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);c=n.extend({showCounterBadge:!1},c);const u=r.extend({counterBadgeView:l,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){const t=e||{};if(!t.datagrid)throw new TypeError('"datagrid" is required');if(!t.fullscreenFilters)throw new TypeError('The "fullscreenFilters" option is required.');this.fullscreenFilters=t.fullscreenFilters,u.__super__.initialize.call(this,t),this.listenTo(t.datagrid,"filterManager:connected",(()=>{this.filterManager=t.datagrid.filterManager,this.updateFiltersStateView()})),this.listenTo(this.fullscreenFilters,"main-popup:closed",this.updateFiltersStateView),this.listenTo(o,"viewport:change",this.updateFiltersStateView),c.showCounterBadge&&(this.counterBadgeView=new this.counterBadgeView,this.listenTo(o,{[`filterManager:selectedFilters:count:${this.datagrid.name}`]:this.onUpdateFiltersCount}))},updateFiltersStateView(){void 0===this.filterManager||this.fullscreenFilters.isPopupOpen()||(this.filterManager.getViewMode()===a.MANAGE_VIEW_MODE&&d.isFullScreen()?(this._initialViewMode=this.filterManager.getViewMode(),this.filterManager.setViewMode(a.STATE_VIEW_MODE)):this._initialViewMode&&!d.isFullScreen()&&(this.filterManager.setViewMode(this._initialViewMode),delete this._initialViewMode))},execute:function(){d.isFullScreen()?this.showAsFullScreen():u.__super__.execute.call(this)},toggleFilters:function(e){d.isFullScreen()?u.__super__.toggleFilters.call(this,a.STATE_VIEW_MODE):u.__super__.toggleFilters.call(this,e)},showAsFullScreen(){this.fullscreenFilters.showMainPopup()},onUpdateFiltersCount:function(e){"number"==typeof e&&this.counterBadgeView.setCount(e)},createLauncher:function(e){const t=u.__super__.createLauncher.call(this,e);return c.showCounterBadge&&this.launcherInstance.on("render",(()=>{this.launcherInstance.$el.prepend(this.counterBadgeView.$el)})),t},dispose(){this.disposed||(delete this.filterManager,delete this.fullscreenFilters,u.__super__.dispose.call(this))}});return u}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofrontend/js/app/datafilter/filter-options-state-extensions.js":(e,t,i)=>{"use strict";i.d(t,{Z:()=>o});var s=i("./bundles/oroui/js/base-class.js");const n=i.n(s)().extend({constructor:function e(t){e.__super__.constructor.call(this,t)},saveState(e){this._state={filterManager:{autoClose:e.autoClose,renderMode:e.renderMode,filterContainer:e.filterContainer,template:e.template,outerHintContainer:e.outerHintContainer,enableMultiselectWidget:e.enableMultiselectWidget,filtersStateElement:e.filtersStateElement},filters:Object.entries(e.filters).reduce(((e,[t,i])=>(e[t]={autoClose:i.autoClose,animationDuration:i.animationDuration,outerHintContainer:i.outerHintContainer,initiallyOpened:i.initiallyOpened},"datetime"===i.type&&(e[t].timePickerOptions={...i.timePickerOptions||{}}),e)),{})}},restoreState(e){if(this._state){for(const[t,i]of Object.entries(this._state.filterManager))e[t]=i;for(const[t,i]of Object.entries(this._state.filters)){const s=e.filters[t];if(s)for(const[e,t]of Object.entries(i))s[e]=t}}},dispose(){if(!this.disposed)return delete this._state,n.__super__.dispose.call(this)}}),o=n},"./bundles/orofrontend/js/app/datafilter/frontend-collection-filters-manager.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/jquery.js"),o=i("./bundles/oroui/js/extend/underscore.js"),r=i("./bundles/orotranslation/js/translator.js"),a=i("./bundles/orofilter/js/collection-filters-manager.js"),l=i("./bundles/orofrontend/js/app/datafilter/frontend-manage-filters-decorator.js");let d=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);d=o.extend({templateData:{attributes:""},enableMultiselectWidget:!0},d);const c=a.extend({MultiselectDecorator:l,enableMultiselectWidget:!0,multiselectParameters:{classes:"select-filter-widget",checkAllText:r("oro_frontend.filter_manager.checkAll"),uncheckAllText:r("oro_frontend.filter_manager.unCheckAll"),height:"auto",menuWidth:312,selectedText:r("oro_frontend.filter_manager.button_label"),noneSelectedText:r("oro_frontend.filter_manager.button_label"),listAriaLabel:r("oro_frontend.filter_manager.listAriaLabel")},events:{'click [data-role="close"]':"_onClose"},templateData:d.templateData,optionNames:a.prototype.optionNames.concat(["fullscreenTemplate"]),constructor:function e(t){e.__super__.constructor.call(this,t)},render:function(){return c.__super__.render.call(this),this.finallyOfRender(),this},_setButtonDesign:function(e){e.attr({class:`${e.attr("class")} filters-manager-trigger btn btn--default btn--size-s`,title:r("oro_frontend.filter_manager.label"),"aria-label":r("oro_frontend.filter_manager.button_aria_label")}).find("span").attr({"aria-hidden":!0,class:"fa-plus fa--no-offset hide-text"})},_createButtonReset:function(){return n(`\n <div class="datagrid-manager__footer">\n <a href="#" role="button" class="btn btn--link btn--no-x-offset btn--no-y-offset"\n data-role="reset-filters">\n <span class="fa-refresh" aria-hidden="true"></span>${this.multiselectResetButtonLabel}\n </a>\n </div>\n `)},_onClose:function(){this.selectWidget&&this.selectWidget.multiselect("instance").button.trigger("click")},getTemplateData:function(){let e=c.__super__.getTemplateData.call(this);return e=n.extend(e,this.templateData||{}),e},_onCollectionReset:function(e){o.isMobile()||c.__super__._onCollectionReset.call(this,e)},finallyOfRender:function(){"separate"===this.$el.data("layout")&&this.initLayout()}});return c}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofrontend/js/app/datafilter/frontend-manage-filters-decorator.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/orotranslation/js/translator.js"),r=i("./bundles/oroui/js/extend/jquery.js"),a=i("./bundles/orofrontend/js/app/datafilter/frontend-multiselect-decorator.js");let l=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);l=r.extend(!0,{hideHeader:!1,themeName:"default",additionalClass:!0},l);const d=function(e){a.call(this,e)};return d.prototype=n.extend(Object.create(a.prototype),{constructor:d,applyMarkup:!0,parameters:l,multiselectFilterParameters:{label:o("oro_frontend.filter_manager.label"),placeholder:o("oro_frontend.filter_manager.placeholder"),searchAriaLabel:o("oro_frontend.filter_manager.searchAriaLabel")},_setDropdownDesign:function(){const e=this.getWidget(),t=this.multiselect("instance");this.applyMarkup&&(this.updateDropdownMarkup(t),e.find(".datagrid-manager__footer").append(r("<button></button>",{type:"button",class:"close-dialog",title:o("Close"),"aria-label":o("oro_frontend.filter_manager.close.aria_label"),"data-role":"close"}))),a.prototype._setDropdownDesign.call(this)},onRefresh:function(){const e=this.multiselect("instance");this.updateFooterPosition(e),a.prototype.onRefresh.call(this)},updateDropdownMarkup:function(e){e.headerLinkContainer.find("li").addClass("datagrid-manager__actions-item").filter(":first").after(r("<li/>",{class:"datagrid-manager__actions-item","aria-hidden":!0}).append(r("<span/>",{class:"datagrid-manager__separator",text:"|"})))},setDropdownHeaderDesign:function(e){e.header.removeAttr("class").addClass("datagrid-manager__header"),this.setActionsState(e),e.headerLinkContainer.addClass("datagrid-manager__actions")},setActionsState:function(e){const t=e.element.val(),i=0===t.length,s=t.length===e.element.children(":enabled").length,n=e.initialValue.length!==t.length||!e.initialValue.every((e=>t.includes(e))),o=[{$el:e.header.find(".ui-multiselect-none"),toApply:i},{$el:e.header.find(".ui-multiselect-all"),toApply:s},{$el:e.menu.find('[data-role="reset-filters"]'),toApply:!n}];for(const{$el:e,toApply:t}of o)e.toggleClass("disabled",t),e.is(":button")?e.attr("disabled",t):e.attr({tabindex:t?"-1":null,role:"button",href:t?null:"#","aria-disabled":!!t||null}).addClass("btn btn--link btn--no-x-offset btn--no-y-offset")},updateFooterPosition:function(e){const t=e.menu.parent().find(".datagrid-manager__footer"),i=e.menu.find(".ui-multiselect-checkboxes");t.length&&i.length&&i.after(t)},addAdditionalClassesForContainer:function(e){a.prototype.addAdditionalClassesForContainer.call(this,e),e.addClass("ui-rewrite")},setDesignForCheckboxesDefaultTheme:function(e){a.prototype.setDesignForCheckboxesDefaultTheme.call(this,e),e.menu.find(".datagrid-manager__list-item").addClass("datagrid-manager__list-item--half")}}),d}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofrontend/js/app/datafilter/frontend-multiselect-decorator.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/orotranslation/js/translator.js"),r=i("./bundles/oroui/js/extend/jquery.js"),a=i("./bundles/orofilter/js/multiselect-decorator.js");let l=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);l=r.extend(!0,{hideHeader:!1,themeName:"filter-default",additionalClass:!0},l);const d=function(e){const t=n.pick(e.parameters,["additionalClass","hideHeader","themeName","listAriaLabel"]);n.isEmpty(t)||(this.parameters=n.extend({},this.parameters,t)),a.call(this,e)};return d.prototype=n.extend(Object.create(a.prototype),{constructor:d,applyMarkup:!0,parameters:{additionalClass:l.additionalClass,hideHeader:l.hideHeader,themeName:l.themeName},multiselectFilterParameters:{placeholder:o("oro_frontend.filters.multiselect.placeholder"),searchAriaLabel:o("oro_frontend.filters.multiselect.aria_label")},_setDropdownDesign:function(){const e=this.getWidget(),t=this.multiselect("instance");n.isObject(t)&&(this.parameters.hideHeader&&t.header.hide(),"all-at-once"===this.parameters.themeName?this.applyAllToOnceTheme(e,t):this.applyDefaultTheme(e,t),this.appendNoFoundTemplate())},applyDefaultTheme:function(e,t){this.applyBaseMarkup(e,t),this.setDesignForCheckboxesDefaultTheme(t)},applyAllToOnceTheme:function(e,t){this.applyBaseMarkup(e,t),this.setDesignForCheckboxesAllToOnceTheme(t)},applyBaseMarkup:function(e,t){this.applyMarkup&&(this.applyMarkup=!1,this.addAdditionalClassesForContainer(e),this.setDropdownWidgetContainer(t),this.setDropdownHeaderDesign(t),this.setDropdownHeaderSearchDesign(t))},setDesignForCheckboxesDefaultTheme:function(e){e.menu.children(".ui-multiselect-checkboxes").removeClass("ui-helper-reset").addClass("datagrid-manager__list ui-rewrite").find("li").addClass("datagrid-manager__list-item"),e.labels.addClass("checkbox-label")},setDesignForCheckboxesAllToOnceTheme:function(e){e.menu.children(".ui-multiselect-checkboxes").addClass("filters-dropdown").find("li").addClass("filters-dropdown__items filters-dropdown__items--pallet"),e.labels.addClass("filters-dropdown__labels"),e.inputs.addClass("filters-dropdown__inputs")},onRefresh:function(){if(n.isFunction(this.setActionsState)){const e=this.multiselect("instance");this.setActionsState(e)}this._setDropdownDesign()},setViewDesign:function(e){e.$(".ui-multiselect").removeClass("ui-widget").removeClass("ui-state-default"),e.$(".ui-multiselect span.ui-icon").remove()},setDropdownWidgetContainer:function(e){e.menu.wrap(r("<div></div>",{class:"datagrid-manager","data-cid":`menu-${this.cid}`}))},addAdditionalClassesForContainer:function(e){this.parameters.additionalClass&&e.removeAttr("class").addClass(`${this.parameters.themeName} dropdown-menu`)},setDropdownHeaderDesign:function(e){e.header.removeAttr("class").addClass("datagrid-manager__header")},setDropdownHeaderSearchDesign:function(e){e.header.find("input").addClass("input input--full input--size-s").wrap(r("<div></div>",{class:"datagrid-manager-search empty"})),e.header.find(".ui-multiselect-filter").contents().eq(0).filter(((e,t)=>t.nodeType===Node.TEXT_NODE)).wrap(r("<h5></h5>",{class:"datagrid-manager__title"})),e.header.find(".ui-multiselect-filter").removeAttr("class"),e.header.find(".ui-multiselect-close").addClass("hide")},dispose(){return r(`[data-cid="menu-${this.cid}"]`).remove(),a.prototype.dispose.call(this)}}),d}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofrontend/js/app/datafilter/fullscreen-filters.js":(e,t,i)=>{"use strict";i.d(t,{Z:()=>m});var s=i("./bundles/oroui/js/extend/jquery.js"),n=i.n(s),o=i("./bundles/oroui/js/extend/underscore.js"),r=i("./bundles/orotranslation/js/translator.js"),a=i.n(r),l=i("./bundles/oroui/js/mediator.js"),d=i.n(l),c=i("./bundles/orofrontend/default/js/app/views/filter-settings.js"),u=i("./bundles/orofrontend/default/js/app/views/fullscreen-popup-view.js"),h=i.n(u),p=i("./bundles/orofrontend/js/app/datafilter/filter-options-state-extensions.js");const _={mainPopupOptions:{},managerPopupOptions:{},autoClose:!1,showCounterBadge:!1,animationDuration:30,initiallyOpened:!1,...(0,i("./bundles/oroui/js/app/services/module-config.js").Z)(e.id)},g=p.Z.extend({mainPopupOptions:{popupBadge:!0,popupIcon:"fa-filter",popupLabel:a()("oro.filter.datagrid-toolbar.filters"),footerOptions:{templateData:{buttons:[{type:"button",class:"btn btn--info btn--block btn--size-s",role:"apply",label:a()("oro_frontend.filters.apply_all"),disabled:"disabled"}]}}},managerPopupOptions:{popupBadge:!0,popupIcon:"fa-plus",popupLabel:a()("oro_frontend.filter_manager.title")},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize(e){if(!e.datagrid)throw new TypeError('The "datagrid" option is required.');this.datagrid=e.datagrid,this.mainPopupOptions={...this.mainPopupOptions,...e.mainPopupOptions||{},..._.mainPopupOptions},this.managerPopupOptions={...this.managerPopupOptions,...e.managerPopupOptions||{},..._.managerPopupOptions}},onceFilterManagerConnected(){this.filterManager=this.datagrid.filterManager;const e=this.filterManager.subviewsByName["filters-state"];e&&this.listenTo(e,"clicked",(()=>c.Z.isFullScreen()&&this.showMainPopup()))},transformSelectWidget(){const e=this.filterManager.selectWidget;if(!e)return;const t=e.multiselect("getMenu"),i=e.multiselect("getButton"),s=e.multiselect("instance");t.removeClass("dropdown-menu").addClass("datagrid-manager ui-widget-fullscreen");const o=new(h())({...this.managerPopupOptions,contentElement:t});o.on("show",(()=>{o.$popup.on(`click${o.eventNamespace()}`,'[data-role="reset-filters"]',(e=>this.filterManager._onReset(e)))})),o.on("beforeclose",(()=>{o.$popup.off(o.eventNamespace())})),s.position=n().noop,s.options.menuWidth="100%",s.options.minWidth="100%",s.options.beforeopen=()=>e.onBeforeOpenDropdown(),s.element.on("multiselectopened",(()=>t.removeAttr("style"))),e.multiselect("close"),i.add(i.find("span")).on("click.multiselectfullscreen",(()=>o.show())),o.on("close",(()=>e.multiselect("close"))),this.fullScreenPopup.subview("fullscreen:select-widget",o)},transformFilters(){this.saveState(this.filterManager);for(const e of Object.values(this.filterManager.filters))e.outerHintContainer=null,e.initiallyOpened=_.initiallyOpened,!1===_.autoClose&&(e.autoClose=_.autoClose),void 0!==_.animationDuration&&(e.animationDuration=_.animationDuration);this.filterManager.$el.remove(),this.filterManager.autoClose=_.autoClose,this.filterManager.outerHintContainer=null,this.filterManager.renderMode="toggle-mode",this.filterManager.filterContainer=this.fullScreenPopup.content.Element,this.filterManager.template=this.filterManager.fullscreenTemplate?this.filterManager.fullscreenTemplate:this.filterManager.template,this.filterManager.trigger("filters-render-mode-changed",{renderMode:this.filterManager.renderMode,isAsInitial:!1}),this.filterManager.render(),this.filterManager.$el.addClass("fullscreen");const e=(0,o.pick)(this.filterManager.filters,(e=>"datetime"===e.type));for(const t of Object.values(e))t.timePickerOptions={...t.timePickerOptions||{},appendTo:t.$el};this.restoreFiltersAppearance(),this.openNotEmptyFilters(),this.filterManager.show()},listenToFiltersEvents(){this.filterManager&&this.listenTo(this.filterManager.collection,"beforeFetch",this.saveUnsavedFilters)},stopListeningFiltersEvents(){this.filterManager&&this.stopListening(this.filterManager.collection,"beforeFetch")},saveUnsavedFilters(e,t){const i=this.getChangedFiltersState().filters;0!==Object.keys(e.state.filters).length&&0!==Object.keys(i).length&&e.updateState({filters:Object.assign({},e.state.filters,i)})},showMainPopup(){this.disposed||this.fullScreenPopup||(this.fullScreenPopup=new(h())({...this.mainPopupOptions,popupLabel:this.determineMainPopupTitle(this.filterManager._calculateSelectedFilters()),contentElement:document.createElement("div")}),this.listenToOnce(this.fullScreenPopup,{show:this.onShowMainPopup,beforeclose:this.onBeforeCloseMainPopup,close:this.onCloseMainPopup}),this.listenTo(d(),{[`filterManager:selectedFilters:count:${this.datagrid.collection.inputName}`]:this.onUpdateFiltersCount,[`filterManager:changedFilters:count:${this.datagrid.collection.inputName}`]:e=>{this.toggleMainPopupBtn(0===e)},[`datagrid:doRefresh::${this.datagrid.collection.inputName}`]:this.toggleMainPopupBtn}),this.fullScreenPopup.show())},onShowMainPopup(){this.fullScreenPopup.content.$el.prepend(n()("<div></div>").attr("data-role","messenger-temporary-container")),this.fullScreenPopup.$popup.on(`click${this.fullScreenPopup.eventNamespace()}`,'[data-role="apply"]',this.applyState.bind(this)),this.transformFilters(),this.listenToFiltersEvents(),this.transformSelectWidget(),this.trigger("main-popup:shown")},onBeforeCloseMainPopup(){this.stopListeningFiltersEvents(),this.filterManager.$el.remove(),this.restoreState(this.filterManager),this.filterManager.render(),this.restoreFiltersAppearance()},restoreFiltersAppearance(){const e=this.getChangedFiltersState().filters;for(const[t,i]of Object.entries(this.filterManager.filters))i.renderable&&(e[t]&&i._writeDOMValue(e[t]),i._updateCriteriaHint());this.filterManager._resetHintContainer()},onCloseMainPopup(){this.disposeFullScreenPopup(),this.trigger("main-popup:closed"),this.filterManager.trigger("filters-render-mode-changed",{renderMode:this.filterManager.renderMode,isAsInitial:!0})},applyState(e){const t=this.getChangedFiltersState();0===t.errorsCount&&(this.filterManager.collection.state.filters=n().extend(!0,{},this.filterManager.collection.state.filters,t.filters),this.filterManager.collection.trigger("updateState",this.filterManager.collection),d().trigger(`datagrid:doRefresh:${this.filterManager.collection.inputName}`),this.fullScreenPopup.close())},openNotEmptyFilters(){for(const e of Object.values(this.filterManager.filters))if(e.renderable&&!e.isEmpty()){let t;if("function"==typeof e._onClickCriteriaSelector?t=e._onClickCriteriaSelector:"function"==typeof e._onClickFilterArea&&(t=e._onClickFilterArea),void 0===t)continue;void 0!==e.selectDropdownOpened&&(e.selectDropdownOpened=!1),void 0!==e.popupCriteriaShowed&&(e.popupCriteriaShowed=!1),t.call(e,n().Event("click"))}},getChangedFiltersState(){const e={filters:{},errorsCount:0};return void 0===this.filterManager||this.filterManager.getChangedFilters().forEach((t=>{if("function"!=typeof t._isValid||t._isValid()){let i=t._formatRawValue(t._readDOMValue());"function"==typeof t.swapValues&&(i=t.swapValues(i)),e.filters[t.name]=i}else e.errorsCount+=1})),e},toggleMainPopupBtn(e){this.fullScreenPopup&&(void 0===e&&(e=0===Object.keys(this.getChangedFiltersState().filters).length),this.fullScreenPopup.$popup.find('[data-role="apply"]').attr("disabled",e))},onUpdateFiltersCount(e){this.fullScreenPopup&&(this.fullScreenPopup.setPopupTitle(this.determineMainPopupTitle(e)),this.toggleMainPopupBtn(0===e))},determineMainPopupTitle(e){let t=this.mainPopupOptions.popupLabel;return"number"==typeof e&&e>0&&(t=a()("oro.filter.datagrid-toolbar.filters_count",{count:e})),t},isPopupOpen(){return void 0!==this.fullScreenPopup},disposeFullScreenPopup(){this.fullScreenPopup&&!this.fullScreenPopup.disposed&&(this.fullScreenPopup.off(this.fullScreenPopup.eventNamespace()),this.fullScreenPopup.removeSubview("fullscreen:select-widget"),this.fullScreenPopup.dispose(),delete this.fullScreenPopup)},dispose(){if(!this.disposed)return this.disposeFullScreenPopup(),delete this.filterManager,delete this.datagrid,delete this._prevChangedFilter,g.__super__.dispose.call(this)}}),m=g},"./bundles/orofrontend/js/app/datafilter/plugins/frontend-filters-plugin.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/orotranslation/js/translator.js"),r=i("./bundles/orofrontend/js/app/datafilter/actions/fullscreen-filters-action.js"),a=i("./bundles/orofilter/js/plugins/filters-toggle-plugin.js"),l=i("./bundles/orofrontend/js/app/datafilter/fullscreen-filters.js").Z,d=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id),c=n.extend({className:"btn",icon:"filter",label:o("oro.filter.datagrid-toolbar.filters"),ariaLabel:o("oro.filter.datagrid-toolbar.aria_label")},d.launcherOptions||{}),u=a.extend({constructor:function e(t,i){e.__super__.constructor.call(this,t,i)},initialize(e){u.__super__.initialize.call(this,e),this.fullscreenFilters=new l({datagrid:this.main}),this.listenToOnce(this.main,"filterManager:connected",(()=>{this.fullscreenFilters.onceFilterManagerConnected()}))},onBeforeToolbarInit(e){this.addAction(e)},addAction(e){let t={datagrid:this.main,launcherOptions:c,order:d.order||50,fullscreenFilters:this.fullscreenFilters},i=r;n.isObject(e.customAction)&&(e.customAction.constructor&&(i=e.customAction.constructor),t=Object.assign({},t,e.customAction.options)),e.addToolbarAction(new i(t))},dispose(){this.disposed||(this.disable(),this.fullscreenFilters&&!this.fullscreenFilters.disposed&&(this.fullscreenFilters.dispose(),delete this.fullscreenFilters),u.__super__.dispose.call(this))}});return u}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofrontend/js/app/plugins/frontend-datagrid-settings-plugin.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/orotranslation/js/translator.js"),r=i("./bundles/oroui/js/tools.js"),a=i("./bundles/orodatagrid/js/datagrid/action/show-component-action.js"),l=i("./bundles/orodatagrid/js/app/plugins/grid/datagrid-settings-plugin.js"),d=i("./bundles/orodatagrid/js/app/views/grid/datagrid-settings-view.js");let c=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);return c=n.extend({icon:"cog",wrapperClassName:"datagrid-settings",label:o("oro.datagrid.settings.title"),ariaLabel:o("oro.datagrid.settings.title_aria_label"),attributes:{"data-placement":r.isMobile()?"bottom-end":"left-start"}},c),l.extend({onBeforeToolbarInit:function(e){const t={datagrid:this.main,launcherOptions:n.extend(c,{componentConstructor:e.componentConstructor||d,columns:this.main.columns,collection:this.main.columns,allowDialog:!1},e.datagridSettings),order:600};e.addToolbarAction(new a(t))}})}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofrontend/js/app/plugins/plugin-elastic-swipe-actions.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/app/plugins/base/plugin.js"),s=i("./bundles/oroui/js/viewport-manager.js").Z,n=i("./bundles/oroui/js/mediator.js"),o=i("./bundles/oroui/js/extend/underscore.js"),r=i("./bundles/oroui/js/extend/jquery.js"),a=t.extend({currentSwipedContainer:null,containerSelector:".grid-row",breakPointPosition:50,breakFactor:.3,maxLimit:125,swipeDoneClassName:"swipe-done",swipeActionClassName:"swipe-active",elastic:!1,storedPos:0,sizerSelector:".action-cell",viewport:"tablet",enabled:!1,events:{swipestart:"_onStart",swipemove:"_onMove",swipeend:"_onEnd"},constructor:function e(t,i){e.__super__.constructor.call(this,t,i)},initialize:function(e,t){return o.extend(this,o.pick(t||{},["containerSelector","breakPointPosition","maxLimit","swipeDoneClassName","elastic","viewport","sizerSelector"])),n.on(`viewport:${this.viewport}`,this.onViewportChange,this),a.__super__.initialize.call(this,e,t)},isApplicable:function(){return s.isApplicable(this.viewport)},enable:function(){if(!this.enabled&&this.isApplicable(this.viewport))return this.delegateEvents(),a.__super__.enable.call(this)},disable:function(){if(this.enabled)return this._revertState(),this.undelegateEvents(),delete this.currentSwipedContainer,delete this.storedPos,a.__super__.disable.call(this)},dispose:function(){if(!this.disposed)return this.disable(),a.__super__.dispose.call(this)},onViewportChange:function(e){e.matches?this.enable():this.disable()},_applyDynamicOffset:function(e){if(!e.find(this.sizerSelector).length)return;const t=e.find(this.sizerSelector).outerWidth();this.maxLimit=t,this.breakPointPosition=t*this.breakFactor,e.css({paddingRight:t,marginRight:-t})},_onStart:function({target:e}){const t=r(e).closest(this.containerSelector);this.sizerSelector&&this._applyDynamicOffset(t),this.currentSwipedContainer&&!r(this.currentSwipedContainer).is(t)&&this._revertState(),this.currentSwipedContainer=t,this.currentSwipedContainer.css({transition:""}),this.currentSwipedContainer.hasClass(this.swipeDoneClassName)&&(this.storedPos=parseInt(this.currentSwipedContainer.data("offset"))),this.currentSwipedContainer.addClass(this.swipeActionClassName)},_onMove:function({detail:e}){const t=e.x-this.storedPos;!this.elastic&&("left"===e.direction&&Math.abs(t)>this.maxLimit||"right"===e.direction&&t>0)||this.currentSwipedContainer.css({transform:"translateX("+t+"px)"})},_onEnd:function({detail:e}){let t=e.x-this.storedPos;"right"===e.direction&&t>0&&(t=0),"left"===e.direction&&Math.abs(t)<this.breakPointPosition||"right"===e.direction&&Math.abs(t)<this.maxLimit-this.breakPointPosition?this._revertState():(Math.abs(t)>this.breakPointPosition&&(this.currentSwipedContainer.data("offset",this.maxLimit),this.currentSwipedContainer.css({transform:"translateX(-"+this.maxLimit+"px)",transition:"all 200ms ease-out"}),this.storedPos=0,this.currentSwipedContainer.addClass(this.swipeDoneClassName)),this.currentSwipedContainer.removeClass("swipe-active"))},_revertState:function(){this.enabled&&this.currentSwipedContainer&&(this.currentSwipedContainer.data("offset",0),this.storedPos=0,this.currentSwipedContainer.css({transform:"translateX(0)",transition:"all 200ms ease-out"}),this.currentSwipedContainer.removeClass(this.swipeDoneClassName),this.currentSwipedContainer.removeClass(this.swipeActionClassName))}});return a}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofrontend/js/app/views/counter-badge-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/app/views/base/view.js"),s=t.extend({optionNames:t.prototype.optionNames.concat(["count"]),tagName:"span",className:"badge badge--info badge--xs badge--offset-none",count:0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.setCount(this.count),s.__super__.initialize.call(this,e)},setCount:function(e){this.$el.html(e||"").toggleClass("hidden",!e)}});return s}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofrontend/js/app/views/datagrid-settings/frontend-datagrid-settings-column-view.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/jquery.js"),o=i("./bundles/oroui/js/extend/underscore.js"),r=i("./bundles/orodatagrid/js/app/views/datagrid-settings-list/datagrid-settings-list-view.js"),a=i("./bundles/orofrontend/default/js/app/views/fullscreen-popup-view.js"),l=i("./bundles/oroui/js/viewport-manager.js").Z;let d=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);d=o.extend({className:"dropdown-menu",viewport:"mobile-landscape",popupOptions:{}},d);const c=r.extend({className:d.className,viewport:d.viewport,popupOptions:o.extend({},{popupBadge:!0,popupIcon:"fa-cog",popupLabel:o.__("oro_frontend.datagrid.manage_grid"),contentElement:null},o.pick(d.popupOptions,"popupBadge","popupIcon","popupLabel","popupCloseButton")),constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.viewport=o.extend(this.viewport,e.viewport||{}),this.popupOptions.contentElement=this.$el,this.popupOptions=o.extend({},this.popupOptions,e.popupOptions||{}),c.__super__.initialize.call(this,e)},beforeOpen:function(e){const t=n(e.target).find('[data-toggle="dropdown"]').data("bs.dropdown");t&&(t._inNavbar=!!l.isApplicable(this.viewport)||t._detectNavbar())},updateStateView:function(){l.isApplicable(this.viewport)?(this.setFullScreenViewDesign(!0),this.fullscreenView=new a(this.popupOptions),this.fullscreenView.on("close",(function(){this.setFullScreenViewDesign(!1),this.fullscreenView.dispose(),delete this.fullscreenView,this.$el.removeClass("show")}),this),this.fullscreenView.show()):c.__super__.updateStateView.call(this)},setFullScreenViewDesign:function(e){e?this.$el.removeClass(this.className).addClass("fullscreen"):this.$el.removeClass("fullscreen").addClass(this.className)}});return c}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofrontend/js/app/views/datagrid-settings/frontend-datagrid-settings-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/orodatagrid/js/app/views/grid/datagrid-settings-view.js"),s=i("./bundles/orofrontend/js/app/views/datagrid-settings/frontend-datagrid-settings-column-view.js"),n=i("./bundles/orodatagrid/js/app/views/grid/datagrid-manage-column-view.js"),o=t.extend({constructor:function e(t){e.__super__.constructor.call(this,t)},render:function(){o.__super__.render.call(this),this.subview("manageGrid",new n({_sourceElement:this.$el,grid:this.options.grid,columns:this.options.columns,collection:this.options.collection,datagridSettingsListView:s,enableFilters:!1}))},beforeOpen:function(e){o.__super__.beforeOpen.call(this,e),this.subview("manageGrid").beforeOpen(e)}});return o}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofrontend/js/app/views/lazy-init-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/oroui/js/app/views/base/view.js"),o=n.extend({constructor:function e(t){e.__super__.constructor.call(this,t)},optionNames:n.prototype.optionNames.concat(["lazy"]),options:null,lazy:"scroll",$window:null,listen:{"page:afterChange mediator":"_onPageAfterChange"},initialize:function(e){return this.options=e,"scroll"===this.lazy&&(this.$window=t(window),this.$window.on(`scroll${this.eventNamespace()}`,this._onScrollDemand.bind(this)),this._onScrollDemand()),o.__super__.initialize.call(this,e)},initLazyView:function(){const e=s.omit(this.options,"el","name");return this.initLayout(e)},_onScrollDemand:function(){this.$el.offset().top<window.pageYOffset+window.innerHeight/.5&&(this.initLazyView(),this.$window.off(`scroll${this.eventNamespace()}`))},_onPageAfterChange:function(){"scroll"===this.lazy?this._onScrollDemand():this.initLazyView()},dispose:function(){this.disposed||(this.$window.off(`scroll${this.eventNamespace()}`),delete this.$window,o.__super__.dispose.call(this))}});return o}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofrontend/js/datagrid/cell/frontend-action-cell.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/orodatagrid/js/datagrid/cell/action-cell.js"),o=i("./bundles/oroui/js/extend/underscore.js"),r=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id),a=n.extend({constructor:function e(t){return e.__super__.constructor.call(this,t)},initialize:function(e){a.__super__.initialize.call(this,e),o.isMobile()&&r.actionsHideCount&&(this.actionsHideCount=r.actionsHideCount)}});return a}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/orofrontend/js/datagrid/cell/frontend-action-header-cell.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/orodatagrid/js/datagrid/header-cell/action-header-cell.js").extend({render:function(){t.__super__.render.call(this),this.$el.attr({scope:"col"}),this.subview("actionsPanel").haveActions()||this.$el.addClass("action-column--disabled")}});return t}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofrontend/js/datagrid/frontend-grid.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/orodatagrid/js/datagrid/grid.js"),s=i("./bundles/orotranslation/js/translator.js"),n=t.extend({gridOptions:null,noDataTranslations:{entityHint:"oro.datagrid.entityHint",noColumns:"oro.datagrid.no.columns",noEntities:"oro.datagrid.no.entities",noResults:"oro_frontend.datagrid.no.results"},constructor:function e(t){e.__super__.constructor.call(this,t)},_initColumns:function(e){this.gridOptions=e,this.updateRowClassNames(),n.__super__._initColumns.call(this,e)},updateRowClassNames:function(){Object.keys(this.rowActions).length>0&&(this.gridOptions.rowClassName?this.gridOptions.rowClassName=this.gridOptions.rowClassName+" "+this.rowActionsClass:this.gridOptions.rowClassName=this.rowClassName+" "+this.rowActionsClass),this.gridOptions.multiSelectRowEnabled&&(this.gridOptions.rowClassName?this.gridOptions.rowClassName=this.gridOptions.rowClassName+" "+this.rowSelectClass:this.gridOptions.rowClassName=this.rowClassName+" "+this.rowSelectClass)},getEmptyGridMessage:function(e){const t=this.noColumnsFlag?this.noDataTranslations.noColumns:this.noDataTranslations.noEntities;return this.noDataTemplate({hints:s(t,e).replace("\n","<br />")})},getEmptyGridCustomMessage:function(e){return this.noDataTemplate({hints:e})},getEmptySearchResultMessage:function(e){return this.noDataTemplate({hints:s(this.noDataTranslations.noResults,e).replace("\n","<br />")})},getEmptySearchResultCustomMessage:function(e){return this.noDataTemplate({hints:e})}});return n}.call(t,i,t,e))||(e.exports=s)},"./bundles/orofrontend/js/datagrid/grid-views/frontend-grid-views-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/orotranslation/js/translator.js"),o=i("./bundles/oroui/js/tools.js"),r=i("./bundles/oroui/js/error.js"),a=i("./bundles/oroui/js/tools/manage-focus.js").Z,l=i("./bundles/orodatagrid/js/datagrid/grid-views/view.js"),d=i("./bundles/oroui/js/delete-confirmation.js"),c=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orodatagrid/templates/datagrid/view-name-error-modal.html");i("../node_modules/jquery-ui/ui/tabbable.js");const u=l.extend({attributes:{"data-layout":"separate"},templateSelector:".js-frontend-datagrid-grid-views-tpl",errorTemplate:c,defaultPrefix:n("oro_frontend.datagrid_views.all"),toggleAriaLabel:"oro_frontend.datagrid_views.toggleAriaLabel",route:"oro_api_frontend_datagrid_gridview_default",events:{"change [data-change-grid-view]":"onChange",'click [data-role="save"]':"onSave",'click [data-role="use_as_default"]':"onUseAsDefault",'click [data-role="save-new"]':"onSaveNew",'click [data-role="share"]':"onShare",'click [data-role="unshare"]':"onUnshare",'click [data-role="delete"]':"onDelete",'click [data-role="rename"]':"onRename",'click [data-role="discard_changes"]':"onDiscardChanges","click [data-cancel-edit]":"onCancelEdit","click .dropdown-menu":"onClickView","click [data-grid-view-update]":"onUpdate","hide.bs.dropdown":"onHideDropdown","show.bs.dropdown":"onOpenDropdown"},DeleteConfirmation:d,adjustDocumentTitle:!1,defaults:{actionsOptions:[{name:"save",icon:"floppy-o",priority:40},{name:"save_as",icon:"floppy-o",priority:40,enabled:!1},{name:"rename",icon:"pencil",priority:50},{name:"share",icon:"reply-all",priority:10},{name:"unshare",icon:"share",priority:10},{name:"discard_changes",icon:"undo",priority:30},{name:"delete",icon:"trash",priority:60},{name:"use_as_default",icon:"th",priority:20}],DeleteConfirmationOptions:{content:n("Are you sure you want to delete this item?")},elements:{gridViewName:"input[name=name]",gridViewDefault:"input[name=is_default]",gridViewUpdate:"[data-grid-view-update]"},titleOptions:{icon:null,iconClass:null,text:""}},hideTitle:null,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){let i=t(this.templateSelector).filter("[data-datagrid-views-name ="+e.gridName+"]");i.length||(i=t(this.templateSelector)),this.template=s.template(i.html()??""),this.templateSelector=null,this.errorTemplate=this.getTemplateFunction("errorTemplate"),s.isObject(e.gridViewsOptions)&&(this.titleOptions=s.extend(this.defaults.titleOptions,s.pick(e.gridViewsOptions,["icon","iconClass","text"])),this.titleOptions.text.length&&(e.title=n(this.titleOptions.text)),e.gridViewsOptions.hideTitle&&(this.hideTitle=t(e.gridViewsOptions.hideTitle))),this.togglePageTitles(!0),u.__super__.initialize.call(this,e)},render:function(){return u.__super__.render.call(this),this.$gridViewName=this.$(this.defaults.elements.gridViewName),this.$gridViewDefault=this.$(this.defaults.elements.gridViewDefault),this.$gridViewUpdate=this.$(this.defaults.elements.gridViewUpdate),this.$gridViewPopupContainer=this.$("[data-grid-view-popup-container]"),this.$gridViewSwitchEditButton=this.$("[data-switch-edit-button]"),this.$editContainer=this.$("[data-edit-container]"),this.$('[data-role="subtitle"]').attr("id",`subtitle-${this.uniqueId}`),this.$('[data-role="grid-views-list"]').attr("aria-labelledby",`subtitle-${this.uniqueId}`),this.initLayout(),this.restoreDropdownState(),this.updateButtonLabel(),this},renderTitle:function(){const e=this._getCurrentViewLabel();return this.titleTemplate({uniqueId:this.uniqueId,title:e,toggleAriaLabel:n(this.toggleAriaLabel,{choiceName:e}),iconClass:this.titleOptions.iconClass,icon:this.titleOptions.icon})},dispose:function(){this.disposed||(this.$gridViewPopupContainer.off(`keydown${this.eventNamespace()}`),this.$gridViewUpdate.off(),this._editableViewModel&&delete this._editableViewModel,delete this.$gridViewName,delete this.$gridViewDefault,delete this.$gridViewUpdate,delete this.$gridViewPopupContainer,delete this.$gridViewSwitchEditButton,delete this.$editContainer,this.togglePageTitles(),this.updateDropdownState(null),u.__super__.dispose.call(this))},onSave:function(e){const t=this._getEditableViewModel(e.currentTarget);this.updateDropdownState({elToFocus:o.getElementCSSPath(this.getInputRelatedToAction(e.currentTarget))}),this._onSaveModel(t)},onKeyDown:function(e){13===e.which&&document.activeElement===this.$gridViewName[0]?(e.stopPropagation(),this.$gridViewUpdate.trigger("click")):27===e.which&&document.activeElement===this.$gridViewName[0]&&this.$editContainer.hasClass("show")&&(e.stopPropagation(),this.switchEditMode(e,"hide"),this.restoreDropdownState())},onUpdate:function(e){e.stopPropagation();const t=this.getInputData(this.$el);if(void 0!==this._editableViewModel)this._editableViewModel.set(t,{silent:!0}),this._onRenameSaveModel(this._editableViewModel);else{const e=this._createBaseViewModel(t);e.isValid()&&this._onSaveAsModel(e)}},onSaveNew:function(e){this._editableViewModel&&delete this._editableViewModel,this.updateDropdownState({elToFocus:o.getElementCSSPath(this.$gridViewSwitchEditButton[0])}),this.switchEditMode(e,"show"),this.$gridViewName.trigger("focus")},onRename:function(e){this._editableViewModel=this._getEditableViewModel(e.currentTarget),this.updateDropdownState({elToFocus:o.getElementCSSPath(e.currentTarget)}),this.switchEditMode(e,"show",this._editableViewModel.get("is_default")),this.fillForm({name:this._editableViewModel.get("label"),is_default:this._editableViewModel.get("is_default")}),this.$gridViewName.trigger("focus")},updateButtonLabel:function(){const e=void 0===this._editableViewModel?this.$gridViewUpdate.data("text-add"):this.$gridViewUpdate.data("text-save");this.$gridViewUpdate.text(e)},switchEditMode:function(e,i,s){const n=t(e.currentTarget).data("switch-edit-mode")||i;s=s||!1,this.$("[data-checkbox-container]").toggleClass("hidden",s),this.updateButtonLabel(),this.fillForm(),this.toggleEditForm(n)},onCancelEdit:function(e){e.stopPropagation(),this.switchEditMode({},"hide"),this.restoreDropdownState()},onOpenDropdown:function(e){this.$gridViewPopupContainer.off(`keydown${this.eventNamespace()}`).on(`keydown${this.eventNamespace()}`,(e=>this.onKeyDown(e))),this.updateDropdownState({dropdownToggle:o.getElementCSSPath(e.relatedTarget),event:e.type})},onHideDropdown:function(e){this.$gridViewPopupContainer.off(`keydown${this.eventNamespace()}`),this.switchEditMode({},"hide"),this.updateDropdownState({event:e.type})},updateDropdownState:function(e){if(null!==e)for(const[t,i]of Object.entries(e))void 0===this._dropdownState&&(this._dropdownState={}),this._dropdownState[t]=i;else delete this._dropdownState},getDropdownState:function(){return{...this._dropdownState}},restoreDropdownState:function(){const e=this.getDropdownState();if(s.isEmpty(e))return;t(e.dropdownToggle).dropdown(e.event);const i=t(e.elToFocus);i.is(":tabbable")?i.trigger("focus"):a.focusTabbable(this.$gridViewPopupContainer)},toggleEditForm:function(e){"show"===e?(this.$gridViewSwitchEditButton.addClass("hide"),this.$editContainer.addClass("show")):"hide"===e&&(this.$gridViewSwitchEditButton.removeClass("hide"),this.$editContainer.removeClass("show"))},fillForm:function(e){const t=s.extend({name:"",is_default:!1},e);this.clearValidation(),this.$gridViewName.val(t.name),this.$gridViewDefault.attr("checked",t.is_default)},onClickView:function(e){this.$(e.target).is("[data-close]")||e.stopPropagation()},onChange:function(e){const i=t(e.target).val();this.updateDropdownState({elToFocus:o.getElementCSSPath(e.target)}),this.changeView(i),this._updateTitle(),this.prevState=this._getCurrentState(),this.viewDirty=!this._isCurrentStateSynchronized()},onDiscardChanges:function(e){this.updateDropdownState({elToFocus:o.getElementCSSPath(this.getInputRelatedToAction(e.currentTarget))}),this.changeView(t(e.currentTarget).data("choice-value"))},onUseAsDefault:function(e){this.updateDropdownState({elToFocus:o.getElementCSSPath(this.getInputRelatedToAction(e.currentTarget))}),u.__super__.onUseAsDefault.call(this,e)},onShare:function(e){this.updateDropdownState({elToFocus:o.getElementCSSPath(this.getInputRelatedToAction(e.currentTarget))}),u.__super__.onShare.call(this,e)},onUnshare:function(e){this.updateDropdownState({elToFocus:o.getElementCSSPath(this.getInputRelatedToAction(e.currentTarget))}),u.__super__.onUnshare.call(this,e)},onDelete:function(e){const{event:t,dropdownToggle:i}=this.getDropdownState(),s={event:t,dropdownToggle:i,elToFocus:o.getElementCSSPath(e.currentTarget)},n=u.__super__.onDelete.call(this,e);let r=!0;return n.on("ok",(()=>{s.elToFocus=null,r=!1})).on("close",(()=>{setTimeout((()=>{this.disposed||(this.updateDropdownState(s),r&&this.restoreDropdownState())}),0)})),n},onError:function(e,t,i){if(this.restoreDropdownState(),400===t.status){const i=t.responseJSON,s=i.errors?i.errors.children.label.errors:null,n=i.message,o=s?s[0]:n;o&&(this.fillForm({name:e.previous("label")}),this.setNameError(o),this.toggleEditForm("show"),this.$gridViewName.trigger("focus"))}else r.showErrorInUI(t)},onGridViewsModelInvalid:function(e){this.setNameError(s.first(e)),this.toggleEditForm("show")},clearValidation:function(){this.$(".validation-failed").remove(),this.$gridViewName.removeClass("error").attr({"aria-describedby":null,"aria-invalid":null})},setNameError:function(e){if(this.clearValidation(),e){const t=s.uniqueId("error-");e=this.errorTemplate({error:e,id:t}),this.$gridViewName.addClass("error").attr({"aria-describedby":t,"aria-invalid":!0}).after(e)}},_getEditableViewModel:function(e){const i=t(e).data("choice-value");return this.viewsCollection.get({name:i})},_getModelForDelete:function(e){return this._getEditableViewModel(e)},_getViewActions:function(){const e=[],t=this.defaults.actionsOptions,i=1===this.viewsCollection.length;return this.viewsCollection.each((function(n){let o=this._getActions(n);const r=s.find(t,{name:"use_as_default"});s.isObject(r)&&("system"===n.get("type")?r.enabled=void 0!==n&&!n.get("is_default")&&!!this._getCurrentDefaultViewModel()&&!i:r.enabled=void 0!==n&&!n.get("is_default")),o=this.updateActionsOptions(o,t),o=this.filterByPriority(o),e.push(o)}),this),e},_getViewIsDirty:function(e){const t=this.collection.state.gridView===e.id;return this.viewDirty&&t},updateActionsOptions:function(e,t){return t=t||{},s.each(e,(function(e,i){const n=s.find(t,{name:e.name})||{},o=s.omit(n,"name");s.extend(e,o||{})}),this),e},filterByPriority:function(e){return e.sort((function(e,t){return e.priority<t.priority?-1:e.priority>t.priority?1:0}))},showActions:function(e){const t=[];return s.each(e,(function(e){const i=s.some(e,(function(e){return e.enabled}));t.push(i)})),t},togglePageTitles:function(e){this.hideTitle&&this.hideTitle.toggleClass("hidden",!s.isUndefined(e)&&e)},getInputRelatedToAction:function(e){const t=this.$("[data-change-grid-view]").filter(((t,i)=>i.value===e.getAttribute("data-choice-value")));return t.length?t[0]:this.$("[data-change-grid-view]")[0]}});return u}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroimportexport/js/export-handler.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/orotranslation/js/translator.js"),i("./bundles/oroui/js/messenger.js")],void 0===(n=function(e,t,i){"use strict";return{handleExportResponse:function(s){let n,o;s.hasOwnProperty("success")&&s.success?(n=t("oro.importexport.export.success.message"),o="success"):(n=t("oro.importexport.export.fail.message"),o="error"),i.notificationMessage(o,n),s.messages&&e.each(s.messages,(function(t,s){e.each(t,(function(e){i.notificationMessage(s,e)}))}))},handleDataTemplateDownloadErrorMessage:function(){return i.notificationMessage("error",t("oro.importexport.export.error_template_download.message"))}}}.apply(t,s))||(e.exports=n)},"./bundles/oroimportexport/js/importexport-manager.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/extend/jquery.js"),n=i("./bundles/fosjsrouting/js/router.js"),o=i("./bundles/orowindows/js/widget/dialog-widget.js"),r=i("./bundles/oroimportexport/js/widget/import-dialog-widget.js"),a=i("./bundles/oroimportexport/js/export-handler.js"),l=i("./bundles/orotranslation/js/translator.js"),d=i("./bundles/oroui/js/mediator.js"),c=function(e){this.initialize(e)};return t.extend(c.prototype,{options:{entity:null,importTitle:"Import",importValidationTitle:"Import Validation",importRoute:"oro_importexport_import_form",importValidationRoute:"oro_importexport_import_validation_form",importJob:null,importValidateJob:null,exportTitle:"Export",exportProcessor:null,exportJob:null,exportRoute:"oro_importexport_export_instant",exportConfigRoute:"oro_importexport_export_config",isExportPopupRequired:!1,exportTemplateTitle:"Template",exportTemplateProcessor:null,exportTemplateJob:null,exportTemplateRoute:"oro_importexport_export_template",exportTemplateConfigRoute:"oro_importexport_export_template_config",isExportTemplatePopupRequired:!1,filePrefix:null,datagridName:null,afterRefreshPageMessage:null,refreshPageOnSuccess:!1,routeOptions:{},dialogOptions:{stateEnabled:!1,incrementalPosition:!1,dialogOptions:{maxWidth:650,width:650,autoResize:!0,modal:!0,minHeight:100}}},routeOptions:{},initialize:function(e){this.options=t.defaults(e||{},this.options),this.routeOptions={options:this.options.routeOptions,entity:this.options.entity,importJob:this.options.importJob,importValidateJob:this.options.importValidateJob,exportJob:this.options.exportJob,exportTemplateJob:this.options.exportTemplateJob}},handleImport:function(){this._renderImportDialogWidget({url:n.generate(this.options.importRoute,s.extend({},this.routeOptions)),dialogOptions:{title:this.options.importTitle},successMessage:l("oro.importexport.import.success.message"),errorMessage:l("oro.importexport.import.form_fail.message")})},handleImportValidation:function(){this._renderImportDialogWidget({url:n.generate(this.options.importValidationRoute,s.extend({},this.routeOptions)),dialogOptions:{title:this.options.importValidationTitle},successMessage:l("oro.importexport.import_validation.success.message"),errorMessage:l("oro.importexport.import_validation.form_fail.message")})},handleExport:function(){if(!this.options.exportProcessor)throw new TypeError('"exportProcessor" is required');let e;const t=s.extend(!0,{},this.routeOptions);t.options=s.extend(!0,{},t.options),d.trigger("import-export:handleExport",t.options),this.options.isExportPopupRequired?(e=n.generate(this.options.exportConfigRoute,s.extend({},t,{processorAlias:this.options.exportProcessor,filePrefix:this.options.filePrefix})),this._renderDialogWidget({url:e,dialogOptions:{title:this.options.exportTitle}})):(e=n.generate(this.options.exportRoute,s.extend({},t,{processorAlias:this.options.exportProcessor,filePrefix:this.options.filePrefix})),s.post(e,(function(e){a.handleExportResponse(e)}),"json"))},handleTemplate:function(){if(!this.options.exportTemplateProcessor)throw new TypeError('"exportTemplateProcessor" is required');let e;this.options.isExportTemplatePopupRequired?(e=n.generate(this.options.exportTemplateConfigRoute,s.extend({},this.routeOptions,{processorAlias:this.options.exportTemplateProcessor})),this._renderDialogWidget({url:e,dialogOptions:{title:this.options.exportTemplateTitle}})):(e=n.generate(this.options.exportTemplateRoute,s.extend({},this.routeOptions,{processorAlias:this.options.exportTemplateProcessor})),window.open(e))},_renderDialogWidget:function(e,t){const i=new(t||o)(s.extend(!0,{},this.options.dialogOptions,e));return i.render(),i},_renderImportDialogWidget:function(e){return this._renderDialogWidget(e,r)}}),c}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroimportexport/js/widget/import-dialog-widget.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/orowindows/js/widget/dialog-widget.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/orotranslation/js/translator.js"),o=i("./bundles/oroui/js/messenger.js");return t.extend({constructor:function e(t){e.__super__.constructor.call(this,t)},_onContentLoad:function(e){s.has(e,"success")?(e.success?o.notificationFlashMessage("success",this.options.successMessage):o.notificationFlashMessage("error",this.options.errorMessage),this.remove()):(delete this.loading,this.disposePageComponents(),this.setContent(e,!0),this._triggerContentLoadEvents())},_onContentLoadFail:function(){o.notificationFlashMessage("error",n("oro.importexport.import.fail.message")),this.remove()}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroorder/js/app/components/frontend-order-print.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var s=i("./bundles/oroui/js/extend/underscore.js"),n=i.n(s);const o={init:(e,t)=>(t.gridPromise.done(n().debounce((()=>{window.print()}),500)),e.resolve())}},"./bundles/oropricing/js/filter/frontend-product-price-filter.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>b});var s=i("./bundles/oropricing/js/filter/product-price-filter.js"),n=i.n(s),o=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oropricing/templates/product/pricing-range-filter.html"),r=i.n(o),a=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oropricing/templates/product/pricing-range-units-filter.html"),l=i.n(a),d=i("./bundles/orolocale/js/locale-settings.js"),c=i.n(d),u=i("./bundles/oroui/js/tools.js"),h=i.n(u),p=i("./bundles/oroui/js/error.js"),_=i.n(p),g=i("./bundles/orotranslation/js/translator.js"),m=i.n(g);const f=n().extend({template:r(),unitTemplate:l(),criteriaValueSelectors:{...n().prototype.criteriaValueSelectors,type:"[data-choice-value-select]"},typeValues:{...n().prototype.typeValues,moreThan:2,lessThan:6,equalsOrMoreThan:1,equalsOrLessThan:5},events:{"change [data-choice-value-select]":"_onChangeChoiceValue"},showChoices:!0,singleUnitMode:!1,defaultUnitCode:null,constructor:function e(t){this.singleUnitMode&&!this.defaultUnitCode&&_().showErrorInConsole("'defaultUnitCode' property should be defined when 'singleUnitMode' property is enabled"),e.__super__.constructor.call(this,t)},swapValues(e){return this.isApplicable(e.type)?(e.value&&e.value_end&&parseFloat(e.value_end)<parseFloat(e.value)&&([e.value,e.value_end]=[parseFloat(e.value_end),parseFloat(e.value)]),e):e},isUpdatable:(e,t)=>!h().isEqualsLoosely(e,t),_formatRawValue(e){const t=f.__super__._formatRawValue.call(this,e);return{...t,unit:this.singleUnitMode?this.defaultUnitCode:t.unit,value:t.value?t.value.toString():"",value_end:t.value_end?t.value_end.toString():""}},getTemplateData(){return{...f.__super__.getTemplateData.call(this),showChoices:this.showChoices,currency:{isPrepend:c().isCurrencySymbolPrepend(),symbol:c().getCurrencySymbol(),extended:c().getCurrencySymbol().length>1}}},getUnitTemplateData(){return{...f.__super__.getUnitTemplateData.call(this),...this.getTemplateDataProps(),singleUnitMode:this.singleUnitMode,defaultUnitCode:this.defaultUnitCode}},getTemplateDataProps(){return{...f.__super__.getTemplateDataProps.call(this),unitsListAriaLabel:m()("oro.pricing.filter.product_price.units_list.aria_label",{label:this.label})}}}),b=f},"./bundles/oropricing/js/filter/product-price-filter.js":(e,t,i)=>{var s,n;s=[i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oropricing/templates/product/pricing-filter.html"),i("./bundles/oroui/js/extend/jquery.js"),i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/orotranslation/js/translator.js"),i("./bundles/oroui/js/tools.js"),i("./bundles/orofilter/js/filter/number-range-filter.js")],void 0===(n=function(e,t,i,s,n,o){"use strict";const r=o.extend({unitTemplate:e,unitChoices:[],criteriaValueSelectors:{unit:'input[name="unit"]',type:"input.name_input"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){r.__super__.initialize.call(this,e),"string"==typeof this.unitTemplate&&(this.unitTemplate=i.template(t(this.unitTemplate).html())),i.defaults(this.emptyValue,{unit:i.isEmpty(this.unitChoices)?"":i.first(this.unitChoices).value,type:i.isEmpty(this.choices)?"":i.first(this.choices).value}),i.defaults(this.criteriaValueSelectors,r.__super__.criteriaValueSelectors)},_renderCriteria:function(){return this._checkAppendFilter(),r.__super__._renderCriteria.call(this)},dispose:function(){if(!this.disposed)return delete this.unitChoices,r.__super__.dispose.call(this)},_writeDOMValue:function(e){return this._setInputValue(this.criteriaValueSelectors.unit,e.unit),r.__super__._writeDOMValue.call(this,e)},_readDOMValue:function(){const e=r.__super__._readDOMValue.call(this);return e.unit=this._getInputValue(this.criteriaValueSelectors.unit),e},_getCriteriaHint:function(...e){const t=e.length>0?this._getDisplayValue(e[0]):this._getDisplayValue();if(this.isEmptyValue())return this.placeholder;let n=r.__super__._getCriteriaHint.apply(this,e),o="";return!i.isUndefined(t.unit)&&t.unit&&(o=i.findWhere(this.unitChoices,{value:t.unit}).shortLabel),n+=" "+s("oro.pricing.filter.product_price.per")+" "+o,n},_updateValueField:function(){r.__super__._updateValueField.call(this);const e=this.$(".value-field-frame");e.length&&e.css("margin-right",0)},_onClickChoiceValue:function(e){const i=t(e.currentTarget);if(!i.closest(".product-price-unit-filter").get(0))return r.__super__._onClickChoiceValue.call(this,e);{i.parent().parent().find("li").each((function(){t(this).removeClass("active")})),i.parent().addClass("active");const s=i.parent().parent().parent(),n=i.attr("data-value");let o=i.html();const r=this.$(this.criteriaValueSelectors.unit).val(n);this.fixSelects(),r.trigger("change"),o+=this.caret,s.find('[data-toggle="dropdown"]').html(o),this._handleEmptyFilter(n),e.preventDefault()}},_beforeApply:function(){this._updateNegativeValue(this._readDOMValue()),r.__super__._beforeApply.call(this)},_checkAppendFilter:function(){this._appendFilter!==this._appendUnitFilter&&(this._appendUnitFilter._appendFilter=this._appendFilter,this._appendFilter=this._appendUnitFilter)},_updateNegativeValue:function(e){const t=this._formatRawValue(e),i=n.deepClone(t);t.value=Math.abs(t.value),t.value_end=Math.abs(t.value_end),n.isEqualsLoosely(t,i)||this._writeDOMValue(this._formatDisplayValue(t))},getUnitTemplateData(){const e=i.extend({},this.emptyValue,this.value);let t="";return i.isEmpty(this.unitChoices)||(t=i.find(this.unitChoices,(function(t){return t.value===e.unit})).label),{choices:this.unitChoices,selectedChoice:e.unit,selectedChoiceLabel:t}},_appendUnitFilter:function(e){if(""===e)return this;const i=t(this.unitTemplate(this.getUnitTemplateData()));e.addClass("product-price-filter-criteria"),e.find(".filter-value").append(i),this._appendUnitFilter._appendFilter.call(this,e)}});return r}.apply(t,s))||(e.exports=n)},"./bundles/oroproduct/js/app/components/catalog-switch-component.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/app/components/base/component.js"),s=i("./bundles/orodatagrid/js/url-helper.js"),n=i("./bundles/oroui/js/extend/jquery.js"),o=i("./bundles/oroui/js/extend/underscore.js"),r=i("./bundles/oroui/js/tools.js"),a=i("./bundles/oroui/js/mediator.js"),l=t.extend(o.extend({},s,{parameterName:null,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){l.__super__.initialize.call(this,e),this.parameterName=e.parameterName,e._sourceElement.on("click","[data-catalog-view-trigger]",this._onSwitch.bind(this))},_onSwitch:function(e){if(""!==location.search){e.preventDefault();const t=n(e.currentTarget).data("catalog-view-trigger"),i=this.updateUrlParameter(location.href,this.parameterName,t);a.execute("redirectTo",{url:i},{redirect:!0})}},updateUrlParameter:function(e,t,i){const s=e.split("?");let n={};return s.length>1&&(n=r.unpackFromQueryString(s[1])),n[t]||(n[t]={}),o.extend(n[t],i),s[1]=r.packToQueryString(n),s.join("?")}}));return l}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroproduct/js/app/datagrid/backend-actions-panel.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/orotranslation/js/translator.js"),n=i("./bundles/orodatagrid/js/datagrid/actions-panel.js"),o=i("./bundles/orofrontend/default/js/app/views/dropdown-search.js").default,r=i("./bundles/oroproduct/js/app/buttons-order.js").Z,a=n.extend({constructor:function e(t){e.__super__.constructor.call(this,t)},minimumResultsForSearch:5,render:function(){const e=this.launchers.filter((e=>"addproducts"===e.action.type)).length;return this.launchers.forEach((t=>{const i=t.getTemplateData().attributes||{};e>1&&t.action.is_current&&(i["data-label"]=s("oro.product.frontend.actions_panel.action_postfix")),t.setOptions({attributes:i})})),a.__super__.render.call(this),this.postRender(),this},renderMainLauncher(){const e=this.launchers.filter((e=>e.action.is_current))[0]||this.launchers[0];return this.$el.empty(),this.$el.append(e.render().$el),e.trigger("appended"),this},postRender(){this.renderGroups(),this.renderSearch(),this.composeGroups()},renderGroups(){const e=this.$el.children();let i=t();return e.each((function(){const e=t(this).data("order")||"add";0===i.filter((function(){return t(this).is(`[data-group-order="${e}"]`)})).length&&(i=i.add(t(`<ul class="items-group" data-group-order="${e}" role="menu""></ul>`)))})),i.each((function(){const i=t(this).data("group-order");e.filter((function(){return(t(this).data("order")||"add")===i})).wrapAll(t(this)).wrap('<li role="menuitem"></li>')})),this},renderSearch(){if(this.$el.find('.items-group > li[role="menuitem"]').length<=this.minimumResultsForSearch)return;0===this.$('[data-role="search"]').length&&this.$el.children(":first").before(t('<div class="dropdown-item" data-role="search" data-group-order="search"></div>'));const e=new o({minimumResultsForSearch:this.minimumResultsForSearch,el:this.el});return this.subview("dropdown-search",e),this},composeGroups(){const e=this.$("[data-group-order]");return e.detach().sort(((e,i)=>{const s=r[t(e).data("group-order")],n=r[t(i).data("group-order")];return s<n?-1:s>n?1:0})),this.$el.append(e),e.filter((function(){return"search"!==t(this).data("group-order")})).wrapAll('<div class="item-container"></div>'),this},getMainLauncher(){return this.launchers.filter((e=>e.action.is_current))[0]||this.launchers[0]}});return a}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroproduct/js/app/datagrid/backend-datagrid-component.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/orofrontend/js/app/components/frontend-datagrid-component.js"),s=i("./bundles/oroproduct/js/app/datagrid/map-custom-module-name.js"),n=t.extend({constructor:function e(t){e.__super__.constructor.call(this,t)},collectModules:function(){this.metadata.GridView&&(this.modules.GridView=s(this.metadata.GridView)),this.metadata.PageableCollection&&(this.modules.PageableCollection=s(this.metadata.PageableCollection)),n.__super__.collectModules.call(this)},insertDataGrid:function(e){const t=e.gridMainContainer||".oro-datagrid";this.$el=e.$el.find(t)},build:function(...e){n.__super__.build.apply(this,e),this.grid.on("shown",(function(){this.$el.removeAttr("data-skip-input-widgets").inputWidget("seekAndCreate")}),this)},dispose:function(){this.grid.off(null,null,this),n.__super__.dispose.call(this)}});return n}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroproduct/js/app/datagrid/backend-grid.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/oroui/js/extend/jquery.js"),r=i("./bundles/orotranslation/js/translator.js"),a=i("./bundles/oroui/js/mediator.js"),l=i("./bundles/oronavigation/js/app/services/page-state-checker.js"),d=i("./bundles/orofrontend/js/datagrid/frontend-grid.js"),c=i("./bundles/oroproduct/js/app/datagrid/backend-toolbar.js"),u=i("./bundles/oroproduct/js/app/datagrid/header-cell/backend-select-all-header-cell.js"),h=i("./bundles/oroproduct/js/app/datagrid/header-cell/backend-action-header-cell.js"),p=i("./bundles/oroproduct/js/app/datagrid/products-select-state-model.js");let _=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);_=n.extend({massActionsContainer:"[data-mass-actions-container]",massActionsStickyContainer:"[data-mass-actions-sticky-container]"},_);const g=d.extend({toolbar:c,themeOptions:{optionPrefix:"backendgrid"},massActionsContainer:_.massActionsContainer,massActionsStickyContainer:_.massActionsStickyContainer,visibleState:{visible:null},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.header=null,this.footer=null,this.body=null,this.multiSelectRowEnabled=e.multiSelectRowEnabled,this.optimizedScreenSize=e.metadata.options.optimizedScreenSize||"tablet",a.on("grid-content-loaded",(function(e){this.updateGridContent(e)}),this),g.__super__.initialize.call(this,e),a.on("widget:notFound",(function(){o(window).off("beforeunload")})),this.hasSelections=this.hasSelections.bind(this),l.registerChecker(this.hasSelections),this._listenToDocumentEvents()},_listenToDocumentEvents:function(){o(window).on("beforeunload."+this.cid,this.onWindowUnload.bind(this))},updateGridContent:function(e){this.$el.find(".grid-body").html(e.gridContent.html()),a.trigger("datagrid_filters:update",this),this.collection.updateState(e.responseJSON.data.options),this.collection.reset(e.responseJSON.data.data),this._afterRequest(e)},backgridInitialize:function(){null===this.selectState&&(this.selectState=new p),this.listenTo(this.collection,{remove:this.onCollectionModelRemove,updateState:this.onCollectionUpdateState,"backgrid:selected":this.onSelectRow,"backgrid:selectAll":this.selectAll,"backgrid:selectAllVisible":this.selectAllVisible,"backgrid:selectNone":this.selectNone,"backgrid:isSelected":this.isSelected,"backgrid:getSelected":this.getSelected,"backgrid:setVisibleState":this.setVisibleState,"backgrid:getVisibleState":this.getVisibleState,"backgrid:checkUnSavedData":this.checkUnSavedData,"backgrid:hasMassActions":this.hasMassActions})},render:function(){this.$grid=this.$(this.selectors.grid),this.renderToolbar(),this.renderNoDataBlock(),this.renderLoadingMask(),this.multiSelectRowEnabled&&this.renderActionsArea(),this.listenTo(this.collection,"reset",this.renderNoDataBlock),this._deferredRender(),a.trigger("grid_load:complete",this.collection,this.$grid),this.initLayout({collection:this.collection}).always((()=>{this.rendered=!0,this.trigger("rendered"),a.trigger("grid_render:complete",this.$el),this._resolveDeferredRender()})),this.rendered=!0;const e=this;return this.switchAppearanceClass(n.result(this.metadata.state,"appearanceType")),this.collection.on("gridContentUpdate",(function(){e._beforeRequest()})),this},_afterRequest:function(e){1===this.requestsCount&&this.initLayout({collection:this.collection}),g.__super__._afterRequest.call(this,e)},undelegateEvents:function(){this.collection.off("gridContentUpdate"),a.off("grid-content-loaded"),g.__super__.undelegateEvents.call(this)},renderActionsArea:function(){this.massActions.length&&(this.selectAllHeaderCell=new u({collection:this.collection,selectState:this.selectState,optimizedScreenSize:this.optimizedScreenSize}),o(this.massActionsContainer).append(this.selectAllHeaderCell.$el),this.selectHeaderActionCell=new h({collection:this.collection,column:this.columns.findWhere("massActions"),selectState:this.selectState,optimizedScreenSize:this.optimizedScreenSize}),o(this.massActionsStickyContainer).append(this.selectHeaderActionCell.$el))},setVisibleState:function(e){this.visibleState.visible=e,this.$el.toggleClass("row-selection-enabled",e)},getVisibleState:function(e){o.isEmptyObject(e)&&n.isBoolean(this.visibleState.visible)&&(e.visible=this.visibleState.visible)},hasMassActions:function(e){o.isEmptyObject(e)&&(e.hasMassActions=!!this.massActions.length)},getMassActions:function(){return this.metadataModel.get("massActions")},setMassActions:function(e){this.metadataModel.set("massActions",e)},onWindowUnload:function(){if(this.hasSelections())return r("oro.ui.leave_page_with_unsaved_data_confirm")},hasSelections:function(){return!this.selectState.isEmpty()},checkUnSavedData:function(e){let t=!0;const i=this;this.selectState.isEmpty()||(t=function(){const e=window.confirm(r("oro.ui.leave_page_with_unsaved_data_confirm"));return e&&i.collection.trigger("backgrid:selectNone"),e}()),o.isEmptyObject(e)&&(e.live=t)},dispose:function(){l.removeChecker(this.hasSelections),g.__super__.dispose.call(this),o(window).off("."+this.cid)},setGridAriaAttrs(){}});return g}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/oroproduct/js/app/datagrid/backend-page-size.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orodatagrid/js/datagrid/page-size.js").extend({themeOptions:{optionPrefix:"backendpagesize",el:"[data-grid-pagesize]"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){s.__super__.initialize.call(this,e)},onChangePageSize:function(e){const t={};this.collection.trigger("backgrid:checkUnSavedData",t),t.live?s.__super__.onChangePageSize.call(this,e):this.render()},render:function(){const e=this.$el.find("[data-grid-pagesize-selector]"),i=t.filter(this.items,(e=>void 0===e.size?this.collection.state.pageSize===e:this.collection.state.pageSize===e.size));return e.find("option").removeAttr("selected",!1).filter("[value="+i[0]+"]").attr("selected",!0),e.inputWidget("val",i[0]),this.hidden&&this.$el.hide(),this}});return s}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroproduct/js/app/datagrid/backend-pageable-collection.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/oroui/js/mediator.js"),o=i("./bundles/orodatagrid/js/pageable-collection.js"),r=i("./bundles/oroui/js/layout-subtree-manager.js"),a=i("./bundles/oroui/js/tools.js"),l=i("./bundles/oroui/js/error.js");return o.extend({constructor:function e(...t){e.__super__.constructor.apply(this,t)},fetch:function(e){this.trigger("beforeFetch",this,e),this._fetch(e)},_fetch:function(e){this.trigger("gridContentUpdate"),e=s.defaults(e||{},{reset:!0});const i=this._checkState(this.state);let o=e.data||{};const d=e.url||s.result(this,"url")||"",c=d.indexOf("?");-1!==c&&s.extend(o,a.unpackFromQueryString(d.slice(c+1))),e.data=o,o.appearanceType=i.appearanceType,o=this.processQueryParams(o,i),this.processFiltersParams(o,i),r.get("product_datagrid",e.data,(function(e){const i=t("<div/>").append(e);if(i.find("[data-server-render]").length){const e=i.find("[data-server-render]").data("page-component-options");if(e){const t={responseJSON:e,gridContent:i.find(".grid-body")};n.trigger("grid-content-loaded",t)}else l.showError(s.__("oro_frontend.datagrid.requires.options"))}else l.showError(s.__("oro_frontend.datagrid.requires.data"))}))}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroproduct/js/app/datagrid/backend-pagination-input.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orodatagrid/js/datagrid/pagination-input.js").extend({themeOptions:{optionPrefix:"backendpagination",el:"[data-grid-pagination]"},constructor:function e(t){e.__super__.constructor.call(this,t)},makeHandles:function(e){return e=s.__super__.makeHandles.call(this,e),t.each(e,(function(e){const t=this.$el.find("[data-grid-pagination-direction="+e.direction+"]");t.length&&(e.className||!this.enabled?t.addClass("disabled").attr("tabindex",-1):t.removeClass("disabled").removeAttr("tabindex"))}),this),e},onChangePage:function(e){const t={};e.preventDefault(),this.collection.trigger("backgrid:checkUnSavedData",t),t.live&&s.__super__.onChangePage.call(this,e)},onChangePageByInput:function(e){const t={};this.collection.trigger("backgrid:checkUnSavedData",t),t.live&&s.__super__.onChangePageByInput.call(this,e)},render:function(){const e=this.collection.state,t=e.totalPages||1;return null===e.totalRecords||(this.makeHandles(),this.$el.find("[data-grid-pagination-pages]").text(t),this.$el.find("[data-grid-pagination-records]").text(e.totalRecords),this.$("input").val(0===e.firstPage?e.currentPage+1:e.currentPage).attr("disabled",!this.enabled||!e.totalRecords).numeric({decimal:!1,negative:!1}),this.hidden||1===t?this.$el.hide():this.$el.show()),this}});return s}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroproduct/js/app/datagrid/backend-toolbar.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orodatagrid/js/datagrid/toolbar.js"),n=i("./bundles/oroproduct/js/app/datagrid/backend-pagination-input.js"),o=i("./bundles/oroproduct/js/app/datagrid/backend-page-size.js"),r=i("./bundles/oroproduct/js/app/datagrid/sorting/backend-dropdown.js"),a=s.extend({template:null,pagination:n,pageSize:o,sortingDropdown:r,themeOptions:{optionPrefix:"backendtoolbar"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(!(e=e||{}).collection)throw new TypeError('"collection" is required');this.collection=e.collection;const i=t.defaults({collection:this.collection},e.pagination),s=t.defaults({collection:this.collection},e.pageSize);e.columns.trigger("configureInitializeOptions",this.pagination,i,this),e.columns.trigger("configureInitializeOptions",this.pageSize,s,this),e.pagination=i,e.pageSize=s,e.className&&this.$el.addClass(e.className),a.__super__.initialize.call(this,e)},render:function(){let e;return this.subviews.pagination&&(e=this.subviews.pagination.render().$el,e.attr("class",this.$(this.selector.pagination).attr("class")),this.$(this.selector.pagination).replaceWith(e)),this.subviews.pageSize&&this.$(this.selector.pagesize).append(this.subviews.pageSize.render().$el),this.subviews.actionsPanel&&this.$(this.selector.actionsPanel).append(this.subviews.actionsPanel.render().$el),this.subviews.itemsCounter&&this.$(this.selector.itemsCounter).append(this.subviews.itemsCounter.render().$el),this.subviews.sortingDropdown&&this.$(this.selector.sortingDropdown).append(this.subviews.sortingDropdown.render().$el),this.subviews.extraActionsPanel&&(this.subviews.extraActionsPanel.haveActions()?this.$(this.selector.extraActionsPanel).append(this.subviews.extraActionsPanel.render().$el):this.$(this.selector.extraActionsPanel).hide()),this}});return a}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroproduct/js/app/datagrid/cell/backend-select-row-cell.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/orotranslation/js/translator.js"),o=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroproduct/templates/datagrid/backend-select-row-cell.html"),r=i("./bundles/orodatagrid/js/datagrid/cell/select-row-cell.js"),a=i("./bundles/oroui/js/viewport-manager.js").Z,l=r.extend({autoRender:!0,tagName:"div",template:o,checkboxSelector:'[data-role="select-row-cell"]',text:n("oro.product.grid.select_product"),listen(){return{[`viewport:${this.getScreenSize()} mediator`]:"defineRenderingStrategy"}},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){const i={};e.productModel&&(this.model=e.productModel),this.model.trigger("backgrid:hasMassActions",i),i.hasMassActions?(this.$container=t(e._sourceElement),this.template=this.getTemplateFunction(),this.listenTo(this,"render-mode:changed",(e=>this.render())),this.model.on("backgrid:select",((e,t)=>{this.$(":checkbox").prop("checked",t).change()})),this.model.on("backgrid:canSelected",(e=>{this.hideView(!e&&this._isSimple())}))):this.dispose()},defineRenderingStrategy(){const e=this.renderMode;this._isSimple()?this.renderMode="Simple":this.renderMode="Dropdown",e!==this.renderMode&&this.trigger("render-mode:changed",{prevRenderMode:e,renderMode:this.renderMode})},render:function(){const e={};let t=this._isSimple();const i={selected:!1};return this.model.trigger("backgrid:isSelected",this.model,i),this.model.trigger("backgrid:getVisibleState",e),s.isEmpty(e)||(t=!e.visible),this.$el.html(this.template({checked:i.selected,text:this.text,isSimple:this._isSimple()})),this.$checkbox=this.$el.find(this.checkboxSelector),this.$container.append(this.$el),this.hideView(t),this},_isSimple(){return a.isApplicable(this.getScreenSize())},getScreenSize(){let e="tablet";try{const t=this.model.collection.options.optimizedScreenSize;t&&(e=t)}catch(e){}return e},hideView:function(e){this.$el.toggleClass("hidden",e)},dispose:function(){this.disposed||(delete this.hide,delete this.$container,this.model&&this.model.off(null,null,this),l.__super__.dispose.call(this))}});return l}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroproduct/js/app/datagrid/datagrid-product-lazy-init-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/orofrontend/js/app/views/lazy-init-view.js").extend({constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){t.__super__.initialize.call(this,e),"scroll"===this.lazy&&this.listenToOnce(this.collection,{reset:this.dispose,"backgrid:selectAllVisible":this._onSelectAllVisible})},_onSelectAllVisible:function(){this.initLazyView().then((()=>{this.collection.trigger("backgrid:selectAllVisible")}))}});return t}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroproduct/js/app/datagrid/frontend-product-display-options-builder.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/orodatagrid/js/url-helper.js"),n=i("./bundles/oroui/js/app/components/base/component.js").extend({constructor:function e(t){e.__super__.constructor.call(this,t)},datagrid:null,displaySelector:null,initialize:function(e){this.datagrid=e.grid,this.displaySelector=e.options.metadata.options.displayOptions.selector,this.listenTo(this.datagrid.collection,"reset",this._addDatagridStateTo),this._addDatagridStateTo(),n.__super__.initialize.call(this,e)},_addDatagridStateTo:function(){const e=this;t(this.displaySelector).find("a").each((function(i,n){const o=t(n),r=o.attr("href"),a=e.datagrid.collection.stateHashKey(),l=e.datagrid.collection.stateHashValue();o.attr("href",s.addUrlParameter(r,a,l))}))}});return{init:function(e,t){t.gridPromise.done((function(i){const s=new n({grid:i,options:t});e.resolve(s)})).fail((function(){e.reject()}))}}}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroproduct/js/app/datagrid/frontend-product-filters-events-dispatcher-builder.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/mediator.js"),s=i("./bundles/oroui/js/app/components/base/component.js").extend({constructor:function e(t){e.__super__.constructor.call(this,t)},datagrid:null,initialize:function(e){this.datagrid=e.grid,this.listenTo(this.datagrid.collection,"sync",this.triggerFiltersUpdateEvent),this.listenTo(this.datagrid,"filterManager:connected",this.triggerFiltersUpdateEvent),s.__super__.initialize.call(this,e)},triggerFiltersUpdateEvent:function(){t.trigger("datagrid_filters:update",this.datagrid)}});return{init:function(e,t){t.gridPromise.done((function(i){const n=new s({grid:i,options:t});e.resolve(n)})).fail((function(){e.reject()}))}}}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroproduct/js/app/datagrid/frontend-product-process-options-builder.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>n});const s={optimizedScreenSize:"tablet",...(0,i("./bundles/oroui/js/app/services/module-config.js").Z)(e.id)},n={processDatagridOptions:(e,t)=>(t.metadata.options.optimizedScreenSize=s.optimizedScreenSize,e.resolve(),e),init:(e,t)=>e.resolve()}},"./bundles/oroproduct/js/app/datagrid/grid-sidebar-filters-builder.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>F});var s=i("./bundles/oroui/js/extend/jquery.js"),n=i.n(s),o=i("./bundles/oroui/js/mediator.js"),r=i.n(o),a=i("./bundles/oroproduct/js/app/views/sidebar-filters/filter-items-hint-view.js"),l=i("./bundles/oroui/js/app/views/base/view.js"),d=i.n(l),c=i("./bundles/oroui/js/extend/underscore.js"),u=i.n(c);const h=d().extend({attributes:{class:"filter-extra-hint"},hintContentClass:"filter-extra-hint-text",hintContainerSelector:".filter-item-hint",filter:null,keepElement:!0,tagName:"span",optionNames:d().prototype.optionNames.concat(["filter","hintContentClass","hintContainerSelector"]),constructor:function e(t){e.__super__.constructor.call(this,t)},initialize(e){if(!e.filter)throw new Error("Required option filter not found.");this.listenTo(this.filter,{update:this.updateHintContent,rendered:this.render}),this.setElement(this.getHintContainer()),h.__super__.initialize.call(this,e)},render(){return this.$el.empty(),this.$el.attr(this.attributes),this.updateHintContent(),this},getHintContainer(){return this.filter.$el.find(this.hintContainerSelector)},updateHintContent(){let{hint:e}=this.filter.getState();return null===e&&(e=""),e=e.trim(),e.length?this.el.setAttribute("title",e):this.el.removeAttribute("title"),this.el.innerHTML=`<span class="${this.hintContentClass}">${u().escape(e)}</span>`,this},dispose:function(){this.disposed||(this.$el.removeAttr("title class").addClass(this.hintContainerSelector.substring(1)),delete this.filter,h.__super__.dispose.call(this))}}),p=h;var _=i("./bundles/oroui/js/app/components/base/component.js"),g=i.n(_),m=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroproduct/templates/sidebar-filters/filter-applier.html"),f=i.n(m),b=i("./bundles/orotranslation/js/translator.js"),v=i.n(b),w=i("./bundles/oroui/js/extend/popper.js");const j=d().extend({template:f(),className:"apply-filters",buttonOptions:{label:v()("oro.filter.updateButton.text"),classes:"btn btn--action btn--size-s"},events:{'click [data-role="apply"]':"onClick"},optionNames:d().prototype.optionNames.concat(["buttonOptions"]),constructor:function e(t){e.__super__.constructor.call(this,t)},getTemplateData:function(){const e=j.__super__.getTemplateData.call(this);return e.buttonOptions=this.buttonOptions,e},dispose:function(){this.disposed||(this.destroyPopper(),j.__super__.dispose.call(this))},initPopper(e,t){e&&t&&(this.destroyPopper(),this.popper=new w.default(e,t,{placement:"right",positionFixed:!1,removeOnDestroy:!1,modifiers:{offset:{offset:"0, 6"},flip:{enabled:!0,fn:(e,t)=>(w.default.Defaults.modifiers.flip.fn(e,t),e.flipped&&(e.placement="top",w.default.Defaults.modifiers.flip.fn(e,t)),e)},arrow:{element:".arrow"},preventOverflow:{boundariesElement:"window"}}}))},destroyPopper(){this.popper&&(this.popper.destroy(),this.popper=null)},updatePosition(){!this.disposed&&this.popper&&this.popper.scheduleUpdate()},stick(e){this.disposed||(this.initPopper(e,this.el),this.$el.removeClass("hide"))},unstick(){this.disposed||(this.$el.addClass("hide"),this.destroyPopper())},onClick(){this.trigger("apply-changes",this)}}),C=j,y=g().extend({constructor:function e(t){e.__super__.constructor.call(this,t)},initialize(e){this.filterManager=e.filterManager,this._changedFiltersState={},this.renderButton()},dispose(){if(!this.disposed)return delete this._changedFiltersState,delete this.filterManager,y.__super__.dispose.call(this)},renderButton(){this.button=new C({autoRender:!0})},delegateListeners:function(){y.__super__.delegateListeners.call(this);for(const e of Object.values(this.filterManager.filters))this.listenTo(e,{change:this.onFilterChanged.bind(this,e),update:this.onFilterUpdate.bind(this,e),reset:this.onFilterReset.bind(this,e),hideCriteria:this.onFilterHidden.bind(this,e),showCriteria:this.onFilterShown.bind(this,e)});return this.listenTo(this.filterManager,{"update-view:before-fetch":()=>{this._wasResetAction||(this.applyChangedState(),delete this._wasResetAction)}}),this.listenTo(this.filterManager.collection,"beforeFetch",this.onBeforeFetch.bind(this)),this.listenTo(this.button,"apply-changes",this.applyAllChangedFilters),this.listenTo(r(),"grid_load:complete",(e=>{e.inputName===this.filterManager.collection.inputName&&this.setUnAppliedFilers()})),this},onFilterShown(e){(e.$el.find(e.criteriaSelector).is(":animated")?e.$el.find(e.criteriaSelector).promise():n().Deferred().resolve()).always((()=>{this.lastChanged===e.cid&&e.$el.hasClass(e.buttonActiveClass)&&this.isFilterValueChanged(e)?this.showButton(e):this.button.updatePosition()}))},onFilterHidden(e){const t=e.$el.find(e.criteriaSelector).is(":animated")?e.$el.find(e.criteriaSelector).promise():n().Deferred().resolve();this.lastChanged===e.cid?this.button.unstick():t.always((()=>this.button.updatePosition()))},onFilterChanged(e){this._wasResetAction&&delete this._wasResetAction,this.isFilterValueChanged(e)?(this.lastChanged!==e.cid&&(this.previousChanged=this.lastChanged),this.lastChanged=e.cid,this._changedFiltersState[e.name]=this.getRawFilterValue(e),this.showButton(e)):this.lastChanged===e.cid&&this.button.unstick()},onFilterUpdate(e){void 0!==this._changedFiltersState[e.name]&&u().isEqual(this._changedFiltersState[e.name],e.getValue())&&delete this._changedFiltersState[e.name]},onFilterReset(e){this._wasResetAction=!0,void 0!==this._changedFiltersState[e.name]&&u().isEqual(this._changedFiltersState[e.name],e.getValue())&&delete this._changedFiltersState[e.name]},isFilterValueChanged(e){const t=e.getValue(),i=this.getRawFilterValue(e),s=!u().isFunction(e._isValid)||e._isValid();return e.renderable&&s&&e._isDOMValueChanged()&&e.isUpdatable(i,e.value)&&!u().isEqual(t,i)},getRawFilterValue(e){const t=e._formatRawValue(e._readDOMValue());return u().isFunction(e.swapValues)?e.swapValues(t):t},onBeforeFetch(){this.button.unstick()},getReferenceElement(e){const t=e.$(e.criteriaSelector);if(!t.length)return null;const{value_end:i,value:s}=e.criteriaValueSelectors||{},n=t.find(i),o=t.find(s);return n.is(":visible")?n[0]:o.is(":visible")?o[0]:t[0]},showButton(e){if(e.selectWidget||e.disposed||!e.renderable)return;const t=this.getReferenceElement(e);t&&(n().contains(e.el,this.button.el)||this.button.$el.appendTo(e.$el),this.button.stick(t))},getAppliedSate(){return{...this.filterManager.collection.state.filters,...this._changedFiltersState}},applyChangedState(){Object.values(this._changedFiltersState).length&&this.filterManager._applyState({...this.filterManager.collection.state.filters,...this._changedFiltersState})},applyAllChangedFilters(){this._wasResetAction&&delete this._wasResetAction,this.applyChangedState()},setUnAppliedFilers(){let e=!1;const t=this.filterManager.collection.state.filters;for(const[i,s]of Object.entries(this._changedFiltersState))if(void 0===t[i]||!u().isEqual(s,t[i])){e=!0;break}if(e){let e;for(const t in this.filterManager.filters)if(this.filterManager.filters.hasOwnProperty(t)){const i=this.filterManager.filters[t],s=!u().isFunction(i._isValid)||i._isValid();if(i.cid===this.lastChanged&&this._changedFiltersState[i.name]&&s){e=i;break}if(i.cid===this.previousChanged&&this._changedFiltersState[i.name]&&s){e=i;break}}if(e){this.showButton(e);const t=this.getAppliedSate();u().each(this.filterManager.filters,(e=>{t[e.name]&&e.renderable&&e._writeDOMValue(t[e.name])}))}}}}),x=y;var k=i("./bundles/orofilter/js/filters-manager.js"),S=i.n(k),T=i("./bundles/orofrontend/default/js/app/views/filter-settings.js"),E=i("./bundles/orofrontend/js/app/datafilter/actions/fullscreen-filters-action.js"),V=i.n(E),D=i("./bundles/oroproduct/js/app/views/sidebar-filters/sidebar-toggle-filters-view.js");const M=V().extend({constructor:function e(t){e.__super__.constructor.call(this,t)},initialize(e){M.__super__.initialize.call(this,e),this.listenTo(r(),{"viewport:change":this.toggleLaunchers,"grid_load:complete":t=>{e.datagrid.name===t.inputName&&this.toggleLaunchers()}}),this.listenToOnce(this.datagrid,{"filterManager:connected":()=>{const e=this.datagrid.filterManager.isVisible,t=this.subview("switch-sidebar");!1===e&&t&&(t.collapse(0),this.toggleLaunchers()),this.listenTo(this.filterManager,"visibility-change",(e=>{!1===T.Z.isFullScreen()&&t.$el.is(":visible")&&e!==t.sidebarExpanded&&this.datagrid.filterManager[t.sidebarExpanded?"show":"hide"]()}))}})},updateFiltersStateView(){if(void 0===this.filterManager||this.fullscreenFilters.isPopupOpen())return;const e=this.filterManager.getViewMode();e===S().MANAGE_VIEW_MODE&&T.Z.isFullScreen()?this.filterManager.setViewMode(S().STATE_VIEW_MODE):e!==S().STATE_VIEW_MODE||T.Z.isFullScreen()||this.filterManager.setViewMode(S().MANAGE_VIEW_MODE)},toggleLaunchers(){T.Z.isFullScreen()&&!this.launcherInstance.$el.is(":visible")?this.useFullScreenLauncher():T.Z.isFullScreen()||void 0!==this.$launcherPlaceholder||this.useSwitchSidebarLauncher()},toggleFilters:function(e){e===S().STATE_VIEW_MODE?this.datagrid.filterManager.hide():e===S().MANAGE_VIEW_MODE&&this.datagrid.filterManager.hasFilters()&&this.datagrid.filterManager.show()},useSwitchSidebarLauncher(){this.launcherInstance.$el.remove(),this.subview("switch-sidebar").render()},useFullScreenLauncher(){this.subview("switch-sidebar").$el.remove(),this.$launcherParent.append(this.launcherInstance.render().$el)},createLauncher:function(e){const t=M.__super__.createLauncher.call(this,e),i=new D.Z({$content:n()('[data-role="page-content"]'),$sidebar:n()('[data-role="page-sidebar"]'),sidebarExpanded:this.datagrid.themeOptions.sidebarExpanded});return this.listenTo(i,{"toggle-sidebar:after-collapse":()=>{this.filterManager.hide(),this.filterManager.trigger("filters-render-mode-changed",{renderMode:this.filterManager.renderMode,isAsInitial:!1})},"toggle-sidebar:before-expand":()=>{this.filterManager.show(),this.filterManager.trigger("filters-render-mode-changed",{renderMode:this.filterManager.renderMode,isAsInitial:!0})}}),this.subview("switch-sidebar",i),this.launcherInstance.on("appended",(()=>{this.$launcherParent=this.launcherInstance.$el.parent(),i.container=this.$launcherParent,i.render(),i.$el.hide()})),t}}),A=M;var O=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroproduct/templates/sidebar-filters/filters-container.html"),$=i.n(O),P=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/filters-container.html"),N=i.n(P);const F={processDatagridOptions:(e,t)=>(t.metadata.options.toolbarOptions||(t.metadata.options.toolbarOptions={}),t.metadata.options.toolbarOptions.customAction={constructor:A},t.filtersStateElement=`[data-filters-state-container="${t.gridName}"]`,t.filterContainerSelector='[data-role="sidebar-filter-container"]',t.metadata.options.enableFiltersNavigation=!1,t.metadata.options.filtersManager||(t.metadata.options.filtersManager={}),Object.assign(t.metadata.options.filtersManager,{outerHintContainer:`[data-hint-container="${t.gridName}"]`,renderMode:"toggle-mode",autoClose:!1,enableMultiselectWidget:!0,template:$(),fullscreenTemplate:N(),defaultFiltersViewMode:S().MANAGE_VIEW_MODE}),t.metadata.filters.forEach((e=>{e.outerHintContainer=`[data-hint-container="${t.gridName}"]`,e.initiallyOpened=!0,e.autoClose=!1,e.labelPrefix="",e.animationDuration=300})),e.resolve()),init:(e,t)=>(t.gridPromise.done((e=>{let i,s;const o=e.toolbars.top,l=n()("<div></div>",{"data-filters-state-container":e.name}),d=e=>{for(const t of e)0!==t.$el.length&&t.subview("sidebar-filters:extra-hint",new p({filter:t,autoRender:!0}))},c=()=>{i&&!i.disposed&&i.dispose()};l.insertAfter(o.el),e.once("filters:beforeRender",(()=>{o&&!o.disposed&&(s=new a.Z({renderMode:t.metadata.options.filtersManager.renderMode,gridName:e.name}),n()(o.el).after(s.render().el));const r=e.filterManager;r.on("filters-render-mode-changed",(({isAsInitial:e})=>{c(),(e=>{for(const t of e)t.removeSubview("sidebar-filters:extra-hint")})(Object.values(r.filters)),e&&(i=new x({filterManager:r}),d(Object.values(r.filters)))}))})),e.once("filterManager:connected",(()=>{const t=e.filterManager;Object.keys(t.filters).length&&(d(Object.values(t.filters)),i=new x({filterManager:t}),r().trigger(`${e.name}-filters-in-sidebar:connected`,t),t.on("rendered",(()=>{r().trigger(`${e.name}-filters-in-sidebar:rendered`,t),t.$el.one("remove",(()=>c()))})))})),e.once("dispose",(()=>{c(),s&&!s.disposed&&s.dispose(),l.remove()}))})),e.resolve())}},"./bundles/oroproduct/js/app/datagrid/header-cell/backend-action-header-cell.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/oroui/js/extend/jquery.js"),r=i("./bundles/oroui/js/mediator.js"),a=i("./bundles/fosjsrouting/js/router.js"),l=i("./bundles/orotranslation/js/translator.js"),d=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroproduct/templates/datagrid/backend-action-header-cell.html"),c=i("./bundles/oroui/js/viewport-manager.js").Z,u=i("./bundles/orofrontend/js/datagrid/cell/frontend-action-header-cell.js"),h=i("./bundles/oroshoppinglist/js/shoppinglist-collection-service.js"),p=i("./bundles/oroproduct/js/app/datagrid/backend-actions-panel.js"),_=i("./bundles/orofrontend/default/js/app/views/fullscreen-popup-view.js"),g=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id).shoppingListAddAction||{type:"addproducts",data_identifier:"product.id",frontend_type:"add-products-mass",handler:"oro_shopping_list.mass_action.add_products_handler",is_current:!1,label:"oro.shoppinglist.actions.add_to_shopping_list",name:"oro_shoppinglist_frontend_addlineitemlist",route:"oro_shopping_list_add_products_massaction",route_parameters:{},frontend_handle:"ajax",confirmation:!1,launcherOptions:{iconClassName:"fa-shopping-cart"}},m="Group",f="GroupDropdown",b="Fullscreen",v=u.extend({autoRender:!0,className:"product-action",tagName:"div",template:d,actionsPanel:p,events:{"click [data-fullscreen-trigger]":"showFullScreen","click [data-undo-selection]":"undoSelection"},renderMode:f,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(!e.optimizedScreenSize)throw new Error('The "optimizedScreenSize" option is required.');this.optimizedScreenSize=e.optimizedScreenSize,this.selectState=e.selectState,v.__super__.initialize.call(this,e),h.shoppingListCollection.done((e=>{this.listenTo(e,"change",this._onShoppingListsRefresh.bind(this))})),this.defineRenderingStrategy()},delegateListeners:function(){return this.listenTo(this.selectState,"change",n.debounce(this._doActivate.bind(this),50)),this.listenTo(r,{"sticky-panel:toggle-state":this.onStickyPanelToggle.bind(this),[`viewport:${this.optimizedScreenSize}`]:this.defineRenderingStrategy.bind(this)}),this.listenTo(this,"render-mode:changed",(e=>this.onRenderModeIsChanged())),v.__super__.delegateListeners.call(this)},_isOptimizedScreen(){return c.isApplicable(this.optimizedScreenSize)},_showMassActionsInFullscreen(){return this.subviewsByName.fullscreen&&!this.subviewsByName.fullscreen.disposed},defineRenderingStrategy(){const e=this.renderMode;this._isOptimizedScreen()?this._showMassActionsInFullscreen()?this.renderMode=b:this.renderMode=m:this.renderMode=f,e!==this.renderMode&&this.trigger("render-mode:changed",{prevRenderMode:e,renderMode:this.renderMode})},dispose:function(){return v.__super__.dispose.call(this)},_doActivate:function(e){try{this[`_doActivate${this.renderMode}`](e)}catch(e){throw e}},_onShoppingListsRefresh:function(){const e=this.column.get("datagrid");e.resetSelectionState(),o.ajax({method:"GET",url:a.generate("oro_shopping_list_frontend_get_mass_actions"),success:function(t){const i={};n.each(t,(function(e,t){i[t]=o.extend(!0,{},g,e,{name:t})})),e.setMassActions(i)}}),this.render()},getActionContainer(){return this.$("[data-action-panel]")},render:function(){return this.$el.empty(),this.$el.append(this.getTemplateFunction()(this.getTemplateData())),this.renderActionsPanel(),this._doActivate(this.selectState),this},renderActionsPanel:function(){const e=this.subview("actionsPanel");if(e.haveActions())switch(e.$el.removeClass(this._replaceablePanelClasses),this.renderMode){case m:return this._renderAsGroup();case f:return this._renderAsGroupDropdown();case b:return this._renderAsFullscreen()}},_renderAsGroupDropdown(){const e=this.subview("actionsPanel"),t=n.uniqueId("dropdown-"),i="btn-group--full dropup",s=e.getMainLauncher().render().$el.clone(!0,!0);if(e.actions.length>1){this.getActionContainer().append(e.render().$el),e.$el.addClass(i),e.launchers.forEach((e=>{e.$el.addClass("dropdown-item"),e.$(".icon").addClass("fa fa--fw fa--as-line")}));const n=o("<button></button>",{id:t,type:"button",class:"btn btn--info dropdown-toggle","aria-label":l("oro.product.frontend.choose_action"),"data-toggle":"dropdown","data-placement":"top-end"});e.$el.children().wrapAll(o("<div></div>",{class:"dropdown-menu","aria-labelledby":t})),n.prependTo(e.$el),s.addClass("btn btn--full btn--info btn--clip-text").removeClass("disabled").prependTo(e.$el)}else this.getActionContainer().append(e.renderMainLauncher().$el),e.launchers.forEach((e=>{e.$el.addClass("btn btn--full btn--info btn--clip-text")})),e.$el.addClass(i);return this._replaceablePanelClasses=`${i} show`,e},_doActivateGroupDropdown(e){e.isEmpty()?(this.getActionContainer().addClass("hidden"),this.subview("actionsPanel").disable()):(this.getActionContainer().removeClass("hidden"),this.subview("actionsPanel").enable())},_renderAsGroup(){const e=this.subview("actionsPanel"),t="btn-group--full dropup";return this.getActionContainer().append(e.renderMainLauncher().$el),e.launchers.forEach((e=>{e.$el.addClass("btn btn--full btn--info btn--size-s btn--clip-text")})),e.$el.addClass(t),e.actions.length>1&&e.$el.append(o("<button></button>",{type:"button",class:"btn btn--info btn--size-s dropdown-toggle","data-fullscreen-trigger":"","aria-label":l("oro.product.frontend.choose_action")})),this._replaceablePanelClasses=`${t} show`,e},_doActivateGroup(e){e.isEmpty()?(this.getActionContainer().addClass("hidden"),this.subview("actionsPanel").disable()):(this.getActionContainer().removeClass("hidden"),this.subview("actionsPanel").enable())},_renderAsFullscreen(){const e=this.subview("actionsPanel");return this._replaceablePanelClasses="dropdown-menu fullscreen",e.render(),e.$el.addClass(this._replaceablePanelClasses),e.launchers.forEach((e=>{e.$el.addClass("dropdown-item"),e.$(".icon").addClass("fa fa--fw fa--as-line")})),e},_doActivateFullscreen(){},undoSelection(){this.selectState.trigger("undo-selection")},showFullScreen(){const e=new _({contentElement:document.createElement("div"),popupIcon:"fa-chevron-left",popupLabel:l("oro.product.frontend.choose_action")});this.subview("fullscreen",e),this.listenToOnce(e,{show:this.onShowFullScreen,beforeclose:this.onBeforeCloseFullScreen,close:this.onCloseFullScreen}),this.defineRenderingStrategy(),e.show()},onShowFullScreen(){const e=this.subview("fullscreen");e.content.$el.append(this.renderActionsPanel().$el),e.$popup.on(`click${e.eventNamespace()}`,".action",(t=>e.close()))},onBeforeCloseFullScreen(){const e=this.subview("fullscreen");e.$popup.off(e.eventNamespace())},onCloseFullScreen(){this.subview("fullscreen").dispose(),this.defineRenderingStrategy()},onStickyPanelToggle(e){e.$element.find(this.$el).length&&this.defineRenderingStrategy()},onRenderModeIsChanged(){const e=this.subview("fullscreen");e&&!this._isOptimizedScreen()&&(this.stopListening(e),this.removeSubview("fullscreen")),this.render()}});return v}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/oroproduct/js/app/datagrid/header-cell/backend-select-all-header-cell.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/extend/jquery.js"),n=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroproduct/templates/datagrid/backend-select-all-header-cell.html"),o=i("./bundles/orodatagrid/js/datagrid/header-cell/select-all-header-cell.js"),r=i("./bundles/oroui/js/viewport-manager.js").Z,a="Simple",l=o.extend({autoRender:!0,className:"product-action",tagName:"div",template:n,listen(){return{[`viewport:${this.optimizedScreenSize} mediator`]:"defineRenderingStrategy"}},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(!e.optimizedScreenSize)throw new Error('The "optimizedScreenSize" option is required.');this.optimizedScreenSize=e.optimizedScreenSize,this.collection=e.collection,this.selectState=e.selectState,this.defineRenderingStrategy()},delegateListeners:function(){return this.listenTo(this.selectState,"undo-selection",this.onSelectUnbind.bind(this)),this.listenTo(this,"render-mode:changed",(e=>this.render())),l.__super__.delegateListeners.call(this)},delegateEvents:function(e){return this.$("[data-checkbox-change-visible]").on("change"+this.eventNamespace(),t.debounce(this.onCheckboxChange.bind(this),50)),this.collection.on("backgrid:visible-changed",t.debounce(this.unCheckCheckbox.bind(this),50)),this.listenTo(this.selectState,"change",t.debounce(this.updateState.bind(this),50)),l.__super__.delegateEvents.call(this,e)},defineRenderingStrategy(){const e=this.renderMode;this._isSimple()?this.renderMode=a:this.renderMode="Dropdown",e!==this.renderMode&&this.trigger("render-mode:changed",{prevRenderMode:e,renderMode:this.renderMode})},onCheckboxClick:function(e){this.selectState.get("inset")&&this.selectState.isEmpty()?this.collection.trigger("backgrid:selectAllVisible"):this.collection.trigger("backgrid:selectNone"),e.stopPropagation()},onCheckboxChange:function(e){this.updateVisibleState(s(e.currentTarget).is(":checked"))},updateVisibleState(e=!0){e||this.collection.trigger("backgrid:selectNone"),this.collection.trigger("backgrid:selectNone"),this.collection.trigger("backgrid:setVisibleState",e),this.canSelect(e),this.$("[data-checkbox-change-visible]").prop("checked",e).parent().toggleClass("checked",e)},onSelectUnbind:function(){this.collection.trigger("backgrid:selectNone"),this.collection.trigger("backgrid:visible-changed"),this.canSelect(!1),this.collection.trigger("backgrid:setVisibleState",!1)},canSelect:function(e){this.collection.each((function(t){t.trigger("backgrid:canSelected",e)}))},unCheckCheckbox:function(){this.$("[data-checkbox-change-visible]").prop("checked",!1).parent().removeClass("checked")},_isSimple(){return r.isApplicable(this.optimizedScreenSize)},getTemplateData(){const e=l.__super__.getTemplateData.call(this);return e.isSimple=this._isSimple(),e},render(){return l.__super__.render.call(this),this.$el.trigger("content:changed"),this.renderMode===a?this.updateVisibleState(!1):this.updateVisibleState(),this}});return l}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroproduct/js/app/datagrid/map-custom-module-name.js":(e,t,i)=>{var s;void 0===(s=function(){"use strict";const e={productServerRenderGrid:"oroproduct/js/app/datagrid/backend-grid",productPageableCollection:"oroproduct/js/app/datagrid/backend-pageable-collection"};return function(t){return e[t]||null}}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroproduct/js/app/datagrid/products-select-state-model.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js");return i("./bundles/orodatagrid/js/datagrid/select-state-model.js").extend({constructor:function e(t,i){e.__super__.constructor.call(this,t,i)},addRow:function(e){return this.set("rows",t.uniq(this.get("rows").concat(e))),this},removeRow:function(e){return this.set("rows",t.filter(this.get("rows"),(function(t){return t.id!==e.get("id")}))),this},hasRow:function(e){const i=this.get("rows");return!!i.length&&void 0!==t.find(i,(function(i){return t.isEqual(i.get("id"),e.get("id"))}),this)}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroproduct/js/app/datagrid/sorting/backend-dropdown.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/mediator.js"),s=i("./bundles/oroui/js/viewport-manager.js").Z,n=i("./bundles/orodatagrid/js/datagrid/sorting/dropdown.js"),o=i("./bundles/oroform/js/app/views/select2-view.js"),r=i("./bundles/oroproduct/js/app/datagrid/sorting/fullscreen-sorting.js"),a=n.extend({optionNames:n.prototype.optionNames.concat(["fullscreenMode"]),hasSortingOrderButton:!1,inlineSortingLabel:!0,className:"",attributes:{"data-grid-sorting":""},dropdownClassName:"oro-select2__dropdown",themeOptions:{optionPrefix:"backendsortingdropdown",el:"[data-grid-sorting]"},fullscreenMode:"tablet",constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){a.__super__.initialize.call(this,e),t.on(`viewport:${this.fullscreenMode}`,this.onViewportChange,this)},onChangeSorting:function(){const e={};this.collection.trigger("backgrid:checkUnSavedData",e),e.live?a.__super__.onChangeSorting.call(this):this.render()},onViewportChange:function(){this.disposeSubview(),this.initSubview()},initSubview:function(){s.isApplicable(this.fullscreenMode)?this.subview("sortingView",new r({el:this.$("select")})):this.subview("sortingView",new o({el:this.$("select"),select2Config:this.select2Config}))},disposeSubview:function(){this.subview("sortingView")&&this.removeSubview("sortingView")}});return a}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroproduct/js/app/datagrid/sorting/fullscreen-sorting.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroproduct/templates/datagrid/fullscreen-sorting.html"),o=i("./bundles/oroui/js/app/views/base/view.js"),r=i("./bundles/orofrontend/default/js/app/views/fullscreen-popup-view.js"),a=o.extend({keepElement:!0,autoRender:!0,template:n,popupHandlerSelector:'[data-role="fullscreen-sorting"]',popupContentSelector:'[data-role="fullscreen-sorting-content"]',sortingSwitcherSelector:'[data-role="fullscreen-sorting-switcher"]',constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){this.$el.addClass("hidden"),this.$view=t(this.template(this.getTemplateData())),this.$popupHandler=this.$view.filter(this.popupHandlerSelector),this.$popupContent=this.$view.filter(this.popupContentSelector),this.$sortingSwitcher=this.$popupContent.find(this.sortingSwitcherSelector),this.initEvents()},initEvents:function(){this.$popupHandler.on({click:this.onFullscreenPopup.bind(this)})},onFullscreenPopup:function(e){e.preventDefault(),this.$sortingSwitcher.on({change:this.onChange.bind(this)}),this.fullscreenView=new r({contentElement:this.$popupContent,popupIcon:"fa-chevron-left"}),this.fullscreenView.on("close",this.onClosePopup.bind(this)),this.fullscreenView.show()},onClosePopup:function(){this.fullscreenView&&(this.fullscreenView.dispose(),delete this.fullscreenView,this.$sortingSwitcher.off())},onChange:function(e){this.$el.val(t(e.target).val()).trigger("change"),this.fullscreenView.trigger("close")},getTemplateData:function(){const e=[],i=this.$el.val(),n="sorting-"+s.random(1e3,1e4);return this.$el.find("option").each((function(){const s=t(this).prop("value");e.push({name:n,value:s,title:t(this).text(),checked:i===s})})),{itemsList:e}},render:function(){this.$el.before(this.$popupHandler)},dispose:function(){this.onClosePopup(),this.$popupHandler.off(),this.$view.remove(),this.$el.removeClass("hidden"),delete this.$view,delete this.$popupHandler,delete this.$popupContent,delete this.$sortingSwitcher,a.__super__.dispose.call(this)}});return a}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroproduct/js/app/views/sidebar-filters/filter-items-hint-view.js":(e,t,i)=>{"use strict";i.d(t,{Z:()=>g});var s=i("./bundles/oroui/js/app/views/base/view.js"),n=i.n(s),o=i("./bundles/oroui/js/extend/underscore.js"),r=i.n(o),a=i("./bundles/oroui/js/mediator.js"),l=i.n(a),d=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroproduct/templates/sidebar-filters/filter-items-hint.html"),c=i.n(d),u=i("./bundles/orofrontend/default/js/app/views/filter-settings.js"),h=i("./bundles/oroui/js/viewport-manager.js");const p={toggleBlock:!0,...(0,i("./bundles/oroui/js/app/services/module-config.js").Z)(e.id)},_=n().extend({optionNames:n().prototype.optionNames.concat(["toggleBlock"]),toggleBlock:p.toggleBlock,gridName:"",renderMode:"",template:c(),events:{"click .reset-filter-button":"resetAllFilters"},listen:()=>({[`viewport:${u.Z.fullScreenViewport} mediator`]:"doToggleBlock"}),attributes:{class:"filter-box","data-sticky-target":"top-sticky-panel","data-sticky":JSON.stringify({isSticky:!0,autoWidth:!0,toggleClass:"datagrid-toolbar-sticky-container",placeholderId:"sticky_element_toolbar"})},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize(e){r().extend(this,r().pick(e,["renderMode","gridName"])),_.__super__.initialize.call(this,e)},resetAllFilters(e){l().trigger("filters:reset",e)},render(){return _.__super__.render.call(this),this.$el.addClass(this.renderMode),this.$el.attr("data-hint-container",this.gridName),this.doToggleBlock(),this},doToggleBlock(){!1!==this.toggleBlock&&(h.Z.isApplicable(u.Z.fullScreenViewport)?this.$el.hide():this.$el.show())}}),g=_},"./bundles/oroproduct/js/app/views/sidebar-filters/sidebar-toggle-filters-view.js":(e,t,i)=>{"use strict";i.d(t,{Z:()=>b});var s=i("./bundles/oroui/js/extend/jquery.js"),n=i.n(s),o=i("./bundles/oroui/js/mediator.js"),r=i.n(o),a=i("./bundles/fosjsrouting/js/router.js"),l=i.n(a),d=i("./bundles/oroui/js/app/views/base/view.js"),c=i.n(d),u=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroproduct/templates/sidebar-filters/sidebar-toggle-filters-view.html"),h=i.n(u),p=i("./bundles/oroui/js/app/services/module-config.js");const _="collapsed",g="expanded",m={animationDuration:150,className:"toggle-sidebar-btn btn btn--default btn--size-s",[`${g}Title`]:"oro.product.sidebar_filters.button.title.collapse",[`${g}Icon`]:"fa-chevron-left fa--no-offset",[`${_}Title`]:"oro.product.sidebar_filters.button.title.expand",[`${_}Icon`]:"fa-filter fa--no-offset",...(0,p.Z)(e.id)},f=c().extend({optionNames:c().prototype.optionNames.concat(["$content","$sidebar","routeName","sidebarExpanded"]),autoAttach:!0,noWrap:!0,template:h(),routeName:"oro_product_frontend_ajax_set_product_filters_sidebar_state",sidebarExpanded:!0,animationDuration:m.animationDuration,events:{click:"onClick"},constructor:function e(t){e.__super__.constructor.call(this,t)},onClick(){this.toggleSidebar()},getDataToSave(){return{sidebarExpanded:this.sidebarExpanded?1:0}},saveState(){this.disable(),n().ajax({method:"POST",type:"json",url:l().generate(this.routeName),data:this.getDataToSave(),complete:()=>{this.render()}})},disable(){return this.$el.attr({disabled:!0,"data-has-focus":this.hasFocus()}),this},hasFocus(){return document.activeElement.isSameNode(this.el)},render(){const e=this.$el,t=this.hasFocus();return f.__super__.render.call(this),document.contains(e[0])&&e.replaceWith(this.el),(e.data("has-focus")||t)&&n()(document.activeElement).is("body")&&this.$el.focus(),this.$el.toggleClass("is-expanded",this.sidebarExpanded),this},getTemplateData:function(){const e=f.__super__.getTemplateData.call(this),t=this.sidebarExpanded?g:_;return e.className=m.className,e.icon=m[`${t}Icon`],e.title=m[`${t}Title`],e},toggleSidebar(e){this.sidebarExpanded?this.collapse():this.expand(),this.render(),this.saveState()},collapse(e=this.animationDuration){this.sidebarExpanded=!1,this.doCollapseAnimation(e)},expand(e=this.animationDuration){this.sidebarExpanded=!0,this.doExpandAnimation(e)},doAnimation(e,t=250){const i=performance.now();return new Promise((s=>{if(!t)return s();requestAnimationFrame((function n(o){let r=(performance.now()-i)/t;r>1&&(r=1),e(r),r<1?requestAnimationFrame(n):s()}))}))},doCollapseAnimation(e){this.$content.css("will-change","width"),this.$sidebar.css({"will-change":"width, opacity",overflow:"hidden"}).children().each(((e,t)=>{n()(t).css("width",n()(t).outerWidth())}));const t=parseInt(window.getComputedStyle(this.$sidebar[0]).getPropertyValue("width"));this.trigger("toggle-sidebar:before-collapse"),this.doAnimation((e=>{const i=t*e;this.$sidebar.css({opacity:1-e,width:t-i}),this.$content.css("width",`calc(100% - ${t-i}px)`)}),e).then((()=>{this.$sidebar.addClass("hidden").css({width:"","will-change":"",overflow:"",opacity:""}).children().css("width",""),this.$content.css({width:"","will-change":""}).removeClass("page-content--has-sidebar"),this.trigger("toggle-sidebar:after-collapse"),r().trigger("toggle-sidebar",{expanded:!1})}))},doExpandAnimation(e){const t=parseInt(window.getComputedStyle(this.$sidebar[0]).getPropertyValue("width"));this.$content.css({"will-change":"width",width:"calc(100% - 1px)"}),this.$sidebar.css({"will-change":"width, opacity",overflow:"hidden",width:"1px",opacity:0}).removeClass("hidden").children().each(((e,i)=>{n()(i).css("width",t)})),this.trigger("toggle-sidebar:before-expand"),this.doAnimation((e=>{const i=t*e;this.$content.css("width",`calc(100% - ${i}px)`),this.$sidebar.css({opacity:e,width:i})}),e).then((()=>{this.$sidebar.css({width:"","will-change":"",overflow:"",opacity:""}).children().css("width",""),this.$content.css({width:"","will-change":""}).addClass("page-content--has-sidebar"),this.trigger("toggle-sidebar:after-expand"),r().trigger("toggle-sidebar",{expanded:!0})}))}}),b=f},"./bundles/oroshipping/js/datagrid/cell/shipping-methods-cell.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>p});var s=i("./bundles/orodatagrid/js/datagrid/cell/string-cell.js"),n=i.n(s),o=i("./bundles/orolocale/js/formatter/number.js"),r=i.n(o),a=i("./bundles/oroui/js/mediator.js"),l=i.n(a),d=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroshipping/templates/datagrid/cell/shipping-methods-cell.html"),c=i.n(d);const u={...(0,i("./bundles/oroui/js/app/services/module-config.js").Z)(e.id)};function h(e,t){return e.sortOrder-t.sortOrder}const p=n().extend({template:c(),events:()=>({"change input[type=radio]":"onChange"}),titleClassName:u.titleClassName,constructor:function e(t){e.__super__.constructor.call(this,t)},onChange(e){const t=this.$(e.target),i=t.data("shipping-method"),s=t.data("shipping-type"),n=t.data("item-id");l().trigger("multi-shipping-method:changed",n,i,s)},getTemplateData(){const{shippingMethods:e={},...t}=this.model.toJSON();return t.lineItemId||(t.lineItemId=t.id),t.formatter=r(),t.shippingMethods=Object.values(e).map((e=>(e.types=Object.values(e.types||{}).sort(h),e))).sort(h),t._metadata={...this.column.get("metadata")},t.titleClassName=this.titleClassName,t},render(){return this.$el.html(this.template(this.getTemplateData())),this}})},"./bundles/oroshoppinglist/js/app/components/shopping-list-cell-popup-editor-component.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>u});var s=i("./bundles/oroui/js/extend/underscore.js"),n=i.n(s),o=i("./bundles/oroui/js/extend/jquery.js"),r=i.n(o),a=i("./bundles/orodatagrid/js/app/components/cell-popup-editor-component.js"),l=i.n(a),d=i("./bundles/oroui/js/tools/overlay.js"),c=i.n(d);const u=l().extend({constructor:function e(...t){e.__super__.constructor.apply(this,t)},createView(){const e=this.options.view,t=this.options.cell,i=n().extend({},this.options.viewOptions,this.getRestrictedOptions(),{autoRender:!0,model:t.model,fieldName:t.column.get("name"),metadata:t.column.get("metadata")});this.formState&&(this.updateModel(t.model,this.oldState),this.options.plugin.main.trigger("content:update"),i.value=this.formState);const s=this.view=new e(i);this.shoppingListId=t.model.get("shoppingListId"),s.$el.addClass("inline-editor-wrapper");const o=r().extend(!0,{},this.OVERLAY_TOOL_DEFAULTS,{insertInto:t.$el});c().createOverlay(s.$el,o),s.trigger("change:visibility")},saveCurrentCell(){const e={};return this.shoppingListId&&(e.id=this.shoppingListId),this.options.plugin.saveItems(this,e)},isDataValid(){return this.view.isValid()},beforeSaveHook(){const e=this.view.getModelUpdateData(),t=this.options.cell;return this.formState=this.view.getFormState(),this.oldState=n().pick(t.model.toJSON(),n().keys(e)),this.updateModel(t.model,e),this.options.plugin.main.trigger("content:update"),t.model.toggleLoadingOverlay(!0),this},getServerUpdateData(){return this.view.getServerUpdateData()},getModel(){return this.options.cell.model?this.options.cell.model:new Error(`model for cell '${this.options.cell.cid}' not exists yet`)},toggleLoadingOverlay(e){if(!this.options.cell.model)return new Error(`model for cell '${this.options.cell.cid}' not exists yet`);this.options.cell.model.toggleLoadingOverlay(e)},flashRowHighlight(e){if(!this.options.cell.model)return new Error(`model for cell '${this.options.cell.cid}' not exists yet`);this.options.cell.model.flashRowHighlight(e)},cancelAndDispose(){this.exitEditMode(!0)}})},"./bundles/oroshoppinglist/js/app/views/editor/shoppinglist-line-item-editor-view.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>p});var s=i("./bundles/oroui/js/extend/underscore.js"),n=i.n(s),o=i("./bundles/oroui/js/extend/jquery.js"),r=i.n(o),a=i("./bundles/oroform/js/app/views/editor/text-editor-view.js"),l=i.n(a),d=i("./bundles/orolocale/js/formatter/number.js"),c=i.n(d);const u=i("./bundles/orofilter/js/formatter/number-formatter.js"),h=l().extend({events:{'input input[name="quantity"]':"onValueChange",'change select[name="unitCode"]':"onUnitValueChange"},template:i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroshoppinglist/templates/editor/shoppinglist-line-item-editor.html"),constructor:function e(...t){e.__super__.constructor.apply(this,t)},initialize(e){this.formatter=new u(e),this.updateUnitList(this.model.get("unit")),h.__super__.initialize.call(this,e),this.updateRangeValidationRule()},updateRangeValidationRule(){this.validationRules.Range&&(this.validationRules.Range={...this.validationRules.Range,min:this.model.getMinimumQuantity(),max:this.model.getMaximumQuantity()})},render(){this.options.quantity&&this.setFormState(this.options.quantity),h.__super__.render.call(this),this.validator.settings.rules={quantity:r().validator.filterUnsupportedValidators(this.getValidationRules())}},dispose(){this.disposed||(this.model.isSyncedWithEditor(!0),h.__super__.dispose.call(this))},getTemplateData(){return{data:this.model.toJSON()}},focus(e){const t=e.target.getAttribute("data-focused");if(t)return void(".select2-container"===t&&this.$el.find(t).select2("open"));const i=this.$('input[name="quantity"]');"number"!=typeof this.options.cursorOffset||Number.isNaN(this.options.cursorOffset)?i.setCursorToEnd():i.setCursorPosition(this.options.cursorOffset),i.focus()},isChanged(){const e=n().some(Object.entries(this.getValue()),(([e,t])=>this.model.get(e)!==t));return this.model.isSyncedWithEditor(!e),e},onFocusout(e){const t=this.$('select[name="unitCode"]').data("select2");this.isChanged()||r().contains(this.el,e.relatedTarget)||t.opened()||setTimeout((()=>this.trigger("cancelAction")))},onValueChange(){this.updateSubmitButtonState(),this.trigger("change")},onUnitValueChange(e){this.onValueChange(e),this.updateUnitPrecision()},updateUnitPrecision(){const e=this.updateUnitList(this.$('select[name="unitCode"]').val()),t=Object.values(e).find((e=>e.selected)).precision;this.$el.find('input[name="quantity"]').data("precision",t).inputWidget("refresh")},getValue:function(){return{quantity:parseFloat(c().unformatStrict(this.$('input[name="quantity"]').val())),unitCode:this.$('select[name="unitCode"]').val()}},updateUnitList(e){return n().mapObject(this.model.get("units"),((t,i)=>(t.selected=i===e,t)))},getServerUpdateData(){return{id:this.model.get("id"),...this.getValue()}},getModelUpdateData(){const e=this.getValue();return{...e,units:this.updateUnitList(e.unitCode)}}}),p=h},"./bundles/oroshoppinglist/js/datagrid/action/add-notes-action.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>b});var s=i("./bundles/oroui/js/extend/underscore.js"),n=i.n(s),o=i("./bundles/orotranslation/js/translator.js"),r=i.n(o),a=i("./bundles/fosjsrouting/js/router.js"),l=i.n(a),d=i("./bundles/oroui/js/mediator.js"),c=i.n(d),u=i("./bundles/orodatagrid/js/datagrid/action/model-action.js"),h=i.n(u),p=i("./bundles/oroui/js/modal.js"),_=i.n(p),g=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroshoppinglist/templates/actions/add-notes-action.html"),m=i.n(g);const f=h().extend({formWidget:null,requestType:"PATCH",reloadData:!1,validationRules:{notes:{Length:{max:2048}}},constructor:function e(t){e.__super__.constructor.call(this,t)},getLink(){return l().generate(this.route,{id:this.model.get("id"),...this.route_parameters})},_onAjaxSuccess(e){this.model.set({notes:e.fields.notes}),this._showAjaxSuccessMessage(e)},_handleWidget(){if(this.dispatched)return;const e=this.model.get("notes"),t=e?"edit":"add",i=new(_())({className:"modal oro-modal-normal shopping-list-notes-modal",title:r()(`oro.frontend.shoppinglist.lineitem.dialog.${t}.title`,{productName:n().escape(this.model.get("name"))}),okText:r()(`oro.frontend.shoppinglist.lineitem.dialog.${t}.label`),cancelText:r()("oro.frontend.shoppinglist.lineitem.dialog.cancel.label"),okCloses:!1}).on("shown",(()=>{this.validator=i.$("form").validate({rules:this.validationRules})}));i.setContent(m()({arialLabelBy:i.cid})),i.on("ok",(()=>{this.validator.form()&&(this.updateNotes(i.$('[name="notes"]').val()),this._handleAjax(),i.close())})),i.open(),i.$('[name="notes"]').focus().val(e).on("keydown",(e=>{13===e.keyCode&&e.ctrlKey&&i.trigger("ok")}))},updateNotes(e){this.model.set({notes:e,action_configuration:{...this.model.get("action_configuration")||{},add_notes:!e}})},getActionParameters(){const e=f.__super__.getActionParameters.call(this);return e.notes=this.model.get("notes"),JSON.stringify(e)},_showAjaxSuccessMessage(){c().execute("showFlashMessage","success",r()("oro.frontend.shoppinglist.lineitem.dialog.notes.success"))}}),b=f},"./bundles/oroshoppinglist/js/datagrid/action/add-products-mass-action.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/orodatagrid/js/datagrid/action/mass-action.js"),s=i("./bundles/oroui/js/mediator.js"),n=i("./bundles/oroui/js/extend/underscore.js"),o=i("./bundles/oroui/js/app/services/load-modules.js"),r=t.extend({shoppingLists:null,constructor:function e(t){e.__super__.constructor.call(this,t),this.requestType="POST"},initialize:function(e){r.__super__.initialize.call(this,e),this.datagrid.on("action:add-products-mass:shopping-list",this._onAddProducts,this)},dispose:function(){return this.datagrid.off(null,null,this),r.__super__.dispose.call(this)},_handleWidget:function(){this.dispatched||(this.frontend_options=this.frontend_options||{},this.frontend_options.url=this.getLink(),this.frontend_options.title=this.frontend_options.title||this.label,o("oro/"+this.frontend_handle+"-widget",this._createHandleWidget.bind(this)))},_createHandleWidget:function(e){const t=new e(this.frontend_options);t.render();const i=this.datagrid,s=i.getSelectionState();t.on("formSave",(e=>{i.resetSelectionState(s),this.listenToOnce(i.massActions,"reset",(()=>{this._onSaveHandleWidget(e,i)}))}))},_onSaveHandleWidget:function(e,t){t.trigger("action:add-products-mass:shopping-list",e.savedId)},_onAddProducts:function(e){this.route_parameters.shoppingList===e&&this.run({})},getActionParameters:function(){const e=this.datagrid.getSelectionState(),t=this.datagrid.collection,i=t.stateHashKey(),s={};n.each(e.selectedIds,(function(e){const t=e.attributes;s[t.id]={},s[t.id][t.unit]=t.quantity}));const o=n.map(e.selectedIds,(function(e){return e.id}));let r={inset:e.inset?1:0,values:o.join(","),units_and_quantities:JSON.stringify(s)};return r[i]=t.stateHashValue(),r=t.processFiltersParams(r,null,"filters"),r},_handleAjax:function(){this.dispatched||(s.execute("showLoading"),this._doAjaxRequest())},_onAjaxSuccess:function(e,t,i){const o=this.datagrid,r=n.reduce(e.products,(function(e,t){const i=o.collection.get(t.id);return i&&e.push(i),e}),[]);o.resetSelectionState(),s.trigger("shopping-list:line-items:update-response",r,e),s.execute("hideLoading")}});return r}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroshoppinglist/js/datagrid/action/delete-product-action.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/orotranslation/js/translator.js"),n=i("./bundles/oroui/js/mediator.js"),o=i("./bundles/oroui/js/messenger.js"),r=i("./bundles/fosjsrouting/js/router.js");return i("./bundles/orodatagrid/js/datagrid/action/delete-action.js").extend({constructor:function e(t){e.__super__.constructor.call(this,t)},getConfirmDialogOptions(){return{title:this.getConfirmContentTitle(),content:this.getConfirmContentMessage(),okText:s(this.messages.confirm_ok),cancelText:s(this.messages.confirm_cancel)}},getConfirmContentTitle(){return s(this.messages.confirm_title,t.mapObject(this.model.toJSON(),(e=>t.isString(e)?t.escape(e):e)))},toggleLoadingOverlay(){if("function"==typeof this.model.subModels)for(const e of this.model.subModels())"function"==typeof e.toggleLoadingOverlay&&e.toggleLoadingOverlay(!0);"function"==typeof this.model.toggleLoadingOverlay&&this.model.toggleLoadingOverlay(!0)},doDelete(){const e=s(this.messages.success,this.model.toJSON()),t=this.datagrid.$el;t.trigger("ajaxStart"),this.toggleLoadingOverlay(),this.model.destroy({url:this.getLink(),wait:!0,reset:!1,uniqueOnly:!0,toggleLoading:!1,global:this.configuration.showGlobalLoadingBar??!0,success:(t,i,s)=>{o.notificationFlashMessage("success",e,{namespace:"shopping_list"}),n.trigger("shopping-list:refresh",s)},complete:()=>{t.trigger("ajaxComplete")}})},getLink:function(){return this.model.attributes.isConfigurable?r.generate("oro_api_shopping_list_frontend_delete_line_item_configurable",{shoppingListId:this.datagrid.metadata.gridParams.shopping_list_id,productId:this.model.attributes.productId,unitCode:this.model.attributes.unit}):r.generate("oro_api_shopping_list_frontend_delete_line_item",{id:this.model.attributes.id,onlyCurrent:this.model.attributes.variantId||this.model.attributes.isKit?1:0})}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroshoppinglist/js/datagrid/action/move-products-mass-action.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/orodatagrid/js/datagrid/action/mass-action.js"),s=i("./bundles/oroui/js/app/services/load-modules.js"),n=i("./bundles/oroui/js/mediator.js"),o=i("./bundles/oroui/js/extend/jquery.js"),r=t.extend({selectedElement:null,reloadData:!1,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){r.__super__.initialize.call(this,e),this.route_parameters.id=this.route_parameters[this.datagrid.name].shopping_list_id},dispose:function(){return this.datagrid.off(null,null,this),r.__super__.dispose.call(this)},_handleWidget:function(){this.dispatched||(this.frontend_options=this.frontend_options||{},this.frontend_options.url=this.getLinkWithParameters(),this.frontend_options.title=this.frontend_options.title||this.label,s("orofrontend/js/app/components/frontend-"+this.frontend_handle+"-widget",function(e){const t=new e(this.frontend_options);t.render(),this.listenToOnce(t,{"frontend-dialog:accept":this._handleAjax.bind(this)})}.bind(this)))},getActionParameters:function(){const e=r.__super__.getActionParameters.call(this);return e.shopping_list_id=o(this.selectedElement).val(),e},_onAjaxSuccess:function(e){this.datagrid.collection.fetch({reset:!0,toggleLoading:!1}),this.datagrid.resetSelectionState(),e.successMessageOptions={namespace:"shopping_list"},this._showAjaxSuccessMessage(e),n.trigger("shopping-list:refresh")},_doAjaxRequest(){const{values:e}=this.getActionParameters();e.length?e.split(",").forEach((e=>{this.datagrid.collection.get(e).toggleLoadingOverlay(!0)})):this.datagrid.collection.models.forEach((e=>{e.toggleLoadingOverlay(!0)})),r.__super__._doAjaxRequest.call(this)}});return r}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroshoppinglist/js/datagrid/action/update-configurable-product-action.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>f});var s=i("./bundles/oroui/js/extend/jquery.js"),n=i.n(s),o=i("./bundles/orotranslation/js/translator.js"),r=i.n(o),a=i("./bundles/oroui/js/mediator.js"),l=i.n(a),d=i("./bundles/oroui/js/messenger.js"),c=i.n(d),u=i("./bundles/fosjsrouting/js/router.js"),h=i.n(u),p=i("./bundles/orodatagrid/js/datagrid/action/dialog-action.js"),_=i.n(p),g=i("./bundles/oroui/js/app/components/widget-component.js"),m=i.n(g);const f=_().extend({withMap:[[1,620],[2,760],[3,900],[4,1040],[5,1180],[6,1260]],widgetDefaultOptions:{type:"frontend-dialog",multiple:!1,"reload-grid-name":"",options:{simpleActionTemplate:!1,contentElement:".matrix-grid-update-container",renderActionsFromTemplate:!0,staticPage:!1,fullscreenMode:!0,dialogOptions:{dialogClass:"ui-dialog--frontend",allowMaximize:!1,allowMinimize:!1,modal:!0,resizable:!1,maximizedHeightDecreaseBy:"minimize-bar",width:800},fullscreenViewOptions:{}}},constructor:function e(t){e.__super__.constructor.call(this,t)},getFlexibleWidth(e=1){if(e<=this.withMap[0][0])return this.withMap[0][1];if(e>=this.withMap[this.withMap.length-1][0])return this.withMap[this.withMap.length-1][1];let t;for(let i=1;i<=this.withMap.length-2;i++){if(e===this.withMap[i][0]){t=i;break}if(e<this.withMap[i+1][0]){t=i;break}}return this.withMap[t][1]},run:function(){const e=r()("oro.frontend.shoppinglist.matrix_grid_update.title",{product:this.model.attributes.name,shoppinglist:this.datagrid.metadata.shoppingListLabel});this.widgetOptions.options.dialogOptions.title=e,this.widgetOptions.options.fullscreenViewOptions.popupLabel=e,this.widgetOptions.options.initLayoutOptions={productModel:this.model},this.widgetComponent||(this.widgetComponent=new(m())(this.widgetOptions)),this.widgetComponent.openWidget().done((()=>{const e=n()(this.widgetComponent.view.el).find("form"),t=n()(this.widgetComponent.view.el).data("columns-count");void 0!==t&&this.widgetComponent.listenTo(this.widgetComponent.view,"widgetReady",(e=>{const i=this.getFlexibleWidth(t);e.loadingElement.addClass("invisible"),e.widget.dialog("option","width",i),e.options.dialogOptions.width=i,e.loadingElement.removeClass("invisible")})),this.widgetComponent.listenTo(this.widgetComponent.view,"adoptedFormSubmitClick",(()=>{n().ajax({method:"POST",url:this.getLink(),data:e.serialize(),success:e=>{e.message&&(c().notificationFlashMessage("success",e.message),l().trigger(`datagrid:doRefresh:${this.datagrid.name}`))}})}))}))},getLink:function(){return h().generate("oro_shopping_list_frontend_matrix_grid_update",{shoppingListId:this.datagrid.metadata.gridParams.shopping_list_id,productId:this.model.attributes.productId,unitCode:this.model.attributes.unit})}})},"./bundles/oroshoppinglist/js/datagrid/action/update-product-kit-line-item-action.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var s=i("./bundles/fosjsrouting/js/router.js"),n=i.n(s),o=i("./bundles/orodatagrid/js/datagrid/action/dialog-action.js");const r=i.n(o)().extend({widgetDefaultOptions:{type:"product-kit-line-item",multiple:!1},constructor:function e(t){e.__super__.constructor.call(this,t)},run:function(){this.model.set("line_item_form_enable",!0),this.widgetOptions.options.model=this.model,this.widgetOptions.options.initLayoutOptions={productModel:this.model},this.widgetOptions.options.url=this.getLink(),r.__super__.run.call(this)},getLink:function(){return n().generate("oro_shopping_list_frontend_product_kit_line_item_update",{id:this.model.attributes.id})}}),a=r},"./bundles/oroshoppinglist/js/datagrid/builder/product-kit-in-shopping-list-plugins-builder.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>g});var s=i("./bundles/oroshoppinglist/js/datagrid/plugins/product-kit-in-shopping-list-refresh-plugin.js"),n=i("./bundles/oroui/js/app/plugins/base/plugin.js"),o=i.n(n),r=i("./bundles/oroshoppinglist/js/shoppinglist-collection-service.js"),a=i.n(r);const l=o().extend({constructor:function e(...t){e.__super__.constructor.apply(this,t)},initialize(e,t={}){if(this.productModel=t.productModel,void 0===this.productModel)throw new Error('Option "productModel" is required');a().shoppingListCollection.done((e=>{this.shoppingListCollection=e}))},enable:function(){if(this.enabled)return;const{collection:e}=this.main;this.listenTo(e,"request",(function(t,i,s){const{productModel:n,shoppingListCollection:o}=this;i.done((t=>{if(e&&0===e.length){if(!n&&n.disposed)return;if(!o&&o.disposed)return;n.set("shopping_lists",[],{silent:!0}),n.trigger("change:shopping_lists"),o.trigger("change")}}))})),l.__super__.enable.call(this)},dispose(){this.disposed||(delete this.productModel,delete this.shoppingListCollection,l.__super__.dispose.call(this))}}),d=l,c=i("./bundles/oroshoppinglist/js/datagrid/row/shopping-list-row.js").default.extend({constructor:function e(...t){e.__super__.constructor.apply(this,t)},renderItem(e){const t=c.__super__.renderItem.call(this,e),i=this.model.get("renderColumnName");if(i)if(e.get("name")===i){const e=this.columns.filter((e=>e.get("renderable"))),s=e.findIndex((e=>e.get("name")===i));t.$el.attr("colspan",e.length-s)}else t.$el.empty();return t},insertView(e,...t){const i=this.columns,s=this.model.get("renderColumnName");if(!(s&&i.indexOf(e)>i.findIndex((e=>e.get("name")===s))))return c.__super__.insertView.call(this,e,...t)}}),u=c;var h=i("./bundles/oroshoppinglist/js/datagrid/builder/utils/index.js"),p=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroshoppinglist/templates/datagrid/cell/product-kit-item-message.html"),_=i.n(p);const g={processDatagridOptions(e,t){const{parseResponseModels:i}=t.metadata.options;return t.metadata.plugins||(t.metadata.plugins=[]),t.metadata.plugins.push(s.Z,{constructor:d,options:{productModel:t.productModel}}),Object.assign(t.metadata.options,{parseResponseModels:e=>(i&&(e=i(e)),(e=>e.reduce(((e,t)=>(void 0===t.row_class_name&&(t.row_class_name=""),(0,h.il)(t)&&(0,h.cn)(t,"highlight"),(0,h.VZ)(t)&&(0,h.cn)(t,"highlight-error"),e.push(t),((0,h.VZ)(t)||(0,h.il)(t))&&e.push((0,h.rx)(t,"kitConfiguration",{rowView:u,kitConfiguration:_()({obj:t})})),e)),[]))("data"in e?e.data:e))}),e.resolve()},init:e=>e.resolve()}},"./bundles/oroshoppinglist/js/datagrid/builder/shoppinglist-editing-builder.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});const s=i("./bundles/oroshoppinglist/js/datagrid/model.js").Z.extend({constructor:function e(t,i){return e.__super__.constructor.call(this,t,i)},highlightDelay:1300,initialize(e,t){this.on("change:quantity change:unit",this.onModelChangeHandler),s.__super__.initialize.call(this,e,t),this.get("isConfigurable")||this.set("unitCode",this.get("unit"),{silent:!0})},onModelChangeHandler(){if(!this.isSyncedWithEditor())return;const e=this.get("errors")||[];this.flashRowHighlight(e.length?"error":"success")},isSyncedWithEditor(e){return"boolean"==typeof e?e?this.unset("_state"):this.set("_state",!e):!this.get("_state")},getMessageModel(){return this.collection.get(this.get("messageModelId"))},highlightRow(e="success"){this.classList().add(e);const t=this.getMessageModel();t&&t.highlightRow(e)},unhighlightRow(e="success",t=0){t&&t>0?setTimeout((()=>this.classList().remove(e)),t):this.classList().remove(e);const i=this.getMessageModel();i&&i.unhighlightRow(e,t)},toggleLoadingOverlay(e){e?this.highlightRow("loading"):this.unhighlightRow("loading")},flashRowHighlight(e="success",t=this.highlightDelay){this.highlightRow(e),this.unhighlightRow(e,t)},getMinimumQuantity(){return this.get("minimumQuantityToOrder")||0},getMaximumQuantity(){return this.get("maximumQuantityToOrder")||1e9}}),n=s;var o=i("./bundles/oroshoppinglist/js/inline-editing/shopping-list-editors.js");const r={processDatagridOptions:(e,t)=>(t.metadata.plugins||(t.metadata.plugins=[]),t.metadata.inline_editing.default_editors=o.default,t.metadata.options.model=n,e.resolve(),e),init:e=>e.resolve()}},"./bundles/oroshoppinglist/js/datagrid/builder/shoppinglist-flat-data-builder.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>b,flattenData:()=>f});var s=i("./bundles/oroui/js/app/plugins/base/plugin.js"),n=i.n(s);const o=n().extend({hideClass:"hide",filteredOutClass:"filtered-out",constructor:function e(t,i){e.__super__.constructor.call(this,t,i)},enable:function(){this.enabled||(this.main.$el.on("click"+this.eventNamespace(),'[data-role="show-all-variants"]',this.onClick.bind(this)),o.__super__.enable.call(this))},disable:function(){this.enabled&&(this.main.$el.off(this.ownEventNamespace()),o.__super__.disable.call(this))},onClick:function(e){const t=this.main.$(e.currentTarget),i=`tr[data-product-group="${t.data("groupId")}"]`,s=`${i}.${this.hideClass}`;this.main.$(i).removeClass(this.filteredOutClass),this.main.$(s).removeClass(this.hideClass),t.hide()}}),r=o;var a=i("./bundles/oroui/js/mediator.js"),l=i.n(a),d=i("./bundles/orotranslation/js/translator.js"),c=i.n(d);const u=n().extend({constructor:function e(t,i){e.__super__.constructor.call(this,t,i)},enable:function(){this.enabled||(this.main.collection.options.hiddenLineItems&&this.messageHiddenLineItem(this.main.collection.options.hiddenLineItems),this.main.collection.on("beforeReset",((e,t,i)=>{const{hiddenLineItems:s={}}=i;this.messageHiddenLineItem(s)})),this.listenTo(this.main.collection,"request",(()=>l().trigger("shopping-list:request"))),this.listenTo(this.main.collection,"reset",(()=>l().trigger("shopping-list:refresh"))),u.__super__.enable.call(this))},messageHiddenLineItem:function(e){Array.isArray(e)&&e.length>0&&l().execute("showFlashMessage","warning",c()("oro.frontend.shoppinglist.messages.line_items_not_available",{skus:e.join(", ")}),{})}}),h=u;var p=i("./bundles/oroproduct/js/app/quantity-helper.js"),_=i.n(p),g=i("./bundles/oroshoppinglist/js/datagrid/row/shopping-list-row.js"),m=i("./bundles/oroshoppinglist/js/datagrid/builder/utils/index.js");const f=e=>e.reduce(((e,t)=>{const{subData:i,...s}=t,n=[];if((0,m.il)(s)&&n.push("highlight"),(0,m.VZ)(s)&&n.push("highlight-error"),s.sku||n.push("no-product-sku-row"),null===i||Array.isArray(i)&&0===i.length)n.push("single-row"),s.row_class_name=n.join(" "),e.push(s),s._hasVariants=!1,s._isVariant=!1,((0,m.VZ)(s)||(0,m.il)(s))&&e.push((0,m.rx)(s,"item"));else{let t=0;const o=[];let r=s;if(n.push("group-row"),i.length&&n.push("group-row-has-children"),s.isConfigurable&&n.push("group-row-configurable"),s.row_class_name=n.join(" "),s.ids=[],s._hasVariants=s.isConfigurable||!1,s._isVariant=!1,e.push(s),(0,m.VZ)(s)||(0,m.il)(s)){const t=(0,m.rx)(s,"item");e.push(t)}const a=i.reduce(((e,n,a)=>{const l=["sub-row"];return n.units&&n.units[s.unit]&&o.push(n.units[s.unit].precision),(0,m.il)(n)&&l.push("highlight"),n.sku||l.push("no-product-sku-row"),(0,m.il)(s)&&l.push("parent-row-has-highlight"),(0,m.VZ)(n)&&l.push("highlight-error"),(0,m.VZ)(s)&&l.push("parent-row-has-highlight-error"),i.length-1===a&&l.push("sub-row-last"),n.filteredOut?(t++,l.push("hide")):r=n,s.ids.push(n.id),n._isVariant=s._hasVariants||!1,n._groupId=s.productId,n.row_class_name=l.join(" "),n.row_attributes={"data-product-group":n._groupId},e.push(n),((0,m.VZ)(n)&&n.sku||(0,m.il)(n))&&e.push((0,m.rx)(n,"item")),e}),[]);s.precision=o.length?Math.max.apply(null,o):_().getDefaultMaxFractionDigits(),t&&(r.filteredOutData={count:t,group:{name:s.name,id:s.productId}},r.row_class_name+=" filtered-out"),e.push(...a)}return e}),[]),b={processDatagridOptions(e,t){const{parseResponseModels:i,parseResponseOptions:s}=t.metadata.options;return Object.assign(t.metadata.options,{parseResponseModels:e=>(i&&(e=i(e)),"data"in e?f(e.data):e),parseResponseOptions:(e={})=>{s&&(e=s(e));const{options:t={}}=e;return{reset:!1,uniqueOnly:!0,wait:!1,...t}}}),t.metadata.plugins||(t.metadata.plugins=[]),t.metadata.plugins.push(r,h),t.data.data=f(t.data.data),t.themeOptions={...t.themeOptions,rowView:g.default},e.resolve()},init:(e,t)=>(t.gridPromise.done((e=>{e.collection.on("beforeRemove",((e,t,i)=>{e.get("_isVariant")&&(i.recountTotalRecords=!1)}))})),e.resolve())}},"./bundles/oroshoppinglist/js/datagrid/builder/shoppinglist-grid-options-builder.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>d});var s=i("./bundles/oroui/js/extend/backbone.js"),n=i.n(s),o=i("./bundles/oroui/js/mediator.js"),r=i.n(o),a=i("./bundles/oroshoppinglist/js/datagrid/cell/select-row-cell.js"),l=i("./bundles/oroshoppinglist/js/datagrid/model.js");const d={processDatagridOptions(e,t){const i=Object.create(n().Events);i.listenTo(r(),"datagrid_create_before",(e=>{e.metadata===t.metadata&&(e.selectRowCell=a.Z,i.stopListening())})),t.gridPromise.fail((()=>i.stopListening())),t.metadata.options.model=l.Z,e.resolve()},init:e=>e.resolve()}},"./bundles/oroshoppinglist/js/datagrid/builder/shoppinglist-grid-representation-builder.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var s=i("./bundles/orodatagrid/js/app/views/toggle-pagination-view.js"),n=i("./bundles/orodatagrid/js/app/views/toggle-group-view.js");const o={init:(e,t)=>(t.gridPromise.done((e=>{const t=e.toolbars.top;if(t){const i=new s.default({datagrid:e,translationPrefix:"oro_frontend.btn"}),o=new n.default({datagrid:e,translationPrefix:"oro_frontend.btn"});t.$('[data-section="left-side"]').append(i.render().$el),i.$el.after(o.render().$el)}})),e.resolve())}},"./bundles/oroshoppinglist/js/datagrid/builder/shoppinglist-product-kit-builder.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>w});var s=i("./bundles/oroshoppinglist/js/datagrid/row/shopping-list-row.js");const n=i("./bundles/oroshoppinglist/js/datagrid/cell/shoppinglist-line-item-cell.js").default.extend({disableEditing:!1,constructor:function e(...t){e.__super__.constructor.apply(this,t)},preinitialize(e){const t=e.model.get("kitHasGeneralError");t&&(this.disableEditing=t)}}),o=s.default.extend({cellConstructorMap:{...s.default.prototype.cellConstructorMap,quantity:n},constructor:function e(t){e.__super__.constructor.call(this,t)}});var r=i("./bundles/orodatagrid/js/datagrid/cell/string-cell.js");const a=i.n(r)().extend({constructor:function e(t){e.__super__.constructor.call(this,t)},_attributes(){if(!this.model.get(this.column.get("name")))return{"aria-label":null,"data-blank-content":null,"aria-colindex":null}}}),l=i("./bundles/orodatagrid/js/datagrid/cell/html-template-cell.js").default.extend({constructor:function e(...t){e.__super__.constructor.apply(this,t)},_attributes(){if("subtotal"===this.column.get("name"))return{"aria-label":null,"data-blank-content":null,"aria-colindex":null}}}),d=i("./bundles/oroshoppinglist/js/datagrid/cell/select-row-cell.js").Z.extend({constructor:function e(t){return e.__super__.constructor.call(this,t)},_attributes:()=>({"aria-label":null,"data-blank-content":null,"aria-colindex":null})});var c=i("./bundles/oroshoppinglist/js/datagrid/cell/shoppinglist-item-cell.js"),u=i("./bundles/oroui/js/viewport-manager.js"),h=i("./bundles/oroui/js/mediator.js"),p=i.n(h);const _=c.default.extend({constructor:function e(...t){e.__super__.constructor.apply(this,t)},initialize(...e){_.__super__.initialize.apply(this,e),this.listenTo(p(),"viewport:change",this.onViewportChange)},listen:{"viewport:change mediator":"onViewportChange"},_attributes:()=>({colspan:u.Z.isApplicable("tablet")?null:2}),onViewportChange(e){this.$el.attr("colspan",u.Z.isApplicable("tablet")?null:2)}}),g=_,m=s.default.extend({cellConstructorMap:{...s.default.prototype.cellConstructorMap,"shoppinglist-string":a,"shoppinglist-html-template":l,item:g,massAction:d,quantity:n},constructor:function e(t){e.__super__.constructor.call(this,t)},renderItem(e){const t=m.__super__.renderItem.call(this,e);return"inventoryStatus"===t.column.get("name")&&t.$el.hide(),t}}),f=m;var b=i("./bundles/oroshoppinglist/js/datagrid/plugins/product-kit-in-shopping-list-refresh-plugin.js"),v=i("./bundles/oroshoppinglist/js/datagrid/builder/utils/index.js");const w={processDatagridOptions(e,t){const{parseResponseModels:i}=t.metadata.options;return Object.assign(t.metadata.options,{parseResponseModels:e=>(i&&(e=i(e)),(e=>e.map((t=>{if(t._isKitItemLineItem=!1,t.isKit&&((0,v.cn)(t,"grid-row-product-kit"),t.rowView=o,((0,v.VZ)(t)||(0,v.il)(t))&&((0,v.cn)(t,"grid-row-product-kit-error"),(0,v.IV)(t,"group-row"))),t.kitHasGeneralError&&((0,v.cn)(t,"product-kit-general-error"),Array.isArray(t.ids)&&t.ids.length)){const i=Object.fromEntries(t.ids.map((e=>[e,!0])));e.forEach((e=>{i[e.id]&&(e.kitHasGeneralError=!0,(0,v.cn)(e,"product-kit-general-error"))}))}return t._hasKitItemLineItems=t.isKit&&t.ids&&t.ids.length,t._groupId&&"string"==typeof t.id&&t.id.startsWith("productkititemlineitem:")&&(t._isKitItemLineItem=!0,(0,v.cn)(t,"sub-row-product-kit"),t.row_class_name.split(" ").includes("sub-row-last")&&(0,v.cn)(t,"sub-row-last-product-kit"),(e=>{e.isMessage||e.isAuxiliary||(e.rowView=f)})(t)),t})))(e))}),t.metadata.plugins||(t.metadata.plugins=[]),t.metadata.plugins.push(b.Z),e.resolve()},init:(e,t)=>(t.gridPromise.done((e=>{const t=e=>e.some((e=>e.get("isKit")||e.get("isConfigurable")));e.$el.toggleClass("grid-has-grouped-rows",t(e.collection)),e.collection.on("reset",(i=>e.$el.toggleClass("grid-has-grouped-rows",t(i))))})),e.resolve())}},"./bundles/oroshoppinglist/js/datagrid/builder/shoppinglist-rfp-confirmation-builder.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var s=i("./bundles/oroui/js/extend/backbone.js"),n=i.n(s),o=i("./bundles/oroui/js/mediator.js"),r=i.n(o);const a={init(e,t){const i=Object.create(n().Events);let{hasEmptyMatrix:s}=t.metadata;r().setHandler("shoppinglist:hasEmptyMatrix",(()=>s),i),t.gridPromise.done((t=>{i.listenTo(r(),"datagrid:metadata-loaded",(e=>{e===t&&(s=t.metadataModel.get("hasEmptyMatrix"))})),i.listenToOnce(t,"dispose",(function(){i.stopListening(),r().removeHandlers(i)})),e.resolve()})).fail((()=>{r().removeHandlers(i),e.reject()}))}}},"./bundles/oroshoppinglist/js/datagrid/builder/utils/index.js":(e,t,i)=>{"use strict";i.d(t,{IV:()=>o,VZ:()=>a,cn:()=>n,il:()=>r,rx:()=>l});var s=i("./bundles/oroui/js/extend/underscore.js");const n=(e,t=[])=>{void 0===e.row_class_name&&(e.row_class_name="");const i=e.row_class_name.split(" ");e.row_class_name=(0,s.uniq)(i.concat(t)).join(" ")},o=(e,t=[])=>{void 0!==e.row_class_name&&(e.row_class_name=e.row_class_name.split(" ").filter((e=>!t.split(" ").includes(e))).join(" "))},r=e=>e.isUpcoming||e.warnings&&e.warnings.length>0,a=e=>e.errors&&e.errors.length>0,l=(e,t,i={})=>{const n={...e,id:e.id+(0,s.uniqueId)("-bind-"),renderColumnName:t,row_class_name:e.row_class_name+" extension-row notification-row",_templateKey:"message",isMessage:!0,isAuxiliary:!0,row_attributes:{"aria-hidden":!0},...i};return e.row_class_name+=" has-message-row",e.messageModelId=n.id,n}},"./bundles/oroshoppinglist/js/datagrid/cell/select-row-cell.js":(e,t,i)=>{"use strict";i.d(t,{Z:()=>c});var s=i("./bundles/orodatagrid/js/datagrid/cell/select-row-cell.js"),n=i.n(s),o=i("./bundles/orodatagrid/js/datagrid/select-state-model.js"),r=i.n(o),a=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroshoppinglist/templates/datagrid/cell/select-row-cell.html"),l=i.n(a);const d=n().extend({template:l(),constructor:function e(t){return e.__super__.constructor.call(this,t)},initialize(e){d.__super__.initialize.call(this,e),this.model.isGroup&&(this.selectState=new(r()),this.listenTo(this.model.collection,"backgrid:selected",this.onSomeRowSelect))},onChange(e){if(this.model.isGroup){const t=this.$(e.target).prop("checked");this.model.subModels().forEach((e=>e.trigger("backgrid:select",e,t)))}else d.__super__.onChange.call(this,e)},onSomeRowSelect(e,t){-1!==this.model.subModels().indexOf(e)&&(t?this.selectState.addRow(e):this.selectState.removeRow(e),this.updateGroupState())},updateGroupState:function(){const e=this.selectState.get("rows").length===this.model.get("ids").length;this.$checkbox.prop({indeterminate:!this.selectState.isEmpty()&&!e,checked:e})}}),c=d},"./bundles/oroshoppinglist/js/datagrid/cell/shoppinglist-html-template-cell.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});const s=i("./bundles/orodatagrid/js/datagrid/cell/html-template-cell.js").default.extend({constructor:function e(t){e.__super__.constructor.call(this,t)},_attributes(){const e={};return this.model.get("isConfigurable")&&!this.model.get(this.column.get("name"))&&(e["aria-label"]=null,e["aria-colindex"]=null),e}})},"./bundles/oroshoppinglist/js/datagrid/cell/shoppinglist-item-cell.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>s});const s=i("./bundles/orodatagrid/js/datagrid/cell/html-template-cell.js").default.extend({constructor:function e(t){e.__super__.constructor.call(this,t),this.listenTo(this.model,"change",this.render)},_attributes(){const e={};return this.model.get("isMessage")?e.id=this.model.get("id"):e["aria-describedby"]=this.model.get("messageModelId"),e},render(){const e=this.model.get("_templateKey")||"default",t=this.getTemplateFunction(e)(this.getTemplateData());return this._html!==t&&(this._html=t,this.$el.trigger("content:remove").html(t).trigger("content:changed"),this.appendEditNotesAction()),this},appendEditNotesAction(){const e=this.$("[data-role=notes]"),t=this.column.collection.find((e=>e.get("actions")));if(!e.length||!t)return;const i=t.get("actions").edit_notes;this.editNotesAction=new i({model:this.model,datagrid:t.get("datagrid")});const s=this.editNotesAction.createLauncher({launcherMode:"icon-only",className:"btn btn--plain btn--size-xs grid-line-items__edit-notes"});e.after(s.render().$el)}})},"./bundles/oroshoppinglist/js/datagrid/cell/shoppinglist-line-item-cell.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var s=i("./bundles/oroui/js/extend/underscore.js"),n=i.n(s);const o=i("./bundles/orodatagrid/js/datagrid/cell/html-template-cell.js").default.extend({events:{mouseenter:n().noop,'focusin [tabindex="0"]':"onFocusin",'click [tabindex="0"]':"onClick",focusout:n().noop,focus:"onFocus",blur:n().noop,"mousedown [data-role=edit]":n().noop,dblclick:n().noop},constructor:function e(t){e.__super__.constructor.call(this,t),this.listenTo(this.model,"change:unitCode",this.render)},onFocusin(e){this.$el.is("[data-ignore-tabbable]")||n().debounce((()=>{this.enterEditModeIfNeeded(e)}))},onClick(e){this.enterEditModeIfNeeded(e)}})},"./bundles/oroshoppinglist/js/datagrid/cell/shoppinglist-string-cell.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>n});var s=i("./bundles/orodatagrid/js/datagrid/cell/string-cell.js");const n=i.n(s)().extend({constructor:function e(t){e.__super__.constructor.call(this,t)},_attributes(){const e={};return this.model.get("isConfigurable")&&!this.model.get(this.column.get("name"))&&(e["aria-label"]=null,e["data-blank-content"]=null,e["aria-colindex"]=null),e}})},"./bundles/oroshoppinglist/js/datagrid/model.js":(e,t,i)=>{"use strict";i.d(t,{Z:()=>c});var s=i("./bundles/oroui/js/extend/backbone.js"),n=i.n(s),o=i("./bundles/oroui/js/extend/underscore.js"),r=i.n(o),a=i("./bundles/oroproduct/js/app/quantity-helper.js"),l=i.n(a);const d=n().Model.extend({constructor:function e(t,i){return e.__super__.constructor.call(this,t,i)},initialize(e,t){d.__super__.initialize.call(this,e,t),this.isGroup=-1!==String(this.get("id")).indexOf("_"),this.get("isConfigurable")||this.set("precision",this.getQuantityPrecision(),{silent:!0})},getQuantityPrecision(){const e=this.get("units");let t=l().getDefaultMaxFractionDigits();if(e){const i=e[this.get("unit")];r().isObject(i)&&(t=i.precision)}return t},subModels(){return(this.get("ids")||[]).map((e=>this.collection.get(e)))},classList(){const e=this,t=(e.get("row_class_name")||"").split(" ");return{add(i){if(!i)return new Error("'className' should not be empty");t.push(i),e.set("row_class_name",r().uniq(t).join(" "))},remove(i){if(!i)return new Error("'className' should not be empty");const s=t.indexOf(i);-1!==s&&t.splice(s,1),e.set("row_class_name",r().uniq(t).join(" "))}}}}),c=d},"./bundles/oroshoppinglist/js/datagrid/plugins/product-kit-in-shopping-list-refresh-plugin.js":(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var s=i("./bundles/oroui/js/mediator.js"),n=i.n(s),o=i("./bundles/oroui/js/app/plugins/base/plugin.js");const r=i.n(o)().extend({constructor:function e(...t){e.__super__.constructor.apply(this,t)},enable:function(){this.enabled||(this.listenTo(n(),"shopping-list:line-items:update-response",(()=>{n().trigger(`datagrid:doRefresh:${this.main.name}`)})),r.__super__.enable.call(this))}}),a=r},"./bundles/oroshoppinglist/js/datagrid/plugins/shopping-list-inline-editing-plugin.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>y});var s=i("./bundles/oroui/js/extend/underscore.js"),n=i.n(s),o=i("./bundles/oroui/js/extend/jquery.js"),r=i.n(o),a=i("./bundles/oroui/js/mediator.js"),l=i.n(a),d=i("./bundles/orodatagrid/js/app/plugins/grid/inline-editing-plugin.js"),c=i.n(d),u=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/oroshoppinglist/templates/editor/shoppinglist-update-all-btn.html"),h=i.n(u),p=i("./bundles/oroui/js/tools.js"),_=i.n(p),g=i("./bundles/orotranslation/js/translator.js"),m=i.n(g),f=i("./bundles/oroui/js/app/components/base/component.js"),b=i.n(f),v=i("./bundles/orolocale/js/formatter/number.js"),w=i.n(v);function j(e){return n().mapObject(e,(e=>{"object"==typeof e&&(e=j(e));try{e=JSON.parse(e)}catch(e){}return e}))}const C=c().extend({componentsToSend:[],$updateAllButton:r()(h()()),massUpdate:!0,modalOptions:{...c().prototype.modalOptions,okText:m()("Yes")},constructor:function e(...t){e.__super__.constructor.apply(this,t)},initialize:function(e,t){const{metadata:i}=t;void 0!==i.options.mass_update&&(this.massUpdate=i.options.mass_update),C.__super__.initialize.call(this,e,t)},enable(){C.__super__.enable.call(this),this.$updateAllButton.on(`click${this.eventNamespace()}`,this.saveItems.bind(this)),this.listenToOnce(this.main,"rendered",this.toggleUpdateAll),this.listenTo(this.main.collection,{"change:_state":this.onChangeCollection})},removeActiveEditorComponents:function(){const e=this.activeEditorComponents.slice();for(let t=0;t<e.length;t++)e[t].exitEditMode(!0);this.activeEditorComponents=[],this.toggleUpdateAll()},cellPatcher(e){const t=C.__super__.cellPatcher.call(this,e),i=this;return t.extend({delayedIconRender(){},enterEditModeIfNeeded(e){this.isEditable()&&i.enterEditMode(this,e),e.preventDefault(),e.stopPropagation()}})},isEditable(e){return!(e.model&&e.model.get("isConfigurable")||e.disableEditing)&&C.__super__.isEditable.call(this,e)},onChangeCollection(){this.toggleUpdateAll()},toggleUpdateAll(){this.massUpdate&&(this.main.$el.find('.grid-header-cell-quantity [data-role="update-all"]').length||this.main.$el.find(".grid-header-cell-quantity").append(this.$updateAllButton),this.hasChanges()?this.$updateAllButton.css("visibility","visible").attr({disabled:null,"aria-hidden":null}):this.$updateAllButton.css("visibility","hidden").attr({disabled:!0,"aria-hidden":!0}))},saveItems(e,t={}){let i=[];if(i=e instanceof b()&&e.isChanged()?[e]:this.activeEditorComponents.filter((e=>e.isChanged())),i=i.filter((e=>e.isDataValid())),!i.length)return;const s={data:i.map((e=>e.getServerUpdateData())),fetchData:n().extend(this.getGridFetchData(),{appearanceType:this.main.collection.state.appearanceType}),gridName:this.options.gridName};i.forEach((e=>e.beforeSaveHook()));const o=this.saveApiAccessor.send({id:this.options.metadata.gridParams.shopping_list_id,_wid:_().createRandomUUID(),...t},s),r=i.map((e=>e.getModel()));return o.done(this.onSaveSuccess.bind(this,r.slice())).fail(this.onSaveError.bind(this,r.slice())).always(this.onSaveComplete.bind(this)),n().invoke(i,"exitEditMode",!0),o},onSaveSuccess(e,t){this.main.collection.set(t,{uniqueOnly:!0,parse:!0,toggleLoading:!1,alreadySynced:!0}),e.filter((({id:e})=>this.main.collection.get(e))).forEach((e=>{const t=e.get("errors")||[];e.flashRowHighlight(t.length?"error":"success")}))},onSaveError(e){n().invoke(e,"flashRowHighlight","error"),e.forEach((e=>{e.toggleLoadingOverlay(!1)}))},onSaveComplete(){l().trigger("shopping-list:refresh"),this.toggleUpdateAll()},getGridFetchData(){return j(_().unpackFromQueryString(_().packToQueryString(this.main.collection.getFetchData())))},enterEditMode(e,t){if(e.trigger("before-enter-edit-mode"),this.getOpenedEditor(e))return;this.main.ensureCellIsVisible(e);const i=this.getCellEditorOptions(e);if(i.viewOptions.className=this.buildClassNames(i,e).join(" "),e.el.contains(document.activeElement)&&r()(document.activeElement).is("div.input")){const e=document.activeElement.innerText.trim().substring(0,window.getSelection().focusOffset);i.viewOptions.cursorOffset=e?w().unformat(e).toString().length:0}const s=i.component,o=i.view;if(!o)throw new Error("Editor view in not available for `"+e.column.get("name")+"` column");const a=new s(n().extend({},i.component_options,{cell:e,view:o,viewOptions:i.viewOptions,save_api_accessor:i.save_api_accessor,grid:this.main,plugin:this}));a.view.component=a,this.activeEditorComponents.push(a),this.listenTo(a,"dispose",this.onDisposeEditor.bind(this,a)),this.listenTo(a,"cancelAction",(()=>{this.toggleUpdateAll()})),a.view.scrollIntoView(),a.view.focus(t)},onDisposeEditor(e){if(this.disposed)return;const t=this.activeEditorComponents.indexOf(e);-1!==t&&this.activeEditorComponents.splice(t,1)}}),y=C},"./bundles/oroshoppinglist/js/datagrid/row/shopping-list-row.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>o});var s=i("./bundles/orodatagrid/js/datagrid/row.js");const n=i.n(s)().extend({cellConstructorMap:{},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize(e){if(!this.itemView){const e=this;this.itemView=function(t){const i=e.model.get("renderColumnName"),s=e.model.get("definitionColumnName"),n=i&&t.model.get("name")===i&&s&&e.columns.find((e=>e.get("name")===s)),o=n||t.model,r=e.getConfiguredCellOptions(o);return r.model=e.model,new(e.columnCellMapping(o))(r)}}n.__super__.initialize.call(this,e)},columnCellMapping(e){const{type:t}=e.get("metadata")||{};return e.get("name")in this.cellConstructorMap?this.getCellConstructor(e.get("name"),e):t in this.cellConstructorMap?this.getCellConstructor(t,e):e.get("cell")},getCellConstructor(e,t){const i=t.get("cellPatcher");return i&&"function"==typeof i?i(this.cellConstructorMap[e]):this.cellConstructorMap[e]},renderItem(e){const t=n.__super__.renderItem.call(this,e),i=this.model.get("renderColumnName");if(i)if(e.get("name")===i){const e=this.columns.filter((e=>e.get("renderable"))),s=e.findIndex((e=>e.get("name")===i));t.$el.attr("colspan",e.length-s)}else t.$el.empty();return t},insertView(e,...t){const i=this.columns,s=this.model.get("renderColumnName");if(!(s&&i.indexOf(e)>i.findIndex((e=>e.get("name")===s))))return n.__super__.insertView.call(this,e,...t)}}),o=n},"./bundles/oroshoppinglist/js/inline-editing/shopping-list-editors.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>n});var s=i("./bundles/orodatagrid/js/inline-editing/default-editors.js");const n={...i.n(s)(),"shoppinglist-line-item":i("./bundles/oroshoppinglist/js/app/views/editor/shoppinglist-line-item-editor-view.js")}},"./bundles/orosync/js/content/grid-builder.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/orosync/js/content-manager.js")],void 0===(n=function(e,t){"use strict";return{allowedTracking:[],allowTracking:function(t){-1===e.indexOf(this.allowedTracking,t)&&this.allowedTracking.push(t)},init:function(i,s){var n;-1!==e.indexOf(this.allowedTracking,s.gridName)&&(n=s.metadata).options&&e.isArray(n.options.contentTags)&&t.tagContent(n.options.contentTags),i.resolve()}}}.apply(t,s))||(e.exports=n)},"./bundles/oroui/js/app/plugins/plugin-manager.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/app/plugins/base/plugin.js");function n(e){if(!e)throw new Error("Please specify main object");this.main=e,this._pluginList=[]}return n.prototype={_pluginList:null,getInstance:function(e){let t;for(let i=0;i<this._pluginList.length;i++)if(t=this._pluginList[i],t instanceof e)return t;return null},create:function(e,t){if(!(e.prototype instanceof s))throw new Error("Constructor must be a child of BasePlugin");let i=this.getInstance(e);if(null!==i)throw new Error("Plugin is already instantiated");return i=new e(this.main,this,t),this._pluginList.push(i),i},updateOptions:function(e,t){this.remove(e),this.create(e,t)},remove:function(e){const t=this.getInstance(e);if(null===t)throw new Error("Plugin is not instantiated yet");t.enabled&&t.disable(),t.dispose(),this._pluginList.splice(this._pluginList.indexOf(t),1)},enable:function(e){if(t.isArray(e))return void t.each(e,this.enable.bind(this));if(!(e.prototype instanceof s))throw new Error("Constructor must be a child of BasePlugin");let i=this.getInstance(e);null===i&&(i=this.create(e)),i.enabled||i.enable()},disable:function(e){if(t.isArray(e))return void t.each(e,this.disable.bind(this));const i=this.getInstance(e);null!==i&&i.enabled&&i.disable()},disableAll:function(){let e;for(let t=0;t<this._pluginList.length;t++)e=this._pluginList[t],e.enabled&&e.disable()},dispose:function(){let e;this.disposing=!0;for(let t=0;t<this._pluginList.length;t++)e=this._pluginList[t],e.enabled&&e.disable(),e.dispose();this._pluginList=[]}},n}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroui/js/app/views/tabs-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/app/views/base/view.js").extend({autoRender:!0,events:{"click .nav-tabs a":"onTabSwitch"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){t.extend(this,t.pick(e,["data","template"])),s.__super__.initialize.call(this,e)},render:function(){const e=this.getTemplateData(),t=this.getTemplateFunction()(e);this.$el.html(t)},getTemplateData:function(){return this.data},onTabSwitch:function(e){e.preventDefault(),e.stopPropagation(),this.$(e.currentTarget).tab("show")},show:function(e){this.$('[href^="#'+e+'-"]').tab("show")},updateTabsVisibility:function(){let e=!1;t.each(this.data.tabs,(function(i){const s=!t.isFunction(i.isVisible)||i.isVisible();this.setTabVisibility(i.name,s),s&&!e&&(this.show(i.name),e=!0)}),this)},setTabVisibility:function(e,t){const i=t?"show":"hide";this.$("li:has(a."+e+")")[i]()}});return s}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroui/js/extend/jquery-ui/widgets/sortable.js":(e,t,i)=>{"use strict";i.r(t);var s=i("./bundles/oroui/js/extend/jquery.js"),n=i.n(s);let o;function r(e,t){if(e.originalEvent.touches.length>1)return;const i=e.originalEvent.changedTouches[0],s=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,detail:1,screenX:i.screenX,screenY:i.screenY,clientX:i.clientX,clientY:i.clientY,ctrlKey:!1,altKey:!1,shiftKey:!1,metaKey:!1,button:0,relatedTarget:null});e.target.dispatchEvent(s)}i("../node_modules/jquery-ui/ui/widgets/sortable.js"),n().widget("ui.sortable",n().ui.sortable,{_touchStart(e){const t=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&n()(e.target).closest(this.options.cancel).length;o||t||!this._mouseCapture(e.originalEvent.changedTouches[0])||(n()(e.target).is(this.options.touchElements)||(e.stopPropagation(),e.preventDefault()),o=!0,r(e,"mousedown"))},_getCreateOptions(){const e=this._super()||{};return e.touchElements="a, a *, button, button *",e},_touchMove(e){o&&(e.preventDefault(),r(e,"mousemove"))},_touchEnd(e){if(o)return n()(e.target).is(this.options.touchElements)||(e.stopPropagation(),e.preventDefault()),r(e,"mouseup"),o=!1,!0},_mouseStart(...e){return this._trigger("beforePick",e[0],this._uiHash()),this._superApply(e)},_clear(...e){return this._trigger("beforeDrop",e[0],this._uiHash()),this._superApply(e)},_mouseInit(...e){const t={touchstart:this._touchStart.bind(this),touchmove:this._touchMove.bind(this),touchend:this._touchEnd.bind(this)};Object.keys(t).forEach(function(e){t[e+"."+this.widgetName]=t[e],delete t[e]}.bind(this)),this.element.on(t),this._touchMoved=!1,this._superApply(e)},_setHandleClassName(){this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),this._addClass(this.options.handle?this.element.find(this.options.handle):n()(n().map(this.items,(function(e){return e.item.get(0)}))),"ui-sortable-handle")}})},"./bundles/oroui/js/extend/jquery.multiselect-filter.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/tools/keyboard-key-codes.js").Z;i("../node_modules/jquery-ui/ui/widget.js"),i("../node_modules/jquery-ui-multiselect-widget/src/jquery.multiselect.filter.min.js"),t.widget("ech.multiselectfilter",t.ech.multiselectfilter,{_create:function(...e){const{searchAriaLabel:i}=this.options,n=this._superApply(e);this.input.attr("aria-label",i||null);const o=t(this.element);return this.input.off("keydown").on(`keydown${this._namespaceID}`,(e=>{if(e.which===s.ENTER)e.preventDefault();else if(e.altKey)switch(e.which){case s.R:e.preventDefault(),t(this).val("").trigger("input","");break;case s.A:o.multiselect("checkAll");break;case s.U:o.multiselect("uncheckAll");break;case s.L:o.multiselect("instance").labels.first().trigger("mouseenter")}})),n},_handler(e){this.cache&&(this._super(e),this.instance.position())},updateCache(){this.instance.labels&&this._super()},_destroy(){return t(this.element).unbind(),this.input.off(`${this._namespaceID}`),this._super()}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroui/js/extend/jquery.multiselect.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/jquery.js"),s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/oroui/js/dropdown-mask.js"),o=i("./bundles/oroui/js/tools/manage-focus.js").Z,r=i("./bundles/oroui/js/tools/keyboard-key-codes.js").Z;i("../node_modules/jquery-ui/ui/widget.js"),i("../node_modules/jquery-ui-multiselect-widget/src/jquery.multiselect.min.js"),i("../node_modules/jquery-ui/ui/tabbable.js"),t.widget("orofilter.multiselect",t.ech.multiselect,{options:s.extend({},t.ech.multiselect.prototype.options,{outerTrigger:null,refreshNotOpened:!0,preventTabOutOfContainer:!0}),_create(...e){this._uniqueName=s.uniqueId(this.widgetName),this.$outerTrigger=t(this.options.outerTrigger),this.initialValue=this.options.initialValue||this.element.val();const i=this._superApply(e),n=[];return this.button.is(":tabbable")&&(this.button.attr({id:this._uniqueName,"aria-haspopup":!0,"aria-expanded":!1}),n.push(this._uniqueName)),this.$outerTrigger.length&&(this.$outerTrigger.attr({id:this.$outerTrigger.attr("id")||this._uniqueName,"aria-haspopup":!0,"aria-expanded":!1}),n.push(this.$outerTrigger.attr("id"))),n.length&&this.menu.attr("aria-labelledby",n.join(" ")),i},_makeOption(e){const t=this._super(e),i=e.getAttribute("data-option-count");return null!==i&&t.find("label span").text(`${e.label} (${i})`),t},_bindEvents(){this._bindButtonEvents(),this._bindMenuEvents(),this._bindHeaderEvents();const e=["mousedown","clearMenus"].map((e=>`${e}${this._namespaceID}`)).join(" ");t(document).on(e,(e=>{this._isOpen&&this._isExcluded(e.target)&&this.close()})),t(this.element[0].form).on(`reset${this._namespaceID}`,(()=>{setTimeout(this.refresh.bind(this),10)}))},_bindHeaderEvents(){const e=this._super();return this.header.undelegate("a","keydown.multiselect"),e},_bindMenuEvents(){const e=this._super();return this.menu.on(`keyup${this._namespaceID}`,"label",(e=>{void 0===this._allowFireEventBySpaceButton&&e.keyCode===r.SPACE&&e.preventDefault(),delete this._allowFireEventBySpaceButton})),this.menu.undelegate("label","keydown.multiselect"),this.menu.on(`keydown${this._namespaceID}`,"label",(e=>{switch(e.which){case r.TAB:this.menu.find(".ui-state-hover").removeClass("ui-state-hover");break;case r.ARROW_UP:case r.ARROW_DOWN:case r.ARROW_LEFT:case r.ARROW_RIGHT:e.preventDefault(),this._traverse(e.which,e.currentTarget);break;case r.ENTER:e.preventDefault(),t(e.currentTarget).find("input").click();break;case r.SPACE:this._allowFireEventBySpaceButton=!0;break;case r.A:e.altKey&&this.checkAll();break;case r.U:e.altKey&&this.uncheckAll()}})),this.menu.on(`keydown${this._namespaceID}`,(e=>{this.options.preventTabOutOfContainer&&o.preventTabOutOfContainer(e,this.menu),e.which===r.ESCAPE&&this.close()})),e},open(...e){if(!this.hasBeenOpened){this.hasBeenOpened=!0;const e=this.element.children(":enabled");this.initialValue instanceof Array&&(this.initialValue=this.initialValue.filter((t=>e.is(`[value="${t}"]`)))),this.refresh()}if(this._superApply(e),!this.options.appendTo){this.menu.css("zIndex","");const e=Math.max(...this.element.parents().add(this.menu).map((function(){const e=Number(t(this).css("zIndex"));return isNaN(e)?0:e})));this.menu.css("zIndex",e+2),n.show(e+1).onhide(this.close.bind(this))}this.button.attr("aria-expanded",!0),this.$outerTrigger.attr("aria-expanded",!0),this.options.preventTabOutOfContainer&&(this.menu.find(".ui-state-hover").removeClass("ui-state-hover"),this.menu.find(".focus-visible").removeClass("focus-visible"),o.focusTabbable(this.menu)),this.menu.attr("tabindex","-1"),this.button.trigger("clearMenus"),this._trigger("opened")},close(){if(!1===this._trigger("beforeclose"))return;n.hide(),this.button.attr("aria-expanded",!1),this.$outerTrigger.attr("aria-expanded",!1),this.menu.removeAttr("tabindex"),this.button.removeClass("ui-state-active"),this.options.preventTabOutOfContainer&&(t.contains(this.menu[0],document.activeElement)||this.menu[0].isSameNode(document.activeElement))&&(this.button.trigger("focus"),this.button.is(":tabbable")||this.$outerTrigger.trigger("focus"));const e=this.options;let i=e.hide,s=this.speed,o=[];t.isArray(e.hide)&&(i=e.hide[0],s=e.hide[1]||this.speed),i&&(o=[i,s]),t.fn.hide.apply(this.menu,o),this._isOpen=!1,this._trigger("close")},updatePos(e){const t=this.widget(),i=t.is(":visible");t.position(e),i&&t.show()},refresh(e){if(this.hasBeenOpened||this.options.refreshNotOpened){let t=this.menu.find(".ui-multiselect-checkboxes");const i=this.menu.find(".ui-multiselect-checkboxes").scrollTop();let{activeElement:s}=document;this.menu[0].contains(s)||(s=null),this._super(e),t=this.menu.find(".ui-multiselect-checkboxes"),s&&(s.id?this.menu.find(`#${s.id}`).focus():this.menu.find(s).length&&!s.disabled?this.menu.find(s).focus():this.menu.focus(),this.menu[0].contains(document.activeElement)||this.menu.focus()),t.scrollTop(i)}this.headerLinkContainer.attr("role","presentation"),this.menu.find(".ui-multiselect-checkboxes").attr({"aria-label":this.options.listAriaLabel?this.options.listAriaLabel:null})},getChecked(){return this.menu.find("input").not("[type=search]").filter(":checked")},getUnchecked(){return this.menu.find("input").not("[type=search]").not(":checked")},_getMinWidth(){const e=this.options.minWidth;return["auto","none"].includes(e)?e:this._super()},_setButtonWidth(){const e=this._getMinWidth();"auto"===e?this.button.outerWidth(e):"none"!==e&&this._super()},_setMenuHeight(){this.menu.find(".ui-multiselect-checkboxes li:hidden, .ui-multiselect-checkboxes a:hidden").addClass("hidden-item"),this.menu.find(".hidden-item").removeClass("hidden-item")},_isExcluded(e){const i=t(e),s=!!i.closest(this.menu).length,n=!!i.closest(this.button).length;let o=!1;return this.$outerTrigger.length&&(o=!!i.closest(this.$outerTrigger).length),!s&&!n&&!o},_destroy(){return this.menu.off(`keydown${this._namespaceID}`,"label"),this.menu.off(`keydown${this._namespaceID}`),delete this.initialValue,this._super()}}),t.widget("ech.multiselect",t.orofilter.multiselect,{})}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroui/js/tools/collection-tools.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/app/models/base/collection.js");return{createFilteredCollection:function(e,i){const n=t.iteratee(i.criteria),o=new(i.collection||s)(e.filter(n),t.omit(i,["criteria"]));return o.listenTo(e,"change add remove reset sort",(function(){o.reset(e.filter(n))})),o}}}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroui/js/tools/search-api-accessor.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/extend/underscore.js"),s=i("./bundles/oroui/js/tools/api-accessor.js").extend({DEFAULT_HTTP_METHOD:"GET",constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){if(e||(e={}),!e.search_handler_name||!e.label_field_name)throw new Error("`search_handler_name` and `label_field_name` options are required");e.route||(e.route="oro_form_autocomplete_search"),e.query_parameter_names||(e.query_parameter_names=[]),e.query_parameter_names.push("page","per_page","name","query"),e.query_parameter_names=t.uniq(e.query_parameter_names),this.searchHandlerName=e.search_handler_name,this.valueFieldName=e.value_field_name||"id",this.labelFieldName=e.label_field_name,s.__super__.initialize.call(this,e)},prepareUrlParameters:function(e){return s.__super__.prepareUrlParameters.call(this,e),e.name=this.searchHandlerName,e.query=e.term,e},formatResult:function(e){const t=e.results;for(let e=0;e<t.length;e++){const i=t[e];i.id=i[this.valueFieldName],i.label=i[this.labelFieldName]}return e}});return s}.call(t,i,t,e))||(e.exports=s)},"./bundles/oroui/js/tools/text-util.js":(e,t,i)=>{var s,n;s=[i("./bundles/oroui/js/extend/underscore.js"),i("./bundles/orotranslation/js/translator.js")],void 0===(n=function(e,t){"use strict";const i=/^((\w{1,3}|\w\.)\s+(\w{1,3}|\w\.)\s+|(\w{1,3}|\w\.?)\s+)(\w+|$)/,s=/(\w+|^)(\s+(\w{1,3}|\w\.)\s+(\w{1,3}|\w\.)|\s+(\w{1,3}|\w\.?))$/,n=new RegExp("\\s+("+t("postpositions").replace("\\","\\\\")+")(\\W|$)","gi"),o=new RegExp("(\\W|^)("+t("prepositions").replace("\\","\\\\")+")((\\s+)("+t("articles").replace("\\","\\\\")+")|)\\s+","gi"),r=t("abbreviate_ignore_list").split("|");return{prepareText:function(t){return e.isString(t)?t=(t=(t=(t=t.replace(i,(function(...e){return e[4]?e[4]+" "+e[5]:e[2]+" "+e[3]+" "+e[5]}))).replace(s,(function(...e){return e[5]?e[1]+" "+e[5]:e[1]+" "+e[3]+" "+e[4]}))).replace(n," $1$2")).replace(o,(function(...e){return e[5]?e[1]+e[2]+" "+e[5]+" ":e[1]+e[2]+" "})):t},abbreviate:function(t,i){if(!e.isString(t))return t;let s=t.split(/\s+/g).map((function(e){return e.replace(/^[!-#%-*,-/:;?@\[-\]_{}"']+|[!-#%-*,-/:;?@\[-\]_{}'"]+$/g,"")}));return s=e.compact(s),s.length<i?t:s.map((function(e){return-1!==r.indexOf(e.toLowerCase())?"":e[0].toUpperCase()})).join("")}}}.apply(t,s))||(e.exports=n)},"./bundles/orouser/js/datagrid/cell/action-permissions-cell.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroui/js/app/views/base/view.js"),s=i("./bundles/orodatagrid/js/extend/backgrid.js");return t.extend({optionNames:["column"],_attributes:s.Cell.prototype._attributes,constructor:function e(t){e.__super__.constructor.call(this,t)}})}.call(t,i,t,e))||(e.exports=s)},"./bundles/orowebsiteelasticsearch/default/js/datagrid/saved-search/cell/applied-parameters-cell.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>n});const s=i("./bundles/orodatagrid/js/datagrid/cell/html-template-cell.js").default.extend({className:"applied-parameters-cell",constructor:function e(t){e.__super__.constructor.call(this,t)},getTemplateData(){const e=s.__super__.getTemplateData.call(this),t=this.model.get("paramRendererProvider");return t&&(e.parameters=t.renderParams(this.model.get("appliedParameters"),{gridName:this.model.get("gridName")})),e}}),n=s},"./bundles/orowebsiteelasticsearch/default/js/datagrid/saved-search/constants.js":(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});const s={MODE:{CREATE:"create",EDIT:"edit",SYNC:"sync",VIEW:"view"}}},"./bundles/orowebsiteelasticsearch/default/js/datagrid/saved-search/saved-search-builder.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>a});var s=i("./bundles/oroui/js/extend/underscore.js"),n=i("./bundles/oroui/js/app/services/load-modules.js"),o=i.n(n);const r={init:(e,t)=>{if(r.useSavedSearch(t)){const e=o()({SavedSearchComponent:"orowebsiteelasticsearch/default/js/datagrid/saved-search/saved-search-component"});t.gridPromise.done((t=>{t.once("filterManager:connected",(()=>{e.then((({SavedSearchComponent:e})=>{new e({datagrid:t})}))}))}))}return e.resolve()},useSavedSearch:e=>(0,s.isObject)(e.metadata.savedSearchData)},a=r},"./bundles/orowebsiteelasticsearch/default/js/datagrid/saved-search/saved-search-component.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>b});var s=i("./bundles/oroui/js/extend/jquery.js"),n=i.n(s),o=i("./bundles/oroui/js/extend/underscore.js"),r=i("./bundles/orowebsiteelasticsearch/default/js/datagrid/saved-search/constants.js"),a=i("./bundles/oroui/js/app/components/base/component.js"),l=i.n(a),d=i("./bundles/oroui/js/mediator.js"),c=i.n(d),u=i("./bundles/oroui/js/viewport-manager.js"),h=i("./bundles/orowebsiteelasticsearch/default/js/datagrid/saved-search/saved-search-fullscreen-view.js"),p=i("./bundles/orowebsiteelasticsearch/default/js/datagrid/saved-search/saved-search-dropdown-view.js"),_=i("./bundles/oroui/js/app/services/module-config.js");const g=r.Z.MODE,m=n().extend(!0,{},{fullscreenMode:"tablet",topBarExtraClass:"datagrid-tool",actionsExtraClass:"",insideGrid:{dropdownAlignment:(0,o.isRTL)()?null:"dropdown-menu-right",dropdownOffset:null},outsideGrid:{dropdownAlignment:(0,o.isRTL)()?null:"dropdown-menu-right",dropdownOffset:(0,o.isRTL)()?"-72, 0":"72, 0"}},(0,_.Z)(e.id)),f=l().extend({constructor:function e(t){e.__super__.constructor.call(this,t)},initialize(e){if(!e.datagrid)throw new Error('The "datagrid" option is required.');this.datagrid=e.datagrid,this.defineView()},reactViewportChange(){this.ignoreViewportChange(),this.listenTo(c(),`viewport:${m.fullscreenMode}`,this.defineView.bind(this)),this.view.listenTo(this.view,{rerender:()=>{const{container:e,extraClass:t,dropdownAlignment:i,dropdownOffset:s}=this.getViewOptions(this.datagrid);this.view.container=e,this.view.extraClass=t,this.view.name===p.default.NAME&&(this.view.dropdownAlignment=i,this.view.dropdownOffset=s),this.view.$el.attr("class",this.view.className()),this.view.el.remove(),this.view.render()}})},ignoreViewportChange(){this.stopListening(c()),this.view.stopListening(this.view,"rerender")},defineView(e){u.Z.isApplicable(m.fullscreenMode)?void 0===this.view?this.initView(h.default):this.view.name===p.default.NAME&&this.initViewAndRestore(h.default):void 0===this.view?this.initView(p.default):this.view.name===h.default.NAME&&this.initViewAndRestore(p.default)},initView(e){return this.disposeView(),this.view=new e({datagrid:this.datagrid,...this.getViewOptions(this.datagrid)}),this.view.listenTo(this.view,{"show-popup":()=>this.ignoreViewportChange(),"close-popup":()=>{this.reactViewportChange(),this.defineView()}}),this.view.render(),this.reactViewportChange(),this.view},initViewAndRestore(e){const t=t=>{const i=this.initView(e);i.setState(t),i.defineViewMode(),i.render()};void 0!==this.view?this.view.viewMode!==g.SYNC?t(this.view.getState()):this.listenToOnce(this.view,"sync-completed",(()=>{t(this.view.getState())})):this.initView(e)},disposeView(){this.view&&!this.view.disposed&&(this.ignoreViewportChange(),this.view.dispose(),delete this.view)},getViewOptions(e){const t=(e,t)=>{for(const[i,s]of Object.entries(e))s&&(t[i]=s)},i={container:e.el,extraClass:m.actionsExtraClass},s=e.filterManager.$el.not(".fullscreen").find('[data-role="filter-actions"]'),n=e.toolbars.top.$('[data-section="right-side"]');return s.is(":visible")?i.container=s[0]:n.is(":visible")&&(i.container=n[0],i.extraClass=m.topBarExtraClass),e.el.contains(i.container)?t(m.insideGrid,i):t(m.outsideGrid,i),i},dispose:function(){this.disposed||(delete this.datagrid,this.disposeView(),f.__super__.dispose.call(this))}}),b=f},"./bundles/orowebsiteelasticsearch/default/js/datagrid/saved-search/saved-search-dropdown-view.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>B});var s=i("./bundles/orowebsiteelasticsearch/default/js/datagrid/saved-search/constants.js"),n=i("./bundles/orotranslation/js/translator.js"),o=i.n(n),r=i("./bundles/fosjsrouting/js/router.js"),a=i.n(r),l=i("./bundles/oroui/js/extend/underscore.js"),d=i.n(l);const c={create:()=>o()("oro.websiteelasticsearch.savedsearch.flash_messages.created"),update:()=>o()("oro.websiteelasticsearch.savedsearch.flash_messages.updated"),noFound:()=>o()("oro.websiteelasticsearch.savedsearch.flash_messages.deleted"),limitPerUserReached(){const e=d().macros("oroui::renderLink")({href:a().generate("oro_savedsearch_frontend_index"),target:"__blank",text:o()("oro.websiteelasticsearch.savedsearch.flash_messages.limit_reached_link_text")});return o()("oro.websiteelasticsearch.savedsearch.flash_messages.limit_reached",{limit_reached_link_text:e})}};var u=i("./bundles/oroui/js/extend/jquery.js"),h=i.n(u),p=i("../node_modules/@oroinc/bootstrap/js/dist/popover.js"),_=i.n(p),g=i("./bundles/oroui/js/app/views/base/view.js"),m=i.n(g),f=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orowebsiteelasticsearch/templates/saved-search/dropdown.html"),b=i.n(f),v=i("./bundles/oroui/js/tools.js"),w=i.n(v),j=i("./bundles/oroui/js/mediator.js"),C=i.n(j),y=i("./bundles/oroui/js/delete-confirmation.js"),x=i.n(y),k=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orowebsiteelasticsearch/templates/saved-search/form-actions.html"),S=i.n(k);const T=m().extend({optionNames:m().prototype.optionNames.concat(["stateMap"]),template:S(),events:{'click [data-role="save"]':"onSave",'click [data-role="undo"]':"onUndo",'click [data-role="abort"]':"onAbort"},noWrap:!0,constructor:function e(t){e.__super__.constructor.call(this,t)},initialize(e){if(!e.stateMap)throw new TypeError('"stateMap" is required');T.__super__.initialize.call(this,e)},getTemplateData(){const e=T.__super__.getTemplateData.call(this);return e.stateMap=this.stateMap,e},setStateMap(e){void 0!==e&&(this.stateMap=e)},onSave(e){this.trigger("save",e)},onUndo(e){this.trigger("undo",e)},onAbort(e){this.trigger("abort",e)}}),E=T;var V=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orowebsiteelasticsearch/templates/saved-search/form.html"),D=i.n(V),M=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orowebsiteelasticsearch/templates/saved-search/update-entity.html"),A=i.n(M),O=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orowebsiteelasticsearch/templates/saved-search/notifications.html"),$=i.n(O),P=(i("./bundles/oroform/js/extend/validate.js"),i("../node_modules/jquery-ui/ui/tabbable.js"),i("./bundles/oroui/js/tools/manage-focus.js"));const N=s.Z.MODE,F=m().extend({optionNames:m().prototype.optionNames.concat(["searchParams"]),sections:{form:{selector:'[role="form"]',template:D()},notifications:{selector:'[data-role="notifications-list"]',template:$()},entity:{selector:'[data-role="entity"]',template:A()}},stateMap:{[N.CREATE]:{form:{ariaLabel:"oro.websiteelasticsearch.savedsearch.form.save_aria_label",saveButton:{label:"Add",ariaLabel:"oro.websiteelasticsearch.savedsearch.form.saveButton.save_aria_label"},cancelButton:{label:"Cancel",ariaLabel:"oro.websiteelasticsearch.savedsearch.form.cancelButton.save_aria_label"}}},[N.EDIT]:{form:{ariaLabel:"oro.websiteelasticsearch.savedsearch.form.update_aria_label",saveButton:{label:"Save",ariaLabel:"oro.websiteelasticsearch.savedsearch.form.saveButton.update_aria_label"},cancelButton:{label:"Cancel",ariaLabel:"oro.websiteelasticsearch.savedsearch.form.cancelButton.update_aria_label"}}},[N.VIEW]:{}},className:"saved-search-form",attributes:{"data-role":"form-wrapper"},events:{"change input[type=checkbox]":"onCheckboxChange",'click [data-role="edit-item"]':"editEntity",'click [data-role="delete-item"]':"deleteEntity",keydown:"onKeyDown",'input [data-role="name"]':"onInputName",'blur [data-role="name"]':"onInputName",'focus [data-role="name"]':"onFocusName"},confirmationOptions:{content:o()("Are you sure you want to delete this item?")},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize(e){const t=new E({stateMap:this.getStateMap(),model:this.model});this.subview("formActions",t),this.listenTo(t,{save:this.submitForm,undo:this.undoEditEntity,abort:this.abortEditEntity}),this.listenTo(this.model,{valid:this.onModelIsValid,invalid:this.onModelIsInvalid,"change:viewMode":this.render}),F.__super__.initialize.call(this,e)},getStateMap(){return this.stateMap[this.model.get("viewMode")]},getFormActions(){return this.subview("formActions")},getTemplateData(){const e=F.__super__.getTemplateData.call(this),t=this.model.get("name");return e.MODE=N,e.cid=this.cid,e.stateMap=this.getStateMap(),e.isOutOfLimit=this.model.isOutOfLimit(),e.inputValue=t||this.searchParams,e},render(){F.__super__.render.call(this);const e=this.getCompositeNodes();return this.$el.html("").append(...e),this.disableCheckboxes(),this.blockSubmitAction(),h()(document.activeElement).is("body")&&P.Z.focusTabbable(this.$el),this},getCompositeNodes(){const e=this.model.get("viewMode"),t=[];if(void 0===this.stateMap[e])return t;const i=this.subview("formActions"),s=this.getTemplateData();return i.setStateMap(this.getStateMap()),N.VIEW===e?t.push(this.sections.entity.template(s),this.sections.notifications.template(s)):t.push(this.sections.form.template(s),i.render().el),t},editEntity(e){e.stopPropagation(),this.model.set("viewMode",N.EDIT),this.trigger("edit-entity")},undoEditEntity(e){e.stopPropagation(),this.model.set("viewMode",N.VIEW),this.trigger("undo-edit")},abortEditEntity(e){e.stopPropagation(),this.trigger("abort-edit")},onCheckboxChange(e){this.disableCheckboxes(),this.blockSubmitAction()},disableCheckboxes(){if(this.model.isOutOfLimit()){const e=this.model.get("disableWhenOutOfLimit")||[];this.$("input[type=checkbox]").filter(((t,i)=>!i.checked&&e.includes(parseInt(i.value)))).attr("disabled",!0)}},blockSubmitAction(){const e=this.notFalidForm||!this.formStateIsNotChanged();this.subview("formActions").$('[data-role="save"]').attr("disabled",e)},formStateIsNotChanged(){const e=["name","type"];return!this.model.get("id")||!w().isEqualsLoosely(d().pick(this.getFormData(),e),d().pick(this.model.toJSON(),e))},onKeyDown(e){13===e.which&&this.$(this.sections.form.selector).is(":visible")&&h().contains(this.el,document.activeElement)?this.submitForm():27===e.which&&this.model.get("viewMode")===N.EDIT&&this.$(this.sections.form.selector).is(":visible")&&h().contains(this.el,document.activeElement)&&this.undoEditEntity(e)},getId(){return this.model._destroyed?null:this.model.get("id")},getName(){return this.model._destroyed?null:this.model.get("name")},getState(){return this.model._destroyed?null:this.model.toJSON()},setState(e){this.model._destroyed||this.model.set(e)},notAllowToSubmit(){return this.notFalidForm||this.subview("formActions").$('[data-role="save"]').is(":disabled")},submitForm(){const e=this.getFormData();this.model.set({name:e.name,type:e.type}),this.notAllowToSubmit()||this.doSave(e)},doSave(e){this.model.save(null,{wait:!0,url:this.model.url(),errorHandlerMessage:this.doSaveErrorHandler.bind(this,e),attrs:{...this.model.getDataToSave(),type:e.typeKeys},success:this.requestSaveSuccess.bind(this,e),error:this.requestSaveError.bind(this,e)}),this.trigger("save-entity")},requestSaveSuccess(e,t,i,s){const n=204===s.xhr.status,o=!t.previous("id")&&200===s.xhr.status,r=n?c.update():c.create();o?this.doSave(e):C().execute("showFlashMessage","success",r)},requestSaveError(e,t,i,s){const{status:n,responseJSON:o}=i;400===n&&o&&o.limitPerUserReached&&(o.message=c.limitPerUserReached(),setTimeout((()=>this.model.trigger("cancel-action")),0))},doSaveErrorHandler(e,t,i){return 404!==i.status||(this.model.set({id:this.model.getDefaultId(),name:e.name,type:e.type}),this.doSave(e),!1)},deleteEntity(e){const t=new(x())(this.confirmationOptions);let i=!0;this.subview("confirm",t),this.listenTo(t,{ok:()=>{i=!1,this.doDelete()},close:()=>{this.cancelDelete(i)}}),t.open()},cancelDelete(e){e&&setTimeout((()=>this.model.trigger("cancel-action")),0)},doDelete(){this.model.destroy({url:this.model.url("delete"),wait:!0,errorHandlerMessage:this.doDeleteErrorHandler.bind(this),success:this.requestDeleteSuccess.bind(this),error:this.requestDeleteError.bind(this)})},doDeleteErrorHandler:(e,t)=>404!==t.status||(C().execute("showFlashMessage","success",c.noFound()),!1),requestDeleteSuccess(e,t,i){C().execute("showFlashMessage","success",t.message)},requestDeleteError(e,t,i){404===i.xhr.status&&this.model.trigger("destroy")},showErrors(e,t){const i=this.renderErrors(t);this.$("[data-role=name]").addClass(h().validator.defaults.errorElementClassName).after(i)},renderErrors(e){const t=e.map((e=>h().validator.defaults.errorMessageTemplate({message:e,showIcon:!1})));return this.hideErrors(),h()(document.createElement(h().validator.defaults.errorElement)).addClass(h().validator.defaults.errorClass).append(...t)},hideErrors(){this.$("[data-role=name]").removeClass(h().validator.defaults.errorElementClassName),this.$(`.${h().validator.defaults.errorClass}`).remove()},validateName(e){this.model.validate({name:e.trim()},{validate:!0})},onModelIsValid(e,t){this.notFalidForm=!1,this.hideErrors(),this.blockSubmitAction()},onModelIsInvalid(e,t){this.notFalidForm=!0,this.showErrors(e,t),this.blockSubmitAction()},onInputName(e){this.$(this.sections.form.selector).is(":visible")&&this.validateName(e.target.value)},onFocusName(e){h()(e.target).setCursorPosition(e.target.value.length)},getFormData(){return this.$(":input").serializeArray().reduce(((e,t)=>{const i=t.name.replace(`${this.cid}`,"");return-1!==i.search(/^type/)?(e.typeKeys.push(t.value),e.type.push(i.replace("type","").trim())):e[i]=t.value,e}),{typeKeys:[],type:[]})},dispose(){this.disposed||(delete this.sections,delete this.stateMap,this.stopListening(),F.__super__.dispose.call(this))}}),R=F;var I=i("./bundles/oroui/js/app/models/base/model.js");const L=i.n(I)().extend({route:{create:"oro_savedsearch_frontend_ajax_create",update:"oro_savedsearch_frontend_ajax_update",delete:"oro_savedsearch_frontend_ajax_delete"},defaults:{id:null,name:null,disableWhenOutOfLimit:[],resultSetLimit:1e3,totalRecords:0,type:null,availableNotifications:null,viewMode:null,gridName:null,state:{}},maxNameLength:255,constructor:function e(...t){e.__super__.constructor.apply(this,t)},initialize(e,t){return L.__super__.initialize.call(this,e,t),this.updateTypeState(),this.on("change:type",this.updateTypeState),this.on("destroy",(()=>this._destroyed=!0)),this},updateTypeState(e=!0){const t=this.get("availableNotifications");if(t&&Object.keys(t).length>0){const i=this.get("type"),s=d().reduce(t,((e,t,s)=>(e[s]={value:t,checked:i&&i.includes(s)},e)),{});this.set("typeState",s,{silent:e})}return this},isOutOfLimit(){return this.get("resultSetLimit")&&this.get("totalRecords")>this.get("resultSetLimit")},validate(e,t){const i=[];return e.name?e.name&&e.name.length>this.maxNameLength&&i.push(o()("oro.websiteelasticsearch.savedsearch.name.limit",{limit:this.maxNameLength})):i.push(o()("oro.websiteelasticsearch.savedsearch.name.notBlank")),i.length?(this.trigger("invalid",this,i),i):(this.trigger("valid",this,e),null)},url(e){const t={},i=this.get("id");return i&&(t.id=i),void 0===e&&(e=i?"update":"create"),a().generate(this.route[e],t)},getDataToSave(){return d().pick(this.toJSON(),["name","state","gridName"])},getDefaultId(){return this.defaults.id}}),z=L,q=s.Z.MODE,H=(e=".category-title")=>{const t=document.querySelectorAll(e)[0];return void 0!==t?t.innerText.trim():""},W=m().extend({optionNames:m().prototype.optionNames.concat(["dropdownAlignment","dropdownOffset","datagrid","viewMode","stateMap","extraClass"]),className(){return["dropdown","saved-search",this.extraClass].filter((e=>e)).join(" ")},template:b(),events:{"click .dropdown-menu":"onClickView","hide.bs.dropdown":"onHideDropdown",'mouseover [data-toggle="popover-helper"]':"showPopover",'click [data-toggle="popover-helper"]':"showPopover"},stateMap:{[q.SYNC]:{icon:"fa-spinner fa-spin fa--no-offset"},[q.CREATE]:{title:"oro.websiteelasticsearch.savedsearch.title.create",trigger:{title:"oro.websiteelasticsearch.savedsearch.toggle_button.title.save",ariaLabel:"oro.websiteelasticsearch.savedsearch.toggle_button.title.aria_label.save"},icon:"fa-star-o fa--no-offset"},[q.VIEW]:{title:"oro.websiteelasticsearch.savedsearch.title.view",trigger:{title:"oro.websiteelasticsearch.savedsearch.toggle_button.title.edit",ariaLabel:"oro.websiteelasticsearch.savedsearch.toggle_button.title.aria_label.edit"},icon:"fa-star fa--no-offset"}},extraClass:"",dropdownAlignment:"",dropdownOffset:"0, 0",viewMode:q.CREATE,containerMethod:"prepend",popoverConfig:{class:"fixed-min-width",close:!1,content:c.limitPerUserReached(),placement:"bottom",delay:{show:300,hide:0},offset:"0, 2",trigger:"manual",html:!0},constructor:function e(t){this.showPopover=d().debounce(this.showPopover,100),e.__super__.constructor.call(this,t)},preinitialize(){return this.name=W.NAME,this},initialize(e){W.__super__.initialize.call(this,e),this.initializeFormView({...this.getSavedSearchData(),...this.getSearchData()}),this.listenTo(this.datagrid,{disable:this.enableSyncMode,enable:()=>{const e=this.subview("formView");e&&!e.disposed&&e.model.set({...this.getSavedSearchData(),...this.getSearchData()}),this.disableSyncMode()}}),this.listenTo(this.datagrid.filterManager,"visibility-change",(e=>this.trigger("rerender"))),this.listenTo(this,"view-mode-changed",(e=>{const t=this.subview("formView");t&&!t.disposed&&t.model.set("viewMode",e)})),this.defineViewMode()},initializeFormView(e={}){const t=this.subview("formView");t&&(this.stopListening(t),this.stopListening(t.model),this.removeSubview("formView"));const i=new z({...e,viewMode:this.viewMode}),s=new R({searchParams:H(),model:i});this.subview("formView",s),this.listenTo(s,{"abort-edit":this.onAbortEditEntity}),this.listenTo(i,{request:this.onBeforeSendForm,sync:(...e)=>this.onCompleteSendForm(!0,...e),error:(...e)=>this.onCompleteSendForm(!1,...e),"cancel-action":this.onCancelDelete})},getTemplateData(){const e=W.__super__.getTemplateData.call(this);return e.stateMap=this.stateMap[this.viewMode],e.dropdownAlignment=this.dropdownAlignment,e.dropdownOffset=this.dropdownOffset,e.viewMode=this.viewMode,e.label=this.getLabel(),e},render(){const e=this.subview("formView").render().$el.detach();return W.__super__.render.call(this),this.$('[data-role="content"]').html(e),this.postRender(),this},postRender(){this.isLimitPerUserReached()?(this.$el.addClass("limit-reached"),this.disableTrigger()):(this.$el.removeClass("limit-reached"),this.enableTrigger())},renderForm(){this.subview("formView").disposed||this.subview("formView").render()},isLimitPerUserReached(){const{limitPerUserReached:e,id:t}=this.getSavedSearchData();return e&&null===t},showPopover(e){e.target===e.currentTarget&&(h()(e.target).data(_().DATA_KEY)||h()(e.target).popover({container:e.target,...this.popoverConfig}),"click"===e.type?h()(e.target).popover("toggle"):h()(e.target).popover("show"),h()(this.el).one(`mouseleave #${this.cid}`,(()=>{h()(e.target).popover("dispose")})))},dispose(){this.disposed||(delete this.stateMap,delete this.datagrid,this.$('[data-toggle="popover-helper"]').data(_().DATA_KEY)&&this.$('[data-toggle="popover-helper"]').popover("dispose"),W.__super__.dispose.call(this))},defineViewMode(){const e=this.subview("formView");this.viewMode=e&&e.getId()?q.VIEW:q.CREATE,this.trigger("view-mode-changed",this.viewMode)},defineSyncMode(){this.viewMode=q.SYNC,this.trigger("view-mode-changed",this.viewMode)},getSearchData(){return{totalRecords:this.datagrid.collection.state.totalRecords,availableNotifications:this.datagrid.metadata.savedSearchNotifications,gridName:this.datagrid.collection.inputName,state:this._getDatagridStateQuery()}},getSavedSearchData(){return this.datagrid.metadata.savedSearchData},onClickView(e){this.$(e.target).is("[data-close]")||e.stopPropagation()},onHideDropdown(){this.defineViewMode(),this.renderForm()},openDropdown(){this.$('[data-toggle="dropdown"]').dropdown("show")},closeDropdown(){this.$('[data-toggle="dropdown"]').trigger("tohide.bs.dropdown")},disableTrigger(){this.$('[data-toggle="dropdown"]').attr("disabled",!0)},enableTrigger(){this.$('[data-toggle="dropdown"]').removeAttr("disabled")},enableSyncMode(){this.closeDropdown(),this.defineSyncMode(),this.render(),this.disableTrigger()},disableSyncMode(){this.defineViewMode(),this.render()},onBeforeSendForm(){this.enableSyncMode()},onCompleteSendForm(e,t,i,s){if(this.disableSyncMode(),t._destroyed){const e=d().omit(this.getSavedSearchData(),["id","type","name"]);this.initializeFormView({...this.getSearchData(),...e}),this.defineViewMode(),this.render()}this.trigger("sync-completed",e)},onCancelDelete(){this.openDropdown(),this.renderForm()},onAbortEditEntity(){this.closeDropdown()},_getDatagridStateQuery(){return[this.datagrid.collection.stateHashKey(),encodeURIComponent(this.datagrid.collection.stateHashValue(!1))].join("=")},getLabel(){const e=this.subview("formView"),t=e.getId(),i=e.getName();return t&&i&&this.viewMode!==q.SYNC?i:o()("oro.websiteelasticsearch.savedsearch.toggle_button.label")},getState(){const e=this.subview("formView");return!e&&e.disposed?{}:e.getState()||{}},setState(e){this.subview("formView").setState(e)}},{NAME:"dropdown"}),B=W},"./bundles/orowebsiteelasticsearch/default/js/datagrid/saved-search/saved-search-fullscreen-view.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>p});var s=i("./bundles/orotranslation/js/translator.js"),n=i.n(s),o=i("./bundles/orowebsiteelasticsearch/default/js/datagrid/saved-search/constants.js"),r=i("./bundles/orowebsiteelasticsearch/default/js/datagrid/saved-search/saved-search-dropdown-view.js"),a=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orowebsiteelasticsearch/templates/saved-search/fullscreen.html"),l=i.n(a),d=i("./bundles/orofrontend/default/js/app/views/fullscreen-popup-view.js"),c=i.n(d);const u=o.Z.MODE,h=r.default.extend({template:l(),events:{'click [data-role="button"]':"openPopup"},className(){return["saved-search",this.extraClass].filter((e=>e)).join(" ")},constructor:function e(t){e.__super__.constructor.call(this,t)},preinitialize(){return this.name=h.NAME,this},initialize(e){h.__super__.initialize.call(this,e)},initializeFormView(e){h.__super__.initializeFormView.call(this,e);const t=this.subview("formView");this.listenTo(t,{"edit-entity":this.onEditEntity,"save-entity":this.onSubmitForm,"undo-edit":this.onUndoEditEntity,"abort-edit":this.onAbortEditEntity})},initializePopupView(){const e=this.subview("popupView");e&&(this.stopListening(e),this.removeSubview("popupView"));const t=new(c())({...this.getPopupOptions(),contentElement:this.subview("formView").el});this.subview("popupView",t),this.listenTo(t,{show:this.onShowPopup,close:this.onClosePopup}),t.show(),t.$popup.addClass(`${this.className()} fullscreen`)},openPopup(){this.initializePopupView(),u.VIEW===this.viewMode&&this.togglePopupFooter()},onShowPopup(){this.moveFormAction(),this.trigger("show-popup")},onClosePopup:function(){this.renderForm(),this.trigger("close-popup")},onEditEntity(){this.togglePopupFooter(!1),this.moveFormAction()},moveFormAction(){const e=this.subview("formView").getFormActions();e&&this.subview("popupView").footer.$el.html("").append(e.el)},togglePopupFooter(e=!0){this.subview("popupView").footer.$el.toggleClass("hide",e)},onUndoEditEntity(){this._afterEdit()},onAbortEditEntity(){this._afterEdit()},onSubmitForm(){this.subview("popupView").close()},onBeforeSendForm(){h.__super__.onBeforeSendForm.call(this),this.subview("popupView").close()},onCancelDelete(){},getPopupOptions(){const e=n()(`oro.websiteelasticsearch.savedsearch.title.${this.viewMode}`),t=this.stateMap[this.viewMode];return{popupBadge:!0,popupLabel:e,popupIcon:t?t.icon:void 0}},_afterEdit(){u.CREATE===this.viewMode?this.subview("popupView").close():this.togglePopupFooter()}},{NAME:"fullscreen"}),p=h},"./bundles/orowebsiteelasticsearch/default/js/datagrid/saved-search/saved-search-parameters-builder.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>v});var s=i("./bundles/oroui/js/extend/underscore.js"),n=i.n(s),o=i("./bundles/oroui/js/base-class.js"),r=i.n(o),a=i("./bundles/orotranslation/js/translator.js"),l=i.n(a);const d=r().extend({constructor:function e(t){e.__super__.constructor.call(this,t)},exclusiveTranslation:"oro.websiteelasticsearch.savedsearch.url_params.exclusive.label",exclusiveList:["includeSubcategories","overrideVariantConfiguration"],initialize(e){if(this.options={},Object.assign(this.options,e),!this.options.props)throw new Error("Required option props not found.")},prepare(){},renderParams(e,t){const i=this._render(n().omit(e,this.exclusiveList)),s=this._render(n().pick(e,this.exclusiveList)),o=Object.values(n().omit(s,"_unrecognized"));return o.length&&(i.exclusive=l()(this.exclusiveTranslation,{value:o.join(", ")})),Object.assign(i._unrecognized,s._unrecognized),i},_render(e){return n().reduce(e,((t,i,s)=>{const n=this.options.props[s];return n&&"option"===n.type&&i.value?t[s]=l()(n.label):n&&"parameter"===n.type?t[s]=l()(n.label,{value:i.value}):t._unrecognized[s]=e,t}),{_unrecognized:{}})},dispose(){this.disposed||(delete this.options,d.__super__.dispose.call(this))}},{NAME:"urlParams"}),c=d;var u=i("./bundles/oroui/js/app/services/load-modules.js"),h=i.n(u),p=i("./bundles/orofilter/js/map-filter-module-name.js"),_=i.n(p);const g=r().extend({loadedFilters:{},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize(e){if(this.options={},Object.assign(this.options,e),!this.options.props)throw new Error("Required option props not found.")},prepare(){return this.initializeFilters()},mapUniqFilters:function(){const e={};return n().each(this.options.props,((t,i)=>{n().each(t||{},(t=>{const i=t.type;e[i]=_()(i)}))})),e},getFilterState({name:e,value:t},i){const s=this.loadedFilters[i][e];if(void 0!==s)return s.setValue(t),s.getState()},initializeFilters(){return this.disposeFilters(),h()(this.mapUniqFilters()).then((e=>{n().each(this.options.props,((t,i)=>{this.loadedFilters[i]={},n().each(t||[],(t=>{const s=t.name;let n=e[t.type];s&&n&&(n=n.extend(t),this.loadedFilters[i][s]=new n)}))}))}))},disposeFilters(){n().each(this.loadedFilters,((e,t)=>{n().each(e,((e,i)=>{e.disposed||e.dispose(),delete this.loadedFilters[t][i]})),delete this.loadedFilters[t]})),this.loadedFilters={}},renderParams(e,t){return n().reduce(e,((i,s,n)=>{const{gridName:o}=t,r=this.getFilterState({value:s,name:n},o);return r?i[n]=r:i._unrecognized[n]=e,i}),{_unrecognized:{}})},dispose(){this.disposed||(delete this.options,this.disposeFilters(),g.__super__.dispose.call(this))}},{NAME:"filters"}),m=g,f=r().extend({paramRenderersMap:{[c.NAME]:c,[m.NAME]:m},paramRenderers:null,constructor:function e(t){this.paramRenderers={},e.__super__.constructor.call(this,t)},initialize(e){this.initRenderers(e.paramRenderers)},prepareRenderers(){const e=Object.values(this.paramRenderers).map((e=>e.prepare()));return Promise.all(n().compact(e))},initRenderers(e){n().each(e,((e,t)=>{const i=this.paramRenderersMap[t];i&&(this.paramRenderers[t]=new i({props:e}))}))},renderParams(e,t){return n().reduce(e,((e,i,s)=>{const n=this.paramRenderers[s];if(n){const{_unrecognized:o,...r}=n.renderParams(i,t);e[s]=r,Object.keys(o).length&&(e._unrecognized[s]=o)}else e._unrecognized[s]=i;return e}),{_unrecognized:{}})},dispose(){this.disposed||(this.disposeParamRenderers(),f.__super__.dispose.call(this))},disposeParamRenderers(){n().each(this.paramRenderers,((e,t)=>{!e.disposed&&n().isFunction(e.dispose)&&e.dispose(),delete this.paramRenderers[t]})),this.paramRenderers={}}}),b=f,v={processDatagridOptions:(e,t)=>{const i=new b({paramRenderers:t.metadata.savedSearchMetadata}),s=e=>n().each(e,(e=>e.paramRendererProvider=i));s(t.data.data);const{parseResponseModels:o}=t.metadata.options;Object.assign(t.metadata.options,{parseResponseModels:function(e){return o&&(e=o.call(this,e)),"data"in e?s(e.data):e}}),i.prepareRenderers().then((()=>e.resolve(i)))},init:(e,t)=>e.resolve()}},"./bundles/orowebsiteelasticsearch/default/js/saved-search/saved-search-notification-view.js":(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>r});var s=i("./bundles/oroui/js/app/views/base/view.js"),n=i.n(s);const o=n().extend({optionNames:n().prototype.optionNames.concat(["disabledTypes"]),autoRender:!0,events:{"change input[type=checkbox]":"onCheckboxChange"},constructor:function e(t){e.__super__.constructor.call(this,t)},initialize(e){o.__super__.initialize.call(this,e)},render(){return o.__super__.render.call(this),this.disableCheckboxes(),this},onCheckboxChange(e){this.disableCheckboxes()},disableCheckboxes(){this.el.querySelectorAll("input[type=checkbox]").forEach((e=>{!e.checked&&this.disabledTypes.includes(parseInt(e.value))&&e.setAttribute("disabled",!0)}))},dispose(){this.disposed||o.__super__.dispose.call(this)}}),r=o},"./bundles/pscatalog/js/filter/pscategory-filter.js":(e,t,i)=>{var s;s=function(e,t,s){"use strict";const n=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/orofilter/default/templates/filters/filter-wrapper.html"),o=i("../node_modules/@oroinc/oro-webpack-config-builder/loader/tpl-loader.js!./bundles/pscatalog/templates/filter/pscategory-filter.html"),r=i("./bundles/oroui/js/extend/jquery.js"),a=i("./bundles/oroui/js/extend/underscore.js"),l=(i("./bundles/orotranslation/js/translator.js"),i("./bundles/orofrontend/default/js/app/views/frontend-abstract-filter.js")),d=i("./bundles/oroui/js/tools.js");i("./bundles/oroui/js/mediator.js");let c=i("./bundles/oroui/js/app/services/module-config.js").Z(s.id);c=a.extend({notAlignCriteria:d.isMobile()},c);const u=l.extend({wrappable:!0,notAlignCriteria:c.notAlignCriteria,wrapperTemplate:n,wrapperTemplateSelector:"#filter-wrapper-template",template:o,templateSelector:"#pscategory-filter-template",collapsibleSelector:".datagrid-manager__list-item",collapsibleTrigger:".filter-criteria-selector-icon-wrap",collapsibleContainer:"> .dropdown-menu--sublist",criteriaHintSelector:".filter-criteria-hint",criteriaSelector:".filter-criteria",criteriaValueSelectors:{readValue:'input[type="checkbox"]:checked',writeValue:'input[type="checkbox"]'},events:{"click .filter-criteria-selector":"_onClickCriteriaSelector","click .filter-criteria .filter-criteria-hide":"_onClickCloseCriteria","click .disable-filter":"_onClickDisableFilter","change input":"_onChanged"},listen:{"layout:reposition mediator":"_onLayoutReposition","metadata-loaded":"onMetadataLoaded"},constructor:function e(){e.__super__.constructor.apply(this,arguments)},initialize:function(e){a.isUndefined(this.emptyValue)&&(this.emptyValue={value:[]}),u.__super__.initialize.apply(this,arguments)},reset:function(){return this.setValue({value:[this.rootCategory]}),this._processCollapsed(),this},_onClickCriteriaSelector:function(e){e.stopPropagation(),e.preventDefault(),this.popupCriteriaShowed?this._hideCriteria():this._showCriteria()},_onChanged:function(e){this._hideCriteria(),this._processCollapsed();const t=e.target.checked;this._changeParentItems(e.target.getAttribute("data-parent-category-path"),t),this._changeChildrenItems(e.target.getAttribute("data-category-path"),t),this.applyValue()},_changeParentItems:function(e,t){if(t){const i=this.$(this.criteriaValueSelectors.writeValue+'[data-category-path="'+e+'"]');i.prop("checked",t);const s=i.attr("data-parent-category-path");a.isEmpty(s)||this._changeParentItems(s,t)}},_changeChildrenItems:function(e,t){t||this.$(this.criteriaValueSelectors.writeValue+'[data-category-path^="'+e+'_"]:checked').prop("checked",t)},_processCollapsed:function(){const e=this;this.$(this.collapsibleSelector+".open ").each((function(){r(this).find(e.collapsibleContainer).toggle(1),r(this).toggleClass("open")})),this.$(this.criteriaValueSelectors.readValue).parents(e.collapsibleSelector).each((function(){r(this).find(e.collapsibleContainer).toggle(1),r(this).toggleClass("open")}))},_initializeCollapsibleWidget:function(){const e=this;this.$(this.collapsibleTrigger).click((function(){r(this).parent().find(e.collapsibleContainer).slideToggle(),r(this).parent().toggleClass("open")}))},_isDOMValueChanged:function(){const e=this._readDOMValue();return!(a.isEmpty(e.value)||a.isUndefined(e.value)||a.isNull(e.value)||a.isEqual(this.value,e))},_onClickCloseCriteria:function(){this._hideCriteria()},_onClickDisableFilter:function(e){e.preventDefault(),this.disable()},_onClickOutsideCriteria:function(e){const t=this.$(this.criteriaSelector);t.get(0)===e.target||t.has(e.target).length||this._applyValueAndHideCriteria()},_onLayoutReposition:function(){this.popupCriteriaShowed&&this._alignCriteria()},_applyValueAndHideCriteria:function(){this._hideCriteria(),this.applyValue()},render:function(){const e=r(this.template({renderMode:this.renderMode,categories:this.categories,counts:this.counts}));return this._wrap(e),this._initializeCollapsibleWidget(),this},_wrap:function(e){this._appendFilter(e)},_appendFilter:function(e){this.$el.append(e)},_showCriteria:function(){r(document).trigger("clearMenus"),this.trigger("showCriteria",this),this.$(this.criteriaSelector).css({marginLeft:"auto",visibility:"visible"}),this._alignCriteria(),this._setButtonPressed(this.$(this.criteriaSelector),!0),setTimeout(a.bind((function(){this.popupCriteriaShowed=!0}),this),100)},_alignCriteria:function(){if(this.notAlignCriteria)return;const e=this.$el.closest(".filter-box");if(!e.length)return;const t=this.$(this.criteriaSelector);t.css("margin-left","auto");const i=t.get(0).getBoundingClientRect(),s=e.get(0).getBoundingClientRect();let n=i.right-s.right;n>0&&(n-=Math.max(0,s.left-(i.left-n)),t.css("margin-left",-n))},_hideCriteria:function(){this.$(this.criteriaSelector).css({marginLeft:"-9999px",visibility:"hidden"}),this._setButtonPressed(this.$(this.criteriaSelector),!1),setTimeout(a.bind((function(){this.disposed||(this.popupCriteriaShowed=!1)}),this),100)},_writeDOMValue:function(e){return this._setInputValue(this.criteriaValueSelectors.writeValue,e.value),this._processCollapsed(),this},_readDOMValue:function(){return{value:this._getInputValue(this.criteriaValueSelectors.readValue)}},_getInputValue:function(e){const t=[this.rootCategory];return this.$(e).each((function(){t.push(r(this).val())})),t},_setInputValue:function(e,t){if(1===t.length&&t[0]===this.rootCategory)this.$(e).prop("checked",!1);else{const i=this;a.each(t,(function(t){i.$(e+'[value="'+t+'"]').prop("checked",!0)}))}return this},_getCriteriaHint:function(){const e=[],t=this.$(this.criteriaValueSelectors.readValue),i=this;return t.each((function(){const t=this.getAttribute("title"),s=this.getAttribute("data-category-path"),n=i.$(i.criteriaValueSelectors.writeValue+'[data-category-path^="'+s+'_"]:checked');t&&0===n.length&&e.push(t)})),a.isEmpty(e)?this.placeholder:e.join(", ")},onMetadataLoaded:function(e){this.counts=e.counts||null,this.$(".poducts-count").html("0");const t=this;a.each(this.counts,(function(e,i){t.$("#option-"+i).parent().find(".poducts-count").html(e)}))},getCriteriaSelector(){return this.$(".filter-criteria-selector")},dispose:function(){this.disposed||u.__super__.dispose.call(this)}});return u}.call(t,i,t,e),void 0===s||(e.exports=s)},"./bundles/pscatalog/js/filter/psshopby-filter.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/orofrontend/default/js/app/views/frontend-multiselect-filter.js").extend({emptyValue:{value:[]},populateDefault:!1,constructor:function e(){e.__super__.constructor.apply(this,arguments)}});return t}.call(t,i,t,e))||(e.exports=s)},"./bundles/psproduct/js/app/datagrid/datagrid-product-lazy-init-view.js":(e,t,i)=>{var s;void 0===(s=function(e){"use strict";const t=i("./bundles/oroproduct/js/app/datagrid/datagrid-product-lazy-init-view.js"),s=i("./bundles/pspricing/js/app/price-loader.js"),n=t.extend({constructor:function e(t){e.__super__.constructor.call(this,t)},initialize:function(e){n.__super__.initialize.call(this,e),s.loadPrices(e.collection.models)}});return n}.call(t,i,t,e))||(e.exports=s)}}]);