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B,KAAA,EAED,SAAAuE,qBAAA,EAAsB;MAClB,OAAO,IAAI,CAAC2L,GAAG,CAACK,IAAI,CAAC,uBAAuB,CAAC;IACjD;EAAC;IAAA/O,GAAA;IAAAxB,KAAA,EAED,SAAAwQ,qBAAqBhN,IAAI,EAAE;MACvB,OAAO,IAAI,CAAC0M,GAAG,CAACO,GAAG,CAAC,0CAA0C,EAAE;QAAEC,MAAM,EAAE;UAAElN,IAAI,EAAEA;QAAK;MAAE,CAAC,CAAC;IAC/F;EAAC;IAAAhC,GAAA;IAAAxB,KAAA,EAED,SAAAmL,gBAAgBwF,MAAM,EAAEC,MAAM,EAAEC,MAAM,EAAE;MACpC,OAAO,IAAI,CAACX,GAAG,CAACK,IAAI,CAAC,kBAAkB,EAAE;QAAEO,MAAM,EAAEH,MAAM;QAAEI,MAAM,EAAEH,MAAM;QAAEI,MAAM,EAAEH;MAAO,CAAC,CAAC;IAChG;EAAC;EAAA,OAAAtO,SAAA;AAAA;AAGL,sDAAe,IAAIA,SAAS,CAAC,CAAC;;;;;;;;;AC1CQ;AACZ;;AAE1B;AACA,IAAMmM,IAAI,GAAGuC,6DAAU,CAAC;EACpBC,MAAM,EAAE,IAAI;EAAE;EACdC,qBAAqB,EAAE,IAAI,CAAC;AAChC,CAAC,CAAC;;AAEF,IAAMC,eAAe,GAAG,CACpB,gBAAgB,CACnB;AAEDpB,sDAAK,CAACO,IAAI,CAAC,sCAAsC,EAAEa,eAAe,CAAC,CAC9D5M,IAAI,CAAC,UAACW,QAAQ,EAAK;EAChBuJ,IAAI,CAAC2C,MAAM,CAACC,gBAAgB,CAAC,IAAI,EAAEnM,QAAQ,CAACzC,IAAI,CAAC;AACrD,CAAC,CAAC;AAEN,sDAAegM,IAAI","sources":["webpack://mcweb3/./Scripts4.0/model-register/components/modell-selector.vue","webpack://mcweb3/./Scripts4.0/model-register/components/modell-selector.vue?6738","webpack://mcweb3/./Scripts4.0/model-register/components/model-selector-events.js","webpack://mcweb3/./Scripts4.0/model-register/components/modell-selector.vue?ec46","webpack://mcweb3/./Scripts4.0/model-register/components/modell-selector.vue?b83e","webpack://mcweb3/./Scripts4.0/model-register/components/model-selector-app.vue","webpack://mcweb3/./Scripts4.0/model-register/components/model-selector-app.vue?28c0","webpack://mcweb3/./Scripts4.0/model-register/components/model-selector-app.vue?fe9f","webpack://mcweb3/./Scripts4.0/model-register/components/model-selector-app.vue?08fb","webpack://mcweb3/./Scripts4.0/model-register/model-register.js","webpack://mcweb3/./Scripts4.0/model-register/modell-api.js","webpack://mcweb3/./Scripts4.0/model-register/modellregister-i18n.js"],"sourcesContent":["<script>\r\n    import ModellApi from '../modell-api'\r\n    import { AjaxRenderingEngine } from '@scripts/ajax-render-engine';\r\n    import {EventTypes} from './model-selector-events.js';\r\n\r\n    export default {\r\n        setup(){\r\n            return {}\r\n        },\r\n        data: function () {\r\n            return {\r\n                selectors: [],\r\n                productPids: [],\r\n                selectedSelectorIds: [],\r\n                selectedPid: -1,\r\n                loading: true,\r\n                myModels:  [],\r\n                modelType: '',\r\n                redirectToMenuIfFound: false,\r\n                levels: 0,\r\n                isAjaxEngineReady: false\r\n            };\r\n        },\r\n\r\n        computed: {\r\n            isVisible: function () {\r\n                return true;\r\n            }\r\n        },\r\n\r\n        created: function () {\r\n\r\n        },\r\n        \r\n        mounted: function () {\r\n            PubSub.subscribe(EventTypes.ADD_MODEL, (eventName, plid) => {\r\n                this.addModel(plid);\r\n            });\r\n            PubSub.subscribe(EventTypes.REMOVE_MODEL, (eventName, plid) => {\r\n                this.removeModel(plid);\r\n            });\r\n            PubSub.subscribe(EventTypes.SELECT_MODEL, (eventName, plid) => {\r\n                this.selectModel(plid);\r\n            });\r\n            PubSub.subscribe(mcWeb.ajaxRenderEngine.events.onFieldContentChanged,\r\n                this.onAccessoriesPopulated);\r\n\r\n            if (!this.isAjaxEngineReady) {\r\n                const formHead = document.querySelector('head');\r\n                formHead.addEventListener('readyForGtm', this.onAjaxRenderEngineReady.bind(this), false);\r\n            }\r\n\r\n            \r\n\r\n            ModellApi.GetModelSelectorData().then((responseSetup) => {\r\n                if (responseSetup.data != null && responseSetup.data.Levels > 0) {\r\n                    this.modelType = responseSetup.data.ModelType;\r\n                    this.levels = responseSetup.data.Levels;\r\n                    this.redirectToMenuIfFound = responseSetup.data.RedirectToMenuIfFound;\r\n                    \r\n                }\r\n            })\r\n            .finally(() => {\r\n                if (!this.$parent.isPublishMode) {\r\n\r\n                    this.initialize();\r\n\r\n                    if(this.isAccessoriesPage())\r\n                        ModellApi.getMyModels(this.modelType)\r\n                            .then((response) => {\r\n                                if (response.data !== null && response.data.Success && response.data.Models !== null && response.data.Models != \"\") {\r\n                                    this.myModels = JSON.parse(response.data.Models);\r\n                                    this.refreshMyModelsContent(this.myModels);\r\n\r\n                                    var myModelString = JSON.stringify(this.myModels);\r\n                                    this.saveModelsToLocalStorage(myModelString);\r\n                                }\r\n                                else {\r\n                                    var storedModels = this.getModelsFromLocalStorage();\r\n                                    \r\n                                    if (storedModels !== undefined && storedModels !== null) {\r\n                                        this.refreshMyModelsContent(storedModels);\r\n                                    }\r\n                                }\r\n                            })\r\n                            .finally(() => {\r\n                                this.loading = false;\r\n                            });\r\n                }\r\n            });\r\n\r\n        },\r\n        methods: {\r\n            onAjaxRenderEngineReady: function () {\r\n                this.isAjaxEngineReady = true;\r\n            },\r\n            initialize: function () {\r\n                for (var index = 0; index < this.levels; index++) {\r\n                    this.selectors.push(new Array());\r\n                    this.selectedSelectorIds.push(-1);\r\n                }               \r\n\r\n                this.updateSelectedGroupsFromPage();\r\n\r\n                var alreadySelected = this.getSelectedFromLocalStorage();\r\n\r\n                if ((alreadySelected.length > 0) && (alreadySelected.length == this.levels)) {\r\n                    this.setSelectedSelectors(alreadySelected);\r\n                } else {\r\n                    this.getLevel(1, true);\r\n                }\r\n            },\r\n\r\n            updateSelectedGroupsFromPage: function () {\r\n                if (this.$parent.activeGroups === undefined || this.$parent.activeGroups === null)\r\n                    return;\r\n                var activeGroups = this.$parent.activeGroups;\r\n                this.loading = true;\r\n                \r\n                for (var index = 0; index < activeGroups.length; index++) {\r\n                    this.selectedSelectorIds[index] = activeGroups[index].Id;\r\n                }\r\n                this.saveSelectedToLocalStorage();\r\n                \r\n                this.loading = false;\r\n            },\r\n            setSelectedSelectors: function (selector) {\r\n                this.loading = true;\r\n                for (var index = 0; index < this.levels; index++) {\r\n                    this.selectedSelectorIds[index] = selector[index];                    \r\n                }\r\n                this.getLevel(1, false);\r\n                this.loading = false;\r\n            },\r\n            isAccessoriesPage: function () {                \r\n                return (window.location.pathname === this.$parent.accessoriesPageUrl) || (this.$parent.accessoriesPageUrl == undefined);\r\n            },\r\n\r\n            getMyModelListFieldId: function () {\r\n                var fieldElement = document.querySelector(\".model-register-page div[id*='ModelRegisterStoredProductsArea'] + div[id^='A'] .web-pub-field\");\r\n                if (fieldElement == null)\r\n                    return null;\r\n                else\r\n                    return fieldElement.getAttribute(\"data-field-id\");\r\n            },\r\n            getMySelectedModelFieldId: function () {\r\n                var fieldElement = document.querySelector(\".model-register-page div[id*='ModelRegisterSelectedProductArea'] + div[id^='A'] .web-pub-field\");\r\n                if (fieldElement == null)\r\n                    return null;\r\n                else\r\n                    return fieldElement.getAttribute(\"data-field-id\");\r\n            },\r\n            getAccessoriesFieldId: function () {\r\n                //ModelRegisterAccessoriesArea, first field with ListingType.DynamicProductListSetClientSide : 58\r\n                var fieldElement = document.querySelector(\".model-register-page div[id*='ModelRegisterAccessoriesArea'] + div[id^='A'] .web-pub-field[data-lt='58']\");\r\n                if (fieldElement == null)\r\n                    return null;\r\n                else\r\n                    return fieldElement.getAttribute(\"data-field-id\");\r\n            },\r\n\r\n            getLevel: function (levelToGet, thisLevelOnly) {\r\n                this.loading = true;\r\n                ModellApi.getProductSelector(this.modelType, levelToGet, this.selectedSelectorIds)\r\n                    .then((response) => {\r\n                        if (response.data !== null) {\r\n                            this.emptyAndFillSelector(levelToGet, response.data.List);\r\n                        }\r\n                    })\r\n                    .finally(() => {\r\n                        this.loading = false;\r\n\r\n\r\n                        //Check wether selectedSelector-value can be selected\r\n                        if (!this.selectors[levelToGet - 1].some(item => item.Id == this.selectedSelectorIds[levelToGet - 1])) {\r\n                            //If no:\r\n                            //Reset remaining selectedSelectors, erase any storage and exit.\r\n                            console.log(\"Cannot select selectedSelector for lvl\" + levelToGet + \", selectedSelector on this level:\" + this.selectedSelectorIds[levelToGet - 1]);\r\n\r\n                            this.resetSelectedIds(levelToGet - 1, null);\r\n                            this.clearAccessories();\r\n                            return;\r\n                        }\r\n\r\n                        if (!thisLevelOnly) {\r\n                            //If selector was preselected during emtpyAndFill                            \r\n                            if (this.selectedSelectorIds[levelToGet - 1] > 0) {\r\n                                if ((levelToGet + 1) <= this.levels) {\r\n                                    this.getLevel(levelToGet + 1, false);\r\n                                }\r\n                                else {\r\n                                    this.showAccessories(null, null, null, true);\r\n                                }\r\n                            }\r\n                        }\r\n                    });\r\n            },\r\n            emptyAndFillSelector: function (level, values) {\r\n                if (Array.isArray(values)) {\r\n                    //Empty\r\n                    while (this.selectors[level - 1].length > 0) {\r\n                        this.selectors[level - 1].pop();\r\n                    }\r\n                    if (values.length == 0) {\r\n                        this.selectors[level - 1].push({\r\n                            Id: 0,\r\n                            Name: '-'\r\n                        });\r\n                        this.selectedSelectorIds[level - 1] = 0;\r\n                    } else {\r\n                        values.forEach(function (selector, index) {\r\n                            this.push(selector);\r\n                        }, this.selectors[level - 1]);\r\n                        //If not preselected AND only one item in populated dropdown, select it.\r\n                        if ((this.selectedSelectorIds[level - 1] == -1) && values.length === 1) {\r\n                            this.selectedSelectorIds[level - 1] = values[0].Id;\r\n                        }\r\n                    }\r\n                }\r\n            },\r\n            selectionMade: function (levelSelectionWasMade, evt) {\r\n                const selectedValue = parseInt(evt.target.value, 10);\r\n                if (isNaN(selectedValue))\r\n                    return;\r\n                if (selectedValue<=0) {\r\n                    this.resetSelectedIds(levelSelectionWasMade, null);\r\n                    return;\r\n                }\r\n\r\n                if (levelSelectionWasMade == this.levels) {\r\n                    this.showAccessories(null, null, null, true);\r\n                } else {\r\n                    this.resetSelectedIds(levelSelectionWasMade, null);\r\n                    this.getLevel(levelSelectionWasMade + 1, false);\r\n                }\r\n            },\r\n            resetSelectedIds: function (fromLevel, toLevel) {\r\n                var fromIndexLevel = (fromLevel) ? fromLevel : 0;\r\n                var toIndexLevel = (toLevel) ? toLevel : this.levels;\r\n                toIndexLevel = (toIndexLevel > this.levels) ? this.levels : toIndexLevel;\r\n                if (fromIndexLevel >= toIndexLevel)\r\n                    return;\r\n\r\n                for (var index = fromIndexLevel; index < toIndexLevel; index++) {\r\n                    this.selectedSelectorIds[index] = -1;\r\n                }\r\n            },\r\n            addSelectedToMyModels : function(plid){\r\n                this.loading = true;\r\n                //get currently stored models\r\n                var myStoredModels = this.getModelsFromLocalStorage();\r\n                //add new model\r\n                if (myStoredModels == undefined || myStoredModels == null){\r\n                    myStoredModels = [];\r\n                }\r\n                var currentModel = this.selectedSelectorIds;\r\n\r\n                if (this.containsModel(myStoredModels, currentModel)) {\r\n                    this.loading = false;\r\n                    return;\r\n                }\r\n\r\n                myStoredModels.push(currentModel);\r\n\r\n                //convert to string we will save in preferences\r\n                var myModelString = JSON.stringify(myStoredModels);\r\n                this.saveModelsToLocalStorage(myModelString);\r\n                ModellApi.saveMyModels(this.modelType, myModelString)\r\n                    .then((response) => {\r\n                    })\r\n                    .finally(() => {\r\n                        this.refreshMyModelsContent(myStoredModels);\r\n                        this.loading = false;\r\n                    });\r\n            },\r\n\r\n            containsModel : function(array, model){\r\n                for(var i = 0; i < array.length; i++){\r\n                    if(this.modelsMatch(array[i], model))\r\n                        return true;\r\n                }\r\n                return false;\r\n            },\r\n\r\n            modelsMatch: function (model1, model2) {\r\n                return model1.join() == model2.join();\r\n            },\r\n\r\n            getModelsFromLocalStorage : function(){\r\n                var myStoredModels = window.StorageService.localStorage.getItem(\"ModelRegister.\" + this.modelType);\r\n                if (myStoredModels !== undefined && myStoredModels !== null && myStoredModels !== \"\")\r\n                    return JSON.parse(myStoredModels.replace(/\"/g, ''));\r\n                else return null;\r\n            },\r\n            saveModelsToLocalStorage :  function(models){\r\n                window.StorageService.localStorage.setItem(\"ModelRegister.\" + this.modelType, models.replace(/\"/g, ''));\r\n            },\r\n\r\n            saveSelectedToLocalStorage: function () {\r\n                this.saveToLocalStorage(this.selectedSelectorIds);\r\n            },\r\n\r\n            saveToLocalStorage: function (selector) {\r\n                window.StorageService.localStorage.setItem(\"ModelRegister.Selected\" + this.modelType, selector);\r\n            },\r\n            getSelectedFromLocalStorage: function () {\r\n                var localStoredSelector = window.StorageService.localStorage.getItem(\"ModelRegister.Selected\" + this.modelType);\r\n                if (localStoredSelector !== undefined && localStoredSelector !== null)\r\n                    return localStoredSelector.split(',');\r\n                else\r\n                    return [-1]; \r\n            },\r\n            addModel: function (plid) {\r\n                this.addSelectedToMyModels();\r\n            },\r\n            removeModel: function (plid) {\r\n                var storedModels = this.getModelsFromLocalStorage();\r\n\r\n                var plidPosition = -1;\r\n                for (var index = 0; index < storedModels.length; index++) {\r\n                    if (storedModels[index][this.levels - 1] == plid)\r\n                        plidPosition = index;\r\n                }\r\n                if (plidPosition != -1)\r\n                    storedModels.splice(plidPosition, 1);\r\n                \r\n                var modelsString = JSON.stringify(storedModels);\r\n                this.saveModelsToLocalStorage(modelsString);\r\n                ModellApi.saveMyModels(this.modelType, modelsString)\r\n                    .then((response) => {\r\n                    })\r\n                    .finally(() => {\r\n                        this.refreshMyModelsContent(storedModels);\r\n                        this.loading = false;\r\n                    });\r\n                \r\n            },\r\n            selectModel: function (plid) {\r\n                var storedModels = this.getModelsFromLocalStorage();\r\n\r\n                var plidPosition = -1;\r\n                for (var index = 0; index < storedModels.length; index++) {\r\n                    if (storedModels[index][this.levels - 1] == plid)\r\n                        plidPosition = index;\r\n                }\r\n                if (plidPosition != -1) {\r\n                    this.saveToLocalStorage(storedModels[plidPosition]);\r\n                    this.setSelectedSelectors(storedModels[plidPosition]);\r\n                }\r\n            },\r\n            clearAccessories: function () {\r\n                var accessoriesFieldId = this.getAccessoriesFieldId();\r\n                this.updateFieldWithPlids(accessoriesFieldId, null, null);\r\n            },\r\n            showAccessories: function (sender, args, plid, doNotRedirect) {\r\n                this.loading = true;\r\n                this.clearAndSetFieldSpinner(this.getAccessoriesFieldId());\r\n                this.saveSelectedToLocalStorage();\r\n\r\n                if (this.redirectToMenuIfFound) {\r\n                    // Menu-node-based accessories-listing\r\n                    var selectedIds = this.getSelectedIds(plid);\r\n\r\n                    if (!!doNotRedirect || this.productGroupMatch(selectedIds, this.$parent.activeGroups)) {\r\n                        this.loading = false;\r\n                        return;\r\n                    } else {\r\n                        ModellApi.getRedirectData(selectedIds[0], selectedIds[1], selectedIds[2])\r\n                            .then((response) => {\r\n                                if (response.data.DoRedirect) //Redirect to correct page\r\n                                    window.location.href = response.data.RedirectUrl;\r\n                                else //Fallback = Classic\r\n                                    this.showAccessoriesStandard(plid, !!doNotRedirect);\r\n                            });\r\n                    }\r\n                } else {\r\n                    // Classic \r\n                    this.showAccessoriesStandard(plid, !!doNotRedirect);\r\n                }\r\n            },\r\n\r\n            showAccessoriesStandard: function (plid, doNotRedirect) {\r\n                if (this.isAccessoriesPage()) {\r\n                    this.updateFieldWithPlids(this.getMySelectedModelFieldId(), this.getSelectedPlid(plid));\r\n                    ModellApi.getPlid(this.modelType, this.getSelectedIds())\r\n                        .then((response) => {\r\n                            if (response.data !== null) {\r\n                                var accessoriesPlids = new Array();\r\n                                for (var index = 0; index < response.data.length; index++) {\r\n                                    accessoriesPlids.push(response.data[index].Plid);\r\n                                }\r\n                                var accessoriesFieldId = this.getAccessoriesFieldId();\r\n                                this.updateFieldWithPlids(accessoriesFieldId, accessoriesPlids.join(), response.data);                                                                \r\n                            }\r\n\r\n                        })\r\n                        .finally(() => {\r\n                            this.loading = false;\r\n                        });\r\n                }\r\n                else {\r\n                    if (doNotRedirect) {\r\n                        console.log(\"Cannot use page to display accessories.\");\r\n                        this.loading = false;\r\n                    }\r\n                    else {\r\n                        window.location.href = this.$parent.accessoriesPageUrl;\r\n                    }\r\n                }\r\n\r\n            },\r\n            onAccessoriesPopulated: function (evt, data) {\r\n                if (data.FieldId != this.getAccessoriesFieldId())\r\n                    return;\r\n                var accesoriesContainerBoundingRect = document.querySelector(\"#accesoriesContainer\").getBoundingClientRect();\r\n                if (accesoriesContainerBoundingRect.top > window.innerHeight) {\r\n                    window.scrollTo({\r\n                        top: accesoriesContainerBoundingRect.top,\r\n                        behavior: 'smooth'\r\n                    });\r\n                }\r\n            },\r\n            getSelectedIds: function (plid) {\r\n                var selectedIds = [];\r\n                if (plid === undefined || plid === null)\r\n                    selectedIds = JSON.parse(JSON.stringify(this.selectedSelectorIds));\r\n                else {\r\n                    for (var index = 0; index < this.levels; index++) {\r\n                        selectedIds.push(0);\r\n                    }\r\n                    selectedIds[this.levels - 1] = plid;\r\n                }\r\n                return selectedIds;\r\n            },\r\n\r\n            getSelectedPlid: function (plid) {\r\n                var selectedPlid = new Array();\r\n                if (plid === undefined || plid === null)\r\n                    selectedPlid.push(this.selectedSelectorIds[this.levels - 1]);\r\n                else\r\n                    selectedPlid.push(plid);\r\n                return selectedPlid;                \r\n            },\r\n\r\n            productGroupMatch: function (groupA, groupB) {\r\n                if (groupA === undefined || groupA === null)\r\n                    return false;\r\n                if (groupB === undefined || groupB === null)\r\n                    return false;\r\n\r\n                if (groupA.length < 3 || groupB.length < 3)\r\n                    return false;\r\n                if (groupA[0] != groupB[0].Id ||\r\n                    groupA[1] != groupB[1].Id ||\r\n                     groupA[2] != groupB[2].Id)\r\n                    return false;\r\n\r\n                return true;\r\n\r\n            },\r\n\r\n            refreshMyModelsContent: function (models) {\r\n                var plids = [];\r\n                for (var i = 0; i < models.length; i++){\r\n                    if(models[i].length==this.levels)\r\n                        plids.push(models[i][this.levels-1]);\r\n                }\r\n                if (plids.length > 0)\r\n                    this.clearAndSetFieldSpinner(this.getMyModelListFieldId());\r\n                jQuery(\"#myModels\").collapse('show');\r\n                this.updateFieldWithPlids(this.getMyModelListFieldId(),plids.join());\r\n\r\n            },\r\n\r\n            clearAndSetFieldSpinner: function (fieldId) {\r\n                if (fieldId == null || !this.isAccessoriesPage())\r\n                    return;\r\n                // IE11 no support\r\n                if (!document.replaceChildren) \r\n                    return;\r\n                    \r\n                var spinnerNode = document.createElement(\"span\");\r\n                spinnerNode.setAttribute('class', 'icon-spinner animate-spin');\r\n                var field = document.querySelector(\".model-register-page .field-container-\" + fieldId + \" .ajax-field\");\r\n                if (field !== null)\r\n                    field.replaceChildren(spinnerNode);\r\n            },\r\n            updateFieldWithPlids: function (fieldId, plids, extraData) {\r\n                var data = null;\r\n                if (extraData !== undefined)\r\n                    data = extraData;\r\n\r\n                if (this.isAjaxEngineReady) {\r\n                    PubSub.publish(\"AjaxRenderingEngine.onPushProductsIntoField\",\r\n                        {\r\n                            FieldId: fieldId,\r\n                            Plids: plids,\r\n                            ExtraData: data\r\n                        });\r\n                } else {\r\n\r\n                    var ajaxRenderCheckCounter = 0;\r\n                    var that = this;\r\n                    var ajaxRenderCheck = setInterval(function () {\r\n                        ajaxRenderCheckCounter++;\r\n                        if (ajaxRenderCheckCounter > 100) {\r\n                            clearInterval(ajaxRenderCheck);\r\n                            console.log(\"100 attempts without ready. Stopping.\");\r\n                        }\r\n\r\n                        if (that.isAjaxEngineReady || (\r\n                            AjaxRenderingEngine !== undefined\r\n                            && AjaxRenderingEngine.InitialLoadDone !== undefined\r\n                            && AjaxRenderingEngine.InitialLoadDone)) {\r\n                            clearInterval(ajaxRenderCheck);\r\n                            that.isAjaxEngineReady = true;\r\n                            PubSub.publish(\"AjaxRenderingEngine.onPushProductsIntoField\",\r\n                                {\r\n                                    FieldId: fieldId,\r\n                                    Plids: plids,\r\n                                    ExtraData: data\r\n                                });\r\n                        }\r\n                    }, 200);\r\n                }\r\n            }\r\n\r\n        }\r\n    }\r\n</script>\r\n\r\n<template>\r\n    <div class=\"form-group modell-select\" v-bind:class=\"'selector-count-'+ levels\" v-if=\"isVisible\">\r\n        <template v-for=\"selectorNo in levels\">\r\n            <select class=\"form-control\" :disabled=\"(selectorNo==1) ? loading : (loading || (selectedSelectorIds[(selectorNo-2)] <= 0))\" v-model=\"selectedSelectorIds[selectorNo-1]\" @change=\"selectionMade(selectorNo, $event)\">\r\n                <option value=\"-1\">\r\n                    {{ (selectorNo==1) ? $t('Modellregister.ProdCat'+selectorNo) : (selectedSelectorIds[(selectorNo-2)] <= 0) ? $t('Modellregister.ChooseProdCat'+ (selectorNo-1) +'First') : $t('Modellregister.ProdCat'+selectorNo) }}\r\n                </option>\r\n                <option v-for=\"selector in selectors[selectorNo-1]\" v-bind:value=\"selector.Id\" v-bind:key=\"selector.Id\">{{ selector.Name }}</option>\r\n            </select>\r\n        </template>\r\n        <button type=\"button\" class=\"form-control\" v-on:click.stop=\"showAccessories\" :disabled=\"selectedSelectorIds[levels-1] == -1\">{{ $t('Modellregister.ShowAccessories') }}<i v-if=\"loading\" class=\"icon-spinner animate-spin\"></i></button>\r\n    </div>\r\n</template>","export * from \"-!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-1.use!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[1].rules[7].use[0]!./modell-selector.vue?vue&type=template&id=3db277d1\"","export const EventTypes ={\r\n    ADD_MODEL : \"ModelRegister.AddModel\",\r\n    REMOVE_MODEL : \"ModeRegister.RemoveModel\",\r\n    SELECT_MODEL : \"ModelRegister.SelectModel\"\r\n};","export { default } from \"-!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-1.use!../../../node_modules/vue-loader/dist/index.js??ruleSet[1].rules[7].use[0]!./modell-selector.vue?vue&type=script&lang=js\"; export * from \"-!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-1.use!../../../node_modules/vue-loader/dist/index.js??ruleSet[1].rules[7].use[0]!./modell-selector.vue?vue&type=script&lang=js\"","import { render } from \"./modell-selector.vue?vue&type=template&id=3db277d1\"\nimport script from \"./modell-selector.vue?vue&type=script&lang=js\"\nexport * from \"./modell-selector.vue?vue&type=script&lang=js\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","<script>\r\n    import SelectorForm from './modell-selector'\r\n    import ModellApi from '../modell-api'    \r\n    export default {\r\n        components: {\r\n            'modell-selector': SelectorForm\r\n        },        \r\n        data: function () {\r\n            return {\r\n                loading: true,\r\n                publishMode: true\r\n            };\r\n        },\r\n\r\n        computed: {\r\n            isVisible: function () {\r\n                return true;\r\n            }\r\n        },\r\n        mounted: function () {\r\n            console.log(\"Is App in publish mode?: \" + this.$parent.publishMode);\r\n            this.publishMode = this.$parent.publishMode;\r\n            \r\n        },\r\n        created: function () {\r\n\r\n        },\r\n        methods: {\r\n            addModel: function (plid) {\r\n                console.log(\"adding model : \" + plid);\r\n                this.$refs.selectorForm.addModel(plid);\r\n            },\r\n            removeModel: function (plid) {\r\n                console.log(\"remove model : \" + plid);\r\n                this.$refs.selectorForm.removeModel(plid);\r\n            },\r\n            selectModel: function (plid) {\r\n                console.log(\"select model : \" + plid);\r\n                this.$refs.selectorForm.selectModel(plid);\r\n            }\r\n        },  \r\n\r\n\r\n    }\r\n</script>\r\n\r\n<template>\r\n    <div id=\"model-register-app\">\r\n        <modell-selector v-if=\"!publishMode\" ref=\"selectorForm\"></modell-selector>\r\n    </div>\r\n</template>\r\n\r\n<style lang=\"scss\">\r\n    #model-register-app {\r\n        \r\n    }\r\n</style>","export * from \"-!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-1.use!../../../node_modules/vue-loader/dist/templateLoader.js??ruleSet[1].rules[2]!../../../node_modules/vue-loader/dist/index.js??ruleSet[1].rules[7].use[0]!./model-selector-app.vue?vue&type=template&id=2bb3e168\"","export { default } from \"-!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-1.use!../../../node_modules/vue-loader/dist/index.js??ruleSet[1].rules[7].use[0]!./model-selector-app.vue?vue&type=script&lang=js\"; export * from \"-!../../../node_modules/babel-loader/lib/index.js??clonedRuleSet-1.use!../../../node_modules/vue-loader/dist/index.js??ruleSet[1].rules[7].use[0]!./model-selector-app.vue?vue&type=script&lang=js\"","import { render } from \"./model-selector-app.vue?vue&type=template&id=2bb3e168\"\nimport script from \"./model-selector-app.vue?vue&type=script&lang=js\"\nexport * from \"./model-selector-app.vue?vue&type=script&lang=js\"\n\nimport \"./model-selector-app.vue?vue&type=style&index=0&id=2bb3e168&lang=scss\"\n\nimport exportComponent from \"../../../node_modules/vue-loader/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render]])\n\nexport default __exports__","import { createApp, h } from 'vue';\r\nimport { createI18nMessage, helpers } from '@vuelidate/validators';\r\nimport ModellSelector from './components/modell-selector';\r\nimport ModellSelectorApp from './components/model-selector-app';\r\nimport {EventTypes} from './components/model-selector-events.js';\r\n\r\nimport i18n from './modellregister-i18n';\r\n\r\n\r\nmcWeb.ModelRegister = new function () {\r\n    this.groups = null;\r\n    this.events = {\r\n        onModelRegisterScriptLoaded: \"onModelRegisterScriptLoaded\"\r\n    };\r\n    this.initializeProductGroups = function(groups){\r\n        this.groups = groups;\r\n        if (groups === undefined)\r\n            this.groups = null;\r\n    };\r\n    this.initializeModelRegisterInstance = function (webPubElmementId, isPublishMode ) {\r\n        var elm = document.querySelector('#model-selector-form-' + webPubElmementId);\r\n        if (!elm) {\r\n            console.log(\"Failed to init modelreg with elmid:\" + webPubElmementId);\r\n            return;\r\n        }\r\n\r\n        var accessoriesPageUrl = elm.getAttribute(\"data-accessories-pageurl\");\r\n        var modellRegister = createApp({\r\n            i18n,\r\n            components: {\r\n                'modell-selector': ModellSelector\r\n            },\r\n            data() {\r\n                return {\r\n                    accessoriesPageUrl: accessoriesPageUrl,\r\n                    postedData: null,\r\n                    isPublishMode: isPublishMode,\r\n                    activeGroups : this.groups\r\n                }\r\n            },\r\n            methods: {\r\n\r\n            },\r\n            created: function () {\r\n            },\r\n            beforeDestroy: function () {\r\n            }\r\n            , render: () => h(ModellSelector)\r\n        });\r\n        modellRegister.use(i18n);\r\n        modellRegister.mount(elm);\r\n        //return modelRegister;\r\n    };\r\n\r\n\r\n    this.setupModelregisterPage = function (elementId) {\r\n        \r\n        if (document.getElementById(elementId))\r\n            console.log(elementId + \" exist. App can be mounted.\");\r\n        else\r\n            console.log(elementId + \" doesn't exist. App cannot be mounted!\");\r\n        var modellRegisterApp = createApp({\r\n            i18n,\r\n            components: {\r\n                'modell-selector-app': ModellSelectorApp,\r\n                'modell-selector': ModellSelector\r\n            },\r\n            data() {\r\n                return  {publishMode: document.querySelectorAll('body.publish-mode').length > 0}\r\n            },\r\n            \r\n            props: {\r\n\r\n            },\r\n            methods: {\r\n                addModel: function (plid) {\r\n                    PubSub.publish(EventTypes.ADD_MODEL, plid);\r\n                },\r\n                removeModel: function (plid) {\r\n                    PubSub.publish(EventTypes.REMOVE_MODEL, plid);\r\n                },\r\n                selectModel: function (plid) {\r\n                    PubSub.publish(EventTypes.SELECT_MODEL, plid);\r\n                }\r\n            },\r\n            expose: ['addModel','removeModel','selectModel'],\r\n            created: function () {\r\n            },\r\n            beforeDestroy: function () {\r\n            }\r\n            ,render: () => h(ModellSelectorApp)\r\n        });\r\n        modellRegisterApp.use(i18n);\r\n        var mountedApp = modellRegisterApp.mount(document.getElementById(elementId));\r\n        return mountedApp;\r\n    };\r\n\r\n    PubSub.publish(this.events.onModelRegisterScriptLoaded);\r\n};\r\n\r\n\r\n\r\n\r\n\r\n\r\n","import Axios from 'axios';\r\n\r\nclass ModellApi {\r\n\r\n    constructor() {\r\n        this.api = Axios.create({\r\n            baseURL: '/api/ProductSelector'\r\n        });\r\n    }\r\n\r\n    getModelSelectorSetup() {\r\n        return this.api.post('/GetModelSelectorData');\r\n    }\r\n    getProductSelector(modelType, level, selectors) {\r\n        return this.api.post('/GetProductSelector', { ModelType: modelType, level: level, selectors: selectors });\r\n    }\r\n\r\n    getPlid(modelType, selectors) {\r\n        return this.api.post('/GetPids', { ModelType: modelType, selectors: selectors });\r\n    }\r\n\r\n    saveMyModels(modelType, models){\r\n        return this.api.post('/SaveModelsToPreferences', {ModelType : modelType, Models : models});\r\n    }\r\n\r\n    getMyModels(modelType){\r\n        return this.api.post('/GetMyModelsFromPreferences', {ModelType : modelType});\r\n    }\r\n\r\n    GetModelSelectorData(){\r\n        return this.api.post('/GetModelSelectorData');\r\n    }\r\n\r\n    getIsAccessoryToList(plid) {\r\n        return this.api.get('/ListProductsThisProductIsCompatibleWith', { params: { plid: plid } });\r\n    }\r\n\r\n    getRedirectData(group1, group2, group3) {\r\n        return this.api.post('/GetRedirectData', { Group1: group1, Group2: group2, Group3: group3 });\r\n    }\r\n}\r\n \r\nexport default new ModellApi();","import { createI18n } from \"vue-i18n\";\r\nimport Axios from 'axios';\r\n\r\n// Create VueI18n instance with options\r\nconst i18n = createI18n({\r\n    locale: 'nb', // set locale\r\n    silentTranslationWarn: true // do not warn about missing texts\r\n});\r\n\r\nconst resourceObjects = [\r\n    'Modellregister'\r\n];\r\n\r\nAxios.post('/api/Language/GetResourcesForObjects', resourceObjects)\r\n    .then((response) => {\r\n        i18n.global.setLocaleMessage('nb', response.data);\r\n    });\r\n\r\nexport default i18n;"],"names":["value","class","$options","isVisible","_createElementBlock","_normalizeClass","_ctx","levels","_Fragment","_renderList","selectorNo","disabled","loading","selectedSelectorIds","$event","onChange","selectionMade","_createElementVNode","_hoisted_2","_toDisplayString","$t","selectors","selector","Id","key","Name","_hoisted_3","type","onClick","_cache","_withModifiers","showAccessories","apply","arguments","_hoisted_5","EventTypes","ADD_MODEL","REMOVE_MODEL","SELECT_MODEL","ModellApi","AjaxRenderingEngine","setup","data","productPids","selectedPid","myModels","modelType","redirectToMenuIfFound","isAjaxEngineReady","computed","created","mounted","_this","PubSub","subscribe","eventName","plid","addModel","removeModel","selectModel","mcWeb","ajaxRenderEngine","events","onFieldContentChanged","onAccessoriesPopulated","formHead","document","querySelector","addEventListener","onAjaxRenderEngineReady","bind","GetModelSelectorData","then","responseSetup","Levels","ModelType","RedirectToMenuIfFound","finally","$parent","isPublishMode","initialize","isAccessoriesPage","getMyModels","response","Success","Models","JSON","parse","refreshMyModelsContent","myModelString","stringify","saveModelsToLocalStorage","storedModels","getModelsFromLocalStorage","undefined","methods","index","push","Array","updateSelectedGroupsFromPage","alreadySelected","getSelectedFromLocalStorage","length","setSelectedSelectors","getLevel","activeGroups","saveSelectedToLocalStorage","window","location","pathname","accessoriesPageUrl","getMyModelListFieldId","fieldElement","getAttribute","getMySelectedModelFieldId","getAccessoriesFieldId","levelToGet","thisLevelOnly","_this2","getProductSelector","emptyAndFillSelector","List","some","item","console","log","resetSelectedIds","clearAccessories","level","values","isArray","pop","forEach","levelSelectionWasMade","evt","selectedValue","parseInt","target","isNaN","fromLevel","toLevel","fromIndexLevel","toIndexLevel","addSelectedToMyModels","_this3","myStoredModels","currentModel","containsModel","saveMyModels","array","model","i","modelsMatch","model1","model2","join","StorageService","localStorage","getItem","replace","models","setItem","saveToLocalStorage","localStoredSelector","split","_this4","plidPosition","splice","modelsString","accessoriesFieldId","updateFieldWithPlids","sender","args","doNotRedirect","_this5","clearAndSetFieldSpinner","selectedIds","getSelectedIds","productGroupMatch","getRedirectData","DoRedirect","href","RedirectUrl","showAccessoriesStandard","_this6","getSelectedPlid","getPlid","accessoriesPlids","Plid","FieldId","accesoriesContainerBoundingRect","getBoundingClientRect","top","innerHeight","scrollTo","behavior","selectedPlid","groupA","groupB","plids","jQuery","collapse","fieldId","replaceChildren","spinnerNode","createElement","setAttribute","field","extraData","publish","Plids","ExtraData","ajaxRenderCheckCounter","that","ajaxRenderCheck","setInterval","clearInterval","InitialLoadDone","id","_hoisted_1","publishMode","_createBlock","_component_modell_selector","ref","SelectorForm","components","$refs","selectorForm","createApp","h","createI18nMessage","helpers","ModellSelector","ModellSelectorApp","i18n","ModelRegister","groups","onModelRegisterScriptLoaded","initializeProductGroups","initializeModelRegisterInstance","webPubElmementId","elm","modellRegister","postedData","beforeDestroy","render","use","mount","setupModelregisterPage","elementId","getElementById","modellRegisterApp","querySelectorAll","props","expose","mountedApp","Axios","_classCallCheck","api","create","baseURL","_createClass","getModelSelectorSetup","post","getIsAccessoryToList","get","params","group1","group2","group3","Group1","Group2","Group3","createI18n","locale","silentTranslationWarn","resourceObjects","global","setLocaleMessage"],"sourceRoot":""}