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,EAAKC,IAAUb,OAAOc,UAAUC,eAAe1B,KAAKuB,EAAKC,G,MCKlF,IAAIG,EAAkB,CACrB,KAAM,GAaPlC,EAAoBS,EAAEQ,EAAKkB,GAA0C,IAA7BD,EAAgBC,GAGxD,IAAIC,EAAuB,CAACC,EAA4BC,KACvD,IAGIrC,EAAUkC,GAHTxB,EAAU4B,EAAaC,GAAWF,EAGhBvB,EAAI,EAC3B,GAAGJ,EAAS8B,MAAMC,GAAgC,IAAxBR,EAAgBQ,KAAa,CACtD,IAAIzC,KAAYsC,EACZvC,EAAoB6B,EAAEU,EAAatC,KACrCD,EAAoBQ,EAAEP,GAAYsC,EAAYtC,IAGhD,GAAGuC,EAAS,IAAI9B,EAAS8B,EAAQxC,EAClC,CAEA,IADGqC,GAA4BA,EAA2BC,GACrDvB,EAAIJ,EAAStD,OAAQ0D,IACzBoB,EAAUxB,EAASI,GAChBf,EAAoB6B,EAAEK,EAAiBC,IAAYD,EAAgBC,IACrED,EAAgBC,GAAS,KAE1BD,EAAgBC,GAAW,EAE5B,OAAOnC,EAAoBS,EAAEC,EAAO,EAGjCiC,EAAqBlB,WAA0C,8BAAIA,WAA0C,+BAAK,GACtHkB,EAAmBlE,QAAQ2D,EAAqBQ,KAAK,KAAM,IAC3DD,EAAmBpF,KAAO6E,EAAqBQ,KAAK,KAAMD,EAAmBpF,KAAKqF,KAAKD,G,KC7CvF,IAAIE,EAAsB7C,EAAoBS,OAAEN,EAAW,CAAC,OAAO,IAAOH,EAAoB,QAC9F6C,EAAsB7C,EAAoBS,EAAEoC,E","sources":["webpack://sakurairo-scripts/webpack/runtime/chunk loaded","webpack://sakurairo-scripts/./src/common/util.ts","webpack://sakurairo-scripts/./src/page-bilibilifav.ts","webpack://sakurairo-scripts/webpack/bootstrap","webpack://sakurairo-scripts/webpack/runtime/global","webpack://sakurairo-scripts/webpack/runtime/hasOwnProperty shorthand","webpack://sakurairo-scripts/webpack/runtime/jsonp chunk loading","webpack://sakurairo-scripts/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (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, fn, priority] = deferred[i];\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((key) => (__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};","let readyFunctionList = [];\n/**\n * 传入的函数同时间只能运行一个\n * @param func 要包装的函数\n * @returns 包装后的函数\n */\nexport const onlyOnceATime = (func) => {\n let isRunning = false;\n return (...args) => {\n if (!isRunning) {\n isRunning = true;\n try {\n const result = func(...args);\n if (result instanceof Promise) {\n result.finally(() => isRunning = false);\n }\n else {\n isRunning = false;\n }\n return result;\n }\n catch (e) {\n console.warn(e);\n isRunning = false;\n }\n }\n };\n};\nconst whileReady = () => {\n document.removeEventListener('DOMContentLoaded', whileReady);\n for (const fn of readyFunctionList) {\n fn();\n }\n readyFunctionList = [];\n};\n/**\n * 延迟函数到DOM树加载完成后执行\n * @seealso https://developer.mozilla.org/zh-CN/docs/Web/API/Document/readyState\n * @param fn 要延迟执行的函数\n */\nexport const ready = function (fn) {\n //interactive:等价于事件DOMContentLoaded\n //complete:等价于事件load\n if (document.readyState !== 'loading') {\n return fn();\n }\n if (readyFunctionList.length == 0) {\n document.addEventListener('DOMContentLoaded', whileReady, false);\n }\n readyFunctionList.push(fn);\n};\n/**\n * 获取文件名的主名部分(即去除扩展名)\n * @param fileName 文件名\n * @returns 主名\n */\nexport const getFileNameMain = (fileName) => fileName.replace(/\\.\\w+$/, '');\nexport function slideToggle(el, duration = 1000, mode = '', callback) {\n const dom = el;\n dom.status = dom.status || getComputedStyle(dom, null)['display'];\n const flag = dom.status != 'none';\n if ((flag == true && mode == \"show\") || (flag == false && mode == \"hide\"))\n return;\n dom.status = flag ? 'none' : 'block';\n dom.style.transition = 'height ' + duration / 1000 + 's';\n dom.style.overflow = 'hidden';\n clearTimeout(dom.tagTimer);\n dom.tagTimer = dom.tagTimer || null;\n dom.style.display = 'block';\n dom.tagHeight = dom.tagHeight || dom.clientHeight + 'px';\n dom.style.display = '';\n dom.style.height = flag ? dom.tagHeight : \"0px\";\n setTimeout(() => {\n dom.style.height = flag ? \"0px\" : dom.tagHeight;\n }, 0);\n dom.tagTimer = setTimeout(() => {\n dom.style.display = flag ? 'none' : 'block';\n dom.style.transition = '';\n dom.style.overflow = '';\n dom.style.height = '';\n dom.status = dom.tagHeight = null;\n }, duration);\n if (callback)\n callback();\n}\nexport function buildAPI(apiPath, params = {}, nonce = true) {\n const path = new URL(apiPath);\n const { searchParams } = path;\n for (const [key, value] of Object.entries(params)) {\n searchParams.set(key, value);\n }\n if (nonce)\n searchParams.set(\"_wpnonce\", _iro.nonce);\n return path.toString();\n}\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nexport function noop() { }\n","import { ready } from \"./common/util\";\nready(() => {\n function updateMaxHeightOfFolder(folder) {\n const folderStyle = getComputedStyle(folder);\n const folderContent = folder.querySelector(\".folder-content\");\n folder.style.maxHeight = parseInt(folderStyle.maxHeight) + folderContent.scrollHeight + 'px';\n }\n function handleClick({ currentTarget }) {\n const folder = currentTarget.closest('.folder');\n const folderStyle = getComputedStyle(folder);\n if (folderStyle.maxHeight === '200px') {\n currentTarget.innerText = '收起';\n updateMaxHeightOfFolder(folder);\n }\n else {\n currentTarget.innerText = '展开';\n folder.style.maxHeight = '200px';\n }\n }\n document.querySelectorAll('.expand-button').forEach((elem) => {\n elem.addEventListener('click', handleClick, true);\n });\n /* \t\t\t\twindow.addEventListener('resize', function() {\n expandButton.forEach(function(elem) {\n let folder = elem.closest('.folder');\n let folderStyle = getComputedStyle(folder);\n if (folderStyle.maxHeight !== '200px'){\n let folderContent = folder.querySelector(\".folder-content\");\n folder.style.maxHeight = parseInt(folderStyle.maxHeight) + folderContent.scrollHeight + 'px';\n }\n });\n }, true); */\n document.addEventListener('click', async (e) => {\n const elem = e.target;\n if (elem?.classList.contains('load-more')) {\n const resp = await fetch(elem.getAttribute('data-href') + \"&_wpnonce=\" + _iro.nonce, { method: 'POST' });\n const html = (await resp.json());\n const htmlObject = document.createElement('div');\n htmlObject.innerHTML = html;\n while (htmlObject.childNodes.length > 0) {\n elem.parentNode.appendChild(htmlObject.childNodes[0]);\n }\n updateMaxHeightOfFolder(elem.closest('.folder'));\n elem.remove();\n }\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].call(module.exports, 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","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// 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\t3173: 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 = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\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((id) => (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 = globalThis[\"webpackChunksakurairo_scripts\"] = globalThis[\"webpackChunksakurairo_scripts\"] || [];\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, [1920], () => (__webpack_require__(5799)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","readyFunctionList","whileReady","document","removeEventListener","fn","readyState","length","addEventListener","push","ready","updateMaxHeightOfFolder","folder","folderStyle","getComputedStyle","folderContent","querySelector","style","maxHeight","parseInt","scrollHeight","handleClick","_ref","currentTarget","closest","innerText","querySelectorAll","forEach","elem","async","e","target","classList","contains","resp","fetch","getAttribute","_iro","nonce","method","html","json","htmlObject","createElement","innerHTML","childNodes","parentNode","appendChild","remove","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","call","m","O","result","chunkIds","priority","notFulfilled","Infinity","i","fulfilled","j","Object","keys","every","key","splice","r","g","globalThis","this","Function","window","o","obj","prop","prototype","hasOwnProperty","installedChunks","chunkId","webpackJsonpCallback","parentChunkLoadingFunction","data","moreModules","runtime","some","id","chunkLoadingGlobal","bind","__webpack_exports__"],"sourceRoot":""}