photos/js/photos-src_utils_Cancelable...

1 line
30 KiB
Plaintext

{"version":3,"file":"photos-src_utils_CancelableRequest_js-node_modules_vue-material-design-icons_Send_vue-src_components-ed1dc2.js?v=1d232c0555ae9ad46c62","mappings":"2VA+DA,QAzB0B,SAASA,GAIlC,IAAMC,EAZyBC,EAAAA,EAAAA,YAAAA,SAoBzBC,EAAK,e,EAAA,G,EAAA,yBAAG,WAAeC,EAAKC,GAApB,yGACNL,EACNI,EACAE,OAAOC,OAAO,CAAEN,YAAaA,EAAYO,OAASH,KAHtC,0C,+KAAH,wDAOX,MAAO,CACNL,QAASG,EACTM,OAAQR,EAAYQ,OAErB,C,sEC1DGC,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,oCAAqC,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,yCAAyC,MAAQ,GAAG,SAAW,4BAA4B,eAAiB,CAAC,kqBAAkvB,WAAa,MAEr9B,S,sECJIH,E,MAA0B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,GAAI,0HAA2H,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,mDAAmD,MAAQ,GAAG,SAAW,+CAA+C,eAAiB,CAAC,2vCAA20C,WAAa,MAEjqD,S,mCCaA,MCpBwG,EDoBxG,CACEC,KAAM,WACNC,MAAO,CAAC,SACRC,MAAO,CACLC,MAAO,CACLC,KAAMC,QAERC,UAAW,CACTF,KAAMC,OACNE,QAAS,gBAEXC,KAAM,CACJJ,KAAMK,OACNF,QAAS,MEff,SAXgB,E,SAAA,GACd,GCRW,WAAa,IAAIG,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,OAAOJ,EAAIM,GAAG,CAACC,YAAY,iCAAiCC,MAAM,CAAC,eAAeR,EAAIP,MAAM,aAAaO,EAAIP,MAAM,KAAO,OAAOgB,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAOV,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I0B,cAAc1B,EAAIa,GAAG,KAAKb,EAAIqB,GAAG,WAAW,GAAtajB,EAAG,MAAM,CAACoB,IAAI,YAAYjB,YAAY,gBAAgB,CAACH,EAAG,MAAM,CAACoB,IAAI,gBAAgBjB,YAAY,oBAAoBkB,MAAOzB,EAAsB,oBAAG,CAACA,EAAIqB,GAAG,UAAU,KAAK,CAAC,aAAerB,EAAI0B,cAAc1B,EAAIa,GAAG,KAAKb,EAAIqB,GAAG,WAAW,IAA4L,GACpiB,IIWpB,EACA,KACA,WACA,MAI8B,O","sources":["webpack:///photos/src/utils/CancelableRequest.js","webpack:///photos/src/components/Loader.vue?vue&type=style&index=0&lang=scss&","webpack:///photos/src/components/VirtualScrolling.vue?vue&type=style&index=0&id=5e8733b7&scoped=true&lang=scss&","webpack:///photos/node_modules/vue-material-design-icons/Send.vue","webpack:///photos/node_modules/vue-material-design-icons/Send.vue?vue&type=script&lang=js&","webpack://photos/./node_modules/vue-material-design-icons/Send.vue?0295","webpack:///photos/node_modules/vue-material-design-icons/Send.vue?vue&type=template&id=46f29e66&","webpack:///photos/src/components/Loader.vue","webpack:///photos/src/components/Loader.vue?vue&type=script&lang=js&","webpack://photos/./src/components/Loader.vue?eb1b","webpack://photos/./src/components/Loader.vue?5508","webpack:///photos/src/components/Loader.vue?vue&type=template&id=7bbb2dd6&","webpack:///photos/src/components/VirtualScrolling.vue?vue&type=template&id=5e8733b7&scoped=true&","webpack:///photos/src/components/VirtualScrolling.vue","webpack:///photos/src/components/VirtualScrolling.vue?vue&type=script&lang=js&","webpack://photos/./src/components/VirtualScrolling.vue?876f","webpack://photos/./src/components/VirtualScrolling.vue?6e3f"],"sourcesContent":["/**\n * @copyright Copyright (c) 2019 Marco Ambrosini <marcoambrosini@pm.me>\n *\n * @author Marco Ambrosini <marcoambrosini@pm.me>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @license AGPL-3.0-or-later\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as\n * published by the Free Software Foundation, either version 3 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n *\n */\n\nimport axios from '@nextcloud/axios'\n/**\n * Create a cancel token\n *\n * @return {CancelTokenSource}\n */\nconst createCancelToken = () => axios.CancelToken.source()\n\n/**\n * Creates a cancelable axios 'request object'.\n *\n * @param {Function} request the axios promise request\n * @return {object}\n */\nconst CancelableRequest = function(request) {\n\t/**\n\t * Generate an axios cancel token\n\t */\n\tconst cancelToken = createCancelToken()\n\n\t/**\n\t * Execute the request\n\t *\n\t * @param {string} url the url to send the request to\n\t * @param {object} [options] optional config for the request\n\t */\n\tconst fetch = async function(url, options) {\n\t\treturn request(\n\t\t\turl,\n\t\t\tObject.assign({ cancelToken: cancelToken.token }, options)\n\t\t)\n\t}\n\n\treturn {\n\t\trequest: fetch,\n\t\tcancel: cancelToken.cancel,\n\t}\n}\n\nexport default CancelableRequest\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".loader{display:grid;height:60px}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/Loader.vue\"],\"names\":[],\"mappings\":\"AAsCA,QACC,YAAA,CACA,WAAA\",\"sourcesContent\":[\"$sizes: (\\\"400\\\": (\\\"count\\\": 3, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"700\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"1024\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1280\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1440\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"1600\\\": (\\\"count\\\": 6, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2048\\\": (\\\"count\\\": 7, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2560\\\": (\\\"count\\\": 8, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"3440\\\": (\\\"count\\\": 9, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"max\\\": (\\\"count\\\": 10, \\\"marginTop\\\": 88, \\\"marginW\\\": 88));\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n.loader {\\n\\tdisplay: grid;\\n\\theight: 60px;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".vs-container[data-v-5e8733b7]{overflow-y:scroll;height:100%}.vs-rows-container[data-v-5e8733b7]{box-sizing:border-box}\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/VirtualScrolling.vue\"],\"names\":[],\"mappings\":\"AAkTA,+BACC,iBAAA,CACA,WAAA,CAGD,oCACC,qBAAA\",\"sourcesContent\":[\"$sizes: (\\\"400\\\": (\\\"count\\\": 3, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"700\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 8), \\\"1024\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1280\\\": (\\\"count\\\": 4, \\\"marginTop\\\": 66, \\\"marginW\\\": 44), \\\"1440\\\": (\\\"count\\\": 5, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"1600\\\": (\\\"count\\\": 6, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2048\\\": (\\\"count\\\": 7, \\\"marginTop\\\": 88, \\\"marginW\\\": 66), \\\"2560\\\": (\\\"count\\\": 8, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"3440\\\": (\\\"count\\\": 9, \\\"marginTop\\\": 88, \\\"marginW\\\": 88), \\\"max\\\": (\\\"count\\\": 10, \\\"marginTop\\\": 88, \\\"marginW\\\": 88));\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n.vs-container {\\n\\toverflow-y: scroll;\\n\\theight: 100%;\\n}\\n\\n.vs-rows-container {\\n\\tbox-sizing: border-box;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","<template>\n <span v-bind=\"$attrs\"\n :aria-hidden=\"!title\"\n :aria-label=\"title\"\n class=\"material-design-icon send-icon\"\n role=\"img\"\n @click=\"$emit('click', $event)\">\n <svg :fill=\"fillColor\"\n class=\"material-design-icon__svg\"\n :width=\"size\"\n :height=\"size\"\n viewBox=\"0 0 24 24\">\n <path d=\"M2,21L23,12L2,3V10L17,12L2,14V21Z\">\n <title v-if=\"title\">{{ title }}</title>\n </path>\n </svg>\n </span>\n</template>\n\n<script>\nexport default {\n name: \"SendIcon\",\n emits: ['click'],\n props: {\n title: {\n type: String,\n },\n fillColor: {\n type: String,\n default: \"currentColor\"\n },\n size: {\n type: Number,\n default: 24\n }\n }\n}\n</script>","import mod from \"-!../vue-loader/lib/index.js??vue-loader-options!./Send.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../vue-loader/lib/index.js??vue-loader-options!./Send.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./Send.vue?vue&type=template&id=46f29e66&\"\nimport script from \"./Send.vue?vue&type=script&lang=js&\"\nexport * from \"./Send.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('span',_vm._b({staticClass:\"material-design-icon send-icon\",attrs:{\"aria-hidden\":!_vm.title,\"aria-label\":_vm.title,\"role\":\"img\"},on:{\"click\":function($event){return _vm.$emit('click', $event)}}},'span',_vm.$attrs,false),[_c('svg',{staticClass:\"material-design-icon__svg\",attrs:{\"fill\":_vm.fillColor,\"width\":_vm.size,\"height\":_vm.size,\"viewBox\":\"0 0 24 24\"}},[_c('path',{attrs:{\"d\":\"M2,21L23,12L2,3V10L17,12L2,14V21Z\"}},[(_vm.title)?_c('title',[_vm._v(_vm._s(_vm.title))]):_vm._e()])])])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2020 Corentin Mors\n -\n - @license AGPL-3.0-or-later\n -\n - @author Corentin Mors <medias@pixelswap.fr>\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<div class=\"loader\">\n\t\t<slot name=\"icon\">\n\t\t\t<span class=\"icon-loading\" />\n\t\t</slot>\n\t</div>\n</template>\n\n<script>\nexport default {\n\tname: 'Loader',\n}\n</script>\n\n<style lang=\"scss\">\n.loader {\n\tdisplay: grid;\n\theight: 60px;\n}\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Loader.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Loader.vue?vue&type=script&lang=js&\"","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Loader.vue?vue&type=style&index=0&lang=scss&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Loader.vue?vue&type=style&index=0&lang=scss&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./Loader.vue?vue&type=template&id=7bbb2dd6&\"\nimport script from \"./Loader.vue?vue&type=script&lang=js&\"\nexport * from \"./Loader.vue?vue&type=script&lang=js&\"\nimport style0 from \"./Loader.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"loader\"},[_vm._t(\"icon\",function(){return [_c('span',{staticClass:\"icon-loading\"})]})],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (!_vm.useWindow && _vm.containerElement === null)?_c('div',{ref:\"container\",staticClass:\"vs-container\"},[_c('div',{ref:\"rowsContainer\",staticClass:\"vs-rows-container\",style:(_vm.rowsContainerStyle)},[_vm._t(\"default\",null,{\"renderedRows\":_vm.visibleRows}),_vm._v(\" \"),_vm._t(\"loader\")],2)]):_c('div',{ref:\"rowsContainer\",staticClass:\"vs-rows-container\",style:(_vm.rowsContainerStyle)},[_vm._t(\"default\",null,{\"renderedRows\":_vm.visibleRows}),_vm._v(\" \"),_vm._t(\"loader\")],2)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!--\n - @copyright Copyright (c) 2022 Louis Chemineau <louis@chmn.me>\n -\n - @author Louis Chemineau <louis@chmn.me>\n -\n - @license AGPL-3.0-or-later\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n<template>\n\t<div v-if=\"!useWindow && containerElement === null\" ref=\"container\" class=\"vs-container\">\n\t\t<div ref=\"rowsContainer\"\n\t\t\tclass=\"vs-rows-container\"\n\t\t\t:style=\"rowsContainerStyle\">\n\t\t\t<slot :rendered-rows=\"visibleRows\" />\n\t\t\t<slot name=\"loader\" />\n\t\t</div>\n\t</div>\n\t<div v-else\n\t\tref=\"rowsContainer\"\n\t\tclass=\"vs-rows-container\"\n\t\t:style=\"rowsContainerStyle\">\n\t\t<slot :rendered-rows=\"visibleRows\" />\n\t\t<slot name=\"loader\" />\n\t</div>\n</template>\n\n<script>\nimport { debounce } from 'debounce'\n\nimport logger from '../services/logger.js'\n/**\n * @typedef {object} Row\n * @property {number} height - The height of the row.\n */\n\n/**\n * @typedef {Row} VisibleRow\n * @property {'none'|'near'|'visible'} visibility - The visibility state of the row\n * @property {boolean} shouldRender - Whether the row should be renderer in the DOM\n */\n\nexport default {\n\tname: 'VirtualScrolling',\n\n\tprops: {\n\t\trows: {\n\t\t\ttype: Array,\n\t\t\trequired: true,\n\t\t},\n\n\t\tcontainerElement: {\n\t\t\ttype: HTMLElement,\n\t\t\tdefault: null,\n\t\t},\n\n\t\tuseWindow: {\n\t\t\ttype: Boolean,\n\t\t\tdefault: false,\n\t\t},\n\n\t\trenderWindowRatio: {\n\t\t\ttype: Number,\n\t\t\tdefault: 4,\n\t\t},\n\t\twillBeVisibleWindowRatio: {\n\t\t\ttype: Number,\n\t\t\tdefault: 4,\n\t\t},\n\t\tvisibleWindowRatio: {\n\t\t\ttype: Number,\n\t\t\t// A little bit more than the container's height to include items at its edges.\n\t\t\tdefault: 0,\n\t\t},\n\t\tbottomBufferRatio: {\n\t\t\ttype: Number,\n\t\t\tdefault: 5,\n\t\t},\n\t\tscrollToKey: {\n\t\t\ttype: String,\n\t\t\tdefault: '',\n\t\t},\n\t},\n\n\tdata() {\n\t\treturn {\n\t\t\tscrollPosition: 0,\n\t\t\tcontainerHeight: 0,\n\t\t\trowsContainerHeight: 0,\n\t\t\t/** @type {ResizeObserver} */\n\t\t\tresizeObserver: null,\n\t\t}\n\t},\n\n\tcomputed: {\n\t\t/**\n\t\t * @return {VisibleRow[]}\n\t\t */\n\t\tvisibleRows() {\n\t\t\tlogger.debug('[VirtualScrolling] Computing visible rows', this.rows)\n\n\t\t\t// Optimisation: get those computed properties once to not go through vue's internal every time we need them.\n\t\t\tconst scrollPosition = this.scrollPosition\n\t\t\tconst containerHeight = this.containerHeight\n\n\t\t\t// Optimisation: different windows to hint the items how they should render themselves.\n\t\t\t// This will be forwarded with the visibility props.\n\t\t\tconst shouldRenderedWindow = containerHeight * this.renderWindowRatio\n\t\t\tconst willBeVisibleWindow = containerHeight * this.willBeVisibleWindowRatio\n\t\t\tconst visibleWindow = containerHeight * this.visibleWindowRatio\n\n\t\t\tlet currentRowTopDistanceFromTop = 0\n\t\t\tlet currentRowBottomDistanceFromTop = 0\n\n\t\t\t// Compute whether a row should be included in the DOM (shouldRender)\n\t\t\t// And how visible the row is.\n\t\t\treturn this.rows\n\t\t\t\t.reduce((visibleRows, row) => {\n\t\t\t\t\tcurrentRowTopDistanceFromTop = currentRowBottomDistanceFromTop\n\t\t\t\t\tcurrentRowBottomDistanceFromTop += row.height\n\n\t\t\t\t\tif (currentRowTopDistanceFromTop < scrollPosition - shouldRenderedWindow || scrollPosition + containerHeight + shouldRenderedWindow < currentRowTopDistanceFromTop) {\n\t\t\t\t\t\treturn visibleRows\n\t\t\t\t\t}\n\n\t\t\t\t\tlet visibility = 'none'\n\n\t\t\t\t\tif (scrollPosition - willBeVisibleWindow < currentRowTopDistanceFromTop && currentRowTopDistanceFromTop < scrollPosition + containerHeight + willBeVisibleWindow) {\n\t\t\t\t\t\tvisibility = 'near'\n\n\t\t\t\t\t\tif (scrollPosition - visibleWindow < currentRowTopDistanceFromTop && currentRowTopDistanceFromTop < scrollPosition + containerHeight + visibleWindow) {\n\t\t\t\t\t\t\tvisibility = 'visible'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (scrollPosition - visibleWindow < currentRowBottomDistanceFromTop && currentRowBottomDistanceFromTop < scrollPosition + containerHeight + visibleWindow) {\n\t\t\t\t\t\t\tvisibility = 'visible'\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\treturn [\n\t\t\t\t\t\t...visibleRows,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t...row,\n\t\t\t\t\t\t\tvisibility,\n\t\t\t\t\t\t},\n\t\t\t\t\t]\n\t\t\t\t}, [])\n\t\t},\n\n\t\t/**\n\t\t * Total height of all the rows + some room for the loader.\n\t\t *\n\t\t * @return {number}\n\t\t */\n\t\trowsHeight() {\n\t\t\tconst loaderHeight = 200\n\n\t\t\treturn this.rows\n\t\t\t\t.map(row => row.height)\n\t\t\t\t.reduce((totalHeight, rowHeight) => totalHeight + rowHeight, 0) + loaderHeight\n\t\t},\n\n\t\t/**\n\t\t * @return {number}\n\t\t */\n\t\tpaddingTop() {\n\t\t\tif (this.visibleRows.length === 0) {\n\t\t\t\treturn 0\n\t\t\t}\n\n\t\t\tconst firstVisibleRowIndex = this.rows.findIndex(row => row.items === this.visibleRows[0].items)\n\n\t\t\treturn this.rows\n\t\t\t\t.map(row => row.height)\n\t\t\t\t.slice(0, firstVisibleRowIndex)\n\t\t\t\t.reduce((totalHeight, rowHeight) => totalHeight + rowHeight, 0)\n\t\t},\n\n\t\t/**\n\t\t * padding-top is used to replace not included item in the container.\n\t\t *\n\t\t * @return {object}\n\t\t */\n\t\trowsContainerStyle() {\n\t\t\treturn {\n\t\t\t\theight: `${this.rowsHeight}px`,\n\t\t\t\tpaddingTop: `${this.paddingTop}px`,\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Whether the user is near the bottom.\n\t\t * If true, then the need-content event will be emitted.\n\t\t *\n\t\t * @return {boolean}\n\t\t */\n\t\tisNearBottom() {\n\t\t\tconst buffer = this.containerHeight * this.bottomBufferRatio\n\t\t\treturn this.scrollPosition + this.containerHeight >= this.rowsHeight - buffer\n\t\t},\n\n\t\t/**\n\t\t * @return {HTMLElement}\n\t\t */\n\t\tcontainer() {\n\t\t\tlogger.debug('[VirtualScrolling] Computing container')\n\t\t\tif (this.containerElement !== null) {\n\t\t\t\treturn this.containerElement\n\t\t\t} else if (this.useWindow) {\n\t\t\t\treturn window\n\t\t\t} else {\n\t\t\t\treturn this.$refs.container\n\t\t\t}\n\t\t},\n\t},\n\n\twatch: {\n\t\tisNearBottom(value) {\n\t\t\tif (value) {\n\t\t\t\tthis.$emit('need-content')\n\t\t\t}\n\t\t},\n\n\t\trows() {\n\t\t\t// Re-emit need-content when rows is updated and isNearBottom is still true.\n\t\t\t// If the height of added rows is under `bottomBufferRatio`, `isNearBottom` will still be true so we need more content.\n\t\t\tif (this.isNearBottom) {\n\t\t\t\tthis.$emit('need-content')\n\t\t\t}\n\t\t},\n\n\t\tscrollToKey(key) {\n\t\t\tlet currentRowTopDistanceFromTop = 0\n\t\t\tfor (const row of this.rows) {\n\t\t\t\tif (row.key === key) {\n\t\t\t\t\tthis.$refs.container.scrollTo({ top: currentRowTopDistanceFromTop, behavior: 'smooth' })\n\t\t\t\t\treturn\n\t\t\t\t}\n\n\t\t\t\tcurrentRowTopDistanceFromTop += row.height\n\t\t\t}\n\t\t},\n\t},\n\n\tmounted() {\n\t\tthis.resizeObserver = new ResizeObserver(entries => {\n\t\t\tfor (const entry of entries) {\n\t\t\t\tconst cr = entry.contentRect\n\t\t\t\tif (entry.target.classList.contains('vs-container')) {\n\t\t\t\t\tthis.containerHeight = cr.height\n\t\t\t\t}\n\t\t\t\tif (entry.target.classList.contains('vs-rows-container')) {\n\t\t\t\t\tthis.rowsContainerHeight = cr.height\n\t\t\t\t}\n\t\t\t}\n\t\t})\n\n\t\tif (this.useWindow) {\n\t\t\twindow.addEventListener('resize', this.updateContainerSize)\n\t\t\tthis.containerHeight = window.innerHeight\n\t\t} else {\n\t\t\tthis.resizeObserver.observe(this.container)\n\t\t}\n\n\t\tthis.resizeObserver.observe(this.$refs.rowsContainer)\n\t\tthis.container.addEventListener('scroll', this.updateScrollPosition)\n\t},\n\n\tbeforeDestroy() {\n\t\tif (this.useWindow) {\n\t\t\twindow.removeEventListener('resize', this.updateContainerSize)\n\t\t}\n\n\t\tthis.resizeObserver.disconnect()\n\t\tthis.container.removeEventListener('scroll', this.updateScrollPosition)\n\t},\n\n\tmethods: {\n\t\tupdateScrollPosition: debounce(function() {\n\t\t\tif (this.useWindow) {\n\t\t\t\tthis.scrollPosition = this.container.scrollY\n\t\t\t} else {\n\t\t\t\tthis.scrollPosition = this.container.scrollTop\n\t\t\t}\n\t\t}, 200),\n\n\t\tupdateContainerSize() {\n\t\t\tthis.containerHeight = window.innerHeight\n\t\t},\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n.vs-container {\n\toverflow-y: scroll;\n\theight: 100%;\n}\n\n.vs-rows-container {\n\tbox-sizing: border-box;\n}\n</style>\n","import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VirtualScrolling.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VirtualScrolling.vue?vue&type=script&lang=js&\"","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VirtualScrolling.vue?vue&type=style&index=0&id=5e8733b7&scoped=true&lang=scss&\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/dist/cjs.js!../../node_modules/sass-loader/dist/cjs.js??clonedRuleSet-2[0].rules[0].use[3]!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VirtualScrolling.vue?vue&type=style&index=0&id=5e8733b7&scoped=true&lang=scss&\";\n export default content && content.locals ? content.locals : undefined;\n","import { render, staticRenderFns } from \"./VirtualScrolling.vue?vue&type=template&id=5e8733b7&scoped=true&\"\nimport script from \"./VirtualScrolling.vue?vue&type=script&lang=js&\"\nexport * from \"./VirtualScrolling.vue?vue&type=script&lang=js&\"\nimport style0 from \"./VirtualScrolling.vue?vue&type=style&index=0&id=5e8733b7&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"5e8733b7\",\n null\n \n)\n\nexport default component.exports"],"names":["request","cancelToken","axios","fetch","url","options","Object","assign","token","cancel","___CSS_LOADER_EXPORT___","push","module","id","name","emits","props","title","type","String","fillColor","default","size","Number","_vm","this","_h","$createElement","_c","_self","_b","staticClass","attrs","on","$event","$emit","$attrs","_v","_s","_e","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","_t","useWindow","containerElement","ref","style","visibleRows"],"sourceRoot":""}