@memberstack/dom 1.9.4 → 1.9.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/auth/index.js +4 -0
- package/lib/index.d.ts +62 -58
- package/lib/methods/dom/main-dom.js +2336 -567
- package/lib/methods/dom/methods.d.ts +1 -1
- package/lib/methods/dom/methods.js +3 -4
- package/lib/methods/index.d.ts +64 -58
- package/lib/methods/index.js +2 -0
- package/lib/methods/requests/index.d.ts +5 -2
- package/lib/methods/requests/index.js +44 -13
- package/lib/methods/requests/requests.d.ts +3 -1
- package/lib/methods/requests/requests.js +15 -14
- package/lib/types/params.d.ts +3 -1
- package/lib/types/payloads.d.ts +1 -0
- package/lib/types/utils/payloads.d.ts +16 -9
- package/lib/utils/cookies.js +1 -1
- package/package.json +1 -1
|
@@ -68,9 +68,21 @@ var __spread = (this && this.__spread) || function () {
|
|
|
68
68
|
for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
|
|
69
69
|
return ar;
|
|
70
70
|
};
|
|
71
|
+
var __values = (this && this.__values) || function(o) {
|
|
72
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
73
|
+
if (m) return m.call(o);
|
|
74
|
+
if (o && typeof o.length === "number") return {
|
|
75
|
+
next: function () {
|
|
76
|
+
if (o && i >= o.length) o = void 0;
|
|
77
|
+
return { value: o && o[i++], done: !o };
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
81
|
+
};
|
|
71
82
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
72
83
|
exports.default = void 0;
|
|
73
84
|
function noop() { }
|
|
85
|
+
var identity = function (x) { return x; };
|
|
74
86
|
function run(fn) {
|
|
75
87
|
return fn();
|
|
76
88
|
}
|
|
@@ -86,9 +98,64 @@ function is_function(thing) {
|
|
|
86
98
|
function safe_not_equal(a, b) {
|
|
87
99
|
return a != a ? b == b : a !== b || ((a && typeof a === 'object') || typeof a === 'function');
|
|
88
100
|
}
|
|
101
|
+
var src_url_equal_anchor;
|
|
102
|
+
function src_url_equal(element_src, url) {
|
|
103
|
+
if (!src_url_equal_anchor) {
|
|
104
|
+
src_url_equal_anchor = document.createElement('a');
|
|
105
|
+
}
|
|
106
|
+
src_url_equal_anchor.href = url;
|
|
107
|
+
return element_src === src_url_equal_anchor.href;
|
|
108
|
+
}
|
|
89
109
|
function is_empty(obj) {
|
|
90
110
|
return Object.keys(obj).length === 0;
|
|
91
111
|
}
|
|
112
|
+
function subscribe(store) {
|
|
113
|
+
var callbacks = [];
|
|
114
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
115
|
+
callbacks[_i - 1] = arguments[_i];
|
|
116
|
+
}
|
|
117
|
+
if (store == null) {
|
|
118
|
+
return noop;
|
|
119
|
+
}
|
|
120
|
+
var unsub = store.subscribe.apply(store, __spread(callbacks));
|
|
121
|
+
return unsub.unsubscribe ? function () { return unsub.unsubscribe(); } : unsub;
|
|
122
|
+
}
|
|
123
|
+
function component_subscribe(component, store, callback) {
|
|
124
|
+
component.$$.on_destroy.push(subscribe(store, callback));
|
|
125
|
+
}
|
|
126
|
+
var is_client = typeof window !== 'undefined';
|
|
127
|
+
var now = is_client
|
|
128
|
+
? function () { return window.performance.now(); }
|
|
129
|
+
: function () { return Date.now(); };
|
|
130
|
+
var raf = is_client ? function (cb) { return requestAnimationFrame(cb); } : noop;
|
|
131
|
+
var tasks = new Set();
|
|
132
|
+
function run_tasks(now) {
|
|
133
|
+
tasks.forEach(function (task) {
|
|
134
|
+
if (!task.c(now)) {
|
|
135
|
+
tasks.delete(task);
|
|
136
|
+
task.f();
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
if (tasks.size !== 0)
|
|
140
|
+
raf(run_tasks);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Creates a new task that runs on each raf frame
|
|
144
|
+
* until it returns a falsy value or is aborted
|
|
145
|
+
*/
|
|
146
|
+
function loop(callback) {
|
|
147
|
+
var task;
|
|
148
|
+
if (tasks.size === 0)
|
|
149
|
+
raf(run_tasks);
|
|
150
|
+
return {
|
|
151
|
+
promise: new Promise(function (fulfill) {
|
|
152
|
+
tasks.add(task = { c: callback, f: fulfill });
|
|
153
|
+
}),
|
|
154
|
+
abort: function () {
|
|
155
|
+
tasks.delete(task);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
}
|
|
92
159
|
function append(target, node) {
|
|
93
160
|
target.appendChild(node);
|
|
94
161
|
}
|
|
@@ -110,6 +177,11 @@ function get_root_for_style(node) {
|
|
|
110
177
|
}
|
|
111
178
|
return node.ownerDocument;
|
|
112
179
|
}
|
|
180
|
+
function append_empty_stylesheet(node) {
|
|
181
|
+
var style_element = element('style');
|
|
182
|
+
append_stylesheet(get_root_for_style(node), style_element);
|
|
183
|
+
return style_element.sheet;
|
|
184
|
+
}
|
|
113
185
|
function append_stylesheet(node, style) {
|
|
114
186
|
append(node.head || node, style);
|
|
115
187
|
}
|
|
@@ -137,6 +209,9 @@ function text(data) {
|
|
|
137
209
|
function space() {
|
|
138
210
|
return text(' ');
|
|
139
211
|
}
|
|
212
|
+
function empty() {
|
|
213
|
+
return text('');
|
|
214
|
+
}
|
|
140
215
|
function listen(node, event, handler, options) {
|
|
141
216
|
node.addEventListener(event, handler, options);
|
|
142
217
|
return function () { return node.removeEventListener(event, handler, options); };
|
|
@@ -169,6 +244,9 @@ function set_data(text, data) {
|
|
|
169
244
|
if (text.wholeText !== data)
|
|
170
245
|
text.data = data;
|
|
171
246
|
}
|
|
247
|
+
function set_input_value(input, value) {
|
|
248
|
+
input.value = value == null ? '' : value;
|
|
249
|
+
}
|
|
172
250
|
function set_style(node, key, value, important) {
|
|
173
251
|
if (value === null) {
|
|
174
252
|
node.style.removeProperty(key);
|
|
@@ -180,6 +258,78 @@ function set_style(node, key, value, important) {
|
|
|
180
258
|
function toggle_class(element, name, toggle) {
|
|
181
259
|
element.classList[toggle ? 'add' : 'remove'](name);
|
|
182
260
|
}
|
|
261
|
+
function custom_event(type, detail, _a) {
|
|
262
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.bubbles, bubbles = _c === void 0 ? false : _c, _d = _b.cancelable, cancelable = _d === void 0 ? false : _d;
|
|
263
|
+
var e = document.createEvent('CustomEvent');
|
|
264
|
+
e.initCustomEvent(type, bubbles, cancelable, detail);
|
|
265
|
+
return e;
|
|
266
|
+
}
|
|
267
|
+
// we need to store the information for multiple documents because a Svelte application could also contain iframes
|
|
268
|
+
// https://github.com/sveltejs/svelte/issues/3624
|
|
269
|
+
var managed_styles = new Map();
|
|
270
|
+
var active = 0;
|
|
271
|
+
// https://github.com/darkskyapp/string-hash/blob/master/index.js
|
|
272
|
+
function hash(str) {
|
|
273
|
+
var hash = 5381;
|
|
274
|
+
var i = str.length;
|
|
275
|
+
while (i--)
|
|
276
|
+
hash = ((hash << 5) - hash) ^ str.charCodeAt(i);
|
|
277
|
+
return hash >>> 0;
|
|
278
|
+
}
|
|
279
|
+
function create_style_information(doc, node) {
|
|
280
|
+
var info = { stylesheet: append_empty_stylesheet(node), rules: {} };
|
|
281
|
+
managed_styles.set(doc, info);
|
|
282
|
+
return info;
|
|
283
|
+
}
|
|
284
|
+
function create_rule(node, a, b, duration, delay, ease, fn, uid) {
|
|
285
|
+
if (uid === void 0) { uid = 0; }
|
|
286
|
+
var step = 16.666 / duration;
|
|
287
|
+
var keyframes = '{\n';
|
|
288
|
+
for (var p = 0; p <= 1; p += step) {
|
|
289
|
+
var t = a + (b - a) * ease(p);
|
|
290
|
+
keyframes += p * 100 + ("%{" + fn(t, 1 - t) + "}\n");
|
|
291
|
+
}
|
|
292
|
+
var rule = keyframes + ("100% {" + fn(b, 1 - b) + "}\n}");
|
|
293
|
+
var name = "__svelte_" + hash(rule) + "_" + uid;
|
|
294
|
+
var doc = get_root_for_style(node);
|
|
295
|
+
var _a = managed_styles.get(doc) || create_style_information(doc, node), stylesheet = _a.stylesheet, rules = _a.rules;
|
|
296
|
+
if (!rules[name]) {
|
|
297
|
+
rules[name] = true;
|
|
298
|
+
stylesheet.insertRule("@keyframes " + name + " " + rule, stylesheet.cssRules.length);
|
|
299
|
+
}
|
|
300
|
+
var animation = node.style.animation || '';
|
|
301
|
+
node.style.animation = "" + (animation ? animation + ", " : '') + name + " " + duration + "ms linear " + delay + "ms 1 both";
|
|
302
|
+
active += 1;
|
|
303
|
+
return name;
|
|
304
|
+
}
|
|
305
|
+
function delete_rule(node, name) {
|
|
306
|
+
var previous = (node.style.animation || '').split(', ');
|
|
307
|
+
var next = previous.filter(name
|
|
308
|
+
? function (anim) { return anim.indexOf(name) < 0; } // remove specific animation
|
|
309
|
+
: function (anim) { return anim.indexOf('__svelte') === -1; } // remove all Svelte animations
|
|
310
|
+
);
|
|
311
|
+
var deleted = previous.length - next.length;
|
|
312
|
+
if (deleted) {
|
|
313
|
+
node.style.animation = next.join(', ');
|
|
314
|
+
active -= deleted;
|
|
315
|
+
if (!active)
|
|
316
|
+
clear_rules();
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
function clear_rules() {
|
|
320
|
+
raf(function () {
|
|
321
|
+
if (active)
|
|
322
|
+
return;
|
|
323
|
+
managed_styles.forEach(function (info) {
|
|
324
|
+
var stylesheet = info.stylesheet;
|
|
325
|
+
var i = stylesheet.cssRules.length;
|
|
326
|
+
while (i--)
|
|
327
|
+
stylesheet.deleteRule(i);
|
|
328
|
+
info.rules = {};
|
|
329
|
+
});
|
|
330
|
+
managed_styles.clear();
|
|
331
|
+
});
|
|
332
|
+
}
|
|
183
333
|
var current_component;
|
|
184
334
|
function set_current_component(component) {
|
|
185
335
|
current_component = component;
|
|
@@ -192,6 +342,9 @@ function get_current_component() {
|
|
|
192
342
|
function onMount(fn) {
|
|
193
343
|
get_current_component().$$.on_mount.push(fn);
|
|
194
344
|
}
|
|
345
|
+
function onDestroy(fn) {
|
|
346
|
+
get_current_component().$$.on_destroy.push(fn);
|
|
347
|
+
}
|
|
195
348
|
var dirty_components = [];
|
|
196
349
|
var binding_callbacks = [];
|
|
197
350
|
var render_callbacks = [];
|
|
@@ -276,6 +429,19 @@ function update($$) {
|
|
|
276
429
|
$$.after_update.forEach(add_render_callback);
|
|
277
430
|
}
|
|
278
431
|
}
|
|
432
|
+
var promise;
|
|
433
|
+
function wait() {
|
|
434
|
+
if (!promise) {
|
|
435
|
+
promise = Promise.resolve();
|
|
436
|
+
promise.then(function () {
|
|
437
|
+
promise = null;
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
return promise;
|
|
441
|
+
}
|
|
442
|
+
function dispatch(node, direction, kind) {
|
|
443
|
+
node.dispatchEvent(custom_event("" + (direction ? 'intro' : 'outro') + kind));
|
|
444
|
+
}
|
|
279
445
|
var outroing = new Set();
|
|
280
446
|
var outros;
|
|
281
447
|
function group_outros() {
|
|
@@ -313,6 +479,112 @@ function transition_out(block, local, detach, callback) {
|
|
|
313
479
|
block.o(local);
|
|
314
480
|
}
|
|
315
481
|
}
|
|
482
|
+
var null_transition = { duration: 0 };
|
|
483
|
+
function create_bidirectional_transition(node, fn, params, intro) {
|
|
484
|
+
var config = fn(node, params);
|
|
485
|
+
var t = intro ? 0 : 1;
|
|
486
|
+
var running_program = null;
|
|
487
|
+
var pending_program = null;
|
|
488
|
+
var animation_name = null;
|
|
489
|
+
function clear_animation() {
|
|
490
|
+
if (animation_name)
|
|
491
|
+
delete_rule(node, animation_name);
|
|
492
|
+
}
|
|
493
|
+
function init(program, duration) {
|
|
494
|
+
var d = (program.b - t);
|
|
495
|
+
duration *= Math.abs(d);
|
|
496
|
+
return {
|
|
497
|
+
a: t,
|
|
498
|
+
b: program.b,
|
|
499
|
+
d: d,
|
|
500
|
+
duration: duration,
|
|
501
|
+
start: program.start,
|
|
502
|
+
end: program.start + duration,
|
|
503
|
+
group: program.group
|
|
504
|
+
};
|
|
505
|
+
}
|
|
506
|
+
function go(b) {
|
|
507
|
+
var _a = config || null_transition, _b = _a.delay, delay = _b === void 0 ? 0 : _b, _c = _a.duration, duration = _c === void 0 ? 300 : _c, _d = _a.easing, easing = _d === void 0 ? identity : _d, _e = _a.tick, tick = _e === void 0 ? noop : _e, css = _a.css;
|
|
508
|
+
var program = {
|
|
509
|
+
start: now() + delay,
|
|
510
|
+
b: b
|
|
511
|
+
};
|
|
512
|
+
if (!b) {
|
|
513
|
+
// @ts-ignore todo: improve typings
|
|
514
|
+
program.group = outros;
|
|
515
|
+
outros.r += 1;
|
|
516
|
+
}
|
|
517
|
+
if (running_program || pending_program) {
|
|
518
|
+
pending_program = program;
|
|
519
|
+
}
|
|
520
|
+
else {
|
|
521
|
+
// if this is an intro, and there's a delay, we need to do
|
|
522
|
+
// an initial tick and/or apply CSS animation immediately
|
|
523
|
+
if (css) {
|
|
524
|
+
clear_animation();
|
|
525
|
+
animation_name = create_rule(node, t, b, duration, delay, easing, css);
|
|
526
|
+
}
|
|
527
|
+
if (b)
|
|
528
|
+
tick(0, 1);
|
|
529
|
+
running_program = init(program, duration);
|
|
530
|
+
add_render_callback(function () { return dispatch(node, b, 'start'); });
|
|
531
|
+
loop(function (now) {
|
|
532
|
+
if (pending_program && now > pending_program.start) {
|
|
533
|
+
running_program = init(pending_program, duration);
|
|
534
|
+
pending_program = null;
|
|
535
|
+
dispatch(node, running_program.b, 'start');
|
|
536
|
+
if (css) {
|
|
537
|
+
clear_animation();
|
|
538
|
+
animation_name = create_rule(node, t, running_program.b, running_program.duration, 0, easing, config.css);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
if (running_program) {
|
|
542
|
+
if (now >= running_program.end) {
|
|
543
|
+
tick(t = running_program.b, 1 - t);
|
|
544
|
+
dispatch(node, running_program.b, 'end');
|
|
545
|
+
if (!pending_program) {
|
|
546
|
+
// we're done
|
|
547
|
+
if (running_program.b) {
|
|
548
|
+
// intro — we can tidy up immediately
|
|
549
|
+
clear_animation();
|
|
550
|
+
}
|
|
551
|
+
else {
|
|
552
|
+
// outro — needs to be coordinated
|
|
553
|
+
if (!--running_program.group.r)
|
|
554
|
+
run_all(running_program.group.c);
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
running_program = null;
|
|
558
|
+
}
|
|
559
|
+
else if (now >= running_program.start) {
|
|
560
|
+
var p = now - running_program.start;
|
|
561
|
+
t = running_program.a + running_program.d * easing(p / running_program.duration);
|
|
562
|
+
tick(t, 1 - t);
|
|
563
|
+
}
|
|
564
|
+
}
|
|
565
|
+
return !!(running_program || pending_program);
|
|
566
|
+
});
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
return {
|
|
570
|
+
run: function (b) {
|
|
571
|
+
if (is_function(config)) {
|
|
572
|
+
wait().then(function () {
|
|
573
|
+
// @ts-ignore
|
|
574
|
+
config = config();
|
|
575
|
+
go(b);
|
|
576
|
+
});
|
|
577
|
+
}
|
|
578
|
+
else {
|
|
579
|
+
go(b);
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
end: function () {
|
|
583
|
+
clear_animation();
|
|
584
|
+
running_program = pending_program = null;
|
|
585
|
+
}
|
|
586
|
+
};
|
|
587
|
+
}
|
|
316
588
|
function bind(component, name, callback) {
|
|
317
589
|
var index = component.$$.props[name];
|
|
318
590
|
if (index !== undefined) {
|
|
@@ -456,8 +728,78 @@ var SvelteComponent = /** @class */ (function () {
|
|
|
456
728
|
};
|
|
457
729
|
return SvelteComponent;
|
|
458
730
|
}());
|
|
731
|
+
var subscriber_queue = [];
|
|
732
|
+
/**
|
|
733
|
+
* Create a `Writable` store that allows both updating and reading by subscription.
|
|
734
|
+
* @param {*=}value initial value
|
|
735
|
+
* @param {StartStopNotifier=}start start and stop notifications for subscriptions
|
|
736
|
+
*/
|
|
737
|
+
function writable(value, start) {
|
|
738
|
+
if (start === void 0) { start = noop; }
|
|
739
|
+
var stop;
|
|
740
|
+
var subscribers = new Set();
|
|
741
|
+
function set(new_value) {
|
|
742
|
+
var e_1, _a;
|
|
743
|
+
if (safe_not_equal(value, new_value)) {
|
|
744
|
+
value = new_value;
|
|
745
|
+
if (stop) { // store is ready
|
|
746
|
+
var run_queue = !subscriber_queue.length;
|
|
747
|
+
try {
|
|
748
|
+
for (var subscribers_1 = __values(subscribers), subscribers_1_1 = subscribers_1.next(); !subscribers_1_1.done; subscribers_1_1 = subscribers_1.next()) {
|
|
749
|
+
var subscriber = subscribers_1_1.value;
|
|
750
|
+
subscriber[1]();
|
|
751
|
+
subscriber_queue.push(subscriber, value);
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
755
|
+
finally {
|
|
756
|
+
try {
|
|
757
|
+
if (subscribers_1_1 && !subscribers_1_1.done && (_a = subscribers_1.return)) _a.call(subscribers_1);
|
|
758
|
+
}
|
|
759
|
+
finally { if (e_1) throw e_1.error; }
|
|
760
|
+
}
|
|
761
|
+
if (run_queue) {
|
|
762
|
+
for (var i = 0; i < subscriber_queue.length; i += 2) {
|
|
763
|
+
subscriber_queue[i][0](subscriber_queue[i + 1]);
|
|
764
|
+
}
|
|
765
|
+
subscriber_queue.length = 0;
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
function update(fn) {
|
|
771
|
+
set(fn(value));
|
|
772
|
+
}
|
|
773
|
+
function subscribe(run, invalidate) {
|
|
774
|
+
if (invalidate === void 0) { invalidate = noop; }
|
|
775
|
+
var subscriber = [run, invalidate];
|
|
776
|
+
subscribers.add(subscriber);
|
|
777
|
+
if (subscribers.size === 1) {
|
|
778
|
+
stop = start(set) || noop;
|
|
779
|
+
}
|
|
780
|
+
run(value);
|
|
781
|
+
return function () {
|
|
782
|
+
subscribers.delete(subscriber);
|
|
783
|
+
if (subscribers.size === 0) {
|
|
784
|
+
stop();
|
|
785
|
+
stop = null;
|
|
786
|
+
}
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
return { set: set, update: update, subscribe: subscribe };
|
|
790
|
+
}
|
|
791
|
+
var AppStore = writable({
|
|
792
|
+
initialValue: true,
|
|
793
|
+
customFields: [],
|
|
794
|
+
branding: {
|
|
795
|
+
logo: "",
|
|
796
|
+
colors: {
|
|
797
|
+
lightMode: {},
|
|
798
|
+
}
|
|
799
|
+
},
|
|
800
|
+
});
|
|
459
801
|
/* src/icons/LoadingIcon.svelte generated by Svelte v3.48.0 */
|
|
460
|
-
function create_fragment$
|
|
802
|
+
function create_fragment$v(ctx) {
|
|
461
803
|
var svg;
|
|
462
804
|
var path;
|
|
463
805
|
var animateTransform;
|
|
@@ -502,13 +844,13 @@ var LoadingIcon = /** @class */ (function (_super) {
|
|
|
502
844
|
__extends(LoadingIcon, _super);
|
|
503
845
|
function LoadingIcon(options) {
|
|
504
846
|
var _this = _super.call(this) || this;
|
|
505
|
-
init(_this, options, null, create_fragment$
|
|
847
|
+
init(_this, options, null, create_fragment$v, safe_not_equal, {});
|
|
506
848
|
return _this;
|
|
507
849
|
}
|
|
508
850
|
return LoadingIcon;
|
|
509
851
|
}(SvelteComponent));
|
|
510
852
|
/* src/components/Loader.svelte generated by Svelte v3.48.0 */
|
|
511
|
-
function create_fragment$
|
|
853
|
+
function create_fragment$u(ctx) {
|
|
512
854
|
var div;
|
|
513
855
|
var loadingicon;
|
|
514
856
|
var current;
|
|
@@ -546,13 +888,13 @@ var Loader = /** @class */ (function (_super) {
|
|
|
546
888
|
__extends(Loader, _super);
|
|
547
889
|
function Loader(options) {
|
|
548
890
|
var _this = _super.call(this) || this;
|
|
549
|
-
init(_this, options, null, create_fragment$
|
|
891
|
+
init(_this, options, null, create_fragment$u, safe_not_equal, {});
|
|
550
892
|
return _this;
|
|
551
893
|
}
|
|
552
894
|
return Loader;
|
|
553
895
|
}(SvelteComponent));
|
|
554
896
|
/* src/icons/CloseIcon.svelte generated by Svelte v3.48.0 */
|
|
555
|
-
function create_fragment$
|
|
897
|
+
function create_fragment$t(ctx) {
|
|
556
898
|
var svg;
|
|
557
899
|
var path;
|
|
558
900
|
return {
|
|
@@ -584,13 +926,13 @@ var CloseIcon = /** @class */ (function (_super) {
|
|
|
584
926
|
__extends(CloseIcon, _super);
|
|
585
927
|
function CloseIcon(options) {
|
|
586
928
|
var _this = _super.call(this) || this;
|
|
587
|
-
init(_this, options, null, create_fragment$
|
|
929
|
+
init(_this, options, null, create_fragment$t, safe_not_equal, {});
|
|
588
930
|
return _this;
|
|
589
931
|
}
|
|
590
932
|
return CloseIcon;
|
|
591
933
|
}(SvelteComponent));
|
|
592
934
|
/* src/components/CloseButton.svelte generated by Svelte v3.48.0 */
|
|
593
|
-
function create_fragment$
|
|
935
|
+
function create_fragment$s(ctx) {
|
|
594
936
|
var div;
|
|
595
937
|
var button;
|
|
596
938
|
var closeicon;
|
|
@@ -641,7 +983,7 @@ function create_fragment$q(ctx) {
|
|
|
641
983
|
}
|
|
642
984
|
};
|
|
643
985
|
}
|
|
644
|
-
function instance$
|
|
986
|
+
function instance$f($$self, $$props, $$invalidate) {
|
|
645
987
|
var closeModal = $$props.closeModal;
|
|
646
988
|
$$self.$$set = function ($$props) {
|
|
647
989
|
if ('closeModal' in $$props)
|
|
@@ -653,13 +995,13 @@ var CloseButton = /** @class */ (function (_super) {
|
|
|
653
995
|
__extends(CloseButton, _super);
|
|
654
996
|
function CloseButton(options) {
|
|
655
997
|
var _this = _super.call(this) || this;
|
|
656
|
-
init(_this, options, instance$
|
|
998
|
+
init(_this, options, instance$f, create_fragment$s, safe_not_equal, { closeModal: 0 });
|
|
657
999
|
return _this;
|
|
658
1000
|
}
|
|
659
1001
|
return CloseButton;
|
|
660
1002
|
}(SvelteComponent));
|
|
661
1003
|
/* src/icons/MemberstackIcon.svelte generated by Svelte v3.48.0 */
|
|
662
|
-
function create_fragment$
|
|
1004
|
+
function create_fragment$r(ctx) {
|
|
663
1005
|
var svg;
|
|
664
1006
|
var path0;
|
|
665
1007
|
var path1;
|
|
@@ -713,26 +1055,22 @@ var MemberstackIcon = /** @class */ (function (_super) {
|
|
|
713
1055
|
__extends(MemberstackIcon, _super);
|
|
714
1056
|
function MemberstackIcon(options) {
|
|
715
1057
|
var _this = _super.call(this) || this;
|
|
716
|
-
init(_this, options, null, create_fragment$
|
|
1058
|
+
init(_this, options, null, create_fragment$r, safe_not_equal, {});
|
|
717
1059
|
return _this;
|
|
718
1060
|
}
|
|
719
1061
|
return MemberstackIcon;
|
|
720
1062
|
}(SvelteComponent));
|
|
721
1063
|
/* src/components/FigureElement.svelte generated by Svelte v3.48.0 */
|
|
722
|
-
function
|
|
723
|
-
var figure;
|
|
1064
|
+
function create_else_block$3(ctx) {
|
|
724
1065
|
var memberstackicon;
|
|
725
1066
|
var current;
|
|
726
1067
|
memberstackicon = new MemberstackIcon({});
|
|
727
1068
|
return {
|
|
728
1069
|
c: function () {
|
|
729
|
-
figure = element("figure");
|
|
730
1070
|
create_component(memberstackicon.$$.fragment);
|
|
731
|
-
attr(figure, "class", "ms-modal__figure");
|
|
732
1071
|
},
|
|
733
1072
|
m: function (target, anchor) {
|
|
734
|
-
|
|
735
|
-
mount_component(memberstackicon, figure, null);
|
|
1073
|
+
mount_component(memberstackicon, target, anchor);
|
|
736
1074
|
current = true;
|
|
737
1075
|
},
|
|
738
1076
|
p: noop,
|
|
@@ -746,24 +1084,128 @@ function create_fragment$o(ctx) {
|
|
|
746
1084
|
transition_out(memberstackicon.$$.fragment, local);
|
|
747
1085
|
current = false;
|
|
748
1086
|
},
|
|
1087
|
+
d: function (detaching) {
|
|
1088
|
+
destroy_component(memberstackicon, detaching);
|
|
1089
|
+
}
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
// (13:2) {#if app.branding.logo}
|
|
1093
|
+
function create_if_block$a(ctx) {
|
|
1094
|
+
var img;
|
|
1095
|
+
var img_src_value;
|
|
1096
|
+
var img_alt_value;
|
|
1097
|
+
return {
|
|
1098
|
+
c: function () {
|
|
1099
|
+
img = element("img");
|
|
1100
|
+
if (!src_url_equal(img.src, img_src_value = /*app*/ ctx[0].branding.logo))
|
|
1101
|
+
attr(img, "src", img_src_value);
|
|
1102
|
+
attr(img, "alt", img_alt_value = /*app*/ ctx[0].name);
|
|
1103
|
+
attr(img, "data-cy", "logo");
|
|
1104
|
+
},
|
|
1105
|
+
m: function (target, anchor) {
|
|
1106
|
+
insert(target, img, anchor);
|
|
1107
|
+
},
|
|
1108
|
+
p: function (ctx, dirty) {
|
|
1109
|
+
if (dirty & /*app*/ 1 && !src_url_equal(img.src, img_src_value = /*app*/ ctx[0].branding.logo)) {
|
|
1110
|
+
attr(img, "src", img_src_value);
|
|
1111
|
+
}
|
|
1112
|
+
if (dirty & /*app*/ 1 && img_alt_value !== (img_alt_value = /*app*/ ctx[0].name)) {
|
|
1113
|
+
attr(img, "alt", img_alt_value);
|
|
1114
|
+
}
|
|
1115
|
+
},
|
|
1116
|
+
i: noop,
|
|
1117
|
+
o: noop,
|
|
1118
|
+
d: function (detaching) {
|
|
1119
|
+
if (detaching)
|
|
1120
|
+
detach(img);
|
|
1121
|
+
}
|
|
1122
|
+
};
|
|
1123
|
+
}
|
|
1124
|
+
function create_fragment$q(ctx) {
|
|
1125
|
+
var figure;
|
|
1126
|
+
var current_block_type_index;
|
|
1127
|
+
var if_block;
|
|
1128
|
+
var current;
|
|
1129
|
+
var if_block_creators = [create_if_block$a, create_else_block$3];
|
|
1130
|
+
var if_blocks = [];
|
|
1131
|
+
function select_block_type(ctx, dirty) {
|
|
1132
|
+
if ( /*app*/ctx[0].branding.logo)
|
|
1133
|
+
return 0;
|
|
1134
|
+
return 1;
|
|
1135
|
+
}
|
|
1136
|
+
current_block_type_index = select_block_type(ctx);
|
|
1137
|
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
1138
|
+
return {
|
|
1139
|
+
c: function () {
|
|
1140
|
+
figure = element("figure");
|
|
1141
|
+
if_block.c();
|
|
1142
|
+
attr(figure, "class", "ms-modal__figure");
|
|
1143
|
+
},
|
|
1144
|
+
m: function (target, anchor) {
|
|
1145
|
+
insert(target, figure, anchor);
|
|
1146
|
+
if_blocks[current_block_type_index].m(figure, null);
|
|
1147
|
+
current = true;
|
|
1148
|
+
},
|
|
1149
|
+
p: function (ctx, _a) {
|
|
1150
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
1151
|
+
var previous_block_index = current_block_type_index;
|
|
1152
|
+
current_block_type_index = select_block_type(ctx);
|
|
1153
|
+
if (current_block_type_index === previous_block_index) {
|
|
1154
|
+
if_blocks[current_block_type_index].p(ctx, dirty);
|
|
1155
|
+
}
|
|
1156
|
+
else {
|
|
1157
|
+
group_outros();
|
|
1158
|
+
transition_out(if_blocks[previous_block_index], 1, 1, function () {
|
|
1159
|
+
if_blocks[previous_block_index] = null;
|
|
1160
|
+
});
|
|
1161
|
+
check_outros();
|
|
1162
|
+
if_block = if_blocks[current_block_type_index];
|
|
1163
|
+
if (!if_block) {
|
|
1164
|
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
1165
|
+
if_block.c();
|
|
1166
|
+
}
|
|
1167
|
+
else {
|
|
1168
|
+
if_block.p(ctx, dirty);
|
|
1169
|
+
}
|
|
1170
|
+
transition_in(if_block, 1);
|
|
1171
|
+
if_block.m(figure, null);
|
|
1172
|
+
}
|
|
1173
|
+
},
|
|
1174
|
+
i: function (local) {
|
|
1175
|
+
if (current)
|
|
1176
|
+
return;
|
|
1177
|
+
transition_in(if_block);
|
|
1178
|
+
current = true;
|
|
1179
|
+
},
|
|
1180
|
+
o: function (local) {
|
|
1181
|
+
transition_out(if_block);
|
|
1182
|
+
current = false;
|
|
1183
|
+
},
|
|
749
1184
|
d: function (detaching) {
|
|
750
1185
|
if (detaching)
|
|
751
1186
|
detach(figure);
|
|
752
|
-
|
|
1187
|
+
if_blocks[current_block_type_index].d();
|
|
753
1188
|
}
|
|
754
1189
|
};
|
|
755
1190
|
}
|
|
1191
|
+
function instance$e($$self, $$props, $$invalidate) {
|
|
1192
|
+
var app = {};
|
|
1193
|
+
AppStore.subscribe(function (data) {
|
|
1194
|
+
$$invalidate(0, app = data);
|
|
1195
|
+
});
|
|
1196
|
+
return [app];
|
|
1197
|
+
}
|
|
756
1198
|
var FigureElement = /** @class */ (function (_super) {
|
|
757
1199
|
__extends(FigureElement, _super);
|
|
758
1200
|
function FigureElement(options) {
|
|
759
1201
|
var _this = _super.call(this) || this;
|
|
760
|
-
init(_this, options,
|
|
1202
|
+
init(_this, options, instance$e, create_fragment$q, safe_not_equal, {});
|
|
761
1203
|
return _this;
|
|
762
1204
|
}
|
|
763
1205
|
return FigureElement;
|
|
764
1206
|
}(SvelteComponent));
|
|
765
1207
|
/* src/components/SubmitButton.svelte generated by Svelte v3.48.0 */
|
|
766
|
-
function create_else_block$
|
|
1208
|
+
function create_else_block$2(ctx) {
|
|
767
1209
|
var button;
|
|
768
1210
|
var loadingicon;
|
|
769
1211
|
var current;
|
|
@@ -774,6 +1216,7 @@ function create_else_block$1(ctx) {
|
|
|
774
1216
|
create_component(loadingicon.$$.fragment);
|
|
775
1217
|
attr(button, "class", "ms-form__button");
|
|
776
1218
|
attr(button, "type", "button");
|
|
1219
|
+
set_style(button, "background-color", /*buttonColor*/ ctx[2]);
|
|
777
1220
|
button.disabled = true;
|
|
778
1221
|
},
|
|
779
1222
|
m: function (target, anchor) {
|
|
@@ -781,7 +1224,11 @@ function create_else_block$1(ctx) {
|
|
|
781
1224
|
mount_component(loadingicon, button, null);
|
|
782
1225
|
current = true;
|
|
783
1226
|
},
|
|
784
|
-
p:
|
|
1227
|
+
p: function (ctx, dirty) {
|
|
1228
|
+
if (!current || dirty & /*buttonColor*/ 4) {
|
|
1229
|
+
set_style(button, "background-color", /*buttonColor*/ ctx[2]);
|
|
1230
|
+
}
|
|
1231
|
+
},
|
|
785
1232
|
i: function (local) {
|
|
786
1233
|
if (current)
|
|
787
1234
|
return;
|
|
@@ -799,8 +1246,8 @@ function create_else_block$1(ctx) {
|
|
|
799
1246
|
}
|
|
800
1247
|
};
|
|
801
1248
|
}
|
|
802
|
-
// (
|
|
803
|
-
function create_if_block$
|
|
1249
|
+
// (15:2) {#if !isLoading}
|
|
1250
|
+
function create_if_block$9(ctx) {
|
|
804
1251
|
var button;
|
|
805
1252
|
var t;
|
|
806
1253
|
return {
|
|
@@ -809,6 +1256,7 @@ function create_if_block$6(ctx) {
|
|
|
809
1256
|
t = text(/*buttonText*/ ctx[0]);
|
|
810
1257
|
attr(button, "class", "ms-form__button");
|
|
811
1258
|
attr(button, "type", "submit");
|
|
1259
|
+
set_style(button, "background-color", /*buttonColor*/ ctx[2]);
|
|
812
1260
|
},
|
|
813
1261
|
m: function (target, anchor) {
|
|
814
1262
|
insert(target, button, anchor);
|
|
@@ -817,6 +1265,9 @@ function create_if_block$6(ctx) {
|
|
|
817
1265
|
p: function (ctx, dirty) {
|
|
818
1266
|
if (dirty & /*buttonText*/ 1)
|
|
819
1267
|
set_data(t, /*buttonText*/ ctx[0]);
|
|
1268
|
+
if (dirty & /*buttonColor*/ 4) {
|
|
1269
|
+
set_style(button, "background-color", /*buttonColor*/ ctx[2]);
|
|
1270
|
+
}
|
|
820
1271
|
},
|
|
821
1272
|
i: noop,
|
|
822
1273
|
o: noop,
|
|
@@ -826,12 +1277,12 @@ function create_if_block$6(ctx) {
|
|
|
826
1277
|
}
|
|
827
1278
|
};
|
|
828
1279
|
}
|
|
829
|
-
function create_fragment$
|
|
1280
|
+
function create_fragment$p(ctx) {
|
|
830
1281
|
var div;
|
|
831
1282
|
var current_block_type_index;
|
|
832
1283
|
var if_block;
|
|
833
1284
|
var current;
|
|
834
|
-
var if_block_creators = [create_if_block$
|
|
1285
|
+
var if_block_creators = [create_if_block$9, create_else_block$2];
|
|
835
1286
|
var if_blocks = [];
|
|
836
1287
|
function select_block_type(ctx, dirty) {
|
|
837
1288
|
if (!ctx[1])
|
|
@@ -892,28 +1343,34 @@ function create_fragment$n(ctx) {
|
|
|
892
1343
|
}
|
|
893
1344
|
};
|
|
894
1345
|
}
|
|
895
|
-
function instance$
|
|
1346
|
+
function instance$d($$self, $$props, $$invalidate) {
|
|
1347
|
+
var $app;
|
|
1348
|
+
component_subscribe($$self, AppStore, function ($$value) { return $$invalidate(3, $app = $$value); });
|
|
896
1349
|
var _a = $$props.buttonText, buttonText = _a === void 0 ? "Submit" : _a;
|
|
897
1350
|
var _b = $$props.isLoading, isLoading = _b === void 0 ? false : _b;
|
|
1351
|
+
var buttonColor = "rgb(41, 98, 255)";
|
|
1352
|
+
if ($app.branding.colors.lightMode.primaryButton) {
|
|
1353
|
+
buttonColor = $app.branding.colors.lightMode.primaryButton;
|
|
1354
|
+
}
|
|
898
1355
|
$$self.$$set = function ($$props) {
|
|
899
1356
|
if ('buttonText' in $$props)
|
|
900
1357
|
$$invalidate(0, buttonText = $$props.buttonText);
|
|
901
1358
|
if ('isLoading' in $$props)
|
|
902
1359
|
$$invalidate(1, isLoading = $$props.isLoading);
|
|
903
1360
|
};
|
|
904
|
-
return [buttonText, isLoading];
|
|
1361
|
+
return [buttonText, isLoading, buttonColor];
|
|
905
1362
|
}
|
|
906
1363
|
var SubmitButton = /** @class */ (function (_super) {
|
|
907
1364
|
__extends(SubmitButton, _super);
|
|
908
1365
|
function SubmitButton(options) {
|
|
909
1366
|
var _this = _super.call(this) || this;
|
|
910
|
-
init(_this, options, instance$
|
|
1367
|
+
init(_this, options, instance$d, create_fragment$p, safe_not_equal, { buttonText: 0, isLoading: 1 });
|
|
911
1368
|
return _this;
|
|
912
1369
|
}
|
|
913
1370
|
return SubmitButton;
|
|
914
1371
|
}(SvelteComponent));
|
|
915
1372
|
/* src/icons/ErrorIcon.svelte generated by Svelte v3.48.0 */
|
|
916
|
-
function create_fragment$
|
|
1373
|
+
function create_fragment$o(ctx) {
|
|
917
1374
|
var svg;
|
|
918
1375
|
var path;
|
|
919
1376
|
return {
|
|
@@ -943,13 +1400,13 @@ var ErrorIcon = /** @class */ (function (_super) {
|
|
|
943
1400
|
__extends(ErrorIcon, _super);
|
|
944
1401
|
function ErrorIcon(options) {
|
|
945
1402
|
var _this = _super.call(this) || this;
|
|
946
|
-
init(_this, options, null, create_fragment$
|
|
1403
|
+
init(_this, options, null, create_fragment$o, safe_not_equal, {});
|
|
947
1404
|
return _this;
|
|
948
1405
|
}
|
|
949
1406
|
return ErrorIcon;
|
|
950
1407
|
}(SvelteComponent));
|
|
951
1408
|
/* src/components/EmailInput.svelte generated by Svelte v3.48.0 */
|
|
952
|
-
function create_if_block$
|
|
1409
|
+
function create_if_block$8(ctx) {
|
|
953
1410
|
var div;
|
|
954
1411
|
var erroricon;
|
|
955
1412
|
var t0;
|
|
@@ -989,7 +1446,7 @@ function create_if_block$5(ctx) {
|
|
|
989
1446
|
}
|
|
990
1447
|
};
|
|
991
1448
|
}
|
|
992
|
-
function create_fragment$
|
|
1449
|
+
function create_fragment$n(ctx) {
|
|
993
1450
|
var div;
|
|
994
1451
|
var label;
|
|
995
1452
|
var t1;
|
|
@@ -998,7 +1455,7 @@ function create_fragment$l(ctx) {
|
|
|
998
1455
|
var current;
|
|
999
1456
|
var mounted;
|
|
1000
1457
|
var dispose;
|
|
1001
|
-
var if_block = /*inputError*/ ctx[
|
|
1458
|
+
var if_block = /*inputError*/ ctx[1] && create_if_block$8();
|
|
1002
1459
|
return {
|
|
1003
1460
|
c: function () {
|
|
1004
1461
|
div = element("div");
|
|
@@ -1023,26 +1480,33 @@ function create_fragment$l(ctx) {
|
|
|
1023
1480
|
append(div, label);
|
|
1024
1481
|
append(div, t1);
|
|
1025
1482
|
append(div, input);
|
|
1483
|
+
set_input_value(input, /*emailValue*/ ctx[0]);
|
|
1026
1484
|
append(div, t2);
|
|
1027
1485
|
if (if_block)
|
|
1028
1486
|
if_block.m(div, null);
|
|
1029
1487
|
current = true;
|
|
1030
1488
|
if (!mounted) {
|
|
1031
|
-
dispose =
|
|
1489
|
+
dispose = [
|
|
1490
|
+
listen(input, "blur", /*validateField*/ ctx[2]),
|
|
1491
|
+
listen(input, "input", /*input_input_handler*/ ctx[4])
|
|
1492
|
+
];
|
|
1032
1493
|
mounted = true;
|
|
1033
1494
|
}
|
|
1034
1495
|
},
|
|
1035
1496
|
p: function (ctx, _a) {
|
|
1036
1497
|
var _b = __read(_a, 1), dirty = _b[0];
|
|
1037
|
-
if ( /*
|
|
1498
|
+
if (dirty & /*emailValue*/ 1 && input.value !== /*emailValue*/ ctx[0]) {
|
|
1499
|
+
set_input_value(input, /*emailValue*/ ctx[0]);
|
|
1500
|
+
}
|
|
1501
|
+
if ( /*inputError*/ctx[1]) {
|
|
1038
1502
|
if (if_block) {
|
|
1039
1503
|
if_block.p(ctx, dirty);
|
|
1040
|
-
if (dirty & /*inputError*/
|
|
1504
|
+
if (dirty & /*inputError*/ 2) {
|
|
1041
1505
|
transition_in(if_block, 1);
|
|
1042
1506
|
}
|
|
1043
1507
|
}
|
|
1044
1508
|
else {
|
|
1045
|
-
if_block = create_if_block$
|
|
1509
|
+
if_block = create_if_block$8();
|
|
1046
1510
|
if_block.c();
|
|
1047
1511
|
transition_in(if_block, 1);
|
|
1048
1512
|
if_block.m(div, null);
|
|
@@ -1072,46 +1536,51 @@ function create_fragment$l(ctx) {
|
|
|
1072
1536
|
if (if_block)
|
|
1073
1537
|
if_block.d();
|
|
1074
1538
|
mounted = false;
|
|
1075
|
-
dispose
|
|
1539
|
+
run_all(dispose);
|
|
1076
1540
|
}
|
|
1077
1541
|
};
|
|
1078
1542
|
}
|
|
1079
1543
|
var emailLabel = "Email Address";
|
|
1080
1544
|
var errorMessage$1 = "Please enter a valid email address";
|
|
1081
|
-
function instance$
|
|
1545
|
+
function instance$c($$self, $$props, $$invalidate) {
|
|
1082
1546
|
var _a = $$props.emailInputValid, emailInputValid = _a === void 0 ? false : _a;
|
|
1547
|
+
var emailValue = $$props.emailValue;
|
|
1083
1548
|
var inputError = false;
|
|
1084
1549
|
var validateField = function (e) {
|
|
1085
1550
|
var emailInput = e.target;
|
|
1086
|
-
var hasValidEmail = (
|
|
1087
|
-
? true
|
|
1088
|
-
: false;
|
|
1551
|
+
var hasValidEmail = (/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/).test(emailInput.value);
|
|
1089
1552
|
if (!hasValidEmail && e.target.value.length > 0) {
|
|
1090
|
-
$$invalidate(
|
|
1091
|
-
$$invalidate(
|
|
1553
|
+
$$invalidate(3, emailInputValid = false);
|
|
1554
|
+
$$invalidate(1, inputError = true);
|
|
1092
1555
|
}
|
|
1093
1556
|
else {
|
|
1094
|
-
$$invalidate(
|
|
1095
|
-
$$invalidate(
|
|
1557
|
+
$$invalidate(3, emailInputValid = true);
|
|
1558
|
+
$$invalidate(1, inputError = false);
|
|
1096
1559
|
}
|
|
1097
1560
|
};
|
|
1561
|
+
function input_input_handler() {
|
|
1562
|
+
emailValue = this.value;
|
|
1563
|
+
$$invalidate(0, emailValue);
|
|
1564
|
+
}
|
|
1098
1565
|
$$self.$$set = function ($$props) {
|
|
1099
1566
|
if ('emailInputValid' in $$props)
|
|
1100
|
-
$$invalidate(
|
|
1567
|
+
$$invalidate(3, emailInputValid = $$props.emailInputValid);
|
|
1568
|
+
if ('emailValue' in $$props)
|
|
1569
|
+
$$invalidate(0, emailValue = $$props.emailValue);
|
|
1101
1570
|
};
|
|
1102
|
-
return [inputError, validateField, emailInputValid];
|
|
1571
|
+
return [emailValue, inputError, validateField, emailInputValid, input_input_handler];
|
|
1103
1572
|
}
|
|
1104
1573
|
var EmailInput = /** @class */ (function (_super) {
|
|
1105
1574
|
__extends(EmailInput, _super);
|
|
1106
1575
|
function EmailInput(options) {
|
|
1107
1576
|
var _this = _super.call(this) || this;
|
|
1108
|
-
init(_this, options, instance$
|
|
1577
|
+
init(_this, options, instance$c, create_fragment$n, safe_not_equal, { emailInputValid: 3, emailValue: 0 });
|
|
1109
1578
|
return _this;
|
|
1110
1579
|
}
|
|
1111
1580
|
return EmailInput;
|
|
1112
1581
|
}(SvelteComponent));
|
|
1113
1582
|
/* src/icons/EyeIcon.svelte generated by Svelte v3.48.0 */
|
|
1114
|
-
function create_fragment$
|
|
1583
|
+
function create_fragment$m(ctx) {
|
|
1115
1584
|
var svg;
|
|
1116
1585
|
var path;
|
|
1117
1586
|
return {
|
|
@@ -1142,13 +1611,13 @@ var EyeIcon = /** @class */ (function (_super) {
|
|
|
1142
1611
|
__extends(EyeIcon, _super);
|
|
1143
1612
|
function EyeIcon(options) {
|
|
1144
1613
|
var _this = _super.call(this) || this;
|
|
1145
|
-
init(_this, options, null, create_fragment$
|
|
1614
|
+
init(_this, options, null, create_fragment$m, safe_not_equal, {});
|
|
1146
1615
|
return _this;
|
|
1147
1616
|
}
|
|
1148
1617
|
return EyeIcon;
|
|
1149
1618
|
}(SvelteComponent));
|
|
1150
1619
|
/* src/icons/EyeSlashIcon.svelte generated by Svelte v3.48.0 */
|
|
1151
|
-
function create_fragment$
|
|
1620
|
+
function create_fragment$l(ctx) {
|
|
1152
1621
|
var svg;
|
|
1153
1622
|
var path;
|
|
1154
1623
|
return {
|
|
@@ -1179,7 +1648,7 @@ var EyeSlashIcon = /** @class */ (function (_super) {
|
|
|
1179
1648
|
__extends(EyeSlashIcon, _super);
|
|
1180
1649
|
function EyeSlashIcon(options) {
|
|
1181
1650
|
var _this = _super.call(this) || this;
|
|
1182
|
-
init(_this, options, null, create_fragment$
|
|
1651
|
+
init(_this, options, null, create_fragment$l, safe_not_equal, {});
|
|
1183
1652
|
return _this;
|
|
1184
1653
|
}
|
|
1185
1654
|
return EyeSlashIcon;
|
|
@@ -1205,7 +1674,7 @@ function create_if_block_2$2(ctx) {
|
|
|
1205
1674
|
insert(target, div, anchor);
|
|
1206
1675
|
append(div, button);
|
|
1207
1676
|
if (!mounted) {
|
|
1208
|
-
dispose = listen(button, "click", /*click_handler*/ ctx[
|
|
1677
|
+
dispose = listen(button, "click", /*click_handler*/ ctx[12]);
|
|
1209
1678
|
mounted = true;
|
|
1210
1679
|
}
|
|
1211
1680
|
},
|
|
@@ -1218,8 +1687,8 @@ function create_if_block_2$2(ctx) {
|
|
|
1218
1687
|
}
|
|
1219
1688
|
};
|
|
1220
1689
|
}
|
|
1221
|
-
// (
|
|
1222
|
-
function create_else_block(ctx) {
|
|
1690
|
+
// (57:6) {:else}
|
|
1691
|
+
function create_else_block$1(ctx) {
|
|
1223
1692
|
var eyeslashicon;
|
|
1224
1693
|
var current;
|
|
1225
1694
|
eyeslashicon = new EyeSlashIcon({});
|
|
@@ -1246,8 +1715,8 @@ function create_else_block(ctx) {
|
|
|
1246
1715
|
}
|
|
1247
1716
|
};
|
|
1248
1717
|
}
|
|
1249
|
-
// (
|
|
1250
|
-
function create_if_block_1$
|
|
1718
|
+
// (55:6) {#if !passwordVisible}
|
|
1719
|
+
function create_if_block_1$3(ctx) {
|
|
1251
1720
|
var eyeicon;
|
|
1252
1721
|
var current;
|
|
1253
1722
|
eyeicon = new EyeIcon({});
|
|
@@ -1274,8 +1743,8 @@ function create_if_block_1$2(ctx) {
|
|
|
1274
1743
|
}
|
|
1275
1744
|
};
|
|
1276
1745
|
}
|
|
1277
|
-
// (
|
|
1278
|
-
function create_if_block$
|
|
1746
|
+
// (62:2) {#if inputError}
|
|
1747
|
+
function create_if_block$7(ctx) {
|
|
1279
1748
|
var div;
|
|
1280
1749
|
var erroricon;
|
|
1281
1750
|
var t0;
|
|
@@ -1315,7 +1784,7 @@ function create_if_block$4(ctx) {
|
|
|
1315
1784
|
}
|
|
1316
1785
|
};
|
|
1317
1786
|
}
|
|
1318
|
-
function create_fragment$
|
|
1787
|
+
function create_fragment$k(ctx) {
|
|
1319
1788
|
var div3;
|
|
1320
1789
|
var div0;
|
|
1321
1790
|
var label;
|
|
@@ -1324,6 +1793,7 @@ function create_fragment$i(ctx) {
|
|
|
1324
1793
|
var t2;
|
|
1325
1794
|
var div2;
|
|
1326
1795
|
var input;
|
|
1796
|
+
var input_value_value;
|
|
1327
1797
|
var t3;
|
|
1328
1798
|
var div1;
|
|
1329
1799
|
var current_block_type_index;
|
|
@@ -1332,23 +1802,23 @@ function create_fragment$i(ctx) {
|
|
|
1332
1802
|
var current;
|
|
1333
1803
|
var mounted;
|
|
1334
1804
|
var dispose;
|
|
1335
|
-
var if_block0 = /*showForgotPasswordLabel*/ ctx[
|
|
1336
|
-
var if_block_creators = [create_if_block_1$
|
|
1805
|
+
var if_block0 = /*showForgotPasswordLabel*/ ctx[2] && create_if_block_2$2(ctx);
|
|
1806
|
+
var if_block_creators = [create_if_block_1$3, create_else_block$1];
|
|
1337
1807
|
var if_blocks = [];
|
|
1338
1808
|
function select_block_type(ctx, dirty) {
|
|
1339
|
-
if (!ctx[
|
|
1809
|
+
if (!ctx[5])
|
|
1340
1810
|
return 0;
|
|
1341
1811
|
return 1;
|
|
1342
1812
|
}
|
|
1343
1813
|
current_block_type_index = select_block_type(ctx);
|
|
1344
1814
|
if_block1 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
1345
|
-
var if_block2 = /*inputError*/ ctx[
|
|
1815
|
+
var if_block2 = /*inputError*/ ctx[6] && create_if_block$7();
|
|
1346
1816
|
return {
|
|
1347
1817
|
c: function () {
|
|
1348
1818
|
div3 = element("div");
|
|
1349
1819
|
div0 = element("div");
|
|
1350
1820
|
label = element("label");
|
|
1351
|
-
t0 = text(/*passwordLabel*/ ctx[
|
|
1821
|
+
t0 = text(/*passwordLabel*/ ctx[3]);
|
|
1352
1822
|
t1 = space();
|
|
1353
1823
|
if (if_block0)
|
|
1354
1824
|
if_block0.c();
|
|
@@ -1365,8 +1835,9 @@ function create_fragment$i(ctx) {
|
|
|
1365
1835
|
attr(label, "for", "psw");
|
|
1366
1836
|
attr(div0, "class", "ms-form__flex");
|
|
1367
1837
|
attr(input, "class", "ms-form__input ms-form__input--password");
|
|
1368
|
-
attr(input, "type", /*type*/ ctx[
|
|
1369
|
-
attr(input, "placeholder", /*passwordPlaceholder*/ ctx[
|
|
1838
|
+
attr(input, "type", /*type*/ ctx[7]);
|
|
1839
|
+
attr(input, "placeholder", /*passwordPlaceholder*/ ctx[4]);
|
|
1840
|
+
input.value = input_value_value = /*passwordValue*/ ctx[0] || "";
|
|
1370
1841
|
attr(input, "name", "psw");
|
|
1371
1842
|
attr(input, "autocomplete", "off");
|
|
1372
1843
|
input.required = true;
|
|
@@ -1395,17 +1866,18 @@ function create_fragment$i(ctx) {
|
|
|
1395
1866
|
current = true;
|
|
1396
1867
|
if (!mounted) {
|
|
1397
1868
|
dispose = [
|
|
1398
|
-
listen(input, "
|
|
1399
|
-
listen(
|
|
1869
|
+
listen(input, "input", /*handleInput*/ ctx[9]),
|
|
1870
|
+
listen(input, "blur", /*validateField*/ ctx[10]),
|
|
1871
|
+
listen(div1, "click", /*togglePassword*/ ctx[8])
|
|
1400
1872
|
];
|
|
1401
1873
|
mounted = true;
|
|
1402
1874
|
}
|
|
1403
1875
|
},
|
|
1404
1876
|
p: function (ctx, _a) {
|
|
1405
1877
|
var _b = __read(_a, 1), dirty = _b[0];
|
|
1406
|
-
if (!current || dirty & /*passwordLabel*/
|
|
1407
|
-
set_data(t0, /*passwordLabel*/ ctx[
|
|
1408
|
-
if ( /*showForgotPasswordLabel*/ctx[
|
|
1878
|
+
if (!current || dirty & /*passwordLabel*/ 8)
|
|
1879
|
+
set_data(t0, /*passwordLabel*/ ctx[3]);
|
|
1880
|
+
if ( /*showForgotPasswordLabel*/ctx[2]) {
|
|
1409
1881
|
if (if_block0) {
|
|
1410
1882
|
if_block0.p(ctx, dirty);
|
|
1411
1883
|
}
|
|
@@ -1419,11 +1891,14 @@ function create_fragment$i(ctx) {
|
|
|
1419
1891
|
if_block0.d(1);
|
|
1420
1892
|
if_block0 = null;
|
|
1421
1893
|
}
|
|
1422
|
-
if (!current || dirty & /*type*/
|
|
1423
|
-
attr(input, "type", /*type*/ ctx[
|
|
1894
|
+
if (!current || dirty & /*type*/ 128) {
|
|
1895
|
+
attr(input, "type", /*type*/ ctx[7]);
|
|
1896
|
+
}
|
|
1897
|
+
if (!current || dirty & /*passwordPlaceholder*/ 16) {
|
|
1898
|
+
attr(input, "placeholder", /*passwordPlaceholder*/ ctx[4]);
|
|
1424
1899
|
}
|
|
1425
|
-
if (!current || dirty & /*
|
|
1426
|
-
|
|
1900
|
+
if (!current || dirty & /*passwordValue*/ 1 && input_value_value !== (input_value_value = /*passwordValue*/ ctx[0] || "") && input.value !== input_value_value) {
|
|
1901
|
+
input.value = input_value_value;
|
|
1427
1902
|
}
|
|
1428
1903
|
var previous_block_index = current_block_type_index;
|
|
1429
1904
|
current_block_type_index = select_block_type(ctx);
|
|
@@ -1441,15 +1916,15 @@ function create_fragment$i(ctx) {
|
|
|
1441
1916
|
transition_in(if_block1, 1);
|
|
1442
1917
|
if_block1.m(div1, null);
|
|
1443
1918
|
}
|
|
1444
|
-
if ( /*inputError*/ctx[
|
|
1919
|
+
if ( /*inputError*/ctx[6]) {
|
|
1445
1920
|
if (if_block2) {
|
|
1446
1921
|
if_block2.p(ctx, dirty);
|
|
1447
|
-
if (dirty & /*inputError*/
|
|
1922
|
+
if (dirty & /*inputError*/ 64) {
|
|
1448
1923
|
transition_in(if_block2, 1);
|
|
1449
1924
|
}
|
|
1450
1925
|
}
|
|
1451
1926
|
else {
|
|
1452
|
-
if_block2 = create_if_block$
|
|
1927
|
+
if_block2 = create_if_block$7();
|
|
1453
1928
|
if_block2.c();
|
|
1454
1929
|
transition_in(if_block2, 1);
|
|
1455
1930
|
if_block2.m(div3, null);
|
|
@@ -1489,48 +1964,55 @@ function create_fragment$i(ctx) {
|
|
|
1489
1964
|
};
|
|
1490
1965
|
}
|
|
1491
1966
|
var errorMessage = "Minimum 8 characters required";
|
|
1492
|
-
function instance$
|
|
1967
|
+
function instance$b($$self, $$props, $$invalidate) {
|
|
1493
1968
|
var type;
|
|
1494
1969
|
var _a = $$props.showForgotPasswordLabel, showForgotPasswordLabel = _a === void 0 ? false : _a;
|
|
1495
1970
|
var _b = $$props.passwordInputValid, passwordInputValid = _b === void 0 ? false : _b;
|
|
1496
1971
|
var _c = $$props.passwordLabel, passwordLabel = _c === void 0 ? "Password" : _c;
|
|
1497
1972
|
var _d = $$props.passwordPlaceholder, passwordPlaceholder = _d === void 0 ? "Enter Password" : _d;
|
|
1973
|
+
var passwordValue = $$props.passwordValue;
|
|
1498
1974
|
var display = $$props.display;
|
|
1499
1975
|
var inputError = false;
|
|
1500
1976
|
var passwordVisible = false;
|
|
1501
1977
|
function togglePassword() {
|
|
1502
|
-
$$invalidate(
|
|
1978
|
+
$$invalidate(5, passwordVisible = !passwordVisible);
|
|
1979
|
+
}
|
|
1980
|
+
function handleInput(e) {
|
|
1981
|
+
$$invalidate(0, passwordValue = e.target.value);
|
|
1503
1982
|
}
|
|
1504
1983
|
var validateField = function (e) {
|
|
1505
1984
|
var hasValidPassword = e.target.value.length >= 8 ? true : false;
|
|
1506
1985
|
if (!hasValidPassword) {
|
|
1507
|
-
$$invalidate(
|
|
1508
|
-
$$invalidate(
|
|
1986
|
+
$$invalidate(11, passwordInputValid = false);
|
|
1987
|
+
$$invalidate(6, inputError = true);
|
|
1509
1988
|
}
|
|
1510
1989
|
else {
|
|
1511
|
-
$$invalidate(
|
|
1512
|
-
$$invalidate(
|
|
1990
|
+
$$invalidate(11, passwordInputValid = true);
|
|
1991
|
+
$$invalidate(6, inputError = false);
|
|
1513
1992
|
}
|
|
1514
1993
|
};
|
|
1515
|
-
var click_handler = function () { return $$invalidate(
|
|
1994
|
+
var click_handler = function () { return $$invalidate(1, display = "forgot_password"); };
|
|
1516
1995
|
$$self.$$set = function ($$props) {
|
|
1517
1996
|
if ('showForgotPasswordLabel' in $$props)
|
|
1518
|
-
$$invalidate(
|
|
1997
|
+
$$invalidate(2, showForgotPasswordLabel = $$props.showForgotPasswordLabel);
|
|
1519
1998
|
if ('passwordInputValid' in $$props)
|
|
1520
|
-
$$invalidate(
|
|
1999
|
+
$$invalidate(11, passwordInputValid = $$props.passwordInputValid);
|
|
1521
2000
|
if ('passwordLabel' in $$props)
|
|
1522
|
-
$$invalidate(
|
|
2001
|
+
$$invalidate(3, passwordLabel = $$props.passwordLabel);
|
|
1523
2002
|
if ('passwordPlaceholder' in $$props)
|
|
1524
|
-
$$invalidate(
|
|
2003
|
+
$$invalidate(4, passwordPlaceholder = $$props.passwordPlaceholder);
|
|
2004
|
+
if ('passwordValue' in $$props)
|
|
2005
|
+
$$invalidate(0, passwordValue = $$props.passwordValue);
|
|
1525
2006
|
if ('display' in $$props)
|
|
1526
|
-
$$invalidate(
|
|
2007
|
+
$$invalidate(1, display = $$props.display);
|
|
1527
2008
|
};
|
|
1528
2009
|
$$self.$$.update = function () {
|
|
1529
|
-
if ($$self.$$.dirty & /*passwordVisible*/
|
|
1530
|
-
$$invalidate(
|
|
2010
|
+
if ($$self.$$.dirty & /*passwordVisible*/ 32) {
|
|
2011
|
+
$$invalidate(7, type = passwordVisible ? "text" : "password");
|
|
1531
2012
|
}
|
|
1532
2013
|
};
|
|
1533
2014
|
return [
|
|
2015
|
+
passwordValue,
|
|
1534
2016
|
display,
|
|
1535
2017
|
showForgotPasswordLabel,
|
|
1536
2018
|
passwordLabel,
|
|
@@ -1539,6 +2021,7 @@ function instance$a($$self, $$props, $$invalidate) {
|
|
|
1539
2021
|
inputError,
|
|
1540
2022
|
type,
|
|
1541
2023
|
togglePassword,
|
|
2024
|
+
handleInput,
|
|
1542
2025
|
validateField,
|
|
1543
2026
|
passwordInputValid,
|
|
1544
2027
|
click_handler
|
|
@@ -1548,19 +2031,20 @@ var PasswordInput = /** @class */ (function (_super) {
|
|
|
1548
2031
|
__extends(PasswordInput, _super);
|
|
1549
2032
|
function PasswordInput(options) {
|
|
1550
2033
|
var _this = _super.call(this) || this;
|
|
1551
|
-
init(_this, options, instance$
|
|
1552
|
-
showForgotPasswordLabel:
|
|
1553
|
-
passwordInputValid:
|
|
1554
|
-
passwordLabel:
|
|
1555
|
-
passwordPlaceholder:
|
|
1556
|
-
|
|
2034
|
+
init(_this, options, instance$b, create_fragment$k, safe_not_equal, {
|
|
2035
|
+
showForgotPasswordLabel: 2,
|
|
2036
|
+
passwordInputValid: 11,
|
|
2037
|
+
passwordLabel: 3,
|
|
2038
|
+
passwordPlaceholder: 4,
|
|
2039
|
+
passwordValue: 0,
|
|
2040
|
+
display: 1
|
|
1557
2041
|
});
|
|
1558
2042
|
return _this;
|
|
1559
2043
|
}
|
|
1560
2044
|
return PasswordInput;
|
|
1561
2045
|
}(SvelteComponent));
|
|
1562
2046
|
/* src/icons/SecuredIcon.svelte generated by Svelte v3.48.0 */
|
|
1563
|
-
function create_fragment$
|
|
2047
|
+
function create_fragment$j(ctx) {
|
|
1564
2048
|
var svg;
|
|
1565
2049
|
var path;
|
|
1566
2050
|
return {
|
|
@@ -1591,13 +2075,13 @@ var SecuredIcon = /** @class */ (function (_super) {
|
|
|
1591
2075
|
__extends(SecuredIcon, _super);
|
|
1592
2076
|
function SecuredIcon(options) {
|
|
1593
2077
|
var _this = _super.call(this) || this;
|
|
1594
|
-
init(_this, options, null, create_fragment$
|
|
2078
|
+
init(_this, options, null, create_fragment$j, safe_not_equal, {});
|
|
1595
2079
|
return _this;
|
|
1596
2080
|
}
|
|
1597
2081
|
return SecuredIcon;
|
|
1598
2082
|
}(SvelteComponent));
|
|
1599
2083
|
/* src/components/ModalFooter.svelte generated by Svelte v3.48.0 */
|
|
1600
|
-
function create_fragment$
|
|
2084
|
+
function create_fragment$i(ctx) {
|
|
1601
2085
|
var div;
|
|
1602
2086
|
var a;
|
|
1603
2087
|
var securedicon;
|
|
@@ -1643,13 +2127,13 @@ var ModalFooter = /** @class */ (function (_super) {
|
|
|
1643
2127
|
__extends(ModalFooter, _super);
|
|
1644
2128
|
function ModalFooter(options) {
|
|
1645
2129
|
var _this = _super.call(this) || this;
|
|
1646
|
-
init(_this, options, null, create_fragment$
|
|
2130
|
+
init(_this, options, null, create_fragment$i, safe_not_equal, {});
|
|
1647
2131
|
return _this;
|
|
1648
2132
|
}
|
|
1649
2133
|
return ModalFooter;
|
|
1650
2134
|
}(SvelteComponent));
|
|
1651
2135
|
/* src/modals/LoginModal.svelte generated by Svelte v3.48.0 */
|
|
1652
|
-
function create_if_block$
|
|
2136
|
+
function create_if_block$6(ctx) {
|
|
1653
2137
|
var div;
|
|
1654
2138
|
var button;
|
|
1655
2139
|
var mounted;
|
|
@@ -1680,7 +2164,7 @@ function create_if_block$3(ctx) {
|
|
|
1680
2164
|
}
|
|
1681
2165
|
};
|
|
1682
2166
|
}
|
|
1683
|
-
function create_fragment$
|
|
2167
|
+
function create_fragment$h(ctx) {
|
|
1684
2168
|
var div1;
|
|
1685
2169
|
var closebutton;
|
|
1686
2170
|
var t0;
|
|
@@ -1739,7 +2223,7 @@ function create_fragment$f(ctx) {
|
|
|
1739
2223
|
isLoading: /*showLoader*/ ctx[3]
|
|
1740
2224
|
}
|
|
1741
2225
|
});
|
|
1742
|
-
var if_block = /*params*/ ctx[2] && /*params*/ ctx[2].signup && /*params*/ ctx[2].signup.plans && create_if_block$
|
|
2226
|
+
var if_block = /*params*/ ctx[2] && /*params*/ ctx[2].signup && /*params*/ ctx[2].signup.plans && create_if_block$6(ctx);
|
|
1743
2227
|
modalfooter = new ModalFooter({});
|
|
1744
2228
|
return {
|
|
1745
2229
|
c: function () {
|
|
@@ -1832,7 +2316,7 @@ function create_fragment$f(ctx) {
|
|
|
1832
2316
|
if_block.p(ctx, dirty);
|
|
1833
2317
|
}
|
|
1834
2318
|
else {
|
|
1835
|
-
if_block = create_if_block$
|
|
2319
|
+
if_block = create_if_block$6(ctx);
|
|
1836
2320
|
if_block.c();
|
|
1837
2321
|
if_block.m(form, null);
|
|
1838
2322
|
}
|
|
@@ -1878,7 +2362,7 @@ function create_fragment$f(ctx) {
|
|
|
1878
2362
|
}
|
|
1879
2363
|
};
|
|
1880
2364
|
}
|
|
1881
|
-
function instance$
|
|
2365
|
+
function instance$a($$self, $$props, $$invalidate) {
|
|
1882
2366
|
var closeModal = $$props.closeModal;
|
|
1883
2367
|
var display = $$props.display;
|
|
1884
2368
|
var onSuccessLogin = $$props.onSuccessLogin;
|
|
@@ -1961,7 +2445,7 @@ var LoginModal = /** @class */ (function (_super) {
|
|
|
1961
2445
|
__extends(LoginModal, _super);
|
|
1962
2446
|
function LoginModal(options) {
|
|
1963
2447
|
var _this = _super.call(this) || this;
|
|
1964
|
-
init(_this, options, instance$
|
|
2448
|
+
init(_this, options, instance$a, create_fragment$h, safe_not_equal, {
|
|
1965
2449
|
closeModal: 1,
|
|
1966
2450
|
display: 0,
|
|
1967
2451
|
onSuccessLogin: 7,
|
|
@@ -1972,27 +2456,130 @@ var LoginModal = /** @class */ (function (_super) {
|
|
|
1972
2456
|
return LoginModal;
|
|
1973
2457
|
}(SvelteComponent));
|
|
1974
2458
|
/* src/modals/SignupModal.svelte generated by Svelte v3.48.0 */
|
|
1975
|
-
function
|
|
1976
|
-
var
|
|
1977
|
-
|
|
1978
|
-
|
|
2459
|
+
function get_each_context$1(ctx, list, i) {
|
|
2460
|
+
var child_ctx = ctx.slice();
|
|
2461
|
+
child_ctx[12] = list[i];
|
|
2462
|
+
child_ctx[14] = i;
|
|
2463
|
+
return child_ctx;
|
|
2464
|
+
}
|
|
2465
|
+
// (76:6) {#if customField.hidden !== true}
|
|
2466
|
+
function create_if_block$5(ctx) {
|
|
1979
2467
|
var div1;
|
|
1980
|
-
var
|
|
2468
|
+
var div0;
|
|
2469
|
+
var label;
|
|
2470
|
+
var t0_value = /*customField*/ ctx[12].label + "";
|
|
2471
|
+
var t0;
|
|
2472
|
+
var label_for_value;
|
|
1981
2473
|
var t1;
|
|
1982
|
-
var
|
|
1983
|
-
var
|
|
1984
|
-
var
|
|
1985
|
-
|
|
1986
|
-
|
|
2474
|
+
var input;
|
|
2475
|
+
var input_placeholder_value;
|
|
2476
|
+
var input_name_value;
|
|
2477
|
+
return {
|
|
2478
|
+
c: function () {
|
|
2479
|
+
div1 = element("div");
|
|
2480
|
+
div0 = element("div");
|
|
2481
|
+
label = element("label");
|
|
2482
|
+
t0 = text(t0_value);
|
|
2483
|
+
t1 = space();
|
|
2484
|
+
input = element("input");
|
|
2485
|
+
attr(label, "class", "ms-form__label");
|
|
2486
|
+
attr(label, "for", label_for_value = /*customField*/ ctx[12].key);
|
|
2487
|
+
attr(input, "class", "ms-form__input");
|
|
2488
|
+
attr(input, "data-ms-custom-field", "");
|
|
2489
|
+
attr(input, "type", "text");
|
|
2490
|
+
attr(input, "placeholder", input_placeholder_value = /*customField*/ ctx[12].label);
|
|
2491
|
+
attr(input, "name", input_name_value = /*customField*/ ctx[12].key);
|
|
2492
|
+
attr(div0, "class", "ms-form__group");
|
|
2493
|
+
attr(div1, "class", "ms-modal__custom-field-container");
|
|
2494
|
+
},
|
|
2495
|
+
m: function (target, anchor) {
|
|
2496
|
+
insert(target, div1, anchor);
|
|
2497
|
+
append(div1, div0);
|
|
2498
|
+
append(div0, label);
|
|
2499
|
+
append(label, t0);
|
|
2500
|
+
append(div0, t1);
|
|
2501
|
+
append(div0, input);
|
|
2502
|
+
},
|
|
2503
|
+
p: function (ctx, dirty) {
|
|
2504
|
+
if (dirty & /*$app*/ 32 && t0_value !== (t0_value = /*customField*/ ctx[12].label + ""))
|
|
2505
|
+
set_data(t0, t0_value);
|
|
2506
|
+
if (dirty & /*$app*/ 32 && label_for_value !== (label_for_value = /*customField*/ ctx[12].key)) {
|
|
2507
|
+
attr(label, "for", label_for_value);
|
|
2508
|
+
}
|
|
2509
|
+
if (dirty & /*$app*/ 32 && input_placeholder_value !== (input_placeholder_value = /*customField*/ ctx[12].label)) {
|
|
2510
|
+
attr(input, "placeholder", input_placeholder_value);
|
|
2511
|
+
}
|
|
2512
|
+
if (dirty & /*$app*/ 32 && input_name_value !== (input_name_value = /*customField*/ ctx[12].key)) {
|
|
2513
|
+
attr(input, "name", input_name_value);
|
|
2514
|
+
}
|
|
2515
|
+
},
|
|
2516
|
+
d: function (detaching) {
|
|
2517
|
+
if (detaching)
|
|
2518
|
+
detach(div1);
|
|
2519
|
+
}
|
|
2520
|
+
};
|
|
2521
|
+
}
|
|
2522
|
+
// (75:6) {#each $app.customFields as customField, i}
|
|
2523
|
+
function create_each_block$1(ctx) {
|
|
2524
|
+
var if_block_anchor;
|
|
2525
|
+
var if_block = /*customField*/ ctx[12].hidden !== true && create_if_block$5(ctx);
|
|
2526
|
+
return {
|
|
2527
|
+
c: function () {
|
|
2528
|
+
if (if_block)
|
|
2529
|
+
if_block.c();
|
|
2530
|
+
if_block_anchor = empty();
|
|
2531
|
+
},
|
|
2532
|
+
m: function (target, anchor) {
|
|
2533
|
+
if (if_block)
|
|
2534
|
+
if_block.m(target, anchor);
|
|
2535
|
+
insert(target, if_block_anchor, anchor);
|
|
2536
|
+
},
|
|
2537
|
+
p: function (ctx, dirty) {
|
|
2538
|
+
if ( /*customField*/ctx[12].hidden !== true) {
|
|
2539
|
+
if (if_block) {
|
|
2540
|
+
if_block.p(ctx, dirty);
|
|
2541
|
+
}
|
|
2542
|
+
else {
|
|
2543
|
+
if_block = create_if_block$5(ctx);
|
|
2544
|
+
if_block.c();
|
|
2545
|
+
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
2546
|
+
}
|
|
2547
|
+
}
|
|
2548
|
+
else if (if_block) {
|
|
2549
|
+
if_block.d(1);
|
|
2550
|
+
if_block = null;
|
|
2551
|
+
}
|
|
2552
|
+
},
|
|
2553
|
+
d: function (detaching) {
|
|
2554
|
+
if (if_block)
|
|
2555
|
+
if_block.d(detaching);
|
|
2556
|
+
if (detaching)
|
|
2557
|
+
detach(if_block_anchor);
|
|
2558
|
+
}
|
|
2559
|
+
};
|
|
2560
|
+
}
|
|
2561
|
+
function create_fragment$g(ctx) {
|
|
2562
|
+
var div2;
|
|
2563
|
+
var closebutton;
|
|
2564
|
+
var t0;
|
|
2565
|
+
var div1;
|
|
2566
|
+
var figureelement;
|
|
2567
|
+
var t1;
|
|
2568
|
+
var h2;
|
|
2569
|
+
var t3;
|
|
2570
|
+
var form;
|
|
1987
2571
|
var t4;
|
|
2572
|
+
var emailinput;
|
|
2573
|
+
var updating_emailInputValid;
|
|
2574
|
+
var t5;
|
|
1988
2575
|
var passwordinput;
|
|
1989
2576
|
var updating_passwordInputValid;
|
|
1990
|
-
var t5;
|
|
1991
|
-
var submitbutton;
|
|
1992
2577
|
var t6;
|
|
2578
|
+
var submitbutton;
|
|
2579
|
+
var t7;
|
|
1993
2580
|
var div0;
|
|
1994
2581
|
var button;
|
|
1995
|
-
var
|
|
2582
|
+
var t9;
|
|
1996
2583
|
var modalfooter;
|
|
1997
2584
|
var current;
|
|
1998
2585
|
var mounted;
|
|
@@ -2001,8 +2588,13 @@ function create_fragment$e(ctx) {
|
|
|
2001
2588
|
props: { closeModal: /*closeModal*/ ctx[1] }
|
|
2002
2589
|
});
|
|
2003
2590
|
figureelement = new FigureElement({});
|
|
2591
|
+
var each_value = /*$app*/ ctx[5].customFields;
|
|
2592
|
+
var each_blocks = [];
|
|
2593
|
+
for (var i = 0; i < each_value.length; i += 1) {
|
|
2594
|
+
each_blocks[i] = create_each_block$1(get_each_context$1(ctx, each_value, i));
|
|
2595
|
+
}
|
|
2004
2596
|
function emailinput_emailInputValid_binding(value) {
|
|
2005
|
-
/*emailinput_emailInputValid_binding*/ ctx[
|
|
2597
|
+
/*emailinput_emailInputValid_binding*/ ctx[9](value);
|
|
2006
2598
|
}
|
|
2007
2599
|
var emailinput_props = {};
|
|
2008
2600
|
if ( /*emailInputValid*/ctx[3] !== void 0) {
|
|
@@ -2011,7 +2603,7 @@ function create_fragment$e(ctx) {
|
|
|
2011
2603
|
emailinput = new EmailInput({ props: emailinput_props });
|
|
2012
2604
|
binding_callbacks.push(function () { return bind(emailinput, 'emailInputValid', emailinput_emailInputValid_binding); });
|
|
2013
2605
|
function passwordinput_passwordInputValid_binding(value) {
|
|
2014
|
-
/*passwordinput_passwordInputValid_binding*/ ctx[
|
|
2606
|
+
/*passwordinput_passwordInputValid_binding*/ ctx[10](value);
|
|
2015
2607
|
}
|
|
2016
2608
|
var passwordinput_props = {};
|
|
2017
2609
|
if ( /*passwordInputValid*/ctx[4] !== void 0) {
|
|
@@ -2038,16 +2630,20 @@ function create_fragment$e(ctx) {
|
|
|
2038
2630
|
h2.textContent = "Create an account";
|
|
2039
2631
|
t3 = space();
|
|
2040
2632
|
form = element("form");
|
|
2041
|
-
|
|
2633
|
+
for (var i = 0; i < each_blocks.length; i += 1) {
|
|
2634
|
+
each_blocks[i].c();
|
|
2635
|
+
}
|
|
2042
2636
|
t4 = space();
|
|
2043
|
-
create_component(
|
|
2637
|
+
create_component(emailinput.$$.fragment);
|
|
2044
2638
|
t5 = space();
|
|
2045
|
-
create_component(
|
|
2639
|
+
create_component(passwordinput.$$.fragment);
|
|
2046
2640
|
t6 = space();
|
|
2641
|
+
create_component(submitbutton.$$.fragment);
|
|
2642
|
+
t7 = space();
|
|
2047
2643
|
div0 = element("div");
|
|
2048
2644
|
button = element("button");
|
|
2049
2645
|
button.textContent = "Already have an account?";
|
|
2050
|
-
|
|
2646
|
+
t9 = space();
|
|
2051
2647
|
create_component(modalfooter.$$.fragment);
|
|
2052
2648
|
attr(h2, "class", "ms-modal__title");
|
|
2053
2649
|
attr(button, "class", "ms-form__button ms-form__button--text");
|
|
@@ -2070,21 +2666,25 @@ function create_fragment$e(ctx) {
|
|
|
2070
2666
|
append(div1, h2);
|
|
2071
2667
|
append(div1, t3);
|
|
2072
2668
|
append(div1, form);
|
|
2073
|
-
|
|
2669
|
+
for (var i = 0; i < each_blocks.length; i += 1) {
|
|
2670
|
+
each_blocks[i].m(form, null);
|
|
2671
|
+
}
|
|
2074
2672
|
append(form, t4);
|
|
2075
|
-
mount_component(
|
|
2673
|
+
mount_component(emailinput, form, null);
|
|
2076
2674
|
append(form, t5);
|
|
2077
|
-
mount_component(
|
|
2675
|
+
mount_component(passwordinput, form, null);
|
|
2078
2676
|
append(form, t6);
|
|
2677
|
+
mount_component(submitbutton, form, null);
|
|
2678
|
+
append(form, t7);
|
|
2079
2679
|
append(form, div0);
|
|
2080
2680
|
append(div0, button);
|
|
2081
|
-
append(div2,
|
|
2681
|
+
append(div2, t9);
|
|
2082
2682
|
mount_component(modalfooter, div2, null);
|
|
2083
2683
|
current = true;
|
|
2084
2684
|
if (!mounted) {
|
|
2085
2685
|
dispose = [
|
|
2086
|
-
listen(button, "click", /*click_handler*/ ctx[
|
|
2087
|
-
listen(form, "submit", stop_propagation(prevent_default(/*submitSignup*/ ctx[
|
|
2686
|
+
listen(button, "click", /*click_handler*/ ctx[11]),
|
|
2687
|
+
listen(form, "submit", stop_propagation(prevent_default(/*submitSignup*/ ctx[6])))
|
|
2088
2688
|
];
|
|
2089
2689
|
mounted = true;
|
|
2090
2690
|
}
|
|
@@ -2095,6 +2695,25 @@ function create_fragment$e(ctx) {
|
|
|
2095
2695
|
if (dirty & /*closeModal*/ 2)
|
|
2096
2696
|
closebutton_changes.closeModal = /*closeModal*/ ctx[1];
|
|
2097
2697
|
closebutton.$set(closebutton_changes);
|
|
2698
|
+
if (dirty & /*$app*/ 32) {
|
|
2699
|
+
each_value = /*$app*/ ctx[5].customFields;
|
|
2700
|
+
var i = void 0;
|
|
2701
|
+
for (i = 0; i < each_value.length; i += 1) {
|
|
2702
|
+
var child_ctx = get_each_context$1(ctx, each_value, i);
|
|
2703
|
+
if (each_blocks[i]) {
|
|
2704
|
+
each_blocks[i].p(child_ctx, dirty);
|
|
2705
|
+
}
|
|
2706
|
+
else {
|
|
2707
|
+
each_blocks[i] = create_each_block$1(child_ctx);
|
|
2708
|
+
each_blocks[i].c();
|
|
2709
|
+
each_blocks[i].m(form, t4);
|
|
2710
|
+
}
|
|
2711
|
+
}
|
|
2712
|
+
for (; i < each_blocks.length; i += 1) {
|
|
2713
|
+
each_blocks[i].d(1);
|
|
2714
|
+
}
|
|
2715
|
+
each_blocks.length = each_value.length;
|
|
2716
|
+
}
|
|
2098
2717
|
var emailinput_changes = {};
|
|
2099
2718
|
if (!updating_emailInputValid && dirty & /*emailInputValid*/ 8) {
|
|
2100
2719
|
updating_emailInputValid = true;
|
|
@@ -2139,6 +2758,7 @@ function create_fragment$e(ctx) {
|
|
|
2139
2758
|
detach(div2);
|
|
2140
2759
|
destroy_component(closebutton);
|
|
2141
2760
|
destroy_component(figureelement);
|
|
2761
|
+
destroy_each(each_blocks, detaching);
|
|
2142
2762
|
destroy_component(emailinput);
|
|
2143
2763
|
destroy_component(passwordinput);
|
|
2144
2764
|
destroy_component(submitbutton);
|
|
@@ -2148,7 +2768,9 @@ function create_fragment$e(ctx) {
|
|
|
2148
2768
|
}
|
|
2149
2769
|
};
|
|
2150
2770
|
}
|
|
2151
|
-
function instance$
|
|
2771
|
+
function instance$9($$self, $$props, $$invalidate) {
|
|
2772
|
+
var $app;
|
|
2773
|
+
component_subscribe($$self, AppStore, function ($$value) { return $$invalidate(5, $app = $$value); });
|
|
2152
2774
|
var closeModal = $$props.closeModal;
|
|
2153
2775
|
var display = $$props.display;
|
|
2154
2776
|
var onSuccessSignup = $$props.onSuccessSignup;
|
|
@@ -2159,12 +2781,17 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
2159
2781
|
function submitSignup(e) {
|
|
2160
2782
|
var _a;
|
|
2161
2783
|
return __awaiter(this, void 0, void 0, function () {
|
|
2162
|
-
var emailInput, passwordInput, plans, data, err_2;
|
|
2784
|
+
var emailInput, passwordInput, customFields, customFieldInputs, plans, data, err_2;
|
|
2163
2785
|
return __generator(this, function (_b) {
|
|
2164
2786
|
switch (_b.label) {
|
|
2165
2787
|
case 0:
|
|
2166
|
-
emailInput = e.target[
|
|
2167
|
-
passwordInput = e.target[
|
|
2788
|
+
emailInput = e.target.querySelector("[type=email]");
|
|
2789
|
+
passwordInput = e.target.querySelector("[type=password]");
|
|
2790
|
+
customFields = {};
|
|
2791
|
+
customFieldInputs = Array.from(e.target.querySelectorAll("[data-ms-custom-field]"));
|
|
2792
|
+
customFieldInputs.map(function (input) {
|
|
2793
|
+
customFields[input.getAttribute("name")] = input.value;
|
|
2794
|
+
}).length;
|
|
2168
2795
|
if (!emailInputValid || !passwordInputValid)
|
|
2169
2796
|
return [2 /*return*/];
|
|
2170
2797
|
$$invalidate(2, showLoader = true);
|
|
@@ -2177,7 +2804,8 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
2177
2804
|
return [4 /*yield*/, window.$memberstackDom.signupMemberEmailPassword({
|
|
2178
2805
|
email: emailInput.value,
|
|
2179
2806
|
password: passwordInput.value,
|
|
2180
|
-
plans: plans
|
|
2807
|
+
plans: plans,
|
|
2808
|
+
customFields: customFields
|
|
2181
2809
|
})];
|
|
2182
2810
|
case 2:
|
|
2183
2811
|
data = (_b.sent()).data;
|
|
@@ -2209,9 +2837,9 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
2209
2837
|
if ('display' in $$props)
|
|
2210
2838
|
$$invalidate(0, display = $$props.display);
|
|
2211
2839
|
if ('onSuccessSignup' in $$props)
|
|
2212
|
-
$$invalidate(
|
|
2840
|
+
$$invalidate(7, onSuccessSignup = $$props.onSuccessSignup);
|
|
2213
2841
|
if ('params' in $$props)
|
|
2214
|
-
$$invalidate(
|
|
2842
|
+
$$invalidate(8, params = $$props.params);
|
|
2215
2843
|
};
|
|
2216
2844
|
return [
|
|
2217
2845
|
display,
|
|
@@ -2219,6 +2847,7 @@ function instance$8($$self, $$props, $$invalidate) {
|
|
|
2219
2847
|
showLoader,
|
|
2220
2848
|
emailInputValid,
|
|
2221
2849
|
passwordInputValid,
|
|
2850
|
+
$app,
|
|
2222
2851
|
submitSignup,
|
|
2223
2852
|
onSuccessSignup,
|
|
2224
2853
|
params,
|
|
@@ -2231,18 +2860,18 @@ var SignupModal = /** @class */ (function (_super) {
|
|
|
2231
2860
|
__extends(SignupModal, _super);
|
|
2232
2861
|
function SignupModal(options) {
|
|
2233
2862
|
var _this = _super.call(this) || this;
|
|
2234
|
-
init(_this, options, instance$
|
|
2863
|
+
init(_this, options, instance$9, create_fragment$g, safe_not_equal, {
|
|
2235
2864
|
closeModal: 1,
|
|
2236
2865
|
display: 0,
|
|
2237
|
-
onSuccessSignup:
|
|
2238
|
-
params:
|
|
2866
|
+
onSuccessSignup: 7,
|
|
2867
|
+
params: 8
|
|
2239
2868
|
});
|
|
2240
2869
|
return _this;
|
|
2241
2870
|
}
|
|
2242
2871
|
return SignupModal;
|
|
2243
2872
|
}(SvelteComponent));
|
|
2244
2873
|
/* src/icons/BackIcon.svelte generated by Svelte v3.48.0 */
|
|
2245
|
-
function create_fragment$
|
|
2874
|
+
function create_fragment$f(ctx) {
|
|
2246
2875
|
var svg;
|
|
2247
2876
|
var path;
|
|
2248
2877
|
return {
|
|
@@ -2272,13 +2901,13 @@ var BackIcon = /** @class */ (function (_super) {
|
|
|
2272
2901
|
__extends(BackIcon, _super);
|
|
2273
2902
|
function BackIcon(options) {
|
|
2274
2903
|
var _this = _super.call(this) || this;
|
|
2275
|
-
init(_this, options, null, create_fragment$
|
|
2904
|
+
init(_this, options, null, create_fragment$f, safe_not_equal, {});
|
|
2276
2905
|
return _this;
|
|
2277
2906
|
}
|
|
2278
2907
|
return BackIcon;
|
|
2279
2908
|
}(SvelteComponent));
|
|
2280
2909
|
/* src/modals/PassResetModal.svelte generated by Svelte v3.48.0 */
|
|
2281
|
-
function create_fragment$
|
|
2910
|
+
function create_fragment$e(ctx) {
|
|
2282
2911
|
var div3;
|
|
2283
2912
|
var div0;
|
|
2284
2913
|
var button;
|
|
@@ -2450,7 +3079,7 @@ function create_fragment$c(ctx) {
|
|
|
2450
3079
|
}
|
|
2451
3080
|
};
|
|
2452
3081
|
}
|
|
2453
|
-
function instance$
|
|
3082
|
+
function instance$8($$self, $$props, $$invalidate) {
|
|
2454
3083
|
var closeModal = $$props.closeModal;
|
|
2455
3084
|
var display = $$props.display;
|
|
2456
3085
|
var emailInputValid = false;
|
|
@@ -2511,13 +3140,13 @@ var PassResetModal = /** @class */ (function (_super) {
|
|
|
2511
3140
|
__extends(PassResetModal, _super);
|
|
2512
3141
|
function PassResetModal(options) {
|
|
2513
3142
|
var _this = _super.call(this) || this;
|
|
2514
|
-
init(_this, options, instance$
|
|
3143
|
+
init(_this, options, instance$8, create_fragment$e, safe_not_equal, { closeModal: 1, display: 0 });
|
|
2515
3144
|
return _this;
|
|
2516
3145
|
}
|
|
2517
3146
|
return PassResetModal;
|
|
2518
3147
|
}(SvelteComponent));
|
|
2519
3148
|
/* src/modals/PassTokenModal.svelte generated by Svelte v3.48.0 */
|
|
2520
|
-
function create_if_block$
|
|
3149
|
+
function create_if_block$4(ctx) {
|
|
2521
3150
|
var div;
|
|
2522
3151
|
var erroricon;
|
|
2523
3152
|
var t;
|
|
@@ -2553,7 +3182,7 @@ function create_if_block$2(ctx) {
|
|
|
2553
3182
|
}
|
|
2554
3183
|
};
|
|
2555
3184
|
}
|
|
2556
|
-
function create_fragment$
|
|
3185
|
+
function create_fragment$d(ctx) {
|
|
2557
3186
|
var div4;
|
|
2558
3187
|
var div0;
|
|
2559
3188
|
var button;
|
|
@@ -2589,7 +3218,7 @@ function create_fragment$b(ctx) {
|
|
|
2589
3218
|
props: { closeModal: /*closeModal*/ ctx[1] }
|
|
2590
3219
|
});
|
|
2591
3220
|
figureelement = new FigureElement({});
|
|
2592
|
-
var if_block = !ctx[3] && create_if_block$
|
|
3221
|
+
var if_block = !ctx[3] && create_if_block$4();
|
|
2593
3222
|
function passwordinput_passwordInputValid_binding(value) {
|
|
2594
3223
|
/*passwordinput_passwordInputValid_binding*/ ctx[8](value);
|
|
2595
3224
|
}
|
|
@@ -2707,7 +3336,7 @@ function create_fragment$b(ctx) {
|
|
|
2707
3336
|
}
|
|
2708
3337
|
}
|
|
2709
3338
|
else {
|
|
2710
|
-
if_block = create_if_block$
|
|
3339
|
+
if_block = create_if_block$4();
|
|
2711
3340
|
if_block.c();
|
|
2712
3341
|
transition_in(if_block, 1);
|
|
2713
3342
|
if_block.m(div1, null);
|
|
@@ -2770,7 +3399,7 @@ function create_fragment$b(ctx) {
|
|
|
2770
3399
|
}
|
|
2771
3400
|
};
|
|
2772
3401
|
}
|
|
2773
|
-
function instance$
|
|
3402
|
+
function instance$7($$self, $$props, $$invalidate) {
|
|
2774
3403
|
var closeModal = $$props.closeModal;
|
|
2775
3404
|
var display = $$props.display;
|
|
2776
3405
|
var onSuccessPasswordReset = $$props.onSuccessPasswordReset;
|
|
@@ -2840,6 +3469,7 @@ function instance$6($$self, $$props, $$invalidate) {
|
|
|
2840
3469
|
window.$memberstackDom._showMessage("Password successfully reset", false);
|
|
2841
3470
|
onSuccessPasswordReset({ type: "PASSWORD_RESET", data: data });
|
|
2842
3471
|
$$invalidate(2, showLoader = false);
|
|
3472
|
+
$$invalidate(0, display = "reset_password_success");
|
|
2843
3473
|
return [3 /*break*/, 4];
|
|
2844
3474
|
case 3:
|
|
2845
3475
|
err_4 = _a.sent();
|
|
@@ -2883,7 +3513,7 @@ var PassTokenModal = /** @class */ (function (_super) {
|
|
|
2883
3513
|
__extends(PassTokenModal, _super);
|
|
2884
3514
|
function PassTokenModal(options) {
|
|
2885
3515
|
var _this = _super.call(this) || this;
|
|
2886
|
-
init(_this, options, instance$
|
|
3516
|
+
init(_this, options, instance$7, create_fragment$d, safe_not_equal, {
|
|
2887
3517
|
closeModal: 1,
|
|
2888
3518
|
display: 0,
|
|
2889
3519
|
onSuccessPasswordReset: 6
|
|
@@ -2892,8 +3522,117 @@ var PassTokenModal = /** @class */ (function (_super) {
|
|
|
2892
3522
|
}
|
|
2893
3523
|
return PassTokenModal;
|
|
2894
3524
|
}(SvelteComponent));
|
|
3525
|
+
/* src/modals/PassSuccessModal.svelte generated by Svelte v3.48.0 */
|
|
3526
|
+
function create_fragment$c(ctx) {
|
|
3527
|
+
var div2;
|
|
3528
|
+
var div0;
|
|
3529
|
+
var t0;
|
|
3530
|
+
var closebutton;
|
|
3531
|
+
var t1;
|
|
3532
|
+
var div1;
|
|
3533
|
+
var figureelement;
|
|
3534
|
+
var t2;
|
|
3535
|
+
var h2;
|
|
3536
|
+
var t4;
|
|
3537
|
+
var p;
|
|
3538
|
+
var t7;
|
|
3539
|
+
var modalfooter;
|
|
3540
|
+
var current;
|
|
3541
|
+
closebutton = new CloseButton({
|
|
3542
|
+
props: { closeModal: /*closeModal*/ ctx[0] }
|
|
3543
|
+
});
|
|
3544
|
+
figureelement = new FigureElement({});
|
|
3545
|
+
modalfooter = new ModalFooter({});
|
|
3546
|
+
return {
|
|
3547
|
+
c: function () {
|
|
3548
|
+
div2 = element("div");
|
|
3549
|
+
div0 = element("div");
|
|
3550
|
+
t0 = space();
|
|
3551
|
+
create_component(closebutton.$$.fragment);
|
|
3552
|
+
t1 = space();
|
|
3553
|
+
div1 = element("div");
|
|
3554
|
+
create_component(figureelement.$$.fragment);
|
|
3555
|
+
t2 = space();
|
|
3556
|
+
h2 = element("h2");
|
|
3557
|
+
h2.textContent = "Success!";
|
|
3558
|
+
t4 = space();
|
|
3559
|
+
p = element("p");
|
|
3560
|
+
p.innerHTML = "Your password has been reset. <br/>\n Please login with your new credentials.";
|
|
3561
|
+
t7 = space();
|
|
3562
|
+
create_component(modalfooter.$$.fragment);
|
|
3563
|
+
attr(div0, "data-cy", "back-btn");
|
|
3564
|
+
attr(div0, "class", "ms-modal__back");
|
|
3565
|
+
attr(h2, "class", "ms-modal__title ms-modal__title--sub-text");
|
|
3566
|
+
attr(p, "class", "ms-modal__text");
|
|
3567
|
+
attr(div1, "class", "ms-modal__content");
|
|
3568
|
+
attr(div2, "class", "ms-modal");
|
|
3569
|
+
attr(div2, "id", "PasswordSuccessModal");
|
|
3570
|
+
},
|
|
3571
|
+
m: function (target, anchor) {
|
|
3572
|
+
insert(target, div2, anchor);
|
|
3573
|
+
append(div2, div0);
|
|
3574
|
+
append(div2, t0);
|
|
3575
|
+
mount_component(closebutton, div2, null);
|
|
3576
|
+
append(div2, t1);
|
|
3577
|
+
append(div2, div1);
|
|
3578
|
+
mount_component(figureelement, div1, null);
|
|
3579
|
+
append(div1, t2);
|
|
3580
|
+
append(div1, h2);
|
|
3581
|
+
append(div1, t4);
|
|
3582
|
+
append(div1, p);
|
|
3583
|
+
append(div2, t7);
|
|
3584
|
+
mount_component(modalfooter, div2, null);
|
|
3585
|
+
current = true;
|
|
3586
|
+
},
|
|
3587
|
+
p: function (ctx, _a) {
|
|
3588
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
3589
|
+
var closebutton_changes = {};
|
|
3590
|
+
if (dirty & /*closeModal*/ 1)
|
|
3591
|
+
closebutton_changes.closeModal = /*closeModal*/ ctx[0];
|
|
3592
|
+
closebutton.$set(closebutton_changes);
|
|
3593
|
+
},
|
|
3594
|
+
i: function (local) {
|
|
3595
|
+
if (current)
|
|
3596
|
+
return;
|
|
3597
|
+
transition_in(closebutton.$$.fragment, local);
|
|
3598
|
+
transition_in(figureelement.$$.fragment, local);
|
|
3599
|
+
transition_in(modalfooter.$$.fragment, local);
|
|
3600
|
+
current = true;
|
|
3601
|
+
},
|
|
3602
|
+
o: function (local) {
|
|
3603
|
+
transition_out(closebutton.$$.fragment, local);
|
|
3604
|
+
transition_out(figureelement.$$.fragment, local);
|
|
3605
|
+
transition_out(modalfooter.$$.fragment, local);
|
|
3606
|
+
current = false;
|
|
3607
|
+
},
|
|
3608
|
+
d: function (detaching) {
|
|
3609
|
+
if (detaching)
|
|
3610
|
+
detach(div2);
|
|
3611
|
+
destroy_component(closebutton);
|
|
3612
|
+
destroy_component(figureelement);
|
|
3613
|
+
destroy_component(modalfooter);
|
|
3614
|
+
}
|
|
3615
|
+
};
|
|
3616
|
+
}
|
|
3617
|
+
function instance$6($$self, $$props, $$invalidate) {
|
|
3618
|
+
var closeModal = $$props.closeModal;
|
|
3619
|
+
$$self.$$set = function ($$props) {
|
|
3620
|
+
if ('closeModal' in $$props)
|
|
3621
|
+
$$invalidate(0, closeModal = $$props.closeModal);
|
|
3622
|
+
};
|
|
3623
|
+
return [closeModal];
|
|
3624
|
+
}
|
|
3625
|
+
var PassSuccessModal = /** @class */ (function (_super) {
|
|
3626
|
+
__extends(PassSuccessModal, _super);
|
|
3627
|
+
function PassSuccessModal(options) {
|
|
3628
|
+
var _this = _super.call(this) || this;
|
|
3629
|
+
init(_this, options, instance$6, create_fragment$c, safe_not_equal, { closeModal: 0 });
|
|
3630
|
+
return _this;
|
|
3631
|
+
}
|
|
3632
|
+
return PassSuccessModal;
|
|
3633
|
+
}(SvelteComponent));
|
|
2895
3634
|
/* src/icons/ProfileIcon.svelte generated by Svelte v3.48.0 */
|
|
2896
|
-
function create_fragment$
|
|
3635
|
+
function create_fragment$b(ctx) {
|
|
2897
3636
|
var svg;
|
|
2898
3637
|
var path;
|
|
2899
3638
|
return {
|
|
@@ -2923,13 +3662,13 @@ var ProfileIcon = /** @class */ (function (_super) {
|
|
|
2923
3662
|
__extends(ProfileIcon, _super);
|
|
2924
3663
|
function ProfileIcon(options) {
|
|
2925
3664
|
var _this = _super.call(this) || this;
|
|
2926
|
-
init(_this, options, null, create_fragment$
|
|
3665
|
+
init(_this, options, null, create_fragment$b, safe_not_equal, {});
|
|
2927
3666
|
return _this;
|
|
2928
3667
|
}
|
|
2929
3668
|
return ProfileIcon;
|
|
2930
3669
|
}(SvelteComponent));
|
|
2931
3670
|
/* src/icons/SecurityIcon.svelte generated by Svelte v3.48.0 */
|
|
2932
|
-
function create_fragment$
|
|
3671
|
+
function create_fragment$a(ctx) {
|
|
2933
3672
|
var svg;
|
|
2934
3673
|
var path;
|
|
2935
3674
|
return {
|
|
@@ -2959,13 +3698,13 @@ var SecurityIcon = /** @class */ (function (_super) {
|
|
|
2959
3698
|
__extends(SecurityIcon, _super);
|
|
2960
3699
|
function SecurityIcon(options) {
|
|
2961
3700
|
var _this = _super.call(this) || this;
|
|
2962
|
-
init(_this, options, null, create_fragment$
|
|
3701
|
+
init(_this, options, null, create_fragment$a, safe_not_equal, {});
|
|
2963
3702
|
return _this;
|
|
2964
3703
|
}
|
|
2965
3704
|
return SecurityIcon;
|
|
2966
3705
|
}(SvelteComponent));
|
|
2967
3706
|
/* src/icons/LinkOutIcon.svelte generated by Svelte v3.48.0 */
|
|
2968
|
-
function create_fragment$
|
|
3707
|
+
function create_fragment$9(ctx) {
|
|
2969
3708
|
var svg;
|
|
2970
3709
|
var path;
|
|
2971
3710
|
return {
|
|
@@ -2995,13 +3734,13 @@ var LinkOutIcon = /** @class */ (function (_super) {
|
|
|
2995
3734
|
__extends(LinkOutIcon, _super);
|
|
2996
3735
|
function LinkOutIcon(options) {
|
|
2997
3736
|
var _this = _super.call(this) || this;
|
|
2998
|
-
init(_this, options, null, create_fragment$
|
|
3737
|
+
init(_this, options, null, create_fragment$9, safe_not_equal, {});
|
|
2999
3738
|
return _this;
|
|
3000
3739
|
}
|
|
3001
3740
|
return LinkOutIcon;
|
|
3002
3741
|
}(SvelteComponent));
|
|
3003
3742
|
/* src/icons/LogoutIcon.svelte generated by Svelte v3.48.0 */
|
|
3004
|
-
function create_fragment$
|
|
3743
|
+
function create_fragment$8(ctx) {
|
|
3005
3744
|
var svg;
|
|
3006
3745
|
var path;
|
|
3007
3746
|
return {
|
|
@@ -3033,132 +3772,247 @@ var LogoutIcon = /** @class */ (function (_super) {
|
|
|
3033
3772
|
__extends(LogoutIcon, _super);
|
|
3034
3773
|
function LogoutIcon(options) {
|
|
3035
3774
|
var _this = _super.call(this) || this;
|
|
3036
|
-
init(_this, options, null, create_fragment$
|
|
3775
|
+
init(_this, options, null, create_fragment$8, safe_not_equal, {});
|
|
3037
3776
|
return _this;
|
|
3038
3777
|
}
|
|
3039
3778
|
return LogoutIcon;
|
|
3040
3779
|
}(SvelteComponent));
|
|
3041
3780
|
/* src/components/ProfileModalNav.svelte generated by Svelte v3.48.0 */
|
|
3042
|
-
function
|
|
3043
|
-
var
|
|
3781
|
+
function create_if_block_1$2(ctx) {
|
|
3782
|
+
var button;
|
|
3044
3783
|
var profileicon;
|
|
3045
|
-
var
|
|
3046
|
-
var t1;
|
|
3047
|
-
var button1;
|
|
3048
|
-
var securityicon;
|
|
3049
|
-
var t2;
|
|
3050
|
-
var t3;
|
|
3051
|
-
var button2;
|
|
3052
|
-
var linkouticon;
|
|
3053
|
-
var t4;
|
|
3054
|
-
var t5;
|
|
3055
|
-
var button3;
|
|
3056
|
-
var logouticon;
|
|
3057
|
-
var t6;
|
|
3784
|
+
var t;
|
|
3058
3785
|
var current;
|
|
3059
3786
|
var mounted;
|
|
3060
3787
|
var dispose;
|
|
3061
3788
|
profileicon = new ProfileIcon({});
|
|
3062
|
-
|
|
3789
|
+
return {
|
|
3790
|
+
c: function () {
|
|
3791
|
+
button = element("button");
|
|
3792
|
+
create_component(profileicon.$$.fragment);
|
|
3793
|
+
t = text(" Profile");
|
|
3794
|
+
attr(button, "class", "ms-modal__profile-option");
|
|
3795
|
+
toggle_class(button, "ms-modal__profile-option--active", /*displayProfile*/ ctx[0] === "profile");
|
|
3796
|
+
},
|
|
3797
|
+
m: function (target, anchor) {
|
|
3798
|
+
insert(target, button, anchor);
|
|
3799
|
+
mount_component(profileicon, button, null);
|
|
3800
|
+
append(button, t);
|
|
3801
|
+
current = true;
|
|
3802
|
+
if (!mounted) {
|
|
3803
|
+
dispose = listen(button, "click", /*click_handler*/ ctx[7]);
|
|
3804
|
+
mounted = true;
|
|
3805
|
+
}
|
|
3806
|
+
},
|
|
3807
|
+
p: function (ctx, dirty) {
|
|
3808
|
+
if (dirty & /*displayProfile*/ 1) {
|
|
3809
|
+
toggle_class(button, "ms-modal__profile-option--active", /*displayProfile*/ ctx[0] === "profile");
|
|
3810
|
+
}
|
|
3811
|
+
},
|
|
3812
|
+
i: function (local) {
|
|
3813
|
+
if (current)
|
|
3814
|
+
return;
|
|
3815
|
+
transition_in(profileicon.$$.fragment, local);
|
|
3816
|
+
current = true;
|
|
3817
|
+
},
|
|
3818
|
+
o: function (local) {
|
|
3819
|
+
transition_out(profileicon.$$.fragment, local);
|
|
3820
|
+
current = false;
|
|
3821
|
+
},
|
|
3822
|
+
d: function (detaching) {
|
|
3823
|
+
if (detaching)
|
|
3824
|
+
detach(button);
|
|
3825
|
+
destroy_component(profileicon);
|
|
3826
|
+
mounted = false;
|
|
3827
|
+
dispose();
|
|
3828
|
+
}
|
|
3829
|
+
};
|
|
3830
|
+
}
|
|
3831
|
+
// (63:0) {#if member.stripeCustomerId}
|
|
3832
|
+
function create_if_block$3(ctx) {
|
|
3833
|
+
var button;
|
|
3834
|
+
var linkouticon;
|
|
3835
|
+
var t;
|
|
3836
|
+
var current;
|
|
3837
|
+
var mounted;
|
|
3838
|
+
var dispose;
|
|
3063
3839
|
linkouticon = new LinkOutIcon({});
|
|
3840
|
+
return {
|
|
3841
|
+
c: function () {
|
|
3842
|
+
button = element("button");
|
|
3843
|
+
create_component(linkouticon.$$.fragment);
|
|
3844
|
+
t = text(" Billing Portal");
|
|
3845
|
+
attr(button, "class", "ms-modal__profile-option");
|
|
3846
|
+
},
|
|
3847
|
+
m: function (target, anchor) {
|
|
3848
|
+
insert(target, button, anchor);
|
|
3849
|
+
mount_component(linkouticon, button, null);
|
|
3850
|
+
append(button, t);
|
|
3851
|
+
current = true;
|
|
3852
|
+
if (!mounted) {
|
|
3853
|
+
dispose = listen(button, "click", /*launchPortal*/ ctx[4]);
|
|
3854
|
+
mounted = true;
|
|
3855
|
+
}
|
|
3856
|
+
},
|
|
3857
|
+
p: noop,
|
|
3858
|
+
i: function (local) {
|
|
3859
|
+
if (current)
|
|
3860
|
+
return;
|
|
3861
|
+
transition_in(linkouticon.$$.fragment, local);
|
|
3862
|
+
current = true;
|
|
3863
|
+
},
|
|
3864
|
+
o: function (local) {
|
|
3865
|
+
transition_out(linkouticon.$$.fragment, local);
|
|
3866
|
+
current = false;
|
|
3867
|
+
},
|
|
3868
|
+
d: function (detaching) {
|
|
3869
|
+
if (detaching)
|
|
3870
|
+
detach(button);
|
|
3871
|
+
destroy_component(linkouticon);
|
|
3872
|
+
mounted = false;
|
|
3873
|
+
dispose();
|
|
3874
|
+
}
|
|
3875
|
+
};
|
|
3876
|
+
}
|
|
3877
|
+
function create_fragment$7(ctx) {
|
|
3878
|
+
var t0;
|
|
3879
|
+
var button0;
|
|
3880
|
+
var securityicon;
|
|
3881
|
+
var t1;
|
|
3882
|
+
var t2;
|
|
3883
|
+
var t3;
|
|
3884
|
+
var button1;
|
|
3885
|
+
var logouticon;
|
|
3886
|
+
var t4;
|
|
3887
|
+
var current;
|
|
3888
|
+
var mounted;
|
|
3889
|
+
var dispose;
|
|
3890
|
+
var if_block0 = !ctx[2] && create_if_block_1$2(ctx);
|
|
3891
|
+
securityicon = new SecurityIcon({});
|
|
3892
|
+
var if_block1 = /*member*/ ctx[1].stripeCustomerId && create_if_block$3(ctx);
|
|
3064
3893
|
logouticon = new LogoutIcon({});
|
|
3065
3894
|
return {
|
|
3066
3895
|
c: function () {
|
|
3896
|
+
if (if_block0)
|
|
3897
|
+
if_block0.c();
|
|
3898
|
+
t0 = space();
|
|
3067
3899
|
button0 = element("button");
|
|
3068
|
-
create_component(profileicon.$$.fragment);
|
|
3069
|
-
t0 = text(" Profile");
|
|
3070
|
-
t1 = space();
|
|
3071
|
-
button1 = element("button");
|
|
3072
3900
|
create_component(securityicon.$$.fragment);
|
|
3073
|
-
|
|
3901
|
+
t1 = text(" Security");
|
|
3902
|
+
t2 = space();
|
|
3903
|
+
if (if_block1)
|
|
3904
|
+
if_block1.c();
|
|
3074
3905
|
t3 = space();
|
|
3075
|
-
|
|
3076
|
-
create_component(linkouticon.$$.fragment);
|
|
3077
|
-
t4 = text(" Billing Portal");
|
|
3078
|
-
t5 = space();
|
|
3079
|
-
button3 = element("button");
|
|
3906
|
+
button1 = element("button");
|
|
3080
3907
|
create_component(logouticon.$$.fragment);
|
|
3081
|
-
|
|
3908
|
+
t4 = text(" Logout");
|
|
3082
3909
|
attr(button0, "class", "ms-modal__profile-option");
|
|
3083
|
-
toggle_class(button0, "ms-modal__profile-option--active", /*displayProfile*/ ctx[0] === "
|
|
3910
|
+
toggle_class(button0, "ms-modal__profile-option--active", /*displayProfile*/ ctx[0] === "security" || /*displayProfile*/ ctx[0] === "changePassword");
|
|
3084
3911
|
attr(button1, "class", "ms-modal__profile-option");
|
|
3085
|
-
toggle_class(button1, "ms-modal__profile-option--active", /*displayProfile*/ ctx[0] === "security" || /*displayProfile*/ ctx[0] === "changePassword");
|
|
3086
|
-
attr(button2, "class", "ms-modal__profile-option");
|
|
3087
|
-
attr(button3, "class", "ms-modal__profile-option");
|
|
3088
3912
|
},
|
|
3089
3913
|
m: function (target, anchor) {
|
|
3914
|
+
if (if_block0)
|
|
3915
|
+
if_block0.m(target, anchor);
|
|
3916
|
+
insert(target, t0, anchor);
|
|
3090
3917
|
insert(target, button0, anchor);
|
|
3091
|
-
mount_component(
|
|
3092
|
-
append(button0,
|
|
3093
|
-
insert(target,
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
append(button1, t2);
|
|
3918
|
+
mount_component(securityicon, button0, null);
|
|
3919
|
+
append(button0, t1);
|
|
3920
|
+
insert(target, t2, anchor);
|
|
3921
|
+
if (if_block1)
|
|
3922
|
+
if_block1.m(target, anchor);
|
|
3097
3923
|
insert(target, t3, anchor);
|
|
3098
|
-
insert(target,
|
|
3099
|
-
mount_component(
|
|
3100
|
-
append(
|
|
3101
|
-
insert(target, t5, anchor);
|
|
3102
|
-
insert(target, button3, anchor);
|
|
3103
|
-
mount_component(logouticon, button3, null);
|
|
3104
|
-
append(button3, t6);
|
|
3924
|
+
insert(target, button1, anchor);
|
|
3925
|
+
mount_component(logouticon, button1, null);
|
|
3926
|
+
append(button1, t4);
|
|
3105
3927
|
current = true;
|
|
3106
3928
|
if (!mounted) {
|
|
3107
3929
|
dispose = [
|
|
3108
|
-
listen(button0, "click", /*
|
|
3109
|
-
listen(button1, "click", /*
|
|
3110
|
-
listen(button2, "click", function () {
|
|
3111
|
-
if (is_function(/*displayBilling*/ ctx[1])) /*displayBilling*/
|
|
3112
|
-
ctx[1].apply(this, arguments);
|
|
3113
|
-
})
|
|
3930
|
+
listen(button0, "click", /*click_handler_1*/ ctx[8]),
|
|
3931
|
+
listen(button1, "click", /*logout*/ ctx[3])
|
|
3114
3932
|
];
|
|
3115
3933
|
mounted = true;
|
|
3116
3934
|
}
|
|
3117
3935
|
},
|
|
3118
|
-
p: function (
|
|
3936
|
+
p: function (ctx, _a) {
|
|
3119
3937
|
var _b = __read(_a, 1), dirty = _b[0];
|
|
3120
|
-
ctx
|
|
3121
|
-
|
|
3122
|
-
|
|
3938
|
+
if (!ctx[2]) {
|
|
3939
|
+
if (if_block0) {
|
|
3940
|
+
if_block0.p(ctx, dirty);
|
|
3941
|
+
if (dirty & /*hideProfileSection*/ 4) {
|
|
3942
|
+
transition_in(if_block0, 1);
|
|
3943
|
+
}
|
|
3944
|
+
}
|
|
3945
|
+
else {
|
|
3946
|
+
if_block0 = create_if_block_1$2(ctx);
|
|
3947
|
+
if_block0.c();
|
|
3948
|
+
transition_in(if_block0, 1);
|
|
3949
|
+
if_block0.m(t0.parentNode, t0);
|
|
3950
|
+
}
|
|
3951
|
+
}
|
|
3952
|
+
else if (if_block0) {
|
|
3953
|
+
group_outros();
|
|
3954
|
+
transition_out(if_block0, 1, 1, function () {
|
|
3955
|
+
if_block0 = null;
|
|
3956
|
+
});
|
|
3957
|
+
check_outros();
|
|
3123
3958
|
}
|
|
3124
3959
|
if (dirty & /*displayProfile*/ 1) {
|
|
3125
|
-
toggle_class(
|
|
3960
|
+
toggle_class(button0, "ms-modal__profile-option--active", /*displayProfile*/ ctx[0] === "security" || /*displayProfile*/ ctx[0] === "changePassword");
|
|
3961
|
+
}
|
|
3962
|
+
if ( /*member*/ctx[1].stripeCustomerId) {
|
|
3963
|
+
if (if_block1) {
|
|
3964
|
+
if_block1.p(ctx, dirty);
|
|
3965
|
+
if (dirty & /*member*/ 2) {
|
|
3966
|
+
transition_in(if_block1, 1);
|
|
3967
|
+
}
|
|
3968
|
+
}
|
|
3969
|
+
else {
|
|
3970
|
+
if_block1 = create_if_block$3(ctx);
|
|
3971
|
+
if_block1.c();
|
|
3972
|
+
transition_in(if_block1, 1);
|
|
3973
|
+
if_block1.m(t3.parentNode, t3);
|
|
3974
|
+
}
|
|
3975
|
+
}
|
|
3976
|
+
else if (if_block1) {
|
|
3977
|
+
group_outros();
|
|
3978
|
+
transition_out(if_block1, 1, 1, function () {
|
|
3979
|
+
if_block1 = null;
|
|
3980
|
+
});
|
|
3981
|
+
check_outros();
|
|
3126
3982
|
}
|
|
3127
3983
|
},
|
|
3128
3984
|
i: function (local) {
|
|
3129
3985
|
if (current)
|
|
3130
3986
|
return;
|
|
3131
|
-
transition_in(
|
|
3987
|
+
transition_in(if_block0);
|
|
3132
3988
|
transition_in(securityicon.$$.fragment, local);
|
|
3133
|
-
transition_in(
|
|
3989
|
+
transition_in(if_block1);
|
|
3134
3990
|
transition_in(logouticon.$$.fragment, local);
|
|
3135
3991
|
current = true;
|
|
3136
3992
|
},
|
|
3137
3993
|
o: function (local) {
|
|
3138
|
-
transition_out(
|
|
3994
|
+
transition_out(if_block0);
|
|
3139
3995
|
transition_out(securityicon.$$.fragment, local);
|
|
3140
|
-
transition_out(
|
|
3996
|
+
transition_out(if_block1);
|
|
3141
3997
|
transition_out(logouticon.$$.fragment, local);
|
|
3142
3998
|
current = false;
|
|
3143
3999
|
},
|
|
3144
4000
|
d: function (detaching) {
|
|
4001
|
+
if (if_block0)
|
|
4002
|
+
if_block0.d(detaching);
|
|
3145
4003
|
if (detaching)
|
|
3146
|
-
detach(
|
|
3147
|
-
destroy_component(profileicon);
|
|
3148
|
-
if (detaching)
|
|
3149
|
-
detach(t1);
|
|
4004
|
+
detach(t0);
|
|
3150
4005
|
if (detaching)
|
|
3151
|
-
detach(
|
|
4006
|
+
detach(button0);
|
|
3152
4007
|
destroy_component(securityicon);
|
|
3153
4008
|
if (detaching)
|
|
3154
|
-
detach(
|
|
3155
|
-
if (
|
|
3156
|
-
|
|
3157
|
-
destroy_component(linkouticon);
|
|
4009
|
+
detach(t2);
|
|
4010
|
+
if (if_block1)
|
|
4011
|
+
if_block1.d(detaching);
|
|
3158
4012
|
if (detaching)
|
|
3159
|
-
detach(
|
|
4013
|
+
detach(t3);
|
|
3160
4014
|
if (detaching)
|
|
3161
|
-
detach(
|
|
4015
|
+
detach(button1);
|
|
3162
4016
|
destroy_component(logouticon);
|
|
3163
4017
|
mounted = false;
|
|
3164
4018
|
run_all(dispose);
|
|
@@ -3166,48 +4020,127 @@ function create_fragment$6(ctx) {
|
|
|
3166
4020
|
};
|
|
3167
4021
|
}
|
|
3168
4022
|
function instance$5($$self, $$props, $$invalidate) {
|
|
4023
|
+
var member = $$props.member;
|
|
4024
|
+
var onSuccessLogout = $$props.onSuccessLogout;
|
|
3169
4025
|
var displayProfile = $$props.displayProfile;
|
|
3170
|
-
var
|
|
4026
|
+
var profileLoader = $$props.profileLoader;
|
|
4027
|
+
var hideProfileSection = $$props.hideProfileSection;
|
|
4028
|
+
var unsubscribe = AppStore.subscribe(function (data) {
|
|
4029
|
+
if (!data.initialValue) {
|
|
4030
|
+
var container = document.getElementById("msOverlay");
|
|
4031
|
+
var css = document.createElement("style");
|
|
4032
|
+
var color = data.branding.colors.lightMode.primaryButton;
|
|
4033
|
+
var fullCSS = ".ms-modal__profile-option:hover { color: " + color + ";} .ms-modal__profile-option--active { color: " + color + ";} .ms-modal__save-button { background: " + color + ";} .ms-modal__save-button:disabled { background: " + color + ";}";
|
|
4034
|
+
css.appendChild(document.createTextNode(fullCSS));
|
|
4035
|
+
container.appendChild(css);
|
|
4036
|
+
}
|
|
4037
|
+
});
|
|
4038
|
+
onDestroy(function () {
|
|
4039
|
+
unsubscribe();
|
|
4040
|
+
});
|
|
4041
|
+
function logout(e) {
|
|
4042
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4043
|
+
var data, err_5;
|
|
4044
|
+
return __generator(this, function (_a) {
|
|
4045
|
+
switch (_a.label) {
|
|
4046
|
+
case 0:
|
|
4047
|
+
_a.trys.push([0, 2, , 3]);
|
|
4048
|
+
return [4 /*yield*/, window.$memberstackDom.logout()];
|
|
4049
|
+
case 1:
|
|
4050
|
+
data = (_a.sent()).data;
|
|
4051
|
+
window.$memberstackDom._showMessage("Logout successful", false);
|
|
4052
|
+
onSuccessLogout({ type: "LOGOUT", data: data });
|
|
4053
|
+
return [3 /*break*/, 3];
|
|
4054
|
+
case 2:
|
|
4055
|
+
err_5 = _a.sent();
|
|
4056
|
+
window.$memberstackDom._showMessage(err_5.message, true);
|
|
4057
|
+
return [3 /*break*/, 3];
|
|
4058
|
+
case 3: return [2 /*return*/];
|
|
4059
|
+
}
|
|
4060
|
+
});
|
|
4061
|
+
});
|
|
4062
|
+
}
|
|
4063
|
+
function launchPortal(e) {
|
|
4064
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4065
|
+
return __generator(this, function (_a) {
|
|
4066
|
+
switch (_a.label) {
|
|
4067
|
+
case 0:
|
|
4068
|
+
$$invalidate(5, profileLoader = true);
|
|
4069
|
+
return [4 /*yield*/, window.$memberstackDom.launchStripeCustomerPortal({ priceIds: [], autoRedirect: true })];
|
|
4070
|
+
case 1:
|
|
4071
|
+
_a.sent();
|
|
4072
|
+
return [2 /*return*/];
|
|
4073
|
+
}
|
|
4074
|
+
});
|
|
4075
|
+
});
|
|
4076
|
+
}
|
|
3171
4077
|
var click_handler = function () { return $$invalidate(0, displayProfile = "profile"); };
|
|
3172
4078
|
var click_handler_1 = function () { return $$invalidate(0, displayProfile = "security"); };
|
|
3173
4079
|
$$self.$$set = function ($$props) {
|
|
4080
|
+
if ('member' in $$props)
|
|
4081
|
+
$$invalidate(1, member = $$props.member);
|
|
4082
|
+
if ('onSuccessLogout' in $$props)
|
|
4083
|
+
$$invalidate(6, onSuccessLogout = $$props.onSuccessLogout);
|
|
3174
4084
|
if ('displayProfile' in $$props)
|
|
3175
4085
|
$$invalidate(0, displayProfile = $$props.displayProfile);
|
|
3176
|
-
if ('
|
|
3177
|
-
$$invalidate(
|
|
4086
|
+
if ('profileLoader' in $$props)
|
|
4087
|
+
$$invalidate(5, profileLoader = $$props.profileLoader);
|
|
4088
|
+
if ('hideProfileSection' in $$props)
|
|
4089
|
+
$$invalidate(2, hideProfileSection = $$props.hideProfileSection);
|
|
3178
4090
|
};
|
|
3179
|
-
return [
|
|
4091
|
+
return [
|
|
4092
|
+
displayProfile,
|
|
4093
|
+
member,
|
|
4094
|
+
hideProfileSection,
|
|
4095
|
+
logout,
|
|
4096
|
+
launchPortal,
|
|
4097
|
+
profileLoader,
|
|
4098
|
+
onSuccessLogout,
|
|
4099
|
+
click_handler,
|
|
4100
|
+
click_handler_1
|
|
4101
|
+
];
|
|
3180
4102
|
}
|
|
3181
4103
|
var ProfileModalNav = /** @class */ (function (_super) {
|
|
3182
4104
|
__extends(ProfileModalNav, _super);
|
|
3183
4105
|
function ProfileModalNav(options) {
|
|
3184
4106
|
var _this = _super.call(this) || this;
|
|
3185
|
-
init(_this, options, instance$5, create_fragment$
|
|
4107
|
+
init(_this, options, instance$5, create_fragment$7, safe_not_equal, {
|
|
4108
|
+
member: 1,
|
|
4109
|
+
onSuccessLogout: 6,
|
|
4110
|
+
displayProfile: 0,
|
|
4111
|
+
profileLoader: 5,
|
|
4112
|
+
hideProfileSection: 2
|
|
4113
|
+
});
|
|
3186
4114
|
return _this;
|
|
3187
4115
|
}
|
|
3188
4116
|
return ProfileModalNav;
|
|
3189
4117
|
}(SvelteComponent));
|
|
3190
|
-
/* src/components/
|
|
4118
|
+
/* src/components/ProfileInfoContent.svelte generated by Svelte v3.48.0 */
|
|
3191
4119
|
function get_each_context(ctx, list, i) {
|
|
3192
4120
|
var child_ctx = ctx.slice();
|
|
3193
|
-
child_ctx[
|
|
3194
|
-
child_ctx[
|
|
4121
|
+
child_ctx[5] = list[i];
|
|
4122
|
+
child_ctx[6] = list;
|
|
4123
|
+
child_ctx[7] = i;
|
|
3195
4124
|
return child_ctx;
|
|
3196
4125
|
}
|
|
3197
|
-
// (
|
|
3198
|
-
function
|
|
4126
|
+
// (26:2) {#if customField.hidden !== true}
|
|
4127
|
+
function create_if_block$2(ctx) {
|
|
3199
4128
|
var div1;
|
|
3200
4129
|
var div0;
|
|
3201
4130
|
var label;
|
|
3202
|
-
var t0_value = /*customField*/ ctx[
|
|
4131
|
+
var t0_value = /*customField*/ ctx[5].label + "";
|
|
3203
4132
|
var t0;
|
|
3204
4133
|
var label_for_value;
|
|
3205
4134
|
var t1;
|
|
3206
4135
|
var input;
|
|
3207
4136
|
var input_placeholder_value;
|
|
3208
4137
|
var input_name_value;
|
|
3209
|
-
var input_value_value;
|
|
3210
4138
|
var t2;
|
|
4139
|
+
var mounted;
|
|
4140
|
+
var dispose;
|
|
4141
|
+
function input_input_handler() {
|
|
4142
|
+
/*input_input_handler*/ ctx[4].call(input, /*customField*/ ctx[5]);
|
|
4143
|
+
}
|
|
3211
4144
|
return {
|
|
3212
4145
|
c: function () {
|
|
3213
4146
|
div1 = element("div");
|
|
@@ -3218,12 +4151,11 @@ function create_each_block(ctx) {
|
|
|
3218
4151
|
input = element("input");
|
|
3219
4152
|
t2 = space();
|
|
3220
4153
|
attr(label, "class", "ms-form__label");
|
|
3221
|
-
attr(label, "for", label_for_value = /*customField*/ ctx[
|
|
4154
|
+
attr(label, "for", label_for_value = /*customField*/ ctx[5].key);
|
|
3222
4155
|
attr(input, "class", "ms-form__input");
|
|
3223
4156
|
attr(input, "type", "text");
|
|
3224
|
-
attr(input, "placeholder", input_placeholder_value = /*customField*/ ctx[
|
|
3225
|
-
attr(input, "name", input_name_value = /*customField*/ ctx[
|
|
3226
|
-
input.value = input_value_value = /*customField*/ ctx[1].value;
|
|
4157
|
+
attr(input, "placeholder", input_placeholder_value = /*customField*/ ctx[5].label);
|
|
4158
|
+
attr(input, "name", input_name_value = /*customField*/ ctx[5].key);
|
|
3227
4159
|
attr(div0, "class", "ms-form__group");
|
|
3228
4160
|
attr(div1, "class", "ms-modal__custom-field-container");
|
|
3229
4161
|
},
|
|
@@ -3234,22 +4166,88 @@ function create_each_block(ctx) {
|
|
|
3234
4166
|
append(label, t0);
|
|
3235
4167
|
append(div0, t1);
|
|
3236
4168
|
append(div0, input);
|
|
4169
|
+
set_input_value(input, /*member*/ ctx[0].customFields[ /*customField*/ctx[5].key]);
|
|
3237
4170
|
append(div1, t2);
|
|
4171
|
+
if (!mounted) {
|
|
4172
|
+
dispose = listen(input, "input", input_input_handler);
|
|
4173
|
+
mounted = true;
|
|
4174
|
+
}
|
|
4175
|
+
},
|
|
4176
|
+
p: function (new_ctx, dirty) {
|
|
4177
|
+
ctx = new_ctx;
|
|
4178
|
+
if (dirty & /*customFields*/ 2 && t0_value !== (t0_value = /*customField*/ ctx[5].label + ""))
|
|
4179
|
+
set_data(t0, t0_value);
|
|
4180
|
+
if (dirty & /*customFields*/ 2 && label_for_value !== (label_for_value = /*customField*/ ctx[5].key)) {
|
|
4181
|
+
attr(label, "for", label_for_value);
|
|
4182
|
+
}
|
|
4183
|
+
if (dirty & /*customFields*/ 2 && input_placeholder_value !== (input_placeholder_value = /*customField*/ ctx[5].label)) {
|
|
4184
|
+
attr(input, "placeholder", input_placeholder_value);
|
|
4185
|
+
}
|
|
4186
|
+
if (dirty & /*customFields*/ 2 && input_name_value !== (input_name_value = /*customField*/ ctx[5].key)) {
|
|
4187
|
+
attr(input, "name", input_name_value);
|
|
4188
|
+
}
|
|
4189
|
+
if (dirty & /*member, customFields*/ 3 && input.value !== /*member*/ ctx[0].customFields[ /*customField*/ctx[5].key]) {
|
|
4190
|
+
set_input_value(input, /*member*/ ctx[0].customFields[ /*customField*/ctx[5].key]);
|
|
4191
|
+
}
|
|
3238
4192
|
},
|
|
3239
|
-
p: noop,
|
|
3240
4193
|
d: function (detaching) {
|
|
3241
4194
|
if (detaching)
|
|
3242
4195
|
detach(div1);
|
|
4196
|
+
mounted = false;
|
|
4197
|
+
dispose();
|
|
3243
4198
|
}
|
|
3244
4199
|
};
|
|
3245
4200
|
}
|
|
3246
|
-
|
|
4201
|
+
// (25:1) {#each customFields as customField, i}
|
|
4202
|
+
function create_each_block(ctx) {
|
|
4203
|
+
var if_block_anchor;
|
|
4204
|
+
var if_block = /*customField*/ ctx[5].hidden !== true && create_if_block$2(ctx);
|
|
4205
|
+
return {
|
|
4206
|
+
c: function () {
|
|
4207
|
+
if (if_block)
|
|
4208
|
+
if_block.c();
|
|
4209
|
+
if_block_anchor = empty();
|
|
4210
|
+
},
|
|
4211
|
+
m: function (target, anchor) {
|
|
4212
|
+
if (if_block)
|
|
4213
|
+
if_block.m(target, anchor);
|
|
4214
|
+
insert(target, if_block_anchor, anchor);
|
|
4215
|
+
},
|
|
4216
|
+
p: function (ctx, dirty) {
|
|
4217
|
+
if ( /*customField*/ctx[5].hidden !== true) {
|
|
4218
|
+
if (if_block) {
|
|
4219
|
+
if_block.p(ctx, dirty);
|
|
4220
|
+
}
|
|
4221
|
+
else {
|
|
4222
|
+
if_block = create_if_block$2(ctx);
|
|
4223
|
+
if_block.c();
|
|
4224
|
+
if_block.m(if_block_anchor.parentNode, if_block_anchor);
|
|
4225
|
+
}
|
|
4226
|
+
}
|
|
4227
|
+
else if (if_block) {
|
|
4228
|
+
if_block.d(1);
|
|
4229
|
+
if_block = null;
|
|
4230
|
+
}
|
|
4231
|
+
},
|
|
4232
|
+
d: function (detaching) {
|
|
4233
|
+
if (if_block)
|
|
4234
|
+
if_block.d(detaching);
|
|
4235
|
+
if (detaching)
|
|
4236
|
+
detach(if_block_anchor);
|
|
4237
|
+
}
|
|
4238
|
+
};
|
|
4239
|
+
}
|
|
4240
|
+
function create_fragment$6(ctx) {
|
|
3247
4241
|
var div1;
|
|
3248
|
-
var
|
|
4242
|
+
var h2;
|
|
4243
|
+
var t1;
|
|
4244
|
+
var div0;
|
|
4245
|
+
var button;
|
|
4246
|
+
var t3;
|
|
3249
4247
|
var form;
|
|
3250
4248
|
var mounted;
|
|
3251
4249
|
var dispose;
|
|
3252
|
-
var each_value = /*customFields*/ ctx[
|
|
4250
|
+
var each_value = /*customFields*/ ctx[1];
|
|
3253
4251
|
var each_blocks = [];
|
|
3254
4252
|
for (var i = 0; i < each_value.length; i += 1) {
|
|
3255
4253
|
each_blocks[i] = create_each_block(get_each_context(ctx, each_value, i));
|
|
@@ -3257,12 +4255,20 @@ function create_fragment$5(ctx) {
|
|
|
3257
4255
|
return {
|
|
3258
4256
|
c: function () {
|
|
3259
4257
|
div1 = element("div");
|
|
3260
|
-
|
|
3261
|
-
|
|
4258
|
+
h2 = element("h2");
|
|
4259
|
+
h2.textContent = "Profile Information";
|
|
4260
|
+
t1 = space();
|
|
4261
|
+
div0 = element("div");
|
|
4262
|
+
button = element("button");
|
|
4263
|
+
button.textContent = "Save";
|
|
4264
|
+
t3 = space();
|
|
3262
4265
|
form = element("form");
|
|
3263
4266
|
for (var i = 0; i < each_blocks.length; i += 1) {
|
|
3264
4267
|
each_blocks[i].c();
|
|
3265
4268
|
}
|
|
4269
|
+
attr(h2, "class", "ms-modal__title ms-modal__title--profile");
|
|
4270
|
+
attr(button, "class", "ms-modal__save-button");
|
|
4271
|
+
attr(div0, "class", "ms-modal__action-container");
|
|
3266
4272
|
attr(div1, "class", "ms-modal__title-container");
|
|
3267
4273
|
attr(form, "class", "ms-form");
|
|
3268
4274
|
attr(form, "action", "");
|
|
@@ -3271,20 +4277,27 @@ function create_fragment$5(ctx) {
|
|
|
3271
4277
|
},
|
|
3272
4278
|
m: function (target, anchor) {
|
|
3273
4279
|
insert(target, div1, anchor);
|
|
3274
|
-
|
|
4280
|
+
append(div1, h2);
|
|
4281
|
+
append(div1, t1);
|
|
4282
|
+
append(div1, div0);
|
|
4283
|
+
append(div0, button);
|
|
4284
|
+
insert(target, t3, anchor);
|
|
3275
4285
|
insert(target, form, anchor);
|
|
3276
4286
|
for (var i = 0; i < each_blocks.length; i += 1) {
|
|
3277
4287
|
each_blocks[i].m(form, null);
|
|
3278
4288
|
}
|
|
3279
4289
|
if (!mounted) {
|
|
3280
|
-
dispose =
|
|
4290
|
+
dispose = [
|
|
4291
|
+
listen(button, "click", /*saveProfile*/ ctx[2]),
|
|
4292
|
+
listen(form, "submit", stop_propagation(prevent_default(/*saveProfile*/ ctx[2])))
|
|
4293
|
+
];
|
|
3281
4294
|
mounted = true;
|
|
3282
4295
|
}
|
|
3283
4296
|
},
|
|
3284
4297
|
p: function (ctx, _a) {
|
|
3285
4298
|
var _b = __read(_a, 1), dirty = _b[0];
|
|
3286
|
-
if (dirty & /*customFields*/
|
|
3287
|
-
each_value = /*customFields*/ ctx[
|
|
4299
|
+
if (dirty & /*customFields, member*/ 3) {
|
|
4300
|
+
each_value = /*customFields*/ ctx[1];
|
|
3288
4301
|
var i = void 0;
|
|
3289
4302
|
for (i = 0; i < each_value.length; i += 1) {
|
|
3290
4303
|
var child_ctx = get_each_context(ctx, each_value, i);
|
|
@@ -3309,65 +4322,63 @@ function create_fragment$5(ctx) {
|
|
|
3309
4322
|
if (detaching)
|
|
3310
4323
|
detach(div1);
|
|
3311
4324
|
if (detaching)
|
|
3312
|
-
detach(
|
|
4325
|
+
detach(t3);
|
|
3313
4326
|
if (detaching)
|
|
3314
4327
|
detach(form);
|
|
3315
4328
|
destroy_each(each_blocks, detaching);
|
|
3316
4329
|
mounted = false;
|
|
3317
|
-
dispose
|
|
4330
|
+
run_all(dispose);
|
|
3318
4331
|
}
|
|
3319
4332
|
};
|
|
3320
4333
|
}
|
|
3321
|
-
function
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
return __generator(this, function (_a) {
|
|
3339
|
-
console.log(e);
|
|
3340
|
-
return [2 /*return*/];
|
|
4334
|
+
function instance$4($$self, $$props, $$invalidate) {
|
|
4335
|
+
var customFields = $$props.customFields;
|
|
4336
|
+
var member = $$props.member;
|
|
4337
|
+
var profileLoader = $$props.profileLoader;
|
|
4338
|
+
function saveProfile(e) {
|
|
4339
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4340
|
+
return __generator(this, function (_a) {
|
|
4341
|
+
switch (_a.label) {
|
|
4342
|
+
case 0:
|
|
4343
|
+
$$invalidate(3, profileLoader = true);
|
|
4344
|
+
return [4 /*yield*/, window.$memberstackDom.updateMember({ customFields: member.customFields })];
|
|
4345
|
+
case 1:
|
|
4346
|
+
_a.sent();
|
|
4347
|
+
$$invalidate(3, profileLoader = false);
|
|
4348
|
+
return [2 /*return*/];
|
|
4349
|
+
}
|
|
4350
|
+
});
|
|
3341
4351
|
});
|
|
3342
|
-
}
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
];
|
|
3357
|
-
getMember();
|
|
3358
|
-
return [customFields];
|
|
4352
|
+
}
|
|
4353
|
+
function input_input_handler(customField) {
|
|
4354
|
+
member.customFields[customField.key] = this.value;
|
|
4355
|
+
$$invalidate(0, member);
|
|
4356
|
+
}
|
|
4357
|
+
$$self.$$set = function ($$props) {
|
|
4358
|
+
if ('customFields' in $$props)
|
|
4359
|
+
$$invalidate(1, customFields = $$props.customFields);
|
|
4360
|
+
if ('member' in $$props)
|
|
4361
|
+
$$invalidate(0, member = $$props.member);
|
|
4362
|
+
if ('profileLoader' in $$props)
|
|
4363
|
+
$$invalidate(3, profileLoader = $$props.profileLoader);
|
|
4364
|
+
};
|
|
4365
|
+
return [member, customFields, saveProfile, profileLoader, input_input_handler];
|
|
3359
4366
|
}
|
|
3360
|
-
var
|
|
3361
|
-
__extends(
|
|
3362
|
-
function
|
|
4367
|
+
var ProfileInfoContent = /** @class */ (function (_super) {
|
|
4368
|
+
__extends(ProfileInfoContent, _super);
|
|
4369
|
+
function ProfileInfoContent(options) {
|
|
3363
4370
|
var _this = _super.call(this) || this;
|
|
3364
|
-
init(_this, options, instance$4, create_fragment$
|
|
4371
|
+
init(_this, options, instance$4, create_fragment$6, safe_not_equal, {
|
|
4372
|
+
customFields: 1,
|
|
4373
|
+
member: 0,
|
|
4374
|
+
profileLoader: 3
|
|
4375
|
+
});
|
|
3365
4376
|
return _this;
|
|
3366
4377
|
}
|
|
3367
|
-
return
|
|
4378
|
+
return ProfileInfoContent;
|
|
3368
4379
|
}(SvelteComponent));
|
|
3369
4380
|
/* src/icons/PasswordLockIcon.svelte generated by Svelte v3.48.0 */
|
|
3370
|
-
function create_fragment$
|
|
4381
|
+
function create_fragment$5(ctx) {
|
|
3371
4382
|
var svg;
|
|
3372
4383
|
var path;
|
|
3373
4384
|
return {
|
|
@@ -3397,42 +4408,74 @@ var PasswordLockIcon = /** @class */ (function (_super) {
|
|
|
3397
4408
|
__extends(PasswordLockIcon, _super);
|
|
3398
4409
|
function PasswordLockIcon(options) {
|
|
3399
4410
|
var _this = _super.call(this) || this;
|
|
3400
|
-
init(_this, options, null, create_fragment$
|
|
4411
|
+
init(_this, options, null, create_fragment$5, safe_not_equal, {});
|
|
3401
4412
|
return _this;
|
|
3402
4413
|
}
|
|
3403
4414
|
return PasswordLockIcon;
|
|
3404
4415
|
}(SvelteComponent));
|
|
3405
4416
|
/* src/components/SecurityInfoContent.svelte generated by Svelte v3.48.0 */
|
|
3406
|
-
function create_fragment$
|
|
4417
|
+
function create_fragment$4(ctx) {
|
|
3407
4418
|
var div1;
|
|
3408
|
-
var
|
|
4419
|
+
var h2;
|
|
4420
|
+
var t1;
|
|
4421
|
+
var div0;
|
|
4422
|
+
var button0;
|
|
4423
|
+
var t2;
|
|
4424
|
+
var button0_disabled_value;
|
|
4425
|
+
var t3;
|
|
3409
4426
|
var form;
|
|
3410
4427
|
var emailinput;
|
|
3411
|
-
var
|
|
4428
|
+
var updating_emailInputValid;
|
|
4429
|
+
var updating_emailValue;
|
|
4430
|
+
var t4;
|
|
3412
4431
|
var label;
|
|
3413
|
-
var
|
|
3414
|
-
var
|
|
4432
|
+
var t6;
|
|
4433
|
+
var button1;
|
|
3415
4434
|
var passwordlockicon;
|
|
3416
|
-
var
|
|
4435
|
+
var t7;
|
|
3417
4436
|
var current;
|
|
3418
4437
|
var mounted;
|
|
3419
4438
|
var dispose;
|
|
3420
|
-
|
|
4439
|
+
function emailinput_emailInputValid_binding(value) {
|
|
4440
|
+
/*emailinput_emailInputValid_binding*/ ctx[5](value);
|
|
4441
|
+
}
|
|
4442
|
+
function emailinput_emailValue_binding(value) {
|
|
4443
|
+
/*emailinput_emailValue_binding*/ ctx[6](value);
|
|
4444
|
+
}
|
|
4445
|
+
var emailinput_props = {};
|
|
4446
|
+
if ( /*emailInputValid*/ctx[2] !== void 0) {
|
|
4447
|
+
emailinput_props.emailInputValid = /*emailInputValid*/ ctx[2];
|
|
4448
|
+
}
|
|
4449
|
+
if ( /*emailValue*/ctx[1] !== void 0) {
|
|
4450
|
+
emailinput_props.emailValue = /*emailValue*/ ctx[1];
|
|
4451
|
+
}
|
|
4452
|
+
emailinput = new EmailInput({ props: emailinput_props });
|
|
4453
|
+
binding_callbacks.push(function () { return bind(emailinput, 'emailInputValid', emailinput_emailInputValid_binding); });
|
|
4454
|
+
binding_callbacks.push(function () { return bind(emailinput, 'emailValue', emailinput_emailValue_binding); });
|
|
3421
4455
|
passwordlockicon = new PasswordLockIcon({});
|
|
3422
4456
|
return {
|
|
3423
4457
|
c: function () {
|
|
3424
4458
|
div1 = element("div");
|
|
3425
|
-
|
|
3426
|
-
|
|
4459
|
+
h2 = element("h2");
|
|
4460
|
+
h2.textContent = "Security";
|
|
4461
|
+
t1 = space();
|
|
4462
|
+
div0 = element("div");
|
|
4463
|
+
button0 = element("button");
|
|
4464
|
+
t2 = text("Save");
|
|
4465
|
+
t3 = space();
|
|
3427
4466
|
form = element("form");
|
|
3428
4467
|
create_component(emailinput.$$.fragment);
|
|
3429
|
-
|
|
4468
|
+
t4 = space();
|
|
3430
4469
|
label = element("label");
|
|
3431
4470
|
label.textContent = "Password";
|
|
3432
|
-
|
|
3433
|
-
|
|
4471
|
+
t6 = space();
|
|
4472
|
+
button1 = element("button");
|
|
3434
4473
|
create_component(passwordlockicon.$$.fragment);
|
|
3435
|
-
|
|
4474
|
+
t7 = text(" Set Password");
|
|
4475
|
+
attr(h2, "class", "ms-modal__title ms-modal__title--profile");
|
|
4476
|
+
attr(button0, "class", "ms-modal__save-button");
|
|
4477
|
+
button0.disabled = button0_disabled_value = !ctx[2];
|
|
4478
|
+
attr(div0, "class", "ms-modal__action-container");
|
|
3436
4479
|
attr(div1, "class", "ms-modal__title-container");
|
|
3437
4480
|
attr(form, "class", "ms-form");
|
|
3438
4481
|
attr(form, "action", "");
|
|
@@ -3440,30 +4483,53 @@ function create_fragment$3(ctx) {
|
|
|
3440
4483
|
attr(form, "autocomplete", "off");
|
|
3441
4484
|
attr(label, "class", "ms-modal__button-label");
|
|
3442
4485
|
attr(label, "for", "setPassword");
|
|
3443
|
-
attr(
|
|
3444
|
-
attr(
|
|
4486
|
+
attr(button1, "class", "ms-modal__outline-button");
|
|
4487
|
+
attr(button1, "name", "setPassword");
|
|
3445
4488
|
},
|
|
3446
4489
|
m: function (target, anchor) {
|
|
3447
4490
|
insert(target, div1, anchor);
|
|
3448
|
-
|
|
4491
|
+
append(div1, h2);
|
|
4492
|
+
append(div1, t1);
|
|
4493
|
+
append(div1, div0);
|
|
4494
|
+
append(div0, button0);
|
|
4495
|
+
append(button0, t2);
|
|
4496
|
+
insert(target, t3, anchor);
|
|
3449
4497
|
insert(target, form, anchor);
|
|
3450
4498
|
mount_component(emailinput, form, null);
|
|
3451
|
-
insert(target,
|
|
4499
|
+
insert(target, t4, anchor);
|
|
3452
4500
|
insert(target, label, anchor);
|
|
3453
|
-
insert(target,
|
|
3454
|
-
insert(target,
|
|
3455
|
-
mount_component(passwordlockicon,
|
|
3456
|
-
append(
|
|
4501
|
+
insert(target, t6, anchor);
|
|
4502
|
+
insert(target, button1, anchor);
|
|
4503
|
+
mount_component(passwordlockicon, button1, null);
|
|
4504
|
+
append(button1, t7);
|
|
3457
4505
|
current = true;
|
|
3458
4506
|
if (!mounted) {
|
|
3459
4507
|
dispose = [
|
|
3460
|
-
listen(
|
|
3461
|
-
listen(
|
|
4508
|
+
listen(button0, "click", /*submitEmailChange*/ ctx[3]),
|
|
4509
|
+
listen(form, "submit", stop_propagation(prevent_default(/*submitEmailChange*/ ctx[3]))),
|
|
4510
|
+
listen(button1, "click", /*click_handler*/ ctx[7])
|
|
3462
4511
|
];
|
|
3463
4512
|
mounted = true;
|
|
3464
4513
|
}
|
|
3465
4514
|
},
|
|
3466
|
-
p:
|
|
4515
|
+
p: function (ctx, _a) {
|
|
4516
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
4517
|
+
if (!current || dirty & /*emailInputValid*/ 4 && button0_disabled_value !== (button0_disabled_value = !ctx[2])) {
|
|
4518
|
+
button0.disabled = button0_disabled_value;
|
|
4519
|
+
}
|
|
4520
|
+
var emailinput_changes = {};
|
|
4521
|
+
if (!updating_emailInputValid && dirty & /*emailInputValid*/ 4) {
|
|
4522
|
+
updating_emailInputValid = true;
|
|
4523
|
+
emailinput_changes.emailInputValid = /*emailInputValid*/ ctx[2];
|
|
4524
|
+
add_flush_callback(function () { return updating_emailInputValid = false; });
|
|
4525
|
+
}
|
|
4526
|
+
if (!updating_emailValue && dirty & /*emailValue*/ 2) {
|
|
4527
|
+
updating_emailValue = true;
|
|
4528
|
+
emailinput_changes.emailValue = /*emailValue*/ ctx[1];
|
|
4529
|
+
add_flush_callback(function () { return updating_emailValue = false; });
|
|
4530
|
+
}
|
|
4531
|
+
emailinput.$set(emailinput_changes);
|
|
4532
|
+
},
|
|
3467
4533
|
i: function (local) {
|
|
3468
4534
|
if (current)
|
|
3469
4535
|
return;
|
|
@@ -3480,52 +4546,100 @@ function create_fragment$3(ctx) {
|
|
|
3480
4546
|
if (detaching)
|
|
3481
4547
|
detach(div1);
|
|
3482
4548
|
if (detaching)
|
|
3483
|
-
detach(
|
|
4549
|
+
detach(t3);
|
|
3484
4550
|
if (detaching)
|
|
3485
4551
|
detach(form);
|
|
3486
4552
|
destroy_component(emailinput);
|
|
3487
4553
|
if (detaching)
|
|
3488
|
-
detach(
|
|
4554
|
+
detach(t4);
|
|
3489
4555
|
if (detaching)
|
|
3490
4556
|
detach(label);
|
|
3491
4557
|
if (detaching)
|
|
3492
|
-
detach(
|
|
4558
|
+
detach(t6);
|
|
3493
4559
|
if (detaching)
|
|
3494
|
-
detach(
|
|
4560
|
+
detach(button1);
|
|
3495
4561
|
destroy_component(passwordlockicon);
|
|
3496
4562
|
mounted = false;
|
|
3497
4563
|
run_all(dispose);
|
|
3498
4564
|
}
|
|
3499
4565
|
};
|
|
3500
4566
|
}
|
|
3501
|
-
function submitEmailChange(e) {
|
|
3502
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3503
|
-
return __generator(this, function (_a) {
|
|
3504
|
-
console.log(e);
|
|
3505
|
-
return [2 /*return*/];
|
|
3506
|
-
});
|
|
3507
|
-
});
|
|
3508
|
-
}
|
|
3509
4567
|
function instance$3($$self, $$props, $$invalidate) {
|
|
3510
4568
|
var displayProfile = $$props.displayProfile;
|
|
4569
|
+
var emailValue = $$props.emailValue;
|
|
4570
|
+
var profileLoader = $$props.profileLoader;
|
|
4571
|
+
var emailInputValid = false;
|
|
4572
|
+
function submitEmailChange(e) {
|
|
4573
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4574
|
+
var err_6;
|
|
4575
|
+
return __generator(this, function (_a) {
|
|
4576
|
+
switch (_a.label) {
|
|
4577
|
+
case 0:
|
|
4578
|
+
if (!emailInputValid || !emailValue)
|
|
4579
|
+
return [2 /*return*/];
|
|
4580
|
+
$$invalidate(4, profileLoader = true);
|
|
4581
|
+
_a.label = 1;
|
|
4582
|
+
case 1:
|
|
4583
|
+
_a.trys.push([1, 3, , 4]);
|
|
4584
|
+
return [4 /*yield*/, window.$memberstackDom.updateMemberAuth({ email: emailValue })];
|
|
4585
|
+
case 2:
|
|
4586
|
+
_a.sent();
|
|
4587
|
+
window.$memberstackDom._showMessage("Email successfully changed", false);
|
|
4588
|
+
$$invalidate(4, profileLoader = false);
|
|
4589
|
+
return [3 /*break*/, 4];
|
|
4590
|
+
case 3:
|
|
4591
|
+
err_6 = _a.sent();
|
|
4592
|
+
window.$memberstackDom._showMessage(err_6.message, true);
|
|
4593
|
+
$$invalidate(4, profileLoader = false);
|
|
4594
|
+
return [3 /*break*/, 4];
|
|
4595
|
+
case 4: return [2 /*return*/];
|
|
4596
|
+
}
|
|
4597
|
+
});
|
|
4598
|
+
});
|
|
4599
|
+
}
|
|
4600
|
+
function emailinput_emailInputValid_binding(value) {
|
|
4601
|
+
emailInputValid = value;
|
|
4602
|
+
$$invalidate(2, emailInputValid);
|
|
4603
|
+
}
|
|
4604
|
+
function emailinput_emailValue_binding(value) {
|
|
4605
|
+
emailValue = value;
|
|
4606
|
+
$$invalidate(1, emailValue);
|
|
4607
|
+
}
|
|
3511
4608
|
var click_handler = function () { return $$invalidate(0, displayProfile = "changePassword"); };
|
|
3512
4609
|
$$self.$$set = function ($$props) {
|
|
3513
4610
|
if ('displayProfile' in $$props)
|
|
3514
4611
|
$$invalidate(0, displayProfile = $$props.displayProfile);
|
|
4612
|
+
if ('emailValue' in $$props)
|
|
4613
|
+
$$invalidate(1, emailValue = $$props.emailValue);
|
|
4614
|
+
if ('profileLoader' in $$props)
|
|
4615
|
+
$$invalidate(4, profileLoader = $$props.profileLoader);
|
|
3515
4616
|
};
|
|
3516
|
-
return [
|
|
4617
|
+
return [
|
|
4618
|
+
displayProfile,
|
|
4619
|
+
emailValue,
|
|
4620
|
+
emailInputValid,
|
|
4621
|
+
submitEmailChange,
|
|
4622
|
+
profileLoader,
|
|
4623
|
+
emailinput_emailInputValid_binding,
|
|
4624
|
+
emailinput_emailValue_binding,
|
|
4625
|
+
click_handler
|
|
4626
|
+
];
|
|
3517
4627
|
}
|
|
3518
4628
|
var SecurityInfoContent = /** @class */ (function (_super) {
|
|
3519
4629
|
__extends(SecurityInfoContent, _super);
|
|
3520
4630
|
function SecurityInfoContent(options) {
|
|
3521
4631
|
var _this = _super.call(this) || this;
|
|
3522
|
-
init(_this, options, instance$3, create_fragment$
|
|
4632
|
+
init(_this, options, instance$3, create_fragment$4, safe_not_equal, {
|
|
4633
|
+
displayProfile: 0,
|
|
4634
|
+
emailValue: 1,
|
|
4635
|
+
profileLoader: 4
|
|
4636
|
+
});
|
|
3523
4637
|
return _this;
|
|
3524
4638
|
}
|
|
3525
4639
|
return SecurityInfoContent;
|
|
3526
4640
|
}(SvelteComponent));
|
|
3527
4641
|
/* src/components/PasswordInfoContent.svelte generated by Svelte v3.48.0 */
|
|
3528
|
-
function create_fragment$
|
|
4642
|
+
function create_fragment$3(ctx) {
|
|
3529
4643
|
var div3;
|
|
3530
4644
|
var div1;
|
|
3531
4645
|
var div0;
|
|
@@ -3535,35 +4649,83 @@ function create_fragment$2(ctx) {
|
|
|
3535
4649
|
var h2;
|
|
3536
4650
|
var t2;
|
|
3537
4651
|
var div2;
|
|
3538
|
-
var
|
|
4652
|
+
var button1;
|
|
4653
|
+
var t3;
|
|
4654
|
+
var button1_disabled_value;
|
|
4655
|
+
var t4;
|
|
3539
4656
|
var form;
|
|
3540
4657
|
var passwordinput0;
|
|
3541
|
-
var
|
|
4658
|
+
var updating_passwordValue;
|
|
4659
|
+
var updating_passwordInputValid;
|
|
4660
|
+
var t5;
|
|
3542
4661
|
var passwordinput1;
|
|
3543
|
-
var
|
|
4662
|
+
var updating_passwordValue_1;
|
|
4663
|
+
var updating_passwordInputValid_1;
|
|
4664
|
+
var t6;
|
|
3544
4665
|
var passwordinput2;
|
|
4666
|
+
var updating_passwordValue_2;
|
|
4667
|
+
var updating_passwordInputValid_2;
|
|
3545
4668
|
var current;
|
|
3546
4669
|
var mounted;
|
|
3547
4670
|
var dispose;
|
|
3548
4671
|
backicon = new BackIcon({});
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
}
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3561
|
-
|
|
3562
|
-
|
|
3563
|
-
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
});
|
|
4672
|
+
function passwordinput0_passwordValue_binding(value) {
|
|
4673
|
+
/*passwordinput0_passwordValue_binding*/ ctx[10](value);
|
|
4674
|
+
}
|
|
4675
|
+
function passwordinput0_passwordInputValid_binding(value) {
|
|
4676
|
+
/*passwordinput0_passwordInputValid_binding*/ ctx[11](value);
|
|
4677
|
+
}
|
|
4678
|
+
var passwordinput0_props = {
|
|
4679
|
+
passwordLabel: "Current Password",
|
|
4680
|
+
passwordPlaceholder: "Enter a strong password"
|
|
4681
|
+
};
|
|
4682
|
+
if ( /*currentPasswordValue*/ctx[1] !== void 0) {
|
|
4683
|
+
passwordinput0_props.passwordValue = /*currentPasswordValue*/ ctx[1];
|
|
4684
|
+
}
|
|
4685
|
+
if ( /*currentPasswordValid*/ctx[4] !== void 0) {
|
|
4686
|
+
passwordinput0_props.passwordInputValid = /*currentPasswordValid*/ ctx[4];
|
|
4687
|
+
}
|
|
4688
|
+
passwordinput0 = new PasswordInput({ props: passwordinput0_props });
|
|
4689
|
+
binding_callbacks.push(function () { return bind(passwordinput0, 'passwordValue', passwordinput0_passwordValue_binding); });
|
|
4690
|
+
binding_callbacks.push(function () { return bind(passwordinput0, 'passwordInputValid', passwordinput0_passwordInputValid_binding); });
|
|
4691
|
+
function passwordinput1_passwordValue_binding(value) {
|
|
4692
|
+
/*passwordinput1_passwordValue_binding*/ ctx[12](value);
|
|
4693
|
+
}
|
|
4694
|
+
function passwordinput1_passwordInputValid_binding(value) {
|
|
4695
|
+
/*passwordinput1_passwordInputValid_binding*/ ctx[13](value);
|
|
4696
|
+
}
|
|
4697
|
+
var passwordinput1_props = {
|
|
4698
|
+
passwordLabel: "New Password",
|
|
4699
|
+
passwordPlaceholder: "Enter a strong password"
|
|
4700
|
+
};
|
|
4701
|
+
if ( /*newPasswordValue*/ctx[2] !== void 0) {
|
|
4702
|
+
passwordinput1_props.passwordValue = /*newPasswordValue*/ ctx[2];
|
|
4703
|
+
}
|
|
4704
|
+
if ( /*newPasswordValid*/ctx[5] !== void 0) {
|
|
4705
|
+
passwordinput1_props.passwordInputValid = /*newPasswordValid*/ ctx[5];
|
|
4706
|
+
}
|
|
4707
|
+
passwordinput1 = new PasswordInput({ props: passwordinput1_props });
|
|
4708
|
+
binding_callbacks.push(function () { return bind(passwordinput1, 'passwordValue', passwordinput1_passwordValue_binding); });
|
|
4709
|
+
binding_callbacks.push(function () { return bind(passwordinput1, 'passwordInputValid', passwordinput1_passwordInputValid_binding); });
|
|
4710
|
+
function passwordinput2_passwordValue_binding(value) {
|
|
4711
|
+
/*passwordinput2_passwordValue_binding*/ ctx[14](value);
|
|
4712
|
+
}
|
|
4713
|
+
function passwordinput2_passwordInputValid_binding(value) {
|
|
4714
|
+
/*passwordinput2_passwordInputValid_binding*/ ctx[15](value);
|
|
4715
|
+
}
|
|
4716
|
+
var passwordinput2_props = {
|
|
4717
|
+
passwordLabel: "Confirm New Password",
|
|
4718
|
+
passwordPlaceholder: "Enter a strong password"
|
|
4719
|
+
};
|
|
4720
|
+
if ( /*confirmPasswordValue*/ctx[3] !== void 0) {
|
|
4721
|
+
passwordinput2_props.passwordValue = /*confirmPasswordValue*/ ctx[3];
|
|
4722
|
+
}
|
|
4723
|
+
if ( /*confirmPasswordValid*/ctx[6] !== void 0) {
|
|
4724
|
+
passwordinput2_props.passwordInputValid = /*confirmPasswordValid*/ ctx[6];
|
|
4725
|
+
}
|
|
4726
|
+
passwordinput2 = new PasswordInput({ props: passwordinput2_props });
|
|
4727
|
+
binding_callbacks.push(function () { return bind(passwordinput2, 'passwordValue', passwordinput2_passwordValue_binding); });
|
|
4728
|
+
binding_callbacks.push(function () { return bind(passwordinput2, 'passwordInputValid', passwordinput2_passwordInputValid_binding); });
|
|
3567
4729
|
return {
|
|
3568
4730
|
c: function () {
|
|
3569
4731
|
div3 = element("div");
|
|
@@ -3576,17 +4738,20 @@ function create_fragment$2(ctx) {
|
|
|
3576
4738
|
h2.textContent = "Change Password";
|
|
3577
4739
|
t2 = space();
|
|
3578
4740
|
div2 = element("div");
|
|
3579
|
-
|
|
3580
|
-
|
|
4741
|
+
button1 = element("button");
|
|
4742
|
+
t3 = text("Save");
|
|
4743
|
+
t4 = space();
|
|
3581
4744
|
form = element("form");
|
|
3582
4745
|
create_component(passwordinput0.$$.fragment);
|
|
3583
|
-
|
|
4746
|
+
t5 = space();
|
|
3584
4747
|
create_component(passwordinput1.$$.fragment);
|
|
3585
|
-
|
|
4748
|
+
t6 = space();
|
|
3586
4749
|
create_component(passwordinput2.$$.fragment);
|
|
3587
4750
|
attr(div0, "class", "ms-modal__profile-back");
|
|
3588
4751
|
attr(h2, "class", "ms-modal__title ms-modal__title--profile");
|
|
3589
4752
|
attr(div1, "class", "ms-modal__title-group");
|
|
4753
|
+
attr(button1, "class", "ms-modal__save-button");
|
|
4754
|
+
button1.disabled = button1_disabled_value = !ctx[4] || !ctx[5] || !ctx[6];
|
|
3590
4755
|
attr(div2, "class", "ms-modal__action-container");
|
|
3591
4756
|
attr(div3, "class", "ms-modal__title-container");
|
|
3592
4757
|
attr(form, "class", "ms-form");
|
|
@@ -3604,23 +4769,67 @@ function create_fragment$2(ctx) {
|
|
|
3604
4769
|
append(div1, h2);
|
|
3605
4770
|
append(div3, t2);
|
|
3606
4771
|
append(div3, div2);
|
|
3607
|
-
|
|
4772
|
+
append(div2, button1);
|
|
4773
|
+
append(button1, t3);
|
|
4774
|
+
insert(target, t4, anchor);
|
|
3608
4775
|
insert(target, form, anchor);
|
|
3609
4776
|
mount_component(passwordinput0, form, null);
|
|
3610
|
-
append(form,
|
|
4777
|
+
append(form, t5);
|
|
3611
4778
|
mount_component(passwordinput1, form, null);
|
|
3612
|
-
append(form,
|
|
4779
|
+
append(form, t6);
|
|
3613
4780
|
mount_component(passwordinput2, form, null);
|
|
3614
4781
|
current = true;
|
|
3615
4782
|
if (!mounted) {
|
|
3616
4783
|
dispose = [
|
|
3617
|
-
listen(button0, "click", /*click_handler*/ ctx[
|
|
3618
|
-
listen(
|
|
4784
|
+
listen(button0, "click", /*click_handler*/ ctx[9]),
|
|
4785
|
+
listen(button1, "click", /*submitPasswordChange*/ ctx[7]),
|
|
4786
|
+
listen(form, "submit", stop_propagation(prevent_default(/*submitPasswordChange*/ ctx[7])))
|
|
3619
4787
|
];
|
|
3620
4788
|
mounted = true;
|
|
3621
4789
|
}
|
|
3622
4790
|
},
|
|
3623
|
-
p:
|
|
4791
|
+
p: function (ctx, _a) {
|
|
4792
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
4793
|
+
if (!current || dirty & /*currentPasswordValid, newPasswordValid, confirmPasswordValid*/ 112 && button1_disabled_value !== (button1_disabled_value = !ctx[4] || !ctx[5] || !ctx[6])) {
|
|
4794
|
+
button1.disabled = button1_disabled_value;
|
|
4795
|
+
}
|
|
4796
|
+
var passwordinput0_changes = {};
|
|
4797
|
+
if (!updating_passwordValue && dirty & /*currentPasswordValue*/ 2) {
|
|
4798
|
+
updating_passwordValue = true;
|
|
4799
|
+
passwordinput0_changes.passwordValue = /*currentPasswordValue*/ ctx[1];
|
|
4800
|
+
add_flush_callback(function () { return updating_passwordValue = false; });
|
|
4801
|
+
}
|
|
4802
|
+
if (!updating_passwordInputValid && dirty & /*currentPasswordValid*/ 16) {
|
|
4803
|
+
updating_passwordInputValid = true;
|
|
4804
|
+
passwordinput0_changes.passwordInputValid = /*currentPasswordValid*/ ctx[4];
|
|
4805
|
+
add_flush_callback(function () { return updating_passwordInputValid = false; });
|
|
4806
|
+
}
|
|
4807
|
+
passwordinput0.$set(passwordinput0_changes);
|
|
4808
|
+
var passwordinput1_changes = {};
|
|
4809
|
+
if (!updating_passwordValue_1 && dirty & /*newPasswordValue*/ 4) {
|
|
4810
|
+
updating_passwordValue_1 = true;
|
|
4811
|
+
passwordinput1_changes.passwordValue = /*newPasswordValue*/ ctx[2];
|
|
4812
|
+
add_flush_callback(function () { return updating_passwordValue_1 = false; });
|
|
4813
|
+
}
|
|
4814
|
+
if (!updating_passwordInputValid_1 && dirty & /*newPasswordValid*/ 32) {
|
|
4815
|
+
updating_passwordInputValid_1 = true;
|
|
4816
|
+
passwordinput1_changes.passwordInputValid = /*newPasswordValid*/ ctx[5];
|
|
4817
|
+
add_flush_callback(function () { return updating_passwordInputValid_1 = false; });
|
|
4818
|
+
}
|
|
4819
|
+
passwordinput1.$set(passwordinput1_changes);
|
|
4820
|
+
var passwordinput2_changes = {};
|
|
4821
|
+
if (!updating_passwordValue_2 && dirty & /*confirmPasswordValue*/ 8) {
|
|
4822
|
+
updating_passwordValue_2 = true;
|
|
4823
|
+
passwordinput2_changes.passwordValue = /*confirmPasswordValue*/ ctx[3];
|
|
4824
|
+
add_flush_callback(function () { return updating_passwordValue_2 = false; });
|
|
4825
|
+
}
|
|
4826
|
+
if (!updating_passwordInputValid_2 && dirty & /*confirmPasswordValid*/ 64) {
|
|
4827
|
+
updating_passwordInputValid_2 = true;
|
|
4828
|
+
passwordinput2_changes.passwordInputValid = /*confirmPasswordValid*/ ctx[6];
|
|
4829
|
+
add_flush_callback(function () { return updating_passwordInputValid_2 = false; });
|
|
4830
|
+
}
|
|
4831
|
+
passwordinput2.$set(passwordinput2_changes);
|
|
4832
|
+
},
|
|
3624
4833
|
i: function (local) {
|
|
3625
4834
|
if (current)
|
|
3626
4835
|
return;
|
|
@@ -3642,7 +4851,7 @@ function create_fragment$2(ctx) {
|
|
|
3642
4851
|
detach(div3);
|
|
3643
4852
|
destroy_component(backicon);
|
|
3644
4853
|
if (detaching)
|
|
3645
|
-
detach(
|
|
4854
|
+
detach(t4);
|
|
3646
4855
|
if (detaching)
|
|
3647
4856
|
detach(form);
|
|
3648
4857
|
destroy_component(passwordinput0);
|
|
@@ -3653,46 +4862,287 @@ function create_fragment$2(ctx) {
|
|
|
3653
4862
|
}
|
|
3654
4863
|
};
|
|
3655
4864
|
}
|
|
3656
|
-
function submitPasswordChange(e) {
|
|
3657
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
3658
|
-
return __generator(this, function (_a) {
|
|
3659
|
-
console.log(e);
|
|
3660
|
-
return [2 /*return*/];
|
|
3661
|
-
});
|
|
3662
|
-
});
|
|
3663
|
-
}
|
|
3664
4865
|
function instance$2($$self, $$props, $$invalidate) {
|
|
3665
4866
|
var displayProfile = $$props.displayProfile;
|
|
4867
|
+
var profileLoader = $$props.profileLoader;
|
|
4868
|
+
var currentPasswordValue = "";
|
|
4869
|
+
var newPasswordValue = "";
|
|
4870
|
+
var confirmPasswordValue = "";
|
|
4871
|
+
var currentPasswordValid = false;
|
|
4872
|
+
var newPasswordValid = false;
|
|
4873
|
+
var confirmPasswordValid = false;
|
|
4874
|
+
function submitPasswordChange(e) {
|
|
4875
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4876
|
+
var data, err_7;
|
|
4877
|
+
return __generator(this, function (_a) {
|
|
4878
|
+
switch (_a.label) {
|
|
4879
|
+
case 0:
|
|
4880
|
+
if (!currentPasswordValid && !newPasswordValid && !confirmPasswordValid)
|
|
4881
|
+
return [2 /*return*/];
|
|
4882
|
+
if (newPasswordValue !== confirmPasswordValue) {
|
|
4883
|
+
window.$memberstackDom._showMessage("New password and confirm password do not match", true);
|
|
4884
|
+
return [2 /*return*/];
|
|
4885
|
+
}
|
|
4886
|
+
$$invalidate(8, profileLoader = true);
|
|
4887
|
+
_a.label = 1;
|
|
4888
|
+
case 1:
|
|
4889
|
+
_a.trys.push([1, 3, , 4]);
|
|
4890
|
+
return [4 /*yield*/, window.$memberstackDom.updateMemberAuth({
|
|
4891
|
+
oldPassword: currentPasswordValue,
|
|
4892
|
+
newPassword: newPasswordValue
|
|
4893
|
+
})];
|
|
4894
|
+
case 2:
|
|
4895
|
+
data = _a.sent();
|
|
4896
|
+
window.$memberstackDom._showMessage("Password successfully changed", false);
|
|
4897
|
+
$$invalidate(1, currentPasswordValue = "");
|
|
4898
|
+
$$invalidate(2, newPasswordValue = "");
|
|
4899
|
+
$$invalidate(3, confirmPasswordValue = "");
|
|
4900
|
+
$$invalidate(8, profileLoader = false);
|
|
4901
|
+
return [3 /*break*/, 4];
|
|
4902
|
+
case 3:
|
|
4903
|
+
err_7 = _a.sent();
|
|
4904
|
+
window.$memberstackDom._showMessage(err_7.message, true);
|
|
4905
|
+
$$invalidate(8, profileLoader = false);
|
|
4906
|
+
return [3 /*break*/, 4];
|
|
4907
|
+
case 4: return [2 /*return*/];
|
|
4908
|
+
}
|
|
4909
|
+
});
|
|
4910
|
+
});
|
|
4911
|
+
}
|
|
3666
4912
|
var click_handler = function () { return $$invalidate(0, displayProfile = "security"); };
|
|
4913
|
+
function passwordinput0_passwordValue_binding(value) {
|
|
4914
|
+
currentPasswordValue = value;
|
|
4915
|
+
$$invalidate(1, currentPasswordValue);
|
|
4916
|
+
}
|
|
4917
|
+
function passwordinput0_passwordInputValid_binding(value) {
|
|
4918
|
+
currentPasswordValid = value;
|
|
4919
|
+
$$invalidate(4, currentPasswordValid);
|
|
4920
|
+
}
|
|
4921
|
+
function passwordinput1_passwordValue_binding(value) {
|
|
4922
|
+
newPasswordValue = value;
|
|
4923
|
+
$$invalidate(2, newPasswordValue);
|
|
4924
|
+
}
|
|
4925
|
+
function passwordinput1_passwordInputValid_binding(value) {
|
|
4926
|
+
newPasswordValid = value;
|
|
4927
|
+
$$invalidate(5, newPasswordValid);
|
|
4928
|
+
}
|
|
4929
|
+
function passwordinput2_passwordValue_binding(value) {
|
|
4930
|
+
confirmPasswordValue = value;
|
|
4931
|
+
$$invalidate(3, confirmPasswordValue);
|
|
4932
|
+
}
|
|
4933
|
+
function passwordinput2_passwordInputValid_binding(value) {
|
|
4934
|
+
confirmPasswordValid = value;
|
|
4935
|
+
$$invalidate(6, confirmPasswordValid);
|
|
4936
|
+
}
|
|
3667
4937
|
$$self.$$set = function ($$props) {
|
|
3668
4938
|
if ('displayProfile' in $$props)
|
|
3669
4939
|
$$invalidate(0, displayProfile = $$props.displayProfile);
|
|
4940
|
+
if ('profileLoader' in $$props)
|
|
4941
|
+
$$invalidate(8, profileLoader = $$props.profileLoader);
|
|
3670
4942
|
};
|
|
3671
|
-
return [
|
|
4943
|
+
return [
|
|
4944
|
+
displayProfile,
|
|
4945
|
+
currentPasswordValue,
|
|
4946
|
+
newPasswordValue,
|
|
4947
|
+
confirmPasswordValue,
|
|
4948
|
+
currentPasswordValid,
|
|
4949
|
+
newPasswordValid,
|
|
4950
|
+
confirmPasswordValid,
|
|
4951
|
+
submitPasswordChange,
|
|
4952
|
+
profileLoader,
|
|
4953
|
+
click_handler,
|
|
4954
|
+
passwordinput0_passwordValue_binding,
|
|
4955
|
+
passwordinput0_passwordInputValid_binding,
|
|
4956
|
+
passwordinput1_passwordValue_binding,
|
|
4957
|
+
passwordinput1_passwordInputValid_binding,
|
|
4958
|
+
passwordinput2_passwordValue_binding,
|
|
4959
|
+
passwordinput2_passwordInputValid_binding
|
|
4960
|
+
];
|
|
3672
4961
|
}
|
|
3673
4962
|
var PasswordInfoContent = /** @class */ (function (_super) {
|
|
3674
4963
|
__extends(PasswordInfoContent, _super);
|
|
3675
4964
|
function PasswordInfoContent(options) {
|
|
3676
4965
|
var _this = _super.call(this) || this;
|
|
3677
|
-
init(_this, options, instance$2, create_fragment$
|
|
4966
|
+
init(_this, options, instance$2, create_fragment$3, safe_not_equal, { displayProfile: 0, profileLoader: 8 });
|
|
3678
4967
|
return _this;
|
|
3679
4968
|
}
|
|
3680
4969
|
return PasswordInfoContent;
|
|
3681
4970
|
}(SvelteComponent));
|
|
4971
|
+
function fade(node, _a) {
|
|
4972
|
+
var _b = _a === void 0 ? {} : _a, _c = _b.delay, delay = _c === void 0 ? 0 : _c, _d = _b.duration, duration = _d === void 0 ? 400 : _d, _e = _b.easing, easing = _e === void 0 ? identity : _e;
|
|
4973
|
+
var o = +getComputedStyle(node).opacity;
|
|
4974
|
+
return {
|
|
4975
|
+
delay: delay,
|
|
4976
|
+
duration: duration,
|
|
4977
|
+
easing: easing,
|
|
4978
|
+
css: function (t) { return "opacity: " + t * o; }
|
|
4979
|
+
};
|
|
4980
|
+
}
|
|
4981
|
+
/* src/components/ProfileLoader.svelte generated by Svelte v3.48.0 */
|
|
4982
|
+
function create_fragment$2(ctx) {
|
|
4983
|
+
var div;
|
|
4984
|
+
var loadingicon;
|
|
4985
|
+
var div_transition;
|
|
4986
|
+
var current;
|
|
4987
|
+
loadingicon = new LoadingIcon({});
|
|
4988
|
+
return {
|
|
4989
|
+
c: function () {
|
|
4990
|
+
div = element("div");
|
|
4991
|
+
create_component(loadingicon.$$.fragment);
|
|
4992
|
+
attr(div, "class", "ms__profile__loader");
|
|
4993
|
+
},
|
|
4994
|
+
m: function (target, anchor) {
|
|
4995
|
+
insert(target, div, anchor);
|
|
4996
|
+
mount_component(loadingicon, div, null);
|
|
4997
|
+
current = true;
|
|
4998
|
+
},
|
|
4999
|
+
p: noop,
|
|
5000
|
+
i: function (local) {
|
|
5001
|
+
if (current)
|
|
5002
|
+
return;
|
|
5003
|
+
transition_in(loadingicon.$$.fragment, local);
|
|
5004
|
+
add_render_callback(function () {
|
|
5005
|
+
if (!div_transition)
|
|
5006
|
+
div_transition = create_bidirectional_transition(div, fade, {}, true);
|
|
5007
|
+
div_transition.run(1);
|
|
5008
|
+
});
|
|
5009
|
+
current = true;
|
|
5010
|
+
},
|
|
5011
|
+
o: function (local) {
|
|
5012
|
+
transition_out(loadingicon.$$.fragment, local);
|
|
5013
|
+
if (!div_transition)
|
|
5014
|
+
div_transition = create_bidirectional_transition(div, fade, {}, false);
|
|
5015
|
+
div_transition.run(0);
|
|
5016
|
+
current = false;
|
|
5017
|
+
},
|
|
5018
|
+
d: function (detaching) {
|
|
5019
|
+
if (detaching)
|
|
5020
|
+
detach(div);
|
|
5021
|
+
destroy_component(loadingicon);
|
|
5022
|
+
if (detaching && div_transition)
|
|
5023
|
+
div_transition.end();
|
|
5024
|
+
}
|
|
5025
|
+
};
|
|
5026
|
+
}
|
|
5027
|
+
var ProfileLoader = /** @class */ (function (_super) {
|
|
5028
|
+
__extends(ProfileLoader, _super);
|
|
5029
|
+
function ProfileLoader(options) {
|
|
5030
|
+
var _this = _super.call(this) || this;
|
|
5031
|
+
init(_this, options, null, create_fragment$2, safe_not_equal, {});
|
|
5032
|
+
return _this;
|
|
5033
|
+
}
|
|
5034
|
+
return ProfileLoader;
|
|
5035
|
+
}(SvelteComponent));
|
|
3682
5036
|
/* src/modals/ProfileModal.svelte generated by Svelte v3.48.0 */
|
|
5037
|
+
function create_else_block(ctx) {
|
|
5038
|
+
var memberstackicon;
|
|
5039
|
+
var current;
|
|
5040
|
+
memberstackicon = new MemberstackIcon({});
|
|
5041
|
+
return {
|
|
5042
|
+
c: function () {
|
|
5043
|
+
create_component(memberstackicon.$$.fragment);
|
|
5044
|
+
},
|
|
5045
|
+
m: function (target, anchor) {
|
|
5046
|
+
mount_component(memberstackicon, target, anchor);
|
|
5047
|
+
current = true;
|
|
5048
|
+
},
|
|
5049
|
+
p: noop,
|
|
5050
|
+
i: function (local) {
|
|
5051
|
+
if (current)
|
|
5052
|
+
return;
|
|
5053
|
+
transition_in(memberstackicon.$$.fragment, local);
|
|
5054
|
+
current = true;
|
|
5055
|
+
},
|
|
5056
|
+
o: function (local) {
|
|
5057
|
+
transition_out(memberstackicon.$$.fragment, local);
|
|
5058
|
+
current = false;
|
|
5059
|
+
},
|
|
5060
|
+
d: function (detaching) {
|
|
5061
|
+
destroy_component(memberstackicon, detaching);
|
|
5062
|
+
}
|
|
5063
|
+
};
|
|
5064
|
+
}
|
|
5065
|
+
// (32:6) {#if $app.branding.logo}
|
|
5066
|
+
function create_if_block_4$1(ctx) {
|
|
5067
|
+
var img;
|
|
5068
|
+
var img_src_value;
|
|
5069
|
+
var img_alt_value;
|
|
5070
|
+
return {
|
|
5071
|
+
c: function () {
|
|
5072
|
+
img = element("img");
|
|
5073
|
+
if (!src_url_equal(img.src, img_src_value = /*$app*/ ctx[7].branding.logo))
|
|
5074
|
+
attr(img, "src", img_src_value);
|
|
5075
|
+
attr(img, "alt", img_alt_value = /*$app*/ ctx[7].name);
|
|
5076
|
+
},
|
|
5077
|
+
m: function (target, anchor) {
|
|
5078
|
+
insert(target, img, anchor);
|
|
5079
|
+
},
|
|
5080
|
+
p: function (ctx, dirty) {
|
|
5081
|
+
if (dirty & /*$app*/ 128 && !src_url_equal(img.src, img_src_value = /*$app*/ ctx[7].branding.logo)) {
|
|
5082
|
+
attr(img, "src", img_src_value);
|
|
5083
|
+
}
|
|
5084
|
+
if (dirty & /*$app*/ 128 && img_alt_value !== (img_alt_value = /*$app*/ ctx[7].name)) {
|
|
5085
|
+
attr(img, "alt", img_alt_value);
|
|
5086
|
+
}
|
|
5087
|
+
},
|
|
5088
|
+
i: noop,
|
|
5089
|
+
o: noop,
|
|
5090
|
+
d: function (detaching) {
|
|
5091
|
+
if (detaching)
|
|
5092
|
+
detach(img);
|
|
5093
|
+
}
|
|
5094
|
+
};
|
|
5095
|
+
}
|
|
5096
|
+
// (54:6) {#if profileLoader}
|
|
5097
|
+
function create_if_block_3$1(ctx) {
|
|
5098
|
+
var profileloader;
|
|
5099
|
+
var current;
|
|
5100
|
+
profileloader = new ProfileLoader({});
|
|
5101
|
+
return {
|
|
5102
|
+
c: function () {
|
|
5103
|
+
create_component(profileloader.$$.fragment);
|
|
5104
|
+
},
|
|
5105
|
+
m: function (target, anchor) {
|
|
5106
|
+
mount_component(profileloader, target, anchor);
|
|
5107
|
+
current = true;
|
|
5108
|
+
},
|
|
5109
|
+
i: function (local) {
|
|
5110
|
+
if (current)
|
|
5111
|
+
return;
|
|
5112
|
+
transition_in(profileloader.$$.fragment, local);
|
|
5113
|
+
current = true;
|
|
5114
|
+
},
|
|
5115
|
+
o: function (local) {
|
|
5116
|
+
transition_out(profileloader.$$.fragment, local);
|
|
5117
|
+
current = false;
|
|
5118
|
+
},
|
|
5119
|
+
d: function (detaching) {
|
|
5120
|
+
destroy_component(profileloader, detaching);
|
|
5121
|
+
}
|
|
5122
|
+
};
|
|
5123
|
+
}
|
|
5124
|
+
// (65:52)
|
|
3683
5125
|
function create_if_block_2$1(ctx) {
|
|
3684
5126
|
var passwordinfocontent;
|
|
3685
5127
|
var updating_displayProfile;
|
|
5128
|
+
var updating_profileLoader;
|
|
3686
5129
|
var current;
|
|
3687
5130
|
function passwordinfocontent_displayProfile_binding(value) {
|
|
3688
|
-
/*passwordinfocontent_displayProfile_binding*/ ctx[
|
|
5131
|
+
/*passwordinfocontent_displayProfile_binding*/ ctx[15](value);
|
|
5132
|
+
}
|
|
5133
|
+
function passwordinfocontent_profileLoader_binding(value) {
|
|
5134
|
+
/*passwordinfocontent_profileLoader_binding*/ ctx[16](value);
|
|
3689
5135
|
}
|
|
3690
5136
|
var passwordinfocontent_props = {};
|
|
3691
5137
|
if ( /*displayProfile*/ctx[0] !== void 0) {
|
|
3692
5138
|
passwordinfocontent_props.displayProfile = /*displayProfile*/ ctx[0];
|
|
3693
5139
|
}
|
|
5140
|
+
if ( /*profileLoader*/ctx[5] !== void 0) {
|
|
5141
|
+
passwordinfocontent_props.profileLoader = /*profileLoader*/ ctx[5];
|
|
5142
|
+
}
|
|
3694
5143
|
passwordinfocontent = new PasswordInfoContent({ props: passwordinfocontent_props });
|
|
3695
5144
|
binding_callbacks.push(function () { return bind(passwordinfocontent, 'displayProfile', passwordinfocontent_displayProfile_binding); });
|
|
5145
|
+
binding_callbacks.push(function () { return bind(passwordinfocontent, 'profileLoader', passwordinfocontent_profileLoader_binding); });
|
|
3696
5146
|
return {
|
|
3697
5147
|
c: function () {
|
|
3698
5148
|
create_component(passwordinfocontent.$$.fragment);
|
|
@@ -3708,6 +5158,11 @@ function create_if_block_2$1(ctx) {
|
|
|
3708
5158
|
passwordinfocontent_changes.displayProfile = /*displayProfile*/ ctx[0];
|
|
3709
5159
|
add_flush_callback(function () { return updating_displayProfile = false; });
|
|
3710
5160
|
}
|
|
5161
|
+
if (!updating_profileLoader && dirty & /*profileLoader*/ 32) {
|
|
5162
|
+
updating_profileLoader = true;
|
|
5163
|
+
passwordinfocontent_changes.profileLoader = /*profileLoader*/ ctx[5];
|
|
5164
|
+
add_flush_callback(function () { return updating_profileLoader = false; });
|
|
5165
|
+
}
|
|
3711
5166
|
passwordinfocontent.$set(passwordinfocontent_changes);
|
|
3712
5167
|
},
|
|
3713
5168
|
i: function (local) {
|
|
@@ -3725,20 +5180,28 @@ function create_if_block_2$1(ctx) {
|
|
|
3725
5180
|
}
|
|
3726
5181
|
};
|
|
3727
5182
|
}
|
|
3728
|
-
// (
|
|
5183
|
+
// (63:46)
|
|
3729
5184
|
function create_if_block_1$1(ctx) {
|
|
3730
5185
|
var securityinfocontent;
|
|
3731
5186
|
var updating_displayProfile;
|
|
5187
|
+
var updating_profileLoader;
|
|
3732
5188
|
var current;
|
|
3733
5189
|
function securityinfocontent_displayProfile_binding(value) {
|
|
3734
|
-
/*securityinfocontent_displayProfile_binding*/ ctx[
|
|
5190
|
+
/*securityinfocontent_displayProfile_binding*/ ctx[13](value);
|
|
5191
|
+
}
|
|
5192
|
+
function securityinfocontent_profileLoader_binding(value) {
|
|
5193
|
+
/*securityinfocontent_profileLoader_binding*/ ctx[14](value);
|
|
3735
5194
|
}
|
|
3736
5195
|
var securityinfocontent_props = {};
|
|
3737
5196
|
if ( /*displayProfile*/ctx[0] !== void 0) {
|
|
3738
5197
|
securityinfocontent_props.displayProfile = /*displayProfile*/ ctx[0];
|
|
3739
5198
|
}
|
|
5199
|
+
if ( /*profileLoader*/ctx[5] !== void 0) {
|
|
5200
|
+
securityinfocontent_props.profileLoader = /*profileLoader*/ ctx[5];
|
|
5201
|
+
}
|
|
3740
5202
|
securityinfocontent = new SecurityInfoContent({ props: securityinfocontent_props });
|
|
3741
5203
|
binding_callbacks.push(function () { return bind(securityinfocontent, 'displayProfile', securityinfocontent_displayProfile_binding); });
|
|
5204
|
+
binding_callbacks.push(function () { return bind(securityinfocontent, 'profileLoader', securityinfocontent_profileLoader_binding); });
|
|
3742
5205
|
return {
|
|
3743
5206
|
c: function () {
|
|
3744
5207
|
create_component(securityinfocontent.$$.fragment);
|
|
@@ -3754,6 +5217,11 @@ function create_if_block_1$1(ctx) {
|
|
|
3754
5217
|
securityinfocontent_changes.displayProfile = /*displayProfile*/ ctx[0];
|
|
3755
5218
|
add_flush_callback(function () { return updating_displayProfile = false; });
|
|
3756
5219
|
}
|
|
5220
|
+
if (!updating_profileLoader && dirty & /*profileLoader*/ 32) {
|
|
5221
|
+
updating_profileLoader = true;
|
|
5222
|
+
securityinfocontent_changes.profileLoader = /*profileLoader*/ ctx[5];
|
|
5223
|
+
add_flush_callback(function () { return updating_profileLoader = false; });
|
|
5224
|
+
}
|
|
3757
5225
|
securityinfocontent.$set(securityinfocontent_changes);
|
|
3758
5226
|
},
|
|
3759
5227
|
i: function (local) {
|
|
@@ -3771,11 +5239,30 @@ function create_if_block_1$1(ctx) {
|
|
|
3771
5239
|
}
|
|
3772
5240
|
};
|
|
3773
5241
|
}
|
|
3774
|
-
// (
|
|
5242
|
+
// (57:6) {#if displayProfile === "profile"}
|
|
3775
5243
|
function create_if_block$1(ctx) {
|
|
3776
5244
|
var profileinfocontent;
|
|
5245
|
+
var updating_member;
|
|
5246
|
+
var updating_profileLoader;
|
|
3777
5247
|
var current;
|
|
3778
|
-
|
|
5248
|
+
function profileinfocontent_member_binding(value) {
|
|
5249
|
+
/*profileinfocontent_member_binding*/ ctx[11](value);
|
|
5250
|
+
}
|
|
5251
|
+
function profileinfocontent_profileLoader_binding(value) {
|
|
5252
|
+
/*profileinfocontent_profileLoader_binding*/ ctx[12](value);
|
|
5253
|
+
}
|
|
5254
|
+
var profileinfocontent_props = {
|
|
5255
|
+
customFields: /*$app*/ ctx[7].customFields
|
|
5256
|
+
};
|
|
5257
|
+
if ( /*member*/ctx[1] !== void 0) {
|
|
5258
|
+
profileinfocontent_props.member = /*member*/ ctx[1];
|
|
5259
|
+
}
|
|
5260
|
+
if ( /*profileLoader*/ctx[5] !== void 0) {
|
|
5261
|
+
profileinfocontent_props.profileLoader = /*profileLoader*/ ctx[5];
|
|
5262
|
+
}
|
|
5263
|
+
profileinfocontent = new ProfileInfoContent({ props: profileinfocontent_props });
|
|
5264
|
+
binding_callbacks.push(function () { return bind(profileinfocontent, 'member', profileinfocontent_member_binding); });
|
|
5265
|
+
binding_callbacks.push(function () { return bind(profileinfocontent, 'profileLoader', profileinfocontent_profileLoader_binding); });
|
|
3779
5266
|
return {
|
|
3780
5267
|
c: function () {
|
|
3781
5268
|
create_component(profileinfocontent.$$.fragment);
|
|
@@ -3784,7 +5271,22 @@ function create_if_block$1(ctx) {
|
|
|
3784
5271
|
mount_component(profileinfocontent, target, anchor);
|
|
3785
5272
|
current = true;
|
|
3786
5273
|
},
|
|
3787
|
-
p:
|
|
5274
|
+
p: function (ctx, dirty) {
|
|
5275
|
+
var profileinfocontent_changes = {};
|
|
5276
|
+
if (dirty & /*$app*/ 128)
|
|
5277
|
+
profileinfocontent_changes.customFields = /*$app*/ ctx[7].customFields;
|
|
5278
|
+
if (!updating_member && dirty & /*member*/ 2) {
|
|
5279
|
+
updating_member = true;
|
|
5280
|
+
profileinfocontent_changes.member = /*member*/ ctx[1];
|
|
5281
|
+
add_flush_callback(function () { return updating_member = false; });
|
|
5282
|
+
}
|
|
5283
|
+
if (!updating_profileLoader && dirty & /*profileLoader*/ 32) {
|
|
5284
|
+
updating_profileLoader = true;
|
|
5285
|
+
profileinfocontent_changes.profileLoader = /*profileLoader*/ ctx[5];
|
|
5286
|
+
add_flush_callback(function () { return updating_profileLoader = false; });
|
|
5287
|
+
}
|
|
5288
|
+
profileinfocontent.$set(profileinfocontent_changes);
|
|
5289
|
+
},
|
|
3788
5290
|
i: function (local) {
|
|
3789
5291
|
if (current)
|
|
3790
5292
|
return;
|
|
@@ -3804,39 +5306,71 @@ function create_fragment$1(ctx) {
|
|
|
3804
5306
|
var div5;
|
|
3805
5307
|
var div1;
|
|
3806
5308
|
var figure;
|
|
3807
|
-
var
|
|
5309
|
+
var current_block_type_index;
|
|
5310
|
+
var if_block0;
|
|
3808
5311
|
var t0;
|
|
3809
5312
|
var div0;
|
|
5313
|
+
var t1_value = /*member*/ ctx[1].auth.email + "";
|
|
5314
|
+
var t1;
|
|
3810
5315
|
var t2;
|
|
3811
5316
|
var closebutton;
|
|
3812
5317
|
var t3;
|
|
3813
5318
|
var div4;
|
|
3814
5319
|
var div2;
|
|
3815
5320
|
var profilemodalnav;
|
|
5321
|
+
var updating_member;
|
|
3816
5322
|
var updating_displayProfile;
|
|
5323
|
+
var updating_profileLoader;
|
|
3817
5324
|
var t4;
|
|
3818
5325
|
var div3;
|
|
3819
|
-
var current_block_type_index;
|
|
3820
|
-
var if_block;
|
|
3821
5326
|
var t5;
|
|
5327
|
+
var current_block_type_index_1;
|
|
5328
|
+
var if_block2;
|
|
5329
|
+
var t6;
|
|
3822
5330
|
var modalfooter;
|
|
3823
5331
|
var current;
|
|
3824
|
-
|
|
5332
|
+
var if_block_creators = [create_if_block_4$1, create_else_block];
|
|
5333
|
+
var if_blocks = [];
|
|
5334
|
+
function select_block_type(ctx, dirty) {
|
|
5335
|
+
if ( /*$app*/ctx[7].branding.logo)
|
|
5336
|
+
return 0;
|
|
5337
|
+
return 1;
|
|
5338
|
+
}
|
|
5339
|
+
current_block_type_index = select_block_type(ctx);
|
|
5340
|
+
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
3825
5341
|
closebutton = new CloseButton({
|
|
3826
|
-
props: { closeModal: /*closeModal*/ ctx[
|
|
5342
|
+
props: { closeModal: /*closeModal*/ ctx[3] }
|
|
3827
5343
|
});
|
|
5344
|
+
function profilemodalnav_member_binding(value) {
|
|
5345
|
+
/*profilemodalnav_member_binding*/ ctx[8](value);
|
|
5346
|
+
}
|
|
3828
5347
|
function profilemodalnav_displayProfile_binding(value) {
|
|
3829
|
-
/*profilemodalnav_displayProfile_binding*/ ctx[
|
|
5348
|
+
/*profilemodalnav_displayProfile_binding*/ ctx[9](value);
|
|
5349
|
+
}
|
|
5350
|
+
function profilemodalnav_profileLoader_binding(value) {
|
|
5351
|
+
/*profilemodalnav_profileLoader_binding*/ ctx[10](value);
|
|
5352
|
+
}
|
|
5353
|
+
var profilemodalnav_props = {
|
|
5354
|
+
onSuccessLogout: /*onSuccessLogout*/ ctx[2],
|
|
5355
|
+
hideProfileSection: /*hideProfileSection*/ ctx[4]
|
|
5356
|
+
};
|
|
5357
|
+
if ( /*member*/ctx[1] !== void 0) {
|
|
5358
|
+
profilemodalnav_props.member = /*member*/ ctx[1];
|
|
3830
5359
|
}
|
|
3831
|
-
var profilemodalnav_props = {};
|
|
3832
5360
|
if ( /*displayProfile*/ctx[0] !== void 0) {
|
|
3833
5361
|
profilemodalnav_props.displayProfile = /*displayProfile*/ ctx[0];
|
|
3834
5362
|
}
|
|
5363
|
+
if ( /*profileLoader*/ctx[5] !== void 0) {
|
|
5364
|
+
profilemodalnav_props.profileLoader = /*profileLoader*/ ctx[5];
|
|
5365
|
+
}
|
|
3835
5366
|
profilemodalnav = new ProfileModalNav({ props: profilemodalnav_props });
|
|
5367
|
+
binding_callbacks.push(function () { return bind(profilemodalnav, 'member', profilemodalnav_member_binding); });
|
|
3836
5368
|
binding_callbacks.push(function () { return bind(profilemodalnav, 'displayProfile', profilemodalnav_displayProfile_binding); });
|
|
3837
|
-
|
|
3838
|
-
var
|
|
3839
|
-
|
|
5369
|
+
binding_callbacks.push(function () { return bind(profilemodalnav, 'profileLoader', profilemodalnav_profileLoader_binding); });
|
|
5370
|
+
var if_block1 = /*profileLoader*/ ctx[5] && create_if_block_3$1();
|
|
5371
|
+
var if_block_creators_1 = [create_if_block$1, create_if_block_1$1, create_if_block_2$1];
|
|
5372
|
+
var if_blocks_1 = [];
|
|
5373
|
+
function select_block_type_1(ctx, dirty) {
|
|
3840
5374
|
if ( /*displayProfile*/ctx[0] === "profile")
|
|
3841
5375
|
return 0;
|
|
3842
5376
|
if ( /*displayProfile*/ctx[0] === "security")
|
|
@@ -3845,8 +5379,8 @@ function create_fragment$1(ctx) {
|
|
|
3845
5379
|
return 2;
|
|
3846
5380
|
return -1;
|
|
3847
5381
|
}
|
|
3848
|
-
if (~(
|
|
3849
|
-
|
|
5382
|
+
if (~(current_block_type_index_1 = select_block_type_1(ctx))) {
|
|
5383
|
+
if_block2 = if_blocks_1[current_block_type_index_1] = if_block_creators_1[current_block_type_index_1](ctx);
|
|
3850
5384
|
}
|
|
3851
5385
|
modalfooter = new ModalFooter({});
|
|
3852
5386
|
return {
|
|
@@ -3854,10 +5388,10 @@ function create_fragment$1(ctx) {
|
|
|
3854
5388
|
div5 = element("div");
|
|
3855
5389
|
div1 = element("div");
|
|
3856
5390
|
figure = element("figure");
|
|
3857
|
-
|
|
5391
|
+
if_block0.c();
|
|
3858
5392
|
t0 = space();
|
|
3859
5393
|
div0 = element("div");
|
|
3860
|
-
|
|
5394
|
+
t1 = text(t1_value);
|
|
3861
5395
|
t2 = space();
|
|
3862
5396
|
create_component(closebutton.$$.fragment);
|
|
3863
5397
|
t3 = space();
|
|
@@ -3866,14 +5400,18 @@ function create_fragment$1(ctx) {
|
|
|
3866
5400
|
create_component(profilemodalnav.$$.fragment);
|
|
3867
5401
|
t4 = space();
|
|
3868
5402
|
div3 = element("div");
|
|
3869
|
-
if (
|
|
3870
|
-
|
|
5403
|
+
if (if_block1)
|
|
5404
|
+
if_block1.c();
|
|
3871
5405
|
t5 = space();
|
|
5406
|
+
if (if_block2)
|
|
5407
|
+
if_block2.c();
|
|
5408
|
+
t6 = space();
|
|
3872
5409
|
create_component(modalfooter.$$.fragment);
|
|
3873
5410
|
attr(figure, "class", "ms-modal__figure ms-modal__figure--profile");
|
|
3874
5411
|
attr(div1, "class", "ms-modal__header");
|
|
3875
5412
|
attr(div2, "class", "ms-modal__content-left");
|
|
3876
5413
|
attr(div3, "class", "ms-modal__content-right");
|
|
5414
|
+
set_style(div3, "height", /*profileSectionHeight*/ ctx[6]);
|
|
3877
5415
|
attr(div4, "class", "ms-modal__content ms-modal__content--profile");
|
|
3878
5416
|
attr(div5, "class", "ms-modal ms-modal--profile");
|
|
3879
5417
|
attr(div5, "id", "ProfileModal");
|
|
@@ -3882,9 +5420,10 @@ function create_fragment$1(ctx) {
|
|
|
3882
5420
|
insert(target, div5, anchor);
|
|
3883
5421
|
append(div5, div1);
|
|
3884
5422
|
append(div1, figure);
|
|
3885
|
-
|
|
5423
|
+
if_blocks[current_block_type_index].m(figure, null);
|
|
3886
5424
|
append(div1, t0);
|
|
3887
5425
|
append(div1, div0);
|
|
5426
|
+
append(div0, t1);
|
|
3888
5427
|
append(div1, t2);
|
|
3889
5428
|
mount_component(closebutton, div1, null);
|
|
3890
5429
|
append(div5, t3);
|
|
@@ -3893,216 +5432,371 @@ function create_fragment$1(ctx) {
|
|
|
3893
5432
|
mount_component(profilemodalnav, div2, null);
|
|
3894
5433
|
append(div4, t4);
|
|
3895
5434
|
append(div4, div3);
|
|
3896
|
-
if (
|
|
3897
|
-
|
|
5435
|
+
if (if_block1)
|
|
5436
|
+
if_block1.m(div3, null);
|
|
5437
|
+
append(div3, t5);
|
|
5438
|
+
if (~current_block_type_index_1) {
|
|
5439
|
+
if_blocks_1[current_block_type_index_1].m(div3, null);
|
|
5440
|
+
}
|
|
5441
|
+
append(div5, t6);
|
|
5442
|
+
mount_component(modalfooter, div5, null);
|
|
5443
|
+
current = true;
|
|
5444
|
+
},
|
|
5445
|
+
p: function (ctx, _a) {
|
|
5446
|
+
var _b = __read(_a, 1), dirty = _b[0];
|
|
5447
|
+
var previous_block_index = current_block_type_index;
|
|
5448
|
+
current_block_type_index = select_block_type(ctx);
|
|
5449
|
+
if (current_block_type_index === previous_block_index) {
|
|
5450
|
+
if_blocks[current_block_type_index].p(ctx, dirty);
|
|
5451
|
+
}
|
|
5452
|
+
else {
|
|
5453
|
+
group_outros();
|
|
5454
|
+
transition_out(if_blocks[previous_block_index], 1, 1, function () {
|
|
5455
|
+
if_blocks[previous_block_index] = null;
|
|
5456
|
+
});
|
|
5457
|
+
check_outros();
|
|
5458
|
+
if_block0 = if_blocks[current_block_type_index];
|
|
5459
|
+
if (!if_block0) {
|
|
5460
|
+
if_block0 = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
5461
|
+
if_block0.c();
|
|
5462
|
+
}
|
|
5463
|
+
else {
|
|
5464
|
+
if_block0.p(ctx, dirty);
|
|
5465
|
+
}
|
|
5466
|
+
transition_in(if_block0, 1);
|
|
5467
|
+
if_block0.m(figure, null);
|
|
3898
5468
|
}
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
current = true;
|
|
3902
|
-
},
|
|
3903
|
-
p: function (ctx, _a) {
|
|
3904
|
-
var _b = __read(_a, 1), dirty = _b[0];
|
|
5469
|
+
if ((!current || dirty & /*member*/ 2) && t1_value !== (t1_value = /*member*/ ctx[1].auth.email + ""))
|
|
5470
|
+
set_data(t1, t1_value);
|
|
3905
5471
|
var closebutton_changes = {};
|
|
3906
|
-
if (dirty & /*closeModal*/
|
|
3907
|
-
closebutton_changes.closeModal = /*closeModal*/ ctx[
|
|
5472
|
+
if (dirty & /*closeModal*/ 8)
|
|
5473
|
+
closebutton_changes.closeModal = /*closeModal*/ ctx[3];
|
|
3908
5474
|
closebutton.$set(closebutton_changes);
|
|
3909
5475
|
var profilemodalnav_changes = {};
|
|
5476
|
+
if (dirty & /*onSuccessLogout*/ 4)
|
|
5477
|
+
profilemodalnav_changes.onSuccessLogout = /*onSuccessLogout*/ ctx[2];
|
|
5478
|
+
if (dirty & /*hideProfileSection*/ 16)
|
|
5479
|
+
profilemodalnav_changes.hideProfileSection = /*hideProfileSection*/ ctx[4];
|
|
5480
|
+
if (!updating_member && dirty & /*member*/ 2) {
|
|
5481
|
+
updating_member = true;
|
|
5482
|
+
profilemodalnav_changes.member = /*member*/ ctx[1];
|
|
5483
|
+
add_flush_callback(function () { return updating_member = false; });
|
|
5484
|
+
}
|
|
3910
5485
|
if (!updating_displayProfile && dirty & /*displayProfile*/ 1) {
|
|
3911
5486
|
updating_displayProfile = true;
|
|
3912
5487
|
profilemodalnav_changes.displayProfile = /*displayProfile*/ ctx[0];
|
|
3913
5488
|
add_flush_callback(function () { return updating_displayProfile = false; });
|
|
3914
5489
|
}
|
|
5490
|
+
if (!updating_profileLoader && dirty & /*profileLoader*/ 32) {
|
|
5491
|
+
updating_profileLoader = true;
|
|
5492
|
+
profilemodalnav_changes.profileLoader = /*profileLoader*/ ctx[5];
|
|
5493
|
+
add_flush_callback(function () { return updating_profileLoader = false; });
|
|
5494
|
+
}
|
|
3915
5495
|
profilemodalnav.$set(profilemodalnav_changes);
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
3920
|
-
|
|
5496
|
+
if ( /*profileLoader*/ctx[5]) {
|
|
5497
|
+
if (if_block1) {
|
|
5498
|
+
if (dirty & /*profileLoader*/ 32) {
|
|
5499
|
+
transition_in(if_block1, 1);
|
|
5500
|
+
}
|
|
5501
|
+
}
|
|
5502
|
+
else {
|
|
5503
|
+
if_block1 = create_if_block_3$1();
|
|
5504
|
+
if_block1.c();
|
|
5505
|
+
transition_in(if_block1, 1);
|
|
5506
|
+
if_block1.m(div3, t5);
|
|
5507
|
+
}
|
|
5508
|
+
}
|
|
5509
|
+
else if (if_block1) {
|
|
5510
|
+
group_outros();
|
|
5511
|
+
transition_out(if_block1, 1, 1, function () {
|
|
5512
|
+
if_block1 = null;
|
|
5513
|
+
});
|
|
5514
|
+
check_outros();
|
|
5515
|
+
}
|
|
5516
|
+
var previous_block_index_1 = current_block_type_index_1;
|
|
5517
|
+
current_block_type_index_1 = select_block_type_1(ctx);
|
|
5518
|
+
if (current_block_type_index_1 === previous_block_index_1) {
|
|
5519
|
+
if (~current_block_type_index_1) {
|
|
5520
|
+
if_blocks_1[current_block_type_index_1].p(ctx, dirty);
|
|
3921
5521
|
}
|
|
3922
5522
|
}
|
|
3923
5523
|
else {
|
|
3924
|
-
if (
|
|
5524
|
+
if (if_block2) {
|
|
3925
5525
|
group_outros();
|
|
3926
|
-
transition_out(
|
|
3927
|
-
|
|
5526
|
+
transition_out(if_blocks_1[previous_block_index_1], 1, 1, function () {
|
|
5527
|
+
if_blocks_1[previous_block_index_1] = null;
|
|
3928
5528
|
});
|
|
3929
5529
|
check_outros();
|
|
3930
5530
|
}
|
|
3931
|
-
if (~
|
|
3932
|
-
|
|
3933
|
-
if (!
|
|
3934
|
-
|
|
3935
|
-
|
|
5531
|
+
if (~current_block_type_index_1) {
|
|
5532
|
+
if_block2 = if_blocks_1[current_block_type_index_1];
|
|
5533
|
+
if (!if_block2) {
|
|
5534
|
+
if_block2 = if_blocks_1[current_block_type_index_1] = if_block_creators_1[current_block_type_index_1](ctx);
|
|
5535
|
+
if_block2.c();
|
|
3936
5536
|
}
|
|
3937
5537
|
else {
|
|
3938
|
-
|
|
5538
|
+
if_block2.p(ctx, dirty);
|
|
3939
5539
|
}
|
|
3940
|
-
transition_in(
|
|
3941
|
-
|
|
5540
|
+
transition_in(if_block2, 1);
|
|
5541
|
+
if_block2.m(div3, null);
|
|
3942
5542
|
}
|
|
3943
5543
|
else {
|
|
3944
|
-
|
|
5544
|
+
if_block2 = null;
|
|
3945
5545
|
}
|
|
3946
5546
|
}
|
|
5547
|
+
if (!current || dirty & /*profileSectionHeight*/ 64) {
|
|
5548
|
+
set_style(div3, "height", /*profileSectionHeight*/ ctx[6]);
|
|
5549
|
+
}
|
|
3947
5550
|
},
|
|
3948
5551
|
i: function (local) {
|
|
3949
5552
|
if (current)
|
|
3950
5553
|
return;
|
|
3951
|
-
transition_in(
|
|
5554
|
+
transition_in(if_block0);
|
|
3952
5555
|
transition_in(closebutton.$$.fragment, local);
|
|
3953
5556
|
transition_in(profilemodalnav.$$.fragment, local);
|
|
3954
|
-
transition_in(
|
|
5557
|
+
transition_in(if_block1);
|
|
5558
|
+
transition_in(if_block2);
|
|
3955
5559
|
transition_in(modalfooter.$$.fragment, local);
|
|
3956
5560
|
current = true;
|
|
3957
5561
|
},
|
|
3958
5562
|
o: function (local) {
|
|
3959
|
-
transition_out(
|
|
5563
|
+
transition_out(if_block0);
|
|
3960
5564
|
transition_out(closebutton.$$.fragment, local);
|
|
3961
5565
|
transition_out(profilemodalnav.$$.fragment, local);
|
|
3962
|
-
transition_out(
|
|
5566
|
+
transition_out(if_block1);
|
|
5567
|
+
transition_out(if_block2);
|
|
3963
5568
|
transition_out(modalfooter.$$.fragment, local);
|
|
3964
5569
|
current = false;
|
|
3965
5570
|
},
|
|
3966
5571
|
d: function (detaching) {
|
|
3967
5572
|
if (detaching)
|
|
3968
5573
|
detach(div5);
|
|
3969
|
-
|
|
5574
|
+
if_blocks[current_block_type_index].d();
|
|
3970
5575
|
destroy_component(closebutton);
|
|
3971
5576
|
destroy_component(profilemodalnav);
|
|
3972
|
-
if (
|
|
3973
|
-
|
|
5577
|
+
if (if_block1)
|
|
5578
|
+
if_block1.d();
|
|
5579
|
+
if (~current_block_type_index_1) {
|
|
5580
|
+
if_blocks_1[current_block_type_index_1].d();
|
|
3974
5581
|
}
|
|
3975
5582
|
destroy_component(modalfooter);
|
|
3976
5583
|
}
|
|
3977
5584
|
};
|
|
3978
5585
|
}
|
|
3979
5586
|
function instance$1($$self, $$props, $$invalidate) {
|
|
5587
|
+
var profileSectionHeight;
|
|
5588
|
+
var $app;
|
|
5589
|
+
component_subscribe($$self, AppStore, function ($$value) { return $$invalidate(7, $app = $$value); });
|
|
5590
|
+
var onSuccessLogout = $$props.onSuccessLogout;
|
|
3980
5591
|
var closeModal = $$props.closeModal;
|
|
3981
5592
|
var _a = $$props.displayProfile, displayProfile = _a === void 0 ? "profile" : _a;
|
|
5593
|
+
var member = $$props.member;
|
|
5594
|
+
var hideProfileSection = false;
|
|
5595
|
+
var profileLoader = false;
|
|
5596
|
+
if (!$app.customFields.filter(function (field) { return !field.hidden; }).length) {
|
|
5597
|
+
displayProfile = "security";
|
|
5598
|
+
hideProfileSection = true;
|
|
5599
|
+
}
|
|
5600
|
+
function profilemodalnav_member_binding(value) {
|
|
5601
|
+
member = value;
|
|
5602
|
+
$$invalidate(1, member);
|
|
5603
|
+
}
|
|
3982
5604
|
function profilemodalnav_displayProfile_binding(value) {
|
|
3983
5605
|
displayProfile = value;
|
|
3984
5606
|
$$invalidate(0, displayProfile);
|
|
3985
5607
|
}
|
|
5608
|
+
function profilemodalnav_profileLoader_binding(value) {
|
|
5609
|
+
profileLoader = value;
|
|
5610
|
+
$$invalidate(5, profileLoader);
|
|
5611
|
+
}
|
|
5612
|
+
function profileinfocontent_member_binding(value) {
|
|
5613
|
+
member = value;
|
|
5614
|
+
$$invalidate(1, member);
|
|
5615
|
+
}
|
|
5616
|
+
function profileinfocontent_profileLoader_binding(value) {
|
|
5617
|
+
profileLoader = value;
|
|
5618
|
+
$$invalidate(5, profileLoader);
|
|
5619
|
+
}
|
|
3986
5620
|
function securityinfocontent_displayProfile_binding(value) {
|
|
3987
5621
|
displayProfile = value;
|
|
3988
5622
|
$$invalidate(0, displayProfile);
|
|
3989
5623
|
}
|
|
5624
|
+
function securityinfocontent_profileLoader_binding(value) {
|
|
5625
|
+
profileLoader = value;
|
|
5626
|
+
$$invalidate(5, profileLoader);
|
|
5627
|
+
}
|
|
3990
5628
|
function passwordinfocontent_displayProfile_binding(value) {
|
|
3991
5629
|
displayProfile = value;
|
|
3992
5630
|
$$invalidate(0, displayProfile);
|
|
3993
5631
|
}
|
|
5632
|
+
function passwordinfocontent_profileLoader_binding(value) {
|
|
5633
|
+
profileLoader = value;
|
|
5634
|
+
$$invalidate(5, profileLoader);
|
|
5635
|
+
}
|
|
3994
5636
|
$$self.$$set = function ($$props) {
|
|
5637
|
+
if ('onSuccessLogout' in $$props)
|
|
5638
|
+
$$invalidate(2, onSuccessLogout = $$props.onSuccessLogout);
|
|
3995
5639
|
if ('closeModal' in $$props)
|
|
3996
|
-
$$invalidate(
|
|
5640
|
+
$$invalidate(3, closeModal = $$props.closeModal);
|
|
3997
5641
|
if ('displayProfile' in $$props)
|
|
3998
5642
|
$$invalidate(0, displayProfile = $$props.displayProfile);
|
|
5643
|
+
if ('member' in $$props)
|
|
5644
|
+
$$invalidate(1, member = $$props.member);
|
|
5645
|
+
};
|
|
5646
|
+
$$self.$$.update = function () {
|
|
5647
|
+
if ($$self.$$.dirty & /*displayProfile*/ 1) {
|
|
5648
|
+
$$invalidate(6, profileSectionHeight = displayProfile === "profile" ? "400px" : "300px");
|
|
5649
|
+
}
|
|
3999
5650
|
};
|
|
4000
5651
|
return [
|
|
4001
5652
|
displayProfile,
|
|
5653
|
+
member,
|
|
5654
|
+
onSuccessLogout,
|
|
4002
5655
|
closeModal,
|
|
5656
|
+
hideProfileSection,
|
|
5657
|
+
profileLoader,
|
|
5658
|
+
profileSectionHeight,
|
|
5659
|
+
$app,
|
|
5660
|
+
profilemodalnav_member_binding,
|
|
4003
5661
|
profilemodalnav_displayProfile_binding,
|
|
5662
|
+
profilemodalnav_profileLoader_binding,
|
|
5663
|
+
profileinfocontent_member_binding,
|
|
5664
|
+
profileinfocontent_profileLoader_binding,
|
|
4004
5665
|
securityinfocontent_displayProfile_binding,
|
|
4005
|
-
|
|
5666
|
+
securityinfocontent_profileLoader_binding,
|
|
5667
|
+
passwordinfocontent_displayProfile_binding,
|
|
5668
|
+
passwordinfocontent_profileLoader_binding
|
|
4006
5669
|
];
|
|
4007
5670
|
}
|
|
4008
5671
|
var ProfileModal = /** @class */ (function (_super) {
|
|
4009
5672
|
__extends(ProfileModal, _super);
|
|
4010
5673
|
function ProfileModal(options) {
|
|
4011
5674
|
var _this = _super.call(this) || this;
|
|
4012
|
-
init(_this, options, instance$1, create_fragment$1, safe_not_equal, {
|
|
5675
|
+
init(_this, options, instance$1, create_fragment$1, safe_not_equal, {
|
|
5676
|
+
onSuccessLogout: 2,
|
|
5677
|
+
closeModal: 3,
|
|
5678
|
+
displayProfile: 0,
|
|
5679
|
+
member: 1
|
|
5680
|
+
});
|
|
4013
5681
|
return _this;
|
|
4014
5682
|
}
|
|
4015
5683
|
return ProfileModal;
|
|
4016
5684
|
}(SvelteComponent));
|
|
4017
5685
|
/* src/Main.svelte generated by Svelte v3.48.0 */
|
|
4018
5686
|
function add_css(target) {
|
|
4019
|
-
append_styles(target, "svelte-
|
|
5687
|
+
append_styles(target, "svelte-1fq6c9b", "@import url(\"https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap\");#msOverlay.svelte-1fq6c9b{position:fixed;display:flex;justify-content:center;align-items:center;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:rgba(0, 0, 0, 0.5);z-index:99999;overflow:scroll;font-family:\"Plus Jakarta Sans\", sans-serif}.--hide{display:none}.ms__loader{position:relative;z-index:10000000}#msLoader path{fill:#007ace}.ms__profile__loader{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background:rgb(255 255 255 / 75%)}.ms-modal{box-sizing:border-box;margin:auto;min-width:0;position:relative;outline:none;background:white;border-radius:16px;box-shadow:2px 2px 12px rgb(0 0 0 / 10%);width:360px;color:rgb(10, 10, 10)}.ms-modal--profile{width:700px}.ms-modal__close{box-sizing:border-box;margin:0;min-width:0;position:absolute;top:16px;right:16px;z-index:10;line-height:0}.ms-modal__close button{appearance:none;padding:0;outline:none;width:12px;border:0;background:transparent;cursor:pointer;color:#5c5c5c}.ms-modal__close button:hover{color:#0a0a0a}.ms-modal__back{box-sizing:border-box;margin:0;min-width:0;position:absolute;top:16px;left:16px;z-index:10;line-height:0}.ms-modal__back button{appearance:none;padding:0;outline:none;width:12px;border:0;background:transparent;cursor:pointer;color:#5c5c5c}.ms-modal__back button:hover, .ms-modal__profile-back button:hover{color:#0a0a0a}.ms-modal__back svg{height:12px}.ms-modal__profile-back button{appearance:none;padding:5px;margin-right:6px;outline:none;width:25px;height:25px;border:0;background:transparent;cursor:pointer;color:#5c5c5c;display:flex;align-items:stretch;justify-content:center}.ms-modal__header{display:flex;align-items:center;padding:12px}.ms-modal__content{padding:28px 28px 20px;width:100%;box-sizing:border-box;margin:0 auto}.ms-modal__content--profile{padding:0;display:flex;flex-wrap:wrap;align-content:stretch;align-items:stretch;border-top:1px solid #DDDDDD}.ms-modal__content-left{display:flex;flex-direction:column;align-items:flex-start;padding:20px;border-right:1px solid #DDDDDD;min-width:160px}.ms-modal__content-right{padding:20px;flex-grow:1;height:100%;min-height:300px;max-height:400px;overflow-y:auto;position:relative;transition:height 0.3s ease-in-out}.ms-modal__figure{box-sizing:border-box;margin:8px auto;width:44px;height:44px;border-style:solid;border-width:1px;border-color:rgb(235, 235, 235);box-shadow:rgb(0 0 0 / 4%) 0px 2px 2px 0px;display:flex;position:relative;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;flex-shrink:0;line-height:1;border-radius:50%;overflow:hidden}.ms-modal__figure--profile{width:24px;height:24px;padding:0px;margin:0px 8px 0px 0px}.ms-modal__figure img{width:100%;height:100%;text-align:center;object-fit:cover;color:transparent;text-indent:10000px}.ms-modal__title-container{display:flex;justify-content:space-between;align-items:center;margin-bottom:24px}.ms-modal__title{margin-bottom:36px;margin-top:0;text-align:center;font-size:24px;line-height:32px;font-weight:700}.ms-modal__title--profile{margin-bottom:0px}.ms-modal__title-group{display:flex;align-items:center}.ms-modal__title--sub-text{margin-bottom:8px}.ms-modal__text{font-weight:500;font-size:16px;line-height:28px;text-align:center;margin:0 0 20px 0}.ms-form{width:100%}.ms-form__group{margin-bottom:20px}.ms-form__flex{display:flex;justify-content:space-between;align-content:center}.ms-form__flex--centered{justify-content:center}.ms-form__label{margin-bottom:4px;margin-top:0px;font-size:14px;line-height:24px;font-weight:700}.ms-form__fieldset{display:flex;justify-content:space-between;padding:0;border:none}.ms-form__input{box-sizing:border-box;margin:0px;border:1px solid rgb(201, 201, 201);border-radius:6px;font-size:16px;font-weight:400;padding:15px;width:100%}.ms-form__password-container{display:flex;justify-content:space-between;align-content:center;box-sizing:border-box;margin:0px;border:1px solid rgb(201, 201, 201);border-radius:6px;width:100%}.ms-form__password-container:focus-within{border:1px solid rgb(0, 68, 252);outline:rgb(0, 68, 252) solid 1px}.ms-form__password-container:focus-within input{outline:none;border-color:rgb(201, 201, 201);box-shadow:none}.ms-form__input--password{border:none}.ms-form__input--token{font-weight:500;font-size:24.19px;line-height:32px;text-align:center;color:#000000;padding:9px;max-width:42px}.ms-form__show-toggle{cursor:pointer;background:transparent;border-radius:0px 6px 6px 0px;padding:0px 8px;display:flex;align-items:center}.ms-form__eye{display:block;width:22px}.ms-form__eye-slash{display:block;width:22px}.ms-form__error{font-weight:500;font-size:12px;line-height:16px;color:#e40023;margin-top:4px;display:flex;align-items:baseline}.ms-form__error svg{width:10px;height:10px;margin-right:5px}.ms-form__label--right a{color:rgb(10, 10, 10) !important;text-decoration:none;font-weight:400}.ms-form__button{border-radius:6px;font-weight:700;font-size:16px;padding-left:22px;padding-right:22px;height:52px;border:none;display:block;width:100%;background-color:rgb(41, 98, 255);color:#fff;transition:background-color 0.5s ease;cursor:pointer}.ms-form__button:hover{background-color:#0745ff}.ms-form__button:disabled{background-color:#96C0FE;color:#fff;pointer-events:none;display:flex;justify-content:center;align-items:center}.ms-form__button--text{background-color:transparent;padding:0px;height:auto;margin-bottom:0px;margin-top:0px;font-size:14px;line-height:28px;font-weight:500;color:#0A0A0A;opacity:0.8}.ms-form__button--text:hover{background-color:transparent}#msFormLoader path{fill:#fff}a.ms-form__link{margin-top:8px;font-weight:500;font-size:14px;line-height:24px;color:rgb(10, 10, 10) !important;text-decoration:none;opacity:0.8}.ms-modal__cancel-button{background:#F6F6F6;color:#828282;padding:8px;margin-right:8px;border-radius:4px;border:none;font-weight:700;font-size:14px;line-height:16px;cursor:pointer}.ms-modal__save-button{background:#2962FF;color:#fff;padding:8px;border-radius:4px;border:none;font-weight:700;font-size:14px;line-height:16px;cursor:pointer}.ms-modal__save-button:disabled{background:#80a1fc;color:#fff;cursor:default}.ms-modal__outline-button{background:#fff;color:#0A0A0A;font-weight:700;font-size:14px;line-height:16px;padding:12px;margin-right:8px;border-radius:4px;border:1px solid #DDDDDD;cursor:pointer}.ms-modal__outline-button svg{height:14px;margin-right:6px}.ms-modal__button-label{margin-bottom:4px;margin-top:0px;font-size:14px;line-height:28px;font-weight:500}.ms-modal__profile-option{cursor:pointer;margin-bottom:20px;font-weight:500;font-size:16px;line-height:28px;background:transparent;border:none;padding:0px}.ms-modal__profile-option svg{height:14px;margin-right:8px}.ms-modal__profile-option:hover{color:#2962FF}.ms-modal__profile-option--active{color:#2962FF}.ms-modal__social-divider{display:flex;align-items:center;margin:20px 0px}.ms-modal__divider-line{text-align:center;background:#dddddd;height:1px;width:100%}.ms-modal__divider-text{padding:0px 4px}.ms-modal__footer{text-align:center;width:100%;box-sizing:border-box;margin:0;min-width:0;background:#f6f6f6;padding-top:10px;padding-bottom:10px;border-bottom-left-radius:16px;border-bottom-right-radius:16px;border-top:1px solid;border-top-color:#dddddd;font-size:12px;line-height:16px;font-weight:500}.ms-modal__footer a{color:rgb(10, 10, 10);text-decoration:none;display:flex;justify-content:center;align-items:center}.ms-modal__footer svg{height:12px;width:12px;margin-right:5.5px}");
|
|
4020
5688
|
}
|
|
4021
|
-
// (
|
|
4022
|
-
function
|
|
4023
|
-
var
|
|
5689
|
+
// (86:36)
|
|
5690
|
+
function create_if_block_6(ctx) {
|
|
5691
|
+
var profilemodal;
|
|
5692
|
+
var updating_display;
|
|
4024
5693
|
var current;
|
|
4025
|
-
|
|
5694
|
+
function profilemodal_display_binding(value) {
|
|
5695
|
+
/*profilemodal_display_binding*/ ctx[15](value);
|
|
5696
|
+
}
|
|
5697
|
+
var profilemodal_props = {
|
|
5698
|
+
closeModal: /*closeModal*/ ctx[5],
|
|
5699
|
+
onSuccessLogout: /*onSuccess*/ ctx[2],
|
|
5700
|
+
member: /*member*/ ctx[3]
|
|
5701
|
+
};
|
|
5702
|
+
if ( /*display*/ctx[0] !== void 0) {
|
|
5703
|
+
profilemodal_props.display = /*display*/ ctx[0];
|
|
5704
|
+
}
|
|
5705
|
+
profilemodal = new ProfileModal({ props: profilemodal_props });
|
|
5706
|
+
binding_callbacks.push(function () { return bind(profilemodal, 'display', profilemodal_display_binding); });
|
|
4026
5707
|
return {
|
|
4027
5708
|
c: function () {
|
|
4028
|
-
create_component(
|
|
5709
|
+
create_component(profilemodal.$$.fragment);
|
|
4029
5710
|
},
|
|
4030
5711
|
m: function (target, anchor) {
|
|
4031
|
-
mount_component(
|
|
5712
|
+
mount_component(profilemodal, target, anchor);
|
|
4032
5713
|
current = true;
|
|
4033
5714
|
},
|
|
5715
|
+
p: function (ctx, dirty) {
|
|
5716
|
+
var profilemodal_changes = {};
|
|
5717
|
+
if (dirty & /*onSuccess*/ 4)
|
|
5718
|
+
profilemodal_changes.onSuccessLogout = /*onSuccess*/ ctx[2];
|
|
5719
|
+
if (dirty & /*member*/ 8)
|
|
5720
|
+
profilemodal_changes.member = /*member*/ ctx[3];
|
|
5721
|
+
if (!updating_display && dirty & /*display*/ 1) {
|
|
5722
|
+
updating_display = true;
|
|
5723
|
+
profilemodal_changes.display = /*display*/ ctx[0];
|
|
5724
|
+
add_flush_callback(function () { return updating_display = false; });
|
|
5725
|
+
}
|
|
5726
|
+
profilemodal.$set(profilemodal_changes);
|
|
5727
|
+
},
|
|
4034
5728
|
i: function (local) {
|
|
4035
5729
|
if (current)
|
|
4036
5730
|
return;
|
|
4037
|
-
transition_in(
|
|
5731
|
+
transition_in(profilemodal.$$.fragment, local);
|
|
4038
5732
|
current = true;
|
|
4039
5733
|
},
|
|
4040
5734
|
o: function (local) {
|
|
4041
|
-
transition_out(
|
|
5735
|
+
transition_out(profilemodal.$$.fragment, local);
|
|
4042
5736
|
current = false;
|
|
4043
5737
|
},
|
|
4044
5738
|
d: function (detaching) {
|
|
4045
|
-
destroy_component(
|
|
5739
|
+
destroy_component(profilemodal, detaching);
|
|
4046
5740
|
}
|
|
4047
5741
|
};
|
|
4048
5742
|
}
|
|
4049
|
-
// (
|
|
4050
|
-
function
|
|
4051
|
-
var
|
|
5743
|
+
// (84:51)
|
|
5744
|
+
function create_if_block_5(ctx) {
|
|
5745
|
+
var passwordsuccessmodal;
|
|
4052
5746
|
var updating_display;
|
|
4053
5747
|
var current;
|
|
4054
|
-
function
|
|
4055
|
-
/*
|
|
5748
|
+
function passwordsuccessmodal_display_binding(value) {
|
|
5749
|
+
/*passwordsuccessmodal_display_binding*/ ctx[14](value);
|
|
4056
5750
|
}
|
|
4057
|
-
var
|
|
5751
|
+
var passwordsuccessmodal_props = { closeModal: /*closeModal*/ ctx[5] };
|
|
4058
5752
|
if ( /*display*/ctx[0] !== void 0) {
|
|
4059
|
-
|
|
5753
|
+
passwordsuccessmodal_props.display = /*display*/ ctx[0];
|
|
4060
5754
|
}
|
|
4061
|
-
|
|
4062
|
-
binding_callbacks.push(function () { return bind(
|
|
5755
|
+
passwordsuccessmodal = new PassSuccessModal({ props: passwordsuccessmodal_props });
|
|
5756
|
+
binding_callbacks.push(function () { return bind(passwordsuccessmodal, 'display', passwordsuccessmodal_display_binding); });
|
|
4063
5757
|
return {
|
|
4064
5758
|
c: function () {
|
|
4065
|
-
create_component(
|
|
5759
|
+
create_component(passwordsuccessmodal.$$.fragment);
|
|
4066
5760
|
},
|
|
4067
5761
|
m: function (target, anchor) {
|
|
4068
|
-
mount_component(
|
|
5762
|
+
mount_component(passwordsuccessmodal, target, anchor);
|
|
4069
5763
|
current = true;
|
|
4070
5764
|
},
|
|
4071
5765
|
p: function (ctx, dirty) {
|
|
4072
|
-
var
|
|
5766
|
+
var passwordsuccessmodal_changes = {};
|
|
4073
5767
|
if (!updating_display && dirty & /*display*/ 1) {
|
|
4074
5768
|
updating_display = true;
|
|
4075
|
-
|
|
5769
|
+
passwordsuccessmodal_changes.display = /*display*/ ctx[0];
|
|
4076
5770
|
add_flush_callback(function () { return updating_display = false; });
|
|
4077
5771
|
}
|
|
4078
|
-
|
|
5772
|
+
passwordsuccessmodal.$set(passwordsuccessmodal_changes);
|
|
4079
5773
|
},
|
|
4080
5774
|
i: function (local) {
|
|
4081
5775
|
if (current)
|
|
4082
5776
|
return;
|
|
4083
|
-
transition_in(
|
|
5777
|
+
transition_in(passwordsuccessmodal.$$.fragment, local);
|
|
4084
5778
|
current = true;
|
|
4085
5779
|
},
|
|
4086
5780
|
o: function (local) {
|
|
4087
|
-
transition_out(
|
|
5781
|
+
transition_out(passwordsuccessmodal.$$.fragment, local);
|
|
4088
5782
|
current = false;
|
|
4089
5783
|
},
|
|
4090
5784
|
d: function (detaching) {
|
|
4091
|
-
destroy_component(
|
|
5785
|
+
destroy_component(passwordsuccessmodal, detaching);
|
|
4092
5786
|
}
|
|
4093
5787
|
};
|
|
4094
5788
|
}
|
|
4095
|
-
// (
|
|
4096
|
-
function
|
|
5789
|
+
// (82:43)
|
|
5790
|
+
function create_if_block_4(ctx) {
|
|
4097
5791
|
var passwordtokenmodal;
|
|
4098
5792
|
var updating_display;
|
|
4099
5793
|
var current;
|
|
4100
5794
|
function passwordtokenmodal_display_binding(value) {
|
|
4101
|
-
/*passwordtokenmodal_display_binding*/ ctx[
|
|
5795
|
+
/*passwordtokenmodal_display_binding*/ ctx[13](value);
|
|
4102
5796
|
}
|
|
4103
5797
|
var passwordtokenmodal_props = {
|
|
4104
|
-
closeModal: /*closeModal*/ ctx[
|
|
4105
|
-
onSuccessPasswordReset: /*onSuccess*/ ctx[
|
|
5798
|
+
closeModal: /*closeModal*/ ctx[5],
|
|
5799
|
+
onSuccessPasswordReset: /*onSuccess*/ ctx[2]
|
|
4106
5800
|
};
|
|
4107
5801
|
if ( /*display*/ctx[0] !== void 0) {
|
|
4108
5802
|
passwordtokenmodal_props.display = /*display*/ ctx[0];
|
|
@@ -4119,8 +5813,8 @@ function create_if_block_3(ctx) {
|
|
|
4119
5813
|
},
|
|
4120
5814
|
p: function (ctx, dirty) {
|
|
4121
5815
|
var passwordtokenmodal_changes = {};
|
|
4122
|
-
if (dirty & /*onSuccess*/
|
|
4123
|
-
passwordtokenmodal_changes.onSuccessPasswordReset = /*onSuccess*/ ctx[
|
|
5816
|
+
if (dirty & /*onSuccess*/ 4)
|
|
5817
|
+
passwordtokenmodal_changes.onSuccessPasswordReset = /*onSuccess*/ ctx[2];
|
|
4124
5818
|
if (!updating_display && dirty & /*display*/ 1) {
|
|
4125
5819
|
updating_display = true;
|
|
4126
5820
|
passwordtokenmodal_changes.display = /*display*/ ctx[0];
|
|
@@ -4143,15 +5837,15 @@ function create_if_block_3(ctx) {
|
|
|
4143
5837
|
}
|
|
4144
5838
|
};
|
|
4145
5839
|
}
|
|
4146
|
-
// (
|
|
4147
|
-
function
|
|
5840
|
+
// (80:44)
|
|
5841
|
+
function create_if_block_3(ctx) {
|
|
4148
5842
|
var passwordresetmodal;
|
|
4149
5843
|
var updating_display;
|
|
4150
5844
|
var current;
|
|
4151
5845
|
function passwordresetmodal_display_binding(value) {
|
|
4152
|
-
/*passwordresetmodal_display_binding*/ ctx[
|
|
5846
|
+
/*passwordresetmodal_display_binding*/ ctx[12](value);
|
|
4153
5847
|
}
|
|
4154
|
-
var passwordresetmodal_props = { closeModal: /*closeModal*/ ctx[
|
|
5848
|
+
var passwordresetmodal_props = { closeModal: /*closeModal*/ ctx[5] };
|
|
4155
5849
|
if ( /*display*/ctx[0] !== void 0) {
|
|
4156
5850
|
passwordresetmodal_props.display = /*display*/ ctx[0];
|
|
4157
5851
|
}
|
|
@@ -4189,21 +5883,21 @@ function create_if_block_2(ctx) {
|
|
|
4189
5883
|
}
|
|
4190
5884
|
};
|
|
4191
5885
|
}
|
|
4192
|
-
// (
|
|
4193
|
-
function
|
|
5886
|
+
// (78:35)
|
|
5887
|
+
function create_if_block_2(ctx) {
|
|
4194
5888
|
var signupmodal;
|
|
4195
5889
|
var updating_display;
|
|
4196
5890
|
var updating_params;
|
|
4197
5891
|
var current;
|
|
4198
5892
|
function signupmodal_display_binding(value) {
|
|
4199
|
-
/*signupmodal_display_binding*/ ctx[
|
|
5893
|
+
/*signupmodal_display_binding*/ ctx[10](value);
|
|
4200
5894
|
}
|
|
4201
5895
|
function signupmodal_params_binding(value) {
|
|
4202
|
-
/*signupmodal_params_binding*/ ctx[
|
|
5896
|
+
/*signupmodal_params_binding*/ ctx[11](value);
|
|
4203
5897
|
}
|
|
4204
5898
|
var signupmodal_props = {
|
|
4205
|
-
closeModal: /*closeModal*/ ctx[
|
|
4206
|
-
onSuccessSignup: /*onSuccess*/ ctx[
|
|
5899
|
+
closeModal: /*closeModal*/ ctx[5],
|
|
5900
|
+
onSuccessSignup: /*onSuccess*/ ctx[2]
|
|
4207
5901
|
};
|
|
4208
5902
|
if ( /*display*/ctx[0] !== void 0) {
|
|
4209
5903
|
signupmodal_props.display = /*display*/ ctx[0];
|
|
@@ -4224,8 +5918,8 @@ function create_if_block_1(ctx) {
|
|
|
4224
5918
|
},
|
|
4225
5919
|
p: function (ctx, dirty) {
|
|
4226
5920
|
var signupmodal_changes = {};
|
|
4227
|
-
if (dirty & /*onSuccess*/
|
|
4228
|
-
signupmodal_changes.onSuccessSignup = /*onSuccess*/ ctx[
|
|
5921
|
+
if (dirty & /*onSuccess*/ 4)
|
|
5922
|
+
signupmodal_changes.onSuccessSignup = /*onSuccess*/ ctx[2];
|
|
4229
5923
|
if (!updating_display && dirty & /*display*/ 1) {
|
|
4230
5924
|
updating_display = true;
|
|
4231
5925
|
signupmodal_changes.display = /*display*/ ctx[0];
|
|
@@ -4253,21 +5947,21 @@ function create_if_block_1(ctx) {
|
|
|
4253
5947
|
}
|
|
4254
5948
|
};
|
|
4255
5949
|
}
|
|
4256
|
-
// (
|
|
4257
|
-
function
|
|
5950
|
+
// (76:4) {#if display === "login"}
|
|
5951
|
+
function create_if_block_1(ctx) {
|
|
4258
5952
|
var loginmodal;
|
|
4259
5953
|
var updating_display;
|
|
4260
5954
|
var updating_params;
|
|
4261
5955
|
var current;
|
|
4262
5956
|
function loginmodal_display_binding(value) {
|
|
4263
|
-
/*loginmodal_display_binding*/ ctx[
|
|
5957
|
+
/*loginmodal_display_binding*/ ctx[8](value);
|
|
4264
5958
|
}
|
|
4265
5959
|
function loginmodal_params_binding(value) {
|
|
4266
|
-
/*loginmodal_params_binding*/ ctx[
|
|
5960
|
+
/*loginmodal_params_binding*/ ctx[9](value);
|
|
4267
5961
|
}
|
|
4268
5962
|
var loginmodal_props = {
|
|
4269
|
-
closeModal: /*closeModal*/ ctx[
|
|
4270
|
-
onSuccessLogin: /*onSuccess*/ ctx[
|
|
5963
|
+
closeModal: /*closeModal*/ ctx[5],
|
|
5964
|
+
onSuccessLogin: /*onSuccess*/ ctx[2]
|
|
4271
5965
|
};
|
|
4272
5966
|
if ( /*display*/ctx[0] !== void 0) {
|
|
4273
5967
|
loginmodal_props.display = /*display*/ ctx[0];
|
|
@@ -4288,8 +5982,8 @@ function create_if_block(ctx) {
|
|
|
4288
5982
|
},
|
|
4289
5983
|
p: function (ctx, dirty) {
|
|
4290
5984
|
var loginmodal_changes = {};
|
|
4291
|
-
if (dirty & /*onSuccess*/
|
|
4292
|
-
loginmodal_changes.onSuccessLogin = /*onSuccess*/ ctx[
|
|
5985
|
+
if (dirty & /*onSuccess*/ 4)
|
|
5986
|
+
loginmodal_changes.onSuccessLogin = /*onSuccess*/ ctx[2];
|
|
4293
5987
|
if (!updating_display && dirty & /*display*/ 1) {
|
|
4294
5988
|
updating_display = true;
|
|
4295
5989
|
loginmodal_changes.display = /*display*/ ctx[0];
|
|
@@ -4317,53 +6011,80 @@ function create_if_block(ctx) {
|
|
|
4317
6011
|
}
|
|
4318
6012
|
};
|
|
4319
6013
|
}
|
|
6014
|
+
// (73:2) {#if showLoader}
|
|
6015
|
+
function create_if_block(ctx) {
|
|
6016
|
+
var loader;
|
|
6017
|
+
var current;
|
|
6018
|
+
loader = new Loader({});
|
|
6019
|
+
return {
|
|
6020
|
+
c: function () {
|
|
6021
|
+
create_component(loader.$$.fragment);
|
|
6022
|
+
},
|
|
6023
|
+
m: function (target, anchor) {
|
|
6024
|
+
mount_component(loader, target, anchor);
|
|
6025
|
+
current = true;
|
|
6026
|
+
},
|
|
6027
|
+
p: noop,
|
|
6028
|
+
i: function (local) {
|
|
6029
|
+
if (current)
|
|
6030
|
+
return;
|
|
6031
|
+
transition_in(loader.$$.fragment, local);
|
|
6032
|
+
current = true;
|
|
6033
|
+
},
|
|
6034
|
+
o: function (local) {
|
|
6035
|
+
transition_out(loader.$$.fragment, local);
|
|
6036
|
+
current = false;
|
|
6037
|
+
},
|
|
6038
|
+
d: function (detaching) {
|
|
6039
|
+
destroy_component(loader, detaching);
|
|
6040
|
+
}
|
|
6041
|
+
};
|
|
6042
|
+
}
|
|
4320
6043
|
function create_fragment(ctx) {
|
|
4321
6044
|
var main;
|
|
4322
|
-
var t;
|
|
4323
6045
|
var current_block_type_index;
|
|
4324
|
-
var
|
|
6046
|
+
var if_block;
|
|
4325
6047
|
var current;
|
|
4326
|
-
var if_block0 = /*showLoader*/ ctx[2] && create_if_block_5();
|
|
4327
6048
|
var if_block_creators = [
|
|
4328
6049
|
create_if_block,
|
|
4329
6050
|
create_if_block_1,
|
|
4330
6051
|
create_if_block_2,
|
|
4331
6052
|
create_if_block_3,
|
|
4332
|
-
create_if_block_4
|
|
6053
|
+
create_if_block_4,
|
|
6054
|
+
create_if_block_5,
|
|
6055
|
+
create_if_block_6
|
|
4333
6056
|
];
|
|
4334
6057
|
var if_blocks = [];
|
|
4335
6058
|
function select_block_type(ctx, dirty) {
|
|
4336
|
-
if ( /*
|
|
6059
|
+
if ( /*showLoader*/ctx[4])
|
|
4337
6060
|
return 0;
|
|
4338
|
-
if ( /*display*/ctx[0] === "
|
|
6061
|
+
if ( /*display*/ctx[0] === "login")
|
|
4339
6062
|
return 1;
|
|
4340
|
-
if ( /*display*/ctx[0] === "
|
|
6063
|
+
if ( /*display*/ctx[0] === "signup")
|
|
4341
6064
|
return 2;
|
|
4342
|
-
if ( /*display*/ctx[0] === "
|
|
6065
|
+
if ( /*display*/ctx[0] === "forgot_password")
|
|
4343
6066
|
return 3;
|
|
4344
|
-
if ( /*display*/ctx[0] === "
|
|
6067
|
+
if ( /*display*/ctx[0] === "reset_password")
|
|
4345
6068
|
return 4;
|
|
6069
|
+
if ( /*display*/ctx[0] === "reset_password_success")
|
|
6070
|
+
return 5;
|
|
6071
|
+
if ( /*display*/ctx[0] === "profile")
|
|
6072
|
+
return 6;
|
|
4346
6073
|
return -1;
|
|
4347
6074
|
}
|
|
4348
6075
|
if (~(current_block_type_index = select_block_type(ctx))) {
|
|
4349
|
-
|
|
6076
|
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
4350
6077
|
}
|
|
4351
6078
|
return {
|
|
4352
6079
|
c: function () {
|
|
4353
6080
|
main = element("main");
|
|
4354
|
-
if (
|
|
4355
|
-
|
|
4356
|
-
t = space();
|
|
4357
|
-
if (if_block1)
|
|
4358
|
-
if_block1.c();
|
|
6081
|
+
if (if_block)
|
|
6082
|
+
if_block.c();
|
|
4359
6083
|
attr(main, "id", "msOverlay");
|
|
4360
|
-
attr(main, "class", "svelte-
|
|
6084
|
+
attr(main, "class", "svelte-1fq6c9b");
|
|
4361
6085
|
},
|
|
4362
6086
|
m: function (target, anchor) {
|
|
4363
6087
|
insert(target, main, anchor);
|
|
4364
|
-
if (if_block0)
|
|
4365
|
-
if_block0.m(main, null);
|
|
4366
|
-
append(main, t);
|
|
4367
6088
|
if (~current_block_type_index) {
|
|
4368
6089
|
if_blocks[current_block_type_index].m(main, null);
|
|
4369
6090
|
}
|
|
@@ -4371,26 +6092,6 @@ function create_fragment(ctx) {
|
|
|
4371
6092
|
},
|
|
4372
6093
|
p: function (ctx, _a) {
|
|
4373
6094
|
var _b = __read(_a, 1), dirty = _b[0];
|
|
4374
|
-
if ( /*showLoader*/ctx[2]) {
|
|
4375
|
-
if (if_block0) {
|
|
4376
|
-
if (dirty & /*showLoader*/ 4) {
|
|
4377
|
-
transition_in(if_block0, 1);
|
|
4378
|
-
}
|
|
4379
|
-
}
|
|
4380
|
-
else {
|
|
4381
|
-
if_block0 = create_if_block_5();
|
|
4382
|
-
if_block0.c();
|
|
4383
|
-
transition_in(if_block0, 1);
|
|
4384
|
-
if_block0.m(main, t);
|
|
4385
|
-
}
|
|
4386
|
-
}
|
|
4387
|
-
else if (if_block0) {
|
|
4388
|
-
group_outros();
|
|
4389
|
-
transition_out(if_block0, 1, 1, function () {
|
|
4390
|
-
if_block0 = null;
|
|
4391
|
-
});
|
|
4392
|
-
check_outros();
|
|
4393
|
-
}
|
|
4394
6095
|
var previous_block_index = current_block_type_index;
|
|
4395
6096
|
current_block_type_index = select_block_type(ctx);
|
|
4396
6097
|
if (current_block_type_index === previous_block_index) {
|
|
@@ -4399,7 +6100,7 @@ function create_fragment(ctx) {
|
|
|
4399
6100
|
}
|
|
4400
6101
|
}
|
|
4401
6102
|
else {
|
|
4402
|
-
if (
|
|
6103
|
+
if (if_block) {
|
|
4403
6104
|
group_outros();
|
|
4404
6105
|
transition_out(if_blocks[previous_block_index], 1, 1, function () {
|
|
4405
6106
|
if_blocks[previous_block_index] = null;
|
|
@@ -4407,39 +6108,35 @@ function create_fragment(ctx) {
|
|
|
4407
6108
|
check_outros();
|
|
4408
6109
|
}
|
|
4409
6110
|
if (~current_block_type_index) {
|
|
4410
|
-
|
|
4411
|
-
if (!
|
|
4412
|
-
|
|
4413
|
-
|
|
6111
|
+
if_block = if_blocks[current_block_type_index];
|
|
6112
|
+
if (!if_block) {
|
|
6113
|
+
if_block = if_blocks[current_block_type_index] = if_block_creators[current_block_type_index](ctx);
|
|
6114
|
+
if_block.c();
|
|
4414
6115
|
}
|
|
4415
6116
|
else {
|
|
4416
|
-
|
|
6117
|
+
if_block.p(ctx, dirty);
|
|
4417
6118
|
}
|
|
4418
|
-
transition_in(
|
|
4419
|
-
|
|
6119
|
+
transition_in(if_block, 1);
|
|
6120
|
+
if_block.m(main, null);
|
|
4420
6121
|
}
|
|
4421
6122
|
else {
|
|
4422
|
-
|
|
6123
|
+
if_block = null;
|
|
4423
6124
|
}
|
|
4424
6125
|
}
|
|
4425
6126
|
},
|
|
4426
6127
|
i: function (local) {
|
|
4427
6128
|
if (current)
|
|
4428
6129
|
return;
|
|
4429
|
-
transition_in(
|
|
4430
|
-
transition_in(if_block1);
|
|
6130
|
+
transition_in(if_block);
|
|
4431
6131
|
current = true;
|
|
4432
6132
|
},
|
|
4433
6133
|
o: function (local) {
|
|
4434
|
-
transition_out(
|
|
4435
|
-
transition_out(if_block1);
|
|
6134
|
+
transition_out(if_block);
|
|
4436
6135
|
current = false;
|
|
4437
6136
|
},
|
|
4438
6137
|
d: function (detaching) {
|
|
4439
6138
|
if (detaching)
|
|
4440
6139
|
detach(main);
|
|
4441
|
-
if (if_block0)
|
|
4442
|
-
if_block0.d();
|
|
4443
6140
|
if (~current_block_type_index) {
|
|
4444
6141
|
if_blocks[current_block_type_index].d();
|
|
4445
6142
|
}
|
|
@@ -4447,14 +6144,80 @@ function create_fragment(ctx) {
|
|
|
4447
6144
|
};
|
|
4448
6145
|
}
|
|
4449
6146
|
function instance($$self, $$props, $$invalidate) {
|
|
4450
|
-
var
|
|
4451
|
-
var
|
|
6147
|
+
var _this = this;
|
|
6148
|
+
var showLoader;
|
|
6149
|
+
var _a = $$props.display, display = _a === void 0 ? "login" : _a; // or "signup", "forgot_password", "reset_password", "reset_password_success", and "profile"
|
|
4452
6150
|
var onSuccess = $$props.onSuccess;
|
|
4453
6151
|
var params = $$props.params;
|
|
6152
|
+
var appLoading = true;
|
|
6153
|
+
var memberLoading = display === "profile" ? true : false;
|
|
6154
|
+
var member;
|
|
6155
|
+
function setAppStore(data) {
|
|
6156
|
+
AppStore.update(function () { return data; });
|
|
6157
|
+
}
|
|
4454
6158
|
function closeModal() {
|
|
6159
|
+
// hacky way to remove all components prior to removing overlay
|
|
6160
|
+
$$invalidate(6, appLoading = true);
|
|
4455
6161
|
onSuccess({ type: "CLOSED" });
|
|
4456
6162
|
document.querySelector("#msOverlay").remove();
|
|
4457
6163
|
}
|
|
6164
|
+
var getApp = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
6165
|
+
var data;
|
|
6166
|
+
return __generator(this, function (_a) {
|
|
6167
|
+
switch (_a.label) {
|
|
6168
|
+
case 0: return [4 /*yield*/, window.$memberstackDom.getApp()];
|
|
6169
|
+
case 1:
|
|
6170
|
+
data = (_a.sent()).data;
|
|
6171
|
+
setAppStore(data);
|
|
6172
|
+
return [2 /*return*/];
|
|
6173
|
+
}
|
|
6174
|
+
});
|
|
6175
|
+
}); };
|
|
6176
|
+
function checkApp() {
|
|
6177
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6178
|
+
return __generator(this, function (_a) {
|
|
6179
|
+
switch (_a.label) {
|
|
6180
|
+
case 0:
|
|
6181
|
+
if (!(params && params.app)) return [3 /*break*/, 1];
|
|
6182
|
+
setAppStore(params.app);
|
|
6183
|
+
return [3 /*break*/, 3];
|
|
6184
|
+
case 1:
|
|
6185
|
+
console.log("No app specified - request it");
|
|
6186
|
+
return [4 /*yield*/, getApp()];
|
|
6187
|
+
case 2:
|
|
6188
|
+
_a.sent();
|
|
6189
|
+
_a.label = 3;
|
|
6190
|
+
case 3:
|
|
6191
|
+
$$invalidate(6, appLoading = false);
|
|
6192
|
+
$$invalidate(4, showLoader = false);
|
|
6193
|
+
return [2 /*return*/];
|
|
6194
|
+
}
|
|
6195
|
+
});
|
|
6196
|
+
});
|
|
6197
|
+
}
|
|
6198
|
+
var getMember = function () { return __awaiter(_this, void 0, void 0, function () {
|
|
6199
|
+
var data;
|
|
6200
|
+
return __generator(this, function (_a) {
|
|
6201
|
+
switch (_a.label) {
|
|
6202
|
+
case 0: return [4 /*yield*/, window.$memberstackDom.getCurrentMember()];
|
|
6203
|
+
case 1:
|
|
6204
|
+
data = (_a.sent()).data;
|
|
6205
|
+
$$invalidate(7, memberLoading = false);
|
|
6206
|
+
$$invalidate(3, member = data);
|
|
6207
|
+
if (display === "profile" && !data) {
|
|
6208
|
+
closeModal();
|
|
6209
|
+
throw new Error("Member not logged in");
|
|
6210
|
+
}
|
|
6211
|
+
return [2 /*return*/];
|
|
6212
|
+
}
|
|
6213
|
+
});
|
|
6214
|
+
}); };
|
|
6215
|
+
onMount(function () {
|
|
6216
|
+
checkApp();
|
|
6217
|
+
if (display === "profile") {
|
|
6218
|
+
getMember();
|
|
6219
|
+
}
|
|
6220
|
+
});
|
|
4458
6221
|
function loginmodal_display_binding(value) {
|
|
4459
6222
|
display = value;
|
|
4460
6223
|
$$invalidate(0, display);
|
|
@@ -4479,32 +6242,43 @@ function instance($$self, $$props, $$invalidate) {
|
|
|
4479
6242
|
display = value;
|
|
4480
6243
|
$$invalidate(0, display);
|
|
4481
6244
|
}
|
|
6245
|
+
function passwordsuccessmodal_display_binding(value) {
|
|
6246
|
+
display = value;
|
|
6247
|
+
$$invalidate(0, display);
|
|
6248
|
+
}
|
|
4482
6249
|
function profilemodal_display_binding(value) {
|
|
4483
6250
|
display = value;
|
|
4484
6251
|
$$invalidate(0, display);
|
|
4485
6252
|
}
|
|
4486
6253
|
$$self.$$set = function ($$props) {
|
|
4487
|
-
if ('showLoader' in $$props)
|
|
4488
|
-
$$invalidate(2, showLoader = $$props.showLoader);
|
|
4489
6254
|
if ('display' in $$props)
|
|
4490
6255
|
$$invalidate(0, display = $$props.display);
|
|
4491
6256
|
if ('onSuccess' in $$props)
|
|
4492
|
-
$$invalidate(
|
|
6257
|
+
$$invalidate(2, onSuccess = $$props.onSuccess);
|
|
4493
6258
|
if ('params' in $$props)
|
|
4494
6259
|
$$invalidate(1, params = $$props.params);
|
|
4495
6260
|
};
|
|
6261
|
+
$$self.$$.update = function () {
|
|
6262
|
+
if ($$self.$$.dirty & /*appLoading, memberLoading*/ 192) {
|
|
6263
|
+
$$invalidate(4, showLoader = appLoading || memberLoading);
|
|
6264
|
+
}
|
|
6265
|
+
};
|
|
4496
6266
|
return [
|
|
4497
6267
|
display,
|
|
4498
6268
|
params,
|
|
4499
|
-
showLoader,
|
|
4500
6269
|
onSuccess,
|
|
6270
|
+
member,
|
|
6271
|
+
showLoader,
|
|
4501
6272
|
closeModal,
|
|
6273
|
+
appLoading,
|
|
6274
|
+
memberLoading,
|
|
4502
6275
|
loginmodal_display_binding,
|
|
4503
6276
|
loginmodal_params_binding,
|
|
4504
6277
|
signupmodal_display_binding,
|
|
4505
6278
|
signupmodal_params_binding,
|
|
4506
6279
|
passwordresetmodal_display_binding,
|
|
4507
6280
|
passwordtokenmodal_display_binding,
|
|
6281
|
+
passwordsuccessmodal_display_binding,
|
|
4508
6282
|
profilemodal_display_binding
|
|
4509
6283
|
];
|
|
4510
6284
|
}
|
|
@@ -4512,12 +6286,7 @@ var Main = /** @class */ (function (_super) {
|
|
|
4512
6286
|
__extends(Main, _super);
|
|
4513
6287
|
function Main(options) {
|
|
4514
6288
|
var _this = _super.call(this) || this;
|
|
4515
|
-
init(_this, options, instance, create_fragment, safe_not_equal, {
|
|
4516
|
-
showLoader: 2,
|
|
4517
|
-
display: 0,
|
|
4518
|
-
onSuccess: 3,
|
|
4519
|
-
params: 1
|
|
4520
|
-
}, add_css);
|
|
6289
|
+
init(_this, options, instance, create_fragment, safe_not_equal, { display: 0, onSuccess: 2, params: 1 }, add_css);
|
|
4521
6290
|
return _this;
|
|
4522
6291
|
}
|
|
4523
6292
|
return Main;
|