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,CACA,SAASC,EAAsBF,EAAK,CACnC,GAAG,CAACG,EAAoB,EAAEL,EAAKE,CAAG,EAAG,CACpC,IAAII,EAAI,IAAI,MAAM,uBAAyBJ,EAAM,GAAG,EACpD,MAAAI,EAAE,KAAO,mBACHA,CACP,CACA,OAAON,EAAIE,CAAG,CACf,CACAD,EAAe,KAAO,UAA8B,CACnD,OAAO,OAAO,KAAKD,CAAG,CACvB,EACAC,EAAe,QAAUG,EACzBG,EAAO,QAAUN,EACjBA,EAAe,GAAK,K,mPCtBhBO,EAA2B,CAAC,EAGhC,SAASH,EAAoBI,EAAU,CAEtC,IAAIC,EAAeF,EAAyBC,CAAQ,EACpD,GAAIC,IAAiB,OACpB,OAAOA,EAAa,QAGrB,IAAIH,EAASC,EAAyBC,CAAQ,EAAI,CAGjD,QAAS,CAAC,CACX,EAGA,OAAAE,EAAoBF,CAAQ,EAAEF,EAAQA,EAAO,QAASF,CAAmB,EAGlEE,EAAO,OACf,E,WCtBAF,EAAoB,EAAI,SAASO,EAAKC,EAAM,CAAE,OAAO,OAAO,UAAU,eAAe,KAAKD,EAAKC,CAAI,CAAG,C,gBCAtGR,EAAoB,EAAI,iB,sDCKxBS,EAAAA,KAAAA,C","sources":["webpack://metadecidim/./vendor/bundle/ruby/3.2.0/gems/decidim-initiatives-0.29.2/app/packs/src/decidim/initiatives/identity_selector_dialog.js","webpack://metadecidim/./vendor/bundle/ruby/3.2.0/gems/decidim-initiatives-0.29.2/app/packs/src/decidim/initiatives/scoped_type.js","webpack://metadecidim/./vendor/bundle/ruby/3.2.0/gems/decidim-initiatives-0.29.2/app/packs/images/ sync ^\\.\\/.*$","webpack://metadecidim/webpack/bootstrap","webpack://metadecidim/webpack/runtime/hasOwnProperty shorthand","webpack://metadecidim/webpack/runtime/publicPath","webpack://metadecidim/./vendor/bundle/ruby/3.2.0/gems/decidim-initiatives-0.29.2/app/packs/entrypoints/decidim_initiatives.js"],"sourcesContent":["$(() => {\n let button = $(\"#select-identity-button\"),\n userIdentitiesDialog = $(\"#user-identities\");\n\n if (userIdentitiesDialog.length) {\n let refreshUrl = userIdentitiesDialog.data(\"refresh-url\");\n\n button.click(function () {\n $.ajax(refreshUrl).done(function(response) {\n userIdentitiesDialog.html(response).foundation(\"open\");\n });\n });\n }\n})\n","/* eslint-disable camelcase */\nconst controlSelector = function (source, prefix, currentValueKey) {\n if (source.length) {\n let currentValue = source.data(currentValueKey),\n searchUrl = source.data(`${prefix}-search-url`),\n targetElement = $(`#${source.data(`${prefix}-selector`)}`);\n\n if (targetElement.length) {\n let refresh = function () {\n $.ajax({\n url: searchUrl,\n cache: false,\n dataType: \"html\",\n data: {\n type_id: source.val(),\n selected: currentValue\n },\n success: function (data) {\n targetElement.html(data);\n }\n });\n };\n\n source.change(refresh);\n refresh();\n }\n }\n};\n\n$(() => {\n let typeSelector = $(\"[data-scope-selector]\");\n controlSelector(typeSelector, \"scope\", \"scope-id\");\n controlSelector(typeSelector, \"signature-types\", \"signature-type\");\n});\n","var map = {\n\t\"./decidim/gamification/badges/decidim_gamification_badges_initiatives.svg\": 58318,\n\t\"./decidim/initiatives/decidim_initiatives.svg\": 26738\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = 73405;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","__webpack_require__.p = \"/decidim-packs/\";","import \"src/decidim/initiatives/application\"\nimport \"src/decidim/initiatives/identity_selector_dialog\"\nimport \"src/decidim/initiatives/scoped_type\"\n\n// Images\nrequire.context(\"../images\", true)\n\n// CSS\nimport \"stylesheets/initiatives.scss\"\n"],"names":["$","button","userIdentitiesDialog","length","refreshUrl","data","click","ajax","done","response","html","foundation","controlSelector","source","prefix","currentValueKey","currentValue","searchUrl","targetElement","refresh","url","cache","dataType","type_id","val","selected","success","change","typeSelector","map","webpackContext","req","id","webpackContextResolve","__webpack_require__","e","module","__webpack_module_cache__","moduleId","cachedModule","__webpack_modules__","obj","prop","require"],"sourceRoot":""}