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AK,IAAI;YAAA,IAAI,MAAM;QACxC;IACD;IACA,MAAM,YAAY;IAClB,UAAU,QAAQ,GAAG,SAAS,GAAG,IAAI,EAAE;QACtC,MAAM,YAAY,OAAO,IAAI;QAC7B,IAAI;QACJ,OAAO;YACN,QAAO;gBACN,IAAG,SACF,OAAO;gBAER,UAAU,IAAI;gBACd,OAAO,aAAa;YACrB;YACA,CAAC,OAAO,QAAQ,CAAC,IAAG;gBACnB,OAAO,IAAI;YACZ;QACD;IACD;IACA,OAAO;AACR","sources":["src/index.js"],"sourcesContent":["/* MIT License\r\nCopyright (c) 2016-2023 Simon Y. Blackwell & 2019 Ophir LOJKINE\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining a copy\r\nof this software and associated documentation files (the \"Software\"), to deal\r\nin the Software without restriction, including without limitation the rights\r\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\ncopies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in all\r\ncopies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\nSOFTWARE.\r\n */\r\n\r\n/* Portions of algorithm taken from https://github.com/lovasoa/fast_array_intersect under MIT license */\r\n\r\nfunction intersector(key) {\r\n\tconst getKey = typeof (key) === \"string\" ? ((value) => value && typeof (value) === \"object\" && value[key] !== undefined ? value[key] : value) : null;\r\n\tconst create = (iterating) => {\r\n\t\tlet i = 0, j, len, nOthers, args, result, memory;\r\n\t\treturn function() {\r\n\t\t\tif(!args) {\r\n\t\t\t\targs = [].sort.call(arguments,(a,b) => a.length - b.length);\r\n\t\t\t\tnOthers = args.length - 1;\r\n\t\t\t\tresult = [];\r\n\t\t\t\tmemory = new Map();\r\n\t\t\t\ti = 0;\r\n\t\t\t\tj = 0;\r\n\t\t\t}\r\n\t\t\tfor(;i<=nOthers;i++) {\r\n\t\t\t\t//j = j===-1 ? arguments[i].length : j;\r\n\t\t\t\tconst len = args[i].length;\r\n\t\t\t\twhile(j<len) {\r\n\t\t\t\t\tconst elem = args[i][j],\r\n\t\t\t\t\t\tkey = getKey ? getKey(elem) : elem;\r\n\t\t\t\t\tif (memory.get(key) === i - 1) {\r\n\t\t\t\t\t\tif(i===nOthers) {\r\n\t\t\t\t\t\t\tresult[result.length] = elem;\r\n\t\t\t\t\t\t\tmemory.set(key,0);\r\n\t\t\t\t\t\t\tif(iterating) {\r\n\t\t\t\t\t\t\t\tj++;\r\n\t\t\t\t\t\t\t\treturn {value:elem}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tmemory.set(key,i)\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else if (i === 0) {\r\n\t\t\t\t\t\tmemory.set(key,0);\r\n\t\t\t\t\t}\r\n\t\t\t\t\tj++;\r\n\t\t\t\t}\r\n\t\t\t\tj=0;\r\n\t\t\t}\r\n\t\t\targs = null;\r\n\t\t\treturn iterating ? {done:true} : result;\r\n\t\t}\r\n\t}\r\n\tconst intersect = create();\r\n\tintersect.iterable = function(...args) {\r\n\t\tconst intersect = create(true);\r\n\t\tlet started;\r\n\t\treturn {\r\n\t\t\tnext() {\r\n\t\t\t\tif(started) {\r\n\t\t\t\t\treturn intersect();\r\n\t\t\t\t}\r\n\t\t\t\tstarted = true;\r\n\t\t\t\treturn intersect(...args);\r\n\t\t\t},\r\n\t\t\t[Symbol.iterator]() {\r\n\t\t\t\treturn this;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn intersect;\r\n}\r\n\r\nexport {intersector,intersector as default};\r\n\r\n"],"names":[],"version":3,"file":"index.js.map"}