Sorry, the diff of this file is too big to display
+1
-1
@@ -1,2 +0,2 @@ | ||
| var background=(function(){"use strict";function z(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var C={exports:{}},K=C.exports,j;function Y(){return j||(j=1,(function(e,s){(function(n,g){g(e)})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:K,function(n){if(!(globalThis.chrome&&globalThis.chrome.runtime&&globalThis.chrome.runtime.id))throw new Error("This script should only be loaded in a browser extension.");if(globalThis.browser&&globalThis.browser.runtime&&globalThis.browser.runtime.id)n.exports=globalThis.browser;else{const g="The message port closed before a response was received.",m=A=>{const p={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(p).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class h extends WeakMap{constructor(t,o=void 0){super(o),this.createItem=t}get(t){return this.has(t)||this.set(t,this.createItem(t)),super.get(t)}}const E=r=>r&&typeof r=="object"&&typeof r.then=="function",q=(r,t)=>(...o)=>{A.runtime.lastError?r.reject(new Error(A.runtime.lastError.message)):t.singleCallbackArg||o.length<=1&&t.singleCallbackArg!==!1?r.resolve(o[0]):r.resolve(o)},M=r=>r==1?"argument":"arguments",fe=(r,t)=>function(i,...c){if(c.length<t.minArgs)throw new Error(`Expected at least ${t.minArgs} ${M(t.minArgs)} for ${r}(), got ${c.length}`);if(c.length>t.maxArgs)throw new Error(`Expected at most ${t.maxArgs} ${M(t.maxArgs)} for ${r}(), got ${c.length}`);return new Promise((d,x)=>{if(t.fallbackToNoCallback)try{i[r](...c,q({resolve:d,reject:x},t))}catch(a){console.warn(`${r} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,a),i[r](...c),t.fallbackToNoCallback=!1,t.noCallback=!0,d()}else t.noCallback?(i[r](...c),d()):i[r](...c,q({resolve:d,reject:x},t))})},D=(r,t,o)=>new Proxy(t,{apply(i,c,d){return o.call(c,r,...d)}});let B=Function.call.bind(Object.prototype.hasOwnProperty);const _=(r,t={},o={})=>{let i=Object.create(null),c={has(x,a){return a in r||a in i},get(x,a,f){if(a in i)return i[a];if(!(a in r))return;let l=r[a];if(typeof l=="function")if(typeof t[a]=="function")l=D(r,r[a],t[a]);else if(B(o,a)){let w=fe(a,o[a]);l=D(r,r[a],w)}else l=l.bind(r);else if(typeof l=="object"&&l!==null&&(B(t,a)||B(o,a)))l=_(l,t[a],o[a]);else if(B(o,"*"))l=_(l,t[a],o["*"]);else return Object.defineProperty(i,a,{configurable:!0,enumerable:!0,get(){return r[a]},set(w){r[a]=w}}),l;return i[a]=l,l},set(x,a,f,l){return a in i?i[a]=f:r[a]=f,!0},defineProperty(x,a,f){return Reflect.defineProperty(i,a,f)},deleteProperty(x,a){return Reflect.deleteProperty(i,a)}},d=Object.create(r);return new Proxy(d,c)},N=r=>({addListener(t,o,...i){t.addListener(r.get(o),...i)},hasListener(t,o){return t.hasListener(r.get(o))},removeListener(t,o){t.removeListener(r.get(o))}}),be=new h(r=>typeof r!="function"?r:function(o){const i=_(o,{},{getContent:{minArgs:0,maxArgs:0}});r(i)}),G=new h(r=>typeof r!="function"?r:function(o,i,c){let d=!1,x,a=new Promise(T=>{x=function(b){d=!0,T(b)}}),f;try{f=r(o,i,x)}catch(T){f=Promise.reject(T)}const l=f!==!0&&E(f);if(f!==!0&&!l&&!d)return!1;const w=T=>{T.then(b=>{c(b)},b=>{let I;b&&(b instanceof Error||typeof b.message=="string")?I=b.message:I="An unexpected error occurred",c({__mozWebExtensionPolyfillReject__:!0,message:I})}).catch(b=>{console.error("Failed to send onMessage rejected reply",b)})};return w(l?f:a),!0}),he=({reject:r,resolve:t},o)=>{A.runtime.lastError?A.runtime.lastError.message===g?t():r(new Error(A.runtime.lastError.message)):o&&o.__mozWebExtensionPolyfillReject__?r(new Error(o.message)):t(o)},V=(r,t,o,...i)=>{if(i.length<t.minArgs)throw new Error(`Expected at least ${t.minArgs} ${M(t.minArgs)} for ${r}(), got ${i.length}`);if(i.length>t.maxArgs)throw new Error(`Expected at most ${t.maxArgs} ${M(t.maxArgs)} for ${r}(), got ${i.length}`);return new Promise((c,d)=>{const x=he.bind(null,{resolve:c,reject:d});i.push(x),o.sendMessage(...i)})},pe={devtools:{network:{onRequestFinished:N(be)}},runtime:{onMessage:N(G),onMessageExternal:N(G),sendMessage:V.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:V.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},O={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return p.privacy={network:{"*":O},services:{"*":O},websites:{"*":O}},_(A,pe,p)};n.exports=m(chrome)}})})(C)),C.exports}var H=Y();const u=z(H);function J(e){return e==null||typeof e=="function"?{main:e}:e}const Q={id:"yahoo",hostMatches:e=>e==="finance.yahoo.com",detectFromTab({url:e}){const s=e.pathname.match(/^\/quote\/([^/?#]+)/);if(!s)return null;const n=decodeURIComponent(s[1]),g=n.toUpperCase().endsWith(".SN");return{symbol:n.replace(/\.[A-Z]+$/i,""),market:g?"cl":"us",source:"Yahoo Finance"}}},X={id:"trii",hostMatches:e=>e==="web.trii.cl",detectFromTab({url:e}){const s=e.pathname.match(/^\/stock\/([^/?#]+)/i);return s?{symbol:decodeURIComponent(s[1]).toUpperCase(),market:"cl",source:"Trii"}:null}},ee={id:"bolsa-santiago",hostMatches:e=>/(^|\.)bolsadesantiago\.com$/.test(e),detectFromTab({url:e}){const s=e.pathname.match(/^\/resumen_instrumento\/([^/?#]+)/i);return s?{symbol:decodeURIComponent(s[1]).toUpperCase(),market:"cl",source:"Bolsa de Santiago"}:null}};function F(e){return e.toUpperCase()==="BCS"?"cl":"us"}const re="tv-detected";function se(e){const s=e.match(/^([A-Z]{2,8}):([A-Z][A-Z0-9.\-_]*)$/);if(!s)return null;const n=s[1];return{symbol:s[2].toUpperCase().replace(/_/g,"-"),market:F(n),source:"TradingView"}}const te={id:"tv",hostMatches:e=>/(^|\.)tradingview\.com$/.test(e),detectFromTab({url:e,title:s}){const n=e.pathname.match(/^\/symbols\/([A-Z]+)-([^/?#]+)/i);if(n)return{symbol:n[2].toUpperCase().replace(/_/g,"-"),market:F(n[1]),source:"TradingView"};if(!s)return null;const g=s.match(/\b([A-Z]{2,8}):([A-Z][A-Z0-9.\-_]*)\b/);if(g)return{symbol:g[2].toUpperCase().replace(/_/g,"-"),market:F(g[1]),source:"TradingView"};const m=s.match(/^([A-Z]+(?:[-._][A-Z0-9]+)*)(?=\s|\d|[^\w]|$)/);return m?{symbol:m[1].toUpperCase().replace(/_/g,"-"),market:"us",source:"TradingView"}:null},runtime:{messageType:re,parsePayload:se}},ne="btg-detected";function ae(e){let s;try{s=atob(e)}catch{return null}const n=s.split(".");if(n.length<3)return null;const g=n[n.length-1],m=n.slice(1,-1).join(".");return m?g==="BCS"?{symbol:m.toUpperCase(),market:"cl",source:"BTG Pactual"}:g==="INFBOL"?{symbol:(m.length>2?m.replace(/^[A-Z]{2}/,""):m).toUpperCase(),market:"us",source:"BTG Pactual"}:null:null}const v=[Q,te,ee,X,{id:"btg",hostMatches:e=>e==="app.btgpactual.cl",runtime:{messageType:ne,parsePayload:ae}},{id:"marketwatch",hostMatches:e=>e==="www.marketwatch.com",detectFromTab({url:e}){var g;const s=e.pathname.match(/^\/investing\/(?:stock|fund)\/([^/?#]+)/i);if(!s)return null;const n=(g=e.searchParams.get("countrycode"))==null?void 0:g.toLowerCase();return{symbol:decodeURIComponent(s[1]).toUpperCase(),market:n==="cl"?"cl":"us",source:"MarketWatch"}}}];function oe(e){return v.find(s=>s.hostMatches(e.hostname))}function ie(e){return v.find(s=>{var n;return((n=s.runtime)==null?void 0:n.messageType)===e})}function R(e,s){return`${e}_${s}`}function ge(e){return v.filter(s=>s.runtime).map(s=>R(s.id,e))}function me(e){for(const s of v){if(!s.detectFromTab||!s.hostMatches(e.url.hostname))continue;const n=s.detectFromTab(e);if(n)return n}return null}async function le(e,s,n){if(!s)return null;let g;try{g=new URL(s)}catch{return null}const m=oe(g);if(m!=null&&m.runtime&&typeof e=="number"){const A=R(m.id,e),h=(await u.storage.session.get(A))[A];if(typeof h=="string"&&h.length>0){const E=m.runtime.parsePayload(h);if(E)return E}}return me({url:g,title:n})}const ce="#7051db",Ae="#00e5aa",ue=800;let k=null,S=null,y=null,$=!1;function Z(){k&&(clearInterval(k),k=null),S=null,y=null}async function W(){if(!(y==null||S==null))try{await u.action.setBadgeText({text:S.slice(0,3),tabId:y}),u.action.setBadgeBackgroundColor&&await u.action.setBadgeBackgroundColor({color:$?Ae:ce,tabId:y})}catch{Z()}}async function U(e){let s,n;try{const m=await u.tabs.get(e);s=m.url,n=m.title}catch{return}const g=await le(e,s,n);if(g)S=g.symbol,y=e,await W(),k||(k=setInterval(()=>{$=!$,W()},ue));else{y===e&&Z();try{await u.action.setBadgeText({text:"",tabId:e})}catch{}}}const de=J(()=>{"sidePanel"in chrome&&chrome.sidePanel.setPanelBehavior({openPanelOnActionClick:!0}).catch(e=>console.error("sidePanel.setPanelBehavior:",e)),u.tabs.onActivated.addListener(({tabId:e})=>{U(e)}),u.tabs.onUpdated.addListener((e,s,n)=>{n.active&&(s.url||s.title||s.status==="complete")&&U(e)}),u.tabs.onRemoved.addListener(e=>{u.storage.session.remove(ge(e))}),u.runtime.onMessage.addListener((e,s)=>{var h;if(typeof e!="object"||e===null)return;const n=e.type,g=e.payload,m=(h=s.tab)==null?void 0:h.id;if(typeof m!="number"||typeof n!="string")return;const A=ie(n);if(!A||!A.runtime)return;const p=R(A.id,m);(async()=>(typeof g=="string"&&g.length>0?await u.storage.session.set({[p]:g}):await u.storage.session.remove(p),U(m)))()})});function Te(){}function P(e,...s){}const xe={debug:(...e)=>P(console.debug,...e),log:(...e)=>P(console.log,...e),warn:(...e)=>P(console.warn,...e),error:(...e)=>P(console.error,...e)};let L;try{L=de.main(),L instanceof Promise&&console.warn("The background's main() function return a promise, but it must be synchronous")}catch(e){throw xe.error("The background crashed on startup!"),e}return L})(); | ||
| var background=(function(){"use strict";function Y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var P={exports:{}},X=P.exports,O;function K(){return O||(O=1,(function(e,r){(function(n,g){g(e)})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:X,function(n){if(!(globalThis.chrome&&globalThis.chrome.runtime&&globalThis.chrome.runtime.id))throw new Error("This script should only be loaded in a browser extension.");if(globalThis.browser&&globalThis.browser.runtime&&globalThis.browser.runtime.id)n.exports=globalThis.browser;else{const g="The message port closed before a response was received.",m=c=>{const h={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(Object.keys(h).length===0)throw new Error("api-metadata.json has not been included in browser-polyfill");class y extends WeakMap{constructor(t,o=void 0){super(o),this.createItem=t}get(t){return this.has(t)||this.set(t,this.createItem(t)),super.get(t)}}const k=s=>s&&typeof s=="object"&&typeof s.then=="function",S=(s,t)=>(...o)=>{c.runtime.lastError?s.reject(new Error(c.runtime.lastError.message)):t.singleCallbackArg||o.length<=1&&t.singleCallbackArg!==!1?s.resolve(o[0]):s.resolve(o)},B=s=>s==1?"argument":"arguments",ye=(s,t)=>function(i,...A){if(A.length<t.minArgs)throw new Error(`Expected at least ${t.minArgs} ${B(t.minArgs)} for ${s}(), got ${A.length}`);if(A.length>t.maxArgs)throw new Error(`Expected at most ${t.maxArgs} ${B(t.maxArgs)} for ${s}(), got ${A.length}`);return new Promise((d,x)=>{if(t.fallbackToNoCallback)try{i[s](...A,S({resolve:d,reject:x},t))}catch(a){console.warn(`${s} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,a),i[s](...A),t.fallbackToNoCallback=!1,t.noCallback=!0,d()}else t.noCallback?(i[s](...A),d()):i[s](...A,S({resolve:d,reject:x},t))})},q=(s,t,o)=>new Proxy(t,{apply(i,A,d){return o.call(A,s,...d)}});let _=Function.call.bind(Object.prototype.hasOwnProperty);const U=(s,t={},o={})=>{let i=Object.create(null),A={has(x,a){return a in s||a in i},get(x,a,f){if(a in i)return i[a];if(!(a in s))return;let l=s[a];if(typeof l=="function")if(typeof t[a]=="function")l=q(s,s[a],t[a]);else if(_(o,a)){let w=ye(a,o[a]);l=q(s,s[a],w)}else l=l.bind(s);else if(typeof l=="object"&&l!==null&&(_(t,a)||_(o,a)))l=U(l,t[a],o[a]);else if(_(o,"*"))l=U(l,t[a],o["*"]);else return Object.defineProperty(i,a,{configurable:!0,enumerable:!0,get(){return s[a]},set(w){s[a]=w}}),l;return i[a]=l,l},set(x,a,f,l){return a in i?i[a]=f:s[a]=f,!0},defineProperty(x,a,f){return Reflect.defineProperty(i,a,f)},deleteProperty(x,a){return Reflect.deleteProperty(i,a)}},d=Object.create(s);return new Proxy(d,A)},L=s=>({addListener(t,o,...i){t.addListener(s.get(o),...i)},hasListener(t,o){return t.hasListener(s.get(o))},removeListener(t,o){t.removeListener(s.get(o))}}),we=new y(s=>typeof s!="function"?s:function(o){const i=U(o,{},{getContent:{minArgs:0,maxArgs:0}});s(i)}),G=new y(s=>typeof s!="function"?s:function(o,i,A){let d=!1,x,a=new Promise(C=>{x=function(b){d=!0,C(b)}}),f;try{f=s(o,i,x)}catch(C){f=Promise.reject(C)}const l=f!==!0&&k(f);if(f!==!0&&!l&&!d)return!1;const w=C=>{C.then(b=>{A(b)},b=>{let Q;b&&(b instanceof Error||typeof b.message=="string")?Q=b.message:Q="An unexpected error occurred",A({__mozWebExtensionPolyfillReject__:!0,message:Q})}).catch(b=>{console.error("Failed to send onMessage rejected reply",b)})};return w(l?f:a),!0}),Te=({reject:s,resolve:t},o)=>{c.runtime.lastError?c.runtime.lastError.message===g?t():s(new Error(c.runtime.lastError.message)):o&&o.__mozWebExtensionPolyfillReject__?s(new Error(o.message)):t(o)},V=(s,t,o,...i)=>{if(i.length<t.minArgs)throw new Error(`Expected at least ${t.minArgs} ${B(t.minArgs)} for ${s}(), got ${i.length}`);if(i.length>t.maxArgs)throw new Error(`Expected at most ${t.maxArgs} ${B(t.maxArgs)} for ${s}(), got ${i.length}`);return new Promise((A,d)=>{const x=Te.bind(null,{resolve:A,reject:d});i.push(x),o.sendMessage(...i)})},ke={devtools:{network:{onRequestFinished:L(we)}},runtime:{onMessage:L(G),onMessageExternal:L(G),sendMessage:V.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:V.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},D={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return h.privacy={network:{"*":D},services:{"*":D},websites:{"*":D}},U(c,ke,h)};n.exports=m(chrome)}})})(P)),P.exports}var z=K();const u=Y(z);function H(e){return e==null||typeof e=="function"?{main:e}:e}const J={id:"yahoo",hostMatches:e=>e==="finance.yahoo.com",detectFromTab({url:e}){const r=e.pathname.match(/^\/quote\/([^/?#]+)/);if(!r)return null;const n=decodeURIComponent(r[1]),g=n.toUpperCase().endsWith(".SN");return{symbol:n.replace(/\.[A-Z]+$/i,""),market:g?"cl":"us",source:"Yahoo Finance"}}},ee={id:"trii",hostMatches:e=>e==="web.trii.cl",detectFromTab({url:e}){const r=e.pathname.match(/^\/stock\/([^/?#]+)/i);return r?{symbol:decodeURIComponent(r[1]).toUpperCase(),market:"cl",source:"Trii"}:null}},re={id:"bolsa-santiago",hostMatches:e=>/(^|\.)bolsadesantiago\.com$/.test(e),detectFromTab({url:e}){const r=e.pathname.match(/^\/resumen_instrumento\/([^/?#]+)/i);return r?{symbol:decodeURIComponent(r[1]).toUpperCase(),market:"cl",source:"Bolsa de Santiago"}:null}};function F(e){return e.toUpperCase()==="BCS"?"cl":"us"}const se="tv-detected";function te(e){const r=e.match(/^([A-Z]{2,8}):([A-Z][A-Z0-9.\-_]*)$/);if(!r)return null;const n=r[1];return{symbol:r[2].toUpperCase().replace(/_/g,"-"),market:F(n),source:"TradingView"}}const ne={id:"tv",hostMatches:e=>/(^|\.)tradingview\.com$/.test(e),detectFromTab({url:e,title:r}){const n=e.pathname.match(/^\/symbols\/([A-Z]+)-([^/?#]+)/i);if(n)return{symbol:n[2].toUpperCase().replace(/_/g,"-"),market:F(n[1]),source:"TradingView"};if(!r)return null;const g=r.match(/\b([A-Z]{2,8}):([A-Z][A-Z0-9.\-_]*)\b/);if(g)return{symbol:g[2].toUpperCase().replace(/_/g,"-"),market:F(g[1]),source:"TradingView"};const m=r.match(/\b([A-Z]+(?:\d[A-Z0-9]*)+!)/);if(m)return{symbol:m[1],market:"us",source:"TradingView"};const c=r.match(/^([A-Z][A-Z0-9]*(?:[-._][A-Z0-9]+)*)(?=\s|[^\w]|$)/);return c?{symbol:c[1].toUpperCase().replace(/_/g,"-"),market:"us",source:"TradingView"}:null},runtime:{messageType:se,parsePayload:te}},ae="btg-detected";function oe(e){let r;try{r=atob(e)}catch{return null}const n=r.split(".");if(n.length<3)return null;const g=n[n.length-1],m=n.slice(1,-1).join(".");return m?g==="BCS"?{symbol:m.toUpperCase(),market:"cl",source:"BTG Pactual"}:g==="INFBOL"?{symbol:(m.length>2?m.replace(/^[A-Z]{2}/,""):m).toUpperCase(),market:"us",source:"BTG Pactual"}:null:null}const ie={id:"btg",hostMatches:e=>e==="app.btgpactual.cl",runtime:{messageType:ae,parsePayload:oe}},ge={id:"marketwatch",hostMatches:e=>e==="www.marketwatch.com",detectFromTab({url:e}){var g;const r=e.pathname.match(/^\/investing\/(?:stock|fund)\/([^/?#]+)/i);if(!r)return null;const n=(g=e.searchParams.get("countrycode"))==null?void 0:g.toLowerCase();return{symbol:decodeURIComponent(r[1]).toUpperCase(),market:n==="cl"?"cl":"us",source:"MarketWatch"}}},me={"NQ1!":"QQQ",NDX:"QQQ",NDX100:"QQQ",NAS100:"QQQ",US100:"QQQ",NDQ100:"QQQ",NASDAQ:"QQQ","ES1!":"SPY",SPX:"SPY",US500:"SPY",SPX500:"SPY",SP500:"SPY","YM1!":"DIA",DJI:"DIA",US30:"DIA",DJ30:"DIA",DOW:"DIA","M2K1!":"IWM",RUT:"IWM",US2000:"IWM",RUSSELL:"IWM"};function W(e){const r=me[e.symbol.toUpperCase()];return r?{...e,symbol:r,market:"us"}:e}const v=[J,ne,re,ee,ie,ge];function le(e){return v.find(r=>r.hostMatches(e.hostname))}function ce(e){return v.find(r=>{var n;return((n=r.runtime)==null?void 0:n.messageType)===e})}function R(e,r){return`${e}_${r}`}function Ae(e){return v.filter(r=>r.runtime).map(r=>R(r.id,e))}function ue(e){for(const r of v){if(!r.detectFromTab||!r.hostMatches(e.url.hostname))continue;const n=r.detectFromTab(e);if(n)return n}return null}async function de(e,r,n){if(!r)return null;let g;try{g=new URL(r)}catch{return null}const m=le(g);if(m!=null&&m.runtime&&typeof e=="number"){const h=R(m.id,e),k=(await u.storage.session.get(h))[h];if(typeof k=="string"&&k.length>0){const S=m.runtime.parsePayload(k);if(S)return W(S)}}const c=ue({url:g,title:n});return c?W(c):null}const xe="#7051db",fe="#00e5aa",be=800;let T=null,E=null,p=null,I=!1;function Z(){T&&(clearInterval(T),T=null),E=null,p=null}async function j(){if(!(p==null||E==null))try{await u.action.setBadgeText({text:E.slice(0,3),tabId:p}),u.action.setBadgeBackgroundColor&&await u.action.setBadgeBackgroundColor({color:I?fe:xe,tabId:p})}catch{Z()}}async function N(e){let r,n;try{const m=await u.tabs.get(e);r=m.url,n=m.title}catch{return}const g=await de(e,r,n);if(g)E=g.symbol,p=e,await j(),T||(T=setInterval(()=>{I=!I,j()},be));else{p===e&&Z();try{await u.action.setBadgeText({text:"",tabId:e})}catch{}}}const he=H(()=>{"sidePanel"in chrome&&chrome.sidePanel.setPanelBehavior({openPanelOnActionClick:!0}).catch(e=>console.error("sidePanel.setPanelBehavior:",e)),u.tabs.onActivated.addListener(({tabId:e})=>{N(e)}),u.tabs.onUpdated.addListener((e,r,n)=>{n.active&&(r.url||r.title||r.status==="complete")&&N(e)}),u.tabs.onRemoved.addListener(e=>{u.storage.session.remove(Ae(e))}),u.runtime.onMessage.addListener((e,r)=>{var y;if(typeof e!="object"||e===null)return;const n=e.type,g=e.payload,m=(y=r.tab)==null?void 0:y.id;if(typeof m!="number"||typeof n!="string")return;const c=ce(n);if(!c||!c.runtime)return;const h=R(c.id,m);(async()=>(typeof g=="string"&&g.length>0?await u.storage.session.set({[h]:g}):await u.storage.session.remove(h),N(m)))()})});function Ce(){}function M(e,...r){}const pe={debug:(...e)=>M(console.debug,...e),log:(...e)=>M(console.log,...e),warn:(...e)=>M(console.warn,...e),error:(...e)=>M(console.error,...e)};let $;try{$=he.main(),$ instanceof Promise&&console.warn("The background's main() function return a promise, but it must be synchronous")}catch(e){throw pe.error("The background crashed on startup!"),e}return $})(); | ||
| background; |
+1
-1
@@ -5,3 +5,3 @@ { | ||
| "description": "Compra y vende en tu cuenta Zesty desde cualquier sitio de inversiones", | ||
| "version": "0.0.7", | ||
| "version": "0.0.8", | ||
| "icons": { | ||
@@ -8,0 +8,0 @@ "16": "icon/16.png", |
+1
-1
@@ -7,3 +7,3 @@ <!DOCTYPE html> | ||
| <title>Zesty</title> | ||
| <script type="module" crossorigin src="/chunks/sidepanel-BmquHSye.js"></script> | ||
| <script type="module" crossorigin src="/chunks/sidepanel-DqL7FwEo.js"></script> | ||
| <link rel="stylesheet" crossorigin href="/assets/sidepanel-DlvQ5roU.css"> | ||
@@ -10,0 +10,0 @@ </head> |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet