(()=>{var t={8926:t=>{function e(t,e,n,r,o,a,i){try{var u=t[a](i),c=u.value}catch(t){return void n(t)}u.done?e(c):Promise.resolve(c).then(r,o)}t.exports=function(t){return function(){var n=this,r=arguments;return new Promise((function(o,a){var i=t.apply(n,r);function u(t){e(i,o,a,u,c,"next",t)}function c(t){e(i,o,a,u,c,"throw",t)}u(void 0)}))}},t.exports.default=t.exports,t.exports.__esModule=!0},5318:t=>{t.exports=function(t){return t&&t.__esModule?t:{default:t}},t.exports.default=t.exports,t.exports.__esModule=!0},8:t=>{function e(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?(t.exports=e=function(t){return typeof t},t.exports.default=t.exports,t.exports.__esModule=!0):(t.exports=e=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.default=t.exports,t.exports.__esModule=!0),e(n)}t.exports=e,t.exports.default=t.exports,t.exports.__esModule=!0},7757:(t,e,n)=>{t.exports=n(5666)},6553:(t,e,n)=>{"use strict";var r=n(5318),o=r(n(7757)),a=r(n(8926));t.exports=function(t,e){e.addEventListener("message",(function(){var n=(0,a.default)(o.default.mark((function n(r){var a,i,u,c,s,f,_;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=r.data.request){n.next=3;break}return n.abrupt("return");case 3:if(i=a.id,u=a.path,c=a.args,n.prev=4,"function"!=typeof(s=u.reduce((function(t,e){return t[e]}),t))){n.next=13;break}return _=u.slice(0,u.length-1).reduce((function(t,e){return t[e]}),t),n.next=10,s.apply(_,c);case 10:f=n.sent,n.next=16;break;case 13:return n.next=15,s;case 15:f=n.sent;case 16:e.postMessage({response:{id:i,result:{data:f}}}),n.next=22;break;case 19:n.prev=19,n.t0=n.catch(4),e.postMessage({response:{id:i,result:{error:n.t0}}});case 22:case"end":return n.stop()}}),n,null,[[4,19]])})));return function(t){return n.apply(this,arguments)}})()),this.call=(function(){var t=(0,a.default)(o.default.mark((function t(n,r){var a;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=Math.random().toString(32).slice(2),t.abrupt("return",new Promise((function(t,o){e.addEventListener("message",(function n(r){var i=r.data.response;i&&i.id===a&&(e.removeEventListener("message",n),"error"in i.result?o(i.result.error):t(i.result.data))})),e.postMessage({request:{id:a,path:n,args:r}})})));case 2:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}})()}},6489:(t,e,n)=>{"use strict";var r=n(5318);Object.defineProperty(e,"__esModule",{value:!0}),e.analytics=function(t,e){o.analytics(p(t),p(e))},e.decode_stream=function(t){return l(o.decode_stream(p(t)))},e.default=void 0,e.dispatch=function(t,e,n){o.dispatch(p(t),p(e),p(n))},e.get_state=function(t){return l(o.get_state(p(t)))},e.initialize_runtime=function(t){return l(o.initialize_runtime(p(t)))},e.start=function(){o.start()};var o,a=r(n(7757)),i=r(n(8926)),u=r(n(8)),c={url:new URL("/stremio_core_web.js",document.baseURI).href},s=new Array(32).fill(void 0);function f(t){return s[t]}s.push(void 0,null,!0,!1);var _=s.length;function l(t){var e=f(t);return(function(t){t<36||(s[t]=_,_=t)})(t),e}var b=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});b.decode();var g=null;function d(){return null!==g&&g.buffer===o.memory.buffer||(g=new Uint8Array(o.memory.buffer)),g}function w(t,e){return b.decode(d().subarray(t,t+e))}function p(t){_===s.length&&s.push(s.length+1);var e=_;return _=s[e],s[e]=t,e}var h=0,y=new TextEncoder("utf-8"),v="function"==typeof y.encodeInto?function(t,e){return y.encodeInto(t,e)}:function(t,e){var n=y.encode(t);return e.set(n),{read:t.length,written:n.length}};function m(t,e,n){if(void 0===n){var r=y.encode(t),o=e(r.length);return d().subarray(o,o+r.length).set(r),h=r.length,o}for(var a=t.length,i=e(a),u=d(),c=0;c127)break;u[i+c]=s}if(c!==a){0!==c&&(t=t.slice(c)),i=n(i,a,a=c+3*t.length);var f=d().subarray(i+c,i+a);c+=v(t,f).written}return h=c,i}function x(t){return null==t}var k=null;function E(){return null!==k&&k.buffer===o.memory.buffer||(k=new Int32Array(o.memory.buffer)),k}function L(t){var e=(0,u.default)(t);if("number"==e||"boolean"==e||null==t)return"".concat(t);if("string"==e)return'"'.concat(t,'"');if("symbol"==e){var n=t.description;return null==n?"Symbol":"Symbol(".concat(n,")")}if("function"==e){var r=t.name;return"string"==typeof r&&r.length>0?"Function(".concat(r,")"):"Function"}if(Array.isArray(t)){var o=t.length,a="[";o>0&&(a+=L(t[0]));for(var i=1;i1))return toString.call(t);if("Object"==(c=s[1]))try{return"Object("+JSON.stringify(t)+")"}catch(t){return"Object"}return t instanceof Error?"".concat(t.name,": ").concat(t.message,"\n").concat(t.stack):c}function S(t,e,n,r){var a={a:t,b:e,cnt:1,dtor:n},i=function(){a.cnt++;var t=a.a;a.a=0;try{for(var e=arguments.length,n=new Array(e),i=0;i>>0))},r.wbg.__wbindgen_object_clone_ref=function(t){return p(f(t))},r.wbg.__wbg_self_c6fbdfc2918d5e58=function(){return R((function(){return p(self.self)}),arguments)},r.wbg.__wbg_window_baec038b5ab35c54=function(){return R((function(){return p(window.window)}),arguments)},r.wbg.__wbg_globalThis_3f735a5746d41fbd=function(){return R((function(){return p(globalThis.globalThis)}),arguments)},r.wbg.__wbg_global_1bc0b39582740e95=function(){return R((function(){return p(n.g.global)}),arguments)},r.wbg.__wbindgen_is_undefined=function(t){return void 0===f(t)},r.wbg.__wbg_newnoargs_be86524d73f67598=function(t,e){return p(new Function(w(t,e)))},r.wbg.__wbg_call_888d259a5fefc347=function(){return R((function(t,e){return p(f(t).call(f(e)))}),arguments)},r.wbg.__wbg_call_346669c262382ad7=function(){return R((function(t,e,n){return p(f(t).call(f(e),f(n)))}),arguments)},r.wbg.__wbindgen_string_get=function(t,e){var n=f(e),r="string"==typeof n?n:void 0,a=x(r)?0:m(r,o.__wbindgen_malloc,o.__wbindgen_realloc),i=h;E()[t/4+1]=i,E()[t/4+0]=a},r.wbg.__wbg_set_82a4e8a85e31ac42=function(){return R((function(t,e,n){return Reflect.set(f(t),f(e),f(n))}),arguments)},r.wbg.__wbg_now_af172eabe2e041ad=function(){return Date.now()},r.wbg.__wbg_randomFillSync_f20541303a990429=function(){return R((function(t,e,n){f(t).randomFillSync(A(e,n))}),arguments)},r.wbg.__wbg_subarray_8b658422a224f479=function(t,e,n){return p(f(t).subarray(e>>>0,n>>>0))},r.wbg.__wbg_getRandomValues_f308e7233e5601b7=function(){return R((function(t,e){f(t).getRandomValues(f(e))}),arguments)},r.wbg.__wbg_length_1eb8fc608a0d4cdb=function(t){return f(t).length},r.wbg.__wbindgen_memory=function(){return p(o.memory)},r.wbg.__wbg_buffer_397eaa4d72ee94dd=function(t){return p(f(t).buffer)},r.wbg.__wbg_new_a7ce447f15ff496f=function(t){return p(new Uint8Array(f(t)))},r.wbg.__wbg_set_969ad0a60e51d320=function(t,e,n){f(t).set(f(e),n>>>0)},r.wbg.__wbindgen_json_serialize=function(t,e){var n=f(e),r=m(JSON.stringify(void 0===n?null:n),o.__wbindgen_malloc,o.__wbindgen_realloc),a=h;E()[t/4+1]=a,E()[t/4+0]=r},r.wbg.__wbg_instanceof_WorkerGlobalScope_f191ca0158f5637b=function(t){return f(t)instanceof WorkerGlobalScope},r.wbg.__wbg_static_accessor_app_version_0d438539d98a0943=function(t){var e=m(self.app_version,o.__wbindgen_malloc,o.__wbindgen_realloc),n=h;E()[t/4+1]=n,E()[t/4+0]=e},r.wbg.__wbg_static_accessor_shell_version_1f62a14e53964af1=function(t){var e=self.shell_version,n=x(e)?0:m(e,o.__wbindgen_malloc,o.__wbindgen_realloc),r=h;E()[t/4+1]=r,E()[t/4+0]=n},r.wbg.__wbg_navigator_8bc0889cda8f8500=function(t){return p(f(t).navigator)},r.wbg.__wbg_language_cd6e22892ba36a1f=function(t,e){var n=f(e).language,r=x(n)?0:m(n,o.__wbindgen_malloc,o.__wbindgen_realloc),a=h;E()[t/4+1]=a,E()[t/4+0]=r},r.wbg.__wbg_new_b1d61b5687f5e73a=function(t,e){try{var n={a:t,b:e},r=new Promise((function(t,e){var r=n.a;n.a=0;try{return M(r,n.b,t,e)}finally{n.a=r}}));return p(r)}finally{n.a=n.b=0}},r.wbg.__wbindgen_json_parse=function(t,e){return p(JSON.parse(w(t,e)))},r.wbg.__wbg_new_0b83d3df67ecb33e=function(){return p(new Object)},r.wbg.__wbg_fetch_b4e81012e07ff95a=function(t,e){return p(f(t).fetch(f(e)))},r.wbg.__wbg_getlocationhash_97299d3c8a498b17=function(){return R((function(){return p(self.get_location_hash())}),arguments)},r.wbg.__wbg_instanceof_Error_561efcb1265706d8=function(t){return f(t)instanceof Error},r.wbg.__wbg_message_9f7d15ff97fc4102=function(t){return p(f(t).message)},r.wbg.__wbg_instanceof_Response_e1b11afbefa5b563=function(t){return f(t)instanceof Response},r.wbg.__wbg_status_6d8bb444ddc5a7b2=function(t){return f(t).status},r.wbg.__wbg_setInterval_a02797f5ab1c7eb1=function(){return R((function(t,e,n){return f(t).setInterval(f(e),n)}),arguments)},r.wbg.__wbg_localstorageremoveitem_8ad2d96138ff136a=function(){return R((function(t,e){try{return p(self.local_storage_remove_item(w(t,e)))}finally{o.__wbindgen_free(t,e)}}),arguments)},r.wbg.__wbg_localstoragesetitem_7d75d2eac814d3d8=function(){return R((function(t,e,n,r){try{return p(self.local_storage_set_item(w(t,e),w(n,r)))}finally{o.__wbindgen_free(t,e),o.__wbindgen_free(n,r)}}),arguments)},r.wbg.__wbg_localstoragegetitem_318a1e7771661e01=function(){return R((function(t,e){try{return p(self.local_storage_get_item(w(t,e)))}finally{o.__wbindgen_free(t,e)}}),arguments)},r.wbg.__wbindgen_debug_string=function(t,e){var n=m(L(f(e)),o.__wbindgen_malloc,o.__wbindgen_realloc),r=h;E()[t/4+1]=r,E()[t/4+0]=n},r.wbg.__wbindgen_throw=function(t,e){throw new Error(w(t,e))},r.wbg.__wbg_then_8c2d62e8ae5978f7=function(t,e,n){return p(f(t).then(f(e),f(n)))},r.wbg.__wbg_then_2fcac196782070cc=function(t,e){return p(f(t).then(f(e)))},r.wbg.__wbg_resolve_d23068002f584f22=function(t){return p(Promise.resolve(f(t)))},r.wbg.__wbindgen_cb_drop=function(t){var e=l(t).original;if(1==e.cnt--)return e.a=0,!0;return!1},r.wbg.__wbg_newwithstrandinit_9b0fa00478c37287=function(){return R((function(t,e,n){return p(new Request(w(t,e),f(n)))}),arguments)},r.wbg.__wbg_json_88cc6d5cf8f61121=function(){return R((function(t){return p(f(t).json())}),arguments)},r.wbg.__wbindgen_closure_wrapper4955=function(t,e,n){return p(S(t,e,127,j))},r.wbg.__wbindgen_closure_wrapper5985=function(t,e,n){return p(S(t,e,134,O))},("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e)),t.t0=T,t.next=71,e;case 71:return t.t1=t.sent,t.t2=r,t.next=75,(0,t.t0)(t.t1,t.t2);case 75:return i=t.sent,s=i.instance,_=i.module,o=s.exports,I.__wbindgen_wasm_module=_,o.__wbindgen_start(),t.abrupt("return",o);case 82:case"end":return t.stop()}}),t)}))),P.apply(this,arguments)}var N=I;e.default=N},5666:t=>{var e=(function(t){"use strict";var e,n=Object.prototype,r=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,n){return t[e]=n}}function f(t,e,n,r){var a=e&&e.prototype instanceof w?e:w,i=Object.create(a.prototype),u=new R(r||[]);return o(i,"_invoke",{value:L(t,n,u)}),i}function _(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=f;var l="suspendedStart",b="executing",g="completed",d={};function w(){}function p(){}function h(){}var y={};s(y,i,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(A([])));m&&m!==n&&r.call(m,i)&&(y=m);var x=h.prototype=w.prototype=Object.create(y);function k(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function n(o,a,i,u){var c=_(t[o],t,a);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,i,u)}),(function(t){n("throw",t,i,u)})):e.resolve(f).then((function(t){s.value=t,i(s)}),(function(t){return n("throw",t,i,u)}))}u(c.arg)}var a;o(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,o){n(t,r,e,o)}))}return a=a?a.then(o,o):o()}})}function L(t,e,n){var r=l;return function(o,a){if(r===b)throw new Error("Generator is already running");if(r===g){if("throw"===o)throw a;return M()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var u=S(i,n);if(u){if(u===d)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===l)throw r=g,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=b;var c=_(t,e,n);if("normal"===c.type){if(r=n.done?g:"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=g,n.method="throw",n.arg=c.arg)}}}function S(t,n){var r=n.method,o=t.iterator[r];if(o===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,S(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var a=_(o,t.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,d;var i=a.arg;return i?i.done?(n[t.resultName]=i.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,d):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,d)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function A(t){if(t){var n=t[i];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function n(){for(;++o=0;--a){var i=this.tryEntries[a],u=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),O(n),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:A(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),d}},t})(t.exports);try{regeneratorRuntime=e}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}},6310:(t,e,n)=>{"use strict";t.exports=n.p+"c6b2e59478bb4e764499c482ba715bfb9397c9f5/binaries/stremio_core_web_bg.wasm"}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var a=e[r]={exports:{}};return t[r](a,a.exports,n),a.exports}n.g=(function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}})(),(()=>{var t;n.g.importScripts&&(t=n.g.location+"");var e=n.g.document;if(!t&&e&&(e.currentScript&&(t=e.currentScript.src),!t)){var r=e.getElementsByTagName("script");r.length&&(t=r[r.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t+"../../"})(),(()=>{"use strict";var t=n(5318),e=t(n(7757)),r=t(n(8926)),o=new(n(6553))(self,self);self.init=(function(){var t=(0,r.default)(e.default.mark((function t(a){var i,u,c,s,f,_,l,b,g,d;return e.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i=a.appVersion,u=a.shellVersion,self.document={baseURI:self.location.href},self.app_version=i,self.shell_version=u,self.get_location_hash=(0,r.default)(e.default.mark((function t(){return e.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.call(["location","hash"],[]));case 1:case"end":return t.stop()}}),t)}))),self.local_storage_get_item=(function(){var t=(0,r.default)(e.default.mark((function t(n){return e.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.call(["localStorage","getItem"],[n]));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}})(),self.local_storage_set_item=(function(){var t=(0,r.default)(e.default.mark((function t(n,r){return e.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.call(["localStorage","setItem"],[n,r]));case 1:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}})(),self.local_storage_remove_item=(function(){var t=(0,r.default)(e.default.mark((function t(n){return e.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",o.call(["localStorage","removeItem"],[n]));case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}})(),c=n(6489),s=c.default,f=c.initialize_runtime,_=c.get_state,l=c.get_debug_state,b=c.dispatch,g=c.analytics,d=c.decode_stream,self.getState=_,self.getDebugState=l,self.dispatch=b,self.analytics=g,self.decodeStream=d,t.next=16,s(n(6310));case 16:return t.next=18,f((function(t){return o.call(["onCoreEvent"],[t])}));case 18:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}})()})()})(); //# sourceMappingURL=worker.js.map