( function ( l , r ) { if ( l . getElementById ( 'livereloadscript' ) ) return ; r = l . createElement ( 'script' ) ; r . async = 1 ; r . src = '//' + ( window . location . host || 'localhost' ) . split ( ':' ) [ 0 ] + ':35729/livereload.js?snipver=1' ; r . id = 'livereloadscript' ; l . getElementsByTagName ( 'head' ) [ 0 ] . appendChild ( r ) } ) ( window . document ) ;
var app = ( function ( ) {
'use strict' ;
function noop ( ) { }
function assign ( tar , src ) {
// @ts-ignore
for ( const k in src )
tar [ k ] = src [ k ] ;
return tar ;
}
function add _location ( element , file , line , column , char ) {
element . _ _svelte _meta = {
loc : { file , line , column , char }
} ;
}
function run ( fn ) {
return fn ( ) ;
}
function blank _object ( ) {
return Object . create ( null ) ;
}
function run _all ( fns ) {
fns . forEach ( run ) ;
}
function is _function ( thing ) {
return typeof thing === 'function' ;
}
function safe _not _equal ( a , b ) {
return a != a ? b == b : a !== b || ( ( a && typeof a === 'object' ) || typeof a === 'function' ) ;
}
function is _empty ( obj ) {
return Object . keys ( obj ) . length === 0 ;
}
function create _slot ( definition , ctx , $$scope , fn ) {
if ( definition ) {
const slot _ctx = get _slot _context ( definition , ctx , $$scope , fn ) ;
return definition [ 0 ] ( slot _ctx ) ;
}
}
function get _slot _context ( definition , ctx , $$scope , fn ) {
return definition [ 1 ] && fn
? assign ( $$scope . ctx . slice ( ) , definition [ 1 ] ( fn ( ctx ) ) )
: $$scope . ctx ;
}
function get _slot _changes ( definition , $$scope , dirty , fn ) {
if ( definition [ 2 ] && fn ) {
const lets = definition [ 2 ] ( fn ( dirty ) ) ;
if ( $$scope . dirty === undefined ) {
return lets ;
}
if ( typeof lets === 'object' ) {
const merged = [ ] ;
const len = Math . max ( $$scope . dirty . length , lets . length ) ;
for ( let i = 0 ; i < len ; i += 1 ) {
merged [ i ] = $$scope . dirty [ i ] | lets [ i ] ;
}
return merged ;
}
return $$scope . dirty | lets ;
}
return $$scope . dirty ;
}
function update _slot ( slot , slot _definition , ctx , $$scope , dirty , get _slot _changes _fn , get _slot _context _fn ) {
const slot _changes = get _slot _changes ( slot _definition , $$scope , dirty , get _slot _changes _fn ) ;
if ( slot _changes ) {
const slot _context = get _slot _context ( slot _definition , ctx , $$scope , get _slot _context _fn ) ;
slot . p ( slot _context , slot _changes ) ;
}
}
function append ( target , node ) {
target . appendChild ( node ) ;
}
function insert ( target , node , anchor ) {
target . insertBefore ( node , anchor || null ) ;
}
function detach ( node ) {
node . parentNode . removeChild ( node ) ;
}
function destroy _each ( iterations , detaching ) {
for ( let i = 0 ; i < iterations . length ; i += 1 ) {
if ( iterations [ i ] )
iterations [ i ] . d ( detaching ) ;
}
}
function element ( name ) {
return document . createElement ( name ) ;
}
function text ( data ) {
return document . createTextNode ( data ) ;
}
function space ( ) {
return text ( ' ' ) ;
}
function listen ( node , event , handler , options ) {
node . addEventListener ( event , handler , options ) ;
return ( ) => node . removeEventListener ( event , handler , options ) ;
}
function attr ( node , attribute , value ) {
if ( value == null )
node . removeAttribute ( attribute ) ;
else if ( node . getAttribute ( attribute ) !== value )
node . setAttribute ( attribute , value ) ;
}
function children ( element ) {
return Array . from ( element . childNodes ) ;
}
function select _option ( select , value ) {
for ( let i = 0 ; i < select . options . length ; i += 1 ) {
const option = select . options [ i ] ;
if ( option . _ _value === value ) {
option . selected = true ;
return ;
}
}
}
function select _value ( select ) {
const selected _option = select . querySelector ( ':checked' ) || select . options [ 0 ] ;
return selected _option && selected _option . _ _value ;
}
function toggle _class ( element , name , toggle ) {
element . classList [ toggle ? 'add' : 'remove' ] ( name ) ;
}
function custom _event ( type , detail ) {
const e = document . createEvent ( 'CustomEvent' ) ;
e . initCustomEvent ( type , false , false , detail ) ;
return e ;
}
let current _component ;
function set _current _component ( component ) {
current _component = component ;
}
const dirty _components = [ ] ;
const binding _callbacks = [ ] ;
const render _callbacks = [ ] ;
const flush _callbacks = [ ] ;
const resolved _promise = Promise . resolve ( ) ;
let update _scheduled = false ;
function schedule _update ( ) {
if ( ! update _scheduled ) {
update _scheduled = true ;
resolved _promise . then ( flush ) ;
}
}
function add _render _callback ( fn ) {
render _callbacks . push ( fn ) ;
}
let flushing = false ;
const seen _callbacks = new Set ( ) ;
function flush ( ) {
if ( flushing )
return ;
flushing = true ;
do {
// first, call beforeUpdate functions
// and update components
for ( let i = 0 ; i < dirty _components . length ; i += 1 ) {
const component = dirty _components [ i ] ;
set _current _component ( component ) ;
update ( component . $$ ) ;
}
set _current _component ( null ) ;
dirty _components . length = 0 ;
while ( binding _callbacks . length )
binding _callbacks . pop ( ) ( ) ;
// then, once components are updated, call
// afterUpdate functions. This may cause
// subsequent updates...
for ( let i = 0 ; i < render _callbacks . length ; i += 1 ) {
const callback = render _callbacks [ i ] ;
if ( ! seen _callbacks . has ( callback ) ) {
// ...so guard against infinite loops
seen _callbacks . add ( callback ) ;
callback ( ) ;
}
}
render _callbacks . length = 0 ;
} while ( dirty _components . length ) ;
while ( flush _callbacks . length ) {
flush _callbacks . pop ( ) ( ) ;
}
update _scheduled = false ;
flushing = false ;
seen _callbacks . clear ( ) ;
}
function update ( $$ ) {
if ( $$ . fragment !== null ) {
$$ . update ( ) ;
run _all ( $$ . before _update ) ;
const dirty = $$ . dirty ;
$$ . dirty = [ - 1 ] ;
$$ . fragment && $$ . fragment . p ( $$ . ctx , dirty ) ;
$$ . after _update . forEach ( add _render _callback ) ;
}
}
const outroing = new Set ( ) ;
let outros ;
function group _outros ( ) {
outros = {
r : 0 ,
c : [ ] ,
p : outros // parent group
} ;
}
function check _outros ( ) {
if ( ! outros . r ) {
run _all ( outros . c ) ;
}
outros = outros . p ;
}
function transition _in ( block , local ) {
if ( block && block . i ) {
outroing . delete ( block ) ;
block . i ( local ) ;
}
}
function transition _out ( block , local , detach , callback ) {
if ( block && block . o ) {
if ( outroing . has ( block ) )
return ;
outroing . add ( block ) ;
outros . c . push ( ( ) => {
outroing . delete ( block ) ;
if ( callback ) {
if ( detach )
block . d ( 1 ) ;
callback ( ) ;
}
} ) ;
block . o ( local ) ;
}
}
function create _component ( block ) {
block && block . c ( ) ;
}
function mount _component ( component , target , anchor ) {
const { fragment , on _mount , on _destroy , after _update } = component . $$ ;
fragment && fragment . m ( target , anchor ) ;
// onMount happens before the initial afterUpdate
add _render _callback ( ( ) => {
const new _on _destroy = on _mount . map ( run ) . filter ( is _function ) ;
if ( on _destroy ) {
on _destroy . push ( ... new _on _destroy ) ;
}
else {
// Edge case - component was destroyed immediately,
// most likely as a result of a binding initialising
run _all ( new _on _destroy ) ;
}
component . $$ . on _mount = [ ] ;
} ) ;
after _update . forEach ( add _render _callback ) ;
}
function destroy _component ( component , detaching ) {
const $$ = component . $$ ;
if ( $$ . fragment !== null ) {
run _all ( $$ . on _destroy ) ;
$$ . fragment && $$ . fragment . d ( detaching ) ;
// TODO null out other refs, including component.$$ (but need to
// preserve final state?)
$$ . on _destroy = $$ . fragment = null ;
$$ . ctx = [ ] ;
}
}
function make _dirty ( component , i ) {
if ( component . $$ . dirty [ 0 ] === - 1 ) {
dirty _components . push ( component ) ;
schedule _update ( ) ;
component . $$ . dirty . fill ( 0 ) ;
}
component . $$ . dirty [ ( i / 31 ) | 0 ] |= ( 1 << ( i % 31 ) ) ;
}
function init ( component , options , instance , create _fragment , not _equal , props , dirty = [ - 1 ] ) {
const parent _component = current _component ;
set _current _component ( component ) ;
const prop _values = options . props || { } ;
const $$ = component . $$ = {
fragment : null ,
ctx : null ,
// state
props ,
update : noop ,
not _equal ,
bound : blank _object ( ) ,
// lifecycle
on _mount : [ ] ,
on _destroy : [ ] ,
before _update : [ ] ,
after _update : [ ] ,
context : new Map ( parent _component ? parent _component . $$ . context : [ ] ) ,
// everything else
callbacks : blank _object ( ) ,
dirty ,
skip _bound : false
} ;
let ready = false ;
$$ . ctx = instance
? instance ( component , prop _values , ( i , ret , ... rest ) => {
const value = rest . length ? rest [ 0 ] : ret ;
if ( $$ . ctx && not _equal ( $$ . ctx [ i ] , $$ . ctx [ i ] = value ) ) {
if ( ! $$ . skip _bound && $$ . bound [ i ] )
$$ . bound [ i ] ( value ) ;
if ( ready )
make _dirty ( component , i ) ;
}
return ret ;
} )
: [ ] ;
$$ . update ( ) ;
ready = true ;
run _all ( $$ . before _update ) ;
// `false` as a special case of no DOM component
$$ . fragment = create _fragment ? create _fragment ( $$ . ctx ) : false ;
if ( options . target ) {
if ( options . hydrate ) {
const nodes = children ( options . target ) ;
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
$$ . fragment && $$ . fragment . l ( nodes ) ;
nodes . forEach ( detach ) ;
}
else {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
$$ . fragment && $$ . fragment . c ( ) ;
}
if ( options . intro )
transition _in ( component . $$ . fragment ) ;
mount _component ( component , options . target , options . anchor ) ;
flush ( ) ;
}
set _current _component ( parent _component ) ;
}
class SvelteComponent {
$destroy ( ) {
destroy _component ( this , 1 ) ;
this . $destroy = noop ;
}
$on ( type , callback ) {
const callbacks = ( this . $$ . callbacks [ type ] || ( this . $$ . callbacks [ type ] = [ ] ) ) ;
callbacks . push ( callback ) ;
return ( ) => {
const index = callbacks . indexOf ( callback ) ;
if ( index !== - 1 )
callbacks . splice ( index , 1 ) ;
} ;
}
$set ( $$props ) {
if ( this . $$set && ! is _empty ( $$props ) ) {
this . $$ . skip _bound = true ;
this . $$set ( $$props ) ;
this . $$ . skip _bound = false ;
}
}
}
function dispatch _dev ( type , detail ) {
document . dispatchEvent ( custom _event ( type , Object . assign ( { version : '3.29.7' } , detail ) ) ) ;
}
function append _dev ( target , node ) {
dispatch _dev ( 'SvelteDOMInsert' , { target , node } ) ;
append ( target , node ) ;
}
function insert _dev ( target , node , anchor ) {
dispatch _dev ( 'SvelteDOMInsert' , { target , node , anchor } ) ;
insert ( target , node , anchor ) ;
}
function detach _dev ( node ) {
dispatch _dev ( 'SvelteDOMRemove' , { node } ) ;
detach ( node ) ;
}
function listen _dev ( node , event , handler , options , has _prevent _default , has _stop _propagation ) {
const modifiers = options === true ? [ 'capture' ] : options ? Array . from ( Object . keys ( options ) ) : [ ] ;
if ( has _prevent _default )
modifiers . push ( 'preventDefault' ) ;
if ( has _stop _propagation )
modifiers . push ( 'stopPropagation' ) ;
dispatch _dev ( 'SvelteDOMAddEventListener' , { node , event , handler , modifiers } ) ;
const dispose = listen ( node , event , handler , options ) ;
return ( ) => {
dispatch _dev ( 'SvelteDOMRemoveEventListener' , { node , event , handler , modifiers } ) ;
dispose ( ) ;
} ;
}
function attr _dev ( node , attribute , value ) {
attr ( node , attribute , value ) ;
if ( value == null )
dispatch _dev ( 'SvelteDOMRemoveAttribute' , { node , attribute } ) ;
else
dispatch _dev ( 'SvelteDOMSetAttribute' , { node , attribute , value } ) ;
}
function set _data _dev ( text , data ) {
data = '' + data ;
if ( text . wholeText === data )
return ;
dispatch _dev ( 'SvelteDOMSetData' , { node : text , data } ) ;
text . data = data ;
}
function validate _each _argument ( arg ) {
if ( typeof arg !== 'string' && ! ( arg && typeof arg === 'object' && 'length' in arg ) ) {
let msg = '{#each} only iterates over array-like objects.' ;
if ( typeof Symbol === 'function' && arg && Symbol . iterator in arg ) {
msg += ' You can use a spread to convert this iterable into an array.' ;
}
throw new Error ( msg ) ;
}
}
function validate _slots ( name , slot , keys ) {
for ( const slot _key of Object . keys ( slot ) ) {
if ( ! ~ keys . indexOf ( slot _key ) ) {
console . warn ( ` < ${ name } > received an unexpected slot " ${ slot _key } ". ` ) ;
}
}
}
class SvelteComponentDev extends SvelteComponent {
constructor ( options ) {
if ( ! options || ( ! options . target && ! options . $$inline ) ) {
throw new Error ( "'target' is a required option" ) ;
}
super ( ) ;
}
$destroy ( ) {
super . $destroy ( ) ;
this . $destroy = ( ) => {
console . warn ( 'Component was already destroyed' ) ; // eslint-disable-line no-console
} ;
}
$capture _state ( ) { }
$inject _state ( ) { }
}
/* src/Link.svelte generated by Svelte v3.29.7 */
const file = "src/Link.svelte" ;
function create _fragment ( ctx ) {
let a ;
let current ;
const default _slot _template = /*#slots*/ ctx [ 2 ] . default ;
const default _slot = create _slot ( default _slot _template , ctx , /*$$scope*/ ctx [ 1 ] , null ) ;
const block = {
c : function create ( ) {
a = element ( "a" ) ;
if ( default _slot ) default _slot . c ( ) ;
attr _dev ( a , "href" , /*href*/ ctx [ 0 ] ) ;
attr _dev ( a , "rel" , "noopener" ) ;
attr _dev ( a , "target" , "_blank" ) ;
add _location ( a , file , 4 , 0 , 39 ) ;
} ,
l : function claim ( nodes ) {
throw new Error ( "options.hydrate only works if the component was compiled with the `hydratable: true` option" ) ;
} ,
m : function mount ( target , anchor ) {
insert _dev ( target , a , anchor ) ;
if ( default _slot ) {
default _slot . m ( a , null ) ;
}
current = true ;
} ,
p : function update ( ctx , [ dirty ] ) {
if ( default _slot ) {
if ( default _slot . p && dirty & /*$$scope*/ 2 ) {
update _slot ( default _slot , default _slot _template , ctx , /*$$scope*/ ctx [ 1 ] , dirty , null , null ) ;
}
}
if ( ! current || dirty & /*href*/ 1 ) {
attr _dev ( a , "href" , /*href*/ ctx [ 0 ] ) ;
}
} ,
i : function intro ( local ) {
if ( current ) return ;
transition _in ( default _slot , local ) ;
current = true ;
} ,
o : function outro ( local ) {
transition _out ( default _slot , local ) ;
current = false ;
} ,
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( a ) ;
if ( default _slot ) default _slot . d ( detaching ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _fragment . name ,
type : "component" ,
source : "" ,
ctx
} ) ;
return block ;
}
function instance ( $$self , $$props , $$invalidate ) {
let { $$slots : slots = { } , $$scope } = $$props ;
validate _slots ( "Link" , slots , [ 'default' ] ) ;
let { href } = $$props ;
const writable _props = [ "href" ] ;
Object . keys ( $$props ) . forEach ( key => {
if ( ! ~ writable _props . indexOf ( key ) && key . slice ( 0 , 2 ) !== "$$" ) console . warn ( ` <Link> was created with unknown prop ' ${ key } ' ` ) ;
} ) ;
$$self . $$set = $$props => {
if ( "href" in $$props ) $$invalidate ( 0 , href = $$props . href ) ;
if ( "$$scope" in $$props ) $$invalidate ( 1 , $$scope = $$props . $$scope ) ;
} ;
$$self . $capture _state = ( ) => ( { href } ) ;
$$self . $inject _state = $$props => {
if ( "href" in $$props ) $$invalidate ( 0 , href = $$props . href ) ;
} ;
if ( $$props && "$$inject" in $$props ) {
$$self . $inject _state ( $$props . $$inject ) ;
}
return [ href , $$scope , slots ] ;
}
class Link extends SvelteComponentDev {
constructor ( options ) {
super ( options ) ;
init ( this , options , instance , create _fragment , safe _not _equal , { href : 0 } ) ;
dispatch _dev ( "SvelteRegisterComponent" , {
component : this ,
tagName : "Link" ,
options ,
id : create _fragment . name
} ) ;
const { ctx } = this . $$ ;
const props = options . props || { } ;
if ( /*href*/ ctx [ 0 ] === undefined && ! ( "href" in props ) ) {
console . warn ( "<Link> was created without expected prop 'href'" ) ;
}
}
get href ( ) {
throw new Error ( "<Link>: Props cannot be read directly from the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
set href ( value ) {
throw new Error ( "<Link>: Props cannot be set directly on the component instance unless compiling with 'accessors: true' or '<svelte:options accessors/>'" ) ;
}
}
/* src/InfoPopup.svelte generated by Svelte v3.29.7 */
const file$1 = "src/InfoPopup.svelte" ;
// (14:4) <Link href="https://github.com/macbre/phantomas">
function create _default _slot ( ctx ) {
let t ;
const block = {
c : function create ( ) {
t = text ( "Phantomas" ) ;
} ,
m : function mount ( target , anchor ) {
insert _dev ( target , t , anchor ) ;
} ,
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( t ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _default _slot . name ,
type : "slot" ,
source : "(14:4) <Link href=\\\"https://github.com/macbre/phantomas\\\">" ,
ctx
} ) ;
return block ;
}
function create _fragment$1 ( ctx ) {
let article ;
let header ;
let h1 ;
let t1 ;
let p0 ;
let t3 ;
let p1 ;
let t4 ;
let link ;
let t5 ;
let t6 ;
let p2 ;
let t8 ;
let p3 ;
let strong ;
let t10 ;
let current ;
link = new Link ( {
props : {
href : "https://github.com/macbre/phantomas" ,
$$slots : { default : [ create _default _slot ] } ,
$$scope : { ctx }
} ,
$$inline : true
} ) ;
const block = {
c : function create ( ) {
article = element ( "article" ) ;
header = element ( "header" ) ;
h1 = element ( "h1" ) ;
h1 . textContent = "Technical Details" ;
t1 = space ( ) ;
p0 = element ( "p" ) ;
p0 . textContent = "The values shown in the list are URL, Total Weight, Content Ratio." ;
t3 = space ( ) ;
p1 = element ( "p" ) ;
t4 = text ( "Websites listed here are downloaded and analyzed with\n " ) ;
create _component ( link . $$ . fragment ) ;
t5 = text ( ".\n The total weight is counted and then the size of actual content is measured\n and shown as a ratio." ) ;
t6 = space ( ) ;
p2 = element ( "p" ) ;
p2 . textContent = "For example: If a website has a total weight of 100kb and 60kb are the\n documents structure, text, images, videos and so on, then the content ratio\n is 60%. The rest are extras like CSS, JavaScript and so on. It is hard to\n say what a good ratio is but my gut feeling is that everything above 20% is\n pretty good already." ;
t8 = space ( ) ;
p3 = element ( "p" ) ;
strong = element ( "strong" ) ;
strong . textContent = "Disclaimer:" ;
t10 = text ( " Currently, inline scripts and styles are\n measured as content due to technical limitations of Phantomas. This will\n hopefully be fixed soon." ) ;
add _location ( h1 , file$1 , 6 , 4 , 96 ) ;
add _location ( header , file$1 , 5 , 2 , 83 ) ;
add _location ( p0 , file$1 , 8 , 2 , 137 ) ;
add _location ( p1 , file$1 , 11 , 2 , 221 ) ;
add _location ( p2 , file$1 , 17 , 2 , 469 ) ;
add _location ( strong , file$1 , 25 , 4 , 828 ) ;
add _location ( p3 , file$1 , 24 , 2 , 820 ) ;
attr _dev ( article , "id" , "info-popup" ) ;
add _location ( article , file$1 , 4 , 0 , 55 ) ;
} ,
l : function claim ( nodes ) {
throw new Error ( "options.hydrate only works if the component was compiled with the `hydratable: true` option" ) ;
} ,
m : function mount ( target , anchor ) {
insert _dev ( target , article , anchor ) ;
append _dev ( article , header ) ;
append _dev ( header , h1 ) ;
append _dev ( article , t1 ) ;
append _dev ( article , p0 ) ;
append _dev ( article , t3 ) ;
append _dev ( article , p1 ) ;
append _dev ( p1 , t4 ) ;
mount _component ( link , p1 , null ) ;
append _dev ( p1 , t5 ) ;
append _dev ( article , t6 ) ;
append _dev ( article , p2 ) ;
append _dev ( article , t8 ) ;
append _dev ( article , p3 ) ;
append _dev ( p3 , strong ) ;
append _dev ( p3 , t10 ) ;
current = true ;
} ,
p : function update ( ctx , [ dirty ] ) {
const link _changes = { } ;
if ( dirty & /*$$scope*/ 1 ) {
link _changes . $$scope = { dirty , ctx } ;
}
link . $set ( link _changes ) ;
} ,
i : function intro ( local ) {
if ( current ) return ;
transition _in ( link . $$ . fragment , local ) ;
current = true ;
} ,
o : function outro ( local ) {
transition _out ( link . $$ . fragment , local ) ;
current = false ;
} ,
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( article ) ;
destroy _component ( link ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _fragment$1 . name ,
type : "component" ,
source : "" ,
ctx
} ) ;
return block ;
}
function instance$1 ( $$self , $$props , $$invalidate ) {
let { $$slots : slots = { } , $$scope } = $$props ;
validate _slots ( "InfoPopup" , slots , [ ] ) ;
const writable _props = [ ] ;
Object . keys ( $$props ) . forEach ( key => {
if ( ! ~ writable _props . indexOf ( key ) && key . slice ( 0 , 2 ) !== "$$" ) console . warn ( ` <InfoPopup> was created with unknown prop ' ${ key } ' ` ) ;
} ) ;
$$self . $capture _state = ( ) => ( { Link } ) ;
return [ ] ;
}
class InfoPopup extends SvelteComponentDev {
constructor ( options ) {
super ( options ) ;
init ( this , options , instance$1 , create _fragment$1 , safe _not _equal , { } ) ;
dispatch _dev ( "SvelteRegisterComponent" , {
component : this ,
tagName : "InfoPopup" ,
options ,
id : create _fragment$1 . name
} ) ;
}
}
var data = [ { url : "https://koehr.in" , contentWeight : 23078 , extraWeight : 66537 , stamp : 1606004545427 } , { url : "https://koehr.tech" , contentWeight : 4964 , extraWeight : 20108 , stamp : 1606004547391 } , { url : "https://sjmulder.nl" , contentWeight : 2361 , extraWeight : 0 , stamp : 1606004663706 } , { url : "http://cyberia.host" , contentWeight : 1191 , extraWeight : 0 , stamp : 1606004664417 } , { url : "https://text.npr.org" , contentWeight : 2760 , extraWeight : 0 , stamp : 1606004665037 } , { url : "https://playerone.kevincox.ca" , contentWeight : 1904 , extraWeight : 42661 , stamp : 1606004665881 } , { url : "https://dotfilehub.com" , contentWeight : 961 , extraWeight : 1281 , stamp : 1606004667422 } , { url : "https://manpages.bsd.lv" , contentWeight : 7045 , extraWeight : 1346 , stamp : 1606004669823 } , { url : "https://danluu.com" , contentWeight : 2895 , extraWeight : 0 , stamp : 1606004670441 } , { url : "https://gtf.io" , contentWeight : 2040 , extraWeight : 2752 , stamp : 1606004671103 } , { url : "http://minid.net" , contentWeight : 4110 , extraWeight : 0 , stamp : 1606004672171 } ] ;
/* src/App.svelte generated by Svelte v3.29.7 */
const file$2 = "src/App.svelte" ;
function get _each _context ( ctx , list , i ) {
const child _ctx = ctx . slice ( ) ;
child _ctx [ 7 ] = list [ i ] ;
return child _ctx ;
}
function get _each _context _1 ( ctx , list , i ) {
const child _ctx = ctx . slice ( ) ;
child _ctx [ 10 ] = list [ i ] ;
return child _ctx ;
}
// (38:4) {#each sortParameters as param}
function create _each _block _1 ( ctx ) {
let option ;
let t0 ;
let t1 _value = /*param*/ ctx [ 10 ] + "" ;
let t1 ;
let option _value _value ;
const block = {
c : function create ( ) {
option = element ( "option" ) ;
t0 = text ( "content-" ) ;
t1 = text ( t1 _value ) ;
option . _ _value = option _value _value = /*param*/ ctx [ 10 ] ;
option . value = option . _ _value ;
add _location ( option , file$2 , 38 , 4 , 1000 ) ;
} ,
m : function mount ( target , anchor ) {
insert _dev ( target , option , anchor ) ;
append _dev ( option , t0 ) ;
append _dev ( option , t1 ) ;
} ,
p : noop ,
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( option ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _each _block _1 . name ,
type : "each" ,
source : "(38:4) {#each sortParameters as param}" ,
ctx
} ) ;
return block ;
}
// (45:0) {#if showInfoPopup}
function create _if _block ( ctx ) {
let infopopup ;
let current ;
infopopup = new InfoPopup ( { $$inline : true } ) ;
const block = {
c : function create ( ) {
create _component ( infopopup . $$ . fragment ) ;
} ,
m : function mount ( target , anchor ) {
mount _component ( infopopup , target , anchor ) ;
current = true ;
} ,
i : function intro ( local ) {
if ( current ) return ;
transition _in ( infopopup . $$ . fragment , local ) ;
current = true ;
} ,
o : function outro ( local ) {
transition _out ( infopopup . $$ . fragment , local ) ;
current = false ;
} ,
d : function destroy ( detaching ) {
destroy _component ( infopopup , detaching ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _if _block . name ,
type : "if" ,
source : "(45:0) {#if showInfoPopup}" ,
ctx
} ) ;
return block ;
}
// (53:24) <Link href={page.url}>
function create _default _slot$1 ( ctx ) {
let t _value = stripped ( /*page*/ ctx [ 7 ] . url ) + "" ;
let t ;
const block = {
c : function create ( ) {
t = text ( t _value ) ;
} ,
m : function mount ( target , anchor ) {
insert _dev ( target , t , anchor ) ;
} ,
p : function update ( ctx , dirty ) {
if ( dirty & /*sortedPages*/ 4 && t _value !== ( t _value = stripped ( /*page*/ ctx [ 7 ] . url ) + "" ) ) set _data _dev ( t , t _value ) ;
} ,
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( t ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _default _slot$1 . name ,
type : "slot" ,
source : "(53:24) <Link href={page.url}>" ,
ctx
} ) ;
return block ;
}
// (50:2) {#each sortedPages as page}
function create _each _block ( ctx ) {
let li ;
let div0 ;
let span0 ;
let link ;
let t0 ;
let span1 ;
let t1 _value = /*page*/ ctx [ 7 ] . size + "" ;
let t1 ;
let t2 ;
let t3 ;
let span2 ;
let t4 _value = /*page*/ ctx [ 7 ] . ratio + "" ;
let t4 ;
let t5 ;
let t6 ;
let div1 ;
let t7 ;
let div2 ;
let t8 ;
let li _style _value ;
let current ;
link = new Link ( {
props : {
href : /*page*/ ctx [ 7 ] . url ,
$$slots : { default : [ create _default _slot$1 ] } ,
$$scope : { ctx }
} ,
$$inline : true
} ) ;
const block = {
c : function create ( ) {
li = element ( "li" ) ;
div0 = element ( "div" ) ;
span0 = element ( "span" ) ;
create _component ( link . $$ . fragment ) ;
t0 = space ( ) ;
span1 = element ( "span" ) ;
t1 = text ( t1 _value ) ;
t2 = text ( "kb" ) ;
t3 = space ( ) ;
span2 = element ( "span" ) ;
t4 = text ( t4 _value ) ;
t5 = text ( "%" ) ;
t6 = space ( ) ;
div1 = element ( "div" ) ;
t7 = space ( ) ;
div2 = element ( "div" ) ;
t8 = space ( ) ;
attr _dev ( span0 , "class" , "url" ) ;
add _location ( span0 , file$2 , 52 , 6 , 1355 ) ;
attr _dev ( span1 , "class" , "size" ) ;
add _location ( span1 , file$2 , 53 , 6 , 1436 ) ;
attr _dev ( span2 , "class" , "ratio" ) ;
add _location ( span2 , file$2 , 54 , 6 , 1482 ) ;
attr _dev ( div0 , "class" , "entry" ) ;
add _location ( div0 , file$2 , 51 , 4 , 1329 ) ;
attr _dev ( div1 , "class" , "entry-size-bar" ) ;
toggle _class ( div1 , "highlighted" , /*sortParam*/ ctx [ 0 ] === "size" ) ;
toggle _class ( div1 , "yellow" , /*page*/ ctx [ 7 ] . size > yellowSizeThreshhold ) ;
toggle _class ( div1 , "red" , /*page*/ ctx [ 7 ] . size > redSizeThreshhold ) ;
add _location ( div1 , file$2 , 56 , 4 , 1538 ) ;
attr _dev ( div2 , "class" , "entry-ratio-bar" ) ;
toggle _class ( div2 , "highlighted" , /*sortParam*/ ctx [ 0 ] === "ratio" ) ;
toggle _class ( div2 , "yellow" , /*page*/ ctx [ 7 ] . ratio > yellowRatioThreshhold ) ;
toggle _class ( div2 , "red" , /*page*/ ctx [ 7 ] . ratio > redRatioThreshhold ) ;
add _location ( div2 , file$2 , 62 , 4 , 1732 ) ;
attr _dev ( li , "style" , li _style _value = ` --size: ${ /*page*/ ctx [ 7 ] . size } ;--ratio: ${ /*page*/ ctx [ 7 ] . ratio } % ` ) ;
add _location ( li , file$2 , 50 , 2 , 1267 ) ;
} ,
m : function mount ( target , anchor ) {
insert _dev ( target , li , anchor ) ;
append _dev ( li , div0 ) ;
append _dev ( div0 , span0 ) ;
mount _component ( link , span0 , null ) ;
append _dev ( div0 , t0 ) ;
append _dev ( div0 , span1 ) ;
append _dev ( span1 , t1 ) ;
append _dev ( span1 , t2 ) ;
append _dev ( div0 , t3 ) ;
append _dev ( div0 , span2 ) ;
append _dev ( span2 , t4 ) ;
append _dev ( span2 , t5 ) ;
append _dev ( li , t6 ) ;
append _dev ( li , div1 ) ;
append _dev ( li , t7 ) ;
append _dev ( li , div2 ) ;
append _dev ( li , t8 ) ;
current = true ;
} ,
p : function update ( ctx , dirty ) {
const link _changes = { } ;
if ( dirty & /*sortedPages*/ 4 ) link _changes . href = /*page*/ ctx [ 7 ] . url ;
if ( dirty & /*$$scope, sortedPages*/ 8196 ) {
link _changes . $$scope = { dirty , ctx } ;
}
link . $set ( link _changes ) ;
if ( ( ! current || dirty & /*sortedPages*/ 4 ) && t1 _value !== ( t1 _value = /*page*/ ctx [ 7 ] . size + "" ) ) set _data _dev ( t1 , t1 _value ) ;
if ( ( ! current || dirty & /*sortedPages*/ 4 ) && t4 _value !== ( t4 _value = /*page*/ ctx [ 7 ] . ratio + "" ) ) set _data _dev ( t4 , t4 _value ) ;
if ( dirty & /*sortParam*/ 1 ) {
toggle _class ( div1 , "highlighted" , /*sortParam*/ ctx [ 0 ] === "size" ) ;
}
if ( dirty & /*sortedPages, yellowSizeThreshhold*/ 4 ) {
toggle _class ( div1 , "yellow" , /*page*/ ctx [ 7 ] . size > yellowSizeThreshhold ) ;
}
if ( dirty & /*sortedPages, redSizeThreshhold*/ 4 ) {
toggle _class ( div1 , "red" , /*page*/ ctx [ 7 ] . size > redSizeThreshhold ) ;
}
if ( dirty & /*sortParam*/ 1 ) {
toggle _class ( div2 , "highlighted" , /*sortParam*/ ctx [ 0 ] === "ratio" ) ;
}
if ( dirty & /*sortedPages, yellowRatioThreshhold*/ 4 ) {
toggle _class ( div2 , "yellow" , /*page*/ ctx [ 7 ] . ratio > yellowRatioThreshhold ) ;
}
if ( dirty & /*sortedPages, redRatioThreshhold*/ 4 ) {
toggle _class ( div2 , "red" , /*page*/ ctx [ 7 ] . ratio > redRatioThreshhold ) ;
}
if ( ! current || dirty & /*sortedPages*/ 4 && li _style _value !== ( li _style _value = ` --size: ${ /*page*/ ctx [ 7 ] . size } ;--ratio: ${ /*page*/ ctx [ 7 ] . ratio } % ` ) ) {
attr _dev ( li , "style" , li _style _value ) ;
}
} ,
i : function intro ( local ) {
if ( current ) return ;
transition _in ( link . $$ . fragment , local ) ;
current = true ;
} ,
o : function outro ( local ) {
transition _out ( link . $$ . fragment , local ) ;
current = false ;
} ,
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( li ) ;
destroy _component ( link ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _each _block . name ,
type : "each" ,
source : "(50:2) {#each sortedPages as page}" ,
ctx
} ) ;
return block ;
}
function create _fragment$2 ( ctx ) {
let header ;
let t0 ;
let select ;
let t1 ;
let button ;
let t2 _value = ( /*showInfoPopup*/ ctx [ 1 ] ? "x" : "How does this work?" ) + "" ;
let t2 ;
let t3 ;
let t4 ;
let ol ;
let current ;
let mounted ;
let dispose ;
let each _value _1 = /*sortParameters*/ ctx [ 3 ] ;
validate _each _argument ( each _value _1 ) ;
let each _blocks _1 = [ ] ;
for ( let i = 0 ; i < each _value _1 . length ; i += 1 ) {
each _blocks _1 [ i ] = create _each _block _1 ( get _each _context _1 ( ctx , each _value _1 , i ) ) ;
}
let if _block = /*showInfoPopup*/ ctx [ 1 ] && create _if _block ( ctx ) ;
let each _value = /*sortedPages*/ ctx [ 2 ] ;
validate _each _argument ( each _value ) ;
let each _blocks = [ ] ;
for ( let i = 0 ; i < each _value . length ; i += 1 ) {
each _blocks [ i ] = create _each _block ( get _each _context ( ctx , each _value , i ) ) ;
}
const out = i => transition _out ( each _blocks [ i ] , 1 , 1 , ( ) => {
each _blocks [ i ] = null ;
} ) ;
const block = {
c : function create ( ) {
header = element ( "header" ) ;
t0 = text ( "Sort by:\n " ) ;
select = element ( "select" ) ;
for ( let i = 0 ; i < each _blocks _1 . length ; i += 1 ) {
each _blocks _1 [ i ] . c ( ) ;
}
t1 = space ( ) ;
button = element ( "button" ) ;
t2 = text ( t2 _value ) ;
t3 = space ( ) ;
if ( if _block ) if _block . c ( ) ;
t4 = space ( ) ;
ol = element ( "ol" ) ;
for ( let i = 0 ; i < each _blocks . length ; i += 1 ) {
each _blocks [ i ] . c ( ) ;
}
if ( /*sortParam*/ ctx [ 0 ] === void 0 ) add _render _callback ( ( ) => /*select_change_handler*/ ctx [ 5 ] . call ( select ) ) ;
add _location ( select , file$2 , 36 , 2 , 928 ) ;
attr _dev ( button , "class" , "float-right" ) ;
add _location ( button , file$2 , 41 , 2 , 1073 ) ;
add _location ( header , file$2 , 34 , 0 , 906 ) ;
add _location ( ol , file$2 , 48 , 0 , 1230 ) ;
} ,
l : function claim ( nodes ) {
throw new Error ( "options.hydrate only works if the component was compiled with the `hydratable: true` option" ) ;
} ,
m : function mount ( target , anchor ) {
insert _dev ( target , header , anchor ) ;
append _dev ( header , t0 ) ;
append _dev ( header , select ) ;
for ( let i = 0 ; i < each _blocks _1 . length ; i += 1 ) {
each _blocks _1 [ i ] . m ( select , null ) ;
}
select _option ( select , /*sortParam*/ ctx [ 0 ] ) ;
append _dev ( header , t1 ) ;
append _dev ( header , button ) ;
append _dev ( button , t2 ) ;
insert _dev ( target , t3 , anchor ) ;
if ( if _block ) if _block . m ( target , anchor ) ;
insert _dev ( target , t4 , anchor ) ;
insert _dev ( target , ol , anchor ) ;
for ( let i = 0 ; i < each _blocks . length ; i += 1 ) {
each _blocks [ i ] . m ( ol , null ) ;
}
current = true ;
if ( ! mounted ) {
dispose = [
listen _dev ( select , "change" , /*select_change_handler*/ ctx [ 5 ] ) ,
listen _dev ( button , "click" , /*toggleInfo*/ ctx [ 4 ] , false , false , false )
] ;
mounted = true ;
}
} ,
p : function update ( ctx , [ dirty ] ) {
if ( dirty & /*sortParameters*/ 8 ) {
each _value _1 = /*sortParameters*/ ctx [ 3 ] ;
validate _each _argument ( each _value _1 ) ;
let i ;
for ( i = 0 ; i < each _value _1 . length ; i += 1 ) {
const child _ctx = get _each _context _1 ( ctx , each _value _1 , i ) ;
if ( each _blocks _1 [ i ] ) {
each _blocks _1 [ i ] . p ( child _ctx , dirty ) ;
} else {
each _blocks _1 [ i ] = create _each _block _1 ( child _ctx ) ;
each _blocks _1 [ i ] . c ( ) ;
each _blocks _1 [ i ] . m ( select , null ) ;
}
}
for ( ; i < each _blocks _1 . length ; i += 1 ) {
each _blocks _1 [ i ] . d ( 1 ) ;
}
each _blocks _1 . length = each _value _1 . length ;
}
if ( dirty & /*sortParam, sortParameters*/ 9 ) {
select _option ( select , /*sortParam*/ ctx [ 0 ] ) ;
}
if ( ( ! current || dirty & /*showInfoPopup*/ 2 ) && t2 _value !== ( t2 _value = ( /*showInfoPopup*/ ctx [ 1 ] ? "x" : "How does this work?" ) + "" ) ) set _data _dev ( t2 , t2 _value ) ;
if ( /*showInfoPopup*/ ctx [ 1 ] ) {
if ( if _block ) {
if ( dirty & /*showInfoPopup*/ 2 ) {
transition _in ( if _block , 1 ) ;
}
} else {
if _block = create _if _block ( ctx ) ;
if _block . c ( ) ;
transition _in ( if _block , 1 ) ;
if _block . m ( t4 . parentNode , t4 ) ;
}
} else if ( if _block ) {
group _outros ( ) ;
transition _out ( if _block , 1 , 1 , ( ) => {
if _block = null ;
} ) ;
check _outros ( ) ;
}
if ( dirty & /*sortedPages, sortParam, yellowRatioThreshhold, redRatioThreshhold, yellowSizeThreshhold, redSizeThreshhold, stripped*/ 5 ) {
each _value = /*sortedPages*/ ctx [ 2 ] ;
validate _each _argument ( each _value ) ;
let i ;
for ( i = 0 ; i < each _value . length ; i += 1 ) {
const child _ctx = get _each _context ( ctx , each _value , i ) ;
if ( each _blocks [ i ] ) {
each _blocks [ i ] . p ( child _ctx , dirty ) ;
transition _in ( each _blocks [ i ] , 1 ) ;
} else {
each _blocks [ i ] = create _each _block ( child _ctx ) ;
each _blocks [ i ] . c ( ) ;
transition _in ( each _blocks [ i ] , 1 ) ;
each _blocks [ i ] . m ( ol , null ) ;
}
}
group _outros ( ) ;
for ( i = each _value . length ; i < each _blocks . length ; i += 1 ) {
out ( i ) ;
}
check _outros ( ) ;
}
} ,
i : function intro ( local ) {
if ( current ) return ;
transition _in ( if _block ) ;
for ( let i = 0 ; i < each _value . length ; i += 1 ) {
transition _in ( each _blocks [ i ] ) ;
}
current = true ;
} ,
o : function outro ( local ) {
transition _out ( if _block ) ;
each _blocks = each _blocks . filter ( Boolean ) ;
for ( let i = 0 ; i < each _blocks . length ; i += 1 ) {
transition _out ( each _blocks [ i ] ) ;
}
current = false ;
} ,
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( header ) ;
destroy _each ( each _blocks _1 , detaching ) ;
if ( detaching ) detach _dev ( t3 ) ;
if ( if _block ) if _block . d ( detaching ) ;
if ( detaching ) detach _dev ( t4 ) ;
if ( detaching ) detach _dev ( ol ) ;
destroy _each ( each _blocks , detaching ) ;
mounted = false ;
run _all ( dispose ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _fragment$2 . name ,
type : "component" ,
source : "" ,
ctx
} ) ;
return block ;
}
const yellowSizeThreshhold = 200 ;
const redSizeThreshhold = 225 ;
const yellowRatioThreshhold = 50 ;
const redRatioThreshhold = 25 ;
function stripped ( url ) {
return url . replaceAll ( /(^https?:\/\/|\/$)/g , "" ) ;
}
function instance$2 ( $$self , $$props , $$invalidate ) {
let { $$slots : slots = { } , $$scope } = $$props ;
validate _slots ( "App" , slots , [ ] ) ;
const pages = data . map ( page => {
const totalWeigth = page . contentWeight + page . extraWeight ;
const size = Math . round ( totalWeigth / 1024 ) ;
const ratio = Math . round ( page . contentWeight * 100 / totalWeigth ) ;
return { url : page . url , size , ratio } ;
} ) ;
const sortParameters = [ "size" , "ratio" ] ;
let sortParam = sortParameters [ 0 ] ;
let showInfoPopup = false ;
function toggleInfo ( ) {
$$invalidate ( 1 , showInfoPopup = ! showInfoPopup ) ;
}
const writable _props = [ ] ;
Object . keys ( $$props ) . forEach ( key => {
if ( ! ~ writable _props . indexOf ( key ) && key . slice ( 0 , 2 ) !== "$$" ) console . warn ( ` <App> was created with unknown prop ' ${ key } ' ` ) ;
} ) ;
function select _change _handler ( ) {
sortParam = select _value ( this ) ;
$$invalidate ( 0 , sortParam ) ;
$$invalidate ( 3 , sortParameters ) ;
}
$$self . $capture _state = ( ) => ( {
InfoPopup ,
Link ,
data ,
yellowSizeThreshhold ,
redSizeThreshhold ,
yellowRatioThreshhold ,
redRatioThreshhold ,
pages ,
sortParameters ,
sortParam ,
showInfoPopup ,
stripped ,
toggleInfo ,
sortedPages
} ) ;
$$self . $inject _state = $$props => {
if ( "sortParam" in $$props ) $$invalidate ( 0 , sortParam = $$props . sortParam ) ;
if ( "showInfoPopup" in $$props ) $$invalidate ( 1 , showInfoPopup = $$props . showInfoPopup ) ;
if ( "sortedPages" in $$props ) $$invalidate ( 2 , sortedPages = $$props . sortedPages ) ;
} ;
let sortedPages ;
if ( $$props && "$$inject" in $$props ) {
$$self . $inject _state ( $$props . $$inject ) ;
}
$$self . $$ . update = ( ) => {
if ( $$self . $$ . dirty & /*sortParam*/ 1 ) {
$$invalidate ( 2 , sortedPages = pages . sort ( ( a , b ) => {
return sortParam === "size"
? a . size - b . size
: b . ratio - a . ratio ;
} ) ) ;
}
} ;
return [
sortParam ,
showInfoPopup ,
sortedPages ,
sortParameters ,
toggleInfo ,
select _change _handler
] ;
}
class App extends SvelteComponentDev {
constructor ( options ) {
super ( options ) ;
init ( this , options , instance$2 , create _fragment$2 , safe _not _equal , { } ) ;
dispatch _dev ( "SvelteRegisterComponent" , {
component : this ,
tagName : "App" ,
options ,
id : create _fragment$2 . name
} ) ;
}
}
var app = new App ( { target : document . getElementById ( 'members-table' ) } ) ;
return app ;
} ( ) ) ;
//# sourceMappingURL=bundle.js.map