var e,t;"function"==typeof(e=globalThis.define)&&(t=e,e=null),function(t,r,n,a,o){var l="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:{},s="function"==typeof l[a]&&l[a],i=s.cache||{},d="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);function u(e,r){if(!i[e]){if(!t[e]){var n="function"==typeof l[a]&&l[a];if(!r&&n)return n(e,!0);if(s)return s(e,!0);if(d&&"string"==typeof e)return d(e);var o=Error("Cannot find module '"+e+"'");throw o.code="MODULE_NOT_FOUND",o}f.resolve=function(r){var n=t[e][1][r];return null!=n?n:r},f.cache={};var c=i[e]=new u.Module(e);t[e][0].call(c.exports,f,c,c.exports,this)}return i[e].exports;function f(e){var t=f.resolve(e);return!1===t?{}:u(t)}}u.isParcelRequire=!0,u.Module=function(e){this.id=e,this.bundle=u,this.exports={}},u.modules=t,u.cache=i,u.parent=s,u.register=function(e,r){t[e]=[function(e,t){t.exports=r},{}]},Object.defineProperty(u,"root",{get:function(){return l[a]}}),l[a]=u;for(var c=0;c<r.length;c++)u(r[c]);if(n){var f=u(n);"object"==typeof exports&&"undefined"!=typeof module?module.exports=f:"function"==typeof e&&e.amd?e(function(){return f}):o&&(this[o]=f)}}({jZx7n:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"config",()=>o),n.export(r,"auth",()=>l);var a=e("@plasmohq/messaging");let o={matches:["https://notion-auth.notionhub.app/strava-oauth-callback*"],run_at:"document_start",all_frames:!0},l=async()=>{let e=new URLSearchParams(window.location.search).get("code");if(!e)return;let t=await (0,a.sendToBackground)({name:"generateStravaToken",body:{code:e}});await chrome.runtime.sendMessage({type:"strava-notion-auth",body:{resp:t}})};l()},{"@plasmohq/messaging":"9SukW","@parcel/transformer-js/src/esmodule-helpers.js":"cHUbl"}],"9SukW":[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"relay",()=>m),n.export(r,"relayMessage",()=>g),n.export(r,"sendToActiveContentScript",()=>p),n.export(r,"sendToBackground",()=>c),n.export(r,"sendToBackgroundViaRelay",()=>b),n.export(r,"sendToContentScript",()=>f),n.export(r,"sendViaRelay",()=>h);var a=e("nanoid"),o=globalThis.browser?.tabs||globalThis.chrome?.tabs,l=()=>{let e=globalThis.browser?.runtime||globalThis.chrome?.runtime;if(!e)throw Error("Extension runtime is not available");return e},s=()=>{if(!o)throw Error("Extension tabs API is not available");return o},i=async()=>{let e=s(),[t]=await e.query({active:!0,currentWindow:!0});return t},d=(e,t)=>!t.__internal&&e.source===globalThis.window&&e.data.name===t.name&&(void 0===t.relayId||e.data.relayId===t.relayId),u=(e,t,r=globalThis.window)=>{let n=async n=>{if(d(n,e)&&!n.data.relayed){let a={name:e.name,relayId:e.relayId,body:n.data.body},o=await t?.(a);r.postMessage({name:e.name,relayId:e.relayId,instanceId:n.data.instanceId,body:o,relayed:!0},{targetOrigin:e.targetOrigin||"/"})}};return r.addEventListener("message",n),()=>r.removeEventListener("message",n)},c=async e=>l().sendMessage(e.extensionId??null,e),f=async e=>{let t="number"==typeof e.tabId?e.tabId:(await i())?.id;if(!t)throw Error("No active tab found to send message to.");return s().sendMessage(t,e)},p=f,g=e=>u(e,c),m=g,b=(e,t=globalThis.window)=>new Promise((r,n)=>{let o=(0,a.nanoid)(),l=new AbortController;t.addEventListener("message",t=>{d(t,e)&&t.data.relayed&&t.data.instanceId===o&&(r(t.data.body),l.abort())},{signal:l.signal}),t.postMessage({...e,instanceId:o},{targetOrigin:e.targetOrigin||"/"})}),h=b},{nanoid:"ikbHe","@parcel/transformer-js/src/esmodule-helpers.js":"cHUbl"}],ikbHe:[function(e,t,r){var n=e("@parcel/transformer-js/src/esmodule-helpers.js");n.defineInteropFlag(r),n.export(r,"urlAlphabet",()=>a.urlAlphabet),n.export(r,"random",()=>o),n.export(r,"customRandom",()=>l),n.export(r,"customAlphabet",()=>s),n.export(r,"nanoid",()=>i);var a=e("./url-alphabet/index.js");let o=e=>crypto.getRandomValues(new Uint8Array(e)),l=(e,t,r)=>{let n=(2<<Math.log2(e.length-1))-1,a=-~(1.6*n*t/e.length);return (o=t)=>{let l="";for(;;){let t=r(a),s=0|a;for(;s--;)if((l+=e[t[s]&n]||"").length>=o)return l}}},s=(e,t=21)=>l(e,0|t,o),i=(e=21)=>{let t="",r=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=a.urlAlphabet[63&r[e]];return t}},{"./url-alphabet/index.js":!1,"@parcel/transformer-js/src/esmodule-helpers.js":"cHUbl"}],cHUbl:[function(e,t,r){r.interopDefault=function(e){return e&&e.__esModule?e:{default:e}},r.defineInteropFlag=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.exportAll=function(e,t){return Object.keys(e).forEach(function(r){"default"===r||"__esModule"===r||t.hasOwnProperty(r)||Object.defineProperty(t,r,{enumerable:!0,get:function(){return e[r]}})}),t},r.export=function(e,t,r){Object.defineProperty(e,t,{enumerable:!0,get:r})}},{}]},["jZx7n"],"jZx7n","parcelRequiref116"),globalThis.define=t;