{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/js/main.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","jQuery","$","$nav_open_button","$nav_dropdown","row","column","columns","elements","rows","$nav_close_button","setTimeout","$tabbableElements","close_main_menu","e","orderAfterGrid","getComputedStyle","inputParent","fieldContainer","nodeName","$input","this","children"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI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AC1CA,wBACAA,+BAMDA,oCAAoC,WAC/BA,EAAJ,6BACCA,oDAAmD,WAClD,IAAMe,EAAcf,sBAApB,SAIA,GAAIe,SAAJ,EAA4B,CAC3B,IAAMC,EAAiBD,UAAvB,qBAIAA,QAAiB,WAAW,MACrBE,EAAQ,UAAGjB,QAAH,4BAAGA,EAAjB,SAEIiB,GAAJ,SAAgBA,IACfC,OAASlB,aAATkB,SACAF,oCACAhB,0CACAA,4BAECkB,YAFDlB,iBAIAA,6CAEkBkB,OAFlBlB,iDAEiEA,YAFjEA,8BAiBNA,mDAAmD,YAClDY,mBAEIZ,iBAAJ,SACCA,4BACAA,8DAEOA,aAFPA,cAGAA,8DAIAA,yBACAA,8DAEOA,aAFPA,eAGAA,kEAMFA,6DAA4D,WAC3DA,EAAEmB,KAAKC,SAAS,GAAGA,SAAS,GAAGA,SAAS,GAAGA,SAAS,GAAGA,SAAvDpB,wBACAA,EAAEmB,KAAKC,SAAS,GAAGA,SAAS,GAAGA,SAAS,GAAGA,SAA3CpB,+B","file":"/build/js/main.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 127);\n","jQuery($ => {\n\t// Set the height of header to html so we can access the header height with css\n\t// @todo: What do we use this for?\n\t$(window).on(\"resize load\", () => {\n\t\t$(\"html\")\n\t\t\t.get(0)\n\t\t\t.style.setProperty(\n\t\t\t\t\"--headerHeight\",\n\t\t\t\t`${$(\"#header\").outerHeight() + 1}px`\n\t\t\t);\n\t});\n\n\t/**\n\t * Navigation\n\t */\n\t$nav_open_button = $(\"#navigation-open\");\n\t$nav_close_button = $(\"#navigation-close\");\n\t$nav_dropdown = $(\"#navigation-dropdown\");\n\n\t// Open the navigation dropdown.\n\t$nav_open_button.on(\"click\", () => {\n\t\topen_main_menu();\n\t});\n\n\t// Close the navigation dropdown.\n\t$nav_close_button.on(\"click\", () => {\n\t\tclose_main_menu();\n\t});\n\n\t// Close on Esc keypress.\n\t$(document).keyup(e => {\n\t\tif (e.key === \"Escape\") {\n\t\t\tclose_main_menu();\n\t\t}\n\t});\n\n\t// Open function\n\tfunction open_main_menu() {\n\t\t$(\"body\").addClass(\"menu-open\");\n\t\t$nav_dropdown.addClass(\"open\");\n\t\t$nav_open_button.attr(\"aria-pressed\", true);\n\n\t\tsetTimeout(function() {\n\t\t\t$nav_close_button.focus();\n\t\t\tloop_last_tab();\n\t\t\t$nav_open_button.attr(\"tabindex\", -1);\n\t\t}, 100);\n\t}\n\n\t// Close function\n\tfunction close_main_menu() {\n\t\t$nav_open_button.attr(\"tabindex\", 0);\n\t\t$(\"body\").removeClass(\"menu-open\");\n\t\t$nav_dropdown.removeClass(\"open\");\n\t\t$nav_open_button.attr(\"aria-pressed\", false);\n\t\t$nav_open_button.focus();\n\t}\n\n\t//Tabbing while menu is open\n\tfunction loop_last_tab() {\n\t\t$tabbableElements = $(\"#navigation-dropdown a\");\n\t\t$tabbableElements.each(function(i, el) {\n\t\t\tif (i === $tabbableElements.length - 1) {\n\t\t\t\t$(this).focusout(function(e) {\n\t\t\t\t\t$nav_close_button.focus();\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\t// Fix menu item order\n\tfunction orderAfterGrid(elements, rows, columns) {\n\t\tvar row, column;\n\t\trow = column = 1;\n\n\t\tif (!columns) {\n\t\t\tcolumns = elements.length / rows;\n\t\t}\n\n\t\tif (elements.length <= rows * columns) {\n\t\t\telements.each(function() {\n\t\t\t\t$(this).attr(\"style\", `grid-area: ${column} / ${row};`);\n\n\t\t\t\tcolumn++;\n\n\t\t\t\tif (column > columns) {\n\t\t\t\t\tcolumn = 1;\n\n\t\t\t\t\trow++;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\torderAfterGrid($(\".navigation--main ul.menu li\"), 1, 3);\n\torderAfterGrid($(\".menu-snarveier-container ul li\"), 2, 4);\n\n\t$(\".gf\").each(function() {\n\t\tvar order = getComputedStyle($(this));\n\t});\n\n\t/**\n\t * Accordion\n\t */\n\t$(\".accordion-faq .fl-accordion-button a\").each(function() {\n\t\t$(this).attr(\"tabindex\", \"-1\");\n\t});\n\n\t$(\".bread__home\")\n\t\t.parent()\n\t\t.attr(\"title\", \"Gå til forsiden\");\n\n\t/**\n\t * Garbage disposal list.\n\t */\n\t$(\".gd__fraction-header\").click(function() {\n\t\t$(this)\n\t\t\t.siblings(\".gd__fraction-content\")\n\t\t\t.slideToggle();\n\t\t$(this)\n\t\t\t.parent()\n\t\t\t.toggleClass(\"active\");\n\t});\n\n\t/**\n\t * Toggle mobile sub menu\n\t */\n\t$(\"#menu-header-hovedmeny > li > a\").click(function() {\n\t\t$(this).next().toggle();\n\t\t$(this).toggleClass('open');\n\t});\n\n\t/**\n\t * Add classes and attributes to elements to support validation layout\n\t */\n\t$(document).on(\"gform_post_render\", function() {\n\t\tif ($(\".gform_validation_errors\")) {\n\t\t\t$(\".gfield_error, .gfield_contains_required\").each(function() {\n\t\t\t\tconst inputParent = $(this)\n\t\t\t\t\t.find(\"input\")\n\t\t\t\t\t.parent();\n\n\t\t\t\tif (inputParent.length > 1) {\n\t\t\t\t\tconst fieldContainer = inputParent.closest(\n\t\t\t\t\t\t\".ginput_container\"\n\t\t\t\t\t);\n\n\t\t\t\t\tinputParent.each(function() {\n\t\t\t\t\t\tconst nodeName = $(this).context?.nodeName;\n\n\t\t\t\t\t\tif (nodeName && nodeName === \"SPAN\") {\n\t\t\t\t\t\t\t$input = $(this).find(\"input\");\n\t\t\t\t\t\t\tfieldContainer.addClass(\"ginput_container-span\");\n\t\t\t\t\t\t\t$(this).addClass(\"ginput_span-container\");\n\t\t\t\t\t\t\t$(this).attr(\n\t\t\t\t\t\t\t\t\"aria-invalid\",\n\t\t\t\t\t\t\t\t$input.attr(\"aria-invalid\")\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$(this).attr(\n\t\t\t\t\t\t\t\t\"style\",\n\t\t\t\t\t\t\t\t`--inputHeight:${$input.outerHeight()}px; --inputPaddingRight:${$(\n\t\t\t\t\t\t\t\t\tthis\n\t\t\t\t\t\t\t\t).css(\"padding-right\")}`\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t});\n\n\t/**\n\t * Toggle the detailed description on single waste pages.\n\t * TODO: Rename all waste to garbage to be consistent?\n\t */\n\t$(\".js-waste-type-description-toggle\").on(\"click\", function(e) {\n\t\te.preventDefault();\n\n\t\tif ($(this).hasClass(\"open\")) {\n\t\t\t$(this).removeClass(\"open\");\n\t\t\t$(this)\n\t\t\t\t.children(\".waste-type__description-toggle-text\")\n\t\t\t\t.text($(this).data(\"open-text\"));\n\t\t\t$(this)\n\t\t\t\t.prev(\".waste_type__detailed-description\")\n\t\t\t\t.slideUp();\n\t\t} else {\n\t\t\t$(this).addClass(\"open\");\n\t\t\t$(this)\n\t\t\t\t.children(\".waste-type__description-toggle-text\")\n\t\t\t\t.text($(this).data(\"close-text\"));\n\t\t\t$(this)\n\t\t\t\t.prev(\".waste_type__detailed-description\")\n\t\t\t\t.slideDown();\n\t\t}\n\t});\n\n\t$(\".smart-delivery-locations__wrapper__result__item\").click(function() {\n\t\t$(this.children[0].children[0].children[0].children[1].children[0]).toggleClass('open');\n\t\t$(this.children[0].children[0].children[0].children[0]).toggleClass('open');\n\t});\n});\n"],"sourceRoot":""}