From 3fb40c5660b73be01b8beaab3f40a0a2ba8338d9 Mon Sep 17 00:00:00 2001 From: a-ill Date: Sun, 25 Jun 2023 19:35:08 +0300 Subject: [PATCH] Update --- .../app/svelte/src/landing-component.svelte | 12 +- Server/config/discord.libsoc.org.conf | 41 + .../js/components/communities-component.js | 310 +--- Server/public/js/components/cookies-dialog.js | 100 +- .../js/components/cooperatives-component.js | 426 +----- .../public/js/components/footer-component.js | 189 +-- .../public/js/components/groups-component.js | 319 +--- Server/public/js/components/index-01c5cbf1.js | 1 + .../public/js/components/join-us-component.js | 295 +--- .../public/js/components/landing-component.js | 228 +-- .../public/js/components/legend-component.js | 363 +---- .../js/components/loadscreen-component.js | 116 +- .../js/components/manifesto-component.js | 1281 +---------------- Server/public/js/components/map-component.js | 153 +- .../public/js/components/navbar-component.js | 266 +--- Server/public/js/components/pane-aligner.js | 305 +--- .../public/js/components/select-component.js | 594 +------- .../public/js/components/switch-component.js | 210 +-- 18 files changed, 63 insertions(+), 5146 deletions(-) create mode 100644 Server/config/discord.libsoc.org.conf create mode 100644 Server/public/js/components/index-01c5cbf1.js diff --git a/Server/app/svelte/src/landing-component.svelte b/Server/app/svelte/src/landing-component.svelte index 3d31694..e051abe 100644 --- a/Server/app/svelte/src/landing-component.svelte +++ b/Server/app/svelte/src/landing-component.svelte @@ -24,22 +24,22 @@
-

We are people united around a single cause of bringing down authoritarian exploitative systems represented by different forms of capitalism and replacing them with libertarian socialist systems to create a more equitable and democratic world.

+

We are people united around a singular cause: bringing down authoritarian exploitative systems represented by various forms of capitalism and replacing them with libertarian socialist systems, with the goal of creating a more equitable and democratic world.

GROUPS

groups -

We organize into groups for education, advocacy and mutual aid. We aim to show people how the current politico-economic systems negatively affect our wellbeing, show them the alternatives, and engage in mutual aid to make our life under capitalism easier.

+

We organize groups for the purposes of education, advocacy, and mutual aid. Our objective is to demonstrate to people how the current politico-economic systems detrimentally impact our well-being, present them with alternative approaches, and engage in mutual aid to alleviate the challenges of living under capitalism.

COMMUNITIES

communities -

We build communities according to libertarian socialist principles where people own their land, their houses, the means of production and use direct democracy to make decisions. We are growing our socialist world one community at a time.

+

We establish communities based on libertarian socialist principles, where individuals have ownership of their land, houses, and the means of production as well as make decisions using direct democracy. We are gradually expanding our socialist world, one community at a time.

COOPERATIVES

coops -

We create worker cooperatives in order to finance the functioning of our groups and communities. Economic power determines political power, therefore, establishing cooperatives is one of the first steps towards achieving socialism by providing democratic workplaces for workers instead of authoritarian capitalist businesses.

+

We form worker cooperatives to finance the operations of our groups and communities. Recognizing that economic power influences political power, we consider the establishment of cooperatives to be one of the initial steps towards achieving socialism.

@@ -107,8 +107,8 @@ #container-grid { display: grid; - grid-template-columns: 1.1fr 1fr 1.33fr; - grid-gap: 3rem; + grid-template-columns: 1.2fr 1.05fr 1fr; + grid-gap: 4rem; } #container-grid > div { diff --git a/Server/config/discord.libsoc.org.conf b/Server/config/discord.libsoc.org.conf new file mode 100644 index 0000000..6090b38 --- /dev/null +++ b/Server/config/discord.libsoc.org.conf @@ -0,0 +1,41 @@ +server { + + server_name discord.libsoc.org; + + root /home/server/libsoc/Server/public/; + + add_header alt-svc 'h3=":443"; ma=2592000, h3-23=":443"; ma=86400, h3-29=":443"; ma=2592000'; + add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"; + + location / { + return 301 https://discord.com/channels/1114280699755778110/; + } + + location /invite { + return 301 https://discord.gg/xAPZmyr8B6; + } + + listen 443 http3; + listen 443 ssl http2; + ssl_certificate /etc/letsencrypt/live/libsoc.org/fullchain.pem; # managed by Certbot + ssl_certificate_key /etc/letsencrypt/live/libsoc.org/privkey.pem; # managed by Certbot + include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot + + ssl_buffer_size 4k; + ssl_stapling on; + ssl_stapling_verify on; + ssl_trusted_certificate /etc/letsencrypt/live/libsoc.org/fullchain.pem; + + resolver 1.1.1.1 1.0.0.1 valid=300s; + resolver_timeout 5s; +} + +server { + return 301 https://discord.libsoc.org$request_uri; + + listen 80; + listen [::]:80; + + server_name discord.libsoc.org; +} \ No newline at end of file diff --git a/Server/public/js/components/communities-component.js b/Server/public/js/components/communities-component.js index c1e7870..039150b 100644 --- a/Server/public/js/components/communities-component.js +++ b/Server/public/js/components/communities-component.js @@ -1,309 +1 @@ - -(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); -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 attr_dev, j as src_url_equal, k as set_custom_element_data, l as append_dev, m as detach_dev, p as destroy_each, t as text } from './index-9ff7cb25.js'; -import { communities, addMarkersCommunities } from '../../../../../../../../../js/communities.js'; -import '../../../../../../../../../js/components/map-component.js'; - -/* src\communities-component.svelte generated by Svelte v3.52.0 */ - -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; -} - -// (32: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, 33, 19, 1797); - add_location(p0, file, 33, 16, 1794); - add_location(b1, file, 34, 19, 1862); - add_location(p1, file, 34, 16, 1859); - add_location(b2, file, 35, 19, 1920); - add_location(p2, file, 35, 16, 1917); - add_location(b3, file, 36, 19, 1980); - attr_dev(a, "href", /*community*/ ctx[1].contact[0]); - attr_dev(a, "target", ";_blank;"); - attr_dev(a, "rel", "noreferrer"); - add_location(a, file, 36, 35, 1996); - add_location(p3, file, 36, 16, 1977); - attr_dev(div, "class", "location-info"); - add_location(div, file, 32, 12, 1749); - }, - 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: "(32:8) {#each communities as community}", - ctx - }); - - return block; -} - -function create_fragment(ctx) { - let div1; - let div0; - let h1; - let t1; - let img; - let img_src_value; - let t2; - let p; - let t4; - let h3; - let t6; - let map_component; - let t7; - let h4; - let t9; - 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)); - } - - const block = { - c: function create() { - div1 = element("div"); - div0 = element("div"); - h1 = element("h1"); - h1.textContent = "Communities"; - t1 = space(); - img = element("img"); - t2 = 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."; - t4 = space(); - h3 = element("h3"); - h3.textContent = "Our communities"; - t6 = space(); - map_component = element("map-component"); - t7 = space(); - h4 = element("h4"); - h4.textContent = "Europe"; - t9 = space(); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - this.c = noop; - add_location(h1, file, 25, 8, 612); - attr_dev(img, "id", "communities-img"); - if (!src_url_equal(img.src, img_src_value = "/img/common/communities.svg")) attr_dev(img, "src", img_src_value); - attr_dev(img, "alt", "communities"); - add_location(img, file, 26, 8, 642); - add_location(p, file, 27, 8, 730); - add_location(h3, file, 28, 8, 1560); - set_custom_element_data(map_component, "id", "map"); - set_custom_element_data(map_component, "callback", /*mapCallbackCommunities*/ ctx[0]); - add_location(map_component, file, 29, 8, 1594); - add_location(h4, file, 30, 8, 1678); - 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); - }, - 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, div1, anchor); - append_dev(div1, div0); - append_dev(div0, h1); - append_dev(div0, t1); - append_dev(div0, img); - append_dev(div0, t2); - append_dev(div0, p); - append_dev(div0, t4); - append_dev(div0, h3); - append_dev(div0, t6); - append_dev(div0, map_component); - append_dev(div0, t7); - append_dev(div0, h4); - append_dev(div0, t9); - - 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; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div1); - destroy_each(each_blocks, 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('communities-component', slots, []); - - function mapCallbackCommunities(createMap) { - let map = createMap([51.505, -0.09], 3); - addMarkersCommunities(map); - } - - onMount(() => { - - }); - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - $$self.$capture_state = () => ({ - onMount, - communities, - addMarkersCommunities, - mapCallbackCommunities - }); - - return [mapCallbackCommunities]; -} - -class Communities_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - 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 }; +import{S as t,i as e,a as o,b as n,s as i,e as a,c as s,n as m,d as r,f as c,g as l,h,j as u,k as d,o as g,t as p}from"./index-01c5cbf1.js";import{communities as f,addMarkersCommunities as b}from"../../../../../../../../../js/communities.js";import"../../../../../../../../../js/components/map-component.js";function w(t,e,o){const n=t.slice();return n[1]=e[o],n}function x(t){let e,o,i,c,l,d,g,f,b,w,x,v,y,C,j,z,k,E,D=t[1].location[0]+"",L=t[1].status+"",M=t[1].members+"",R=t[1].contact[1]+"";return{c(){e=a("div"),o=a("p"),i=a("b"),i.textContent="Location: ",c=p(D),l=s(),d=a("p"),g=a("b"),g.textContent="Status: ",f=p(L),b=s(),w=a("p"),x=a("b"),x.textContent="Members: ",v=p(M),y=s(),C=a("p"),j=a("b"),j.textContent="Contact: ",z=a("a"),k=p(R),E=s(),r(z,"href",t[1].contact[0]),r(z,"target",";_blank;"),r(z,"rel","noreferrer"),r(e,"class","location-info")},m(t,a){n(t,e,a),h(e,o),h(o,i),h(o,c),h(e,l),h(e,d),h(d,g),h(d,f),h(e,b),h(e,w),h(w,x),h(w,v),h(e,y),h(e,C),h(C,j),h(C,z),h(z,k),h(e,E)},p:m,d(t){t&&u(e)}}}function v(t){let e,o,i,g,p,b,v,y,C,j,z,k,E,D,L,M=f,R=[];for(let e=0;e{})),[function(t){let e=t([51.505,-.09],3);b(e)}]}class C extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},y,v,i,{},null),t&&t.target&&n(t.target,this,t.anchor)}}customElements.define("communities-component",C);export{C as default}; diff --git a/Server/public/js/components/cookies-dialog.js b/Server/public/js/components/cookies-dialog.js index 39e1173..5b7fb37 100644 --- a/Server/public/js/components/cookies-dialog.js +++ b/Server/public/js/components/cookies-dialog.js @@ -1,99 +1 @@ - -(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); -import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, c as validate_slots, o as onMount, e as element, n as noop, g as add_location, h as attr_dev, l as append_dev, m as detach_dev } from './index-9ff7cb25.js'; - -/* src\components\cookies-dialog.svelte generated by Svelte v3.52.0 */ -const file = "src\\components\\cookies-dialog.svelte"; - -function create_fragment(ctx) { - let div1; - let div0; - let p; - - const block = { - c: function create() { - div1 = element("div"); - div0 = element("div"); - p = element("p"); - p.textContent = "We use cookies to improve your experience, personalise your content and analyse site usage. By clicking “OK”, you agree to the use of cookies."; - this.c = noop; - add_location(p, file, 19, 8, 248); - add_location(div0, file, 18, 4, 233); - attr_dev(div1, "id", "wrapper"); - add_location(div1, file, 17, 0, 209); - }, - 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, div1, anchor); - append_dev(div1, div0); - append_dev(div0, p); - }, - p: noop, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div1); - } - }; - - 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('cookies-dialog', slots, []); - - onMount(() => { - - }); - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - $$self.$capture_state = () => ({ onMount }); - return []; -} - -class Cookies_dialog extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - 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("cookies-dialog", Cookies_dialog); - -export { Cookies_dialog as default }; +import{S as e,i as s,a as t,b as o,s as i,e as a,n as r,d as n,j as c,o as d}from"./index-01c5cbf1.js";function p(e){let s;return{c(){s=a("div"),s.innerHTML="

We use cookies to improve your experience, personalise your content and analyse site usage. By clicking “OK”, you agree to the use of cookies.

",this.c=r,n(s,"id","wrapper")},m(e,t){o(e,s,t)},p:r,i:r,o:r,d(e){e&&c(s)}}}function u(e){return d((()=>{})),[]}class h extends e{constructor(e){super(),this.shadowRoot.innerHTML="",s(this,{target:this.shadowRoot,props:t(this.attributes),customElement:!0},u,p,i,{},null),e&&e.target&&o(e.target,this,e.anchor)}}customElements.define("cookies-dialog",h);export{h as default}; diff --git a/Server/public/js/components/cooperatives-component.js b/Server/public/js/components/cooperatives-component.js index 11bb6f2..86e7f2c 100644 --- a/Server/public/js/components/cooperatives-component.js +++ b/Server/public/js/components/cooperatives-component.js @@ -1,425 +1 @@ - -(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); -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 attr_dev, j as src_url_equal, k as set_custom_element_data, l as append_dev, m as detach_dev, p as destroy_each, t as text } from './index-9ff7cb25.js'; -import { coops, addMarkersCoops } from '../../../../../../../../../js/coops.js'; -import '../../../../../../../../../js/components/map-component.js'; - -/* src\cooperatives-component.svelte generated by Svelte v3.52.0 */ - -const file = "src\\cooperatives-component.svelte"; - -function get_each_context(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[1] = list[i]; - return child_ctx; -} - -// (32:8) {#each coops as coop} -function create_each_block(ctx) { - let div2; - let div1; - let div0; - let p0; - let b0; - let t1_value = /*coop*/ ctx[1].name + ""; - let t1; - let t2; - let p1; - let b1; - let t4_value = /*coop*/ ctx[1].location[0] + ""; - let t4; - let t5; - let p2; - let b2; - let t7_value = /*coop*/ ctx[1].market + ""; - let t7; - let t8; - let p3; - let b3; - let t10_value = /*coop*/ ctx[1].workers + ""; - let t10; - let t11; - let p4; - let b4; - let t13_value = /*coop*/ ctx[1].status + ""; - let t13; - let t14; - let p5; - let b5; - let a0; - let t16_value = /*coop*/ ctx[1].website + ""; - let t16; - let t17; - let p6; - let b6; - let a1; - let t19_value = /*coop*/ ctx[1].contact[1] + ""; - let t19; - let t20; - let picture; - let source0; - let t21; - let source1; - let t22; - let img; - let t23; - let p7; - let b7; - let t25_value = /*coop*/ ctx[1].description + ""; - let t25; - let t26; - - const block = { - c: function create() { - div2 = element("div"); - div1 = element("div"); - div0 = element("div"); - p0 = element("p"); - b0 = element("b"); - b0.textContent = "Name: "; - t1 = text(t1_value); - t2 = space(); - p1 = element("p"); - b1 = element("b"); - b1.textContent = "Location: "; - t4 = text(t4_value); - t5 = space(); - p2 = element("p"); - b2 = element("b"); - b2.textContent = "Market: "; - t7 = text(t7_value); - t8 = space(); - p3 = element("p"); - b3 = element("b"); - b3.textContent = "Workers: "; - t10 = text(t10_value); - t11 = space(); - p4 = element("p"); - b4 = element("b"); - b4.textContent = "Status: "; - t13 = text(t13_value); - t14 = space(); - p5 = element("p"); - b5 = element("b"); - b5.textContent = "Website: "; - a0 = element("a"); - t16 = text(t16_value); - t17 = space(); - p6 = element("p"); - b6 = element("b"); - b6.textContent = "Contact: "; - a1 = element("a"); - t19 = text(t19_value); - t20 = space(); - picture = element("picture"); - source0 = element("source"); - t21 = space(); - source1 = element("source"); - t22 = space(); - img = element("img"); - t23 = space(); - p7 = element("p"); - b7 = element("b"); - b7.textContent = "Description: "; - t25 = text(t25_value); - t26 = space(); - add_location(b0, file, 35, 27, 1847); - add_location(p0, file, 35, 24, 1844); - add_location(b1, file, 36, 27, 1904); - add_location(p1, file, 36, 24, 1901); - add_location(b2, file, 37, 27, 1972); - add_location(p2, file, 37, 24, 1969); - add_location(b3, file, 38, 27, 2033); - add_location(p3, file, 38, 24, 2030); - add_location(b4, file, 39, 27, 2096); - add_location(p4, file, 39, 24, 2093); - add_location(b5, file, 40, 27, 2157); - attr_dev(a0, "href", "https://www." + /*coop*/ ctx[1].website); - attr_dev(a0, "target", "_blank"); - attr_dev(a0, "rel", "noreferrer"); - add_location(a0, file, 40, 43, 2173); - add_location(p5, file, 40, 24, 2154); - add_location(b6, file, 41, 27, 2293); - attr_dev(a1, "href", /*coop*/ ctx[1].contact[0]); - attr_dev(a1, "target", ";_blank;"); - attr_dev(a1, "rel", "noreferrer"); - add_location(a1, file, 41, 43, 2309); - add_location(p6, file, 41, 24, 2290); - add_location(div0, file, 34, 20, 1813); - attr_dev(source0, "srcset", "/img/coops/" + /*coop*/ ctx[1].logo + ".webp"); - add_location(source0, file, 44, 24, 2476); - attr_dev(source1, "srcset", "/img/coops/" + /*coop*/ ctx[1].logo + ".png"); - add_location(source1, file, 45, 24, 2551); - attr_dev(img, "class", "coop-logo"); - attr_dev(img, "alt", "logo"); - add_location(img, file, 46, 24, 2625); - add_location(picture, file, 43, 20, 2441); - add_location(div1, file, 33, 16, 1786); - add_location(b7, file, 49, 19, 2736); - add_location(p7, file, 49, 16, 2733); - attr_dev(div2, "class", "location-info"); - add_location(div2, file, 32, 12, 1741); - }, - m: function mount(target, anchor) { - insert_dev(target, div2, anchor); - append_dev(div2, div1); - append_dev(div1, div0); - append_dev(div0, p0); - append_dev(p0, b0); - append_dev(p0, t1); - append_dev(div0, t2); - append_dev(div0, p1); - append_dev(p1, b1); - append_dev(p1, t4); - append_dev(div0, t5); - append_dev(div0, p2); - append_dev(p2, b2); - append_dev(p2, t7); - append_dev(div0, t8); - append_dev(div0, p3); - append_dev(p3, b3); - append_dev(p3, t10); - append_dev(div0, t11); - append_dev(div0, p4); - append_dev(p4, b4); - append_dev(p4, t13); - append_dev(div0, t14); - append_dev(div0, p5); - append_dev(p5, b5); - append_dev(p5, a0); - append_dev(a0, t16); - append_dev(div0, t17); - append_dev(div0, p6); - append_dev(p6, b6); - append_dev(p6, a1); - append_dev(a1, t19); - append_dev(div1, t20); - append_dev(div1, picture); - append_dev(picture, source0); - append_dev(picture, t21); - append_dev(picture, source1); - append_dev(picture, t22); - append_dev(picture, img); - append_dev(div2, t23); - append_dev(div2, p7); - append_dev(p7, b7); - append_dev(p7, t25); - append_dev(div2, t26); - }, - p: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div2); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block.name, - type: "each", - source: "(32:8) {#each coops as coop}", - ctx - }); - - return block; -} - -function create_fragment(ctx) { - let div1; - let div0; - let h1; - let t1; - let img; - let img_src_value; - let t2; - let p0; - let t4; - let p1; - let t6; - let h3; - let t8; - let map_component; - let t9; - let h4; - let t11; - let each_value = coops; - 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 block = { - c: function create() { - div1 = element("div"); - div0 = element("div"); - h1 = element("h1"); - h1.textContent = "Cooperatives"; - t1 = space(); - img = element("img"); - t2 = space(); - p0 = element("p"); - p0.textContent = "We establish worker cooperatives that embody a transformative business model where employees own and control the enterprise. Each worker has a voice in decision-making, and profits are distributed based on individual contributions. This participatory structure fosters ownership, motivation, and job satisfaction, creating a more fulfilling work experience as well as challenging the wealth concentration in traditional capitalist businesses."; - t4 = space(); - p1 = element("p"); - p1.textContent = "By focusing on employees' needs, our cooperatives create supportive and sustainable work environments that foster social cohesion and job security. We also prioritize the interests of local communities, taking a long-term perspective. With workers making decisions, we avoid harmful short-term profit-driven strategies and instead reinvest our profits, contributing to community development and resilience."; - t6 = space(); - h3 = element("h3"); - h3.textContent = "Our cooperatives"; - t8 = space(); - map_component = element("map-component"); - t9 = space(); - h4 = element("h4"); - h4.textContent = "Europe"; - t11 = space(); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - this.c = noop; - add_location(h1, file, 24, 8, 585); - attr_dev(img, "id", "coops-img"); - if (!src_url_equal(img.src, img_src_value = "/img/common/coops.svg")) attr_dev(img, "src", img_src_value); - attr_dev(img, "alt", "coops"); - add_location(img, file, 25, 8, 616); - add_location(p0, file, 26, 8, 686); - add_location(p1, file, 27, 8, 1145); - add_location(h3, file, 28, 8, 1568); - set_custom_element_data(map_component, "id", "map"); - set_custom_element_data(map_component, "callback", /*mapCallbackCoops*/ ctx[0]); - add_location(map_component, file, 29, 8, 1603); - add_location(h4, file, 30, 8, 1681); - attr_dev(div0, "id", "text-container"); - add_location(div0, file, 23, 4, 550); - attr_dev(div1, "id", "container"); - add_location(div1, file, 21, 0, 463); - }, - 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, div1, anchor); - append_dev(div1, div0); - append_dev(div0, h1); - append_dev(div0, t1); - append_dev(div0, img); - append_dev(div0, t2); - append_dev(div0, p0); - append_dev(div0, t4); - append_dev(div0, p1); - append_dev(div0, t6); - append_dev(div0, h3); - append_dev(div0, t8); - append_dev(div0, map_component); - append_dev(div0, t9); - append_dev(div0, h4); - append_dev(div0, t11); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div0, null); - } - }, - p: function update(ctx, [dirty]) { - if (dirty & /*coops*/ 0) { - each_value = coops; - 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; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div1); - destroy_each(each_blocks, 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('cooperatives-component', slots, []); - - function mapCallbackCoops(createMap) { - let map = createMap([51.505, -0.09], 3); - addMarkersCoops(map); - } - - onMount(() => { - - }); - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - $$self.$capture_state = () => ({ - onMount, - coops, - addMarkersCoops, - mapCallbackCoops - }); - - return [mapCallbackCoops]; -} - -class Cooperatives_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - 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("cooperatives-component", Cooperatives_component); - -export { Cooperatives_component as default }; +import{S as t,i as e,a as o,b as n,s as i,e as r,c as s,n as a,d as c,f as m,g as l,h as p,j as g,k as h,o as d,t as f}from"./index-01c5cbf1.js";import{coops as u,addMarkersCoops as b}from"../../../../../../../../../js/coops.js";import"../../../../../../../../../js/components/map-component.js";function x(t,e,o){const n=t.slice();return n[1]=e[o],n}function w(t){let e,o,i,m,l,h,d,u,b,x,w,v,k,C,y,j,z,W,E,D,L,M,R,S,T,_,A,B,H,N,O,q,F,G,I,J,K,P,Q,U,V,X,Y,Z,$=t[1].name+"",tt=t[1].location[0]+"",et=t[1].market+"",ot=t[1].workers+"",nt=t[1].status+"",it=t[1].website+"",rt=t[1].contact[1]+"",st=t[1].description+"";return{c(){e=r("div"),o=r("div"),i=r("div"),m=r("p"),l=r("b"),l.textContent="Name: ",h=f($),d=s(),u=r("p"),b=r("b"),b.textContent="Location: ",x=f(tt),w=s(),v=r("p"),k=r("b"),k.textContent="Market: ",C=f(et),y=s(),j=r("p"),z=r("b"),z.textContent="Workers: ",W=f(ot),E=s(),D=r("p"),L=r("b"),L.textContent="Status: ",M=f(nt),R=s(),S=r("p"),T=r("b"),T.textContent="Website: ",_=r("a"),A=f(it),B=s(),H=r("p"),N=r("b"),N.textContent="Contact: ",O=r("a"),q=f(rt),F=s(),G=r("picture"),I=r("source"),J=s(),K=r("source"),P=s(),Q=r("img"),U=s(),V=r("p"),X=r("b"),X.textContent="Description: ",Y=f(st),Z=s(),c(_,"href","https://www."+t[1].website),c(_,"target","_blank"),c(_,"rel","noreferrer"),c(O,"href",t[1].contact[0]),c(O,"target",";_blank;"),c(O,"rel","noreferrer"),c(I,"srcset","/img/coops/"+t[1].logo+".webp"),c(K,"srcset","/img/coops/"+t[1].logo+".png"),c(Q,"class","coop-logo"),c(Q,"alt","logo"),c(e,"class","location-info")},m(t,r){n(t,e,r),p(e,o),p(o,i),p(i,m),p(m,l),p(m,h),p(i,d),p(i,u),p(u,b),p(u,x),p(i,w),p(i,v),p(v,k),p(v,C),p(i,y),p(i,j),p(j,z),p(j,W),p(i,E),p(i,D),p(D,L),p(D,M),p(i,R),p(i,S),p(S,T),p(S,_),p(_,A),p(i,B),p(i,H),p(H,N),p(H,O),p(O,q),p(o,F),p(o,G),p(G,I),p(G,J),p(G,K),p(G,P),p(G,Q),p(e,U),p(e,V),p(V,X),p(V,Y),p(e,Z)},p:a,d(t){t&&g(e)}}}function v(t){let e,o,i,d,f,b,v,k,C,y,j,z,W,E,D,L,M,R=u,S=[];for(let e=0;e{})),[function(t){let e=t([51.505,-.09],3);b(e)}]}class C extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},k,v,i,{},null),t&&t.target&&n(t.target,this,t.anchor)}}customElements.define("cooperatives-component",C);export{C as default}; diff --git a/Server/public/js/components/footer-component.js b/Server/public/js/components/footer-component.js index ab02144..c754acb 100644 --- a/Server/public/js/components/footer-component.js +++ b/Server/public/js/components/footer-component.js @@ -1,188 +1 @@ - -(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); -import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, c as validate_slots, e as element, f as space, t as text, C as svg_element, n as noop, g as add_location, h as attr_dev, l as append_dev, x as listen_dev, m as detach_dev } from './index-9ff7cb25.js'; - -/* src\footer\footer-component.svelte generated by Svelte v3.52.0 */ - -const file = "src\\footer\\footer-component.svelte"; - -function create_fragment(ctx) { - let footer; - let div2; - let div1; - let div0; - let h2; - let t1; - let p0; - let t2; - let a; - let t4; - let button; - let svg; - let g; - let rect; - let path; - let t5; - let p1; - let mounted; - let dispose; - - const block = { - c: function create() { - footer = element("footer"); - div2 = element("div"); - div1 = element("div"); - div0 = element("div"); - h2 = element("h2"); - h2.textContent = "CONTACT US"; - t1 = space(); - p0 = element("p"); - t2 = text("WhatsApp: "); - a = element("a"); - a.textContent = "group invite link"; - t4 = space(); - button = element("button"); - svg = svg_element("svg"); - g = svg_element("g"); - rect = svg_element("rect"); - path = svg_element("path"); - t5 = space(); - p1 = element("p"); - p1.textContent = "© 2023 A global network of Libertarian Socialists"; - this.c = noop; - add_location(h2, file, 16, 16, 313); - attr_dev(a, "href", "https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh"); - attr_dev(a, "target", "_blank"); - attr_dev(a, "rel", "noreferrer"); - add_location(a, file, 18, 29, 454); - add_location(p0, file, 18, 16, 441); - attr_dev(div0, "id", "contact-us-container"); - add_location(div0, file, 15, 12, 264); - attr_dev(div1, "id", "footer-grid-content-container"); - attr_dev(div1, "class", "logged"); - add_location(div1, file, 14, 8, 195); - attr_dev(rect, "id", "Rectangle_146"); - attr_dev(rect, "data-name", "Rectangle 146"); - attr_dev(rect, "width", "11"); - attr_dev(rect, "height", "51"); - attr_dev(rect, "rx", "5.5"); - attr_dev(rect, "transform", "translate(22 24)"); - attr_dev(rect, "fill", "#DD1C1A"); - add_location(rect, file, 24, 18, 922); - attr_dev(path, "id", "Path_1145"); - attr_dev(path, "data-name", "Path 1145"); - attr_dev(path, "d", "M23.814,4.021a5,5,0,0,1,7.372,0l16.134,17.6c2.94,3.207,1.046,10.4-3.686,8.379S28.02,14.081,28.391,13.524,16.544,27.976,11.366,30,4.741,24.828,7.68,21.621Z"); - attr_dev(path, "fill", "#DD1C1A"); - add_location(path, file, 25, 18, 1070); - attr_dev(g, "id", "Group_268"); - attr_dev(g, "data-name", "Group 268"); - attr_dev(g, "transform", "translate(-6.177 -2.399)"); - add_location(g, file, 23, 16, 825); - attr_dev(svg, "xmlns", "http://www.w3.org/2000/svg"); - attr_dev(svg, "width", "42.545"); - attr_dev(svg, "height", "72.601"); - attr_dev(svg, "viewBox", "0 0 42.545 72.601"); - add_location(svg, file, 22, 12, 708); - attr_dev(button, "id", "footer-up"); - attr_dev(button, "aria-label", "go up"); - add_location(button, file, 21, 8, 615); - attr_dev(p1, "id", "footer-copyright"); - add_location(p1, file, 29, 8, 1389); - attr_dev(div2, "id", "footer-content-container"); - add_location(div2, file, 13, 4, 150); - add_location(footer, file, 12, 0, 136); - }, - 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, footer, anchor); - append_dev(footer, div2); - append_dev(div2, div1); - append_dev(div1, div0); - append_dev(div0, h2); - append_dev(div0, t1); - append_dev(div0, p0); - append_dev(p0, t2); - append_dev(p0, a); - append_dev(div2, t4); - append_dev(div2, button); - append_dev(button, svg); - append_dev(svg, g); - append_dev(g, rect); - append_dev(g, path); - append_dev(div2, t5); - append_dev(div2, p1); - - if (!mounted) { - dispose = listen_dev(button, "click", /*click_handler*/ ctx[0], false, false, false); - mounted = true; - } - }, - p: noop, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(footer); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; -} - -function instance($$self, $$props) { - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('footer-component', slots, []); - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - const click_handler = () => { - location.href = '#'; - }; - - return [click_handler]; -} - -class Footer_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - 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("footer-component", Footer_component); - -export { Footer_component as default }; +import{S as t,i as e,a,b as o,s,e as n,c as r,n as i,d as c,h,p as l,j as d}from"./index-01c5cbf1.js";function p(t){let e,a,s,p,f,g,m,u,w;return{c(){e=n("footer"),a=n("div"),s=n("div"),s.innerHTML='

CONTACT US

\n \n

WhatsApp: group invite link

',p=r(),f=n("button"),f.innerHTML='',g=r(),m=n("p"),m.textContent="© 2023 A global network of Libertarian Socialists",this.c=i,c(s,"id","footer-grid-content-container"),c(s,"class","logged"),c(f,"id","footer-up"),c(f,"aria-label","go up"),c(m,"id","footer-copyright"),c(a,"id","footer-content-container")},m(n,r){o(n,e,r),h(e,a),h(a,s),h(a,p),h(a,f),h(a,g),h(a,m),u||(w=l(f,"click",t[0]),u=!0)},p:i,i:i,o:i,d(t){t&&d(e),u=!1,w()}}}function f(t){return[()=>{location.href="#"}]}class g extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:a(this.attributes),customElement:!0},f,p,s,{},null),t&&t.target&&o(t.target,this,t.anchor)}}customElements.define("footer-component",g);export{g as default}; diff --git a/Server/public/js/components/groups-component.js b/Server/public/js/components/groups-component.js index 31259ae..af8c240 100644 --- a/Server/public/js/components/groups-component.js +++ b/Server/public/js/components/groups-component.js @@ -1,318 +1 @@ - -(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); -import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, q as flush, 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 attr_dev, j as src_url_equal, k as set_custom_element_data, l as append_dev, m as detach_dev, p as destroy_each, t as text } from './index-9ff7cb25.js'; -import { groups, addMarkersGroups } from '../../../../../../../../../js/groups.js'; -import '../../../../../../../../../js/components/map-component.js'; - -/* src\groups-component.svelte generated by Svelte v3.52.0 */ - -const file = "src\\groups-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 groups as group} -function create_each_block(ctx) { - let div; - let p0; - let b0; - let t1_value = /*group*/ ctx[1].location[0] + ""; - let t1; - let t2; - let p1; - let b1; - let t4_value = /*group*/ ctx[1].members + ""; - let t4; - let t5; - let p2; - let b2; - let a; - let t7_value = /*group*/ ctx[1].contact[1] + ""; - let t7; - let t8; - - 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 = "Members: "; - t4 = text(t4_value); - t5 = space(); - p2 = element("p"); - b2 = element("b"); - b2.textContent = "Contact: "; - a = element("a"); - t7 = text(t7_value); - t8 = space(); - add_location(b0, file, 32, 19, 1746); - add_location(p0, file, 32, 16, 1743); - add_location(b1, file, 33, 19, 1807); - add_location(p1, file, 33, 16, 1804); - add_location(b2, file, 34, 19, 1863); - attr_dev(a, "href", /*group*/ ctx[1].contact[0]); - attr_dev(a, "target", ";_blank;"); - attr_dev(a, "rel", "noreferrer"); - add_location(a, file, 34, 35, 1879); - add_location(p2, file, 34, 16, 1860); - attr_dev(div, "class", "location-info"); - add_location(div, file, 31, 12, 1698); - }, - 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, a); - append_dev(a, t7); - append_dev(div, t8); - }, - 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 groups as group}", - ctx - }); - - return block; -} - -function create_fragment(ctx) { - let div1; - let div0; - let h1; - let t1; - let img; - let img_src_value; - let t2; - let p0; - let t4; - let p1; - let t6; - let h3; - let t8; - let map_component; - let t9; - let h4; - let t11; - let each_value = groups; - 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 block = { - c: function create() { - div1 = element("div"); - div0 = element("div"); - h1 = element("h1"); - h1.textContent = "Groups"; - t1 = space(); - img = element("img"); - t2 = space(); - p0 = element("p"); - p0.textContent = "We aim to raise awareness about the negative impact of current politico-economic systems on our well-being. Through education, community engagement, and analysis, we reveal the flaws and inequalities in capitalist societies. By highlighting these issues, we empower people to question the status quo and imagine fairer and more sustainable alternatives."; - t4 = space(); - p1 = element("p"); - p1.textContent = "But our mission goes beyond theory. We believe in mutual aid and collective action to address immediate challenges within capitalism. Through mutual aid, we support each other by sharing resources, knowledge, and skills, fostering solidarity and resilience. Whether it's community gardens, food cooperatives, or support networks, our goal is to make life under capitalism more bearable and create pockets of resistance and alternatives within the system."; - t6 = space(); - h3 = element("h3"); - h3.textContent = "Our groups"; - t8 = space(); - map_component = element("map-component"); - t9 = space(); - h4 = element("h4"); - h4.textContent = "Europe"; - t11 = space(); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - this.c = noop; - add_location(h1, file, 23, 8, 589); - attr_dev(img, "id", "groups-img"); - if (!src_url_equal(img.src, img_src_value = "/img/common/groups.svg")) attr_dev(img, "src", img_src_value); - attr_dev(img, "alt", "groups"); - add_location(img, file, 24, 8, 614); - add_location(p0, file, 25, 8, 687); - add_location(p1, file, 26, 8, 1057); - add_location(h3, file, 27, 8, 1528); - set_custom_element_data(map_component, "id", "map"); - set_custom_element_data(map_component, "callback", /*mapCallbackGroups*/ ctx[0]); - add_location(map_component, file, 28, 8, 1557); - add_location(h4, file, 29, 8, 1636); - attr_dev(div0, "id", "text-container"); - add_location(div0, file, 22, 4, 554); - attr_dev(div1, "id", "container"); - add_location(div1, file, 20, 0, 467); - }, - 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, div1, anchor); - append_dev(div1, div0); - append_dev(div0, h1); - append_dev(div0, t1); - append_dev(div0, img); - append_dev(div0, t2); - append_dev(div0, p0); - append_dev(div0, t4); - append_dev(div0, p1); - append_dev(div0, t6); - append_dev(div0, h3); - append_dev(div0, t8); - append_dev(div0, map_component); - append_dev(div0, t9); - append_dev(div0, h4); - append_dev(div0, t11); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div0, null); - } - }, - p: function update(ctx, [dirty]) { - if (dirty & /*groups*/ 0) { - each_value = groups; - 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; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div1); - destroy_each(each_blocks, 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('groups-component', slots, []); - - function mapCallbackGroups(createMap) { - let map = createMap([51.505, -0.09], 3); - addMarkersGroups(map); - } - - onMount(() => { - - }); - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - $$self.$capture_state = () => ({ - onMount, - groups, - addMarkersGroups, - mapCallbackGroups - }); - - return [mapCallbackGroups]; -} - -class Groups_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - { mapCallbackGroups: 0 }, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - - if (options.props) { - this.$set(options.props); - flush(); - } - } - } - - static get observedAttributes() { - return ["mapCallbackGroups"]; - } - - get mapCallbackGroups() { - return this.$$.ctx[0]; - } - - set mapCallbackGroups(value) { - throw new Error(": Cannot set read-only property 'mapCallbackGroups'"); - } -} - -customElements.define("groups-component", Groups_component); - -export { Groups_component as default }; +import{S as t,i as e,a as o,b as n,l as a,s as i,e as s,c as r,n as m,d as c,f as l,g as p,h as u,j as g,k as h,o as d,t as f}from"./index-01c5cbf1.js";import{groups as b,addMarkersGroups as x}from"../../../../../../../../../js/groups.js";import"../../../../../../../../../js/components/map-component.js";function w(t,e,o){const n=t.slice();return n[1]=e[o],n}function v(t){let e,o,a,i,l,p,h,d,b,x,w,v,y,C,k=t[1].location[0]+"",j=t[1].members+"",z=t[1].contact[1]+"";return{c(){e=s("div"),o=s("p"),a=s("b"),a.textContent="Location: ",i=f(k),l=r(),p=s("p"),h=s("b"),h.textContent="Members: ",d=f(j),b=r(),x=s("p"),w=s("b"),w.textContent="Contact: ",v=s("a"),y=f(z),C=r(),c(v,"href",t[1].contact[0]),c(v,"target",";_blank;"),c(v,"rel","noreferrer"),c(e,"class","location-info")},m(t,s){n(t,e,s),u(e,o),u(o,a),u(o,i),u(e,l),u(e,p),u(p,h),u(p,d),u(e,b),u(e,x),u(x,w),u(x,v),u(v,y),u(e,C)},p:m,d(t){t&&g(e)}}}function y(t){let e,o,a,i,d,f,x,y,C,k,j,z,G,q,E,T,W,$=b,A=[];for(let e=0;e<$.length;e+=1)A[e]=v(w(t,$,e));return{c(){e=s("div"),o=s("div"),a=s("h1"),a.textContent="Groups",i=r(),d=s("img"),x=r(),y=s("p"),y.textContent="We aim to raise awareness about the negative impact of current politico-economic systems on our well-being. Through education, community engagement, and analysis, we reveal the flaws and inequalities in capitalist societies. By highlighting these issues, we empower people to question the status quo and imagine fairer and more sustainable alternatives.",C=r(),k=s("p"),k.textContent="But our mission goes beyond theory. We believe in mutual aid and collective action to address immediate challenges within capitalism. Through mutual aid, we support each other by sharing resources, knowledge, and skills, fostering solidarity and resilience. Whether it's community gardens, food cooperatives, or support networks, our goal is to make life under capitalism more bearable and create pockets of resistance and alternatives within the system.",j=r(),z=s("h3"),z.textContent="Our groups",G=r(),q=s("map-component"),E=r(),T=s("h4"),T.textContent="Europe",W=r();for(let t=0;t{})),[function(t){let e=t([51.505,-.09],3);x(e)}]}class k extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:o(this.attributes),customElement:!0},C,y,i,{mapCallbackGroups:0},null),t&&(t.target&&n(t.target,this,t.anchor),t.props&&(this.$set(t.props),a()))}static get observedAttributes(){return["mapCallbackGroups"]}get mapCallbackGroups(){return this.$$.ctx[0]}}customElements.define("groups-component",k);export{k as default}; diff --git a/Server/public/js/components/index-01c5cbf1.js b/Server/public/js/components/index-01c5cbf1.js new file mode 100644 index 0000000..42828c7 --- /dev/null +++ b/Server/public/js/components/index-01c5cbf1.js @@ -0,0 +1 @@ +function t(){}function n(t){return t()}function e(){return Object.create(null)}function o(t){t.forEach(n)}function s(t){return"function"==typeof t}function r(t,n){return t!=t?n==n:t!==n||t&&"object"==typeof t||"function"==typeof t}let i,c;function a(t,n){return i||(i=document.createElement("a")),i.href=n,t===i.href}function u(t,n){t.appendChild(n)}function f(t,n,e){t.insertBefore(n,e||null)}function l(t){t.parentNode.removeChild(t)}function h(t,n){for(let e=0;et.removeEventListener(n,e,o)}function _(t,n,e){null==e?t.removeAttribute(n):t.getAttribute(n)!==e&&t.setAttribute(n,e)}function y(t,n,e){n in t?t[n]="boolean"==typeof t[n]&&""===e||e:_(t,n,e)}function b(t,n){n=""+n,t.wholeText!==n&&(t.data=n)}function x(t,n,e,o){null===e?t.style.removeProperty(n):t.style.setProperty(n,e,o?"important":"")}class v{constructor(t=!1){this.is_svg=!1,this.is_svg=t,this.e=this.n=null}c(t){this.h(t)}m(t,n,e=null){var o;this.e||(this.is_svg?this.e=(o=n.nodeName,document.createElementNS("http://www.w3.org/2000/svg",o)):this.e=d(n.nodeName),this.t=n,this.c(t)),this.i(e)}h(t){this.e.innerHTML=t,this.n=Array.from(this.e.childNodes)}i(t){for(let n=0;n{const o=e.length?e[0]:n;return m.ctx&&f(m.ctx[t],m.ctx[t]=o)&&(!m.skip_bound&&m.bound[t]&&m.bound[t](o),g&&F(r,t)),n})):[],m.update(),g=!0,o(m.before_update),m.fragment=!!u&&u(m.ctx),i.target){if(i.hydrate){const t=function(t){return Array.from(t.childNodes)}(i.target);m.fragment&&m.fragment.l(t),t.forEach(l)}else m.fragment&&m.fragment.c();i.intro&&((_=r.$$.fragment)&&_.i&&(B.delete(_),_.i(y))),function(t,e,r,i){const{fragment:c,after_update:a}=t.$$;c&&c.m(e,r),i||M((()=>{const e=t.$$.on_mount.map(n).filter(s);t.$$.on_destroy?t.$$.on_destroy.push(...e):o(e),t.$$.on_mount=[]})),a.forEach(M)}(r,i.target,i.anchor,i.customElement),q()}var _,y;w(p)}let G;"function"==typeof HTMLElement&&(G=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(n).filter(s);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,n,e){this[t]=e}disconnectedCallback(){o(this.$$.on_disconnect)}$destroy(){!function(t,n){const e=t.$$;null!==e.fragment&&(o(e.on_destroy),e.fragment&&e.fragment.d(n),e.on_destroy=e.fragment=null,e.ctx=[])}(this,1),this.$destroy=t}$on(n,e){if(!s(e))return t;const o=this.$$.callbacks[n]||(this.$$.callbacks[n]=[]);return o.push(e),()=>{const t=o.indexOf(e);-1!==t&&o.splice(t,1)}}$set(t){var n;this.$$set&&(n=t,0!==Object.keys(n).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});export{v as H,G as S,E as a,f as b,p as c,_ as d,d as e,a as f,y as g,u as h,D as i,l as j,h as k,q as l,x as m,t as n,C as o,g as p,b as q,L as r,r as s,$ as t,N as u,o as v,m as w,s as x}; diff --git a/Server/public/js/components/join-us-component.js b/Server/public/js/components/join-us-component.js index 5ef3cde..dc05892 100644 --- a/Server/public/js/components/join-us-component.js +++ b/Server/public/js/components/join-us-component.js @@ -1,294 +1 @@ - -(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); -import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, q as flush, s as safe_not_equal, d as dispatch_dev, c as validate_slots, o as onMount, t as text, e as element, f as space, n as noop, g as add_location, h as attr_dev, k as set_custom_element_data, l as append_dev, m as detach_dev } from './index-9ff7cb25.js'; -import { addMarkersGroups } from '../../../../../../../../../js/groups.js'; -import { addMarkersCoops } from '../../../../../../../../../js/coops.js'; -import { addMarkersCommunities } from '../../../../../../../../../js/communities.js'; -import '../../../../../../../../../js/components/map-component.js'; - -/* src\join-us-component.svelte generated by Svelte v3.52.0 */ - -const file = "src\\join-us-component.svelte"; - -function create_fragment(ctx) { - let t0; - let div3; - let div2; - let h1; - let t2; - let div0; - let p0; - let t4; - let p1; - let t6; - let p2; - let t8; - let p3; - let t9; - let b0; - let t11; - let b1; - let t13; - let div1; - let p4; - let t15; - let ol; - let li0; - let a0; - let t17; - let t18; - let li1; - let a1; - let t20; - let t21; - let li2; - let a2; - let t23; - let p5; - let t25; - let p6; - let t26; - let a3; - let t28; - let t29; - let map_component; - - const block = { - c: function create() { - t0 = text("Are you against exploitation of one human being by another?\r\nDo you agree that we should cooperate and not compete with each other?\r\nIn that case, you are already a libertarian socialist. Join us \r\n\r\nFInd our group, community or cooperative near you and join in order to make a world we both envision a reality. \r\n\r\nNone of them near you? Not a problem! Join our WhatsApp group and we will help you get started.\r\n"); - div3 = element("div"); - div2 = element("div"); - h1 = element("h1"); - h1.textContent = "Join us"; - t2 = space(); - div0 = element("div"); - p0 = element("p"); - p0.textContent = "1. Are you against dictatorship and in favor of democracy?"; - t4 = space(); - p1 = element("p"); - p1.textContent = "2. Are you against exploitation of one human being by another?"; - t6 = space(); - p2 = element("p"); - p2.textContent = "3. Do you agree that we should cooperate and not compete with each other?"; - t8 = space(); - p3 = element("p"); - t9 = text("If the answer is "); - b0 = element("b"); - b0.textContent = "YES"; - t11 = text(", then you are already a libertarian socialist. "); - b1 = element("b"); - b1.textContent = "JOIN US!"; - t13 = space(); - div1 = element("div"); - p4 = element("p"); - p4.textContent = "Find our"; - t15 = space(); - ol = element("ol"); - li0 = element("li"); - a0 = element("a"); - a0.textContent = "group"; - t17 = text(","); - t18 = space(); - li1 = element("li"); - a1 = element("a"); - a1.textContent = "community"; - t20 = text(" or"); - t21 = space(); - li2 = element("li"); - a2 = element("a"); - a2.textContent = "cooperative"; - t23 = space(); - p5 = element("p"); - p5.textContent = "near you and join to help make a world we both envision a reality."; - t25 = space(); - p6 = element("p"); - t26 = text("None of them near you? Not a problem! Join our "); - a3 = element("a"); - a3.textContent = "WhatsApp group"; - t28 = text(" and we will help you start your own."); - t29 = space(); - map_component = element("map-component"); - this.c = noop; - add_location(h1, file, 41, 8, 1237); - add_location(p0, file, 43, 12, 1302); - add_location(p1, file, 44, 12, 1381); - add_location(p2, file, 45, 12, 1464); - add_location(b0, file, 46, 32, 1578); - add_location(b1, file, 46, 90, 1636); - add_location(p3, file, 46, 12, 1558); - attr_dev(div0, "id", "condition-list"); - add_location(div0, file, 42, 8, 1263); - add_location(p4, file, 49, 12, 1725); - attr_dev(a0, "href", "https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh"); - add_location(a0, file, 51, 20, 1780); - add_location(li0, file, 51, 16, 1776); - attr_dev(a1, "href", "https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh"); - add_location(a1, file, 52, 20, 1877); - add_location(li1, file, 52, 16, 1873); - attr_dev(a2, "href", "https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh"); - add_location(a2, file, 53, 20, 1980); - add_location(li2, file, 53, 16, 1976); - add_location(ol, file, 50, 12, 1754); - add_location(p5, file, 55, 12, 2092); - attr_dev(div1, "id", "call-to-action-list"); - add_location(div1, file, 48, 8, 1681); - attr_dev(a3, "href", "https://chat.whatsapp.com/BhnmUNljUxJ2AjeHUwyTKh"); - attr_dev(a3, "target", "_blank"); - attr_dev(a3, "rel", "noreferrer"); - add_location(a3, file, 57, 58, 2241); - add_location(p6, file, 57, 8, 2191); - set_custom_element_data(map_component, "id", "map"); - set_custom_element_data(map_component, "callback", /*mapCallback*/ ctx[0]); - add_location(map_component, file, 58, 8, 2400); - attr_dev(div2, "id", "text-container"); - add_location(div2, file, 40, 4, 1202); - attr_dev(div3, "id", "container"); - add_location(div3, file, 38, 0, 1115); - }, - 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, t0, anchor); - insert_dev(target, div3, anchor); - append_dev(div3, div2); - append_dev(div2, h1); - append_dev(div2, t2); - append_dev(div2, div0); - append_dev(div0, p0); - append_dev(div0, t4); - append_dev(div0, p1); - append_dev(div0, t6); - append_dev(div0, p2); - append_dev(div0, t8); - append_dev(div0, p3); - append_dev(p3, t9); - append_dev(p3, b0); - append_dev(p3, t11); - append_dev(p3, b1); - append_dev(div2, t13); - append_dev(div2, div1); - append_dev(div1, p4); - append_dev(div1, t15); - append_dev(div1, ol); - append_dev(ol, li0); - append_dev(li0, a0); - append_dev(li0, t17); - append_dev(ol, t18); - append_dev(ol, li1); - append_dev(li1, a1); - append_dev(li1, t20); - append_dev(ol, t21); - append_dev(ol, li2); - append_dev(li2, a2); - append_dev(div1, t23); - append_dev(div1, p5); - append_dev(div2, t25); - append_dev(div2, p6); - append_dev(p6, t26); - append_dev(p6, a3); - append_dev(p6, t28); - append_dev(div2, t29); - append_dev(div2, map_component); - }, - p: noop, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(t0); - if (detaching) detach_dev(div3); - } - }; - - 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('join-us-component', slots, []); - - function mapCallback(createMap) { - let map = createMap([51.505, -0.09], 3); - addMarkersGroups(map); - addMarkersCoops(map); - addMarkersCommunities(map); - } - - onMount(() => { - - }); - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - $$self.$capture_state = () => ({ - onMount, - addMarkersGroups, - addMarkersCoops, - addMarkersCommunities, - mapCallback - }); - - return [mapCallback]; -} - -class Join_us_component extends SvelteElement { - constructor(options) { - super(); - - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - { mapCallback: 0 }, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - - if (options.props) { - this.$set(options.props); - flush(); - } - } - } - - static get observedAttributes() { - return ["mapCallback"]; - } - - get mapCallback() { - return this.$$.ctx[0]; - } - - set mapCallback(value) { - throw new Error(": Cannot set read-only property 'mapCallback'"); - } -} - -customElements.define("join-us-component", Join_us_component); - -export { Join_us_component as default }; +import{S as t,i as o,a,b as e,l as n,s as i,t as r,e as s,c as m,n as l,d as p,g as c,h,j as u,o as d}from"./index-01c5cbf1.js";import{addMarkersGroups as g}from"../../../../../../../../../js/groups.js";import{addMarkersCoops as b}from"../../../../../../../../../js/coops.js";import{addMarkersCommunities as f}from"../../../../../../../../../js/communities.js";import"../../../../../../../../../js/components/map-component.js";function y(t){let o,a,n,i,d,g,b,f,y,w,j,x;return{c(){o=r("Are you against exploitation of one human being by another?\r\nDo you agree that we should cooperate and not compete with each other?\r\nIn that case, you are already a libertarian socialist. Join us \r\n\r\nFInd our group, community or cooperative near you and join in order to make a world we both envision a reality. \r\n\r\nNone of them near you? Not a problem! Join our WhatsApp group and we will help you get started.\r\n"),a=s("div"),n=s("div"),i=s("h1"),i.textContent="Join us",d=m(),g=s("div"),g.innerHTML="

1. Are you against dictatorship and in favor of democracy?

\n

2. Are you against exploitation of one human being by another?

\n

3. Do you agree that we should cooperate and not compete with each other?

\n

If the answer is YES, then you are already a libertarian socialist. JOIN US!

",b=m(),f=s("div"),f.innerHTML='

Find our

\n
  1. group,
  2. \n
  3. community or
  4. \n
  5. cooperative
\n

near you and join to help make a world we both envision a reality.

',y=m(),w=s("p"),w.innerHTML='None of them near you? Not a problem! Join our WhatsApp group and we will help you start your own.',j=m(),x=s("map-component"),this.c=l,p(g,"id","condition-list"),p(f,"id","call-to-action-list"),c(x,"id","map"),c(x,"callback",t[0]),p(n,"id","text-container"),p(a,"id","container")},m(t,r){e(t,o,r),e(t,a,r),h(a,n),h(n,i),h(n,d),h(n,g),h(n,b),h(n,f),h(n,y),h(n,w),h(n,j),h(n,x)},p:l,i:l,o:l,d(t){t&&u(o),t&&u(a)}}}function w(t,o,a){return d((()=>{})),[function(t){let o=t([51.505,-.09],3);g(o),b(o),f(o)}]}class j extends t{constructor(t){super(),this.shadowRoot.innerHTML="",o(this,{target:this.shadowRoot,props:a(this.attributes),customElement:!0},w,y,i,{mapCallback:0},null),t&&(t.target&&e(t.target,this,t.anchor),t.props&&(this.$set(t.props),n()))}static get observedAttributes(){return["mapCallback"]}get mapCallback(){return this.$$.ctx[0]}}customElements.define("join-us-component",j);export{j as default}; diff --git a/Server/public/js/components/landing-component.js b/Server/public/js/components/landing-component.js index 72f77af..48c17fe 100644 --- a/Server/public/js/components/landing-component.js +++ b/Server/public/js/components/landing-component.js @@ -1,227 +1 @@ - -(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); -import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, c as validate_slots, o as onMount, e as element, f as space, n as noop, h as attr_dev, g as add_location, j as src_url_equal, l as append_dev, m as detach_dev } from './index-9ff7cb25.js'; - -/* src\landing-component.svelte generated by Svelte v3.52.0 */ -const file = "src\\landing-component.svelte"; - -function create_fragment(ctx) { - let div5; - let picture; - let source0; - let t0; - let source1; - let t1; - let img0; - let t2; - let div4; - let p0; - let t4; - let div3; - let div0; - let h20; - let t6; - let img1; - let img1_src_value; - let t7; - let p1; - let t9; - let div1; - let h21; - let t11; - let img2; - let img2_src_value; - let t12; - let p2; - let t14; - let div2; - let h22; - let t16; - let img3; - let img3_src_value; - let t17; - let p3; - - const block = { - c: function create() { - div5 = element("div"); - picture = element("picture"); - source0 = element("source"); - t0 = space(); - source1 = element("source"); - t1 = space(); - img0 = element("img"); - t2 = space(); - div4 = element("div"); - p0 = element("p"); - p0.textContent = "We are people united around a single cause of bringing down authoritarian exploitative systems represented by different forms of capitalism and replacing them with libertarian socialist systems to create a more equitable and democratic world."; - t4 = space(); - div3 = element("div"); - div0 = element("div"); - h20 = element("h2"); - h20.textContent = "GROUPS"; - t6 = space(); - img1 = element("img"); - t7 = space(); - p1 = element("p"); - p1.textContent = "We organize into groups for education, advocacy and mutual aid. We aim to show people how the current politico-economic systems negatively affect our wellbeing, show them the alternatives, and engage in mutual aid to make our life under capitalism easier."; - t9 = space(); - div1 = element("div"); - h21 = element("h2"); - h21.textContent = "COMMUNITIES"; - t11 = space(); - img2 = element("img"); - t12 = space(); - p2 = element("p"); - p2.textContent = "We build communities according to libertarian socialist principles where people own their land, their houses, the means of production and use direct democracy to make decisions. We are growing our socialist world one community at a time."; - t14 = space(); - div2 = element("div"); - h22 = element("h2"); - h22.textContent = "COOPERATIVES"; - t16 = space(); - img3 = element("img"); - t17 = space(); - p3 = element("p"); - p3.textContent = "We create worker cooperatives in order to finance the functioning of our groups and communities. Economic power determines political power, therefore, establishing cooperatives is one of the first steps towards achieving socialism by providing democratic workplaces for workers instead of authoritarian capitalist businesses."; - this.c = noop; - attr_dev(source0, "srcset", "/img/crowd.webp"); - add_location(source0, file, 20, 8, 274); - attr_dev(source1, "srcset", "/img/crowd.png"); - add_location(source1, file, 21, 8, 317); - attr_dev(img0, "id", "crowd"); - attr_dev(img0, "alt", "crowd"); - add_location(img0, file, 22, 8, 359); - add_location(picture, file, 19, 4, 255); - add_location(p0, file, 26, 8, 450); - add_location(h20, file, 29, 16, 771); - attr_dev(img1, "id", "groups-img"); - if (!src_url_equal(img1.src, img1_src_value = "/img/common/groups.svg")) attr_dev(img1, "src", img1_src_value); - attr_dev(img1, "alt", "groups"); - add_location(img1, file, 30, 16, 804); - add_location(p1, file, 31, 16, 885); - add_location(div0, file, 28, 12, 748); - add_location(h21, file, 34, 16, 1204); - attr_dev(img2, "id", "communities-img"); - if (!src_url_equal(img2.src, img2_src_value = "/img/common/communities.svg")) attr_dev(img2, "src", img2_src_value); - attr_dev(img2, "alt", "communities"); - add_location(img2, file, 35, 16, 1242); - add_location(p2, file, 36, 16, 1338); - add_location(div1, file, 33, 12, 1181); - add_location(h22, file, 39, 16, 1639); - attr_dev(img3, "id", "coops-img"); - if (!src_url_equal(img3.src, img3_src_value = "/img/common/coops.svg")) attr_dev(img3, "src", img3_src_value); - attr_dev(img3, "alt", "coops"); - add_location(img3, file, 40, 16, 1678); - add_location(p3, file, 41, 16, 1756); - add_location(div2, file, 38, 12, 1616); - attr_dev(div3, "id", "container-grid"); - add_location(div3, file, 27, 8, 709); - attr_dev(div4, "id", "text-container"); - add_location(div4, file, 25, 4, 415); - attr_dev(div5, "id", "container"); - add_location(div5, file, 18, 0, 229); - }, - 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, div5, anchor); - append_dev(div5, picture); - append_dev(picture, source0); - append_dev(picture, t0); - append_dev(picture, source1); - append_dev(picture, t1); - append_dev(picture, img0); - append_dev(div5, t2); - append_dev(div5, div4); - append_dev(div4, p0); - append_dev(div4, t4); - append_dev(div4, div3); - append_dev(div3, div0); - append_dev(div0, h20); - append_dev(div0, t6); - append_dev(div0, img1); - append_dev(div0, t7); - append_dev(div0, p1); - append_dev(div3, t9); - append_dev(div3, div1); - append_dev(div1, h21); - append_dev(div1, t11); - append_dev(div1, img2); - append_dev(div1, t12); - append_dev(div1, p2); - append_dev(div3, t14); - append_dev(div3, div2); - append_dev(div2, h22); - append_dev(div2, t16); - append_dev(div2, img3); - append_dev(div2, t17); - append_dev(div2, p3); - }, - p: noop, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div5); - } - }; - - 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('landing-component', slots, []); - - onMount(() => { - - }); - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - $$self.$capture_state = () => ({ onMount }); - return []; -} - -class Landing_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - 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("landing-component", Landing_component); - -export { Landing_component as default }; +import{S as i,i as e,a as t,b as o,s as n,e as a,n as r,d as s,j as c,o as m}from"./index-01c5cbf1.js";function d(i){let e;return{c(){e=a("div"),e.innerHTML=' \n \n crowd \n \n

We are people united around a singular cause: bringing down authoritarian exploitative systems represented by various forms of capitalism and replacing them with libertarian socialist systems, with the goal of creating a more equitable and democratic world.

\n

GROUPS

\n groups \n

We organize groups for the purposes of education, advocacy, and mutual aid. Our objective is to demonstrate to people how the current politico-economic systems detrimentally impact our well-being, present them with alternative approaches, and engage in mutual aid to alleviate the challenges of living under capitalism.

\n

COMMUNITIES

\n communities \n

We establish communities based on libertarian socialist principles, where individuals have ownership of their land, houses, and the means of production as well as make decisions using direct democracy. We are gradually expanding our socialist world, one community at a time.

\n

COOPERATIVES

\n coops \n

We form worker cooperatives to finance the operations of our groups and communities. Recognizing that economic power influences political power, we consider the establishment of cooperatives to be one of the initial steps towards achieving socialism.

',this.c=r,s(e,"id","container")},m(i,t){o(i,e,t)},p:r,i:r,o:r,d(i){i&&c(e)}}}function p(i){return m((()=>{})),[]}class l extends i{constructor(i){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:t(this.attributes),customElement:!0},p,d,n,{},null),i&&i.target&&o(i.target,this,i.anchor)}}customElements.define("landing-component",l);export{l as default}; diff --git a/Server/public/js/components/legend-component.js b/Server/public/js/components/legend-component.js index f88483d..1f225ab 100644 --- a/Server/public/js/components/legend-component.js +++ b/Server/public/js/components/legend-component.js @@ -1,362 +1 @@ - -(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); -import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, q as flush, s as safe_not_equal, v as validate_each_argument, d as dispatch_dev, c as validate_slots, o as onMount, r as globals, e as element, n as noop, h as attr_dev, g as add_location, m as detach_dev, p as destroy_each, u as binding_callbacks, f as space, t as text, w as set_style, l as append_dev, x as listen_dev, y as set_data_dev } from './index-9ff7cb25.js'; -import { pullLegendData } from '../../../../../../../../../js/predict/charts.js'; - -/* src\components\legend-component.svelte generated by Svelte v3.52.0 */ - -const { Object: Object_1 } = globals; -const file = "src\\components\\legend-component.svelte"; - -function get_each_context(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[10] = list[i]; - child_ctx[11] = list; - child_ctx[12] = i; - return child_ctx; -} - -// (69:4) {#each legendData as item, i} -function create_each_block(ctx) { - let button; - let div; - let t0; - let span; - let t1_value = /*item*/ ctx[10].name + ""; - let t1; - let t2; - let i = /*i*/ ctx[12]; - let mounted; - let dispose; - const assign_button = () => /*button_binding*/ ctx[6](button, i); - const unassign_button = () => /*button_binding*/ ctx[6](null, i); - - function click_handler() { - return /*click_handler*/ ctx[7](/*i*/ ctx[12]); - } - - const block = { - c: function create() { - button = element("button"); - div = element("div"); - t0 = space(); - span = element("span"); - t1 = text(t1_value); - t2 = space(); - attr_dev(div, "class", "marker"); - set_style(div, "background-color", /*item*/ ctx[10].color); - add_location(div, file, 70, 12, 1892); - add_location(span, file, 71, 12, 1971); - add_location(button, file, 69, 8, 1814); - }, - m: function mount(target, anchor) { - insert_dev(target, button, anchor); - append_dev(button, div); - append_dev(button, t0); - append_dev(button, span); - append_dev(span, t1); - append_dev(button, t2); - assign_button(); - - if (!mounted) { - dispose = listen_dev(button, "click", click_handler, false, false, false); - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - - if (dirty & /*legendData*/ 1) { - set_style(div, "background-color", /*item*/ ctx[10].color); - } - - if (dirty & /*legendData*/ 1 && t1_value !== (t1_value = /*item*/ ctx[10].name + "")) set_data_dev(t1, t1_value); - - if (i !== /*i*/ ctx[12]) { - unassign_button(); - i = /*i*/ ctx[12]; - assign_button(); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(button); - unassign_button(); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block.name, - type: "each", - source: "(69:4) {#each legendData as item, i}", - ctx - }); - - return block; -} - -function create_fragment(ctx) { - let div; - let each_value = /*legendData*/ ctx[0]; - 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 block = { - c: function create() { - div = element("div"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - this.c = noop; - attr_dev(div, "class", "legend"); - add_location(div, file, 67, 0, 1749); - }, - 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, div, anchor); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div, null); - } - }, - p: function update(ctx, [dirty]) { - if (dirty & /*buttons, toggleSeries, legendData*/ 7) { - each_value = /*legendData*/ ctx[0]; - 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(div, null); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value.length; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - destroy_each(each_blocks, 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('legend-component', slots, []); - let { option = null } = $$props; - let { chart = null } = $$props; - let { data = {} } = $$props; - - // Main code - let legendData = []; - - let buttons = []; - let dataKeys; - - function init() { - if (option == null || option == undefined || chart == null || chart == undefined) { - setTimeout(init, 100); - } else { - $$invalidate(0, legendData = pullLegendData(legendData, option)); - - for (let obj of legendData) { - $$invalidate(3, data[obj.name] = true, data); - } - - dataKeys = Object.keys(data); - } - } - - function toggleSeries(i) { - $$invalidate(3, data[dataKeys[i]] = !data[dataKeys[i]], data); - let inds = []; - let ids = option.series.map(x => x._id); - let id = ids[i]; - - for (let j = 0; j < ids.length; j++) { - if (ids[j] == id) { - inds.push(j); - } - } - - for (let i of inds) { - let series = option.series[i]; - - if (!series.tooltip.show) { - series.lineStyle.opacity = 1; - series.itemStyle.opacity = 1; - series.tooltip.show = true; - $$invalidate(1, buttons[inds[0]].style.opacity = 1, buttons); - } else { - series.lineStyle.opacity = 0; - series.itemStyle.opacity = 0; - series.tooltip.show = false; - $$invalidate(1, buttons[inds[0]].style.opacity = 0.5, buttons); - } - } - - chart.setOption(option); - } - - onMount(() => { - init(); - }); - - const writable_props = ['option', 'chart', 'data']; - - Object_1.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - function button_binding($$value, i) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - buttons[i] = $$value; - $$invalidate(1, buttons); - }); - } - - const click_handler = i => toggleSeries(i); - - $$self.$$set = $$props => { - if ('option' in $$props) $$invalidate(4, option = $$props.option); - if ('chart' in $$props) $$invalidate(5, chart = $$props.chart); - if ('data' in $$props) $$invalidate(3, data = $$props.data); - }; - - $$self.$capture_state = () => ({ - onMount, - pullLegendData, - option, - chart, - data, - legendData, - buttons, - dataKeys, - init, - toggleSeries - }); - - $$self.$inject_state = $$props => { - if ('option' in $$props) $$invalidate(4, option = $$props.option); - if ('chart' in $$props) $$invalidate(5, chart = $$props.chart); - if ('data' in $$props) $$invalidate(3, data = $$props.data); - if ('legendData' in $$props) $$invalidate(0, legendData = $$props.legendData); - if ('buttons' in $$props) $$invalidate(1, buttons = $$props.buttons); - if ('dataKeys' in $$props) dataKeys = $$props.dataKeys; - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [ - legendData, - buttons, - toggleSeries, - data, - option, - chart, - button_binding, - click_handler - ]; -} - -class Legend_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - { option: 4, chart: 5, data: 3 }, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - - if (options.props) { - this.$set(options.props); - flush(); - } - } - } - - static get observedAttributes() { - return ["option", "chart", "data"]; - } - - get option() { - return this.$$.ctx[4]; - } - - set option(option) { - this.$$set({ option }); - flush(); - } - - get chart() { - return this.$$.ctx[5]; - } - - set chart(chart) { - this.$$set({ chart }); - flush(); - } - - get data() { - return this.$$.ctx[3]; - } - - set data(data) { - this.$$set({ data }); - flush(); - } -} - -customElements.define("legend-component", Legend_component); - -export { Legend_component as default }; +import{S as t,i as e,a as s,b as o,l as n,s as r,e as i,n as a,d as l,j as c,k as p,o as u,c as h,t as d,m,h as f,p as g,q as y,r as $}from"./index-01c5cbf1.js";import{pullLegendData as b}from"../../../../../../../../../js/predict/charts.js";function w(t,e,s){const o=t.slice();return o[10]=e[s],o[11]=e,o[12]=s,o}function x(t){let e,s,n,r,a,p,u,$,b=t[10].name+"",w=t[12];const x=()=>t[6](e,w),k=()=>t[6](null,w);function j(){return t[7](t[12])}return{c(){e=i("button"),s=i("div"),n=h(),r=i("span"),a=d(b),p=h(),l(s,"class","marker"),m(s,"background-color",t[10].color)},m(t,i){o(t,e,i),f(e,s),f(e,n),f(e,r),f(r,a),f(e,p),x(),u||($=g(e,"click",j),u=!0)},p(e,o){t=e,1&o&&m(s,"background-color",t[10].color),1&o&&b!==(b=t[10].name+"")&&y(a,b),w!==t[12]&&(k(),w=t[12],x())},d(t){t&&c(e),k(),u=!1,$()}}}function k(t){let e,s=t[0],n=[];for(let e=0;et._id)),c=a[t];for(let t=0;t{c()}));return t.$$set=t=>{"option"in t&&s(4,n=t.option),"chart"in t&&s(5,r=t.chart),"data"in t&&s(3,i=t.data)},[a,l,p,i,n,r,function(t,e){$[t?"unshift":"push"]((()=>{l[e]=t,s(1,l)}))},t=>p(t)]}class v extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},j,k,r,{option:4,chart:5,data:3},null),t&&(t.target&&o(t.target,this,t.anchor),t.props&&(this.$set(t.props),n()))}static get observedAttributes(){return["option","chart","data"]}get option(){return this.$$.ctx[4]}set option(t){this.$$set({option:t}),n()}get chart(){return this.$$.ctx[5]}set chart(t){this.$$set({chart:t}),n()}get data(){return this.$$.ctx[3]}set data(t){this.$$set({data:t}),n()}}customElements.define("legend-component",v);export{v as default}; diff --git a/Server/public/js/components/loadscreen-component.js b/Server/public/js/components/loadscreen-component.js index d9c8da1..22e4e68 100644 --- a/Server/public/js/components/loadscreen-component.js +++ b/Server/public/js/components/loadscreen-component.js @@ -1,115 +1 @@ - -(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); -import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, c as validate_slots, o as onMount, e as element, n as noop, h as attr_dev, w as set_style, g as add_location, m as detach_dev, u as binding_callbacks } from './index-9ff7cb25.js'; - -/* src\components\loadscreen-component.svelte generated by Svelte v3.52.0 */ -const file = "src\\components\\loadscreen-component.svelte"; - -function create_fragment(ctx) { - let div; - - const block = { - c: function create() { - div = element("div"); - this.c = noop; - attr_dev(div, "id", "loadscreen"); - set_style(div, "width", "100%"); - set_style(div, "height", "100%"); - set_style(div, "background", "white"); - set_style(div, "position", "absolute"); - set_style(div, "z-index", "100000"); - add_location(div, file, 20, 0, 366); - }, - 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, div, anchor); - /*div_binding*/ ctx[1](div); - }, - p: noop, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - /*div_binding*/ ctx[1](null); - } - }; - - 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('loadscreen-component', slots, []); - let loadscreen; - - onMount(() => { - window.addEventListener('load', function () { - $$invalidate(0, loadscreen.parentNode.host.style.display = "none", loadscreen); - }); - }); - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - function div_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - loadscreen = $$value; - $$invalidate(0, loadscreen); - }); - } - - $$self.$capture_state = () => ({ onMount, loadscreen }); - - $$self.$inject_state = $$props => { - if ('loadscreen' in $$props) $$invalidate(0, loadscreen = $$props.loadscreen); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [loadscreen, div_binding]; -} - -class Loadscreen_component extends SvelteElement { - constructor(options) { - super(); - - 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("loadscreen-component", Loadscreen_component); - -export { Loadscreen_component as default }; +import{S as t,i as s,a as e,b as n,s as o,e as a,n as i,d as r,m as d,j as c,o as u,r as l}from"./index-01c5cbf1.js";function h(t){let s;return{c(){s=a("div"),this.c=i,r(s,"id","loadscreen"),d(s,"width","100%"),d(s,"height","100%"),d(s,"background","white"),d(s,"position","absolute"),d(s,"z-index","100000")},m(e,o){n(e,s,o),t[1](s)},p:i,i:i,o:i,d(e){e&&c(s),t[1](null)}}}function p(t,s,e){let n;return u((()=>{window.addEventListener("load",(function(){e(0,n.parentNode.host.style.display="none",n)}))})),[n,function(t){l[t?"unshift":"push"]((()=>{n=t,e(0,n)}))}]}class f extends t{constructor(t){super(),s(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},p,h,o,{},null),t&&t.target&&n(t.target,this,t.anchor)}}customElements.define("loadscreen-component",f);export{f as default}; diff --git a/Server/public/js/components/manifesto-component.js b/Server/public/js/components/manifesto-component.js index a1bdc48..e72fe13 100644 --- a/Server/public/js/components/manifesto-component.js +++ b/Server/public/js/components/manifesto-component.js @@ -1,1280 +1 @@ - -(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); -import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, c as validate_slots, o as onMount, r as globals, v as validate_each_argument, e as element, n as noop, h as attr_dev, g as add_location, l as append_dev, m as detach_dev, u as binding_callbacks, t as text, f as space, D as empty, j as src_url_equal, w as set_style, x as listen_dev, p as destroy_each, E as is_function, H as HtmlTag } from './index-9ff7cb25.js'; -import { getData } from '../../../../../../../../../js/libraries/serverTools.js'; - -/* src\manifesto-component.svelte generated by Svelte v3.52.0 */ - -const { Object: Object_1 } = globals; -const file = "src\\manifesto-component.svelte"; - -function get_each_context(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[22] = list[i]; - child_ctx[23] = list; - child_ctx[24] = i; - return child_ctx; -} - -function get_each_context_2(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[25] = list[i]; - return child_ctx; -} - -function get_each_context_1(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[25] = list[i]; - return child_ctx; -} - -function get_each_context_3(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[30] = list[i]; - child_ctx[31] = list; - child_ctx[32] = i; - return child_ctx; -} - -function get_each_context_4(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[33] = list[i]; - child_ctx[34] = list; - child_ctx[35] = i; - return child_ctx; -} - -// (125:24) {:else} -function create_else_block_1(ctx) { - let div; - let button; - let t0_value = /*obj*/ ctx[30].name + ""; - let t0; - let obj = /*obj*/ ctx[30]; - let t1; - let mounted; - let dispose; - const assign_button = () => /*button_binding_2*/ ctx[15](button, obj); - const unassign_button = () => /*button_binding_2*/ ctx[15](null, obj); - - function click_handler_2() { - return /*click_handler_2*/ ctx[16](/*obj*/ ctx[30]); - } - - const block = { - c: function create() { - div = element("div"); - button = element("button"); - t0 = text(t0_value); - t1 = space(); - attr_dev(button, "class", "level0 heading-button"); - add_location(button, file, 126, 32, 4781); - attr_dev(div, "class", "heading-button-wrapper"); - add_location(div, file, 125, 28, 4711); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, button); - append_dev(button, t0); - assign_button(); - append_dev(div, t1); - - if (!mounted) { - dispose = listen_dev(button, "click", click_handler_2, false, false, false); - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - - if (obj !== /*obj*/ ctx[30]) { - unassign_button(); - obj = /*obj*/ ctx[30]; - assign_button(); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - unassign_button(); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_else_block_1.name, - type: "else", - source: "(125:24) {:else}", - ctx - }); - - return block; -} - -// (117:24) {#if Array.isArray(obj)} -function create_if_block_6(ctx) { - let each_1_anchor; - let each_value_4 = /*obj*/ ctx[30]; - validate_each_argument(each_value_4); - let each_blocks = []; - - for (let i = 0; i < each_value_4.length; i += 1) { - each_blocks[i] = create_each_block_4(get_each_context_4(ctx, each_value_4, i)); - } - - const block = { - c: function create() { - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - each_1_anchor = empty(); - }, - m: function mount(target, anchor) { - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(target, anchor); - } - - insert_dev(target, each_1_anchor, anchor); - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*buttons, contentHeadings, goToChapter*/ 784) { - each_value_4 = /*obj*/ ctx[30]; - validate_each_argument(each_value_4); - let i; - - for (i = 0; i < each_value_4.length; i += 1) { - const child_ctx = get_each_context_4(ctx, each_value_4, i); - - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block_4(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(each_1_anchor.parentNode, each_1_anchor); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value_4.length; - } - }, - d: function destroy(detaching) { - destroy_each(each_blocks, detaching); - if (detaching) detach_dev(each_1_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_6.name, - type: "if", - source: "(117:24) {#if Array.isArray(obj)}", - ctx - }); - - return block; -} - -// (118:28) {#each obj as obj2} -function create_each_block_4(ctx) { - let div; - let button; - let t0_value = /*obj2*/ ctx[33].name + ""; - let t0; - let obj2 = /*obj2*/ ctx[33]; - let t1; - let mounted; - let dispose; - const assign_button = () => /*button_binding_1*/ ctx[13](button, obj2); - const unassign_button = () => /*button_binding_1*/ ctx[13](null, obj2); - - function click_handler_1() { - return /*click_handler_1*/ ctx[14](/*obj2*/ ctx[33]); - } - - const block = { - c: function create() { - div = element("div"); - button = element("button"); - t0 = text(t0_value); - t1 = space(); - attr_dev(button, "class", "level1 heading-button"); - add_location(button, file, 119, 32, 4375); - attr_dev(div, "class", "heading-button-wrapper"); - add_location(div, file, 118, 28, 4305); - }, - m: function mount(target, anchor) { - insert_dev(target, div, anchor); - append_dev(div, button); - append_dev(button, t0); - assign_button(); - append_dev(div, t1); - - if (!mounted) { - dispose = listen_dev(button, "click", click_handler_1, false, false, false); - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - - if (obj2 !== /*obj2*/ ctx[33]) { - unassign_button(); - obj2 = /*obj2*/ ctx[33]; - assign_button(); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - unassign_button(); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block_4.name, - type: "each", - source: "(118:28) {#each obj as obj2}", - ctx - }); - - return block; -} - -// (116:20) {#each contentHeadings as obj} -function create_each_block_3(ctx) { - let if_block_anchor; - - function select_block_type(ctx, dirty) { - if (Array.isArray(/*obj*/ ctx[30])) return create_if_block_6; - return create_else_block_1; - } - - let current_block_type = select_block_type(ctx); - let if_block = current_block_type(ctx); - - const block = { - c: function create() { - if_block.c(); - if_block_anchor = empty(); - }, - m: function mount(target, anchor) { - if_block.m(target, anchor); - insert_dev(target, if_block_anchor, anchor); - }, - p: function update(ctx, dirty) { - if_block.p(ctx, dirty); - }, - d: function destroy(detaching) { - if_block.d(detaching); - if (detaching) detach_dev(if_block_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block_3.name, - type: "each", - source: "(116:20) {#each contentHeadings as obj}", - ctx - }); - - return block; -} - -// (136:16) {#if line!==""} -function create_if_block(ctx) { - let if_block_anchor; - - function select_block_type_1(ctx, dirty) { - if (typeof (/*line*/ ctx[22] === 'object') && Object.keys(/*line*/ ctx[22])[0] == "ul") return create_if_block_1; - if (typeof (/*line*/ ctx[22] === 'object') && Object.keys(/*line*/ ctx[22])[0] == "ol") return create_if_block_2; - if (typeof (/*line*/ ctx[22] === 'object') && /*line*/ ctx[22].type == "h3") return create_if_block_3; - if (typeof (/*line*/ ctx[22] === 'object') && /*line*/ ctx[22].type == "h2") return create_if_block_4; - if (/*line*/ ctx[22][0] == "#") return create_if_block_5; - return create_else_block; - } - - let current_block_type = select_block_type_1(ctx); - let if_block = current_block_type(ctx); - - const block = { - c: function create() { - if_block.c(); - if_block_anchor = empty(); - }, - m: function mount(target, anchor) { - if_block.m(target, anchor); - insert_dev(target, if_block_anchor, anchor); - }, - p: function update(ctx, dirty) { - if_block.p(ctx, dirty); - }, - d: function destroy(detaching) { - if_block.d(detaching); - if (detaching) detach_dev(if_block_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block.name, - type: "if", - source: "(136:16) {#if line!==\\\"\\\"}", - ctx - }); - - return block; -} - -// (161:20) {:else} -function create_else_block(ctx) { - let p; - let html_tag; - let raw_value = /*line*/ ctx[22] + ""; - let t; - - const block = { - c: function create() { - p = element("p"); - html_tag = new HtmlTag(false); - t = space(); - html_tag.a = t; - attr_dev(p, "class", "margin-end"); - add_location(p, file, 161, 24, 6718); - }, - m: function mount(target, anchor) { - insert_dev(target, p, anchor); - html_tag.m(raw_value, p); - append_dev(p, t); - }, - p: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(p); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_else_block.name, - type: "else", - source: "(161:20) {:else}", - ctx - }); - - return block; -} - -// (159:43) -function create_if_block_5(ctx) { - let h1; - let raw_value = /*line*/ ctx[22].slice(2, /*line*/ ctx[22].length) + ""; - - const block = { - c: function create() { - h1 = element("h1"); - add_location(h1, file, 159, 24, 6621); - }, - m: function mount(target, anchor) { - insert_dev(target, h1, anchor); - h1.innerHTML = raw_value; - }, - p: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(h1); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_5.name, - type: "if", - source: "(159:43) ", - ctx - }); - - return block; -} - -// (155:78) -function create_if_block_4(ctx) { - let button; - let h2; - let raw_value = /*line*/ ctx[22].line + ""; - let line = /*line*/ ctx[22]; - let t; - let mounted; - let dispose; - const assign_h2 = () => /*h2_binding*/ ctx[20](h2, line); - const unassign_h2 = () => /*h2_binding*/ ctx[20](null, line); - - const block = { - c: function create() { - button = element("button"); - h2 = element("h2"); - t = space(); - attr_dev(h2, "id", /*line*/ ctx[22].id); - add_location(h2, file, 156, 28, 6439); - set_style(button, "display", "block"); - set_style(button, "width", "100%"); - add_location(button, file, 155, 24, 6298); - }, - m: function mount(target, anchor) { - insert_dev(target, button, anchor); - append_dev(button, h2); - h2.innerHTML = raw_value; - assign_h2(); - append_dev(button, t); - - if (!mounted) { - dispose = listen_dev( - button, - "click", - function () { - if (is_function(/*contentTable*/ ctx[6].scrollIntoView({ block: 'start' }, true))) /*contentTable*/ ctx[6].scrollIntoView({ block: 'start' }, true).apply(this, arguments); - }, - false, - false, - false - ); - - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - - if (line !== /*line*/ ctx[22]) { - unassign_h2(); - line = /*line*/ ctx[22]; - assign_h2(); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(button); - unassign_h2(); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_4.name, - type: "if", - source: "(155:78) ", - ctx - }); - - return block; -} - -// (151:78) -function create_if_block_3(ctx) { - let button; - let h3; - let raw_value = /*line*/ ctx[22].line + ""; - let line = /*line*/ ctx[22]; - let t; - let mounted; - let dispose; - const assign_h3 = () => /*h3_binding*/ ctx[19](h3, line); - const unassign_h3 = () => /*h3_binding*/ ctx[19](null, line); - - const block = { - c: function create() { - button = element("button"); - h3 = element("h3"); - t = space(); - attr_dev(h3, "id", /*line*/ ctx[22].id); - add_location(h3, file, 152, 28, 6081); - set_style(button, "display", "block"); - add_location(button, file, 151, 24, 5955); - }, - m: function mount(target, anchor) { - insert_dev(target, button, anchor); - append_dev(button, h3); - h3.innerHTML = raw_value; - assign_h3(); - append_dev(button, t); - - if (!mounted) { - dispose = listen_dev( - button, - "click", - function () { - if (is_function(/*contentTable*/ ctx[6].scrollIntoView({ block: 'start' }, true))) /*contentTable*/ ctx[6].scrollIntoView({ block: 'start' }, true).apply(this, arguments); - }, - false, - false, - false - ); - - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - - if (line !== /*line*/ ctx[22]) { - unassign_h3(); - line = /*line*/ ctx[22]; - assign_h3(); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(button); - unassign_h3(); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_3.name, - type: "if", - source: "(151:78) ", - ctx - }); - - return block; -} - -// (143:89) -function create_if_block_2(ctx) { - let ol; - let t; - let each_value_2 = /*line*/ ctx[22].ol; - validate_each_argument(each_value_2); - let each_blocks = []; - - for (let i = 0; i < each_value_2.length; i += 1) { - each_blocks[i] = create_each_block_2(get_each_context_2(ctx, each_value_2, i)); - } - - const block = { - c: function create() { - ol = element("ol"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - t = space(); - add_location(ol, file, 143, 24, 5595); - }, - m: function mount(target, anchor) { - insert_dev(target, ol, anchor); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(ol, null); - } - - append_dev(ol, t); - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*manifesto*/ 128) { - each_value_2 = /*line*/ ctx[22].ol; - validate_each_argument(each_value_2); - let i; - - for (i = 0; i < each_value_2.length; i += 1) { - const child_ctx = get_each_context_2(ctx, each_value_2, i); - - if (each_blocks[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block_2(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(ol, t); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value_2.length; - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(ol); - destroy_each(each_blocks, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_2.name, - type: "if", - source: "(143:89) ", - ctx - }); - - return block; -} - -// (137:20) {#if typeof (line === 'object') && (Object.keys(line)[0]=="ul")} -function create_if_block_1(ctx) { - let ul; - let t; - let each_value_1 = /*line*/ ctx[22].ul; - validate_each_argument(each_value_1); - let each_blocks = []; - - for (let i = 0; i < each_value_1.length; i += 1) { - each_blocks[i] = create_each_block_1(get_each_context_1(ctx, each_value_1, i)); - } - - const block = { - c: function create() { - ul = element("ul"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - t = space(); - add_location(ul, file, 137, 24, 5302); - }, - m: function mount(target, anchor) { - insert_dev(target, ul, anchor); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(ul, null); - } - - append_dev(ul, t); - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*manifesto*/ 128) { - each_value_1 = /*line*/ ctx[22].ul; - 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[i]) { - each_blocks[i].p(child_ctx, dirty); - } else { - each_blocks[i] = create_each_block_1(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(ul, t); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value_1.length; - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(ul); - destroy_each(each_blocks, detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_if_block_1.name, - type: "if", - source: "(137:20) {#if typeof (line === 'object') && (Object.keys(line)[0]==\\\"ul\\\")}", - ctx - }); - - return block; -} - -// (145:28) {#each line.ol as line2} -function create_each_block_2(ctx) { - let li; - let raw_value = /*line2*/ ctx[25] + ""; - - const block = { - c: function create() { - li = element("li"); - add_location(li, file, 145, 32, 5687); - }, - m: function mount(target, anchor) { - insert_dev(target, li, anchor); - li.innerHTML = raw_value; - }, - p: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(li); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block_2.name, - type: "each", - source: "(145:28) {#each line.ol as line2}", - ctx - }); - - return block; -} - -// (139:28) {#each line.ul as line2} -function create_each_block_1(ctx) { - let li; - let t_value = /*line2*/ ctx[25] + ""; - let t; - - const block = { - c: function create() { - li = element("li"); - t = text(t_value); - add_location(li, file, 139, 32, 5394); - }, - m: function mount(target, anchor) { - insert_dev(target, li, anchor); - append_dev(li, t); - }, - p: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(li); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block_1.name, - type: "each", - source: "(139:28) {#each line.ul as line2}", - ctx - }); - - return block; -} - -// (135:12) {#each manifesto as line} -function create_each_block(ctx) { - let if_block_anchor; - let if_block = /*line*/ ctx[22] !== "" && create_if_block(ctx); - - const block = { - c: function create() { - if (if_block) if_block.c(); - if_block_anchor = empty(); - }, - m: function mount(target, anchor) { - if (if_block) if_block.m(target, anchor); - insert_dev(target, if_block_anchor, anchor); - }, - p: function update(ctx, dirty) { - if (/*line*/ ctx[22] !== "") if_block.p(ctx, dirty); - }, - d: function destroy(detaching) { - if (if_block) if_block.d(detaching); - if (detaching) detach_dev(if_block_anchor); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block.name, - type: "each", - source: "(135:12) {#each manifesto as line}", - ctx - }); - - return block; -} - -// (109:8) {#key key} -function create_key_block(ctx) { - let div1; - let button; - let t0; - let img; - let img_src_value; - let t1; - let div0; - let t2; - let each1_anchor; - let mounted; - let dispose; - let each_value_3 = /*contentHeadings*/ ctx[8]; - validate_each_argument(each_value_3); - let each_blocks_1 = []; - - for (let i = 0; i < each_value_3.length; i += 1) { - each_blocks_1[i] = create_each_block_3(get_each_context_3(ctx, each_value_3, i)); - } - - let each_value = /*manifesto*/ ctx[7]; - 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 block = { - c: function create() { - div1 = element("div"); - button = element("button"); - t0 = text("TABLE OF CONTENTS\r\n "); - img = element("img"); - t1 = space(); - div0 = element("div"); - - for (let i = 0; i < each_blocks_1.length; i += 1) { - each_blocks_1[i].c(); - } - - t2 = space(); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - each1_anchor = empty(); - if (!src_url_equal(img.src, img_src_value = "../assets/arrow_down.svg")) attr_dev(img, "src", img_src_value); - attr_dev(img, "alt", "arrow down"); - set_style(img, "transform", "scaleY(-1)"); - add_location(img, file, 112, 20, 3900); - attr_dev(button, "id", "toggle-content"); - add_location(button, file, 110, 16, 3731); - attr_dev(div0, "class", "module"); - set_style(div0, "display", "initial"); - add_location(div0, file, 114, 16, 4053); - attr_dev(div1, "id", "table-content"); - add_location(div1, file, 109, 12, 3664); - }, - m: function mount(target, anchor) { - insert_dev(target, div1, anchor); - append_dev(div1, button); - append_dev(button, t0); - append_dev(button, img); - /*img_binding*/ ctx[10](img); - /*button_binding*/ ctx[11](button); - append_dev(div1, t1); - append_dev(div1, div0); - - for (let i = 0; i < each_blocks_1.length; i += 1) { - each_blocks_1[i].m(div0, null); - } - - /*div0_binding*/ ctx[17](div0); - /*div1_binding*/ ctx[18](div1); - insert_dev(target, t2, anchor); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(target, anchor); - } - - insert_dev(target, each1_anchor, anchor); - - if (!mounted) { - dispose = listen_dev(button, "click", /*click_handler*/ ctx[12], false, false, false); - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*contentHeadings, buttons, goToChapter*/ 784) { - each_value_3 = /*contentHeadings*/ ctx[8]; - validate_each_argument(each_value_3); - let i; - - for (i = 0; i < each_value_3.length; i += 1) { - const child_ctx = get_each_context_3(ctx, each_value_3, i); - - if (each_blocks_1[i]) { - each_blocks_1[i].p(child_ctx, dirty); - } else { - each_blocks_1[i] = create_each_block_3(child_ctx); - each_blocks_1[i].c(); - each_blocks_1[i].m(div0, null); - } - } - - for (; i < each_blocks_1.length; i += 1) { - each_blocks_1[i].d(1); - } - - each_blocks_1.length = each_value_3.length; - } - - if (dirty[0] & /*manifesto, contentTable, headingsObjects*/ 224) { - each_value = /*manifesto*/ ctx[7]; - 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(each1_anchor.parentNode, each1_anchor); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value.length; - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(div1); - /*img_binding*/ ctx[10](null); - /*button_binding*/ ctx[11](null); - destroy_each(each_blocks_1, detaching); - /*div0_binding*/ ctx[17](null); - /*div1_binding*/ ctx[18](null); - if (detaching) detach_dev(t2); - destroy_each(each_blocks, detaching); - if (detaching) detach_dev(each1_anchor); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_key_block.name, - type: "key", - source: "(109:8) {#key key}", - ctx - }); - - return block; -} - -function create_fragment(ctx) { - let div1; - let div0; - let previous_key = /*key*/ ctx[0]; - let key_block = create_key_block(ctx); - - const block = { - c: function create() { - div1 = element("div"); - div0 = element("div"); - key_block.c(); - this.c = noop; - attr_dev(div0, "id", "text-container"); - add_location(div0, file, 107, 4, 3605); - attr_dev(div1, "id", "container"); - add_location(div1, file, 106, 0, 3579); - }, - 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, div1, anchor); - append_dev(div1, div0); - key_block.m(div0, null); - }, - p: function update(ctx, dirty) { - if (dirty[0] & /*key*/ 1 && safe_not_equal(previous_key, previous_key = /*key*/ ctx[0])) { - key_block.d(1); - key_block = create_key_block(ctx); - key_block.c(); - key_block.m(div0, null); - } else { - key_block.p(ctx, dirty); - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div1); - key_block.d(detaching); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_fragment.name, - type: "component", - source: "", - ctx - }); - - return block; -} - -function hideBlock(arrow, block) { - if (block.style.display == "none" || block.style.display == "") { - block.style.display = "initial"; - arrow.style.transform = "scaleY(-1)"; - localStorage.setItem("manifesto-hide-content", "false"); - } else { - block.style.display = "none"; - arrow.style.transform = ""; - localStorage.setItem("manifesto-hide-content", "true"); - } -} - -function instance($$self, $$props, $$invalidate) { - let { $$slots: slots = {}, $$scope } = $$props; - validate_slots('manifesto-component', slots, []); - let manifesto = []; - let key; - let contentButton; - let contentArrow; - let contentBlock; - let buttons = []; - let headingsObjects = {}; - let contentHeadings = []; - let contentTable; - const htmlDelims = ["ul", "ol"]; - - getData("/assets/manifesto.txt", function (response) { - let splitText = response.split(/\r?\n/); - let currentChapter; - let cnt = 0; - - for (let j = 0; j < splitText.length; j++) { - let line = splitText[j]; - let delimInd = htmlDelims.map(x => line.includes("<" + x + ">")).findIndex(x => x); - - if (delimInd != -1) { - let delim = htmlDelims[delimInd]; - let obj = {}; - obj[delim] = []; - let delimEndTag = ""; - - while (true) { - j += 1; - line = splitText[j]; - - if (line.includes(delimEndTag)) { - manifesto.push(obj); - break; - } else { - obj[delim].push(line); - } - } - } else { - if (line.slice(0, 3) == "###") { - let heading = line.slice(4, line.length); - let id = heading.toLowerCase().trim().replaceAll(" ", "-"); - currentChapter.push({ id, name: heading, index: cnt }); - cnt += 1; - - manifesto.push({ - type: "h3", - id, - line: heading, - index: cnt - }); - } else if (line.slice(0, 2) == "##") { - let heading = line.slice(3, line.length); - let id = heading.toLowerCase().trim().replaceAll(" ", "-"); - - contentHeadings.push({ - id: heading.toLowerCase().trim().replaceAll(" ", "-"), - name: heading, - index: cnt - }); - - cnt += 1; - currentChapter = []; - contentHeadings.push(currentChapter); - - manifesto.push({ - type: "h2", - id, - line: heading, - index: cnt - }); - } else { - manifesto.push(line); - } - } - } - - $$invalidate(0, key += 1); - }); - - function goToChapter(id) { - headingsObjects[id].scrollIntoView({ block: 'start' }, true); - } - - onMount(() => { - let hideBool = localStorage.getItem("manifesto-hide-content"); - - if (hideBool != undefined && hideBool != null) { - if (hideBool == "true") { - hideBlock(contentArrow, contentBlock); - } - } - }); - - const writable_props = []; - - Object_1.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - function img_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - contentArrow = $$value; - $$invalidate(2, contentArrow); - }); - } - - function button_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - contentButton = $$value; - $$invalidate(1, contentButton); - }); - } - - const click_handler = () => hideBlock(contentArrow, contentBlock); - - function button_binding_1($$value, obj2) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - buttons[obj2.index] = $$value; - $$invalidate(4, buttons); - }); - } - - const click_handler_1 = obj2 => goToChapter(obj2.id); - - function button_binding_2($$value, obj) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - buttons[obj.index] = $$value; - $$invalidate(4, buttons); - }); - } - - const click_handler_2 = obj => goToChapter(obj.id); - - function div0_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - contentBlock = $$value; - $$invalidate(3, contentBlock); - }); - } - - function div1_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - contentTable = $$value; - $$invalidate(6, contentTable); - }); - } - - function h3_binding($$value, line) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - headingsObjects[line.id] = $$value; - $$invalidate(5, headingsObjects); - }); - } - - function h2_binding($$value, line) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - headingsObjects[line.id] = $$value; - $$invalidate(5, headingsObjects); - }); - } - - $$self.$capture_state = () => ({ - onMount, - getData, - manifesto, - key, - contentButton, - contentArrow, - contentBlock, - buttons, - headingsObjects, - contentHeadings, - contentTable, - htmlDelims, - hideBlock, - goToChapter - }); - - $$self.$inject_state = $$props => { - if ('manifesto' in $$props) $$invalidate(7, manifesto = $$props.manifesto); - if ('key' in $$props) $$invalidate(0, key = $$props.key); - if ('contentButton' in $$props) $$invalidate(1, contentButton = $$props.contentButton); - if ('contentArrow' in $$props) $$invalidate(2, contentArrow = $$props.contentArrow); - if ('contentBlock' in $$props) $$invalidate(3, contentBlock = $$props.contentBlock); - if ('buttons' in $$props) $$invalidate(4, buttons = $$props.buttons); - if ('headingsObjects' in $$props) $$invalidate(5, headingsObjects = $$props.headingsObjects); - if ('contentHeadings' in $$props) $$invalidate(8, contentHeadings = $$props.contentHeadings); - if ('contentTable' in $$props) $$invalidate(6, contentTable = $$props.contentTable); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [ - key, - contentButton, - contentArrow, - contentBlock, - buttons, - headingsObjects, - contentTable, - manifesto, - contentHeadings, - goToChapter, - img_binding, - button_binding, - click_handler, - button_binding_1, - click_handler_1, - button_binding_2, - click_handler_2, - div0_binding, - div1_binding, - h3_binding, - h2_binding - ]; -} - -class Manifesto_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - {}, - null, - [-1, -1] - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - } - } -} - -customElements.define("manifesto-component", Manifesto_component); - -export { Manifesto_component as default }; +import{S as t,i as e,a as n,b as l,s as o,e as i,n as r,d as s,h as c,j as a,o as u,t as d,c as f,w as m,f as h,m as p,p as g,k as b,r as w,x as y,H as x}from"./index-01c5cbf1.js";import{getData as v}from"../../../../../../../../../js/libraries/serverTools.js";function k(t,e,n){const l=t.slice();return l[22]=e[n],l[23]=e,l[24]=n,l}function I(t,e,n){const l=t.slice();return l[25]=e[n],l}function L(t,e,n){const l=t.slice();return l[25]=e[n],l}function T(t,e,n){const l=t.slice();return l[30]=e[n],l[31]=e,l[32]=n,l}function j(t,e,n){const l=t.slice();return l[33]=e[n],l[34]=e,l[35]=n,l}function z(t){let e,n,o,r,u,m,h=t[30].name+"",p=t[30];const b=()=>t[15](n,p),w=()=>t[15](null,p);function y(){return t[16](t[30])}return{c(){e=i("div"),n=i("button"),o=d(h),r=f(),s(n,"class","level0 heading-button"),s(e,"class","heading-button-wrapper")},m(t,i){l(t,e,i),c(e,n),c(n,o),b(),c(e,r),u||(m=g(n,"click",y),u=!0)},p(e,n){p!==(t=e)[30]&&(w(),p=t[30],b())},d(t){t&&a(e),w(),u=!1,m()}}}function A(t){let e,n=t[30],o=[];for(let e=0;et[13](n,p),w=()=>t[13](null,p);function y(){return t[14](t[33])}return{c(){e=i("div"),n=i("button"),o=d(h),r=f(),s(n,"class","level1 heading-button"),s(e,"class","heading-button-wrapper")},m(t,i){l(t,e,i),c(e,n),c(n,o),b(),c(e,r),u||(m=g(n,"click",y),u=!0)},p(e,n){p!==(t=e)[33]&&(w(),p=t[33],b())},d(t){t&&a(e),w(),u=!1,m()}}}function M(t){let e;let n=function(t,e){return Array.isArray(t[30])?A:z}(t),o=n(t);return{c(){o.c(),e=m()},m(t,n){o.m(t,n),l(t,e,n)},p(t,e){o.p(t,e)},d(t){o.d(t),t&&a(e)}}}function S(t){let e,n,o,u=t[22]+"";return{c(){e=i("p"),n=new x(!1),o=f(),n.a=o,s(e,"class","margin-end")},m(t,i){l(t,e,i),n.m(u,e),c(e,o)},p:r,d(t){t&&a(e)}}}function V(t){let e,n=t[22].slice(2,t[22].length)+"";return{c(){e=i("h1")},m(t,o){l(t,e,o),e.innerHTML=n},p:r,d(t){t&&a(e)}}}function C(t){let e,n,o,r,u,d=t[22].line+"",m=t[22];const h=()=>t[20](n,m),b=()=>t[20](null,m);return{c(){e=i("button"),n=i("h2"),o=f(),s(n,"id",t[22].id),p(e,"display","block"),p(e,"width","100%")},m(i,s){l(i,e,s),c(e,n),n.innerHTML=d,h(),c(e,o),r||(u=g(e,"click",(function(){y(t[6].scrollIntoView({block:"start"},!0))&&t[6].scrollIntoView({block:"start"},!0).apply(this,arguments)})),r=!0)},p(e,n){m!==(t=e)[22]&&(b(),m=t[22],h())},d(t){t&&a(e),b(),r=!1,u()}}}function E(t){let e,n,o,r,u,d=t[22].line+"",m=t[22];const h=()=>t[19](n,m),b=()=>t[19](null,m);return{c(){e=i("button"),n=i("h3"),o=f(),s(n,"id",t[22].id),p(e,"display","block")},m(i,s){l(i,e,s),c(e,n),n.innerHTML=d,h(),c(e,o),r||(u=g(e,"click",(function(){y(t[6].scrollIntoView({block:"start"},!0))&&t[6].scrollIntoView({block:"start"},!0).apply(this,arguments)})),r=!0)},p(e,n){m!==(t=e)[22]&&(b(),m=t[22],h())},d(t){t&&a(e),b(),r=!1,u()}}}function N(t){let e,n,o=t[22].ol,r=[];for(let e=0;en.includes("<"+t+">"))).findIndex((t=>t));if(-1!=l){let e=m[l],i={};i[e]=[];let r="";for(;;){if(t+=1,n=o[t],n.includes(r)){c.push(i);break}i[e].push(n)}}else if("###"==n.slice(0,3)){let t=n.slice(4,n.length),l=t.toLowerCase().trim().replaceAll(" ","-");e.push({id:l,name:t,index:i}),i+=1,c.push({type:"h3",id:l,line:t,index:i})}else if("##"==n.slice(0,2)){let t=n.slice(3,n.length),l=t.toLowerCase().trim().replaceAll(" ","-");f.push({id:t.toLowerCase().trim().replaceAll(" ","-"),name:t,index:i}),i+=1,e=[],f.push(e),c.push({type:"h2",id:l,line:t,index:i})}else c.push(n)}n(0,l+=1)})),u((()=>{let t=localStorage.getItem("manifesto-hide-content");null!=t&&null!=t&&"true"==t&&q(i,r)}));return[l,o,i,r,a,d,s,c,f,h,function(t){w[t?"unshift":"push"]((()=>{i=t,n(2,i)}))},function(t){w[t?"unshift":"push"]((()=>{o=t,n(1,o)}))},()=>q(i,r),function(t,e){w[t?"unshift":"push"]((()=>{a[e.index]=t,n(4,a)}))},t=>h(t.id),function(t,e){w[t?"unshift":"push"]((()=>{a[e.index]=t,n(4,a)}))},t=>h(t.id),function(t){w[t?"unshift":"push"]((()=>{r=t,n(3,r)}))},function(t){w[t?"unshift":"push"]((()=>{s=t,n(6,s)}))},function(t,e){w[t?"unshift":"push"]((()=>{d[e.id]=t,n(5,d)}))},function(t,e){w[t?"unshift":"push"]((()=>{d[e.id]=t,n(5,d)}))}]}class G extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},D,F,o,{},null,[-1,-1]),t&&t.target&&l(t.target,this,t.anchor)}}customElements.define("manifesto-component",G);export{G as default}; diff --git a/Server/public/js/components/map-component.js b/Server/public/js/components/map-component.js index f7f4fcf..9702149 100644 --- a/Server/public/js/components/map-component.js +++ b/Server/public/js/components/map-component.js @@ -1,152 +1 @@ - -(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); -import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, q as flush, s as safe_not_equal, d as dispatch_dev, c as validate_slots, o as onMount, e as element, n as noop, h as attr_dev, g as add_location, m as detach_dev, u as binding_callbacks } from './index-9ff7cb25.js'; - -/* src\components\map-component.svelte generated by Svelte v3.52.0 */ -const file = "src\\components\\map-component.svelte"; - -function create_fragment(ctx) { - let div; - - const block = { - c: function create() { - div = element("div"); - this.c = noop; - attr_dev(div, "id", "map"); - add_location(div, file, 30, 0, 720); - }, - 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, div, anchor); - /*div_binding*/ ctx[2](div); - }, - p: noop, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - /*div_binding*/ ctx[2](null); - } - }; - - 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('map-component', slots, []); - let { callback = null } = $$props; - - // Main code - let mapContainer; - - function createMap(center, zoom) { - let map = L.map(mapContainer, { center, zoom }); - - L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { - attribution: '© OpenStreetMap contributors' - }).addTo(map); - - return map; - } - - onMount(() => { - callback(createMap); - }); - - const writable_props = ['callback']; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - function div_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - mapContainer = $$value; - $$invalidate(0, mapContainer); - }); - } - - $$self.$$set = $$props => { - if ('callback' in $$props) $$invalidate(1, callback = $$props.callback); - }; - - $$self.$capture_state = () => ({ - onMount, - callback, - mapContainer, - createMap - }); - - $$self.$inject_state = $$props => { - if ('callback' in $$props) $$invalidate(1, callback = $$props.callback); - if ('mapContainer' in $$props) $$invalidate(0, mapContainer = $$props.mapContainer); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [mapContainer, callback, div_binding]; -} - -class Map_component extends SvelteElement { - constructor(options) { - super(); - - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - { callback: 1 }, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - - if (options.props) { - this.$set(options.props); - flush(); - } - } - } - - static get observedAttributes() { - return ["callback"]; - } - - get callback() { - return this.$$.ctx[1]; - } - - set callback(callback) { - this.$$set({ callback }); - flush(); - } -} - -customElements.define("map-component", Map_component); - -export { Map_component as default }; +import{S as t,i as a,a as e,b as s,l as r,s as o,e as n,n as i,d as c,j as l,o as p,r as h}from"./index-01c5cbf1.js";function u(t){let a;return{c(){a=n("div"),this.c=i,c(a,"id","map")},m(e,r){s(e,a,r),t[2](a)},p:i,i:i,o:i,d(e){e&&l(a),t[2](null)}}}function m(t,a,e){let s,{callback:r=null}=a;function o(t,a){let e=L.map(s,{center:t,zoom:a});return L.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap contributors'}).addTo(e),e}return p((()=>{r(o)})),t.$$set=t=>{"callback"in t&&e(1,r=t.callback)},[s,r,function(t){h[t?"unshift":"push"]((()=>{s=t,e(0,s)}))}]}class b extends t{constructor(t){super(),this.shadowRoot.innerHTML="",a(this,{target:this.shadowRoot,props:e(this.attributes),customElement:!0},m,u,o,{callback:1},null),t&&(t.target&&s(t.target,this,t.anchor),t.props&&(this.$set(t.props),r()))}static get observedAttributes(){return["callback"]}get callback(){return this.$$.ctx[1]}set callback(t){this.$$set({callback:t}),r()}}customElements.define("map-component",b);export{b as default}; diff --git a/Server/public/js/components/navbar-component.js b/Server/public/js/components/navbar-component.js index 65e4669..18dc44f 100644 --- a/Server/public/js/components/navbar-component.js +++ b/Server/public/js/components/navbar-component.js @@ -1,265 +1 @@ - -(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); -import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, c as validate_slots, o as onMount, e as element, f as space, n as noop, j as src_url_equal, h as attr_dev, g as add_location, l as append_dev, x as listen_dev, m as detach_dev, u as binding_callbacks } from './index-9ff7cb25.js'; - -/* src\navbar\navbar-component.svelte generated by Svelte v3.52.0 */ -const file = "src\\navbar\\navbar-component.svelte"; - -function create_fragment(ctx) { - let header; - let a0; - let img; - let img_src_value; - let t0; - let span0; - let t2; - let input; - let t3; - let label; - let span1; - let t4; - let nav; - let ul; - let li0; - let a1; - let t6; - let li1; - let a2; - let t8; - let li2; - let a3; - let t10; - let li3; - let a4; - let t12; - let li4; - let a5; - let mounted; - let dispose; - - const block = { - c: function create() { - header = element("header"); - a0 = element("a"); - img = element("img"); - t0 = space(); - span0 = element("span"); - span0.textContent = "Libertarian socialists"; - t2 = space(); - input = element("input"); - t3 = space(); - label = element("label"); - span1 = element("span"); - t4 = space(); - nav = element("nav"); - ul = element("ul"); - li0 = element("li"); - a1 = element("a"); - a1.textContent = "Manifesto"; - t6 = space(); - li1 = element("li"); - a2 = element("a"); - a2.textContent = "Join us"; - t8 = space(); - li2 = element("li"); - a3 = element("a"); - a3.textContent = "Groups"; - t10 = space(); - li3 = element("li"); - a4 = element("a"); - a4.textContent = "Communities"; - t12 = space(); - li4 = element("li"); - a5 = element("a"); - a5.textContent = "Cooperatives"; - this.c = noop; - if (!src_url_equal(img.src, img_src_value = "img/common/flag.png")) attr_dev(img, "src", img_src_value); - attr_dev(img, "id", "navbar-logo"); - attr_dev(img, "alt", "logo"); - add_location(img, file, 37, 8, 812); - attr_dev(span0, "id", "navbar-logo-text"); - add_location(span0, file, 38, 8, 881); - attr_dev(a0, "id", "logo-container"); - attr_dev(a0, "href", "/"); - add_location(a0, file, 36, 4, 772); - attr_dev(input, "type", "checkbox"); - attr_dev(input, "id", "side-menu"); - add_location(input, file, 41, 4, 983); - attr_dev(span1, "id", "hamb-line"); - add_location(span1, file, 42, 37, 1106); - attr_dev(label, "id", "hamb"); - attr_dev(label, "for", "side-menu"); - add_location(label, file, 42, 4, 1073); - attr_dev(a1, "href", "/manifesto"); - add_location(a1, file, 46, 16, 1223); - add_location(li0, file, 46, 12, 1219); - attr_dev(a2, "href", "/join-us"); - add_location(a2, file, 47, 16, 1280); - add_location(li1, file, 47, 12, 1276); - attr_dev(a3, "href", "/groups"); - add_location(a3, file, 48, 16, 1333); - add_location(li2, file, 48, 12, 1329); - attr_dev(a4, "href", "/communities"); - add_location(a4, file, 49, 16, 1384); - add_location(li3, file, 49, 12, 1380); - attr_dev(a5, "href", "/cooperatives"); - add_location(a5, file, 50, 16, 1445); - add_location(li4, file, 50, 12, 1441); - attr_dev(ul, "id", "menu"); - add_location(ul, file, 45, 8, 1191); - attr_dev(nav, "id", "nav"); - add_location(nav, file, 44, 4, 1167); - attr_dev(header, "id", "navbar"); - add_location(header, file, 34, 0, 708); - }, - 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, a0); - append_dev(a0, img); - append_dev(a0, t0); - append_dev(a0, span0); - append_dev(header, t2); - append_dev(header, input); - /*input_binding*/ ctx[3](input); - append_dev(header, t3); - append_dev(header, label); - append_dev(label, span1); - append_dev(header, t4); - append_dev(header, nav); - append_dev(nav, ul); - append_dev(ul, li0); - append_dev(li0, a1); - append_dev(ul, t6); - append_dev(ul, li1); - append_dev(li1, a2); - append_dev(ul, t8); - append_dev(ul, li2); - append_dev(li2, a3); - append_dev(ul, t10); - append_dev(ul, li3); - append_dev(li3, a4); - append_dev(ul, t12); - append_dev(ul, li4); - append_dev(li4, a5); - /*header_binding*/ ctx[4](header); - - if (!mounted) { - dispose = listen_dev(input, "click", /*changeNavbar*/ ctx[2], false, false, false); - mounted = true; - } - }, - p: noop, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(header); - /*input_binding*/ ctx[3](null); - /*header_binding*/ ctx[4](null); - mounted = false; - dispose(); - } - }; - - 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('navbar-component', slots, []); - let hambInput; - let navbar; - - function changeNavbar() { - if (hambInput.checked) { - $$invalidate(1, navbar.style.background = "white", navbar); - } else { - setTimeout( - () => { - $$invalidate(1, navbar.style.position = "relative", navbar); - $$invalidate(1, navbar.style.background = "", navbar); - $$invalidate(1, navbar.style.boxShadow = "", navbar); - }, - 510 - ); - } - } - - onMount(() => { - - }); - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - function input_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - hambInput = $$value; - $$invalidate(0, hambInput); - }); - } - - function header_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - navbar = $$value; - $$invalidate(1, navbar); - }); - } - - $$self.$capture_state = () => ({ onMount, hambInput, navbar, changeNavbar }); - - $$self.$inject_state = $$props => { - if ('hambInput' in $$props) $$invalidate(0, hambInput = $$props.hambInput); - if ('navbar' in $$props) $$invalidate(1, navbar = $$props.navbar); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [hambInput, navbar, changeNavbar, input_binding, header_binding]; -} - -class Navbar_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - 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("navbar-component", Navbar_component); - -export { Navbar_component as default }; +import{S as s,i,a as n,b as a,s as e,e as t,c as o,n as r,d as l,h as c,p as u,j as h,o as m,r as d}from"./index-01c5cbf1.js";function p(s){let i,n,e,m,d,p,f,b,g,v;return{c(){i=t("header"),n=t("a"),n.innerHTML=' \n Libertarian socialists',e=o(),m=t("input"),d=o(),p=t("label"),p.innerHTML='',f=o(),b=t("nav"),b.innerHTML='',this.c=r,l(n,"id","logo-container"),l(n,"href","/"),l(m,"type","checkbox"),l(m,"id","side-menu"),l(p,"id","hamb"),l(p,"for","side-menu"),l(b,"id","nav"),l(i,"id","navbar")},m(t,o){a(t,i,o),c(i,n),c(i,e),c(i,m),s[3](m),c(i,d),c(i,p),c(i,f),c(i,b),s[4](i),g||(v=u(m,"click",s[2]),g=!0)},p:r,i:r,o:r,d(n){n&&h(i),s[3](null),s[4](null),g=!1,v()}}}function f(s,i,n){let a,e;return m((()=>{})),[a,e,function(){a.checked?n(1,e.style.background="white",e):setTimeout((()=>{n(1,e.style.position="relative",e),n(1,e.style.background="",e),n(1,e.style.boxShadow="",e)}),510)},function(s){d[s?"unshift":"push"]((()=>{a=s,n(0,a)}))},function(s){d[s?"unshift":"push"]((()=>{e=s,n(1,e)}))}]}class b extends s{constructor(s){super(),this.shadowRoot.innerHTML="",i(this,{target:this.shadowRoot,props:n(this.attributes),customElement:!0},f,p,e,{},null),s&&s.target&&a(s.target,this,s.anchor)}}customElements.define("navbar-component",b);export{b as default}; diff --git a/Server/public/js/components/pane-aligner.js b/Server/public/js/components/pane-aligner.js index bb4a4a9..4323cf7 100644 --- a/Server/public/js/components/pane-aligner.js +++ b/Server/public/js/components/pane-aligner.js @@ -1,304 +1 @@ - -(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); -import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, s as safe_not_equal, d as dispatch_dev, c as validate_slots, z as getContext, o as onMount, A as setContext, e as element, f as space, n as noop, h as attr_dev, g as add_location, l as append_dev, m as detach_dev, u as binding_callbacks } from './index-9ff7cb25.js'; -import { debounce } from '../../../../../../../../../js/libraries/miscTools.js'; - -/* src\components\pane-aligner.svelte generated by Svelte v3.52.0 */ -const file = "src\\components\\pane-aligner.svelte"; - -function create_fragment(ctx) { - let div6; - let div5; - let div2; - let div0; - let slot0; - let t0; - let div1; - let slot1; - let t1; - let div3; - let slot2; - let t2; - let div4; - let slot3; - - const block = { - c: function create() { - div6 = element("div"); - div5 = element("div"); - div2 = element("div"); - div0 = element("div"); - slot0 = element("slot"); - t0 = space(); - div1 = element("div"); - slot1 = element("slot"); - t1 = space(); - div3 = element("div"); - slot2 = element("slot"); - t2 = space(); - div4 = element("div"); - slot3 = element("slot"); - this.c = noop; - attr_dev(slot0, "name", "sidebar-left"); - add_location(slot0, file, 74, 16, 2567); - attr_dev(div0, "id", "sidebar-left"); - attr_dev(div0, "class", "pane"); - add_location(div0, file, 73, 12, 2489); - attr_dev(slot1, "name", "sidebar-left2"); - add_location(slot1, file, 77, 16, 2714); - attr_dev(div1, "id", "sidebar-left2"); - attr_dev(div1, "class", "pane"); - add_location(div1, file, 76, 12, 2634); - attr_dev(div2, "id", "sidebars-left"); - attr_dev(div2, "class", "sidebar"); - add_location(div2, file, 72, 8, 2435); - attr_dev(slot2, "name", "sidebar-right"); - add_location(slot2, file, 81, 12, 2879); - attr_dev(div3, "id", "sidebar-right"); - attr_dev(div3, "class", "pane sidebar"); - add_location(div3, file, 80, 8, 2794); - attr_dev(slot3, "name", "main"); - attr_dev(slot3, "id", "main-slot"); - add_location(slot3, file, 84, 12, 3007); - attr_dev(div4, "id", "main-pane"); - attr_dev(div4, "class", "pane"); - add_location(div4, file, 83, 8, 2939); - attr_dev(div5, "class", "pane-container"); - add_location(div5, file, 71, 4, 2397); - attr_dev(div6, "id", "root"); - attr_dev(div6, "class", "pane-centering"); - add_location(div6, file, 70, 0, 2336); - }, - 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, div6, anchor); - append_dev(div6, div5); - append_dev(div5, div2); - append_dev(div2, div0); - append_dev(div0, slot0); - /*div0_binding*/ ctx[5](div0); - append_dev(div2, t0); - append_dev(div2, div1); - append_dev(div1, slot1); - /*div1_binding*/ ctx[6](div1); - append_dev(div5, t1); - append_dev(div5, div3); - append_dev(div3, slot2); - /*div3_binding*/ ctx[7](div3); - append_dev(div5, t2); - append_dev(div5, div4); - append_dev(div4, slot3); - /*div4_binding*/ ctx[8](div4); - /*div6_binding*/ ctx[9](div6); - }, - p: noop, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div6); - /*div0_binding*/ ctx[5](null); - /*div1_binding*/ ctx[6](null); - /*div3_binding*/ ctx[7](null); - /*div4_binding*/ ctx[8](null); - /*div6_binding*/ ctx[9](null); - } - }; - - 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('pane-aligner', slots, []); - let root; - let mainPane; - let sidebarLeft; - let sidebarLeft2; - let sidebarRight; - let parentProps = getContext("alignerParent"); - - let switchView = parentProps != undefined - ? getContext("alignerParent").switchView - : undefined; - - let leftReplaced = false; - let left2Replaced = false; - let rightReplaced = false; - let switchViewReplaced = false; - - function adjustSlotted() { - if (root.parentNode != null) { - let slotted = root.parentNode.host.childNodes; - - if (slotted.length == 0) { - setTimeout(adjustSlotted, 50); - } else { - let changed = false; - let html = root.parentNode.innerHTML; - - for (let item of slotted) { - if (item.slot == "sidebar-left" && !leftReplaced) { - html = html.replace("#sidebar-left{display:none}", ""); - leftReplaced = true; - changed = true; - } else if (item.slot == "sidebar-left2" && !left2Replaced) { - html = html.replace("#sidebar-left2{display:none}", ""); - left2Replaced = true; - changed = true; - } else if (item.slot == "sidebar-right" && !rightReplaced) { - html = html.replace("#sidebar-right{display:none;", "#sidebar-right{"); - rightReplaced = true; - changed = true; - } - } - - if (switchView != undefined && !switchViewReplaced) { - html = html.replace("1880px", switchView); - changed = true; - } - - if (changed) { - $$invalidate(0, root.parentNode.innerHTML = html, root); - } - } - } - } - - window.addEventListener("resize", debounce(adjustSlotted, 100)); - - onMount(() => { - adjustSlotted(); - }); - - const writable_props = []; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - function div0_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - sidebarLeft = $$value; - $$invalidate(2, sidebarLeft); - }); - } - - function div1_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - sidebarLeft2 = $$value; - $$invalidate(3, sidebarLeft2); - }); - } - - function div3_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - sidebarRight = $$value; - $$invalidate(4, sidebarRight); - }); - } - - function div4_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - mainPane = $$value; - $$invalidate(1, mainPane); - }); - } - - function div6_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - root = $$value; - $$invalidate(0, root); - }); - } - - $$self.$capture_state = () => ({ - getContext, - setContext, - onMount, - debounce, - root, - mainPane, - sidebarLeft, - sidebarLeft2, - sidebarRight, - parentProps, - switchView, - leftReplaced, - left2Replaced, - rightReplaced, - switchViewReplaced, - adjustSlotted - }); - - $$self.$inject_state = $$props => { - if ('root' in $$props) $$invalidate(0, root = $$props.root); - if ('mainPane' in $$props) $$invalidate(1, mainPane = $$props.mainPane); - if ('sidebarLeft' in $$props) $$invalidate(2, sidebarLeft = $$props.sidebarLeft); - if ('sidebarLeft2' in $$props) $$invalidate(3, sidebarLeft2 = $$props.sidebarLeft2); - if ('sidebarRight' in $$props) $$invalidate(4, sidebarRight = $$props.sidebarRight); - if ('parentProps' in $$props) parentProps = $$props.parentProps; - if ('switchView' in $$props) switchView = $$props.switchView; - if ('leftReplaced' in $$props) leftReplaced = $$props.leftReplaced; - if ('left2Replaced' in $$props) left2Replaced = $$props.left2Replaced; - if ('rightReplaced' in $$props) rightReplaced = $$props.rightReplaced; - if ('switchViewReplaced' in $$props) switchViewReplaced = $$props.switchViewReplaced; - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [ - root, - mainPane, - sidebarLeft, - sidebarLeft2, - sidebarRight, - div0_binding, - div1_binding, - div3_binding, - div4_binding, - div6_binding - ]; -} - -class Pane_aligner extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - 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("pane-aligner", Pane_aligner); - -export { Pane_aligner as default }; +import{S as i,i as e,a,b as t,s as n,e as r,c as s,n as d,d as o,h as l,j as m,u as p,o as h,r as c}from"./index-01c5cbf1.js";import{debounce as g}from"../../../../../../../../../js/libraries/miscTools.js";function f(i){let e,a,n,p,h,c,g,f,u,b;return{c(){e=r("div"),a=r("div"),n=r("div"),p=r("div"),p.innerHTML='',h=s(),c=r("div"),c.innerHTML='',g=s(),f=r("div"),f.innerHTML='',u=s(),b=r("div"),b.innerHTML='',this.c=d,o(p,"id","sidebar-left"),o(p,"class","pane"),o(c,"id","sidebar-left2"),o(c,"class","pane"),o(n,"id","sidebars-left"),o(n,"class","sidebar"),o(f,"id","sidebar-right"),o(f,"class","pane sidebar"),o(b,"id","main-pane"),o(b,"class","pane"),o(a,"class","pane-container"),o(e,"id","root"),o(e,"class","pane-centering")},m(r,s){t(r,e,s),l(e,a),l(a,n),l(n,p),i[5](p),l(n,h),l(n,c),i[6](c),l(a,g),l(a,f),i[7](f),l(a,u),l(a,b),i[8](b),i[9](e)},p:d,i:d,o:d,d(a){a&&m(e),i[5](null),i[6](null),i[7](null),i[8](null),i[9](null)}}}function u(i,e,a){let t,n,r,s,d,o=null!=p("alignerParent")?p("alignerParent").switchView:void 0,l=!1,m=!1,f=!1;function u(){if(null!=t.parentNode){let i=t.parentNode.host.childNodes;if(0==i.length)setTimeout(u,50);else{let e=!1,n=t.parentNode.innerHTML;for(let a of i)"sidebar-left"!=a.slot||l?"sidebar-left2"!=a.slot||m?"sidebar-right"!=a.slot||f||(n=n.replace("#sidebar-right{display:none;","#sidebar-right{"),f=!0,e=!0):(n=n.replace("#sidebar-left2{display:none}",""),m=!0,e=!0):(n=n.replace("#sidebar-left{display:none}",""),l=!0,e=!0);null!=o&&(n=n.replace("1880px",o),e=!0),e&&a(0,t.parentNode.innerHTML=n,t)}}}return window.addEventListener("resize",g(u,100)),h((()=>{u()})),[t,n,r,s,d,function(i){c[i?"unshift":"push"]((()=>{r=i,a(2,r)}))},function(i){c[i?"unshift":"push"]((()=>{s=i,a(3,s)}))},function(i){c[i?"unshift":"push"]((()=>{d=i,a(4,d)}))},function(i){c[i?"unshift":"push"]((()=>{n=i,a(1,n)}))},function(i){c[i?"unshift":"push"]((()=>{t=i,a(0,t)}))}]}class b extends i{constructor(i){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:a(this.attributes),customElement:!0},u,f,n,{},null),i&&i.target&&t(i.target,this,i.anchor)}}customElements.define("pane-aligner",b);export{b as default}; diff --git a/Server/public/js/components/select-component.js b/Server/public/js/components/select-component.js index 90fd108..b3945b7 100644 --- a/Server/public/js/components/select-component.js +++ b/Server/public/js/components/select-component.js @@ -1,593 +1 @@ - -(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); -import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, q as flush, s as safe_not_equal, d as dispatch_dev, c as validate_slots, o as onMount, v as validate_each_argument, e as element, n as noop, h as attr_dev, g as add_location, m as detach_dev, u as binding_callbacks, t as text, f as space, j as src_url_equal, w as set_style, l as append_dev, x as listen_dev, y as set_data_dev, p as destroy_each } from './index-9ff7cb25.js'; -import { px2rem, getTextWidth, getCanvasFont } from '../../../../../../../../../js/libraries/miscTools.js'; - -/* src\components\select-component.svelte generated by Svelte v3.52.0 */ -const file = "src\\components\\select-component.svelte"; - -function get_each_context(ctx, list, i) { - const child_ctx = ctx.slice(); - child_ctx[26] = list[i]; - child_ctx[27] = list; - child_ctx[28] = i; - return child_ctx; -} - -// (135:12) {#each options as option, i} -function create_each_block(ctx) { - let button; - let span; - let t0_value = /*option*/ ctx[26] + ""; - let t0; - let t1; - let i = /*i*/ ctx[28]; - let mounted; - let dispose; - const assign_button = () => /*button_binding_1*/ ctx[14](button, i); - const unassign_button = () => /*button_binding_1*/ ctx[14](null, i); - - function click_handler() { - return /*click_handler*/ ctx[15](/*i*/ ctx[28]); - } - - const block = { - c: function create() { - button = element("button"); - span = element("span"); - t0 = text(t0_value); - t1 = space(); - add_location(span, file, 136, 20, 4826); - button.value = /*i*/ ctx[28]; - add_location(button, file, 135, 16, 4715); - }, - m: function mount(target, anchor) { - insert_dev(target, button, anchor); - append_dev(button, span); - append_dev(span, t0); - append_dev(button, t1); - assign_button(); - - if (!mounted) { - dispose = listen_dev(button, "click", click_handler, false, false, false); - mounted = true; - } - }, - p: function update(new_ctx, dirty) { - ctx = new_ctx; - if (dirty & /*options*/ 4 && t0_value !== (t0_value = /*option*/ ctx[26] + "")) set_data_dev(t0, t0_value); - - if (i !== /*i*/ ctx[28]) { - unassign_button(); - i = /*i*/ ctx[28]; - assign_button(); - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(button); - unassign_button(); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_each_block.name, - type: "each", - source: "(135:12) {#each options as option, i}", - ctx - }); - - return block; -} - -// (127:4) {#key key} -function create_key_block(ctx) { - let button; - let div0; - let span; - let t0_value = (/*value*/ ctx[0] != null ? /*value*/ ctx[0] : "") + ""; - let t0; - let t1; - let img; - let img_src_value; - let t2; - let div1; - let mounted; - let dispose; - let each_value = /*options*/ 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 block = { - c: function create() { - button = element("button"); - div0 = element("div"); - span = element("span"); - t0 = text(t0_value); - t1 = space(); - img = element("img"); - t2 = space(); - div1 = element("div"); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].c(); - } - - attr_dev(span, "id", "current-options-span"); - add_location(span, file, 129, 16, 4359); - attr_dev(div0, "id", "current-options-div"); - add_location(div0, file, 128, 12, 4311); - attr_dev(img, "id", "arrow-down"); - if (!src_url_equal(img.src, img_src_value = "../assets/arrow_down.svg")) attr_dev(img, "src", img_src_value); - attr_dev(img, "alt", "arrow down"); - add_location(img, file, 131, 12, 4484); - attr_dev(button, "id", "current-option-button"); - add_location(button, file, 127, 8, 4202); - attr_dev(div1, "id", "options-holder"); - set_style(div1, "display", "none"); - add_location(div1, file, 133, 8, 4582); - }, - m: function mount(target, anchor) { - insert_dev(target, button, anchor); - append_dev(button, div0); - append_dev(div0, span); - append_dev(span, t0); - /*span_binding*/ ctx[12](span); - append_dev(button, t1); - append_dev(button, img); - /*button_binding*/ ctx[13](button); - insert_dev(target, t2, anchor); - insert_dev(target, div1, anchor); - - for (let i = 0; i < each_blocks.length; i += 1) { - each_blocks[i].m(div1, null); - } - - /*div1_binding*/ ctx[16](div1); - - if (!mounted) { - dispose = listen_dev(button, "click", /*changeVisibility*/ ctx[9], false, false, false); - mounted = true; - } - }, - p: function update(ctx, dirty) { - if (dirty & /*value*/ 1 && t0_value !== (t0_value = (/*value*/ ctx[0] != null ? /*value*/ ctx[0] : "") + "")) set_data_dev(t0, t0_value); - - if (dirty & /*optionButtons, changeOption, callback, options*/ 1062) { - each_value = /*options*/ 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); - } else { - each_blocks[i] = create_each_block(child_ctx); - each_blocks[i].c(); - each_blocks[i].m(div1, null); - } - } - - for (; i < each_blocks.length; i += 1) { - each_blocks[i].d(1); - } - - each_blocks.length = each_value.length; - } - }, - d: function destroy(detaching) { - if (detaching) detach_dev(button); - /*span_binding*/ ctx[12](null); - /*button_binding*/ ctx[13](null); - if (detaching) detach_dev(t2); - if (detaching) detach_dev(div1); - destroy_each(each_blocks, detaching); - /*div1_binding*/ ctx[16](null); - mounted = false; - dispose(); - } - }; - - dispatch_dev("SvelteRegisterBlock", { - block, - id: create_key_block.name, - type: "key", - source: "(127:4) {#key key}", - ctx - }); - - return block; -} - -function create_fragment(ctx) { - let div; - let previous_key = /*key*/ ctx[8]; - let key_block = create_key_block(ctx); - - const block = { - c: function create() { - div = element("div"); - key_block.c(); - this.c = noop; - attr_dev(div, "class", "select"); - add_location(div, file, 125, 0, 4137); - }, - 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, div, anchor); - key_block.m(div, null); - /*div_binding*/ ctx[17](div); - }, - p: function update(ctx, [dirty]) { - if (dirty & /*key*/ 256 && safe_not_equal(previous_key, previous_key = /*key*/ ctx[8])) { - key_block.d(1); - key_block = create_key_block(ctx); - key_block.c(); - key_block.m(div, null); - } else { - key_block.p(ctx, dirty); - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(div); - key_block.d(detaching); - /*div_binding*/ ctx[17](null); - } - }; - - 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('select-component', slots, []); - let { callback = null } = $$props; - let { options = [""] } = $$props; - let { value = null } = $$props; - let { valueindex = null } = $$props; - - // Main code - let root = arguments[0]; - - let select; - let optionsHolder; - let optionButtons = []; - let currentOption; - let currentOptionButton; - let init = false; - let key = 0; - let obs = null; - - function setKeyValue(value, options) { - if (value !== null) { - if (options.includes(value)) { - let index = options.findIndex(element => element == value); - $$invalidate(6, currentOption.innerHTML = value, currentOption); - $$invalidate(5, optionButtons[index].style.display = "none", optionButtons); - $$invalidate(11, valueindex = index); - } - - $$invalidate(8, key += 1); - } - } - - function setKeyIndex(valueindex, options) { - if (valueindex != null && options != undefined && options[valueindex] != value) { - $$invalidate(0, value = options[valueindex]); - $$invalidate(8, key += 1); - } - } - - function indexToValue(index) { - $$invalidate(0, value = options[index]); - } - - function changeVisibility() { - if (optionsHolder.style.display == "none") { - $$invalidate(4, optionsHolder.style.display = "initial", optionsHolder); - } else { - $$invalidate(4, optionsHolder.style.display = "none", optionsHolder); - } - } - - function changeOption(index, callback) { - $$invalidate(11, valueindex = index); - $$invalidate(0, value = options[index]); - - if (callback != undefined && callback != null) { - callback(index); - } - } - - function hideSelect() { - $$invalidate(4, optionsHolder.style.display = "none", optionsHolder); - } - - function changeOptionsWidth(select, optionsHolder) { - let selectWidth; - - if (select != undefined && optionsHolder != undefined) { - let selectWidthText = getComputedStyle(select).getPropertyValue('--width'); - - if (isNaN(selectWidthText) || selectWidthText == "") { - if (obs == null) { - obs = new ResizeObserver(() => changeOptionsWidth(select, optionsHolder)); - obs.observe(currentOptionButton); - return; - } else { - selectWidthText = getComputedStyle(currentOptionButton).getPropertyValue('width'); - selectWidth = px2rem(parseFloat(selectWidthText.slice(0, selectWidthText.length - 2))); - } - } else { - selectWidth = parseFloat(selectWidthText.slice(0, selectWidthText.length - 2)); - } - - let spanWidths = []; - - for (let i = 0; i < optionsHolder.children.length; i++) { - let span = optionsHolder.children[i].children[0]; - let spanWidth = getTextWidth(span.innerHTML, getCanvasFont(span)); - spanWidths.push(spanWidth); - } - - let maxOptionsWidth = px2rem(Math.max(...spanWidths)); - - if (maxOptionsWidth > selectWidth) { - let width = 1.1 * maxOptionsWidth + "rem"; - optionsHolder.style.width = width; - - for (let i = 0; i < optionsHolder.children.length; i++) { - let button = optionsHolder.children[i]; - button.style.width = width; - } - - optionsHolder.style.marginLeft = -(1.1 * maxOptionsWidth - selectWidth) / 2 - 0.05 + "rem"; - } else { - let width = selectWidth + 0.1 + "rem"; - - for (let i = 0; i < optionsHolder.children.length; i++) { - let button = optionsHolder.children[i]; - button.style.width = width; - } - } - } - } - - onMount(() => { - init = true; - root.addEventListener('focusout', hideSelect); - }); - - const writable_props = ['callback', 'options', 'value', 'valueindex']; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - function span_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - currentOption = $$value; - $$invalidate(6, currentOption); - }); - } - - function button_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - currentOptionButton = $$value; - $$invalidate(7, currentOptionButton); - }); - } - - function button_binding_1($$value, i) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - optionButtons[i] = $$value; - $$invalidate(5, optionButtons); - }); - } - - const click_handler = i => changeOption(i, callback); - - function div1_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - optionsHolder = $$value; - $$invalidate(4, optionsHolder); - }); - } - - function div_binding($$value) { - binding_callbacks[$$value ? 'unshift' : 'push'](() => { - select = $$value; - $$invalidate(3, select); - }); - } - - $$self.$$set = $$props => { - if ('callback' in $$props) $$invalidate(1, callback = $$props.callback); - if ('options' in $$props) $$invalidate(2, options = $$props.options); - if ('value' in $$props) $$invalidate(0, value = $$props.value); - if ('valueindex' in $$props) $$invalidate(11, valueindex = $$props.valueindex); - }; - - $$self.$capture_state = () => ({ - onMount, - px2rem, - getTextWidth, - getCanvasFont, - callback, - options, - value, - valueindex, - root, - select, - optionsHolder, - optionButtons, - currentOption, - currentOptionButton, - init, - key, - obs, - setKeyValue, - setKeyIndex, - indexToValue, - changeVisibility, - changeOption, - hideSelect, - changeOptionsWidth - }); - - $$self.$inject_state = $$props => { - if ('callback' in $$props) $$invalidate(1, callback = $$props.callback); - if ('options' in $$props) $$invalidate(2, options = $$props.options); - if ('value' in $$props) $$invalidate(0, value = $$props.value); - if ('valueindex' in $$props) $$invalidate(11, valueindex = $$props.valueindex); - if ('root' in $$props) root = $$props.root; - if ('select' in $$props) $$invalidate(3, select = $$props.select); - if ('optionsHolder' in $$props) $$invalidate(4, optionsHolder = $$props.optionsHolder); - if ('optionButtons' in $$props) $$invalidate(5, optionButtons = $$props.optionButtons); - if ('currentOption' in $$props) $$invalidate(6, currentOption = $$props.currentOption); - if ('currentOptionButton' in $$props) $$invalidate(7, currentOptionButton = $$props.currentOptionButton); - if ('init' in $$props) init = $$props.init; - if ('key' in $$props) $$invalidate(8, key = $$props.key); - if ('obs' in $$props) obs = $$props.obs; - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - $$self.$$.update = () => { - if ($$self.$$.dirty & /*value, options*/ 5) { - setKeyValue(value, options); - } - - if ($$self.$$.dirty & /*valueindex, options*/ 2052) { - setKeyIndex(valueindex, options); - } - - if ($$self.$$.dirty & /*select, optionsHolder*/ 24) { - changeOptionsWidth(select, optionsHolder); - } - }; - - return [ - value, - callback, - options, - select, - optionsHolder, - optionButtons, - currentOption, - currentOptionButton, - key, - changeVisibility, - changeOption, - valueindex, - span_binding, - button_binding, - button_binding_1, - click_handler, - div1_binding, - div_binding - ]; -} - -class Select_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - { - callback: 1, - options: 2, - value: 0, - valueindex: 11 - }, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - - if (options.props) { - this.$set(options.props); - flush(); - } - } - } - - static get observedAttributes() { - return ["callback", "options", "value", "valueindex"]; - } - - get callback() { - return this.$$.ctx[1]; - } - - set callback(callback) { - this.$$set({ callback }); - flush(); - } - - get options() { - return this.$$.ctx[2]; - } - - set options(options) { - this.$$set({ options }); - flush(); - } - - get value() { - return this.$$.ctx[0]; - } - - set value(value) { - this.$$set({ value }); - flush(); - } - - get valueindex() { - return this.$$.ctx[11]; - } - - set valueindex(valueindex) { - this.$$set({ valueindex }); - flush(); - } -} - -customElements.define("select-component", Select_component); - -export { Select_component as default }; +import{S as t,i as e,a as r,b as i,l as o,s as n,e as l,n as s,d as a,j as d,o as u,t as c,c as h,f as p,m as f,h as m,p as v,q as b,k as g,r as w}from"./index-01c5cbf1.js";import{px2rem as y,getTextWidth as x,getCanvasFont as $}from"../../../../../../../../../js/libraries/miscTools.js";function k(t,e,r){const i=t.slice();return i[26]=e[r],i[27]=e,i[28]=r,i}function z(t){let e,r,o,n,s,a,u=t[26]+"",p=t[28];const f=()=>t[14](e,p),g=()=>t[14](null,p);function w(){return t[15](t[28])}return{c(){e=l("button"),r=l("span"),o=c(u),n=h(),e.value=t[28]},m(t,l){i(t,e,l),m(e,r),m(r,o),m(e,n),f(),s||(a=v(e,"click",w),s=!0)},p(e,r){t=e,4&r&&u!==(u=t[26]+"")&&b(o,u),p!==t[28]&&(g(),p=t[28],f())},d(t){t&&d(e),g(),s=!1,a()}}}function L(t){let e,r,o,n,s,u,w,y,x,$,L,j=(null!=t[0]?t[0]:"")+"",M=t[2],T=[];for(let e=0;ee==t));r(6,n.innerHTML=t,n),r(5,p[i].style.display="none",p),r(11,c=i)}r(8,f+=1)}}function b(t,e){null!=t&&null!=e&&e[t]!=d&&(r(0,d=e[t]),r(8,f+=1))}function g(){"none"==o.style.display?r(4,o.style.display="initial",o):r(4,o.style.display="none",o)}function k(t,e){r(11,c=t),r(0,d=a[t]),null!=e&&null!=e&&e(t)}function z(){r(4,o.style.display="none",o)}function L(t,e){let r;if(null!=t&&null!=e){let i=getComputedStyle(t).getPropertyValue("--width");if(isNaN(i)||""==i){if(null==m)return m=new ResizeObserver((()=>L(t,e))),void m.observe(l);i=getComputedStyle(l).getPropertyValue("width"),r=y(parseFloat(i.slice(0,i.length-2)))}else r=parseFloat(i.slice(0,i.length-2));let o=[];for(let t=0;tr){let t=1.1*n+"rem";e.style.width=t;for(let r=0;r{n=t,r(6,n)}))}function M(t){w[t?"unshift":"push"]((()=>{l=t,r(7,l)}))}function T(t,e){w[t?"unshift":"push"]((()=>{p[e]=t,r(5,p)}))}u((()=>{h.addEventListener("focusout",z)}));const E=t=>k(t,s);function H(t){w[t?"unshift":"push"]((()=>{o=t,r(4,o)}))}function R(t){w[t?"unshift":"push"]((()=>{i=t,r(3,i)}))}return t.$$set=t=>{"callback"in t&&r(1,s=t.callback),"options"in t&&r(2,a=t.options),"value"in t&&r(0,d=t.value),"valueindex"in t&&r(11,c=t.valueindex)},t.$$.update=()=>{5&t.$$.dirty&&v(d,a),2052&t.$$.dirty&&b(c,a),24&t.$$.dirty&&L(i,o)},[d,s,a,i,o,p,n,l,f,g,k,c,j,M,T,E,H,R]}class T extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:r(this.attributes),customElement:!0},M,j,n,{callback:1,options:2,value:0,valueindex:11},null),t&&(t.target&&i(t.target,this,t.anchor),t.props&&(this.$set(t.props),o()))}static get observedAttributes(){return["callback","options","value","valueindex"]}get callback(){return this.$$.ctx[1]}set callback(t){this.$$set({callback:t}),o()}get options(){return this.$$.ctx[2]}set options(t){this.$$set({options:t}),o()}get value(){return this.$$.ctx[0]}set value(t){this.$$set({value:t}),o()}get valueindex(){return this.$$.ctx[11]}set valueindex(t){this.$$set({valueindex:t}),o()}}customElements.define("select-component",T);export{T as default}; diff --git a/Server/public/js/components/switch-component.js b/Server/public/js/components/switch-component.js index 5527fd1..c5aa47d 100644 --- a/Server/public/js/components/switch-component.js +++ b/Server/public/js/components/switch-component.js @@ -1,209 +1 @@ - -(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); -import { S as SvelteElement, i as init, a as attribute_to_object, b as insert_dev, q as flush, s as safe_not_equal, d as dispatch_dev, c as validate_slots, o as onMount, e as element, f as space, n as noop, h as attr_dev, g as add_location, l as append_dev, x as listen_dev, m as detach_dev, B as run_all } from './index-9ff7cb25.js'; -import { px2rem, getTextWidth, getCanvasFont } from '../../../../../../../../../js/libraries/miscTools.js'; - -/* src\components\switch-component.svelte generated by Svelte v3.52.0 */ -const file = "src\\components\\switch-component.svelte"; - -function create_fragment(ctx) { - let label; - let input; - let t; - let span; - let mounted; - let dispose; - - const block = { - c: function create() { - label = element("label"); - input = element("input"); - t = space(); - span = element("span"); - this.c = noop; - attr_dev(input, "type", "checkbox"); - add_location(input, file, 39, 4, 804); - attr_dev(span, "class", "switch-span"); - add_location(span, file, 40, 4, 880); - attr_dev(label, "class", "switch"); - add_location(label, file, 38, 0, 776); - }, - 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, label, anchor); - append_dev(label, input); - input.checked = /*checked*/ ctx[0]; - append_dev(label, t); - append_dev(label, span); - - if (!mounted) { - dispose = [ - listen_dev(input, "change", /*input_change_handler*/ ctx[4]), - listen_dev(input, "click", /*toggleClick*/ ctx[1], false, false, false) - ]; - - mounted = true; - } - }, - p: function update(ctx, [dirty]) { - if (dirty & /*checked*/ 1) { - input.checked = /*checked*/ ctx[0]; - } - }, - i: noop, - o: noop, - d: function destroy(detaching) { - if (detaching) detach_dev(label); - mounted = false; - run_all(dispose); - } - }; - - 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('switch-component', slots, []); - let { callback = null } = $$props; - let { checked = false } = $$props; - - const toggle = () => { - let f = () => { - if (callback != null) { - $$invalidate(0, checked = !checked); - callback(); - } else { - toggle(); - } - }; - - setTimeout(f, 100); - }; - - function toggleClick() { - if (callback != null) { - $$invalidate(0, checked = !checked); - callback(); - } - } - - // Main code - onMount(() => { - - }); - - const writable_props = ['callback', 'checked']; - - Object.keys($$props).forEach(key => { - if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(` was created with unknown prop '${key}'`); - }); - - function input_change_handler() { - checked = this.checked; - $$invalidate(0, checked); - } - - $$self.$$set = $$props => { - if ('callback' in $$props) $$invalidate(2, callback = $$props.callback); - if ('checked' in $$props) $$invalidate(0, checked = $$props.checked); - }; - - $$self.$capture_state = () => ({ - onMount, - px2rem, - getTextWidth, - getCanvasFont, - callback, - checked, - toggle, - toggleClick - }); - - $$self.$inject_state = $$props => { - if ('callback' in $$props) $$invalidate(2, callback = $$props.callback); - if ('checked' in $$props) $$invalidate(0, checked = $$props.checked); - }; - - if ($$props && "$$inject" in $$props) { - $$self.$inject_state($$props.$$inject); - } - - return [checked, toggleClick, callback, toggle, input_change_handler]; -} - -class Switch_component extends SvelteElement { - constructor(options) { - super(); - this.shadowRoot.innerHTML = ``; - - init( - this, - { - target: this.shadowRoot, - props: attribute_to_object(this.attributes), - customElement: true - }, - instance, - create_fragment, - safe_not_equal, - { callback: 2, checked: 0, toggle: 3 }, - null - ); - - if (options) { - if (options.target) { - insert_dev(options.target, this, options.anchor); - } - - if (options.props) { - this.$set(options.props); - flush(); - } - } - } - - static get observedAttributes() { - return ["callback", "checked", "toggle"]; - } - - get callback() { - return this.$$.ctx[2]; - } - - set callback(callback) { - this.$$set({ callback }); - flush(); - } - - get checked() { - return this.$$.ctx[0]; - } - - set checked(checked) { - this.$$set({ checked }); - flush(); - } - - get toggle() { - return this.$$.ctx[3]; - } - - set toggle(value) { - throw new Error(": Cannot set read-only property 'toggle'"); - } -} - -customElements.define("switch-component", Switch_component); - -export { Switch_component as default }; +import{S as t,i as e,a as s,b as c,l as i,s as a,e as r,c as o,n as h,d as n,h as l,p as d,j as p,v as u,o as b}from"./index-01c5cbf1.js";import"../../../../../../../../../js/libraries/miscTools.js";function k(t){let e,s,i,a,b,k;return{c(){e=r("label"),s=r("input"),i=o(),a=r("span"),this.c=h,n(s,"type","checkbox"),n(a,"class","switch-span"),n(e,"class","switch")},m(r,o){c(r,e,o),l(e,s),s.checked=t[0],l(e,i),l(e,a),b||(k=[d(s,"change",t[4]),d(s,"click",t[1])],b=!0)},p(t,[e]){1&e&&(s.checked=t[0])},i:h,o:h,d(t){t&&p(e),b=!1,u(k)}}}function g(t,e,s){let{callback:c=null}=e,{checked:i=!1}=e;const a=()=>{setTimeout((()=>{null!=c?(s(0,i=!i),c()):a()}),100)};return b((()=>{})),t.$$set=t=>{"callback"in t&&s(2,c=t.callback),"checked"in t&&s(0,i=t.checked)},[i,function(){null!=c&&(s(0,i=!i),c())},c,a,function(){i=this.checked,s(0,i)}]}class m extends t{constructor(t){super(),this.shadowRoot.innerHTML="",e(this,{target:this.shadowRoot,props:s(this.attributes),customElement:!0},g,k,a,{callback:2,checked:0,toggle:3},null),t&&(t.target&&c(t.target,this,t.anchor),t.props&&(this.$set(t.props),i()))}static get observedAttributes(){return["callback","checked","toggle"]}get callback(){return this.$$.ctx[2]}set callback(t){this.$$set({callback:t}),i()}get checked(){return this.$$.ctx[0]}set checked(t){this.$$set({checked:t}),i()}get toggle(){return this.$$.ctx[3]}}customElements.define("switch-component",m);export{m as default};