moodle_local_treestudyplan/amd/build/portal-vue/portal-vue.esm.min.js.map

1 line
25 KiB
Text
Raw Normal View History

{"version":3,"file":"portal-vue.esm.min.js","sources":["../../src/portal-vue/portal-vue.esm.js"],"sourcesContent":["/* eslint-disable */\n /*! \n * portal-vue © Thorsten Lünborg, 2019 \n * \n * Version: 2.1.7\n * \n * LICENCE: MIT \n * \n * https://github.com/linusborg/portal-vue\n * \n */\n\n/* Modification by PMKuipers to handle relative loading of vue */\nimport Vue from '../vue/vue';\n/* End modification */\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nvar inBrowser = typeof window !== 'undefined';\nfunction freeze(item) {\n if (Array.isArray(item) || _typeof(item) === 'object') {\n return Object.freeze(item);\n }\n\n return item;\n}\nfunction combinePassengers(transports) {\n var slotProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return transports.reduce(function (passengers, transport) {\n var temp = transport.passengers[0];\n var newPassengers = typeof temp === 'function' ? temp(slotProps) : transport.passengers;\n return passengers.concat(newPassengers);\n }, []);\n}\nfunction stableSort(array, compareFn) {\n return array.map(function (v, idx) {\n return [idx, v];\n }).sort(function (a, b) {\n return compareFn(a[1], b[1]) || a[0] - b[0];\n }).map(function (c) {\n return c[1];\n });\n}\nfunction pick(obj, keys) {\n return keys.reduce(function (acc, key) {\n if (obj.hasOwnProperty(key)) {\n acc[key] = obj[key];\n }\n\n return acc;\n }, {});\n}\n\nvar transports = {};\nvar targets = {};\nvar sources = {};\nvar Wormhole = Vue.extend({\n data: function data() {\n return {\n transports: transports,\n targets: targets,\n sources: sources,\n trackInstances: inBrowser\n };\n },\n methods: {\n open: function open(transport) {\n if (!inBrowser) return;\n var to = transport.to,\n from = transport.from,\n passengers = transport.passengers,\n _transport$order = transport.order,\n order = _transport$order === void 0 ? Infinity : _transport$order;\n if (!to || !from || !passengers) return;\n var newTransport = {\n to: to,\n from: from,\n passengers: freeze(passengers),\n order: order\n };\n var keys = Object.keys(this.transports);\n\n if (keys.indexOf(to) === -1) {\n Vue.set(this.transports, to, []);\n }\n\n var currentIndex = this.$_getTransportIndex(newTransport); // Copying the array here so that the PortalTarget change event will actually contain two distinct arrays\n\n var newTransports = this.transports[to].slice(0);\n\n if (currentIndex === -1) {\n newTransports.push(newTransport);\n } else {\n newTransports[currentIndex] = newTransport;\n }\n\n this.transports[to] = stableSort(newTransports, function (a, b) {\n return a.order - b.order;\n });\n },\n close: function close(transport) {\n var force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var to = transport.to,\n from = transport.from;\n if (!to || !from && force === false) return;\n\n