1"use strict";(self.webpackChunk_cmrad_cmrad=self.webpackChunk_cmrad_cmrad||[]).push([[7666,20345,73477],{76492:function(t,e,n){function o(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,o=setInterval((function(){var n=t();n&&(e(n),clearInterval(o))}),null!=n?n:100)}n.d(e,{Z:function(){return o}})},20345:function(t,e,n){function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function r(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==o(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!==o(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===o(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.r(e),n.d(e,{default:function(){return c}});var a=n(76492),s=n(76104),u={name:"SplitModal",props:{id:{type:String,default:n.n(s)()("split-modal-")},canCloseOnBackdrop:{type:Boolean,default:!0},canCloseOnEsc:{type:Boolean,default:!0},contentClass:{type:String,default:"pb-2"},size:{type:[String,null],default:"xl"},draggable:{type:Boolean,default:!0},easyClose:{type:Boolean,default:!0},closeable:{type:Boolean,default:!0},canClose:{type:Boolean,default:!0},centered:{type:Boolean,default:!0},footerClass:{type:String,default:""},titleIcon:{type:String,default:null},value:{type:Boolean,default:null},noDefaultFooterClass:Boolean,headerOnlyClose:Boolean,cancelDisabled:Boolean,scrollable:Boolean,screenSize:String,bodyClass:String,dataCy:String,title:String},data:function(){return{isGrabbed:!1,pos1:0,pos2:0,pos3:0,pos4:0}},methods:{onHide:function(t){this.$emit("hidden",t),this.$emit("input",!1)},onOpen:function(t){this.$emit("open",t),this.$emit("input",!0)},onClose:function(){this.$emit("close")},onOk:function(t){this.$emit("ok",t)},hide:function(){this.$refs.modal.hide()},mousedown:function(t){var e=document.querySelector("#".concat(this.id,"___BV_modal_header_"));this.draggable&&(e.contains(t.target)||t.target===e)&&(this.isGrabbed=!0,this.pos3=t.clientX,this.pos4=t.clientY)},mouseup:function(){this.isGrabbed=!1},mousemove:function(t){var e,n,o=null===(e=this.$refs.modal)||void 0===e||null===(n=e.$refs)||void 0===n?void 0:n.modal;this.isGrabbed&&o&&(this.pos1=this.pos3-t.clientX,this.pos2=this.pos4-t.clientY,this.pos3=t.clientX,this.pos4=t.clientY,o.style.top=o.offsetTop-this.pos2+"px",o.style.left=o.offsetLeft-this.pos1+"px")}},computed:{isMobile:function(){return"xs"===this.$store.state.breakpoint},computedFooterClass:function(){return"".concat(this.noDefaultFooterClass?"":"py-0 px-3 pt-3 my-3"," ").concat(this.footerClass)},isResearch:function(){return this.$route().current().startsWith("research-")}},watch:{value:{immediate:!0,handler:function(t){var e=this;t&&(0,a.Z)((function(){return document.querySelector("#".concat(e.id))}),(function(t){t.addEventListener("mousedown",e.mousedown),t.addEventListener("mouseup",e.mouseup),t.addEventListener("mousemove",e.mousemove)}))}}}},c=(0,n(51900).Z)(u,(function(){var t=this,e=t._self._c;return e("b-modal",t._b({ref:"modal",attrs:{"content-class":t.contentClass||(t.isMobile?"pt-3 pb-2":"pt-3"),"no-close-on-backdrop":!t.easyClose||!t.canCloseOnBackdrop||!t.closeable,"body-class":t.bodyClass||"pt-2 pb-3 ".concat(t.isMobile?"px-3":"px-5"),"no-close-on-esc":!t.easyClose||!t.canCloseOnEsc||!t.closeable,"footer-class":t.computedFooterClass,"dialog-class":{draggable:t.draggable,"research-split-modal-dialog":t.isResearch},"data-cy":t.dataCy,visible:t.value},on:{show:function(e){return t.$emit("show",e)},hidden:function(e){return t.onHide(e)},open:function(e){return t.onOpen(e)},close:t.onClose,ok:t.onOk},scopedSlots:t._u([{key:"modal-header",fn:function(n){var o=n.close;return[e("section",{class:["title-section space-x-2 mb-2 mx-3 border-0",{"header-only-close":t.headerOnlyClose}]},[t.titleIcon?e("i",{staticClass:"fa fa-2x big-icon black",class:t.titleIcon}):t._e(),t._v(" "),e("h1",{class:["d-inline-block mb-0 unselectable",{"ml-3":!!t.titleIcon}]},[t._t("title",(function(){return[t._v(t._s(t.title))]}))],2),t._v(" "),t._t("prepend-close"),t._v(" "),e("b-button-close",{directives:[{name:"show",rawName:"v-show",value:t.closeable,expression:"closeable"}],on:{click:function(t){return o()}}},[e("i",{staticClass:"fa fa-square-xmark fa-swap-opacity"})])],2),t._v(" "),t._t("subtitle")]}},{key:"default",fn:function(){return[t._t("default")]},proxy:!0},{key:"modal-footer",fn:function(){return[t._t("modal-footer")]},proxy:!0},{key:"modal-cancel",fn:function(){return[t._t("modal-cancel")]},proxy:!0},{key:"modal-ok",fn:function(){return[t._t("modal-ok")]},proxy:!0}],null,!0)},"b-modal",l(l({},t.$attrs),{},{cancelDisabled:t.cancelDisabled,scrollable:t.scrollable,centered:t.centered,size:t.size,id:t.id}),!1))}),[],!1,null,null,null).exports},7666:function(t,e,n){n.r(e),n.d(e,{default:function(){return b}});var o=n(20345),i=n(20629);function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function a(t,e,n){return(e=function(t){var e=function(t,e){if("object"!==l(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,e||"default");if("object"!==l(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}
1(t,"string");return"symbol"===l(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return u(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return u(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,o=new Array(e);n<e;n++)o[n]=t[n];return o}var c={name:"MultiselectFieldModal",components:{SplitModal:o.default},props:{open:{type:Boolean,default:!0},state:{type:Array,default:function(){return[]}},title:String,body:String,options:{type:Array,required:!0}},data:function(){return{show:this.open,checked:!1,value:this.state&&s(this.state)}},computed:function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){a(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},(0,i.rn)({currentUser:function(t){return t.currentUser}})),methods:{toggleValue:function(t){this.value?this.value.includes(t)?this.value.splice(this.value.indexOf(t),1):this.value=[].concat(s(this.value),[t]):this.value=[t]},onClose:function(){this.show=!1},onCancel:function(){this.show=!1},onSubmit:function(){this.$emit("change",this.value),this.show=!1}},watch:{show:function(t){t||this.$emit("close")},open:function(t){this.show=t},state:function(t){this.value=t&&s(t)}}},d=c,f=n(51900),p={name:"MultiselectField",components:{SelectInput:function(){return Promise.all([n.e(8898),n.e(93628)]).then(n.bind(n,28150))},MultiselectFieldModal:(0,f.Z)(d,(function(){var t=this,e=t._self._c;return e("split-modal",{ref:"vueModal",attrs:{id:"multiselect-modal",centered:"",size:"xl",title:t.$t(t.title)},on:{close:t.onClose},scopedSlots:t._u([{key:"prepend-close",fn:function(){return[e("div",{staticClass:"d-flex flex-column text-uppercase text-right"},[e("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.$t("cmrad.currently_logged_in_as")))]),t._v(" "),e("span",[t._v(t._s(t.currentUser.name)+" "+t._s(t.currentUser.surname))])])]},proxy:!0},{key:"default",fn:function(){return[t.body?e("p",{staticClass:"text-muted"},[t._v("\n "+t._s(t.$t(t.body))+"\n ")]):t._e(),t._v(" "),e("b-row",t._l(t.options,(function(n){return e("b-col",{key:n.value,attrs:{md:"6",lg:"3"}},[e("b-form-checkbox",{staticClass:"w-100",attrs:{"button-variant":"gray-200 rounded position-relative mx-auto mb-3 p-4 w-100",button:"",size:"lg"},on:{change:function(e){return t.toggleValue(n.value)}}},[t.value&&t.value.includes(n.value)?e("span",{staticClass:"d-block position-absolute top-0 right-0"},[e("i",{staticClass:"fa fa-check-square"})]):t._e(),t._v(" "),e("h5",{staticClass:"inline-block text-center mb-0"},[t._v(t._s(n.label))])])],1)})),1)]},proxy:!0},{key:"modal-footer",fn:function(){return[e("div",{staticClass:"d-flex align-items-end justify-content-end"},[e("cancel-btn",{staticClass:"mr-2",on:{click:t.onCancel}}),t._v(" "),e("submit-btn",{on:{click:t.onSubmit}})],1)]},proxy:!0}]),model:{value:t.show,callback:function(e){t.show=e},expression:"show"}})}),[],!1,null,null,null).exports},props:{label:String,value:Array,options:{type:Array,required:!0},defaultValue:null,displayMode:null,readonly:Boolean,dataCy:String,inputAttributes:Object},data:function(){return{selectedOptionData:{title:null,body:null,options:[],label:null,value:null},isModalOpen:!1}},mounted:function(){this.selectStateOption()},watch:{value:function(){this.selectStateOption()}},computed:{parsedOptions:function(){var t=this;return this.options.map((function(e){var n=e.label,o=e.id;return{label:t.$t(n),value:o}}))},isModal:function(){return"modal"===this.displayMode},defaultSelectOption:function(){return this.options.find((function(t){return null===t.value}))}},methods:{onSelect:function(t){this.selectedOptionData=this.options.find((function(e){return e.id===t})),this.isModalOpen=this.isModal&&!!this.selectedOptionData.options.length,this.$emit("input",this.selectedOptionData.value)},onCloseModal:function(){this.isModalOpen=!1},findSelectStateOption:function(t){return this.options.find((function(e){var n;return e.value===t||e.options.some((function(e){return null==t?void 0:t.includes(e.value)}))||0===(null==t?void 0:t.length)&&0===(null===(n=e.value)||void 0===n?void 0:n.length)}))},modifyBtnClick:function(){this.isModal&&(this.isModalOpen=!0)},selectStateOption:function(){void 0===this.value?(this.$emit("input",this.defaultValue),this.selectedOptionData=this.findSelectStateOption(this.defaultValue)):this.selectedOptionData=this.findSelectStateOption(this.value)}}},b=(0,f.Z)(p,(function(){var t=this,e=t._self._c;return e("fragment",[e("select-input",t._b({attrs:{options:t.parsedOptions,label:t.$t(t.label),"input-attributes":t.inputAttributes,value:t.selectedOptionData.id,disabled:t.readonly,clearable:!1},on:{input:t.onSelect},scopedSlots:t._u([t.value?{key:"append",fn:function(){return[e("btn",{staticClass:"px-2",attrs:{variant:"gray-300 mt-2"},on:{click:t.modifyBtnClick}},[e("i",{staticClass:"fa fa-edit"}),t._v(" "+t._s(t.$t("cmrad.modify_selection"))+"\n ")])]},proxy:!0}:null],null,!0)},"select-input",{dataCy:t.dataCy},!1)),t._v(" "),e("multiselect-field-modal",t._b({attrs:{open:t.isModalOpen,state:t.value},on:{change:function(e){return t.$emit("input",e)},close:t.onCloseModal}},"multiselect-field-modal",t.selectedOptionData,!1))],1)}),[],!1,null,null,null).exports}}]); 2//# sourceMappingURL=7666.b7edc34693f5c1df.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.