├── .gitignore
├── .npmignore
├── CHANGELOG.md
├── LICENSE
├── README.md
├── dev
├── App.svelte
└── main.js
├── docs
├── bundle.css
├── bundle.css.map
├── bundle.js
├── bundle.js.map
└── index.html
├── package-lock.json
├── package.json
├── rollup.config.js
├── rollup.dev.config.js
└── src
├── DatePicker.svelte
├── Switcher.svelte
└── index.js
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules
3 | public/bundle.*
4 | dist/*
5 |
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | dev
2 | docs
3 | node_modules
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # svelte-touch-datepicker changelog
2 |
3 | ## 1.0.0
4 |
5 | * First release
6 |
7 | ## 1.1.0
8 |
9 | * bug fixes
10 | * allow css custom property
11 |
12 | ## 1.2.0
13 |
14 | * default import support
15 |
16 | ## 1.2.1
17 |
18 | * fix pull to refresh on swipe down on mobile chrome
19 |
20 | ## 1.2.2
21 |
22 | * bugfix
23 | * readme update
24 |
25 | ## 1.3
26 |
27 | * feat: wheel control for desktop
28 |
29 | ## 1.4
30 | * merged PR #6 and #7
31 |
32 | ## 1.4.1
33 | * workout issue #8
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | (The MIT License)
2 |
3 | Copyright (c) 2019 Sharif Ahmed me.sharifahmed@gmail.com sharifahmed.me
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | 'Software'), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
24 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Native like date-picker for Svelte (With wheel control for desktop)
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | ## 🚀[See it in Action](https://sharifclick.github.io/svelte-touch-datepicker/)
13 |
14 | ## Installation
15 |
16 | ```bash
17 | npm i -D svelte-touch-datepicker
18 | ```
19 |
20 | ## Usage
21 |
22 | ```html
23 |
30 |
31 |
46 |
47 |
48 |
49 |
Date: {_date}
50 |
51 |
52 |
53 |
54 | ```
55 |
56 | ## Custom events
57 |
58 | ```html
59 |
64 |
65 |
69 |
70 |
71 | ```
72 |
73 | ## Default css custom properties
74 |
75 | ```css
76 |
77 | :root{
78 | --svtd-popup-bg-color: white;
79 | --svtd-popup-color: black;
80 | --svtd-popup-radius: 10px;
81 | --svtd-font-size: 20px;
82 | --svtd-button-color: black;
83 | --svtd-button-bg-color: transparent;
84 | --svtd-border: 1px solid grey;
85 | --svtd-button-box-shadow: none;
86 | --svtd-bar-color: grey;
87 | }
88 | ```
89 |
90 | ## Props
91 |
92 | | Name | Type | Description | Required | Default |
93 | | --- | --- | --- | --- | --- |
94 | | `date` | `object` | default date object | yes | `new Date()` |
95 | | `visible` | `Boolean` | Popup visibility | No | `false` |
96 | | `years_map` | `Array` | Years map `[from, to]` | No | `[1900, 2100]` |
97 | | `classes` | `String` | custom classes to be add on input | No | `empty string` |
98 |
--------------------------------------------------------------------------------
/dev/App.svelte:
--------------------------------------------------------------------------------
1 |
19 |
20 |
44 |
45 |
46 |
47 |
Date: {_date}
48 |
49 |
50 |
51 |
52 |
--------------------------------------------------------------------------------
/dev/main.js:
--------------------------------------------------------------------------------
1 | import App from './App.svelte';
2 |
3 | const app = new App({
4 | target: document.body,
5 | });
6 |
7 | export default app;
--------------------------------------------------------------------------------
/docs/bundle.css:
--------------------------------------------------------------------------------
1 | .container.svelte-yz6bdb{height:100%;width:100%}.center.svelte-yz6bdb{display:flex;justify-content:center;align-items:center;flex-direction:column;font:20px 'Roboto', sans-serif}
2 | .touch-date-popup.svelte-tzk5sz{z-index:1;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0, 0, 0, 0.3);touch-action:pan-down}.touch-date-popup.svelte-tzk5sz>div.svelte-tzk5sz{background:var(--svtd-popup-bg-color, white);color:var(--svtd-popup-color, black);margin-top:30vh;width:85%;margin-left:7%;border-radius:var(--svtd-popup-radius, 10px)}.touch-date-wrapper.svelte-tzk5sz{display:flex;justify-content:center;align-items:center;flex-direction:column;font-size:var(--svtd-font-size, 20px);padding:1.5rem}.touch-date-picker.svelte-tzk5sz{display:flex;padding:50px 20px;margin:10px 0;overflow:hidden}.touch-date-reset.svelte-tzk5sz>button.svelte-tzk5sz{width:100px;height:30px;border-radius:15px;border:var(--svtd-border, 1px solid grey);outline:none;color:var(--svtd-button-color, black);background-color:var(--svtd-button-bg-color, transparent);box-shadow:var(--svtd-button-box-shadow, none) ;font-weight:300}.touch-date-reset.svelte-tzk5sz button.svelte-tzk5sz:active{-webkit-transform:scale(0.95);transform:scale(0.95)}.date-line.svelte-tzk5sz{font-size:30px;font-weight:300}.day-line.svelte-tzk5sz{margin:2px}
3 | .touch-date-wrapper.svelte-ggmds2{position:relative;height:50px;margin:0 10px;border-top:1px solid var(--svtd-bar-color, grey);border-bottom:1px solid var(--svtd-bar-color, grey);border-radius:0}.touch-date-container.svelte-ggmds2{margin:0;padding:0}.touch-date-wrapper.svelte-ggmds2:before,.touch-date-wrapper.svelte-ggmds2:after{content:'';position:absolute;left:0;width:80px;height:50px;background-color:#fff;opacity:0.8;pointer-events:none;z-index:1}.touch-date-wrapper.svelte-ggmds2:before{top:-51px}.touch-date-wrapper.svelte-ggmds2:after{bottom:-51px}.touch-date-container.svelte-ggmds2 li.svelte-ggmds2{display:flex;justify-content:center;align-items:center;width:80px;height:50px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}
4 |
5 | /*# sourceMappingURL=bundle.css.map */
--------------------------------------------------------------------------------
/docs/bundle.css.map:
--------------------------------------------------------------------------------
1 | {
2 | "version": 3,
3 | "file": "bundle.css",
4 | "sources": [
5 | "..\\dev\\App.svelte",
6 | "..\\src\\DatePicker.svelte",
7 | "..\\src\\Switcher.svelte"
8 | ],
9 | "sourcesContent": [
10 | "\r\n\r\n\r\n\r\n\r\n
\r\n
Date: {_date}
\r\n
\r\n \r\n
\r\n\r\n",
11 | "\r\n\r\n\r\n\r\n {visible = !visible}}>\r\n{#if visible}\r\n \r\n{/if}\r\n\r\n",
12 | "\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n {#each data as item }\r\n {item} \r\n {/each}\r\n \r\n
"
13 | ],
14 | "names": [],
15 | "mappings": "AA8BE,wBAAU,CAAC,AACT,MAAM,CAAE,IAAI,CACZ,KAAK,CAAE,IAAI,AACb,CAAC,AAED,OAAO,cAAC,CAAC,AACP,OAAO,CAAE,IAAI,CACb,eAAe,CAAE,MAAM,CACvB,WAAW,CAAE,MAAM,CACnB,cAAc,CAAE,MAAM,CACtB,IAAI,CAAE,IAAI,CAAC,QAAQ,CAAC,CAAC,UAAU,AACjC,CAAC;ACqBH,+BAAiB,CAAC,AAChB,OAAO,CAAE,CAAC,CACV,QAAQ,CAAE,KAAK,CACf,IAAI,CAAC,CACL,KAAK,CAAC,CACN,MAAM,CAAC,CACP,OAAO,CAAC,CACR,UAAU,CAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,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,WAAW,CAAE,GAAG,AAClB,CAAC,AACD,uBAAS,CAAC,AACR,MAAM,CAAE,GAAG,AACb,CAAC;ACjBA,mBAAmB,cAAC,CAAC,AACpB,QAAQ,CAAE,QAAQ,CAClB,MAAM,CAAE,IAAI,CACZ,MAAM,CAAE,CAAC,CAAC,IAAI,CACd,UAAU,CAAE,GAAG,CAAC,KAAK,CAAC,IAAI,gBAAgB,CAAC,KAAK,CAAC,CACjD,aAAa,CAAE,GAAG,CAAC,KAAK,CAAC,IAAI,gBAAgB,CAAC,KAAK,CAAC,CACpD,aAAa,CAAE,CAAC,AAClB,CAAC,AACD,qBAAqB,cAAC,CAAC,AACrB,MAAM,CAAE,CAAC,CACT,OAAO,CAAE,CAAC,AACZ,CAAC,AAED,iCAAmB,OAAO,CAC1B,iCAAmB,MAAM,AAAC,CAAC,AACzB,OAAO,CAAE,EAAE,CACX,QAAQ,CAAE,QAAQ,CAClB,IAAI,CAAE,CAAC,CACP,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACZ,gBAAgB,CAAE,IAAI,CACtB,OAAO,CAAE,GAAG,CACZ,cAAc,CAAE,IAAI,CACpB,OAAO,CAAE,CAAC,AACZ,CAAC,AAED,iCAAmB,OAAO,AAAC,CAAC,AAC1B,GAAG,CAAE,KAAK,AACZ,CAAC,AAED,iCAAmB,MAAM,AAAC,CAAC,AACzB,MAAM,CAAE,KAAK,AACf,CAAC,AAED,mCAAqB,CAAC,EAAE,cAAC,CAAC,AACxB,OAAO,CAAE,IAAI,CACb,eAAe,CAAE,MAAM,CACvB,WAAW,CAAE,MAAM,CACnB,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACZ,mBAAmB,CAAE,IAAI,CACtB,gBAAgB,CAAE,IAAI,CACrB,eAAe,CAAE,IAAI,CACjB,WAAW,CAAE,IAAI,AAC3B,CAAC"
16 | }
--------------------------------------------------------------------------------
/docs/bundle.js:
--------------------------------------------------------------------------------
1 |
2 | (function(l, r) { if (l.getElementById('livereloadscript')) return; r = l.createElement('script'); r.async = 1; r.src = '//' + (window.location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1'; r.id = 'livereloadscript'; l.head.appendChild(r) })(window.document);
3 | var app = (function () {
4 | 'use strict';
5 |
6 | function noop() { }
7 | function add_location(element, file, line, column, char) {
8 | element.__svelte_meta = {
9 | loc: { file, line, column, char }
10 | };
11 | }
12 | function run(fn) {
13 | return fn();
14 | }
15 | function blank_object() {
16 | return Object.create(null);
17 | }
18 | function run_all(fns) {
19 | fns.forEach(run);
20 | }
21 | function is_function(thing) {
22 | return typeof thing === 'function';
23 | }
24 | function safe_not_equal(a, b) {
25 | return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
26 | }
27 | function null_to_empty(value) {
28 | return value == null ? '' : value;
29 | }
30 |
31 | function append(target, node) {
32 | target.appendChild(node);
33 | }
34 | function insert(target, node, anchor) {
35 | target.insertBefore(node, anchor || null);
36 | }
37 | function detach(node) {
38 | node.parentNode.removeChild(node);
39 | }
40 | function destroy_each(iterations, detaching) {
41 | for (let i = 0; i < iterations.length; i += 1) {
42 | if (iterations[i])
43 | iterations[i].d(detaching);
44 | }
45 | }
46 | function element(name) {
47 | return document.createElement(name);
48 | }
49 | function text(data) {
50 | return document.createTextNode(data);
51 | }
52 | function space() {
53 | return text(' ');
54 | }
55 | function empty() {
56 | return text('');
57 | }
58 | function listen(node, event, handler, options) {
59 | node.addEventListener(event, handler, options);
60 | return () => node.removeEventListener(event, handler, options);
61 | }
62 | function stop_propagation(fn) {
63 | return function (event) {
64 | event.stopPropagation();
65 | // @ts-ignore
66 | return fn.call(this, event);
67 | };
68 | }
69 | function attr(node, attribute, value) {
70 | if (value == null)
71 | node.removeAttribute(attribute);
72 | else if (node.getAttribute(attribute) !== value)
73 | node.setAttribute(attribute, value);
74 | }
75 | function children(element) {
76 | return Array.from(element.childNodes);
77 | }
78 | function custom_event(type, detail) {
79 | const e = document.createEvent('CustomEvent');
80 | e.initCustomEvent(type, false, false, detail);
81 | return e;
82 | }
83 |
84 | let current_component;
85 | function set_current_component(component) {
86 | current_component = component;
87 | }
88 | function get_current_component() {
89 | if (!current_component)
90 | throw new Error(`Function called outside component initialization`);
91 | return current_component;
92 | }
93 | function onMount(fn) {
94 | get_current_component().$$.on_mount.push(fn);
95 | }
96 | function afterUpdate(fn) {
97 | get_current_component().$$.after_update.push(fn);
98 | }
99 | function createEventDispatcher() {
100 | const component = get_current_component();
101 | return (type, detail) => {
102 | const callbacks = component.$$.callbacks[type];
103 | if (callbacks) {
104 | // TODO are there situations where events could be dispatched
105 | // in a server (non-DOM) environment?
106 | const event = custom_event(type, detail);
107 | callbacks.slice().forEach(fn => {
108 | fn.call(component, event);
109 | });
110 | }
111 | };
112 | }
113 |
114 | const dirty_components = [];
115 | const binding_callbacks = [];
116 | const render_callbacks = [];
117 | const flush_callbacks = [];
118 | const resolved_promise = Promise.resolve();
119 | let update_scheduled = false;
120 | function schedule_update() {
121 | if (!update_scheduled) {
122 | update_scheduled = true;
123 | resolved_promise.then(flush);
124 | }
125 | }
126 | function add_render_callback(fn) {
127 | render_callbacks.push(fn);
128 | }
129 | function add_flush_callback(fn) {
130 | flush_callbacks.push(fn);
131 | }
132 | function flush() {
133 | const seen_callbacks = new Set();
134 | do {
135 | // first, call beforeUpdate functions
136 | // and update components
137 | while (dirty_components.length) {
138 | const component = dirty_components.shift();
139 | set_current_component(component);
140 | update(component.$$);
141 | }
142 | while (binding_callbacks.length)
143 | binding_callbacks.pop()();
144 | // then, once components are updated, call
145 | // afterUpdate functions. This may cause
146 | // subsequent updates...
147 | for (let i = 0; i < render_callbacks.length; i += 1) {
148 | const callback = render_callbacks[i];
149 | if (!seen_callbacks.has(callback)) {
150 | callback();
151 | // ...so guard against infinite loops
152 | seen_callbacks.add(callback);
153 | }
154 | }
155 | render_callbacks.length = 0;
156 | } while (dirty_components.length);
157 | while (flush_callbacks.length) {
158 | flush_callbacks.pop()();
159 | }
160 | update_scheduled = false;
161 | }
162 | function update($$) {
163 | if ($$.fragment !== null) {
164 | $$.update();
165 | run_all($$.before_update);
166 | const dirty = $$.dirty;
167 | $$.dirty = [-1];
168 | $$.fragment && $$.fragment.p($$.ctx, dirty);
169 | $$.after_update.forEach(add_render_callback);
170 | }
171 | }
172 | const outroing = new Set();
173 | let outros;
174 | function group_outros() {
175 | outros = {
176 | r: 0,
177 | c: [],
178 | p: outros // parent group
179 | };
180 | }
181 | function check_outros() {
182 | if (!outros.r) {
183 | run_all(outros.c);
184 | }
185 | outros = outros.p;
186 | }
187 | function transition_in(block, local) {
188 | if (block && block.i) {
189 | outroing.delete(block);
190 | block.i(local);
191 | }
192 | }
193 | function transition_out(block, local, detach, callback) {
194 | if (block && block.o) {
195 | if (outroing.has(block))
196 | return;
197 | outroing.add(block);
198 | outros.c.push(() => {
199 | outroing.delete(block);
200 | if (callback) {
201 | if (detach)
202 | block.d(1);
203 | callback();
204 | }
205 | });
206 | block.o(local);
207 | }
208 | }
209 |
210 | function bind(component, name, callback) {
211 | const index = component.$$.props[name];
212 | if (index !== undefined) {
213 | component.$$.bound[index] = callback;
214 | callback(component.$$.ctx[index]);
215 | }
216 | }
217 | function create_component(block) {
218 | block && block.c();
219 | }
220 | function mount_component(component, target, anchor) {
221 | const { fragment, on_mount, on_destroy, after_update } = component.$$;
222 | fragment && fragment.m(target, anchor);
223 | // onMount happens before the initial afterUpdate
224 | add_render_callback(() => {
225 | const new_on_destroy = on_mount.map(run).filter(is_function);
226 | if (on_destroy) {
227 | on_destroy.push(...new_on_destroy);
228 | }
229 | else {
230 | // Edge case - component was destroyed immediately,
231 | // most likely as a result of a binding initialising
232 | run_all(new_on_destroy);
233 | }
234 | component.$$.on_mount = [];
235 | });
236 | after_update.forEach(add_render_callback);
237 | }
238 | function destroy_component(component, detaching) {
239 | const $$ = component.$$;
240 | if ($$.fragment !== null) {
241 | run_all($$.on_destroy);
242 | $$.fragment && $$.fragment.d(detaching);
243 | // TODO null out other refs, including component.$$ (but need to
244 | // preserve final state?)
245 | $$.on_destroy = $$.fragment = null;
246 | $$.ctx = [];
247 | }
248 | }
249 | function make_dirty(component, i) {
250 | if (component.$$.dirty[0] === -1) {
251 | dirty_components.push(component);
252 | schedule_update();
253 | component.$$.dirty.fill(0);
254 | }
255 | component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));
256 | }
257 | function init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {
258 | const parent_component = current_component;
259 | set_current_component(component);
260 | const prop_values = options.props || {};
261 | const $$ = component.$$ = {
262 | fragment: null,
263 | ctx: null,
264 | // state
265 | props,
266 | update: noop,
267 | not_equal,
268 | bound: blank_object(),
269 | // lifecycle
270 | on_mount: [],
271 | on_destroy: [],
272 | before_update: [],
273 | after_update: [],
274 | context: new Map(parent_component ? parent_component.$$.context : []),
275 | // everything else
276 | callbacks: blank_object(),
277 | dirty
278 | };
279 | let ready = false;
280 | $$.ctx = instance
281 | ? instance(component, prop_values, (i, ret, value = ret) => {
282 | if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {
283 | if ($$.bound[i])
284 | $$.bound[i](value);
285 | if (ready)
286 | make_dirty(component, i);
287 | }
288 | return ret;
289 | })
290 | : [];
291 | $$.update();
292 | ready = true;
293 | run_all($$.before_update);
294 | // `false` as a special case of no DOM component
295 | $$.fragment = create_fragment ? create_fragment($$.ctx) : false;
296 | if (options.target) {
297 | if (options.hydrate) {
298 | // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
299 | $$.fragment && $$.fragment.l(children(options.target));
300 | }
301 | else {
302 | // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
303 | $$.fragment && $$.fragment.c();
304 | }
305 | if (options.intro)
306 | transition_in(component.$$.fragment);
307 | mount_component(component, options.target, options.anchor);
308 | flush();
309 | }
310 | set_current_component(parent_component);
311 | }
312 | class SvelteComponent {
313 | $destroy() {
314 | destroy_component(this, 1);
315 | this.$destroy = noop;
316 | }
317 | $on(type, callback) {
318 | const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));
319 | callbacks.push(callback);
320 | return () => {
321 | const index = callbacks.indexOf(callback);
322 | if (index !== -1)
323 | callbacks.splice(index, 1);
324 | };
325 | }
326 | $set() {
327 | // overridden by instance, if it has props
328 | }
329 | }
330 |
331 | function dispatch_dev(type, detail) {
332 | document.dispatchEvent(custom_event(type, detail));
333 | }
334 | function append_dev(target, node) {
335 | dispatch_dev("SvelteDOMInsert", { target, node });
336 | append(target, node);
337 | }
338 | function insert_dev(target, node, anchor) {
339 | dispatch_dev("SvelteDOMInsert", { target, node, anchor });
340 | insert(target, node, anchor);
341 | }
342 | function detach_dev(node) {
343 | dispatch_dev("SvelteDOMRemove", { node });
344 | detach(node);
345 | }
346 | function listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {
347 | const modifiers = options === true ? ["capture"] : options ? Array.from(Object.keys(options)) : [];
348 | if (has_prevent_default)
349 | modifiers.push('preventDefault');
350 | if (has_stop_propagation)
351 | modifiers.push('stopPropagation');
352 | dispatch_dev("SvelteDOMAddEventListener", { node, event, handler, modifiers });
353 | const dispose = listen(node, event, handler, options);
354 | return () => {
355 | dispatch_dev("SvelteDOMRemoveEventListener", { node, event, handler, modifiers });
356 | dispose();
357 | };
358 | }
359 | function attr_dev(node, attribute, value) {
360 | attr(node, attribute, value);
361 | if (value == null)
362 | dispatch_dev("SvelteDOMRemoveAttribute", { node, attribute });
363 | else
364 | dispatch_dev("SvelteDOMSetAttribute", { node, attribute, value });
365 | }
366 | function prop_dev(node, property, value) {
367 | node[property] = value;
368 | dispatch_dev("SvelteDOMSetProperty", { node, property, value });
369 | }
370 | function set_data_dev(text, data) {
371 | data = '' + data;
372 | if (text.data === data)
373 | return;
374 | dispatch_dev("SvelteDOMSetData", { node: text, data });
375 | text.data = data;
376 | }
377 | class SvelteComponentDev extends SvelteComponent {
378 | constructor(options) {
379 | if (!options || (!options.target && !options.$$inline)) {
380 | throw new Error(`'target' is a required option`);
381 | }
382 | super();
383 | }
384 | $destroy() {
385 | super.$destroy();
386 | this.$destroy = () => {
387 | console.warn(`Component was already destroyed`); // eslint-disable-line no-console
388 | };
389 | }
390 | }
391 |
392 | /* src\Switcher.svelte generated by Svelte v3.16.5 */
393 | const file = "src\\Switcher.svelte";
394 |
395 | function get_each_context(ctx, list, i) {
396 | const child_ctx = ctx.slice();
397 | child_ctx[16] = list[i];
398 | return child_ctx;
399 | }
400 |
401 | // (152:3) {#each data as item }
402 | function create_each_block(ctx) {
403 | let li;
404 | let t_value = /*item*/ ctx[16] + "";
405 | let t;
406 |
407 | const block = {
408 | c: function create() {
409 | li = element("li");
410 | t = text(t_value);
411 | attr_dev(li, "class", "svelte-ggmds2");
412 | add_location(li, file, 152, 5, 3598);
413 | },
414 | m: function mount(target, anchor) {
415 | insert_dev(target, li, anchor);
416 | append_dev(li, t);
417 | },
418 | p: function update(ctx, dirty) {
419 | if (dirty & /*data*/ 1 && t_value !== (t_value = /*item*/ ctx[16] + "")) set_data_dev(t, t_value);
420 | },
421 | d: function destroy(detaching) {
422 | if (detaching) detach_dev(li);
423 | }
424 | };
425 |
426 | dispatch_dev("SvelteRegisterBlock", {
427 | block,
428 | id: create_each_block.name,
429 | type: "each",
430 | source: "(152:3) {#each data as item }",
431 | ctx
432 | });
433 |
434 | return block;
435 | }
436 |
437 | function create_fragment(ctx) {
438 | let div;
439 | let ul;
440 | let dispose;
441 | let each_value = /*data*/ ctx[0];
442 | let each_blocks = [];
443 |
444 | for (let i = 0; i < each_value.length; i += 1) {
445 | each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
446 | }
447 |
448 | const block = {
449 | c: function create() {
450 | div = element("div");
451 | ul = element("ul");
452 |
453 | for (let i = 0; i < each_blocks.length; i += 1) {
454 | each_blocks[i].c();
455 | }
456 |
457 | attr_dev(ul, "class", "touch-date-container svelte-ggmds2");
458 | add_location(ul, file, 150, 2, 3508);
459 | attr_dev(div, "class", "touch-date-wrapper svelte-ggmds2");
460 | add_location(div, file, 149, 0, 3398);
461 |
462 | dispose = [
463 | listen_dev(div, "mousedown", /*onMouseDown*/ ctx[2], false, false, false),
464 | listen_dev(div, "touchstart", /*onMouseDown*/ ctx[2], false, false, false),
465 | listen_dev(div, "wheel", /*onWheel*/ ctx[3], false, false, false)
466 | ];
467 | },
468 | l: function claim(nodes) {
469 | throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
470 | },
471 | m: function mount(target, anchor) {
472 | insert_dev(target, div, anchor);
473 | append_dev(div, ul);
474 |
475 | for (let i = 0; i < each_blocks.length; i += 1) {
476 | each_blocks[i].m(ul, null);
477 | }
478 |
479 | /*ul_binding*/ ctx[15](ul);
480 | },
481 | p: function update(ctx, [dirty]) {
482 | if (dirty & /*data*/ 1) {
483 | each_value = /*data*/ ctx[0];
484 | let i;
485 |
486 | for (i = 0; i < each_value.length; i += 1) {
487 | const child_ctx = get_each_context(ctx, each_value, i);
488 |
489 | if (each_blocks[i]) {
490 | each_blocks[i].p(child_ctx, dirty);
491 | } else {
492 | each_blocks[i] = create_each_block(child_ctx);
493 | each_blocks[i].c();
494 | each_blocks[i].m(ul, null);
495 | }
496 | }
497 |
498 | for (; i < each_blocks.length; i += 1) {
499 | each_blocks[i].d(1);
500 | }
501 |
502 | each_blocks.length = each_value.length;
503 | }
504 | },
505 | i: noop,
506 | o: noop,
507 | d: function destroy(detaching) {
508 | if (detaching) detach_dev(div);
509 | destroy_each(each_blocks, detaching);
510 | /*ul_binding*/ ctx[15](null);
511 | run_all(dispose);
512 | }
513 | };
514 |
515 | dispatch_dev("SvelteRegisterBlock", {
516 | block,
517 | id: create_fragment.name,
518 | type: "component",
519 | source: "",
520 | ctx
521 | });
522 |
523 | return block;
524 | }
525 |
526 | function instance($$self, $$props, $$invalidate) {
527 | const dispatch = createEventDispatcher();
528 | let { selected } = $$props;
529 | let { data = 0 } = $$props;
530 | let { type } = $$props;
531 | let position = selected ? -(selected - 1) * 50 : 0;
532 | let offset = 0;
533 | let dragging = false;
534 | let itemWrapper, previousY;
535 |
536 | onMount(() => {
537 | setPosition();
538 | });
539 |
540 | afterUpdate(() => {
541 | let selectedPosition = -(selected - 1) * 50;
542 |
543 | if (!dragging && position !== selectedPosition) {
544 | position = selectedPosition;
545 | setPosition();
546 | }
547 | });
548 |
549 | function onDateChange(type, changedData) {
550 | dispatch("dateChange", { type, changedData });
551 | }
552 |
553 | function setPosition() {
554 | let itemPosition = `
555 | will-change: 'transform';
556 | transition: transform ${Math.abs(offset) / 100 + 0.1}s;
557 | transform: translateY(${position}px)
558 | `;
559 |
560 | $$invalidate(1, itemWrapper.style.cssText = itemPosition, itemWrapper);
561 | }
562 |
563 | let onMouseDown = event => {
564 | previousY = event.touches ? event.touches[0].clientY : event.clientY;
565 | dragging = true;
566 | window.addEventListener("mousemove", onMouseMove);
567 | window.addEventListener("mouseup", onMouseUp);
568 | window.addEventListener("touchmove", onMouseMove);
569 | window.addEventListener("touchend", onMouseUp);
570 | };
571 |
572 | let onMouseMove = event => {
573 | let clientY = event.touches ? event.touches[0].clientY : event.clientY;
574 | offset = clientY - previousY;
575 | let maxPosition = -data.length * 50;
576 | let _position = position + offset;
577 | position = Math.max(maxPosition, Math.min(50, _position));
578 | previousY = event.touches ? event.touches[0].clientY : event.clientY;
579 | setPosition();
580 | };
581 |
582 | let onMouseUp = () => {
583 | let maxPosition = -(data.length - 1) * 50;
584 | let rounderPosition = Math.round((position + offset * 5) / 50) * 50;
585 | let finalPosition = Math.max(maxPosition, Math.min(0, rounderPosition));
586 | dragging = false;
587 | position = finalPosition;
588 | window.removeEventListener("mousemove", onMouseMove);
589 | window.removeEventListener("mouseup", onMouseUp);
590 | window.removeEventListener("touchmove", onMouseMove);
591 | window.removeEventListener("touchend", onMouseUp);
592 | setPosition();
593 | onDateChange(type, -finalPosition / 50);
594 | };
595 |
596 | let onWheel = e => {
597 | if (e.deltaY < 0) {
598 | position = position - 50;
599 | }
600 |
601 | if (e.deltaY > 0) {
602 | position = position + 50;
603 | }
604 |
605 | onMouseUp();
606 | };
607 |
608 | const writable_props = ["selected", "data", "type"];
609 |
610 | Object.keys($$props).forEach(key => {
611 | if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`);
612 | });
613 |
614 | function ul_binding($$value) {
615 | binding_callbacks[$$value ? "unshift" : "push"](() => {
616 | $$invalidate(1, itemWrapper = $$value);
617 | });
618 | }
619 |
620 | $$self.$set = $$props => {
621 | if ("selected" in $$props) $$invalidate(4, selected = $$props.selected);
622 | if ("data" in $$props) $$invalidate(0, data = $$props.data);
623 | if ("type" in $$props) $$invalidate(5, type = $$props.type);
624 | };
625 |
626 | $$self.$capture_state = () => {
627 | return {
628 | selected,
629 | data,
630 | type,
631 | position,
632 | offset,
633 | dragging,
634 | itemWrapper,
635 | previousY,
636 | onMouseDown,
637 | onMouseMove,
638 | onMouseUp,
639 | onWheel
640 | };
641 | };
642 |
643 | $$self.$inject_state = $$props => {
644 | if ("selected" in $$props) $$invalidate(4, selected = $$props.selected);
645 | if ("data" in $$props) $$invalidate(0, data = $$props.data);
646 | if ("type" in $$props) $$invalidate(5, type = $$props.type);
647 | if ("position" in $$props) position = $$props.position;
648 | if ("offset" in $$props) offset = $$props.offset;
649 | if ("dragging" in $$props) dragging = $$props.dragging;
650 | if ("itemWrapper" in $$props) $$invalidate(1, itemWrapper = $$props.itemWrapper);
651 | if ("previousY" in $$props) previousY = $$props.previousY;
652 | if ("onMouseDown" in $$props) $$invalidate(2, onMouseDown = $$props.onMouseDown);
653 | if ("onMouseMove" in $$props) onMouseMove = $$props.onMouseMove;
654 | if ("onMouseUp" in $$props) onMouseUp = $$props.onMouseUp;
655 | if ("onWheel" in $$props) $$invalidate(3, onWheel = $$props.onWheel);
656 | };
657 |
658 | return [
659 | data,
660 | itemWrapper,
661 | onMouseDown,
662 | onWheel,
663 | selected,
664 | type,
665 | position,
666 | offset,
667 | dragging,
668 | previousY,
669 | dispatch,
670 | onDateChange,
671 | setPosition,
672 | onMouseMove,
673 | onMouseUp,
674 | ul_binding
675 | ];
676 | }
677 |
678 | class Switcher extends SvelteComponentDev {
679 | constructor(options) {
680 | super(options);
681 | init(this, options, instance, create_fragment, safe_not_equal, { selected: 4, data: 0, type: 5 });
682 |
683 | dispatch_dev("SvelteRegisterComponent", {
684 | component: this,
685 | tagName: "Switcher",
686 | options,
687 | id: create_fragment.name
688 | });
689 |
690 | const { ctx } = this.$$;
691 | const props = options.props || ({});
692 |
693 | if (/*selected*/ ctx[4] === undefined && !("selected" in props)) {
694 | console.warn(" was created without expected prop 'selected'");
695 | }
696 |
697 | if (/*type*/ ctx[5] === undefined && !("type" in props)) {
698 | console.warn(" was created without expected prop 'type'");
699 | }
700 | }
701 |
702 | get selected() {
703 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ' '");
704 | }
705 |
706 | set selected(value) {
707 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ' '");
708 | }
709 |
710 | get data() {
711 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ' '");
712 | }
713 |
714 | set data(value) {
715 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ' '");
716 | }
717 |
718 | get type() {
719 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ' '");
720 | }
721 |
722 | set type(value) {
723 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ' '");
724 | }
725 | }
726 |
727 | /* src\DatePicker.svelte generated by Svelte v3.16.5 */
728 | const file$1 = "src\\DatePicker.svelte";
729 |
730 | // (123:0) {#if visible}
731 | function create_if_block(ctx) {
732 | let div5;
733 | let div4;
734 | let div3;
735 | let div0;
736 | let t0_value = /*date*/ ctx[0].getDate() + "";
737 | let t0;
738 | let t1;
739 | let t2_value = /*MONTHS*/ ctx[6][/*date*/ ctx[0].getMonth()] + "";
740 | let t2;
741 | let t3;
742 | let t4_value = /*date*/ ctx[0].getFullYear() + "";
743 | let t4;
744 | let t5;
745 | let p;
746 | let t6_value = /*WEEKDAY*/ ctx[8][/*date*/ ctx[0].getDay()] + "";
747 | let t6;
748 | let t7;
749 | let div1;
750 | let t8;
751 | let t9;
752 | let t10;
753 | let div2;
754 | let button0;
755 | let t12;
756 | let button1;
757 | let current;
758 | let dispose;
759 |
760 | const switcher0 = new Switcher({
761 | props: {
762 | type: "day",
763 | data: /*DAYS*/ ctx[5],
764 | selected: /*date*/ ctx[0].getDate()
765 | },
766 | $$inline: true
767 | });
768 |
769 | switcher0.$on("dateChange", /*dateChanged*/ ctx[10]);
770 |
771 | const switcher1 = new Switcher({
772 | props: {
773 | type: "month",
774 | data: /*MONTHS*/ ctx[6],
775 | selected: /*date*/ ctx[0].getMonth() + 1
776 | },
777 | $$inline: true
778 | });
779 |
780 | switcher1.$on("dateChange", /*dateChanged*/ ctx[10]);
781 |
782 | const switcher2 = new Switcher({
783 | props: {
784 | type: "year",
785 | data: /*YEARS*/ ctx[7],
786 | selected: /*date*/ ctx[0].getYear() + 1
787 | },
788 | $$inline: true
789 | });
790 |
791 | switcher2.$on("dateChange", /*dateChanged*/ ctx[10]);
792 |
793 | const block = {
794 | c: function create() {
795 | div5 = element("div");
796 | div4 = element("div");
797 | div3 = element("div");
798 | div0 = element("div");
799 | t0 = text(t0_value);
800 | t1 = space();
801 | t2 = text(t2_value);
802 | t3 = space();
803 | t4 = text(t4_value);
804 | t5 = space();
805 | p = element("p");
806 | t6 = text(t6_value);
807 | t7 = space();
808 | div1 = element("div");
809 | create_component(switcher0.$$.fragment);
810 | t8 = space();
811 | create_component(switcher1.$$.fragment);
812 | t9 = space();
813 | create_component(switcher2.$$.fragment);
814 | t10 = space();
815 | div2 = element("div");
816 | button0 = element("button");
817 | button0.textContent = "Reset";
818 | t12 = space();
819 | button1 = element("button");
820 | button1.textContent = "Ok";
821 | attr_dev(div0, "class", "date-line svelte-tzk5sz");
822 | add_location(div0, file$1, 126, 8, 3449);
823 | attr_dev(p, "class", "day-line svelte-tzk5sz");
824 | add_location(p, file$1, 127, 8, 3557);
825 | attr_dev(div1, "class", "touch-date-picker svelte-tzk5sz");
826 | add_location(div1, file$1, 128, 8, 3617);
827 | attr_dev(button0, "class", "svelte-tzk5sz");
828 | add_location(button0, file$1, 134, 10, 4031);
829 | attr_dev(button1, "class", "svelte-tzk5sz");
830 | add_location(button1, file$1, 135, 10, 4102);
831 | attr_dev(div2, "class", "touch-date-reset svelte-tzk5sz");
832 | add_location(div2, file$1, 133, 8, 3989);
833 | attr_dev(div3, "class", "touch-date-wrapper svelte-tzk5sz");
834 | add_location(div3, file$1, 125, 6, 3407);
835 | attr_dev(div4, "class", "svelte-tzk5sz");
836 | add_location(div4, file$1, 124, 4, 3394);
837 | attr_dev(div5, "class", "touch-date-popup svelte-tzk5sz");
838 | add_location(div5, file$1, 123, 2, 3314);
839 |
840 | dispose = [
841 | listen_dev(button0, "click", stop_propagation(/*resetDate*/ ctx[9]), false, false, true),
842 | listen_dev(button1, "click", stop_propagation(/*confirmDate*/ ctx[11]), false, false, true),
843 | listen_dev(div5, "click", /*clickedOutside*/ ctx[12], false, false, false)
844 | ];
845 | },
846 | m: function mount(target, anchor) {
847 | insert_dev(target, div5, anchor);
848 | append_dev(div5, div4);
849 | append_dev(div4, div3);
850 | append_dev(div3, div0);
851 | append_dev(div0, t0);
852 | append_dev(div0, t1);
853 | append_dev(div0, t2);
854 | append_dev(div0, t3);
855 | append_dev(div0, t4);
856 | append_dev(div3, t5);
857 | append_dev(div3, p);
858 | append_dev(p, t6);
859 | append_dev(div3, t7);
860 | append_dev(div3, div1);
861 | mount_component(switcher0, div1, null);
862 | append_dev(div1, t8);
863 | mount_component(switcher1, div1, null);
864 | append_dev(div1, t9);
865 | mount_component(switcher2, div1, null);
866 | append_dev(div3, t10);
867 | append_dev(div3, div2);
868 | append_dev(div2, button0);
869 | append_dev(div2, t12);
870 | append_dev(div2, button1);
871 | /*div5_binding*/ ctx[17](div5);
872 | current = true;
873 | },
874 | p: function update(ctx, dirty) {
875 | if ((!current || dirty & /*date*/ 1) && t0_value !== (t0_value = /*date*/ ctx[0].getDate() + "")) set_data_dev(t0, t0_value);
876 | if ((!current || dirty & /*date*/ 1) && t2_value !== (t2_value = /*MONTHS*/ ctx[6][/*date*/ ctx[0].getMonth()] + "")) set_data_dev(t2, t2_value);
877 | if ((!current || dirty & /*date*/ 1) && t4_value !== (t4_value = /*date*/ ctx[0].getFullYear() + "")) set_data_dev(t4, t4_value);
878 | if ((!current || dirty & /*date*/ 1) && t6_value !== (t6_value = /*WEEKDAY*/ ctx[8][/*date*/ ctx[0].getDay()] + "")) set_data_dev(t6, t6_value);
879 | const switcher0_changes = {};
880 | if (dirty & /*DAYS*/ 32) switcher0_changes.data = /*DAYS*/ ctx[5];
881 | if (dirty & /*date*/ 1) switcher0_changes.selected = /*date*/ ctx[0].getDate();
882 | switcher0.$set(switcher0_changes);
883 | const switcher1_changes = {};
884 | if (dirty & /*date*/ 1) switcher1_changes.selected = /*date*/ ctx[0].getMonth() + 1;
885 | switcher1.$set(switcher1_changes);
886 | const switcher2_changes = {};
887 | if (dirty & /*date*/ 1) switcher2_changes.selected = /*date*/ ctx[0].getYear() + 1;
888 | switcher2.$set(switcher2_changes);
889 | },
890 | i: function intro(local) {
891 | if (current) return;
892 | transition_in(switcher0.$$.fragment, local);
893 | transition_in(switcher1.$$.fragment, local);
894 | transition_in(switcher2.$$.fragment, local);
895 | current = true;
896 | },
897 | o: function outro(local) {
898 | transition_out(switcher0.$$.fragment, local);
899 | transition_out(switcher1.$$.fragment, local);
900 | transition_out(switcher2.$$.fragment, local);
901 | current = false;
902 | },
903 | d: function destroy(detaching) {
904 | if (detaching) detach_dev(div5);
905 | destroy_component(switcher0);
906 | destroy_component(switcher1);
907 | destroy_component(switcher2);
908 | /*div5_binding*/ ctx[17](null);
909 | run_all(dispose);
910 | }
911 | };
912 |
913 | dispatch_dev("SvelteRegisterBlock", {
914 | block,
915 | id: create_if_block.name,
916 | type: "if",
917 | source: "(123:0) {#if visible}",
918 | ctx
919 | });
920 |
921 | return block;
922 | }
923 |
924 | function create_fragment$1(ctx) {
925 | let input;
926 | let input_class_value;
927 | let t;
928 | let if_block_anchor;
929 | let current;
930 | let dispose;
931 | let if_block = /*visible*/ ctx[1] && create_if_block(ctx);
932 |
933 | const block = {
934 | c: function create() {
935 | input = element("input");
936 | t = space();
937 | if (if_block) if_block.c();
938 | if_block_anchor = empty();
939 | attr_dev(input, "type", "text");
940 | attr_dev(input, "class", input_class_value = "" + (null_to_empty(/*classes*/ ctx[2]) + " svelte-tzk5sz"));
941 | input.readOnly = true;
942 | input.value = /*_date*/ ctx[3];
943 | add_location(input, file$1, 121, 0, 3197);
944 | dispose = listen_dev(input, "focus", /*focus_handler*/ ctx[16], false, false, false);
945 | },
946 | l: function claim(nodes) {
947 | throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
948 | },
949 | m: function mount(target, anchor) {
950 | insert_dev(target, input, anchor);
951 | insert_dev(target, t, anchor);
952 | if (if_block) if_block.m(target, anchor);
953 | insert_dev(target, if_block_anchor, anchor);
954 | current = true;
955 | },
956 | p: function update(ctx, [dirty]) {
957 | if (!current || dirty & /*classes*/ 4 && input_class_value !== (input_class_value = "" + (null_to_empty(/*classes*/ ctx[2]) + " svelte-tzk5sz"))) {
958 | attr_dev(input, "class", input_class_value);
959 | }
960 |
961 | if (!current || dirty & /*_date*/ 8) {
962 | prop_dev(input, "value", /*_date*/ ctx[3]);
963 | }
964 |
965 | if (/*visible*/ ctx[1]) {
966 | if (if_block) {
967 | if_block.p(ctx, dirty);
968 | transition_in(if_block, 1);
969 | } else {
970 | if_block = create_if_block(ctx);
971 | if_block.c();
972 | transition_in(if_block, 1);
973 | if_block.m(if_block_anchor.parentNode, if_block_anchor);
974 | }
975 | } else if (if_block) {
976 | group_outros();
977 |
978 | transition_out(if_block, 1, 1, () => {
979 | if_block = null;
980 | });
981 |
982 | check_outros();
983 | }
984 | },
985 | i: function intro(local) {
986 | if (current) return;
987 | transition_in(if_block);
988 | current = true;
989 | },
990 | o: function outro(local) {
991 | transition_out(if_block);
992 | current = false;
993 | },
994 | d: function destroy(detaching) {
995 | if (detaching) detach_dev(input);
996 | if (detaching) detach_dev(t);
997 | if (if_block) if_block.d(detaching);
998 | if (detaching) detach_dev(if_block_anchor);
999 | dispose();
1000 | }
1001 | };
1002 |
1003 | dispatch_dev("SvelteRegisterBlock", {
1004 | block,
1005 | id: create_fragment$1.name,
1006 | type: "component",
1007 | source: "",
1008 | ctx
1009 | });
1010 |
1011 | return block;
1012 | }
1013 |
1014 | function instance$1($$self, $$props, $$invalidate) {
1015 | let { date = new Date() } = $$props;
1016 | let { visible = false } = $$props;
1017 | let { years_map = [1900, 2100] } = $$props;
1018 | let { classes = "" } = $$props;
1019 | let years_count = years_map[1] - years_map[0] + 1;
1020 |
1021 | const MONTHS = [
1022 | "Jan",
1023 | "Feb",
1024 | "Mar",
1025 | "Apr",
1026 | "May",
1027 | "Jun",
1028 | "July",
1029 | "Aug",
1030 | "Sept",
1031 | "Oct",
1032 | "Nov",
1033 | "Dec"
1034 | ];
1035 |
1036 | const YEARS = new Array(years_count).fill(years_map[0]).map((v, i) => v + i);
1037 | const WEEKDAY = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
1038 | const dispatch = createEventDispatcher();
1039 | let _date, popup;
1040 |
1041 | let resetDate = () => {
1042 | $$invalidate(0, date = new Date());
1043 | };
1044 |
1045 | let dateChanged = event => {
1046 | let { type, changedData } = event.detail;
1047 | let newDate = new Date();
1048 |
1049 | if (type === "day") {
1050 | newDate = new Date(date.getFullYear(), date.getMonth(), changedData + 1);
1051 | } else if (type === "month") {
1052 | let maxDayInSelectedMonth = new Date(date.getFullYear(), changedData + 1, 0).getDate();
1053 | let day = Math.min(date.getDate(), maxDayInSelectedMonth);
1054 | newDate = new Date(date.getFullYear(), changedData, day);
1055 | } else if (type === "year") {
1056 | let maxDayInSelectedMonth = new Date(years_map[1] + changedData, date.getMonth() + 1, 0).getDate();
1057 | let day = Math.min(date.getDate(), maxDayInSelectedMonth);
1058 | newDate = new Date(1900 + changedData, date.getMonth(), day);
1059 | }
1060 |
1061 | $$invalidate(0, date = newDate);
1062 | dispatch("dateChange", { date });
1063 | };
1064 |
1065 | function confirmDate(event) {
1066 | $$invalidate(1, visible = !visible);
1067 | dispatch("confirmDate", { MouseEvent: event, date });
1068 | }
1069 |
1070 | function clickedOutside(event) {
1071 | if (event.target == popup) {
1072 | $$invalidate(1, visible = false);
1073 | }
1074 | }
1075 |
1076 | const writable_props = ["date", "visible", "years_map", "classes"];
1077 |
1078 | Object.keys($$props).forEach(key => {
1079 | if (!~writable_props.indexOf(key) && key.slice(0, 2) !== "$$") console.warn(` was created with unknown prop '${key}'`);
1080 | });
1081 |
1082 | const focus_handler = () => {
1083 | $$invalidate(1, visible = !visible);
1084 | };
1085 |
1086 | function div5_binding($$value) {
1087 | binding_callbacks[$$value ? "unshift" : "push"](() => {
1088 | $$invalidate(4, popup = $$value);
1089 | });
1090 | }
1091 |
1092 | $$self.$set = $$props => {
1093 | if ("date" in $$props) $$invalidate(0, date = $$props.date);
1094 | if ("visible" in $$props) $$invalidate(1, visible = $$props.visible);
1095 | if ("years_map" in $$props) $$invalidate(13, years_map = $$props.years_map);
1096 | if ("classes" in $$props) $$invalidate(2, classes = $$props.classes);
1097 | };
1098 |
1099 | $$self.$capture_state = () => {
1100 | return {
1101 | date,
1102 | visible,
1103 | years_map,
1104 | classes,
1105 | years_count,
1106 | _date,
1107 | popup,
1108 | resetDate,
1109 | dateChanged,
1110 | DAYS
1111 | };
1112 | };
1113 |
1114 | $$self.$inject_state = $$props => {
1115 | if ("date" in $$props) $$invalidate(0, date = $$props.date);
1116 | if ("visible" in $$props) $$invalidate(1, visible = $$props.visible);
1117 | if ("years_map" in $$props) $$invalidate(13, years_map = $$props.years_map);
1118 | if ("classes" in $$props) $$invalidate(2, classes = $$props.classes);
1119 | if ("years_count" in $$props) years_count = $$props.years_count;
1120 | if ("_date" in $$props) $$invalidate(3, _date = $$props._date);
1121 | if ("popup" in $$props) $$invalidate(4, popup = $$props.popup);
1122 | if ("resetDate" in $$props) $$invalidate(9, resetDate = $$props.resetDate);
1123 | if ("dateChanged" in $$props) $$invalidate(10, dateChanged = $$props.dateChanged);
1124 | if ("DAYS" in $$props) $$invalidate(5, DAYS = $$props.DAYS);
1125 | };
1126 |
1127 | let DAYS;
1128 |
1129 | $$self.$$.update = () => {
1130 | if ($$self.$$.dirty & /*date*/ 1) {
1131 | $$invalidate(5, DAYS = new Array(new Date(date.getFullYear(), date.getMonth() + 1, 0).getDate()).fill(1).map((v, i) => v + i));
1132 | }
1133 |
1134 | if ($$self.$$.dirty & /*date*/ 1) {
1135 | $$invalidate(3, _date = date.toLocaleDateString("en-US"));
1136 | }
1137 | };
1138 |
1139 | return [
1140 | date,
1141 | visible,
1142 | classes,
1143 | _date,
1144 | popup,
1145 | DAYS,
1146 | MONTHS,
1147 | YEARS,
1148 | WEEKDAY,
1149 | resetDate,
1150 | dateChanged,
1151 | confirmDate,
1152 | clickedOutside,
1153 | years_map,
1154 | years_count,
1155 | dispatch,
1156 | focus_handler,
1157 | div5_binding
1158 | ];
1159 | }
1160 |
1161 | class DatePicker extends SvelteComponentDev {
1162 | constructor(options) {
1163 | super(options);
1164 |
1165 | init(this, options, instance$1, create_fragment$1, safe_not_equal, {
1166 | date: 0,
1167 | visible: 1,
1168 | years_map: 13,
1169 | classes: 2
1170 | });
1171 |
1172 | dispatch_dev("SvelteRegisterComponent", {
1173 | component: this,
1174 | tagName: "DatePicker",
1175 | options,
1176 | id: create_fragment$1.name
1177 | });
1178 | }
1179 |
1180 | get date() {
1181 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ' '");
1182 | }
1183 |
1184 | set date(value) {
1185 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ' '");
1186 | }
1187 |
1188 | get visible() {
1189 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ' '");
1190 | }
1191 |
1192 | set visible(value) {
1193 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ' '");
1194 | }
1195 |
1196 | get years_map() {
1197 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ' '");
1198 | }
1199 |
1200 | set years_map(value) {
1201 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ' '");
1202 | }
1203 |
1204 | get classes() {
1205 | throw new Error(": Props cannot be read directly from the component instance unless compiling with 'accessors: true' or ' '");
1206 | }
1207 |
1208 | set classes(value) {
1209 | throw new Error(": Props cannot be set directly on the component instance unless compiling with 'accessors: true' or ' '");
1210 | }
1211 | }
1212 |
1213 | /* dev\App.svelte generated by Svelte v3.16.5 */
1214 | const file$2 = "dev\\App.svelte";
1215 |
1216 | function create_fragment$2(ctx) {
1217 | let div1;
1218 | let div0;
1219 | let p;
1220 | let t0;
1221 | let t1;
1222 | let t2;
1223 | let updating_date;
1224 | let current;
1225 |
1226 | function datepicker_date_binding(value) {
1227 | /*datepicker_date_binding*/ ctx[2].call(null, value);
1228 | }
1229 |
1230 | let datepicker_props = {};
1231 |
1232 | if (/*date*/ ctx[0] !== void 0) {
1233 | datepicker_props.date = /*date*/ ctx[0];
1234 | }
1235 |
1236 | const datepicker = new DatePicker({ props: datepicker_props, $$inline: true });
1237 | binding_callbacks.push(() => bind(datepicker, "date", datepicker_date_binding));
1238 | datepicker.$on("dateChange", dateChanged);
1239 | datepicker.$on("confirmDate", confirmDate);
1240 |
1241 | const block = {
1242 | c: function create() {
1243 | div1 = element("div");
1244 | div0 = element("div");
1245 | p = element("p");
1246 | t0 = text("Date: ");
1247 | t1 = text(/*_date*/ ctx[1]);
1248 | t2 = space();
1249 | create_component(datepicker.$$.fragment);
1250 | add_location(p, file$2, 46, 4, 803);
1251 | attr_dev(div0, "class", "center svelte-yz6bdb");
1252 | add_location(div0, file$2, 45, 2, 777);
1253 | attr_dev(div1, "class", "container svelte-yz6bdb");
1254 | add_location(div1, file$2, 44, 0, 749);
1255 | },
1256 | l: function claim(nodes) {
1257 | throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
1258 | },
1259 | m: function mount(target, anchor) {
1260 | insert_dev(target, div1, anchor);
1261 | append_dev(div1, div0);
1262 | append_dev(div0, p);
1263 | append_dev(p, t0);
1264 | append_dev(p, t1);
1265 | append_dev(div0, t2);
1266 | mount_component(datepicker, div0, null);
1267 | current = true;
1268 | },
1269 | p: function update(ctx, [dirty]) {
1270 | if (!current || dirty & /*_date*/ 2) set_data_dev(t1, /*_date*/ ctx[1]);
1271 | const datepicker_changes = {};
1272 |
1273 | if (!updating_date && dirty & /*date*/ 1) {
1274 | updating_date = true;
1275 | datepicker_changes.date = /*date*/ ctx[0];
1276 | add_flush_callback(() => updating_date = false);
1277 | }
1278 |
1279 | datepicker.$set(datepicker_changes);
1280 | },
1281 | i: function intro(local) {
1282 | if (current) return;
1283 | transition_in(datepicker.$$.fragment, local);
1284 | current = true;
1285 | },
1286 | o: function outro(local) {
1287 | transition_out(datepicker.$$.fragment, local);
1288 | current = false;
1289 | },
1290 | d: function destroy(detaching) {
1291 | if (detaching) detach_dev(div1);
1292 | destroy_component(datepicker);
1293 | }
1294 | };
1295 |
1296 | dispatch_dev("SvelteRegisterBlock", {
1297 | block,
1298 | id: create_fragment$2.name,
1299 | type: "component",
1300 | source: "",
1301 | ctx
1302 | });
1303 |
1304 | return block;
1305 | }
1306 |
1307 | function dateChanged(event) {
1308 | console.log(event.detail);
1309 | }
1310 |
1311 | function confirmDate(event) {
1312 | console.log(event.detail);
1313 | }
1314 |
1315 | function instance$2($$self, $$props, $$invalidate) {
1316 | let date = new Date();
1317 |
1318 | function datepicker_date_binding(value) {
1319 | date = value;
1320 | $$invalidate(0, date);
1321 | }
1322 |
1323 | $$self.$capture_state = () => {
1324 | return {};
1325 | };
1326 |
1327 | $$self.$inject_state = $$props => {
1328 | if ("date" in $$props) $$invalidate(0, date = $$props.date);
1329 | if ("_date" in $$props) $$invalidate(1, _date = $$props._date);
1330 | };
1331 |
1332 | let _date;
1333 |
1334 | $$self.$$.update = () => {
1335 | if ($$self.$$.dirty & /*date*/ 1) {
1336 | $$invalidate(1, _date = date.toLocaleDateString("en-US"));
1337 | }
1338 | };
1339 |
1340 | return [date, _date, datepicker_date_binding];
1341 | }
1342 |
1343 | class App extends SvelteComponentDev {
1344 | constructor(options) {
1345 | super(options);
1346 | init(this, options, instance$2, create_fragment$2, safe_not_equal, {});
1347 |
1348 | dispatch_dev("SvelteRegisterComponent", {
1349 | component: this,
1350 | tagName: "App",
1351 | options,
1352 | id: create_fragment$2.name
1353 | });
1354 | }
1355 | }
1356 |
1357 | const app = new App({
1358 | target: document.body,
1359 | });
1360 |
1361 | return app;
1362 |
1363 | }());
1364 | //# sourceMappingURL=bundle.js.map
1365 |
--------------------------------------------------------------------------------
/docs/bundle.js.map:
--------------------------------------------------------------------------------
1 | {"version":3,"file":"bundle.js","sources":["../node_modules/svelte/internal/index.mjs","../src/Switcher.svelte","../src/DatePicker.svelte","../dev/App.svelte","../dev/main.js"],"sourcesContent":["function noop() { }\nconst identity = x => x;\nfunction assign(tar, src) {\n // @ts-ignore\n for (const k in src)\n tar[k] = src[k];\n return tar;\n}\nfunction is_promise(value) {\n return value && typeof value === 'object' && typeof value.then === 'function';\n}\nfunction add_location(element, file, line, column, char) {\n element.__svelte_meta = {\n loc: { file, line, column, char }\n };\n}\nfunction run(fn) {\n return fn();\n}\nfunction blank_object() {\n return Object.create(null);\n}\nfunction run_all(fns) {\n fns.forEach(run);\n}\nfunction is_function(thing) {\n return typeof thing === 'function';\n}\nfunction safe_not_equal(a, b) {\n return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');\n}\nfunction not_equal(a, b) {\n return a != a ? b == b : a !== b;\n}\nfunction validate_store(store, name) {\n if (!store || typeof store.subscribe !== 'function') {\n throw new Error(`'${name}' is not a store with a 'subscribe' method`);\n }\n}\nfunction subscribe(store, callback) {\n const unsub = store.subscribe(callback);\n return unsub.unsubscribe ? () => unsub.unsubscribe() : unsub;\n}\nfunction get_store_value(store) {\n let value;\n subscribe(store, _ => value = _)();\n return value;\n}\nfunction component_subscribe(component, store, callback) {\n component.$$.on_destroy.push(subscribe(store, callback));\n}\nfunction create_slot(definition, ctx, $$scope, fn) {\n if (definition) {\n const slot_ctx = get_slot_context(definition, ctx, $$scope, fn);\n return definition[0](slot_ctx);\n }\n}\nfunction get_slot_context(definition, ctx, $$scope, fn) {\n return definition[1] && fn\n ? assign($$scope.ctx.slice(), definition[1](fn(ctx)))\n : $$scope.ctx;\n}\nfunction get_slot_changes(definition, $$scope, dirty, fn) {\n if (definition[2] && fn) {\n const lets = definition[2](fn(dirty));\n if (typeof $$scope.dirty === 'object') {\n const merged = [];\n const len = Math.max($$scope.dirty.length, lets.length);\n for (let i = 0; i < len; i += 1) {\n merged[i] = $$scope.dirty[i] | lets[i];\n }\n return merged;\n }\n return $$scope.dirty | lets;\n }\n return $$scope.dirty;\n}\nfunction exclude_internal_props(props) {\n const result = {};\n for (const k in props)\n if (k[0] !== '$')\n result[k] = props[k];\n return result;\n}\nfunction once(fn) {\n let ran = false;\n return function (...args) {\n if (ran)\n return;\n ran = true;\n fn.call(this, ...args);\n };\n}\nfunction null_to_empty(value) {\n return value == null ? '' : value;\n}\nfunction set_store_value(store, ret, value = ret) {\n store.set(value);\n return ret;\n}\nconst has_prop = (obj, prop) => Object.prototype.hasOwnProperty.call(obj, prop);\n\nconst is_client = typeof window !== 'undefined';\nlet now = is_client\n ? () => window.performance.now()\n : () => Date.now();\nlet raf = is_client ? cb => requestAnimationFrame(cb) : noop;\n// used internally for testing\nfunction set_now(fn) {\n now = fn;\n}\nfunction set_raf(fn) {\n raf = fn;\n}\n\nconst tasks = new Set();\nfunction run_tasks(now) {\n tasks.forEach(task => {\n if (!task.c(now)) {\n tasks.delete(task);\n task.f();\n }\n });\n if (tasks.size !== 0)\n raf(run_tasks);\n}\n/**\n * For testing purposes only!\n */\nfunction clear_loops() {\n tasks.clear();\n}\n/**\n * Creates a new task that runs on each raf frame\n * until it returns a falsy value or is aborted\n */\nfunction loop(callback) {\n let task;\n if (tasks.size === 0)\n raf(run_tasks);\n return {\n promise: new Promise(fulfill => {\n tasks.add(task = { c: callback, f: fulfill });\n }),\n abort() {\n tasks.delete(task);\n }\n };\n}\n\nfunction append(target, node) {\n target.appendChild(node);\n}\nfunction insert(target, node, anchor) {\n target.insertBefore(node, anchor || null);\n}\nfunction detach(node) {\n node.parentNode.removeChild(node);\n}\nfunction destroy_each(iterations, detaching) {\n for (let i = 0; i < iterations.length; i += 1) {\n if (iterations[i])\n iterations[i].d(detaching);\n }\n}\nfunction element(name) {\n return document.createElement(name);\n}\nfunction element_is(name, is) {\n return document.createElement(name, { is });\n}\nfunction object_without_properties(obj, exclude) {\n const target = {};\n for (const k in obj) {\n if (has_prop(obj, k)\n // @ts-ignore\n && exclude.indexOf(k) === -1) {\n // @ts-ignore\n target[k] = obj[k];\n }\n }\n return target;\n}\nfunction svg_element(name) {\n return document.createElementNS('http://www.w3.org/2000/svg', name);\n}\nfunction text(data) {\n return document.createTextNode(data);\n}\nfunction space() {\n return text(' ');\n}\nfunction empty() {\n return text('');\n}\nfunction listen(node, event, handler, options) {\n node.addEventListener(event, handler, options);\n return () => node.removeEventListener(event, handler, options);\n}\nfunction prevent_default(fn) {\n return function (event) {\n event.preventDefault();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction stop_propagation(fn) {\n return function (event) {\n event.stopPropagation();\n // @ts-ignore\n return fn.call(this, event);\n };\n}\nfunction self(fn) {\n return function (event) {\n // @ts-ignore\n if (event.target === this)\n fn.call(this, event);\n };\n}\nfunction attr(node, attribute, value) {\n if (value == null)\n node.removeAttribute(attribute);\n else if (node.getAttribute(attribute) !== value)\n node.setAttribute(attribute, value);\n}\nfunction set_attributes(node, attributes) {\n // @ts-ignore\n const descriptors = Object.getOwnPropertyDescriptors(node.__proto__);\n for (const key in attributes) {\n if (attributes[key] == null) {\n node.removeAttribute(key);\n }\n else if (key === 'style') {\n node.style.cssText = attributes[key];\n }\n else if (descriptors[key] && descriptors[key].set) {\n node[key] = attributes[key];\n }\n else {\n attr(node, key, attributes[key]);\n }\n }\n}\nfunction set_svg_attributes(node, attributes) {\n for (const key in attributes) {\n attr(node, key, attributes[key]);\n }\n}\nfunction set_custom_element_data(node, prop, value) {\n if (prop in node) {\n node[prop] = value;\n }\n else {\n attr(node, prop, value);\n }\n}\nfunction xlink_attr(node, attribute, value) {\n node.setAttributeNS('http://www.w3.org/1999/xlink', attribute, value);\n}\nfunction get_binding_group_value(group) {\n const value = [];\n for (let i = 0; i < group.length; i += 1) {\n if (group[i].checked)\n value.push(group[i].__value);\n }\n return value;\n}\nfunction to_number(value) {\n return value === '' ? undefined : +value;\n}\nfunction time_ranges_to_array(ranges) {\n const array = [];\n for (let i = 0; i < ranges.length; i += 1) {\n array.push({ start: ranges.start(i), end: ranges.end(i) });\n }\n return array;\n}\nfunction children(element) {\n return Array.from(element.childNodes);\n}\nfunction claim_element(nodes, name, attributes, svg) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeName === name) {\n for (let j = 0; j < node.attributes.length; j += 1) {\n const attribute = node.attributes[j];\n if (!attributes[attribute.name])\n node.removeAttribute(attribute.name);\n }\n return nodes.splice(i, 1)[0]; // TODO strip unwanted attributes\n }\n }\n return svg ? svg_element(name) : element(name);\n}\nfunction claim_text(nodes, data) {\n for (let i = 0; i < nodes.length; i += 1) {\n const node = nodes[i];\n if (node.nodeType === 3) {\n node.data = '' + data;\n return nodes.splice(i, 1)[0];\n }\n }\n return text(data);\n}\nfunction claim_space(nodes) {\n return claim_text(nodes, ' ');\n}\nfunction set_data(text, data) {\n data = '' + data;\n if (text.data !== data)\n text.data = data;\n}\nfunction set_input_value(input, value) {\n if (value != null || input.value) {\n input.value = value;\n }\n}\nfunction set_input_type(input, type) {\n try {\n input.type = type;\n }\n catch (e) {\n // do nothing\n }\n}\nfunction set_style(node, key, value, important) {\n node.style.setProperty(key, value, important ? 'important' : '');\n}\nfunction select_option(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n if (option.__value === value) {\n option.selected = true;\n return;\n }\n }\n}\nfunction select_options(select, value) {\n for (let i = 0; i < select.options.length; i += 1) {\n const option = select.options[i];\n option.selected = ~value.indexOf(option.__value);\n }\n}\nfunction select_value(select) {\n const selected_option = select.querySelector(':checked') || select.options[0];\n return selected_option && selected_option.__value;\n}\nfunction select_multiple_value(select) {\n return [].map.call(select.querySelectorAll(':checked'), option => option.__value);\n}\nfunction add_resize_listener(element, fn) {\n if (getComputedStyle(element).position === 'static') {\n element.style.position = 'relative';\n }\n const object = document.createElement('object');\n object.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;');\n object.setAttribute('aria-hidden', 'true');\n object.type = 'text/html';\n object.tabIndex = -1;\n let win;\n object.onload = () => {\n win = object.contentDocument.defaultView;\n win.addEventListener('resize', fn);\n };\n if (/Trident/.test(navigator.userAgent)) {\n element.appendChild(object);\n object.data = 'about:blank';\n }\n else {\n object.data = 'about:blank';\n element.appendChild(object);\n }\n return {\n cancel: () => {\n win && win.removeEventListener && win.removeEventListener('resize', fn);\n element.removeChild(object);\n }\n };\n}\nfunction toggle_class(element, name, toggle) {\n element.classList[toggle ? 'add' : 'remove'](name);\n}\nfunction custom_event(type, detail) {\n const e = document.createEvent('CustomEvent');\n e.initCustomEvent(type, false, false, detail);\n return e;\n}\nclass HtmlTag {\n constructor(html, anchor = null) {\n this.e = element('div');\n this.a = anchor;\n this.u(html);\n }\n m(target, anchor = null) {\n for (let i = 0; i < this.n.length; i += 1) {\n insert(target, this.n[i], anchor);\n }\n this.t = target;\n }\n u(html) {\n this.e.innerHTML = html;\n this.n = Array.from(this.e.childNodes);\n }\n p(html) {\n this.d();\n this.u(html);\n this.m(this.t, this.a);\n }\n d() {\n this.n.forEach(detach);\n }\n}\n\nlet stylesheet;\nlet active = 0;\nlet current_rules = {};\n// https://github.com/darkskyapp/string-hash/blob/master/index.js\nfunction hash(str) {\n let hash = 5381;\n let i = str.length;\n while (i--)\n hash = ((hash << 5) - hash) ^ str.charCodeAt(i);\n return hash >>> 0;\n}\nfunction create_rule(node, a, b, duration, delay, ease, fn, uid = 0) {\n const step = 16.666 / duration;\n let keyframes = '{\\n';\n for (let p = 0; p <= 1; p += step) {\n const t = a + (b - a) * ease(p);\n keyframes += p * 100 + `%{${fn(t, 1 - t)}}\\n`;\n }\n const rule = keyframes + `100% {${fn(b, 1 - b)}}\\n}`;\n const name = `__svelte_${hash(rule)}_${uid}`;\n if (!current_rules[name]) {\n if (!stylesheet) {\n const style = element('style');\n document.head.appendChild(style);\n stylesheet = style.sheet;\n }\n current_rules[name] = true;\n stylesheet.insertRule(`@keyframes ${name} ${rule}`, stylesheet.cssRules.length);\n }\n const animation = node.style.animation || '';\n node.style.animation = `${animation ? `${animation}, ` : ``}${name} ${duration}ms linear ${delay}ms 1 both`;\n active += 1;\n return name;\n}\nfunction delete_rule(node, name) {\n node.style.animation = (node.style.animation || '')\n .split(', ')\n .filter(name\n ? anim => anim.indexOf(name) < 0 // remove specific animation\n : anim => anim.indexOf('__svelte') === -1 // remove all Svelte animations\n )\n .join(', ');\n if (name && !--active)\n clear_rules();\n}\nfunction clear_rules() {\n raf(() => {\n if (active)\n return;\n let i = stylesheet.cssRules.length;\n while (i--)\n stylesheet.deleteRule(i);\n current_rules = {};\n });\n}\n\nfunction create_animation(node, from, fn, params) {\n if (!from)\n return noop;\n const to = node.getBoundingClientRect();\n if (from.left === to.left && from.right === to.right && from.top === to.top && from.bottom === to.bottom)\n return noop;\n const { delay = 0, duration = 300, easing = identity, \n // @ts-ignore todo: should this be separated from destructuring? Or start/end added to public api and documentation?\n start: start_time = now() + delay, \n // @ts-ignore todo:\n end = start_time + duration, tick = noop, css } = fn(node, { from, to }, params);\n let running = true;\n let started = false;\n let name;\n function start() {\n if (css) {\n name = create_rule(node, 0, 1, duration, delay, easing, css);\n }\n if (!delay) {\n started = true;\n }\n }\n function stop() {\n if (css)\n delete_rule(node, name);\n running = false;\n }\n loop(now => {\n if (!started && now >= start_time) {\n started = true;\n }\n if (started && now >= end) {\n tick(1, 0);\n stop();\n }\n if (!running) {\n return false;\n }\n if (started) {\n const p = now - start_time;\n const t = 0 + 1 * easing(p / duration);\n tick(t, 1 - t);\n }\n return true;\n });\n start();\n tick(0, 1);\n return stop;\n}\nfunction fix_position(node) {\n const style = getComputedStyle(node);\n if (style.position !== 'absolute' && style.position !== 'fixed') {\n const { width, height } = style;\n const a = node.getBoundingClientRect();\n node.style.position = 'absolute';\n node.style.width = width;\n node.style.height = height;\n add_transform(node, a);\n }\n}\nfunction add_transform(node, a) {\n const b = node.getBoundingClientRect();\n if (a.left !== b.left || a.top !== b.top) {\n const style = getComputedStyle(node);\n const transform = style.transform === 'none' ? '' : style.transform;\n node.style.transform = `${transform} translate(${a.left - b.left}px, ${a.top - b.top}px)`;\n }\n}\n\nlet current_component;\nfunction set_current_component(component) {\n current_component = component;\n}\nfunction get_current_component() {\n if (!current_component)\n throw new Error(`Function called outside component initialization`);\n return current_component;\n}\nfunction beforeUpdate(fn) {\n get_current_component().$$.before_update.push(fn);\n}\nfunction onMount(fn) {\n get_current_component().$$.on_mount.push(fn);\n}\nfunction afterUpdate(fn) {\n get_current_component().$$.after_update.push(fn);\n}\nfunction onDestroy(fn) {\n get_current_component().$$.on_destroy.push(fn);\n}\nfunction createEventDispatcher() {\n const component = get_current_component();\n return (type, detail) => {\n const callbacks = component.$$.callbacks[type];\n if (callbacks) {\n // TODO are there situations where events could be dispatched\n // in a server (non-DOM) environment?\n const event = custom_event(type, detail);\n callbacks.slice().forEach(fn => {\n fn.call(component, event);\n });\n }\n };\n}\nfunction setContext(key, context) {\n get_current_component().$$.context.set(key, context);\n}\nfunction getContext(key) {\n return get_current_component().$$.context.get(key);\n}\n// TODO figure out if we still want to support\n// shorthand events, or if we want to implement\n// a real bubbling mechanism\nfunction bubble(component, event) {\n const callbacks = component.$$.callbacks[event.type];\n if (callbacks) {\n callbacks.slice().forEach(fn => fn(event));\n }\n}\n\nconst dirty_components = [];\nconst intros = { enabled: false };\nconst binding_callbacks = [];\nconst render_callbacks = [];\nconst flush_callbacks = [];\nconst resolved_promise = Promise.resolve();\nlet update_scheduled = false;\nfunction schedule_update() {\n if (!update_scheduled) {\n update_scheduled = true;\n resolved_promise.then(flush);\n }\n}\nfunction tick() {\n schedule_update();\n return resolved_promise;\n}\nfunction add_render_callback(fn) {\n render_callbacks.push(fn);\n}\nfunction add_flush_callback(fn) {\n flush_callbacks.push(fn);\n}\nfunction flush() {\n const seen_callbacks = new Set();\n do {\n // first, call beforeUpdate functions\n // and update components\n while (dirty_components.length) {\n const component = dirty_components.shift();\n set_current_component(component);\n update(component.$$);\n }\n while (binding_callbacks.length)\n binding_callbacks.pop()();\n // then, once components are updated, call\n // afterUpdate functions. This may cause\n // subsequent updates...\n for (let i = 0; i < render_callbacks.length; i += 1) {\n const callback = render_callbacks[i];\n if (!seen_callbacks.has(callback)) {\n callback();\n // ...so guard against infinite loops\n seen_callbacks.add(callback);\n }\n }\n render_callbacks.length = 0;\n } while (dirty_components.length);\n while (flush_callbacks.length) {\n flush_callbacks.pop()();\n }\n update_scheduled = false;\n}\nfunction update($$) {\n if ($$.fragment !== null) {\n $$.update();\n run_all($$.before_update);\n const dirty = $$.dirty;\n $$.dirty = [-1];\n $$.fragment && $$.fragment.p($$.ctx, dirty);\n $$.after_update.forEach(add_render_callback);\n }\n}\n\nlet promise;\nfunction wait() {\n if (!promise) {\n promise = Promise.resolve();\n promise.then(() => {\n promise = null;\n });\n }\n return promise;\n}\nfunction dispatch(node, direction, kind) {\n node.dispatchEvent(custom_event(`${direction ? 'intro' : 'outro'}${kind}`));\n}\nconst outroing = new Set();\nlet outros;\nfunction group_outros() {\n outros = {\n r: 0,\n c: [],\n p: outros // parent group\n };\n}\nfunction check_outros() {\n if (!outros.r) {\n run_all(outros.c);\n }\n outros = outros.p;\n}\nfunction transition_in(block, local) {\n if (block && block.i) {\n outroing.delete(block);\n block.i(local);\n }\n}\nfunction transition_out(block, local, detach, callback) {\n if (block && block.o) {\n if (outroing.has(block))\n return;\n outroing.add(block);\n outros.c.push(() => {\n outroing.delete(block);\n if (callback) {\n if (detach)\n block.d(1);\n callback();\n }\n });\n block.o(local);\n }\n}\nconst null_transition = { duration: 0 };\nfunction create_in_transition(node, fn, params) {\n let config = fn(node, params);\n let running = false;\n let animation_name;\n let task;\n let uid = 0;\n function cleanup() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 0, 1, duration, delay, easing, css, uid++);\n tick(0, 1);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n if (task)\n task.abort();\n running = true;\n add_render_callback(() => dispatch(node, true, 'start'));\n task = loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(1, 0);\n dispatch(node, true, 'end');\n cleanup();\n return running = false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(t, 1 - t);\n }\n }\n return running;\n });\n }\n let started = false;\n return {\n start() {\n if (started)\n return;\n delete_rule(node);\n if (is_function(config)) {\n config = config();\n wait().then(go);\n }\n else {\n go();\n }\n },\n invalidate() {\n started = false;\n },\n end() {\n if (running) {\n cleanup();\n running = false;\n }\n }\n };\n}\nfunction create_out_transition(node, fn, params) {\n let config = fn(node, params);\n let running = true;\n let animation_name;\n const group = outros;\n group.r += 1;\n function go() {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n if (css)\n animation_name = create_rule(node, 1, 0, duration, delay, easing, css);\n const start_time = now() + delay;\n const end_time = start_time + duration;\n add_render_callback(() => dispatch(node, false, 'start'));\n loop(now => {\n if (running) {\n if (now >= end_time) {\n tick(0, 1);\n dispatch(node, false, 'end');\n if (!--group.r) {\n // this will result in `end()` being called,\n // so we don't need to clean up here\n run_all(group.c);\n }\n return false;\n }\n if (now >= start_time) {\n const t = easing((now - start_time) / duration);\n tick(1 - t, t);\n }\n }\n return running;\n });\n }\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go();\n });\n }\n else {\n go();\n }\n return {\n end(reset) {\n if (reset && config.tick) {\n config.tick(1, 0);\n }\n if (running) {\n if (animation_name)\n delete_rule(node, animation_name);\n running = false;\n }\n }\n };\n}\nfunction create_bidirectional_transition(node, fn, params, intro) {\n let config = fn(node, params);\n let t = intro ? 0 : 1;\n let running_program = null;\n let pending_program = null;\n let animation_name = null;\n function clear_animation() {\n if (animation_name)\n delete_rule(node, animation_name);\n }\n function init(program, duration) {\n const d = program.b - t;\n duration *= Math.abs(d);\n return {\n a: t,\n b: program.b,\n d,\n duration,\n start: program.start,\n end: program.start + duration,\n group: program.group\n };\n }\n function go(b) {\n const { delay = 0, duration = 300, easing = identity, tick = noop, css } = config || null_transition;\n const program = {\n start: now() + delay,\n b\n };\n if (!b) {\n // @ts-ignore todo: improve typings\n program.group = outros;\n outros.r += 1;\n }\n if (running_program) {\n pending_program = program;\n }\n else {\n // if this is an intro, and there's a delay, we need to do\n // an initial tick and/or apply CSS animation immediately\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, b, duration, delay, easing, css);\n }\n if (b)\n tick(0, 1);\n running_program = init(program, duration);\n add_render_callback(() => dispatch(node, b, 'start'));\n loop(now => {\n if (pending_program && now > pending_program.start) {\n running_program = init(pending_program, duration);\n pending_program = null;\n dispatch(node, running_program.b, 'start');\n if (css) {\n clear_animation();\n animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);\n }\n }\n if (running_program) {\n if (now >= running_program.end) {\n tick(t = running_program.b, 1 - t);\n dispatch(node, running_program.b, 'end');\n if (!pending_program) {\n // we're done\n if (running_program.b) {\n // intro — we can tidy up immediately\n clear_animation();\n }\n else {\n // outro — needs to be coordinated\n if (!--running_program.group.r)\n run_all(running_program.group.c);\n }\n }\n running_program = null;\n }\n else if (now >= running_program.start) {\n const p = now - running_program.start;\n t = running_program.a + running_program.d * easing(p / running_program.duration);\n tick(t, 1 - t);\n }\n }\n return !!(running_program || pending_program);\n });\n }\n }\n return {\n run(b) {\n if (is_function(config)) {\n wait().then(() => {\n // @ts-ignore\n config = config();\n go(b);\n });\n }\n else {\n go(b);\n }\n },\n end() {\n clear_animation();\n running_program = pending_program = null;\n }\n };\n}\n\nfunction handle_promise(promise, info) {\n const token = info.token = {};\n function update(type, index, key, value) {\n if (info.token !== token)\n return;\n info.resolved = value;\n let child_ctx = info.ctx;\n if (key !== undefined) {\n child_ctx = child_ctx.slice();\n child_ctx[key] = value;\n }\n const block = type && (info.current = type)(child_ctx);\n let needs_flush = false;\n if (info.block) {\n if (info.blocks) {\n info.blocks.forEach((block, i) => {\n if (i !== index && block) {\n group_outros();\n transition_out(block, 1, 1, () => {\n info.blocks[i] = null;\n });\n check_outros();\n }\n });\n }\n else {\n info.block.d(1);\n }\n block.c();\n transition_in(block, 1);\n block.m(info.mount(), info.anchor);\n needs_flush = true;\n }\n info.block = block;\n if (info.blocks)\n info.blocks[index] = block;\n if (needs_flush) {\n flush();\n }\n }\n if (is_promise(promise)) {\n const current_component = get_current_component();\n promise.then(value => {\n set_current_component(current_component);\n update(info.then, 1, info.value, value);\n set_current_component(null);\n }, error => {\n set_current_component(current_component);\n update(info.catch, 2, info.error, error);\n set_current_component(null);\n });\n // if we previously had a then/catch block, destroy it\n if (info.current !== info.pending) {\n update(info.pending, 0);\n return true;\n }\n }\n else {\n if (info.current !== info.then) {\n update(info.then, 1, info.value, promise);\n return true;\n }\n info.resolved = promise;\n }\n}\n\nconst globals = (typeof window !== 'undefined' ? window : global);\n\nfunction destroy_block(block, lookup) {\n block.d(1);\n lookup.delete(block.key);\n}\nfunction outro_and_destroy_block(block, lookup) {\n transition_out(block, 1, 1, () => {\n lookup.delete(block.key);\n });\n}\nfunction fix_and_destroy_block(block, lookup) {\n block.f();\n destroy_block(block, lookup);\n}\nfunction fix_and_outro_and_destroy_block(block, lookup) {\n block.f();\n outro_and_destroy_block(block, lookup);\n}\nfunction update_keyed_each(old_blocks, dirty, get_key, dynamic, ctx, list, lookup, node, destroy, create_each_block, next, get_context) {\n let o = old_blocks.length;\n let n = list.length;\n let i = o;\n const old_indexes = {};\n while (i--)\n old_indexes[old_blocks[i].key] = i;\n const new_blocks = [];\n const new_lookup = new Map();\n const deltas = new Map();\n i = n;\n while (i--) {\n const child_ctx = get_context(ctx, list, i);\n const key = get_key(child_ctx);\n let block = lookup.get(key);\n if (!block) {\n block = create_each_block(key, child_ctx);\n block.c();\n }\n else if (dynamic) {\n block.p(child_ctx, dirty);\n }\n new_lookup.set(key, new_blocks[i] = block);\n if (key in old_indexes)\n deltas.set(key, Math.abs(i - old_indexes[key]));\n }\n const will_move = new Set();\n const did_move = new Set();\n function insert(block) {\n transition_in(block, 1);\n block.m(node, next);\n lookup.set(block.key, block);\n next = block.first;\n n--;\n }\n while (o && n) {\n const new_block = new_blocks[n - 1];\n const old_block = old_blocks[o - 1];\n const new_key = new_block.key;\n const old_key = old_block.key;\n if (new_block === old_block) {\n // do nothing\n next = new_block.first;\n o--;\n n--;\n }\n else if (!new_lookup.has(old_key)) {\n // remove old block\n destroy(old_block, lookup);\n o--;\n }\n else if (!lookup.has(new_key) || will_move.has(new_key)) {\n insert(new_block);\n }\n else if (did_move.has(old_key)) {\n o--;\n }\n else if (deltas.get(new_key) > deltas.get(old_key)) {\n did_move.add(new_key);\n insert(new_block);\n }\n else {\n will_move.add(old_key);\n o--;\n }\n }\n while (o--) {\n const old_block = old_blocks[o];\n if (!new_lookup.has(old_block.key))\n destroy(old_block, lookup);\n }\n while (n)\n insert(new_blocks[n - 1]);\n return new_blocks;\n}\nfunction measure(blocks) {\n const rects = {};\n let i = blocks.length;\n while (i--)\n rects[blocks[i].key] = blocks[i].node.getBoundingClientRect();\n return rects;\n}\n\nfunction get_spread_update(levels, updates) {\n const update = {};\n const to_null_out = {};\n const accounted_for = { $$scope: 1 };\n let i = levels.length;\n while (i--) {\n const o = levels[i];\n const n = updates[i];\n if (n) {\n for (const key in o) {\n if (!(key in n))\n to_null_out[key] = 1;\n }\n for (const key in n) {\n if (!accounted_for[key]) {\n update[key] = n[key];\n accounted_for[key] = 1;\n }\n }\n levels[i] = n;\n }\n else {\n for (const key in o) {\n accounted_for[key] = 1;\n }\n }\n }\n for (const key in to_null_out) {\n if (!(key in update))\n update[key] = undefined;\n }\n return update;\n}\nfunction get_spread_object(spread_props) {\n return typeof spread_props === 'object' && spread_props !== null ? spread_props : {};\n}\n\n// source: https://html.spec.whatwg.org/multipage/indices.html\nconst boolean_attributes = new Set([\n 'allowfullscreen',\n 'allowpaymentrequest',\n 'async',\n 'autofocus',\n 'autoplay',\n 'checked',\n 'controls',\n 'default',\n 'defer',\n 'disabled',\n 'formnovalidate',\n 'hidden',\n 'ismap',\n 'loop',\n 'multiple',\n 'muted',\n 'nomodule',\n 'novalidate',\n 'open',\n 'playsinline',\n 'readonly',\n 'required',\n 'reversed',\n 'selected'\n]);\n\nconst invalid_attribute_name_character = /[\\s'\">/=\\u{FDD0}-\\u{FDEF}\\u{FFFE}\\u{FFFF}\\u{1FFFE}\\u{1FFFF}\\u{2FFFE}\\u{2FFFF}\\u{3FFFE}\\u{3FFFF}\\u{4FFFE}\\u{4FFFF}\\u{5FFFE}\\u{5FFFF}\\u{6FFFE}\\u{6FFFF}\\u{7FFFE}\\u{7FFFF}\\u{8FFFE}\\u{8FFFF}\\u{9FFFE}\\u{9FFFF}\\u{AFFFE}\\u{AFFFF}\\u{BFFFE}\\u{BFFFF}\\u{CFFFE}\\u{CFFFF}\\u{DFFFE}\\u{DFFFF}\\u{EFFFE}\\u{EFFFF}\\u{FFFFE}\\u{FFFFF}\\u{10FFFE}\\u{10FFFF}]/u;\n// https://html.spec.whatwg.org/multipage/syntax.html#attributes-2\n// https://infra.spec.whatwg.org/#noncharacter\nfunction spread(args, classes_to_add) {\n const attributes = Object.assign({}, ...args);\n if (classes_to_add) {\n if (attributes.class == null) {\n attributes.class = classes_to_add;\n }\n else {\n attributes.class += ' ' + classes_to_add;\n }\n }\n let str = '';\n Object.keys(attributes).forEach(name => {\n if (invalid_attribute_name_character.test(name))\n return;\n const value = attributes[name];\n if (value === true)\n str += \" \" + name;\n else if (boolean_attributes.has(name.toLowerCase())) {\n if (value)\n str += \" \" + name;\n }\n else if (value != null) {\n str += \" \" + name + \"=\" + JSON.stringify(String(value)\n .replace(/\"/g, '"')\n .replace(/'/g, '''));\n }\n });\n return str;\n}\nconst escaped = {\n '\"': '"',\n \"'\": ''',\n '&': '&',\n '<': '<',\n '>': '>'\n};\nfunction escape(html) {\n return String(html).replace(/[\"'&<>]/g, match => escaped[match]);\n}\nfunction each(items, fn) {\n let str = '';\n for (let i = 0; i < items.length; i += 1) {\n str += fn(items[i], i);\n }\n return str;\n}\nconst missing_component = {\n $$render: () => ''\n};\nfunction validate_component(component, name) {\n if (!component || !component.$$render) {\n if (name === 'svelte:component')\n name += ' this={...}';\n throw new Error(`<${name}> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules`);\n }\n return component;\n}\nfunction debug(file, line, column, values) {\n console.log(`{@debug} ${file ? file + ' ' : ''}(${line}:${column})`); // eslint-disable-line no-console\n console.log(values); // eslint-disable-line no-console\n return '';\n}\nlet on_destroy;\nfunction create_ssr_component(fn) {\n function $$render(result, props, bindings, slots) {\n const parent_component = current_component;\n const $$ = {\n on_destroy,\n context: new Map(parent_component ? parent_component.$$.context : []),\n // these will be immediately discarded\n on_mount: [],\n before_update: [],\n after_update: [],\n callbacks: blank_object()\n };\n set_current_component({ $$ });\n const html = fn(result, props, bindings, slots);\n set_current_component(parent_component);\n return html;\n }\n return {\n render: (props = {}, options = {}) => {\n on_destroy = [];\n const result = { head: '', css: new Set() };\n const html = $$render(result, props, {}, options);\n run_all(on_destroy);\n return {\n html,\n css: {\n code: Array.from(result.css).map(css => css.code).join('\\n'),\n map: null // TODO\n },\n head: result.head\n };\n },\n $$render\n };\n}\nfunction add_attribute(name, value, boolean) {\n if (value == null || (boolean && !value))\n return '';\n return ` ${name}${value === true ? '' : `=${typeof value === 'string' ? JSON.stringify(escape(value)) : `\"${value}\"`}`}`;\n}\nfunction add_classes(classes) {\n return classes ? ` class=\"${classes}\"` : ``;\n}\n\nfunction bind(component, name, callback) {\n const index = component.$$.props[name];\n if (index !== undefined) {\n component.$$.bound[index] = callback;\n callback(component.$$.ctx[index]);\n }\n}\nfunction create_component(block) {\n block && block.c();\n}\nfunction claim_component(block, parent_nodes) {\n block && block.l(parent_nodes);\n}\nfunction mount_component(component, target, anchor) {\n const { fragment, on_mount, on_destroy, after_update } = component.$$;\n fragment && fragment.m(target, anchor);\n // onMount happens before the initial afterUpdate\n add_render_callback(() => {\n const new_on_destroy = on_mount.map(run).filter(is_function);\n if (on_destroy) {\n on_destroy.push(...new_on_destroy);\n }\n else {\n // Edge case - component was destroyed immediately,\n // most likely as a result of a binding initialising\n run_all(new_on_destroy);\n }\n component.$$.on_mount = [];\n });\n after_update.forEach(add_render_callback);\n}\nfunction destroy_component(component, detaching) {\n const $$ = component.$$;\n if ($$.fragment !== null) {\n run_all($$.on_destroy);\n $$.fragment && $$.fragment.d(detaching);\n // TODO null out other refs, including component.$$ (but need to\n // preserve final state?)\n $$.on_destroy = $$.fragment = null;\n $$.ctx = [];\n }\n}\nfunction make_dirty(component, i) {\n if (component.$$.dirty[0] === -1) {\n dirty_components.push(component);\n schedule_update();\n component.$$.dirty.fill(0);\n }\n component.$$.dirty[(i / 31) | 0] |= (1 << (i % 31));\n}\nfunction init(component, options, instance, create_fragment, not_equal, props, dirty = [-1]) {\n const parent_component = current_component;\n set_current_component(component);\n const prop_values = options.props || {};\n const $$ = component.$$ = {\n fragment: null,\n ctx: null,\n // state\n props,\n update: noop,\n not_equal,\n bound: blank_object(),\n // lifecycle\n on_mount: [],\n on_destroy: [],\n before_update: [],\n after_update: [],\n context: new Map(parent_component ? parent_component.$$.context : []),\n // everything else\n callbacks: blank_object(),\n dirty\n };\n let ready = false;\n $$.ctx = instance\n ? instance(component, prop_values, (i, ret, value = ret) => {\n if ($$.ctx && not_equal($$.ctx[i], $$.ctx[i] = value)) {\n if ($$.bound[i])\n $$.bound[i](value);\n if (ready)\n make_dirty(component, i);\n }\n return ret;\n })\n : [];\n $$.update();\n ready = true;\n run_all($$.before_update);\n // `false` as a special case of no DOM component\n $$.fragment = create_fragment ? create_fragment($$.ctx) : false;\n if (options.target) {\n if (options.hydrate) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.l(children(options.target));\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n $$.fragment && $$.fragment.c();\n }\n if (options.intro)\n transition_in(component.$$.fragment);\n mount_component(component, options.target, options.anchor);\n flush();\n }\n set_current_component(parent_component);\n}\nlet SvelteElement;\nif (typeof HTMLElement === 'function') {\n SvelteElement = class extends HTMLElement {\n constructor() {\n super();\n this.attachShadow({ mode: 'open' });\n }\n connectedCallback() {\n // @ts-ignore todo: improve typings\n for (const key in this.$$.slotted) {\n // @ts-ignore todo: improve typings\n this.appendChild(this.$$.slotted[key]);\n }\n }\n attributeChangedCallback(attr, _oldValue, newValue) {\n this[attr] = newValue;\n }\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n // TODO should this delegate to addEventListener?\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set() {\n // overridden by instance, if it has props\n }\n };\n}\nclass SvelteComponent {\n $destroy() {\n destroy_component(this, 1);\n this.$destroy = noop;\n }\n $on(type, callback) {\n const callbacks = (this.$$.callbacks[type] || (this.$$.callbacks[type] = []));\n callbacks.push(callback);\n return () => {\n const index = callbacks.indexOf(callback);\n if (index !== -1)\n callbacks.splice(index, 1);\n };\n }\n $set() {\n // overridden by instance, if it has props\n }\n}\n\nfunction dispatch_dev(type, detail) {\n document.dispatchEvent(custom_event(type, detail));\n}\nfunction append_dev(target, node) {\n dispatch_dev(\"SvelteDOMInsert\", { target, node });\n append(target, node);\n}\nfunction insert_dev(target, node, anchor) {\n dispatch_dev(\"SvelteDOMInsert\", { target, node, anchor });\n insert(target, node, anchor);\n}\nfunction detach_dev(node) {\n dispatch_dev(\"SvelteDOMRemove\", { node });\n detach(node);\n}\nfunction detach_between_dev(before, after) {\n while (before.nextSibling && before.nextSibling !== after) {\n detach_dev(before.nextSibling);\n }\n}\nfunction detach_before_dev(after) {\n while (after.previousSibling) {\n detach_dev(after.previousSibling);\n }\n}\nfunction detach_after_dev(before) {\n while (before.nextSibling) {\n detach_dev(before.nextSibling);\n }\n}\nfunction listen_dev(node, event, handler, options, has_prevent_default, has_stop_propagation) {\n const modifiers = options === true ? [\"capture\"] : options ? Array.from(Object.keys(options)) : [];\n if (has_prevent_default)\n modifiers.push('preventDefault');\n if (has_stop_propagation)\n modifiers.push('stopPropagation');\n dispatch_dev(\"SvelteDOMAddEventListener\", { node, event, handler, modifiers });\n const dispose = listen(node, event, handler, options);\n return () => {\n dispatch_dev(\"SvelteDOMRemoveEventListener\", { node, event, handler, modifiers });\n dispose();\n };\n}\nfunction attr_dev(node, attribute, value) {\n attr(node, attribute, value);\n if (value == null)\n dispatch_dev(\"SvelteDOMRemoveAttribute\", { node, attribute });\n else\n dispatch_dev(\"SvelteDOMSetAttribute\", { node, attribute, value });\n}\nfunction prop_dev(node, property, value) {\n node[property] = value;\n dispatch_dev(\"SvelteDOMSetProperty\", { node, property, value });\n}\nfunction dataset_dev(node, property, value) {\n node.dataset[property] = value;\n dispatch_dev(\"SvelteDOMSetDataset\", { node, property, value });\n}\nfunction set_data_dev(text, data) {\n data = '' + data;\n if (text.data === data)\n return;\n dispatch_dev(\"SvelteDOMSetData\", { node: text, data });\n text.data = data;\n}\nclass SvelteComponentDev extends SvelteComponent {\n constructor(options) {\n if (!options || (!options.target && !options.$$inline)) {\n throw new Error(`'target' is a required option`);\n }\n super();\n }\n $destroy() {\n super.$destroy();\n this.$destroy = () => {\n console.warn(`Component was already destroyed`); // eslint-disable-line no-console\n };\n }\n}\nfunction loop_guard(timeout) {\n const start = Date.now();\n return () => {\n if (Date.now() - start > timeout) {\n throw new Error(`Infinite loop detected`);\n }\n };\n}\n\nexport { HtmlTag, SvelteComponent, SvelteComponentDev, SvelteElement, add_attribute, add_classes, add_flush_callback, add_location, add_render_callback, add_resize_listener, add_transform, afterUpdate, append, append_dev, assign, attr, attr_dev, beforeUpdate, bind, binding_callbacks, blank_object, bubble, check_outros, children, claim_component, claim_element, claim_space, claim_text, clear_loops, component_subscribe, createEventDispatcher, create_animation, create_bidirectional_transition, create_component, create_in_transition, create_out_transition, create_slot, create_ssr_component, current_component, custom_event, dataset_dev, debug, destroy_block, destroy_component, destroy_each, detach, detach_after_dev, detach_before_dev, detach_between_dev, detach_dev, dirty_components, dispatch_dev, each, element, element_is, empty, escape, escaped, exclude_internal_props, fix_and_destroy_block, fix_and_outro_and_destroy_block, fix_position, flush, getContext, get_binding_group_value, get_current_component, get_slot_changes, get_slot_context, get_spread_object, get_spread_update, get_store_value, globals, group_outros, handle_promise, has_prop, identity, init, insert, insert_dev, intros, invalid_attribute_name_character, is_client, is_function, is_promise, listen, listen_dev, loop, loop_guard, measure, missing_component, mount_component, noop, not_equal, now, null_to_empty, object_without_properties, onDestroy, onMount, once, outro_and_destroy_block, prevent_default, prop_dev, raf, run, run_all, safe_not_equal, schedule_update, select_multiple_value, select_option, select_options, select_value, self, setContext, set_attributes, set_current_component, set_custom_element_data, set_data, set_data_dev, set_input_type, set_input_value, set_now, set_raf, set_store_value, set_style, set_svg_attributes, space, spread, stop_propagation, subscribe, svg_element, text, tick, time_ranges_to_array, to_number, toggle_class, transition_in, transition_out, update_keyed_each, validate_component, validate_store, xlink_attr };\n","\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n {#each data as item }\r\n {item} \r\n {/each}\r\n \r\n
","\r\n\r\n\r\n\r\n {visible = !visible}}>\r\n{#if visible}\r\n \r\n{/if}\r\n\r\n","\r\n\r\n\r\n\r\n\r\n
\r\n
Date: {_date}
\r\n
\r\n \r\n
\r\n\r\n","import App from './App.svelte';\n\nconst app = new App({\n\ttarget: document.body,\n});\n\nexport default app;"],"names":[],"mappings":";;;;;IAAA,SAAS,IAAI,GAAG,GAAG;AACnB,IAUA,SAAS,YAAY,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IACzD,IAAI,OAAO,CAAC,aAAa,GAAG;IAC5B,QAAQ,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE;IACzC,KAAK,CAAC;IACN,CAAC;IACD,SAAS,GAAG,CAAC,EAAE,EAAE;IACjB,IAAI,OAAO,EAAE,EAAE,CAAC;IAChB,CAAC;IACD,SAAS,YAAY,GAAG;IACxB,IAAI,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC/B,CAAC;IACD,SAAS,OAAO,CAAC,GAAG,EAAE;IACtB,IAAI,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;IACD,SAAS,WAAW,CAAC,KAAK,EAAE;IAC5B,IAAI,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;IACvC,CAAC;IACD,SAAS,cAAc,CAAC,CAAC,EAAE,CAAC,EAAE;IAC9B,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,QAAQ,KAAK,OAAO,CAAC,KAAK,UAAU,CAAC,CAAC;IAClG,CAAC;AACD,IA8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AAG,EAAE,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC;;;;OACjH,iBAAI,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCC6BJ,WAAW;mCAAkB,WAAW;;;;;;;;2BADnE,GAAK;;;;;;;;;;;;;;;;;;;;;;;uEAAL,GAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;aAtCR,WAAW,CAAC,KAAK;KACxB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM;;;aAGjB,WAAW,CAAC,KAAK;KACxB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM;;;;SATtB,IAAI,OAAO,IAAI;;;;;;;;;;;;;;;;;;;;OACnB,iBAAG,KAAK,GAAG,IAAI,CAAC,kBAAkB,CAAC,OAAO;;;;;;;;;;;;;;;;;;;;;ICH5C,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC;IACpB,CAAC,MAAM,EAAE,QAAQ,CAAC,IAAI;IACtB,CAAC,CAAC,CAAC;;;;;;;;"}
--------------------------------------------------------------------------------
/docs/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | Svelte app
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "svelte-touch-datepicker",
3 | "version": "1.4.1",
4 | "svelte": "src/index.js",
5 | "module": "dist/index.mjs",
6 | "main": "dist/index.js",
7 | "description": "Native like touch datepicker for Svelte",
8 | "homepage": "https://github.com/SharifClick/svelte-touch-datepicker",
9 | "repository": {
10 | "type": "git",
11 | "url": "https://github.com/SharifClick/svelte-touch-datepicker"
12 | },
13 | "publishConfig": {
14 | "registry": "https://registry.npmjs.org/"
15 | },
16 | "bugs": {
17 | "url": "https://github.com/SharifClick/svelte-touch-datepicker/issues"
18 | },
19 | "author": {
20 | "name": "Sharif Ahmed",
21 | "email": "me.sharifahmed@gmail.com",
22 | "url": "http://sharifahmed.me"
23 | },
24 | "license": "MIT",
25 | "devDependencies": {
26 | "npm-run-all": "^4.1.5",
27 | "rollup": "^1.12.0",
28 | "rollup-plugin-commonjs": "^10.0.0",
29 | "rollup-plugin-livereload": "^1.0.0",
30 | "rollup-plugin-node-resolve": "^5.2.0",
31 | "rollup-plugin-bundle-size": "^1.0.3",
32 | "rollup-plugin-svelte": "^5.0.3",
33 | "rollup-plugin-terser": "^4.0.4",
34 | "svelte": "^3.16.5",
35 | "sirv-cli": "^0.4.4"
36 | },
37 | "scripts": {
38 | "build": "rollup -c",
39 | "autobuild": "rollup -c rollup.dev.config.js -w",
40 | "dev": "run-p start:dev autobuild",
41 | "start": "sirv docs --single",
42 | "start:dev": "sirv docs --single --dev"
43 | },
44 | "keywords": [
45 | "svelte",
46 | "svelte.js",
47 | "sveltejs",
48 | "svelte-touch-datepicker",
49 | "touch-datepicker",
50 | "datepicker",
51 | "native-datepicker",
52 | "date-picker"
53 | ]
54 | }
55 |
--------------------------------------------------------------------------------
/rollup.config.js:
--------------------------------------------------------------------------------
1 | import svelte from 'rollup-plugin-svelte';
2 | import bundleSize from 'rollup-plugin-bundle-size'
3 | import resolve from 'rollup-plugin-node-resolve';
4 | import commonjs from 'rollup-plugin-commonjs';
5 | import { terser } from 'rollup-plugin-terser';
6 | import pkg from './package.json';
7 |
8 | export default [
9 | {
10 | input: 'src/index.js',
11 | output: [
12 | { file: pkg.module, 'format': 'es' },
13 | { file: pkg.main, 'format': 'umd', name: 'DatePicker' }
14 | ],
15 | plugins: [
16 | svelte(),
17 | commonjs(),
18 | resolve(),
19 | terser(),
20 | bundleSize()
21 | ]
22 | }
23 | ];
--------------------------------------------------------------------------------
/rollup.dev.config.js:
--------------------------------------------------------------------------------
1 | import svelte from 'rollup-plugin-svelte';
2 | import resolve from 'rollup-plugin-node-resolve';
3 | import commonjs from 'rollup-plugin-commonjs';
4 | import livereload from 'rollup-plugin-livereload';
5 | import { terser } from 'rollup-plugin-terser';
6 |
7 | const production = !process.env.ROLLUP_WATCH;
8 |
9 | export default {
10 | input: 'dev/main.js',
11 | output: {
12 | sourcemap: true,
13 | format: 'iife',
14 | name: 'app',
15 | file: 'docs/bundle.js'
16 | },
17 | plugins: [
18 | svelte({
19 | // enable run-time checks when not in production
20 | dev: !production,
21 | // we'll extract any component CSS out into
22 | // a separate file — better for performance
23 | css: css => {
24 | css.write('docs/bundle.css');
25 | }
26 | }),
27 |
28 | // If you have external dependencies installed from
29 | // npm, you'll most likely need these plugins. In
30 | // some cases you'll need additional configuration —
31 | // consult the documentation for details:
32 | // https://github.com/rollup/rollup-plugin-commonjs
33 | resolve({
34 | browser: true,
35 | dedupe: importee => importee === 'svelte' || importee.startsWith('svelte/')
36 | }),
37 | commonjs(),
38 |
39 | // Watch the `docs` directory and refresh the
40 | // browser on changes when not in production
41 | !production && livereload('docs'),
42 |
43 | // If we're building for production (npm run build
44 | // instead of npm run dev), minify
45 | production && terser()
46 | ],
47 | watch: {
48 | clearScreen: false
49 | }
50 | };
51 |
--------------------------------------------------------------------------------
/src/DatePicker.svelte:
--------------------------------------------------------------------------------
1 |
61 |
62 |
121 |
122 | {visible = !visible}}>
123 | {#if visible}
124 |
141 | {/if}
142 |
143 |
--------------------------------------------------------------------------------
/src/Switcher.svelte:
--------------------------------------------------------------------------------
1 |
99 |
100 |
101 |
148 |
149 |
150 |
151 |
152 | {#each data as item }
153 | {item}
154 | {/each}
155 |
156 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import DatePicker from './DatePicker.svelte'
2 | export default DatePicker ;
3 |
--------------------------------------------------------------------------------