{"version":3,"file":"main.CXwJ9P.js","sources":["theme-40/virtual:theme","theme-40/discourse/api-initializers/theme-initializer.gjs","theme-40/virtual:entrypoint:main"],"sourcesContent":["import { getObjectForTheme } from \"discourse/lib/theme-settings-store\";\n\nexport const settings = getObjectForTheme(40);\n\nexport function themePrefix(key) {\n  return `theme_translations.40.${key}`;\n}\n","import { apiInitializer } from \"discourse/lib/api\";\n\nexport default apiInitializer((api) => {\n  \n  const { computed } = require(\"@ember/object\");\n  api.modifyClass('component:edit-category-settings', {\n    pluginId: \"edit-category-settings\",\n    availableViews: computed(function() {\n      let views = this._super();\n      let voteView = {};\n      voteView[\"name\"] = \"Votes\";\n      voteView[\"value\"] = \"votes\";\n      views.push(voteView);\n      return views;\n    })\n  });\n  \n\n  const {later} = require(\"@ember/runloop\");\n\n//  api.onPageChange(() => {\n//     // Your code to execute when the site loads or page changes\n    \n  \n//   // Select the elements\n  \n//   var spanElement = document.querySelector('.discovery-list-controls-above-outlet');\n//   var bannerElement = document.querySelector('.category-banner-demohub');\n//   console.log(spanElement, bannerElement)\n//   if (spanElement && bannerElement) {\n      \n//     // Get the parent element of the banner\n//     var parentElement = bannerElement.parentNode;\n    \n//     // Insert the span element before the banner element\n//      parentElement.insertBefore(spanElement, bannerElement);\n//   }\n      \n//  });\n\n    api.decorateCooked(($elem) => {\n        const iframes = $elem[0].querySelectorAll('iframe[src^=\"https://form.typeform.com\"]');\n        const userName = api.getCurrentUser()?.username;\n        \n        if(!userName){ return; }\n        \n        for (let i = 0; i < iframes.length; i++) {\n            iframes[i].setAttribute('src', `${iframes[i].getAttribute('src')}&username=${userName}`);\n        }\n    });\n});\n","import * as Mod1 from \"./discourse/api-initializers/theme-initializer\";\nconst compatModules = {\n  \"discourse/api-initializers/theme-initializer\": Mod1,\n};\nexport { compatModules };\nexport default compatModules;\n"],"names":["getObjectForTheme","themeInitializer","apiInitializer","api","computed","require","modifyClass","pluginId","availableViews","views","this","_super","voteView","push","later","decorateCooked","$elem","iframes","querySelectorAll","userName","getCurrentUser","username","i","length","setAttribute","getAttribute","compatModules"],"mappings":";AAEwBA,EAAkB;;ACA1C,IAAAC;oCAAeC,CAAgBC,IAE7B,MAAMC,SAAEA,GAAaC,QAAQ;AAC7BF,EAAIG,YAAY,mCAAoC,CAClDC,SAAU,yBACVC,eAAgBJ,EAAS,WACvB,IAAIK,EAAQC,KAAKC,SACbC,EAAW,CACfA,KAAmB,QACnBA,MAAoB;AAEpB,OADAH,EAAMI,KAAKD,GACJH,CACT;AAIF,MAAMK,MAACA,GAAST,QAAQ;AAsBtBF,EAAIY,eAAgBC,IAChB,MAAMC,EAAUD,EAAM,GAAGE,iBAAiB,4CACpCC,EAAWhB,EAAIiB,kBAAkBC;AAEvC,GAAIF,EAEJ,IAAK,IAAIG,EAAI,EAAGA,EAAIL,EAAQM,OAAQD,IAChCL,EAAQK,GAAGE,aAAa,MAAO,GAAGP,EAAQK,GAAGG,aAAa,mBAAmBN;AC9CpF,MAACO,EAAgB,CACpB;"}