2023-06-24 04:39:41 +07:00
( function ( l , r ) { if ( ! l || l . getElementById ( 'livereloadscript' ) ) return ; r = l . createElement ( 'script' ) ; r . async = 1 ; r . src = '//' + ( self . location . host || 'localhost' ) . split ( ':' ) [ 0 ] + ':35729/livereload.js?snipver=1' ; r . id = 'livereloadscript' ; l . getElementsByTagName ( 'head' ) [ 0 ] . appendChild ( r ) } ) ( self . document ) ;
2023-06-24 20:44:16 +07:00
import { S as SvelteElement , i as init , a as attribute _to _object , b as insert _dev , s as safe _not _equal , v as validate _each _argument , d as dispatch _dev , c as validate _slots , o as onMount , e as element , f as space , n as noop , g as add _location , h as set _custom _element _data , j as attr _dev , k as append _dev , l as detach _dev , m as destroy _each , t as text } from './index-3e97afc8.js' ;
import { communities , addMarkersCommunities } from '../../../../../../../../../js/communities.js' ;
import '../../../../../../../../../js/components/map-component.js' ;
2023-06-24 04:39:41 +07:00
/* src\communities-component.svelte generated by Svelte v3.52.0 */
2023-06-24 20:44:16 +07:00
const file = "src\\communities-component.svelte" ;
function get _each _context ( ctx , list , i ) {
const child _ctx = ctx . slice ( ) ;
child _ctx [ 1 ] = list [ i ] ;
return child _ctx ;
}
// (31:8) {#each communities as community}
function create _each _block ( ctx ) {
let div ;
let p0 ;
let b0 ;
let t1 _value = /*community*/ ctx [ 1 ] . location [ 0 ] + "" ;
let t1 ;
let t2 ;
let p1 ;
let b1 ;
let t4 _value = /*community*/ ctx [ 1 ] . status + "" ;
let t4 ;
let t5 ;
let p2 ;
let b2 ;
let t7 _value = /*community*/ ctx [ 1 ] . members + "" ;
let t7 ;
let t8 ;
let p3 ;
let b3 ;
let a ;
let t10 _value = /*community*/ ctx [ 1 ] . contact [ 1 ] + "" ;
let t10 ;
let t11 ;
const block = {
c : function create ( ) {
div = element ( "div" ) ;
p0 = element ( "p" ) ;
b0 = element ( "b" ) ;
b0 . textContent = "Location: " ;
t1 = text ( t1 _value ) ;
t2 = space ( ) ;
p1 = element ( "p" ) ;
b1 = element ( "b" ) ;
b1 . textContent = "Status: " ;
t4 = text ( t4 _value ) ;
t5 = space ( ) ;
p2 = element ( "p" ) ;
b2 = element ( "b" ) ;
b2 . textContent = "Members: " ;
t7 = text ( t7 _value ) ;
t8 = space ( ) ;
p3 = element ( "p" ) ;
b3 = element ( "b" ) ;
b3 . textContent = "Contact: " ;
a = element ( "a" ) ;
t10 = text ( t10 _value ) ;
t11 = space ( ) ;
add _location ( b0 , file , 32 , 19 , 1709 ) ;
add _location ( p0 , file , 32 , 16 , 1706 ) ;
add _location ( b1 , file , 33 , 19 , 1774 ) ;
add _location ( p1 , file , 33 , 16 , 1771 ) ;
add _location ( b2 , file , 34 , 19 , 1832 ) ;
add _location ( p2 , file , 34 , 16 , 1829 ) ;
add _location ( b3 , file , 35 , 19 , 1892 ) ;
attr _dev ( a , "href" , /*community*/ ctx [ 1 ] . contact [ 0 ] ) ;
attr _dev ( a , "target" , ";_blank;" ) ;
attr _dev ( a , "rel" , "noreferrer" ) ;
add _location ( a , file , 35 , 35 , 1908 ) ;
add _location ( p3 , file , 35 , 16 , 1889 ) ;
attr _dev ( div , "class" , "location-info" ) ;
add _location ( div , file , 31 , 12 , 1661 ) ;
} ,
m : function mount ( target , anchor ) {
insert _dev ( target , div , anchor ) ;
append _dev ( div , p0 ) ;
append _dev ( p0 , b0 ) ;
append _dev ( p0 , t1 ) ;
append _dev ( div , t2 ) ;
append _dev ( div , p1 ) ;
append _dev ( p1 , b1 ) ;
append _dev ( p1 , t4 ) ;
append _dev ( div , t5 ) ;
append _dev ( div , p2 ) ;
append _dev ( p2 , b2 ) ;
append _dev ( p2 , t7 ) ;
append _dev ( div , t8 ) ;
append _dev ( div , p3 ) ;
append _dev ( p3 , b3 ) ;
append _dev ( p3 , a ) ;
append _dev ( a , t10 ) ;
append _dev ( div , t11 ) ;
} ,
p : noop ,
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( div ) ;
}
} ;
dispatch _dev ( "SvelteRegisterBlock" , {
block ,
id : create _each _block . name ,
type : "each" ,
source : "(31:8) {#each communities as community}" ,
ctx
} ) ;
return block ;
}
2023-06-24 04:39:41 +07:00
function create _fragment ( ctx ) {
2023-06-24 20:44:16 +07:00
let div1 ;
let div0 ;
let h1 ;
let t1 ;
let p ;
let t3 ;
let h3 ;
let t5 ;
let map _component ;
let t6 ;
let h4 ;
let t8 ;
let each _value = communities ;
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 ) ) ;
}
2023-06-24 04:39:41 +07:00
const block = {
c : function create ( ) {
2023-06-24 20:44:16 +07:00
div1 = element ( "div" ) ;
div0 = element ( "div" ) ;
h1 = element ( "h1" ) ;
h1 . textContent = "Communities" ;
t1 = space ( ) ;
p = element ( "p" ) ;
p . textContent = "We build libertarian socialist communities by buying land, housing and the means of production which are then owned by the members of these communities. There is no private property within the communities and, therefore, exploitation and suffering that comes with it. Decisions are made through direct democracy with a focus on consensus ensuring that each community member has power over decisions that affect their life. Communities try to establish their own cooperatives in order to finance their development becoming financially independent and sustainable, which allows for their survival and growth. Within communities the gift economy is utilized whenever possible. Each community is a small beacon of socialism within the dark capitalist world showing us how good life can be if only we achieve our goal." ;
t3 = space ( ) ;
h3 = element ( "h3" ) ;
h3 . textContent = "Our communities" ;
t5 = space ( ) ;
map _component = element ( "map-component" ) ;
t6 = space ( ) ;
h4 = element ( "h4" ) ;
h4 . textContent = "Europe" ;
t8 = space ( ) ;
for ( let i = 0 ; i < each _blocks . length ; i += 1 ) {
each _blocks [ i ] . c ( ) ;
}
2023-06-24 04:39:41 +07:00
this . c = noop ;
2023-06-24 20:44:16 +07:00
add _location ( h1 , file , 25 , 8 , 612 ) ;
add _location ( p , file , 26 , 8 , 642 ) ;
add _location ( h3 , file , 27 , 8 , 1472 ) ;
set _custom _element _data ( map _component , "id" , "map" ) ;
set _custom _element _data ( map _component , "callback" , /*mapCallbackCommunities*/ ctx [ 0 ] ) ;
add _location ( map _component , file , 28 , 8 , 1506 ) ;
add _location ( h4 , file , 29 , 8 , 1590 ) ;
attr _dev ( div0 , "id" , "text-container" ) ;
add _location ( div0 , file , 24 , 4 , 577 ) ;
attr _dev ( div1 , "id" , "container" ) ;
add _location ( div1 , file , 22 , 0 , 490 ) ;
2023-06-24 04:39:41 +07:00
} ,
l : function claim ( nodes ) {
throw new Error ( "options.hydrate only works if the component was compiled with the `hydratable: true` option" ) ;
} ,
2023-06-24 20:44:16 +07:00
m : function mount ( target , anchor ) {
insert _dev ( target , div1 , anchor ) ;
append _dev ( div1 , div0 ) ;
append _dev ( div0 , h1 ) ;
append _dev ( div0 , t1 ) ;
append _dev ( div0 , p ) ;
append _dev ( div0 , t3 ) ;
append _dev ( div0 , h3 ) ;
append _dev ( div0 , t5 ) ;
append _dev ( div0 , map _component ) ;
append _dev ( div0 , t6 ) ;
append _dev ( div0 , h4 ) ;
append _dev ( div0 , t8 ) ;
for ( let i = 0 ; i < each _blocks . length ; i += 1 ) {
each _blocks [ i ] . m ( div0 , null ) ;
}
} ,
p : function update ( ctx , [ dirty ] ) {
if ( dirty & /*communities*/ 0 ) {
each _value = communities ;
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 ) ;
} else {
each _blocks [ i ] = create _each _block ( child _ctx ) ;
each _blocks [ i ] . c ( ) ;
each _blocks [ i ] . m ( div0 , null ) ;
}
}
for ( ; i < each _blocks . length ; i += 1 ) {
each _blocks [ i ] . d ( 1 ) ;
}
each _blocks . length = each _value . length ;
}
} ,
2023-06-24 04:39:41 +07:00
i : noop ,
o : noop ,
2023-06-24 20:44:16 +07:00
d : function destroy ( detaching ) {
if ( detaching ) detach _dev ( div1 ) ;
destroy _each ( each _blocks , detaching ) ;
}
2023-06-24 04:39:41 +07:00
} ;
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 ( 'communities-component' , slots , [ ] ) ;
2023-06-24 20:44:16 +07:00
function mapCallbackCommunities ( createMap ) {
let map = createMap ( [ 51.505 , - 0.09 ] , 3 ) ;
addMarkersCommunities ( map ) ;
}
2023-06-24 04:39:41 +07:00
onMount ( ( ) => {
} ) ;
const writable _props = [ ] ;
Object . keys ( $$props ) . forEach ( key => {
if ( ! ~ writable _props . indexOf ( key ) && key . slice ( 0 , 2 ) !== '$$' && key !== 'slot' ) console . warn ( ` <communities-component> was created with unknown prop ' ${ key } ' ` ) ;
} ) ;
2023-06-24 20:44:16 +07:00
$$self . $capture _state = ( ) => ( {
onMount ,
communities ,
addMarkersCommunities ,
mapCallbackCommunities
} ) ;
return [ mapCallbackCommunities ] ;
2023-06-24 04:39:41 +07:00
}
class Communities _component extends SvelteElement {
constructor ( options ) {
super ( ) ;
2023-06-24 20:44:16 +07:00
this . shadowRoot . innerHTML = ` <style>@import '/css/common.css';h4{margin-bottom:2rem}.location-info{position:relative;margin-bottom:2rem}.location-info p{margin-bottom:0}a{font-size:1.2rem;color:#DD1C1A}#map{--height:30rem;--width:100%;--margin-bottom:3rem}#text-container{max-width:calc(100vw - 4rem);margin:auto}h1{margin-bottom:1rem;font-size:2.5rem;text-align:center}h3{margin-bottom:1rem}#container{margin:auto;max-width:1200px;margin-top:1rem;margin-bottom:4rem}#container>div>p{margin-bottom:1rem}#container p{font-size:1.2rem;text-align:justify}</style> ` ;
2023-06-24 04:39:41 +07:00
init (
this ,
{
target : this . shadowRoot ,
props : attribute _to _object ( this . attributes ) ,
customElement : true
} ,
instance ,
create _fragment ,
safe _not _equal ,
{ } ,
null
) ;
if ( options ) {
if ( options . target ) {
insert _dev ( options . target , this , options . anchor ) ;
}
}
}
}
customElements . define ( "communities-component" , Communities _component ) ;
export { Communities _component as default } ;