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3O,oBAAoBC,EAAE0O,EAAa7B,KACrC9M,oBAAoBiN,EAAEH,GAAY6B,EAAY7B,IAGhD,GAAG8B,EAAS,IAAIzB,EAASyB,EAAQ5O,oBAClC,CAEA,IADG0O,GAA4BA,EAA2BzL,GACrD6G,EAAIsD,EAAS/E,OAAQyB,IACzB0E,EAAUpB,EAAStD,GAChB9J,oBAAoBC,EAAEsO,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOxO,oBAAoBkN,EAAEC,EAC9B,EAEI2B,EAAqBC,KAAgC,0BAAIA,KAAgC,2BAAK,GAClGD,EAAmBvL,QAAQkL,EAAqBO,KAAK,KAAM,IAC3DF,EAAmB3E,KAAOsE,EAAqBO,KAAK,KAAMF,EAAmB3E,KAAK6E,KAAKF,G,IC/CvF,IAAIG,oBAAsBjP,oBAAoBkN,OAAElC,EAAW,CAAC,KAAK,OAAO,WAAa,OAAOhL,oBAAoB,MAAQ,IACxHiP,oBAAsBjP,oBAAoBkN,EAAE+B,oB","sources":["webpack://decidim_parma/../../../../home/kapusons/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/decidim-assemblies-0.26.9/app/packs/images/ sync ^\\.\\/.*$","webpack://decidim_parma/../../../../home/kapusons/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/decidim-assemblies-0.26.9/app/packs/entrypoints/decidim_assemblies.js","webpack://decidim_parma/../../../../home/kapusons/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/decidim-assemblies-0.26.9/app/packs/src/decidim/assemblies/assemblies.js","webpack://decidim_parma/../../../../home/kapusons/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/decidim-assemblies-0.26.9/app/packs/src/decidim/assemblies/orgchart.js","webpack://decidim_parma/../../../../home/kapusons/.rbenv/versions/2.7.5/lib/ruby/gems/2.7.0/gems/decidim-core-0.26.9/app/packs/src/decidim/vizzs/renders.js","webpack://decidim_parma/webpack/bootstrap","webpack://decidim_parma/webpack/runtime/chunk loaded","webpack://decidim_parma/webpack/runtime/compat get default export","webpack://decidim_parma/webpack/runtime/define property getters","webpack://decidim_parma/webpack/runtime/hasOwnProperty shorthand","webpack://decidim_parma/webpack/runtime/publicPath","webpack://decidim_parma/webpack/runtime/jsonp chunk loading","webpack://decidim_parma/webpack/startup"],"sourcesContent":["var map = {\n\t\"./decidim/assemblies/decidim_assemblies.svg\": 53668\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 = 22560;","import \"src/decidim/assemblies/assemblies\"\nimport \"src/decidim/assemblies/orgchart\"\n\n// Images\nrequire.context(\"../images\", true)\n","$(() => {\n $(\".show-more\").on(\"click\", function() {\n /* eslint-disable no-invalid-this */\n $(this).hide();\n $(\".show-more-panel\").removeClass(\"hide\");\n $(\".hide-more\").show();\n });\n\n $(\".hide-more\").on(\"click\", function() {\n $(this).hide();\n $(\".show-more-panel\").addClass(\"hide\");\n $(\".show-more\").show();\n });\n})\n","/* eslint-disable require-jsdoc, max-lines, no-return-assign, func-style, id-length, no-plusplus, no-use-before-define, no-negated-condition, init-declarations, no-invalid-this, no-param-reassign, no-ternary, multiline-ternary, no-nested-ternary, no-eval, no-extend-native, prefer-reflect */\n/* eslint dot-location: [\"error\", \"property\"], no-negated-condition: \"error\" */\n/* eslint no-unused-expressions: [\"error\", { \"allowTernary\": true }] */\n/* eslint no-unused-vars: 0 */\n/* global d3 */\n\nimport * as d3 from \"d3\"\nimport renderChart from \"src/decidim/vizzs/renders\"\n\n// lib\nconst renderOrgCharts = () => {\n const $orgChartContainer = $(\".js-orgchart\")\n const $btnReset = $(\".js-reset-orgchart\")\n\n let dataDepicted = null\n let fake = false\n let orgchart = {}\n\n // lib - https://bl.ocks.org/bumbeishvili/b96ba47ea21d14dfce6ebb859b002d3a\n const renderChartCollapsibleNetwork = (params) => {\n\n // exposed variables\n let attrs = {\n id: `id${Math.floor(Math.random() * 1000000)}`,\n svgWidth: 960,\n svgHeight: 600,\n marginTop: 0,\n marginBottom: 5,\n marginRight: 0,\n marginLeft: 30,\n container: \"body\",\n distance: 150,\n hiddenChildLevel: 1,\n hoverOpacity: 0.2,\n maxTextDisplayZoomLevel: 1,\n lineStrokeWidth: 1.5,\n fakeRoot: false,\n nodeGutter: { x: 16, y: 8 },\n childrenIndicatorRadius: 15,\n fakeBorderWidth: 32,\n data: null\n }\n\n /* ############### IF EXISTS OVERWRITE ATTRIBUTES FROM PASSED PARAM ####### */\n\n let attrKeys = Object.keys(attrs)\n attrKeys.forEach(function (key) {\n if (params && params[key]) {\n attrs[key] = params[key]\n }\n })\n\n // innerFunctions which will update visuals\n let updateData\n let collapse, expand\n let filter\n let hierarchy = {}\n\n // main chart object\n let main = function (selection) {\n selection.each(function scope() {\n\n // calculated properties\n let calc = {}\n calc.chartLeftMargin = attrs.marginLeft\n calc.chartTopMargin = attrs.marginTop\n calc.chartWidth = attrs.svgWidth - attrs.marginRight - calc.chartLeftMargin\n calc.chartHeight = attrs.svgHeight - attrs.marginBottom - calc.chartTopMargin\n\n // ########################## HIERARCHY STUFF #########################\n hierarchy.root = d3.hierarchy(attrs.data.root)\n\n // ########################### BEHAVIORS #########################\n let behaviors = {}\n // behaviors.zoom = d3.zoom().scaleExtent([0.75, 100, 8]).on(\"zoom\", zoomed)\n behaviors.drag = d3.drag().on(\"start\", dragstarted).on(\"drag\", dragged).on(\"end\", dragended)\n\n // ########################### LAYOUTS #########################\n let layouts = {}\n\n // custom radial layout\n layouts.radial = radial()\n\n // ########################### FORCE STUFF #########################\n let force = {}\n force.link = d3.forceLink().id((d) => d.id)\n force.charge = d3.forceManyBody().strength(-240)\n force.center = d3.forceCenter(calc.chartWidth / 2, calc.chartHeight / 2)\n\n // prevent collide\n force.collide = d3.forceCollide().radius((d) => {\n // Creates an invented radius based on element measures: diagonal = 2 * radius = sqrt(width^2, height^2)\n let base = (d.bbox || {}).width + (attrs.nodeGutter.x * 2)\n let height = (d.bbox || {}).height + (attrs.nodeGutter.y * 2)\n let diagonal = Math.sqrt(Math.pow(base, 2) + Math.pow(height, 2))\n let fakeRadius = (diagonal / 2)\n\n // return d3.max([attrs.nodeDistance * 3, fakeRadius])\n return fakeRadius * 1.5\n })\n\n // manually set x positions (which is calculated using custom radial layout)\n force.x = d3.forceX()\n .strength(0.5)\n .x(function (d) {\n\n // if node does not have children and is channel (depth=2) , then position it on parent's coordinate\n if (!d.children && d.depth > 2) {\n if (d.parent) {\n d = d.parent\n }\n }\n\n // custom circle projection - radius will be - (d.depth - 1) * 150\n return projectCircle(d.proportion, (d.depth - 1) * attrs.distance)[0]\n })\n\n // manually set y positions (which is calculated using d3.cluster)\n force.y = d3.forceY()\n .strength(0.5)\n .y(function (d) {\n\n // if node does not have children and is channel (depth=2) , then position it on parent's coordinate\n if (!d.children && d.depth > 2) {\n if (d.parent) {\n d = d.parent\n }\n }\n\n // custom circle projection - radius will be - (d.depth - 1) * 150\n return projectCircle(d.proportion, (d.depth - 1) * attrs.distance)[1]\n })\n\n // --------------------------------- INITIALISE FORCE SIMULATION ----------------------------\n\n // get based on top parameter simulation\n force.simulation = d3.forceSimulation()\n .force(\"link\", force.link)\n .force(\"charge\", force.charge)\n .force(\"center\", force.center)\n .force(\"collide\", force.collide)\n .force(\"x\", force.x)\n .force(\"y\", force.y)\n\n // ########################### HIERARCHY STUFF #########################\n\n // flatten root\n let arr = flatten(hierarchy.root)\n\n // hide members based on their depth\n arr.forEach((d) => {\n // Hide fake root node\n if ((attrs.fakeRoot) && (d.depth === 1)) {\n d.hidden = true\n }\n\n if (d.depth > attrs.hiddenChildLevel) {\n d._children = d.children\n d.children = null\n }\n })\n\n // #################################### DRAWINGS #######################\n\n // drawing containers\n let container = d3.select(this)\n\n // add svg\n let svg = container.patternify({ tag: \"svg\", selector: \"svg-chart-container\" })\n .attr(\"width\", attrs.svgWidth)\n .attr(\"height\", attrs.svgHeight)\n // .call(behaviors.zoom)\n\n // add container g element\n let chart = svg.patternify({ tag: \"g\", selector: \"chart\" })\n .attr(\"transform\", `translate(${calc.chartLeftMargin},${calc.chartTopMargin})`)\n\n // ################################ Chart Content Drawing ##################################\n\n // link wrapper\n let linksWrapper = chart.patternify({ tag: \"g\", selector: \"links-wrapper\" })\n\n // node wrapper\n let nodesWrapper = chart.patternify({ tag: \"g\", selector: \"nodes-wrapper\" })\n let links, nodes\n\n // reusable function which updates visual based on data change\n update()\n\n // update visual based on data change\n function update(clickedNode) {\n\n // Show/hide reset button\n (clickedNode) ? $btnReset.removeClass(\"invisible\") : $btnReset.addClass(\"invisible\")\n\n // set xy and proportion properties with custom radial layout\n layouts.radial(hierarchy.root)\n\n // nodes and links array\n let nodesArr = flatten(hierarchy.root, true)\n .orderBy((d) => d.depth)\n .filter((d) => !d.hidden)\n\n let linksArr = hierarchy.root.links()\n .filter((d) => !d.source.hidden)\n .filter((d) => !d.target.hidden)\n\n // make new nodes to appear near the parents\n nodesArr.forEach(function (d) {\n if (clickedNode && clickedNode.id === (d.parent && d.parent.id)) {\n d.x = d.parent.x\n d.y = d.parent.y\n }\n })\n\n // links\n links = linksWrapper.selectAll(\".link\")\n .data(linksArr, (d) => d.target.id)\n links.exit().remove()\n\n links = links.enter()\n .append(\"line\")\n .attr(\"class\", \"link\")\n .merge(links)\n\n // node groups\n nodes = nodesWrapper.selectAll(\".node\")\n .data(nodesArr, (d) => d.id)\n nodes.exit().remove()\n\n let enteredNodes = nodes.enter()\n .append(\"g\")\n .attr(\"class\", \"node\")\n\n // bind event handlers\n enteredNodes\n .on(\"click\", nodeClick)\n .on(\"mouseenter\", nodeMouseEnter)\n .on(\"mouseleave\", nodeMouseLeave)\n .call(behaviors.drag)\n\n // channels grandchildren\n enteredNodes.append(\"rect\")\n .attr(\"class\", \"as-card\")\n .attr(\"rx\", 4)\n .attr(\"ry\", 4)\n\n enteredNodes.append(\"text\")\n .attr(\"class\", \"as-text\")\n .text((d) => d.data.name)\n\n enteredNodes.selectAll(\"text\").each(function(d) {\n d.bbox = this.getBBox()\n })\n\n enteredNodes.selectAll(\"rect\")\n .attr(\"x\", (d) => d.bbox.x - attrs.nodeGutter.x)\n .attr(\"y\", (d) => d.bbox.y - attrs.nodeGutter.y)\n .attr(\"width\", (d) => d.bbox.width + (2 * attrs.nodeGutter.x))\n .attr(\"height\", (d) => d.bbox.height + (2 * attrs.nodeGutter.y))\n\n // append circle & text only when there are children\n enteredNodes\n .append(\"circle\")\n .filter((d) => Boolean(d.children) || Boolean(d._children))\n .attr(\"class\", \"as-circle\")\n .attr(\"r\", attrs.childrenIndicatorRadius)\n .attr(\"cx\", (d) => d.bbox.x + d.bbox.width + attrs.nodeGutter.x)\n .attr(\"cy\", (d) => d.bbox.y + d.bbox.height + attrs.nodeGutter.y)\n\n enteredNodes\n .append(\"text\")\n .filter((d) => Boolean(d.children) || Boolean(d._children))\n .attr(\"class\", \"as-text\")\n .attr(\"dx\", (d) => d.bbox.x + d.bbox.width + attrs.nodeGutter.x)\n .attr(\"dy\", attrs.childrenIndicatorRadius + 3)\n .text((d) => d3.max([(d.children || {}).length, (d._children || {}).length]))\n\n // merge node groups and style it\n nodes = enteredNodes.merge(nodes)\n\n // force simulation\n force.simulation.nodes(nodesArr).on(\"tick\", ticked)\n\n // links simulation\n force.simulation.force(\"link\").links(links).id((d) => d.id).distance(attrs.distance * 2).strength(2)\n }\n\n // ####################################### EVENT HANDLERS ########################\n\n // zoom handler\n // function zoomed() {\n // // get transform event\n // let transform = d3.event.transform\n // attrs.lastTransform = transform\n //\n // // apply transform event props to the wrapper\n // chart.attr(\"transform\", transform)\n //\n // svg.selectAll(\".node\").attr(\"transform\", (d) => `translate(${d.x},${d.y}) scale(${1 / (attrs.lastTransform ? attrs.lastTransform.k : 1)})`)\n // svg.selectAll(\".link\").attr(\"stroke-width\", attrs.lineStrokeWidth / (attrs.lastTransform ? attrs.lastTransform.k : 1))\n // }\n\n // tick handler\n function ticked() {\n const fakeBorderWidth = attrs.fakeBorderWidth\n const maxXValueAvailable = (value) => Math.max(Math.min(calc.chartWidth - fakeBorderWidth, value), fakeBorderWidth)\n const maxYValueAvailable = (value) => Math.max(Math.min(calc.chartHeight - fakeBorderWidth, value), fakeBorderWidth)\n // set links position\n links\n .attr(\"x1\", (d) => maxXValueAvailable(d.source.x))\n .attr(\"y1\", (d) => maxYValueAvailable(d.source.y))\n .attr(\"x2\", (d) => maxXValueAvailable(d.target.x))\n .attr(\"y2\", (d) => maxYValueAvailable(d.target.y))\n\n // set nodes position\n svg.selectAll(\".node\")\n .attr(\"transform\", (d) => `translate(${maxXValueAvailable(d.x)},${maxYValueAvailable(d.y)})`)\n }\n\n // handler drag start event\n function dragstarted() {\n // disable node fixing\n nodes.each((d) => {\n d.fx = null\n d.fy = null\n })\n }\n\n // handle dragging event\n function dragged(d) {\n // make dragged node fixed\n d.fx = d3.event.x\n d.fy = d3.event.y\n }\n\n // -------------------- handle drag end event ---------------\n function dragended() {\n // we are doing nothing, here , aren't we?\n }\n\n // -------------------------- node mouse hover handler ---------------\n function nodeMouseEnter(d) {\n // get links\n let _links = hierarchy.root.links()\n\n // get hovered node connected links\n let connectedLinks = _links.filter((l) => l.source.id === d.id || l.target.id === d.id)\n\n // get hovered node linked nodes\n let linkedNodes = connectedLinks.map((s) => s.source.id).concat(connectedLinks.map((c) => c.target.id))\n\n // reduce all other nodes opacity\n nodesWrapper.selectAll(\".node\")\n .filter((n) => linkedNodes.indexOf(n.id) === -1)\n .attr(\"opacity\", attrs.hoverOpacity)\n\n // reduce all other links opacity\n linksWrapper.selectAll(\".link\")\n .attr(\"opacity\", attrs.hoverOpacity)\n\n // highlight hovered nodes connections\n linksWrapper.selectAll(\".link\")\n .filter((l) => l.source.id === d.id || l.target.id === d.id)\n .attr(\"opacity\", 1)\n }\n\n // --------------- handle mouseleave event ---------------\n function nodeMouseLeave() {\n // return things back to normal\n nodesWrapper.selectAll(\".node\")\n .attr(\"opacity\", 1)\n linksWrapper.selectAll(\".link\")\n .attr(\"opacity\", 1)\n }\n\n // --------------- handle node click event ---------------\n function nodeClick(d) {\n // free fixed nodes\n nodes.each((di) => {\n di.fx = null\n di.fy = null\n })\n\n // collapse or expand node\n if (d.children) {\n collapse(d)\n } else if (d._children) {\n expand(d)\n } else {\n // nothing is to collapse or expand\n }\n\n freeNodes()\n }\n\n // ######################################### UTIL FUNCS ##################################\n updateData = function () {\n main.run()\n }\n\n collapse = function (d, deep = false) {\n if (d.children) {\n if (deep) {\n d.children.forEach((e) => collapse(e, true))\n }\n\n d._children = d.children\n d.children = null\n }\n\n update(d)\n force.simulation.restart()\n force.simulation.alphaTarget(0.15)\n }\n\n expand = function (d, deep = false) {\n if (d._children) {\n if (deep) {\n d._children.forEach((e) => expand(e, true))\n }\n\n d.children = d._children\n d._children = null\n }\n\n update(d)\n force.simulation.restart()\n force.simulation.alphaTarget(0.15)\n }\n\n // function slowDownNodes() {\n // force.simulation.alphaTarget(0.05)\n // }\n\n // function speedUpNodes() {\n // force.simulation.alphaTarget(0.45)\n // }\n\n function freeNodes() {\n d3.selectAll(\".node\").each((n) => {\n n.fx = null\n n.fy = null\n })\n }\n\n function projectCircle(value, radius) {\n let r = radius || 0\n let corner = value * 2 * Math.PI\n return [Math.sin(corner) * r, -Math.cos(corner) * r]\n }\n\n // recursively loop on children and extract nodes as an array\n function flatten(root, clustered) {\n let nodesArray = []\n let i = 0\n function recurse(node, depth) {\n if (node.children) {\n node.children.forEach(function (child) {\n recurse(child, depth + 1)\n })\n }\n\n if (!node.id) {\n node.id = ++i\n } else {\n ++i\n }\n\n node.depth = depth\n if (clustered) {\n if (!node.cluster) {\n // if cluster coordinates are not set, set it\n node.cluster = { x: node.x, y: node.y }\n }\n }\n nodesArray.push(node)\n }\n recurse(root, 1)\n return nodesArray\n }\n\n function debug() {\n if (attrs.isDebug) {\n // stringify func\n let stringified = String(scope)\n\n // parse variable names\n let groupVariables = stringified\n // match var x-xx= {}\n .match(/var\\s+([\\w])+\\s*=\\s*{\\s*}/gi)\n // match xxx\n .map((d) => d.match(/\\s+\\w*/gi).filter((s) => s.trim()))\n // get xxx\n .map((v) => v[0].trim())\n\n // assign local variables to the scope\n groupVariables.forEach((v) => {\n main[`P_${v}`] = eval(v)\n })\n }\n }\n\n debug()\n\n })\n }\n\n // ----------- PROTOTYEPE FUNCTIONS ----------------------\n d3.selection.prototype.patternify = function (_params) {\n let selector = _params.selector\n let elementTag = _params.tag\n let _data = _params.data || [selector]\n\n // pattern in action\n let selection = this.selectAll(`.${selector}`).data(_data)\n selection.exit().remove()\n selection = selection.enter().append(elementTag).merge(selection)\n selection.attr(\"class\", selector)\n\n return selection\n }\n\n // custom radial layout\n function radial() {\n return function (root) {\n\n recurse(root, 0, 1)\n\n function recurse(node, min, max) {\n node.proportion = (max + min) / 2\n if (!node.x) {\n\n // if node has parent, match entered node positions to it's parent\n if (node.parent) {\n node.x = node.parent.x\n } else {\n node.x = 0\n }\n }\n\n // if node had parent, match entered node positions to it's parent\n if (!node.y) {\n if (node.parent) {\n node.y = node.parent.y\n } else {\n node.y = 0\n }\n }\n\n // recursively do the same for children\n if (node.children) {\n let offset = (max - min) / node.children.length\n node.children.forEach(function (child, i) {\n let newMin = min + (offset * i)\n let newMax = newMin + offset\n\n recurse(child, newMin, newMax)\n })\n }\n }\n }\n }\n\n // https://github.com/bumbeishvili/d3js-boilerplates#orderby\n Array.prototype.orderBy = function (func) {\n this.sort((_a, _b) => {\n let a = func(_a)\n let b = func(_b)\n if (typeof a === \"string\" || a instanceof String) {\n return a.localeCompare(b)\n }\n return a - b\n })\n\n return this\n }\n\n // ########################## BOILEPLATE STUFF ################\n\n // dinamic keys functions\n Object.keys(attrs).forEach((key) => {\n // Attach variables to main function\n return main[key] = function (_) {\n let string = `attrs['${key}'] = _`\n\n if (!arguments.length) {\n return eval(` attrs['${key}'];`)\n }\n\n eval(string)\n\n return main\n }\n })\n\n // set attrs as property\n main.attrs = attrs\n\n // debugging visuals\n main.debug = function (isDebug) {\n attrs.isDebug = isDebug\n if (isDebug) {\n if (!window.charts) {\n window.charts = []\n }\n window.charts.push(main)\n }\n return main\n }\n\n // exposed update functions\n main.data = function (value) {\n if (!arguments.length) {\n return attrs.data\n }\n\n attrs.data = value\n if (typeof updateData === \"function\") {\n updateData()\n }\n return main\n }\n\n // run visual\n main.run = function () {\n d3.selectAll(attrs.container)\n .call(main)\n return main\n }\n\n main.filter = function (filterParams) {\n if (!arguments.length) {\n return attrs.filterParams\n }\n\n attrs.filterParams = filterParams\n if (typeof filter === \"function\") {\n filter()\n }\n return main\n }\n\n main.reset = function () {\n\n hierarchy.root.children.forEach((e) => collapse(e, true))\n main.run()\n\n return main\n }\n\n return main\n }\n\n // initialization\n $orgChartContainer.each((i, container) => {\n\n let $container = $(container)\n let width = $container.width()\n let height = width / (16 / 9)\n\n d3.json($container.data(\"url\")).then((data) => {\n // Make a fake previous node if the data entry is not hierarchical\n if (data instanceof Array) {\n fake = true\n dataDepicted = {\n name: null,\n children: data\n }\n } else {\n dataDepicted = data\n }\n\n orgchart = renderChartCollapsibleNetwork()\n .svgHeight(height)\n .svgWidth(width)\n .fakeRoot(fake)\n .container(`#${container.id}`)\n .data({\n root: dataDepicted\n })\n .debug(true)\n .run()\n })\n })\n\n // reset\n $btnReset.click(function() {\n orgchart.reset()\n })\n}\n\n$(() => {\n renderChart(renderOrgCharts);\n})\n","/* eslint-disable require-jsdoc */\n// renderChart receives a chart function as argument and renders it\n// Also captures change.zf.tabs event and re-renders the chart\nexport default function renderChart(chart) {\n chart()\n $(document).on(\"change.zf.tabs\", () => {\n chart()\n });\n}\n","// 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// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = function(result, chunkIds, fn, priority) {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar chunkIds = deferred[i][0];\n\t\tvar fn = deferred[i][1];\n\t\tvar priority = deferred[i][2];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every(function(key) { return __webpack_require__.O[key](chunkIds[j]); })) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","__webpack_require__.p = \"/decidim-packs/\";","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t856: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = function(chunkId) { return installedChunks[chunkId] === 0; };\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = function(parentChunkLoadingFunction, data) {\n\tvar chunkIds = data[0];\n\tvar moreModules = data[1];\n\tvar runtime = data[2];\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some(function(id) { return installedChunks[id] !== 0; })) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkdecidim_parma\"] = self[\"webpackChunkdecidim_parma\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [4568,2856], function() { return __webpack_require__(12952); })\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["map","webpackContext","req","id","webpackContextResolve","__webpack_require__","o","e","Error","code","keys","Object","resolve","module","exports","require","$","on","this","hide","removeClass","show","addClass","renderOrgCharts","$orgChartContainer","$btnReset","dataDepicted","fake","orgchart","renderChartCollapsibleNetwork","params","attrs","concat","Math","floor","random","svgWidth","svgHeight","marginTop","marginBottom","marginRight","marginLeft","container","distance","hiddenChildLevel","hoverOpacity","maxTextDisplayZoomLevel","lineStrokeWidth","fakeRoot","nodeGutter","x","y","childrenIndicatorRadius","fakeBorderWidth","data","attrKeys","updateData","_collapse","_expand","filter","forEach","key","hierarchy","_main","main","selection","each","scope","calc","chartLeftMargin","chartTopMargin","chartWidth","chartHeight","root","d3","behaviors","drag","dragstarted","dragged","dragended","layouts","radial","force","link","d","charge","strength","center","collide","radius","base","bbox","width","height","sqrt","pow","children","depth","parent","projectCircle","proportion","simulation","arr","flatten","hidden","_children","svg","patternify","tag","selector","attr","chart","linksWrapper","nodesWrapper","links","nodes","update","clickedNode","nodesArr","orderBy","linksArr","source","target","selectAll","exit","remove","enter","append","merge","enteredNodes","nodeClick","nodeMouseEnter","nodeMouseLeave","call","text","name","getBBox","Boolean","length","ticked","maxXValueAvailable","value","max","min","maxYValueAvailable","fx","fy","connectedLinks","l","linkedNodes","s","c","n","indexOf","di","freeNodes","r","corner","PI","sin","cos","clustered","nodesArray","i","recurse","node","child","cluster","push","debug","isDebug","stringified","String","groupVariables","match","trim","v","eval","run","deep","arguments","undefined","restart","alphaTarget","offset","newMin","prototype","_params","elementTag","_data","Array","func","sort","_a","_b","a","b","localeCompare","_","string","window","charts","filterParams","reset","$container","then","click","renderChart","document","__webpack_module_cache__","deferred","moduleId","cachedModule","__webpack_modules__","m","O","result","chunkIds","fn","priority","notFulfilled","Infinity","fulfilled","j","every","splice","getter","__esModule","definition","defineProperty","enumerable","get","obj","prop","hasOwnProperty","p","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","some","chunkLoadingGlobal","self","bind","__webpack_exports__"],"sourceRoot":""}