!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["video/download/mpv-output-playlist"]=t():e["video/download/mpv-output-playlist"]=t()}(globalThis,(()=>(()=>{var e={552:(e,t,n)=>{var o=n(218)((function(e){return e[1]}));o.push([e.id,".rpc-config.download-video-config-section {\n display: flex;\n align-items: center;\n flex-direction: column;\n align-items: stretch;\n}\n.rpc-config.download-video-config-section > * {\n display: flex;\n align-items: center;\n}\n.rpc-config.download-video-config-section > *:not(:last-child) {\n margin-bottom: 12px;\n}",""]),e.exports=o},218:e=>{"use strict"; // eslint-disable-next-line func-names e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=e(t);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")}, // eslint-disable-next-line func-names t.i=function(e,n,o){"string"==typeof e&&( // eslint-disable-next-line no-param-reassign e=[[null,e,""]]);var i={};if(o)for(var r=0;r{"use strict";n.r(t),n.d(t,{default:()=>m});var o=function(){var e=this,t=e._self._c;e._self._setupProxy;return t("div",{staticClass:"rpc-config download-video-config-section"},[t("div",{staticClass:"profile-dir"},[t("div",{staticClass:"profile-item-name"},[e._v("命令路径:")]),e._v(" "),t("TextBox",{on:{blur:e.saveInfo},model:{value:e.mpvInfo.dir,callback:function(t){e.$set(e.mpvInfo,"dir",t)},expression:"mpvInfo.dir"}})],1),e._v(" "),t("div",{staticClass:"profile-host"},[t("div",{staticClass:"profile-item-name"},[e._v("主机:")]),e._v(" "),t("TextBox",{on:{blur:e.saveInfo},model:{value:e.mpvInfo.host,callback:function(t){e.$set(e.mpvInfo,"host",t)},expression:"mpvInfo.host"}})],1),e._v(" "),t("div",{staticClass:"profile-port"},[t("div",{staticClass:"profile-item-name"},[e._v("端口:")]),e._v(" "),t("TextBox",{on:{blur:e.saveInfo},model:{value:e.mpvInfo.port,callback:function(t){e.$set(e.mpvInfo,"port",t)},expression:"mpvInfo.port"}})],1)])};o._withStripped=!0;const i=coreApis.settings,r=coreApis.ui,{options:s}=(0,i.getComponentSettings)("downloadVideo"),a={dir:"mpv",host:"127.0.0.1",port:"50000",...s},c=Vue.extend({components:{TextBox:r.TextBox},data:()=>({mpvInfo:a}),methods:{saveInfo(){Object.assign(s,a)}}});var l=n(332),d=n.n(l),p=n(552),u=n.n(p),f={insert:"head",singleton:!1};d()(u(),f);u().locals;var v=function(e,t,n,o,i,r,s,a){var c,l="function"==typeof e?e.options:e;if(t&&(l.render=t,l.staticRenderFns=n,l._compiled=!0),o&&(l.functional=!0),r&&(l._scopeId="data-v-"+r),s?(c=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),i&&i.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},l._ssrRegister=c):i&&(c=a?function(){i.call(this,(l.functional?this.parent:this).$root.$options.shadowRoot)}:i),c)if(l.functional){l._injectStyles=c;var d=l.render;l.render=function(e,t){return c.call(t),d(e,t)}}else{var p=l.beforeCreate;l.beforeCreate=p?[].concat(p,c):[c]}return{exports:e,options:l}}(c,o,[],!1,null,null,null);const m=v.exports},332:(e,t,n)=>{"use strict";var o,i=function(){return void 0===o&&( // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 // @see https://github.com/webpack-contrib/style-loader/issues/177 o=Boolean(window&&document&&document.all&&!window.atob)),o},r=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),s=[];function a(e){for(var t=-1,n=0;n{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};return(()=>{"use strict";n.d(o,{plugin:()=>a});const e=coreApis.ajax,t=coreApis.toast,i=coreApis.utils.constants,r=coreApis.utils.log,s={name:"mpv-playlist",displayName:"MPV播放",description:"格式选择flv,千万不能选音画分离的dash。建议把mpv.exe所在目录加进环境变量。",runAction:async(n,o)=>{const{infos:s}=n,{mpvInfo:a}=o,c=s.flatMap((e=>e.titledFragments)).map((e=>e.url)),l=s.flatMap((e=>e.titledFragments)).map((e=>e.title)),d={dir:a.dir,referer:"https://www.bilibili.com/","user-agent":i.UserAgent,urls:c,titles:l},p=`http://${a.host}:${a.port}`,u=await(0,e.postJson)(p,d),f=JSON.parse(u);f.success?t.Toast.success(`成功发送了请求: ${f.message}`,"MPV播放",3e3):(0,r.logError)(f.message)},component:()=>Promise.resolve().then(n.bind(n,379)).then((e=>e.default))},a={name:"downloadVideo.outputs.mpv-playlist",displayName:"下载视频 - MPV 播放支持(列表)",author:{name:"wuliic",link:"https://github.com/wullic"},description:"为下载视频增加 MPV 输出支持,支持列表播放,配置方式请参考 [playwithmpv](https://github.com/videoanywhere/playwithmpv)",setup:e=>{let{addData:t}=e;t("downloadVideo.outputs",(e=>{e.push(s)}))},commitHash:"29059634f05846e79b893a1326523355a3bdc9ae",coreVersion:"2.8.9"}})(),o=o.plugin})()));